yangg 1 månad sedan
förälder
incheckning
b1977376a0

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 536 - 764
pages/Personal/Personal.vue


+ 72 - 0
pages/interview-question/interview-question.vue

@@ -161,6 +161,14 @@
         <div class="countdown-text">准备开始回答</div>
       </div>
     </div>
+
+    <!-- 在template中添加蒙层 -->
+    <div class="ai-voice-overlay" v-if="isPlayingAiVoice">
+      <div class="ai-voice-content">
+        <div class="ai-voice-icon"></div>
+        <div class="ai-voice-text">面试官正在回复...</div>
+      </div>
+    </div>
   </div>
 </template>
 
@@ -3515,4 +3523,68 @@ video::-webkit-media-controls-fullscreen-button {
   left: 0;
   z-index: 5; /* 确保GIF在视频上方但在字幕和按钮下方 */
 }
+
+/* AI语音播放蒙层样式 */
+.ai-voice-overlay {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  background-color: rgba(0, 0, 0, 0.8); /* 0.8的透明度 */
+  z-index: 99; /* 确保在其他元素之上,但在倒计时蒙层之下 */
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+
+.ai-voice-content {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  color: #ffffff;
+}
+
+.ai-voice-icon {
+  width: 40px;
+  height: 40px;
+  border-radius: 50%;
+  background-color: #ffffff;
+  margin-bottom: 15px;
+  position: relative;
+  animation: pulse 1.5s infinite;
+}
+
+.ai-voice-icon::before {
+  content: '';
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  width: 20px;
+  height: 20px;
+  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23333"><path d="M12 15c1.66 0 3-1.34 3-3V6c0-1.66-1.34-3-3-3S9 4.34 9 6v6c0 1.66 1.34 3 3 3zm-1-9c0-.55.45-1 1-1s1 .45 1 1v6c0 .55-.45 1-1 1s-1-.45-1-1V6z"/><path d="M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"/></svg>');
+  background-repeat: no-repeat;
+  background-position: center;
+}
+
+.ai-voice-text {
+  font-size: 18px;
+  color: #ffffff;
+}
+
+@keyframes pulse {
+  0% {
+    transform: scale(1);
+    opacity: 1;
+  }
+  50% {
+    transform: scale(1.1);
+    opacity: 0.8;
+  }
+  100% {
+    transform: scale(1);
+    opacity: 1;
+  }
+}
 </style>

+ 17 - 4
pages/interview/interview.vue

@@ -259,6 +259,19 @@ import { apiBaseUrl } from '@/common/config.js'; // Import the base URL from a c
 					return;
 				}
 				
+				// 定义更详细的照片描述
+				const photoDescriptions = {
+					'left_palm': '展示完整的左手手掌',
+					'left_back': '展示完整的左手手背',
+					'left_fist': '展示完整的左手握拳',
+					'right_palm': '展示完整的右手手掌',
+					'right_back': '展示完整的右手手背',
+					'right_fist': '展示完整的右手握拳'
+				};
+				
+				// 获取当前照片类型的详细描述
+				const description = photoDescriptions[type] || `手部照片-${type}`;
+				
 				// 如果是H5环境且是base64数据
 				if (this.isH5 && filePathOrData.startsWith('data:image')) {
 					// 将base64转为blob对象
@@ -270,12 +283,12 @@ import { apiBaseUrl } from '@/common/config.js'; // Import the base URL from a c
 					formData.append('photo', blob, `${type}.jpg`);
 					formData.append('application_id', uni.getStorageSync('appId'));
 					formData.append('tenant_id', tenant_id);
-					formData.append('description', `手部照片-${type}`);
+					formData.append('description', description);
 					
 					console.log('H5上传参数:', {
 						application_id: uni.getStorageSync('appId'),
 						tenant_id: tenant_id,
-						description: `手部照片-${type}`
+						description: description
 					});
 					
 					// 使用fetch直接上传到 job/upload_posture_photo 接口
@@ -321,7 +334,7 @@ import { apiBaseUrl } from '@/common/config.js'; // Import the base URL from a c
 					console.log('小程序上传参数:', {
 						application_id: uni.getStorageSync('appId'),
 						tenant_id: tenant_id,
-						description: `手部照片-${type}`
+						description: description
 					});
 					
 					uni.uploadFile({
@@ -331,7 +344,7 @@ import { apiBaseUrl } from '@/common/config.js'; // Import the base URL from a c
 						formData: {  // 使用formData替代data以确保参数正确传递
 							'application_id': uni.getStorageSync('appId'),
 							'tenant_id': tenant_id,
-							'description': `手部照片-${type}`
+							'description': description
 						},
 						success: (uploadRes) => {
 							console.log('照片上传成功:', uploadRes);

+ 28 - 6
pages/success/success.vue

@@ -23,6 +23,7 @@
 </template>
 
 <script>
+import { apiBaseUrl } from '@/common/config.js';
 export default {
   data() {
     return {
@@ -34,16 +35,37 @@ export default {
       }
     }
   },
+  onLoad() {
+    this.completeInterview()
+  },
   methods: {
+    async completeInterview() {
+      try {
+        const result = await uni.request({
+          url: `${apiBaseUrl}/api/job/complete_interview`,
+          method: 'POST',
+          data: {
+            "application_id": JSON.parse(uni.getStorageSync('appId')),
+            "tenant_id": JSON.parse(uni.getStorageSync('userInfo')).tenant_id
+          }
+        });
+        
+        // if (result.statusCode === 200) {
+        //   console.log('面试完成状态已更新');
+        // } else {
+        //   console.error('更新面试状态失败');
+        // }
+      } catch (error) {
+       // console.error('请求失败:', error);
+      }
+    },
     goBack() {
-    
-          uni.switchTab({
-            url: '/pages/index/index'
-          });
-        }
+      uni.switchTab({
+        url: '/pages/index/index'
+      });
     }
   }
-
+}
 </script>
 
 <style>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 334 - 566
unpackage/dist/dev/mp-weixin/pages/Personal/Personal.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/Personal/Personal.wxml


+ 5 - 0
unpackage/dist/dev/mp-weixin/pages/Personal/Personal.wxss

@@ -631,4 +631,9 @@ input {
 }
 100% { transform: rotate(360deg);
 }
+}
+
+	/* 添加开关样式 */
+.form-item switch {
+		margin-top: 10rpx;
 }

+ 3 - 1
unpackage/dist/dev/mp-weixin/pages/interview-question/interview-question.js

@@ -2164,7 +2164,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     A: $data.showCountdown
   }, $data.showCountdown ? {
     B: common_vendor.t($data.countdownValue)
-  } : {});
+  } : {}, {
+    C: $data.isPlayingAiVoice
+  }, $data.isPlayingAiVoice ? {} : {});
 }
 const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2a02c54e"]]);
 wx.createPage(MiniProgramPage);

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/interview-question/interview-question.wxml


+ 59 - 0
unpackage/dist/dev/mp-weixin/pages/interview-question/interview-question.wxss

@@ -361,3 +361,62 @@ video.data-v-2a02c54e::-webkit-media-controls-fullscreen-button {
   left: 0;
   z-index: 5; /* 确保GIF在视频上方但在字幕和按钮下方 */
 }
+
+/* AI语音播放蒙层样式 */
+.ai-voice-overlay.data-v-2a02c54e {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  background-color: rgba(0, 0, 0, 0.8); /* 0.8的透明度 */
+  z-index: 99; /* 确保在其他元素之上,但在倒计时蒙层之下 */
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+.ai-voice-content.data-v-2a02c54e {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  color: #ffffff;
+}
+.ai-voice-icon.data-v-2a02c54e {
+  width: 40px;
+  height: 40px;
+  border-radius: 50%;
+  background-color: #ffffff;
+  margin-bottom: 15px;
+  position: relative;
+  animation: pulse-2a02c54e 1.5s infinite;
+}
+.ai-voice-icon.data-v-2a02c54e::before {
+  content: '';
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  width: 20px;
+  height: 20px;
+  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23333"><path d="M12 15c1.66 0 3-1.34 3-3V6c0-1.66-1.34-3-3-3S9 4.34 9 6v6c0 1.66 1.34 3 3 3zm-1-9c0-.55.45-1 1-1s1 .45 1 1v6c0 .55-.45 1-1 1s-1-.45-1-1V6z"/><path d="M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"/></svg>');
+  background-repeat: no-repeat;
+  background-position: center;
+}
+.ai-voice-text.data-v-2a02c54e {
+  font-size: 18px;
+  color: #ffffff;
+}
+@keyframes pulse-2a02c54e {
+0% {
+    transform: scale(1);
+    opacity: 1;
+}
+50% {
+    transform: scale(1.1);
+    opacity: 0.8;
+}
+100% {
+    transform: scale(1);
+    opacity: 1;
+}
+}

+ 13 - 4
unpackage/dist/dev/mp-weixin/pages/interview/interview.js

@@ -127,6 +127,15 @@ const _sfc_main = {
         });
         return;
       }
+      const photoDescriptions = {
+        "left_palm": "展示完整的左手手掌",
+        "left_back": "展示完整的左手手背",
+        "left_fist": "展示完整的左手握拳",
+        "right_palm": "展示完整的右手手掌",
+        "right_back": "展示完整的右手手背",
+        "right_fist": "展示完整的右手握拳"
+      };
+      const description = photoDescriptions[type] || `手部照片-${type}`;
       if (this.isH5 && filePathOrData.startsWith("data:image")) {
         const base64Data = filePathOrData.split(",")[1];
         const blob = this.base64ToBlob(base64Data, "image/jpeg");
@@ -134,11 +143,11 @@ const _sfc_main = {
         formData.append("photo", blob, `${type}.jpg`);
         formData.append("application_id", common_vendor.index.getStorageSync("appId"));
         formData.append("tenant_id", tenant_id);
-        formData.append("description", `手部照片-${type}`);
+        formData.append("description", description);
         console.log("H5上传参数:", {
           application_id: common_vendor.index.getStorageSync("appId"),
           tenant_id,
-          description: `手部照片-${type}`
+          description
         });
         fetch(`${common_config.apiBaseUrl}/job/upload_posture_photo`, {
           method: "POST",
@@ -174,7 +183,7 @@ const _sfc_main = {
         console.log("小程序上传参数:", {
           application_id: common_vendor.index.getStorageSync("appId"),
           tenant_id,
-          description: `手部照片-${type}`
+          description
         });
         common_vendor.index.uploadFile({
           url: `${common_config.apiBaseUrl}/job/upload_posture_photo`,
@@ -185,7 +194,7 @@ const _sfc_main = {
             // 使用formData替代data以确保参数正确传递
             "application_id": common_vendor.index.getStorageSync("appId"),
             "tenant_id": tenant_id,
-            "description": `手部照片-${type}`
+            "description": description
           },
           success: (uploadRes) => {
             console.log("照片上传成功:", uploadRes);

+ 17 - 0
unpackage/dist/dev/mp-weixin/pages/success/success.js

@@ -1,5 +1,6 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
+const common_config = require("../../common/config.js");
 const _sfc_main = {
   data() {
     return {
@@ -11,7 +12,23 @@ const _sfc_main = {
       }
     };
   },
+  onLoad() {
+    this.completeInterview();
+  },
   methods: {
+    async completeInterview() {
+      try {
+        const result = await common_vendor.index.request({
+          url: `${common_config.apiBaseUrl}/api/job/complete_interview`,
+          method: "POST",
+          data: {
+            "application_id": JSON.parse(common_vendor.index.getStorageSync("appId")),
+            "tenant_id": JSON.parse(common_vendor.index.getStorageSync("userInfo")).tenant_id
+          }
+        });
+      } catch (error) {
+      }
+    },
     goBack() {
       common_vendor.index.switchTab({
         url: "/pages/index/index"

+ 1 - 1
unpackage/dist/dev/mp-weixin/project.config.json

@@ -8,7 +8,7 @@
     "urlCheck": false,
     "es6": true,
     "postcss": false,
-    "minified": false,
+    "minified": true,
     "newFeature": true,
     "bigPackageSizeSupport": true,
     "babelSetting": {

+ 14 - 0
unpackage/dist/dev/mp-weixin/project.private.config.json

@@ -7,6 +7,20 @@
   "condition": {
     "miniprogram": {
       "list": [
+        {
+          "name": "pages/interview/interview",
+          "pathName": "pages/interview/interview",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "pages/success/success",
+          "pathName": "pages/success/success",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
         {
           "name": "pages/camera/camera",
           "pathName": "pages/camera/camera",

Vissa filer visades inte eftersom för många filer har ändrats