Browse Source

修改内容

yangg 4 months ago
parent
commit
2cb29cc6e4

+ 1 - 1
common/config.js

@@ -2,7 +2,7 @@
 //线上 https://minlong.raycos.com.cn
 //测试 http://192.168.66.187:8083
 //https://backend.qicai321.com
-export const apiBaseUrl = 'http://192.168.66.187:8083';
+export const apiBaseUrl = 'https://backend.qicai321.com';
 
 // You can add other global configuration settings here
 export const appVersion = '1.0.0';

+ 10 - 0
node_modules/.yarn-integrity

@@ -0,0 +1,10 @@
+{
+  "systemParams": "win32-x64-115",
+  "modulesFolders": [],
+  "flags": [],
+  "linkedModules": [],
+  "topLevelPatterns": [],
+  "lockfileEntries": {},
+  "files": [],
+  "artifacts": {}
+}

+ 7 - 4
pages/camera/camera.vue

@@ -25,7 +25,7 @@
 						<view class="question-importance">
 							<!-- <text v-if="currentQuestion.isImportant">重点题</text>  -->
 							<text class="question-type">{{question.questionTypeName}}</text> 
-							{{question.text}}
+							{{question.text}}<text class="question-type" v-if="question.is_required_correct">(红线题)</text> 
 						</view>
 
 						<!-- 添加图片显示区域,仅在 question_form 为 3 时显示 -->
@@ -211,6 +211,7 @@
 								explanation: q.explanation || '',
 								questionType: q.question_form,
 								questionTypeName: q.question_form_name || '单选题',
+								is_required_correct: q.is_required_correct || false,
 								correctAnswers: q.correct_answers || [],
 								difficulty: q.difficulty || 1,
 								difficultyName: q.difficulty_name || '初级',
@@ -253,6 +254,7 @@
 						explanation: data.explanation || '',
 						questionType: data.question_form, // 1-单选题,2-多选题,3-看图答题
 						questionTypeName: data.question_form_name || '单选题',
+						is_required_correct: data.is_required_correct || false,
 						correctAnswers: data.correct_answers || [],
 						difficulty: data.difficulty || 1,
 						difficultyName: data.difficulty_name || '初级',
@@ -643,6 +645,7 @@
 							explanation: res.explanation || '',
 							questionType: res.question_form || 1,
 							questionTypeName: res.question_form_name || '单选题',
+							is_required_correct: res.is_required_correct || false,
 							correctAnswers: res.correct_answers || [],
 							difficulty: res.difficulty || 1,
 							difficultyName: res.difficulty_name || '初级'
@@ -1037,7 +1040,7 @@
 	
 	.question-importance text {
 		color: #ff0000;
-		margin-right: 10rpx;
+		/* margin-right: 10rpx; */
 	}
 
 	.options {
@@ -1383,9 +1386,9 @@
 		/* background-color: #0039b3; */
 		color: white;
 		font-size: 24rpx;
-		padding: 4rpx 10rpx;
+	/* 	padding: 4rpx 5rpx; */
 		border-radius: 6rpx;
-		margin-right: 10rpx;
+		/* margin-right: 10rpx; */
 	}
 
 	/* 新增的开放问题样式 */

+ 28 - 1
pages/identity-verify/identity-verify.vue

@@ -2538,8 +2538,27 @@ export default {
       // 获取tenant_id,如果没有则使用默认值1
       const tenant_id = uni.getStorageSync('tenant_id') || '1';
       
+      // 获取当前选择的职位ID
+      let position_id = 1; // 默认值
+      try {
+        const selectedJob = JSON.parse(uni.getStorageSync('selectedJob') || '{}');
+        if (selectedJob && selectedJob.id) {
+          position_id = selectedJob.id;
+          console.log('使用选择的职位ID获取问题:', position_id);
+        } else {
+          console.warn('未找到选择的职位信息,使用默认职位ID:', position_id);
+        }
+      } catch (e) {
+        console.error('解析职位信息失败:', e);
+      }
+      
+      // 构建完整的请求URL,便于调试
+      const timestamp = Date.now();
+      const requestUrl = `${apiBaseUrl}/api/wechat/open_questions/?position_id=${position_id}&tenant_id=${tenant_id}&question_form=0&_t=${timestamp}`;
+      console.log('完整的请求URL:', requestUrl);
+      
       uni.request({
-        url: `${apiBaseUrl}/api/wechat/open_questions/?position_id=1&tenant_id=${tenant_id}&question_form=0`,
+        url: requestUrl,
         method: 'GET',
         success: (res) => {
           if (res.data && res.data.code === 2000 && res.data.data && res.data.data.items) {
@@ -2754,6 +2773,14 @@ export default {
       
       return null;
     },
+
+    onShow() {
+      console.log('identity-verify页面onShow');
+      console.log('当前本地存储中的职位信息:', uni.getStorageSync('selectedJob'));
+      
+      // 每次页面显示时重新获取问题
+      this.fetchQuestions();
+    }
   }
 }
 </script>

+ 4 - 6
pages/index/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="interview-container">
-		<!-- 职位列表 -->
-		<view class="job-list-container" v-if="!userInfoFilled">
+		<!-- 职位列表 v-if="!userInfoFilled"-->
+		<view class="job-list-container" >
 			<view class="job-list-title">可选职位列表</view>
 			<view class="job-list">
 				<view v-for="(job, index) in jobList" :key="index" class="job-item"
@@ -18,13 +18,12 @@
 		</view>
 
 		<!-- 表单信息 -->
-		<view class="form-container" v-if="userInfoFilled">
+		<!-- <view class="form-container" v-if="userInfoFilled">
 			<view class="form-title">请完成验证信息填写</view>
 
 			<view class="form-item phone-item">
 				<view class="country-code">
 					<text>+86</text>
-					<!-- <text class="dropdown-icon">▼</text> -->
 				</view>
 				<input type="number" v-model="formData.phone" placeholder="请输入手机号" maxlength="11" @input="validatePhone" />
 				<view class="validation-icon" v-if="formData.phone">
@@ -47,7 +46,6 @@
 					<text class="icon-error" v-else>✗</text>
 				</view>
 			</view>
-			<!-- 添加性别选择 -->
 			<view class="form-item">
 				<picker @change="genderChange" :value="genderIndex" :range="genderOptions">
 					<view class="picker-input">
@@ -67,7 +65,7 @@
 					我已阅读并同意<text class="agreement-link">《用户协议》</text>和<text class="agreement-link">《隐私政策》</text>
 				</text>
 			</view>
-		</view>
+		</view> -->
 	</view>
 </template>
 

+ 1 - 1
pages/preview/preview.vue

@@ -10,7 +10,7 @@
 		</view>
 		<!-- 拍照指引图示 -->
 		<view class="guide-image">
-			<image src="http://121.36.251.245:9000/minlong/%E5%9B%BE%E7%89%87%201%401x%20%281%29.png" mode="aspectFit"></image>
+			<image src="http://data.qicai321.com/minlong/ee86c2e0-6e18-49b8-a001-bba3af8995d4.jpg" mode="aspectFit"></image>
 		</view>
 		
 		<!-- 拍照要求列表 -->

+ 2 - 1
unpackage/dist/dev/mp-weixin/api/user.js

@@ -18,6 +18,7 @@ function wxLogin(loginParams) {
     rawData: loginParams.rawData || "",
     encryptedData: loginParams.encryptedData || "",
     iv: loginParams.iv || "",
+    tenant_id: 1,
     _csrf: csrfToken
     // 添加 CSRF token
   };
@@ -43,7 +44,7 @@ const getJobList = (params = {}) => {
     tenant_id: 1
   };
   ({ ...defaultParams, ...params });
-  return utils_request.http.get("/api/job/list", defaultParams);
+  return utils_request.http.get("/api/system/job/list", defaultParams);
 };
 const fillUserInfo = (params) => {
   return utils_request.http.post("/api/wechat/save_user_info", params);

+ 2 - 2
unpackage/dist/dev/mp-weixin/pages/Personal/Personal.js

@@ -623,8 +623,8 @@ const _sfc_main = {
           };
           if (res.data.code === 2e3) {
             this.currentStep++;
-            common_vendor.index.switchTab({
-              url: "/pages/index/index"
+            common_vendor.index.navigateTo({
+              url: "/pages/interview-notice/interview-notice"
             });
           } else {
             let errorMsg = res.data.msg || "身份验证失败";

+ 16 - 11
unpackage/dist/dev/mp-weixin/pages/camera/camera.js

@@ -103,6 +103,7 @@ const _sfc_main = {
             explanation: q.explanation || "",
             questionType: q.question_form,
             questionTypeName: q.question_form_name || "单选题",
+            is_required_correct: q.is_required_correct || false,
             correctAnswers: q.correct_answers || [],
             difficulty: q.difficulty || 1,
             difficultyName: q.difficulty_name || "初级",
@@ -135,6 +136,7 @@ const _sfc_main = {
           questionType: data.question_form,
           // 1-单选题,2-多选题,3-看图答题
           questionTypeName: data.question_form_name || "单选题",
+          is_required_correct: data.is_required_correct || false,
           correctAnswers: data.correct_answers || [],
           difficulty: data.difficulty || 1,
           difficultyName: data.difficulty_name || "初级",
@@ -413,6 +415,7 @@ const _sfc_main = {
             explanation: res2.explanation || "",
             questionType: res2.question_form || 1,
             questionTypeName: res2.question_form_name || "单选题",
+            is_required_correct: res2.is_required_correct || false,
             correctAnswers: res2.correct_answers || [],
             difficulty: res2.difficulty || 1,
             difficultyName: res2.difficulty_name || "初级"
@@ -573,13 +576,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
         a: common_vendor.t(qIndex + 1),
         b: common_vendor.t(question.questionTypeName),
         c: common_vendor.t(question.text),
-        d: question.questionType === 3 && question.imageUrl
+        d: question.is_required_correct
+      }, question.is_required_correct ? {} : {}, {
+        e: question.questionType === 3 && question.imageUrl
       }, question.questionType === 3 && question.imageUrl ? {
-        e: question.imageUrl
+        f: question.imageUrl
       } : {}, {
-        f: question.questionType !== 0
+        g: question.questionType !== 0
       }, question.questionType !== 0 ? {
-        g: common_vendor.f(question.options, (option, index, i1) => {
+        h: common_vendor.f(question.options, (option, index, i1) => {
           return {
             a: common_vendor.t(option.option_text || (typeof option === "string" ? option : JSON.stringify(option))),
             b: index,
@@ -587,16 +592,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
             d: common_vendor.o(($event) => qIndex === $data.currentQuestionIndex && $options.selectOption(index), index)
           };
         }),
-        h: qIndex !== $data.currentQuestionIndex ? 1 : ""
+        i: qIndex !== $data.currentQuestionIndex ? 1 : ""
       } : {}, {
-        i: qIndex === $data.currentQuestionIndex && question.questionType === 2
+        j: qIndex === $data.currentQuestionIndex && question.questionType === 2
       }, qIndex === $data.currentQuestionIndex && question.questionType === 2 ? {
-        j: common_vendor.t("提交答案"),
-        k: common_vendor.o(($event) => $options.nextQuestion(), question.id),
-        l: $data.selectedOptions.length === 0
+        k: common_vendor.t("提交答案"),
+        l: common_vendor.o(($event) => $options.nextQuestion(), question.id),
+        m: $data.selectedOptions.length === 0
       } : {}, {
-        m: question.id,
-        n: "question-" + qIndex
+        n: question.id,
+        o: "question-" + qIndex
       });
     }),
     h: common_vendor.t($data.questions.length),

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/camera/camera.wxml


+ 3 - 3
unpackage/dist/dev/mp-weixin/pages/camera/camera.wxss

@@ -154,7 +154,7 @@
 }
 .question-importance text {
 		color: #ff0000;
-		margin-right: 10rpx;
+		/* margin-right: 10rpx; */
 }
 .options {
 		display: flex;
@@ -457,9 +457,9 @@
 		/* background-color: #0039b3; */
 		color: white;
 		font-size: 24rpx;
-		padding: 4rpx 10rpx;
+	/* 	padding: 4rpx 5rpx; */
 		border-radius: 6rpx;
-		margin-right: 10rpx;
+		/* margin-right: 10rpx; */
 }
 
 	/* 新增的开放问题样式 */

+ 21 - 1
unpackage/dist/dev/mp-weixin/pages/identity-verify/identity-verify.js

@@ -1731,8 +1731,23 @@ const _sfc_main = {
     fetchQuestions() {
       this.loading = true;
       const tenant_id = common_vendor.index.getStorageSync("tenant_id") || "1";
+      let position_id = 1;
+      try {
+        const selectedJob = JSON.parse(common_vendor.index.getStorageSync("selectedJob") || "{}");
+        if (selectedJob && selectedJob.id) {
+          position_id = selectedJob.id;
+          console.log("使用选择的职位ID获取问题:", position_id);
+        } else {
+          console.warn("未找到选择的职位信息,使用默认职位ID:", position_id);
+        }
+      } catch (e) {
+        console.error("解析职位信息失败:", e);
+      }
+      const timestamp = Date.now();
+      const requestUrl = `${common_config.apiBaseUrl}/api/wechat/open_questions/?position_id=${position_id}&tenant_id=${tenant_id}&question_form=0&_t=${timestamp}`;
+      console.log("完整的请求URL:", requestUrl);
       common_vendor.index.request({
-        url: `${common_config.apiBaseUrl}/api/wechat/open_questions/?position_id=1&tenant_id=${tenant_id}&question_form=0`,
+        url: requestUrl,
         method: "GET",
         success: (res) => {
           if (res.data && res.data.code === 2e3 && res.data.data && res.data.data.items) {
@@ -1883,6 +1898,11 @@ const _sfc_main = {
         return sortedQuestions[questionIndex];
       }
       return null;
+    },
+    onShow() {
+      console.log("identity-verify页面onShow");
+      console.log("当前本地存储中的职位信息:", common_vendor.index.getStorageSync("selectedJob"));
+      this.fetchQuestions();
     }
   }
 };

+ 14 - 37
unpackage/dist/dev/mp-weixin/pages/index/index.js

@@ -176,8 +176,16 @@ const _sfc_main = {
       });
     },
     selectJob(job) {
+      try {
+        common_vendor.index.removeStorageSync("interviewQuestions");
+        common_vendor.index.removeStorageSync("currentQuestionIndex");
+      } catch (e) {
+        console.error("清除问题缓存失败:", e);
+      }
       this.selectedJobId = job.id;
       this.selectedJob = job;
+      common_vendor.index.setStorageSync("selectedJob", JSON.stringify(job));
+      console.log("已选择职位:", job.id, job.title);
     },
     applyForJob() {
       if (!this.checkLogin()) {
@@ -207,7 +215,7 @@ const _sfc_main = {
           }
         }
         common_vendor.index.navigateTo({
-          url: "/pages/interview-notice/interview-notice",
+          url: "/pages/Personal/Personal",
           fail: (err) => {
             console.error("页面跳转失败:", err);
             common_vendor.index.showToast({
@@ -397,10 +405,8 @@ const _sfc_main = {
   }
 };
 function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
-  return common_vendor.e({
-    a: !$data.userInfoFilled
-  }, !$data.userInfoFilled ? {
-    b: common_vendor.f($data.jobList, (job, index, i0) => {
+  return {
+    a: common_vendor.f($data.jobList, (job, index, i0) => {
       return {
         a: common_vendor.t(job.title),
         b: common_vendor.t(job.publish_date),
@@ -410,38 +416,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
         f: common_vendor.o(($event) => $options.selectJob(job), index)
       };
     }),
-    c: !$data.selectedJobId,
-    d: common_vendor.o((...args) => $options.applyForJob && $options.applyForJob(...args))
-  } : {}, {
-    e: $data.userInfoFilled
-  }, $data.userInfoFilled ? common_vendor.e({
-    f: common_vendor.o([($event) => $data.formData.phone = $event.detail.value, (...args) => $options.validatePhone && $options.validatePhone(...args)]),
-    g: $data.formData.phone,
-    h: $data.formData.phone
-  }, $data.formData.phone ? common_vendor.e({
-    i: $data.isPhoneValid
-  }, $data.isPhoneValid ? {} : {}) : {}, {
-    j: common_vendor.o([($event) => $data.formData.name = $event.detail.value, (...args) => $options.validateName && $options.validateName(...args)]),
-    k: $data.formData.name,
-    l: $data.formData.name
-  }, $data.formData.name ? common_vendor.e({
-    m: $data.isNameValid
-  }, $data.isNameValid ? {} : {}) : {}, {
-    n: common_vendor.o([($event) => $data.formData.idCard = $event.detail.value, (...args) => $options.validateIdCard && $options.validateIdCard(...args)]),
-    o: $data.formData.idCard,
-    p: $data.formData.idCard
-  }, $data.formData.idCard ? common_vendor.e({
-    q: $data.isIdCardValid
-  }, $data.isIdCardValid ? {} : {}) : {}, {
-    r: $data.formData.gender,
-    s: common_vendor.o((...args) => $options.genderChange && $options.genderChange(...args)),
-    t: $data.genderIndex,
-    v: $data.genderOptions,
-    w: !$options.canSubmitSimple,
-    x: common_vendor.o((...args) => $options.submitForm && $options.submitForm(...args)),
-    y: $data.isAgreed,
-    z: common_vendor.o((...args) => $options.toggleAgreement && $options.toggleAgreement(...args))
-  }) : {});
+    b: !$data.selectedJobId,
+    c: common_vendor.o((...args) => $options.applyForJob && $options.applyForJob(...args))
+  };
 }
 const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
 wx.createPage(MiniProgramPage);

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/index/index.wxml


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

@@ -124,8 +124,19 @@ const _sfc_main = {
       countdownTimer: null,
       showGif: false,
       // 控制是否显示GIF
-      gifUrl: ""
+      gifUrl: "",
       // GIF图片的URL
+      // 添加AI语音交互相关属性
+      aiVoiceUrl: "",
+      // AI语音URL
+      aiText: "",
+      // AI回复文本
+      transcribedText: "",
+      // 转写文本
+      isPlayingAiVoice: false,
+      // 是否正在播放AI语音
+      aiAudioPlayer: null
+      // AI语音播放器
     };
   },
   onLoad(options) {
@@ -156,6 +167,10 @@ const _sfc_main = {
   },
   beforeDestroy() {
     this.stopUserCamera();
+    if (this.aiAudioPlayer) {
+      this.aiAudioPlayer.destroy();
+      this.aiAudioPlayer = null;
+    }
   },
   methods: {
     // 初始化相机
@@ -1327,6 +1342,7 @@ const _sfc_main = {
               this.showRetryButton = false;
               this.lastVideoToRetry = null;
             }
+            this.submitToAiVoiceInteraction(videoUrl);
           } else {
             if (task) {
               this.handleSubmitFailure(task, res.data.msg || "提交失败");
@@ -1409,6 +1425,10 @@ const _sfc_main = {
     // 修改 proceedToNextQuestion 方法
     proceedToNextQuestion() {
       console.log("准备跳转到下一页面");
+      if (this.isPlayingAiVoice) {
+        console.log("AI语音正在播放,等待播放完成后再跳转");
+        return;
+      }
       this.navigateToNextPage();
       if (this.uploadQueue.length > 0) {
         console.log("上传队列将在后台继续处理...");
@@ -1417,6 +1437,11 @@ const _sfc_main = {
     },
     // 修改 navigateToNextPage 方法
     navigateToNextPage() {
+      console.log("准备导航到下一个页面");
+      if (this.isPlayingAiVoice) {
+        console.log("AI语音正在播放,等待播放完成后再跳转");
+        return;
+      }
       console.log("导航到下一个页面");
       common_vendor.index.navigateTo({
         url: "/pages/interview-result/interview-result?uploading=" + (this.uploadQueue.length > 0 ? "true" : "false"),
@@ -1446,9 +1471,11 @@ const _sfc_main = {
         duration: 500
         // 只显示0.5秒
       });
-      setTimeout(() => {
+      if (this.lastUploadedVideoUrl) {
+        this.submitToAiVoiceInteraction(this.lastUploadedVideoUrl);
+      } else {
         this.navigateToNextPage();
-      }, 500);
+      }
     },
     // 处理相机错误
     handleCameraError(e) {
@@ -1814,6 +1841,138 @@ const _sfc_main = {
       } catch (e) {
         console.error("保存上传状态失败:", e);
       }
+    },
+    // 修改 submitToAiVoiceInteraction 方法,使用 FormData 提交
+    submitToAiVoiceInteraction(videoUrl) {
+      console.log("提交视频到AI语音交互接口:", videoUrl);
+      common_vendor.index.showLoading({
+        title: "AI正在思考...",
+        mask: true
+      });
+      const tenant_id = common_vendor.index.getStorageSync("tenant_id") || "1";
+      const userInfo = common_vendor.index.getStorageSync("userInfo");
+      const openid = userInfo ? JSON.parse(userInfo).openid || "" : "";
+      const systemInfo = common_vendor.index.getSystemInfoSync();
+      const isMiniProgram = systemInfo.uniPlatform && systemInfo.uniPlatform.startsWith("mp-");
+      if (isMiniProgram) {
+        common_vendor.index.request({
+          url: `${common_config.apiBaseUrl}/api/voice_ai_interaction`,
+          method: "POST",
+          data: {
+            url: videoUrl,
+            tenant_id,
+            openid,
+            application_id: common_vendor.index.getStorageSync("appId") || ""
+          },
+          header: {
+            "content-type": "application/json"
+          },
+          success: (res) => {
+            this.handleAiInteractionResponse(res.data);
+          },
+          fail: (err) => {
+            this.handleAiInteractionError(err);
+          }
+        });
+      } else {
+        const formData = new FormData();
+        formData.append("url", videoUrl);
+        formData.append("tenant_id", tenant_id);
+        formData.append("openid", openid);
+        formData.append("application_id", common_vendor.index.getStorageSync("appId") || "");
+        const xhr = new XMLHttpRequest();
+        xhr.open("POST", `${common_config.apiBaseUrl}/api/voice_ai_interaction`, true);
+        xhr.timeout = 6e4;
+        xhr.onload = () => {
+          if (xhr.status === 200) {
+            try {
+              const response = JSON.parse(xhr.responseText);
+              this.handleAiInteractionResponse(response);
+            } catch (e) {
+              console.error("解析AI响应失败:", e);
+              this.handleAiInteractionError({ errMsg: "解析响应失败" });
+            }
+          } else {
+            this.handleAiInteractionError({ errMsg: "HTTP状态: " + xhr.status });
+          }
+        };
+        xhr.onerror = () => {
+          this.handleAiInteractionError({ errMsg: "网络错误" });
+        };
+        xhr.ontimeout = () => {
+          this.handleAiInteractionError({ errMsg: "请求超时" });
+        };
+        xhr.send(formData);
+      }
+    },
+    // 添加处理AI交互响应的方法
+    handleAiInteractionResponse(data) {
+      console.log("AI语音交互接口响应:", data);
+      common_vendor.index.hideLoading();
+      if (data && data.success) {
+        this.aiText = data.ai_text || "";
+        this.transcribedText = data.transcribed_text ? data.transcribed_text.text : "";
+        const aiVoiceUrl = data.ai_voice_url || "";
+        if (aiVoiceUrl) {
+          this.aiVoiceUrl = aiVoiceUrl.startsWith("http") ? aiVoiceUrl : `${common_config.apiBaseUrl}${aiVoiceUrl}`;
+          console.log("AI语音URL:", this.aiVoiceUrl);
+          this.currentSubtitle = this.aiText;
+          this.playAiVoice();
+        } else {
+          console.warn("未获取到AI语音URL");
+          this.navigateToNextPage();
+        }
+      } else {
+        console.error("AI语音交互失败:", data);
+        this.navigateToNextPage();
+      }
+    },
+    // 添加处理AI交互错误的方法
+    handleAiInteractionError(err) {
+      console.error("AI语音交互请求失败:", err);
+      common_vendor.index.hideLoading();
+      common_vendor.index.showToast({
+        title: "AI处理失败,请稍后再试",
+        icon: "none",
+        duration: 2e3
+      });
+      this.navigateToNextPage();
+    },
+    // 添加新方法:播放AI语音
+    playAiVoice() {
+      console.log("开始播放AI语音:", this.aiVoiceUrl);
+      this.isPlayingAiVoice = true;
+      this.aiAudioPlayer = common_vendor.index.createInnerAudioContext();
+      this.aiAudioPlayer.src = this.aiVoiceUrl;
+      this.aiAudioPlayer.autoplay = true;
+      this.aiAudioPlayer.onPlay(() => {
+        console.log("AI语音开始播放");
+        common_vendor.index.showToast({
+          title: "正在播放AI回复",
+          icon: "none",
+          duration: 2e3
+        });
+      });
+      this.aiAudioPlayer.onEnded(() => {
+        console.log("AI语音播放结束");
+        this.isPlayingAiVoice = false;
+        this.currentSubtitle = "";
+        if (this.aiAudioPlayer) {
+          this.aiAudioPlayer.destroy();
+          this.aiAudioPlayer = null;
+        }
+        this.navigateToNextPage();
+      });
+      this.aiAudioPlayer.onError((err) => {
+        console.error("AI语音播放错误:", err);
+        this.isPlayingAiVoice = false;
+        this.currentSubtitle = "";
+        if (this.aiAudioPlayer) {
+          this.aiAudioPlayer.destroy();
+          this.aiAudioPlayer = null;
+        }
+        this.navigateToNextPage();
+      });
     }
   }
 };

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

@@ -264,10 +264,10 @@ const _sfc_main = {
             duration: 2e3,
             success: () => {
               setTimeout(() => {
-                common_vendor.index.navigateTo({
+                common_vendor.index.redirectTo({
                   url: "/pages/interview_success/interview_success"
                 });
-              }, 2e3);
+              }, 100);
             }
           });
         }, 500);

+ 9 - 5
unpackage/dist/dev/mp-weixin/pages/login/login.js

@@ -67,6 +67,7 @@ const _sfc_main = {
           const loginParams = {
             code: this.wxLoginCode,
             userInfo: profileRes.userInfo,
+            tenant_id: 1,
             signature: profileRes.signature,
             rawData: profileRes.rawData,
             encryptedData: profileRes.encryptedData,
@@ -84,8 +85,10 @@ const _sfc_main = {
               gender: 0,
               province: "",
               city: "",
-              country: ""
-            }
+              country: "",
+              tenant_id: 1
+            },
+            tenant_id: 1
           });
         }
       });
@@ -116,7 +119,8 @@ const _sfc_main = {
         unionid: data.unionid || "",
         session_key: data.session_key || "",
         is_new_user: data.is_new_user || false,
-        loginTime: (/* @__PURE__ */ new Date()).getTime()
+        loginTime: (/* @__PURE__ */ new Date()).getTime(),
+        tenant_id: 1
       };
       console.log("构建的用户数据:", userData);
       return userData;
@@ -178,8 +182,8 @@ const _sfc_main = {
         icon: "success",
         success: () => {
           setTimeout(() => {
-            common_vendor.index.navigateTo({
-              url: "/pages/Personal/Personal"
+            common_vendor.index.switchTab({
+              url: "/pages/index/index"
             });
           }, 1500);
         }

+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/preview/preview.wxml

@@ -1 +1 @@
-<view class="preview-container"><view class="title"><text>下面我们将拍摄证件照片</text></view><view class="guide-text"><text>请您在白色的背景前拍照</text></view><view class="guide-image"><image src="http://121.36.251.245:9000/minlong/%E5%9B%BE%E7%89%87%201%401x%20%281%29.png" mode="aspectFit"></image></view><view class="requirements-list"><view class="requirement-item"><text>· 请摘掉耳饰、发饰、项链等影响拍摄效果的饰品</text></view><view class="requirement-item"><text>· 请勿化妆、头发不要遮挡耳朵、眉毛</text></view><view class="requirement-item"><text>· 拍照时,请您露出锁骨或衣领</text></view><view class="requirement-item"><text>· 在光线充足的环境下拍摄</text></view></view><view class="action-button"><button bindtap="{{a}}">准备好了</button></view></view>
+<view class="preview-container"><view class="title"><text>下面我们将拍摄证件照片</text></view><view class="guide-text"><text>请您在白色的背景前拍照</text></view><view class="guide-image"><image src="http://data.qicai321.com/minlong/ee86c2e0-6e18-49b8-a001-bba3af8995d4.jpg" mode="aspectFit"></image></view><view class="requirements-list"><view class="requirement-item"><text>· 请摘掉耳饰、发饰、项链等影响拍摄效果的饰品</text></view><view class="requirement-item"><text>· 请勿化妆、头发不要遮挡耳朵、眉毛</text></view><view class="requirement-item"><text>· 拍照时,请您露出锁骨或衣领</text></view><view class="requirement-item"><text>· 在光线充足的环境下拍摄</text></view></view><view class="action-button"><button bindtap="{{a}}">准备好了</button></view></view>

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

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

+ 4 - 0
yarn.lock

@@ -0,0 +1,4 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+

Some files were not shown because too many files changed in this diff