Kaynağa Gözat

修改问题

yangg 2 ay önce
ebeveyn
işleme
cf298f04da
32 değiştirilmiş dosya ile 1138 ekleme ve 535 silme
  1. 1 1
      common/config.js
  2. 8 3
      pages.json
  3. 28 8
      pages/camera/camera.vue
  4. 5 5
      pages/face-photo/face-photo.vue
  5. 8 8
      pages/identity-verify/identity-verify.vue
  6. 190 202
      pages/index/index.vue
  7. 63 62
      pages/interview-notice/interview-notice.vue
  8. 315 0
      pages/login/login.vue
  9. BIN
      static/login-image.png
  10. 1 0
      unpackage/dist/dev/mp-weixin/app.js
  11. 1 0
      unpackage/dist/dev/mp-weixin/app.json
  12. 3 1
      unpackage/dist/dev/mp-weixin/common/assets.js
  13. 1 1
      unpackage/dist/dev/mp-weixin/common/config.js
  14. 41 27
      unpackage/dist/dev/mp-weixin/pages/camera/camera.js
  15. 0 1
      unpackage/dist/dev/mp-weixin/pages/camera/camera.wxml
  16. 12 5
      unpackage/dist/dev/mp-weixin/pages/camera/camera.wxss
  17. 5 5
      unpackage/dist/dev/mp-weixin/pages/face-photo/face-photo.wxss
  18. 6 6
      unpackage/dist/dev/mp-weixin/pages/identity-verify/identity-verify.js
  19. 2 2
      unpackage/dist/dev/mp-weixin/pages/identity-verify/identity-verify.wxss
  20. 53 80
      unpackage/dist/dev/mp-weixin/pages/index/index.js
  21. 0 0
      unpackage/dist/dev/mp-weixin/pages/index/index.wxml
  22. 102 78
      unpackage/dist/dev/mp-weixin/pages/index/index.wxss
  23. 0 1
      unpackage/dist/dev/mp-weixin/pages/interview-notice/interview-notice.json
  24. 1 1
      unpackage/dist/dev/mp-weixin/pages/interview-notice/interview-notice.wxml
  25. 38 36
      unpackage/dist/dev/mp-weixin/pages/interview-notice/interview-notice.wxss
  26. 203 0
      unpackage/dist/dev/mp-weixin/pages/login/login.js
  27. 4 0
      unpackage/dist/dev/mp-weixin/pages/login/login.json
  28. 1 0
      unpackage/dist/dev/mp-weixin/pages/login/login.wxml
  29. 44 0
      unpackage/dist/dev/mp-weixin/pages/login/login.wxss
  30. 1 1
      unpackage/dist/dev/mp-weixin/pages/my/my.js
  31. 1 1
      unpackage/dist/dev/mp-weixin/project.config.json
  32. BIN
      unpackage/dist/dev/mp-weixin/static/login-image.png

+ 1 - 1
common/config.js

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

+ 8 - 3
pages.json

@@ -6,6 +6,12 @@
 				"navigationBarTitleText": "面试报名"
 			}
 		},
+		{
+			"path": "pages/login/login",
+			"style": {
+				"navigationBarTitleText": "登录"
+			}
+		},
 		{
 			"path": "pages/success/success",
 			"style": {
@@ -15,9 +21,8 @@
 		{
 			"path": "pages/interview-notice/interview-notice",
 			"style": {
-				"navigationBarTitleText": "面试注意事项",
-				"autoBackButton": "false"
-			}
+				"navigationBarTitleText": "面试注意事项"
+				}
 		},
 		{
 			"path": "pages/identity-verify/identity-verify",

+ 28 - 8
pages/camera/camera.vue

@@ -16,7 +16,9 @@
 		<view class="content">
 			<!-- 数字人头像 -->
 			<view class="digital-avatar">
-				<web-view v-if="digitalHumanUrl" :src="digitalHumanUrl" class="digital-human-webview"></web-view>
+				<camera v-if="!digitalHumanUrl" device-position="front" flash="auto" class="camera" 
+						:mode="mode" @error="handleCameraError"></camera>
+				<web-view v-else-if="digitalHumanUrl" :src="digitalHumanUrl" class="digital-human-webview"></web-view>
 				<image v-else src="/static/avatar.png" mode="aspectFill" class="avatar-image"></image>
 			</view>
 
@@ -171,6 +173,7 @@
 				openQuestionAnswer: '', // 存储开放问题的答案
 				currentAnswer: null, // 存储当前答案以便提交
 				questionStartTime: null, // 存储问题开始时间
+				mode: 'normal', // 相机模式
 			}
 		},
 		computed: {
@@ -512,7 +515,7 @@
 					
 					const submitData = {
 						job_id: JSON.parse(uni.getStorageSync('selectedJob')).id,
-						applicant_id: uni.getStorageSync('appId'), // 或者使用其他合适的ID
+						applicant_id: JSON.parse(uni.getStorageSync('userInfo')).id,//uni.getStorageSync('appId'), // 或者使用其他合适的ID
 						question_id: this.currentAnswer.questionId,
 						answer_content: answerContent,
 						answer_duration: this.currentAnswer.answerDuration || 0,
@@ -770,7 +773,16 @@
 						});
 					}
 				});
-			}
+			},
+
+			// 添加 handleCameraError 方法
+			handleCameraError(e) {
+				console.error('相机错误:', e.detail);
+				uni.showToast({
+					title: '相机启动失败,请检查权限设置',
+					icon: 'none'
+				});
+			},
 		},
 		// 添加生命周期钩子,确保在组件销毁时清除计时器
 		beforeDestroy() {
@@ -1006,7 +1018,7 @@
 	}
 
 	.next-button {
-		background-color: #6c5ce7;
+		background-color: #0039b3;
 		color: #ffffff;
 		border-radius: 10rpx;
 		font-size: 30rpx;
@@ -1072,7 +1084,7 @@
 	.score-display {
 		font-size: 48rpx;
 		font-weight: bold;
-		color: #6c5ce7;
+		color: #0039b3;
 		margin: 20rpx 0;
 	}
 	
@@ -1117,8 +1129,16 @@
 		height: 120rpx;
 		z-index: 10;
 		overflow: hidden;
+		border-radius: 20rpx;
 	}
 	
+	.camera {
+		width: 120rpx;
+		height: 120rpx;
+		border-radius: 20rpx;
+		border: 2rpx solid #e0e0e0;
+	}
+
 	.avatar-image {
 		width: 120rpx;
 		height: 120rpx;
@@ -1176,7 +1196,7 @@
 	}
 
 	.complete-button {
-		background-color: #6c5ce7;
+		background-color: #0039b3;
 		color: #ffffff;
 		border-radius: 10rpx;
 		font-size: 32rpx;
@@ -1216,7 +1236,7 @@
 	}
 	
 	.retry-button {
-		background-color: #6c5ce7;
+		background-color: #0039b3;
 		color: #ffffff;
 		border-radius: 10rpx;
 		font-size: 28rpx;
@@ -1225,7 +1245,7 @@
 
 	.question-type {
 		display: inline-block;
-		background-color: #6c5ce7;
+		background-color: #0039b3;
 		color: white;
 		font-size: 24rpx;
 		padding: 4rpx 10rpx;

+ 5 - 5
pages/face-photo/face-photo.vue

@@ -436,7 +436,7 @@ export default {
 }
 
 .mode-option.active {
-  background-color: #6c5ce7;
+  background-color: #0039b3;
   color: #fff;
 }
 
@@ -519,7 +519,7 @@ export default {
   width: 100%;
   height: 90rpx;
   line-height: 90rpx;
-  background-color: #6c5ce7;
+  background-color: #0039b3;
   color: #fff;
   border-radius: 45rpx;
   font-size: 32rpx;
@@ -547,8 +547,8 @@ export default {
   height: 90rpx;
   line-height: 90rpx;
   background-color: #fff;
-  color: #6c5ce7;
-  border: 1px solid #6c5ce7;
+  color: #0039b3;
+  border: 1px solid #0039b3;
   border-radius: 45rpx;
   font-size: 32rpx;
 }
@@ -557,7 +557,7 @@ export default {
   width: 45%;
   height: 90rpx;
   line-height: 90rpx;
-  background-color: #6c5ce7;
+  background-color: #0039b3;
   color: #fff;
   border-radius: 45rpx;
   font-size: 32rpx;

+ 8 - 8
pages/identity-verify/identity-verify.vue

@@ -217,12 +217,12 @@ export default {
       showAnswerButton: false, // 控制答题按钮显示
       currentVideoIndex: 0, // 当前播放的视频索引
       videoList: [
-        'http://121.36.251.245:9000/minlong/9c139c99-a613-49f2-986b-8a3ac20a9b1b.mp4', // 第一段视频
-        'http://121.36.251.245:9000/minlong/15467aca-2c1e-4d40-bebc-11fc984f0a24.mp4', // 第二段视频
-        'http://121.36.251.245:9000/minlong/a96f295c-ecba-4b08-b627-0ed0dc72d727.mp4', // 第三段视频
-        'http://121.36.251.245:9000/minlong/e152eb38-7e03-4bb0-8b8d-73d51342d2aa.mp4',
-        'http://121.36.251.245:9000/minlong/6381eec3-1373-400f-aa8c-e229b60522ea.mp4',
-        'http://121.36.251.245:9000/minlong/2a11fe78-38d5-4af3-91c8-a080feb122e0.mp4'//结束
+        'http://121.36.251.245:9000/minlong/tenant_1/general_uploads/880a117c8fcc4196b0d8c0750608d373.mp4', // 第一段视频
+        'http://121.36.251.245:9000/minlong/tenant_1/general_uploads/e465e23d377b4456bbb3b755d3ad9500.mp4', // 第二段视频
+        'http://121.36.251.245:9000/minlong/tenant_1/general_uploads/9bc84230d2a14978b4ea0a97e4102a15.mp4', // 第三段视频
+        'http://121.36.251.245:9000/minlong/tenant_1/general_uploads/9b48e824432f451d9e27e12b884d9074.mp4',
+        'http://121.36.251.245:9000/minlong/tenant_1/general_uploads/52f1445b400345e1a673b3c7f05e5cc1.mp4',
+        'http://121.36.251.245:9000/minlong/tenant_1/general_uploads/abdaa6fda8494e3a8613304743ed0433.mp4'//结束
       ],
       isRecording: false,
       recordingTimer: null,
@@ -2635,7 +2635,7 @@ video::-webkit-media-controls-fullscreen-button {
   width: 120px;
   height: 120px;
   border-radius: 50%;
- background-color: #6c5ce7; /* 绿色背景,与图片中的颜色类似 */
+ background-color: #0039b3; /* 绿色背景,与图片中的颜色类似 */
   color: white;
   font-size: 18px;
   border: none;
@@ -2746,7 +2746,7 @@ video::-webkit-media-controls-fullscreen-button {
   width: 120px;
   height: 120px;
   border-radius: 50%;
-  background-color: #6c5ce7; /* 与开始面试按钮颜色保持一致 */
+  background-color: #0039b3; /* 与开始面试按钮颜色保持一致 */
   color: white;
   font-size: 18px;
   border: none;

+ 190 - 202
pages/index/index.vue

@@ -1,25 +1,5 @@
 <template>
 	<view class="interview-container">
-		<!-- 顶部导航栏 -->
-		<!-- 面试信息 -->
-		<!-- <view class="interview-info">
-      <view class="info-item">
-        <text class="label">面试岗位:</text>
-        <text class="value">前端岗位</text>
-      </view>
-      <view class="info-item">
-        <text class="label">面试岗位:</text>
-        <text class="value">2024年06月28日 14:48</text>
-      </view>
-      <view class="info-item">
-        <text class="value">2024年06月28日 16:47</text>
-      </view>
-      <view class="info-item">
-        <text class="label">公司全称:</text>
-        <text class="value">敏龙科技集团有限公司</text>
-      </view>
-    </view> -->
-
 		<!-- 职位列表 -->
 		<view class="job-list-container" v-if="!userInfoFilled">
 			<view class="job-list-title">可选职位列表</view>
@@ -39,69 +19,44 @@
 
 		<!-- 表单信息 -->
 		<view class="form-container" v-if="userInfoFilled">
-			<view class="form-title">填写报名信息</view>
-			<view class="form-subtitle">如确认报名(此次面试),请填写以下信息</view>
+			<view class="form-title">请完成验证信息填写</view>
 
-			<view class="form-item">
-				<text class="form-label">姓名 <text class="required">*</text></text>
-				<input type="text" v-model="formData.name" placeholder="请输入姓名" />
-			</view>
-
-			<view class="form-item">
-				<text class="form-label">性别 <text class="required">*</text></text>
-				<view class="radio-group">
-					<view class="radio-item" @click="formData.gender = '男'">
-						<view class="radio-circle" :class="{'radio-selected': formData.gender === '男'}"></view>
-						<text class="radio-text">男</text>
-					</view>
-					<view class="radio-item" @click="formData.gender = '女'">
-						<view class="radio-circle" :class="{'radio-selected': formData.gender === '女'}"></view>
-						<text class="radio-text">女</text>
-					</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">
+					<text class="icon-success" v-if="isPhoneValid">✓</text>
+					<text class="icon-error" v-else>✗</text>
 				</view>
 			</view>
 
 			<view class="form-item">
-				<text class="form-label">身份证号 <text class="required">*</text></text>
-				<input type="text" v-model="formData.idCard" placeholder="请输入有效身份证号" maxlength="18" />
-			</view>
-
-			<view class="form-item">
-				<text class="form-label">手机号 <text class="required">*</text></text>
-				<input type="number" v-model="formData.phone" placeholder="请输入手机号" maxlength="11" />
-			</view>
-
-			<view class="form-item">
-				<text class="form-label">紧急联系人 <text class="required">*</text></text>
-				<input type="text" v-model="formData.emergencyContact" placeholder="请输入紧急联系人姓名" />
+				<input type="text" v-model="formData.name" placeholder="请输入姓名" @input="validateName" />
+				<view class="validation-icon" v-if="formData.name">
+					<text class="icon-success" v-if="isNameValid">✓</text>
+					<text class="icon-error" v-else>✗</text>
+				</view>
 			</view>
 
 			<view class="form-item">
-				<text class="form-label">紧急联系人电话 <text class="required">*</text></text>
-				<input type="number" v-model="formData.emergencyPhone" placeholder="请输入紧急联系人电话" maxlength="11" />
+				<input type="text" v-model="formData.idCard" placeholder="请输入身份证号" maxlength="18" @input="validateIdCard" />
+				<view class="validation-icon" v-if="formData.idCard">
+					<text class="icon-success" v-if="isIdCardValid">✓</text>
+					<text class="icon-error" v-else>✗</text>
+				</view>
 			</view>
 
-			<view class="form-item">
-				<text class="form-label">与紧急联系人关系 <text class="required">*</text></text>
-				<picker @change="relationChange" :value="relationIndex" :range="relationOptions">
-					<view class="picker-view">
-						<text>{{formData.relation || '请选择关系'}}</text>
-						<text class="picker-arrow">▼</text>
-					</view>
-				</picker>
-			</view>
+			<button class="verify-btn" :disabled="!canSubmitSimple" @click="submitForm">确认面试</button>
 
 			<view class="agreement">
-				<checkbox :checked="isAgreed" @tap="toggleAgreement" color="#6c5ce7" />
+				<checkbox :checked="isAgreed" @tap="toggleAgreement" color="#0039b3" />
 				<text class="agreement-text">
-					我已阅读并同意
-					<text class="agreement-link">《身份验证服务协议》</text>
-					<text class="agreement-link">《隐私保护政策》</text>
-					<text class="agreement-link">《网络安全协议》</text>
+					我已阅读并同意<text class="agreement-link">《用户协议》</text>和<text class="agreement-link">《隐私政策》</text>
 				</text>
 			</view>
-
-			<button class="submit-btn" :disabled="!canSubmit" @click="submitForm">提交</button>
 		</view>
 	</view>
 </template>
@@ -132,7 +87,10 @@
 				userInfoFilled: false,
 				jobList: [],
 				selectedJobId: null,
-				selectedJob: null
+				selectedJob: null,
+				isPhoneValid: false,
+				isNameValid: false,
+				isIdCardValid: false
 			}
 		},
 		onLoad() {
@@ -153,19 +111,28 @@
 					(/^1\d{10}$/.test(this.formData.emergencyPhone)) &&
 					this.formData.relation &&
 					this.isAgreed;
+			},
+			canSubmitSimple() {
+				return this.formData.name.trim() &&
+					this.formData.phone.trim() &&
+					this.isPhoneValid &&
+					this.formData.idCard.trim() &&
+					this.isIdCardValid &&
+					this.isAgreed;
 			}
 		},
 		methods: {
 			checkLogin() {
 				const userInfo = uni.getStorageSync('userInfo');
 				if (!userInfo) {
-					uni.switchTab({
-						url: '/pages/my/my',
+					// 未登录时跳转到身份验证登录页面
+					uni.reLaunch({
+						url: '/pages/login/login',
 						success: () => {
-							console.log('跳转到登录页面成功');
+							console.log('跳转到身份验证登录页面成功');
 						},
 						fail: (err) => {
-							console.error('跳转到登录页面失败:', err);
+							console.error('跳转到身份验证登录页面失败:', err);
 							uni.showToast({
 								title: '跳转失败,请重试',
 								icon: 'none'
@@ -178,8 +145,9 @@
 				try {
 					const parsedUserInfo = JSON.parse(userInfo);
 					if (!parsedUserInfo.openid) {
-						uni.switchTab({
-							url: '/pages/my/my'
+						// 没有openid时跳转到身份验证登录页面
+						uni.navigateTo({
+							url: '/pages/login/login'
 						});
 						return false;
 					}
@@ -187,8 +155,8 @@
 				} catch (e) {
 					console.error('解析用户信息失败:', e);
 					uni.removeStorageSync('userInfo');
-					uni.switchTab({
-						url: '/pages/my/my'
+					uni.navigateTo({
+						url: '/pages/login/login'
 					});
 					return false;
 				}
@@ -221,28 +189,23 @@
 					getUserInfo(userInfo.id)
 						.then(res => {
 							uni.hideLoading();
-							console.log('res:', res);
-								const userData = res;
-								if (userData.name==null && userData.phone==null) {
-									this.userInfoFilled = true;
-									this.formData.name = userData.name || '';
-									this.formData.gender = userData.gender || '';
-									this.formData.phone = userData.phone || '';
-									this.formData.idCard = userData.id_card || '';
-									this.formData.emergencyContact = userData.emergency_contact || '';
-									this.formData.emergencyPhone = userData.emergency_phone || '';
-									this.formData.relation = userData.relation || '';
-									if (userData.relation) {
-										const index = this.relationOptions.findIndex(item => item === userData.relation);
-										if (index !== -1) {
-											this.relationIndex = index;
-										}
+							const userData = res;
+							if (!userData.name || !userData.phone) {
+								this.userInfoFilled = true;
+								this.formData.name = userData.name || '';
+								this.formData.gender = userData.gender || '';
+								this.formData.phone = userData.phone || '';
+								this.formData.idCard = userData.id_card || '';
+								this.formData.emergencyContact = userData.emergency_contact || '';
+								this.formData.emergencyPhone = userData.emergency_phone || '';
+								this.formData.relation = userData.relation || '';
+								if (userData.relation) {
+									const index = this.relationOptions.findIndex(item => item === userData.relation);
+									if (index !== -1) {
+										this.relationIndex = index;
 									}
-									// uni.navigateTo({
-									// 	url: '/pages/success/success'
-									// });
 								}
-						
+							}
 						})
 						.catch(err => {
 							uni.hideLoading();
@@ -260,7 +223,7 @@
 						icon: 'none'
 					});
 					uni.navigateTo({
-						url: '/pages/my/my'
+						url: '/pages/login/login'
 					});
 				}
 			},
@@ -355,13 +318,13 @@
 					return;
 				}
 
-				if (!this.formData.gender) {
+				/* if (!this.formData.gender) {
 					uni.showToast({
 						title: '请选择性别',
 						icon: 'none'
 					});
 					return;
-				}
+				} */
 
 				if (!this.formData.phone.trim()) {
 					uni.showToast({
@@ -379,14 +342,6 @@
 					return;
 				}
 
-				if (this.formData.email && !/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/.test(this.formData.email)) {
-					uni.showToast({
-						title: '请输入正确的邮箱',
-						icon: 'none'
-					});
-					return;
-				}
-
 				if (!this.formData.idCard.trim()) {
 					uni.showToast({
 						title: '请输入身份证号',
@@ -404,7 +359,7 @@
 					return;
 				}
 
-				if (!this.formData.emergencyContact.trim()) {
+				/* if (!this.formData.emergencyContact.trim()) {
 					uni.showToast({
 						title: '请输入紧急联系人',
 						icon: 'none'
@@ -418,9 +373,9 @@
 						icon: 'none'
 					});
 					return;
-				}
+				} */
 
-				if (!/^1\d{10}$/.test(this.formData.emergencyPhone)) {
+				/* if (!/^1\d{10}$/.test(this.formData.emergencyPhone)) {
 					uni.showToast({
 						title: '请输入正确的紧急联系人电话',
 						icon: 'none'
@@ -434,7 +389,7 @@
 						icon: 'none'
 					});
 					return;
-				}
+				} */
 
 				if (!this.isAgreed) {
 					uni.showToast({
@@ -453,9 +408,9 @@
 					source: 'mini',
 					examine: 0,
 					tenant_id: '1',
-					emergency_contact: this.formData.emergencyContact,
+					/* emergency_contact: this.formData.emergencyContact,
 					emergency_phone: this.formData.emergencyPhone,
-					relation: this.formData.relation,
+					relation: this.formData.relation, */
 					age: '20',
 					job_id: this.selectedJobId
 				};
@@ -518,6 +473,16 @@
 					.catch(err => {
 						console.error('更新本地用户信息失败:', err);
 					});
+			},
+			validatePhone() {
+				this.isPhoneValid = /^1\d{10}$/.test(this.formData.phone);
+			},
+			validateName() {
+				this.isNameValid = this.formData.name.trim().length >= 2;
+			},
+			validateIdCard() {
+				const idCardReg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
+				this.isIdCardValid = idCardReg.test(this.formData.idCard);
 			}
 		}
 	}
@@ -536,7 +501,7 @@
 		justify-content: space-between;
 		align-items: center;
 		padding: 20rpx 30rpx;
-		background-color: #6c5ce7;
+		background-color: #0039b3;
 		color: #fff;
 	}
 
@@ -551,7 +516,7 @@
 	}
 
 	.interview-info {
-		background-color: #6c5ce7;
+		background-color: #0039b3;
 		color: #fff;
 		padding: 20rpx 30rpx 40rpx;
 	}
@@ -568,35 +533,39 @@
 	.form-container {
 		flex: 1;
 		background-color: #fff;
-		border-radius: 20rpx 20rpx 0 0;
-		margin-top: -20rpx;
 		padding: 40rpx 30rpx;
 	}
 
 	.form-title {
 		font-size: 32rpx;
 		font-weight: bold;
-		margin-bottom: 10rpx;
-	}
-
-	.form-subtitle {
-		font-size: 24rpx;
-		color: #999;
 		margin-bottom: 40rpx;
+		text-align: center;
+		color: #333;
 	}
 
 	.form-item {
 		margin-bottom: 30rpx;
+		position: relative;
 	}
 
-	.form-label {
-		display: block;
-		font-size: 28rpx;
-		margin-bottom: 10rpx;
+	.validation-icon {
+		position: absolute;
+		right: 20rpx;
+		top: 50%;
+		transform: translateY(-50%);
+		font-size: 36rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.icon-success {
+		color: #4cd964;
 	}
 
-	.required {
-		color: #ff4757;
+	.icon-error {
+		color: #ff3b30;
 	}
 
 	input {
@@ -604,26 +573,48 @@
 		height: 80rpx;
 		border: 1px solid #eee;
 		border-radius: 8rpx;
-		padding: 0 20rpx;
+		padding: 0 60rpx 0 20rpx;
 		font-size: 28rpx;
 		box-sizing: border-box;
+		background-color: #f9f9f9;
+	}
+
+	.phone-item {
+		display: flex;
+		align-items: center;
+		position: relative;
 	}
 
-	.submit-btn {
+	.phone-item .validation-icon {
+		right: 20rpx;
+	}
+
+	.phone-item input {
+		flex: 1;
+		border-radius: 0 8rpx 8rpx 0;
+	}
+
+	.verify-btn {
 		width: 100%;
 		height: 90rpx;
 		line-height: 90rpx;
-		background-color: #6c5ce7;
+		background-color: #0039b3;
 		color: #fff;
 		border-radius: 45rpx;
 		font-size: 32rpx;
 		margin-top: 60rpx;
 	}
 
+	.verify-btn[disabled] {
+		background-color: #b2b2b2;
+		color: #fff;
+		opacity: 0.7;
+	}
+
 	.agreement {
 		display: flex;
-		align-items: flex-start;
-		margin-top: 20rpx;
+		align-items: center;
+		margin-top: 30rpx;
 	}
 
 	.agreement-text {
@@ -634,71 +625,7 @@
 	}
 
 	.agreement-link {
-		color: #6c5ce7;
-	}
-
-	.submit-btn[disabled] {
-		background-color: #b2b2b2;
-		color: #fff;
-	}
-
-	.radio-group {
-		display: flex;
-		flex-direction: row;
-		margin-top: 10rpx;
-	}
-
-	.radio-item {
-		display: flex;
-		align-items: center;
-		margin-right: 60rpx;
-	}
-
-	.radio-circle {
-		width: 36rpx;
-		height: 36rpx;
-		border-radius: 50%;
-		border: 2rpx solid #999;
-		margin-right: 10rpx;
-		position: relative;
-	}
-
-	.radio-selected {
-		border-color: #6c5ce7;
-	}
-
-	.radio-selected:after {
-		content: '';
-		position: absolute;
-		width: 24rpx;
-		height: 24rpx;
-		background-color: #6c5ce7;
-		border-radius: 50%;
-		top: 50%;
-		left: 50%;
-		transform: translate(-50%, -50%);
-	}
-
-	.radio-text {
-		font-size: 28rpx;
-	}
-
-	.picker-view {
-		width: 100%;
-		height: 80rpx;
-		border: 1px solid #eee;
-		border-radius: 8rpx;
-		padding: 0 20rpx;
-		font-size: 28rpx;
-		box-sizing: border-box;
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-	}
-
-	.picker-arrow {
-		font-size: 24rpx;
-		color: #999;
+		color: #0039b3;
 	}
 
 	/* 职位列表样式 */
@@ -730,7 +657,7 @@
 	}
 
 	.job-selected {
-		border-color: #6c5ce7;
+		border-color: #0039b3;
 		background-color: rgba(108, 92, 231, 0.1);
 	}
 
@@ -755,7 +682,7 @@
 		width: 100%;
 		height: 90rpx;
 		line-height: 90rpx;
-		background-color: #6c5ce7;
+		background-color: #0039b3;
 		color: #fff;
 		border-radius: 45rpx;
 		font-size: 32rpx;
@@ -766,4 +693,65 @@
 		background-color: #b2b2b2;
 		color: #fff;
 	}
+
+	/* 修复国家代码样式 */
+	.country-code {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		width: 100rpx;
+		padding: 0 20rpx;
+		height: 80rpx;
+		border: 1px solid #eee;
+		border-radius: 8rpx 0 0 8rpx;
+		border-right: none;
+		font-size: 28rpx;
+		background-color: #f9f9f9;
+	}
+	
+	.dropdown-icon {
+		font-size: 20rpx;
+		color: #999;
+		margin-left: 10rpx;
+	}
+	
+	/* 修复手机号输入框样式 */
+	.phone-item {
+		display: flex;
+		align-items: center;
+		position: relative;
+	}
+	
+	.phone-item input {
+		flex: 1;
+		border-radius: 0 8rpx 8rpx 0;
+	}
+	
+	/* 修复验证图标位置 */
+	.validation-icon {
+		position: absolute;
+		right: 20rpx;
+		top: 50%;
+		transform: translateY(-50%);
+		font-size: 36rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		z-index: 2;
+	}
+	
+	.phone-item .validation-icon {
+		right: 20rpx;
+	}
+	
+	/* 修改图标样式与图片一致 */
+	.icon-success {
+		color: #4cd964;
+		font-weight: bold;
+	}
+	
+	.icon-error {
+		color: #ff3b30;
+		font-weight: bold;
+	}
 </style>

+ 63 - 62
pages/interview-notice/interview-notice.vue

@@ -7,69 +7,69 @@
     <!-- 注意事项列表 -->
     <view class="notice-grid">
       <!-- 第一行 -->
-      <view class="notice-item">
-        <view class="icon-container light">
+      <view class="notice-item light">
+        <view class="icon-container">
           <text class="iconfont">☀</text>
         </view>
         <text class="item-text">保持光线良好、干净背景、安静不受打扰</text>
       </view>
       
-      <view class="notice-item">
-        <view class="icon-container smile">
+      <view class="notice-item smile">
+        <view class="icon-container">
           <text class="iconfont">☺</text>
         </view>
-        <text class="item-text">保持微笑、声音洪亮、让面试官看清表达</text>
+        <text class="item-text">保持微笑、声音洪亮、正面直视摄像头</text>
       </view>
       
       <!-- 第二行 -->
-      <view class="notice-item">
-        <view class="icon-container mic">
-          <text class="iconfont">🎤</text>
+      <view class="notice-item headphone">
+        <view class="icon-container">
+          <text class="iconfont">🎧</text>
         </view>
-        <text class="item-text">保持声音回传准确、避免使用有线耳机</text>
+        <text class="item-text">保持声音回音接收正常、建议使用耳机</text>
       </view>
       
-      <view class="notice-item">
-        <view class="icon-container wifi">
+      <view class="notice-item wifi">
+        <view class="icon-container">
           <text class="iconfont">📶</text>
         </view>
-        <text class="item-text">保持网络通畅、避免网络间歇性断开</text>
+        <text class="item-text">保持网络通畅、面试期间勿断出</text>
       </view>
       
       <!-- 第三行 -->
-      <view class="notice-item">
-        <view class="icon-container forbidden">
-          <text class="iconfont"></text>
+      <view class="notice-item forbidden">
+        <view class="icon-container">
+          <text class="iconfont"></text>
         </view>
         <text class="item-text">请勿人脸离开屏幕</text>
       </view>
       
-      <view class="notice-item">
-        <view class="icon-container forbidden">
-          <text class="iconfont"></text>
+      <view class="notice-item forbidden">
+        <view class="icon-container">
+          <text class="iconfont"></text>
         </view>
-        <text class="item-text">请勿录屏/截屏</text>
+        <text class="item-text">请勿录屏截屏</text>
       </view>
     </view>
     
     <!-- 警告提示 -->
     <view class="warning-tip">
-      <text>建议使用开启声音和视频打开模式,避免采用电话/短信等打断面试</text>
+      * 建议开启免提模式,避免采用\短信等打断面试
     </view>
     
     <!-- 免责声明 -->
-    <view class="disclaimer">
+    <!-- <view class="disclaimer">
       本公司保障您的隐私,根据法律法规和监管要求收集必要的面试信息,下载、存储、使用您的面试视频,仅用于面试评估,过程中不会泄露您的个人信息。
-    </view>
+    </view> -->
     
     <!-- 同意选项 -->
     <view class="agreement">
-      <checkbox :checked="isAgreed" @tap="toggleAgreement" />
+      <radio :checked="isAgreed" @tap="toggleAgreement" />
       <text class="agreement-text">我同意并知晓</text>
     </view>
     
     <!-- 底部按钮 -->
-    <button class="start-btn" :disabled="!isAgreed" @click="startInterview">开始面试</button>
+    <button class="next-btn" :disabled="!isAgreed" @click="startInterview">下一步</button>
   </view>
 </template>
 
@@ -113,7 +113,7 @@ export default {
   display: flex;
   flex-direction: column;
   min-height: 100vh;
-  background-color: #f5f7fa;
+  background-color: #ffffff;
   padding: 30rpx;
 }
 
@@ -122,12 +122,13 @@ export default {
   font-weight: bold;
   margin-top: 20rpx;
   margin-bottom: 10rpx;
+  color: #333;
 }
 
 .notice-subtitle {
-  font-size: 28rpx;
-  color: #666;
-  margin-bottom: 40rpx;
+  font-size: 26rpx;
+  color: #999;
+  margin-bottom: 30rpx;
 }
 
 .notice-grid {
@@ -138,70 +139,68 @@ export default {
 }
 
 .notice-item {
-  width: 42%;
-  background-color: #fff;
-  border-radius: 12rpx;
+  width: 47%;
+  height: 180rpx;
+  border-radius: 8rpx;
   padding: 20rpx;
   margin-bottom: 20rpx;
   display: flex;
   flex-direction: column;
   align-items: center;
-  text-align: center;
-}
-
-.icon-container {
-  width: 80rpx;
-  height: 80rpx;
-  border-radius: 50%;
-  display: flex;
   justify-content: center;
-  align-items: center;
-  margin-bottom: 15rpx;
+  text-align: center;
+  box-sizing: border-box;
 }
 
 .light {
-  background-color: #f1c40f;
+  background-color: #f0f9eb;
 }
 
 .smile {
-  background-color: #2ecc71;
+  background-color: #f0f9eb;
 }
 
-.mic {
-  background-color: #3498db;
+.headphone {
+  background-color: #f0f9eb;
 }
 
 .wifi {
-  background-color: #9b59b6;
+  background-color: #f0f9eb;
 }
 
 .forbidden {
-  background-color: #e74c3c;
+  background-color: #fff8e6;
+}
+
+.icon-container {
+  width: 40rpx;
+  height: 40rpx;
+  border-radius: 50%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  margin-bottom: 15rpx;
 }
 
 .iconfont {
   font-size: 40rpx;
-  color: #fff;
+  color: #333;
 }
 
 .item-text {
   font-size: 24rpx;
   color: #333;
   line-height: 1.4;
+  display: -webkit-box;
+  -webkit-line-clamp: 3;
+  -webkit-box-orient: vertical;
+  overflow: hidden;
 }
 
 .warning-tip {
-  background-color: #fff8e1;
-  border-radius: 12rpx;
-  padding: 20rpx;
-  margin-bottom: 30rpx;
-  border-left: 8rpx solid #ffc107;
-}
-
-.warning-tip text {
-  font-size: 26rpx;
   color: #ff9800;
-  line-height: 1.4;
+  font-size: 24rpx;
+  margin-bottom: 60rpx;
 }
 
 .disclaimer {
@@ -214,6 +213,7 @@ export default {
 .agreement {
   display: flex;
   align-items: center;
+  justify-content: center;
   margin-bottom: 40rpx;
 }
 
@@ -223,17 +223,18 @@ export default {
   margin-left: 10rpx;
 }
 
-.start-btn {
+.next-btn {
   width: 100%;
   height: 90rpx;
   line-height: 90rpx;
-  background-color: #6c5ce7;
+  background-color: #0039b3;
   color: #fff;
-  border-radius: 45rpx;
+  border-radius: 8rpx;
   font-size: 32rpx;
+  text-align: center;
 }
 
-.start-btn[disabled] {
+.next-btn[disabled] {
   background-color: #b2b2b2;
   color: #fff;
 }

+ 315 - 0
pages/login/login.vue

@@ -0,0 +1,315 @@
+<template>
+  <view class="login-container">
+    <image class="login-image" src="/static/login-image.png" mode="aspectFit"></image>
+    <view class="login-title">登录后才,开始面试</view>
+    <button class="login-btn" @click="handleLogin">身份验证并登录</button>
+    <view class="agreement">
+      <checkbox :checked="isAgreed" @tap="toggleAgreement" color="#6c5ce7" />
+      <text class="agreement-text">
+        我已阅读并同意
+        <text class="agreement-link">《用户协议》</text>
+        和
+        <text class="agreement-link">《隐私政策》</text>
+      </text>
+    </view>
+  </view>
+</template>
+
+<script>
+import { wxLogin,getUserInfo } from '@/api/user';
+
+export default {
+  data() {
+    return {
+      isAgreed: false,
+      wxLoginCode: ''
+    }
+  },
+  methods: {
+    toggleAgreement() {
+      this.isAgreed = !this.isAgreed;
+    },
+    handleLogin() {
+      if (!this.isAgreed) {
+        uni.showToast({
+          title: '请先阅读并同意相关协议',
+          icon: 'none'
+        });
+        return;
+      }
+      
+      this.getWxLoginCode();
+    },
+    
+    getWxLoginCode() {
+      uni.showLoading({ title: '登录中...' });
+      
+      uni.login({
+        provider: 'weixin',
+        success: (loginRes) => {
+          console.log('获取微信登录code成功:', loginRes.code);
+          this.wxLoginCode = loginRes.code;
+          uni.hideLoading();
+          this.getUserProfile();
+        },
+        fail: (err) => {
+          uni.hideLoading();
+          console.error('获取微信登录code失败:', err);
+          uni.showToast({
+            title: '微信登录失败',
+            icon: 'none'
+          });
+        }
+      });
+    },
+    
+    getUserProfile() {
+      wx.getUserProfile({
+        desc: '用于完善用户资料',
+        success: (profileRes) => {
+          console.log('获取用户信息成功:', profileRes);
+          
+          const loginParams = {
+            code: this.wxLoginCode,
+            userInfo: profileRes.userInfo,
+            signature: profileRes.signature,
+            rawData: profileRes.rawData,
+            encryptedData: profileRes.encryptedData,
+            iv: profileRes.iv
+          };
+          
+          this.wxLoginRequest(loginParams);
+        },
+        fail: (err) => {
+          console.error('获取用户信息失败:', err);
+          
+          this.wxLoginRequest({ 
+            code: this.wxLoginCode,
+            userInfo: {
+              nickName: '微信用户',
+              avatarUrl: '',
+              gender: 0,
+              province: '',
+              city: '',
+              country: ''
+            }
+          });
+        }
+      });
+    },
+    
+    async wxLoginRequest(loginParams) {
+      try {
+        uni.showLoading({ title: '登录中...' });
+        
+        console.log('发送登录请求,参数:', loginParams);
+        
+        const data = await wxLogin(loginParams);
+        console.log('登录成功,返回数据:', data);
+        
+        const userData = this.buildUserData(data, loginParams);
+        
+        this.saveLoginState(data, userData);
+      } catch (error) {
+        this.handleLoginError(error, loginParams);
+      }
+    },
+    
+    buildUserData(data, loginParams) {
+      console.log('构建用户数据,服务器返回:', data);
+      
+      let userData = {
+        username: data.username || data.nickName || 
+                (loginParams.userInfo ? loginParams.userInfo.nickName : '微信用户'),
+        
+        name: data.name || data.username || data.nickName || 
+             (loginParams.userInfo ? loginParams.userInfo.nickName : ''),
+        
+        id: data.id || data.userId || data.user_id || data.openid || '',
+        
+        userId: data.userId || data.user_id || data.id || data.openid || '',
+        
+        avatar: data.avatar || data.avatarUrl || 
+              (loginParams.userInfo ? loginParams.userInfo.avatarUrl : '/static/avatar.png'),
+        
+        phone: data.phone || data.mobile || '',
+        gender: data.gender || (loginParams.userInfo ? loginParams.userInfo.gender : 0),
+        
+        openid: data.openid || '',
+        unionid: data.unionid || '',
+        session_key: data.session_key || '',
+        
+        is_new_user: data.is_new_user || false,
+        
+        loginTime: new Date().getTime()
+      };
+      
+      console.log('构建的用户数据:', userData);
+      return userData;
+    },
+    
+    saveLoginState(data, userData) {
+      const token = data.token || data.session_key || '';
+      if (token) {
+        uni.setStorageSync('token', token);
+        console.log('Token已保存:', token);
+      }
+      
+      if (userData.avatar) {
+        console.log('用户头像已保存:', userData.avatar);
+      } else if (data.avatarUrl) {
+        userData.avatar = data.avatarUrl;
+      }
+      
+      // 先保存基本用户信息,确保有登录状态
+      uni.setStorageSync('userInfo', JSON.stringify(userData));
+      console.log('基本用户信息已保存');
+      
+      // 如果有用户ID,则获取完整的用户信息
+      if (userData.id) {
+        this.fetchUserDetail(userData.id, userData);
+      } else {
+        // 如果没有用户ID,直接完成登录流程
+        this.completeLogin();
+      }
+    },
+    
+    // 获取用户详细信息
+    async fetchUserDetail(userId, basicUserData) {
+      try {
+        console.log('获取用户详细信息,用户ID:', userId);
+        
+        // 调用获取用户详情API
+        const userDetail = await getUserInfo(userId);
+        console.log('获取用户详细信息成功:', userDetail);
+        
+        if (userDetail) {
+          // 合并基本信息和详细信息
+          const updatedUserInfo = {
+            ...basicUserData,
+            // 更新基本信息
+            name: userDetail.name || basicUserData.name,
+            phone: userDetail.phone || userDetail.mobile || basicUserData.phone,
+            gender: userDetail.gender || basicUserData.gender,
+            
+            // 添加详细信息
+            id_card: userDetail.id_card || '',
+            emergency_contact: userDetail.emergency_contact || '',
+            emergency_phone: userDetail.emergency_phone || '',
+            relation: userDetail.relation || '',
+            
+            // 其他可能的字段
+            ...userDetail
+          };
+          
+          // 更新本地存储
+          uni.setStorageSync('userInfo', JSON.stringify(updatedUserInfo));
+          console.log('用户详细信息已更新并保存');
+        }
+      } catch (error) {
+        console.error('获取用户详细信息失败:', error);
+        // 获取详细信息失败不影响登录流程
+      } finally {
+        // 无论成功失败都完成登录流程
+        this.completeLogin();
+      }
+    },
+    
+    // 完成登录流程
+    completeLogin() {
+      uni.hideLoading();
+      uni.showToast({
+        title: '登录成功',
+        icon: 'success',
+        success: () => {
+          setTimeout(() => {
+            uni.switchTab({
+              url: '/pages/index/index'
+            });
+          }, 1500);
+        }
+      });
+    },
+    
+    handleLoginError(error, loginParams) {
+      uni.hideLoading();
+      
+      if (error.message && (
+          error.message.includes('code无效') || 
+          error.message.includes('已过期') || 
+          error.message.includes('已被使用') ||
+          error.status === 999)) {
+        console.error('微信登录code无效,重新获取:', error);
+        uni.showToast({
+          title: 'code已过期,请重试',
+          icon: 'none',
+          duration: 2000
+        });
+        
+        setTimeout(() => {
+          this.getWxLoginCode();
+        }, 1000);
+        return;
+      }
+      
+      console.error('微信登录失败:', error);
+      uni.showToast({
+        title: error.message || '登录失败',
+        icon: 'none'
+      });
+    }
+  }
+}
+</script>
+
+<style>
+.login-container {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  padding: 40rpx;
+  height: 100vh;
+  background-color: #FFF;
+}
+
+.login-image {
+  width: 100%;
+
+  margin-bottom: 40rpx;
+}
+
+.login-title {
+  font-size: 36rpx;
+  font-weight: bold;
+  margin-bottom: 60rpx;
+  color: #333;
+}
+
+.login-btn {
+  width: 80%;
+  height: 90rpx;
+  line-height: 90rpx;
+  background-color: #0033cc;
+  color: #fff;
+  border-radius: 45rpx;
+  font-size: 32rpx;
+  margin-bottom: 30rpx;
+}
+
+.agreement {
+  display: flex;
+  align-items: center;
+  margin-top: 20rpx;
+}
+
+.agreement-text {
+  font-size: 24rpx;
+  color: #666;
+  margin-left: 10rpx;
+}
+
+.agreement-link {
+  color: #6c5ce7;
+}
+</style> 

BIN
static/login-image.png


+ 1 - 0
unpackage/dist/dev/mp-weixin/app.js

@@ -4,6 +4,7 @@ const common_vendor = require("./common/vendor.js");
 const utils_request = require("./utils/request.js");
 if (!Math) {
   "./pages/index/index.js";
+  "./pages/login/login.js";
   "./pages/success/success.js";
   "./pages/interview-notice/interview-notice.js";
   "./pages/identity-verify/identity-verify.js";

+ 1 - 0
unpackage/dist/dev/mp-weixin/app.json

@@ -1,6 +1,7 @@
 {
   "pages": [
     "pages/index/index",
+    "pages/login/login",
     "pages/success/success",
     "pages/interview-notice/interview-notice",
     "pages/identity-verify/identity-verify",

+ 3 - 1
unpackage/dist/dev/mp-weixin/common/assets.js

@@ -1,3 +1,5 @@
 "use strict";
+const _imports_0$1 = "/static/login-image.png";
 const _imports_0 = "/static/avatar.png";
-exports._imports_0 = _imports_0;
+exports._imports_0 = _imports_0$1;
+exports._imports_0$1 = _imports_0;

+ 1 - 1
unpackage/dist/dev/mp-weixin/common/config.js

@@ -1,3 +1,3 @@
 "use strict";
-const apiBaseUrl = "http://192.168.66.187:8083";
+const apiBaseUrl = "https://minlong.raycos.com.cn";
 exports.apiBaseUrl = apiBaseUrl;

+ 41 - 27
unpackage/dist/dev/mp-weixin/pages/camera/camera.js

@@ -46,8 +46,10 @@ const _sfc_main = {
       // 存储开放问题的答案
       currentAnswer: null,
       // 存储当前答案以便提交
-      questionStartTime: null
+      questionStartTime: null,
       // 存储问题开始时间
+      mode: "normal"
+      // 相机模式
     };
   },
   computed: {
@@ -307,8 +309,8 @@ const _sfc_main = {
         }
         const submitData = {
           job_id: JSON.parse(common_vendor.index.getStorageSync("selectedJob")).id,
-          applicant_id: common_vendor.index.getStorageSync("appId"),
-          // 或者使用其他合适的ID
+          applicant_id: JSON.parse(common_vendor.index.getStorageSync("userInfo")).id,
+          //uni.getStorageSync('appId'), // 或者使用其他合适的ID
           question_id: this.currentAnswer.questionId,
           answer_content: answerContent,
           answer_duration: this.currentAnswer.answerDuration || 0,
@@ -483,6 +485,14 @@ const _sfc_main = {
           });
         }
       });
+    },
+    // 添加 handleCameraError 方法
+    handleCameraError(e) {
+      console.error("相机错误:", e.detail);
+      common_vendor.index.showToast({
+        title: "相机启动失败,请检查权限设置",
+        icon: "none"
+      });
     }
   },
   // 添加生命周期钩子,确保在组件销毁时清除计时器
@@ -498,21 +508,25 @@ if (!Array) {
 }
 function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
   return common_vendor.e({
-    a: $data.digitalHumanUrl
-  }, $data.digitalHumanUrl ? {
-    b: $data.digitalHumanUrl
+    a: !$data.digitalHumanUrl
+  }, !$data.digitalHumanUrl ? {
+    b: $data.mode,
+    c: common_vendor.o((...args) => $options.handleCameraError && $options.handleCameraError(...args))
+  } : $data.digitalHumanUrl ? {
+    e: $data.digitalHumanUrl
   } : {
-    c: common_assets._imports_0
+    f: common_assets._imports_0$1
   }, {
-    d: common_vendor.t($data.currentQuestionIndex + 1),
-    e: common_vendor.t($data.questions.length),
-    f: $options.currentQuestion.isImportant
+    d: $data.digitalHumanUrl,
+    g: common_vendor.t($data.currentQuestionIndex + 1),
+    h: common_vendor.t($data.questions.length),
+    i: $options.currentQuestion.isImportant
   }, $options.currentQuestion.isImportant ? {} : {}, {
-    g: common_vendor.t($options.currentQuestion.questionTypeName),
-    h: common_vendor.t($options.currentQuestion.text),
-    i: $options.currentQuestion.questionType !== 0
+    j: common_vendor.t($options.currentQuestion.questionTypeName),
+    k: common_vendor.t($options.currentQuestion.text),
+    l: $options.currentQuestion.questionType !== 0
   }, $options.currentQuestion.questionType !== 0 ? {
-    j: common_vendor.f($options.currentQuestion.options, (option, index, i0) => {
+    m: common_vendor.f($options.currentQuestion.options, (option, index, i0) => {
       return {
         a: common_vendor.t(option.option_text || (typeof option === "string" ? option : JSON.stringify(option))),
         b: index,
@@ -522,32 +536,32 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
         f: common_vendor.o(($event) => $options.selectOption(index), index)
       };
     }),
-    k: common_vendor.t($options.currentQuestion.questionType === 1 ? "●" : "☐")
+    n: common_vendor.t($options.currentQuestion.questionType === 1 ? "●" : "☐")
   } : {}, {
-    l: common_vendor.t($data.showResult ? "下一题" : "提交答案"),
-    m: common_vendor.o(($event) => $options.nextQuestion(_ctx.option)),
-    n: $options.currentQuestion.questionType === 0 && $data.openQuestionAnswer.trim() === "" || $options.currentQuestion.questionType === 1 && $data.selectedOption === null || $options.currentQuestion.questionType === 2 && $data.selectedOptions.length === 0,
-    o: $data.showEndModal
+    o: common_vendor.t($data.showResult ? "下一题" : "提交答案"),
+    p: common_vendor.o(($event) => $options.nextQuestion(_ctx.option)),
+    q: $options.currentQuestion.questionType === 0 && $data.openQuestionAnswer.trim() === "" || $options.currentQuestion.questionType === 1 && $data.selectedOption === null || $options.currentQuestion.questionType === 2 && $data.selectedOptions.length === 0,
+    r: $data.showEndModal
   }, $data.showEndModal ? {
-    p: common_vendor.o((...args) => $options.navigateToInterview && $options.navigateToInterview(...args))
+    s: common_vendor.o((...args) => $options.navigateToInterview && $options.navigateToInterview(...args))
   } : {}, {
-    q: $data.interviewCompleted
+    t: $data.interviewCompleted
   }, $data.interviewCompleted ? {
-    r: common_assets._imports_0,
-    s: common_vendor.o((...args) => $options.back && $options.back(...args))
+    v: common_assets._imports_0$1,
+    w: common_vendor.o((...args) => $options.back && $options.back(...args))
   } : {}, {
-    t: $data.loading
+    x: $data.loading
   }, $data.loading ? {
-    v: common_vendor.p({
+    y: common_vendor.p({
       status: "loading",
       contentText: {
         contentdown: "加载中..."
       }
     })
   } : {}, {
-    w: !$data.loading && $data.loadError
+    z: !$data.loading && $data.loadError
   }, !$data.loading && $data.loadError ? {
-    x: common_vendor.o((...args) => $options.fetchInterviewData && $options.fetchInterviewData(...args))
+    A: common_vendor.o((...args) => $options.fetchInterviewData && $options.fetchInterviewData(...args))
   } : {});
 }
 const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 1
unpackage/dist/dev/mp-weixin/pages/camera/camera.wxml


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

@@ -190,7 +190,7 @@
 		color: #666;
 }
 .next-button {
-		background-color: #6c5ce7;
+		background-color: #0039b3;
 		color: #ffffff;
 		border-radius: 10rpx;
 		font-size: 30rpx;
@@ -248,7 +248,7 @@
 .score-display {
 		font-size: 48rpx;
 		font-weight: bold;
-		color: #6c5ce7;
+		color: #0039b3;
 		margin: 20rpx 0;
 }
 .modal-message {
@@ -285,6 +285,13 @@
 		height: 120rpx;
 		z-index: 10;
 		overflow: hidden;
+		border-radius: 20rpx;
+}
+.camera {
+		width: 120rpx;
+		height: 120rpx;
+		border-radius: 20rpx;
+		border: 2rpx solid #e0e0e0;
 }
 .avatar-image {
 		width: 120rpx;
@@ -336,7 +343,7 @@
 		line-height: 1.5;
 }
 .complete-button {
-		background-color: #6c5ce7;
+		background-color: #0039b3;
 		color: #ffffff;
 		border-radius: 10rpx;
 		font-size: 32rpx;
@@ -372,7 +379,7 @@
 		margin-bottom: 30rpx;
 }
 .retry-button {
-		background-color: #6c5ce7;
+		background-color: #0039b3;
 		color: #ffffff;
 		border-radius: 10rpx;
 		font-size: 28rpx;
@@ -380,7 +387,7 @@
 }
 .question-type {
 		display: inline-block;
-		background-color: #6c5ce7;
+		background-color: #0039b3;
 		color: white;
 		font-size: 24rpx;
 		padding: 4rpx 10rpx;

+ 5 - 5
unpackage/dist/dev/mp-weixin/pages/face-photo/face-photo.wxss

@@ -49,7 +49,7 @@
   transition: all 0.3s;
 }
 .mode-option.active {
-  background-color: #6c5ce7;
+  background-color: #0039b3;
   color: #fff;
 }
 .photo-preview {
@@ -126,7 +126,7 @@
   width: 100%;
   height: 90rpx;
   line-height: 90rpx;
-  background-color: #6c5ce7;
+  background-color: #0039b3;
   color: #fff;
   border-radius: 45rpx;
   font-size: 32rpx;
@@ -151,8 +151,8 @@
   height: 90rpx;
   line-height: 90rpx;
   background-color: #fff;
-  color: #6c5ce7;
-  border: 1px solid #6c5ce7;
+  color: #0039b3;
+  border: 1px solid #0039b3;
   border-radius: 45rpx;
   font-size: 32rpx;
 }
@@ -160,7 +160,7 @@
   width: 45%;
   height: 90rpx;
   line-height: 90rpx;
-  background-color: #6c5ce7;
+  background-color: #0039b3;
   color: #fff;
   border-radius: 45rpx;
   font-size: 32rpx;

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

@@ -84,15 +84,15 @@ const _sfc_main = {
       currentVideoIndex: 0,
       // 当前播放的视频索引
       videoList: [
-        "http://121.36.251.245:9000/minlong/9c139c99-a613-49f2-986b-8a3ac20a9b1b.mp4",
+        "http://121.36.251.245:9000/minlong/tenant_1/general_uploads/880a117c8fcc4196b0d8c0750608d373.mp4",
         // 第一段视频
-        "http://121.36.251.245:9000/minlong/15467aca-2c1e-4d40-bebc-11fc984f0a24.mp4",
+        "http://121.36.251.245:9000/minlong/tenant_1/general_uploads/e465e23d377b4456bbb3b755d3ad9500.mp4",
         // 第二段视频
-        "http://121.36.251.245:9000/minlong/a96f295c-ecba-4b08-b627-0ed0dc72d727.mp4",
+        "http://121.36.251.245:9000/minlong/tenant_1/general_uploads/9bc84230d2a14978b4ea0a97e4102a15.mp4",
         // 第三段视频
-        "http://121.36.251.245:9000/minlong/e152eb38-7e03-4bb0-8b8d-73d51342d2aa.mp4",
-        "http://121.36.251.245:9000/minlong/6381eec3-1373-400f-aa8c-e229b60522ea.mp4",
-        "http://121.36.251.245:9000/minlong/2a11fe78-38d5-4af3-91c8-a080feb122e0.mp4"
+        "http://121.36.251.245:9000/minlong/tenant_1/general_uploads/9b48e824432f451d9e27e12b884d9074.mp4",
+        "http://121.36.251.245:9000/minlong/tenant_1/general_uploads/52f1445b400345e1a673b3c7f05e5cc1.mp4",
+        "http://121.36.251.245:9000/minlong/tenant_1/general_uploads/abdaa6fda8494e3a8613304743ed0433.mp4"
         //结束
       ],
       isRecording: false,

+ 2 - 2
unpackage/dist/dev/mp-weixin/pages/identity-verify/identity-verify.wxss

@@ -151,7 +151,7 @@ video.data-v-464e78c6::-webkit-media-controls-fullscreen-button {
   width: 120px;
   height: 120px;
   border-radius: 50%;
- background-color: #6c5ce7; /* 绿色背景,与图片中的颜色类似 */
+ background-color: #0039b3; /* 绿色背景,与图片中的颜色类似 */
   color: white;
   font-size: 18px;
   border: none;
@@ -256,7 +256,7 @@ video.data-v-464e78c6::-webkit-media-controls-fullscreen-button {
   width: 120px;
   height: 120px;
   border-radius: 50%;
-  background-color: #6c5ce7; /* 与开始面试按钮颜色保持一致 */
+  background-color: #0039b3; /* 与开始面试按钮颜色保持一致 */
   color: white;
   font-size: 18px;
   border: none;

+ 53 - 80
unpackage/dist/dev/mp-weixin/pages/index/index.js

@@ -20,7 +20,10 @@ const _sfc_main = {
       userInfoFilled: false,
       jobList: [],
       selectedJobId: null,
-      selectedJob: null
+      selectedJob: null,
+      isPhoneValid: false,
+      isNameValid: false,
+      isIdCardValid: false
     };
   },
   onLoad() {
@@ -31,19 +34,22 @@ const _sfc_main = {
   computed: {
     canSubmit() {
       return this.formData.name.trim() && this.formData.gender && this.formData.phone.trim() && /^1\d{10}$/.test(this.formData.phone) && (!this.formData.email || /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/.test(this.formData.email)) && this.formData.idCard.trim() && this.formData.emergencyContact.trim() && this.formData.emergencyPhone.trim() && /^1\d{10}$/.test(this.formData.emergencyPhone) && this.formData.relation && this.isAgreed;
+    },
+    canSubmitSimple() {
+      return this.formData.name.trim() && this.formData.phone.trim() && this.isPhoneValid && this.formData.idCard.trim() && this.isIdCardValid && this.isAgreed;
     }
   },
   methods: {
     checkLogin() {
       const userInfo = common_vendor.index.getStorageSync("userInfo");
       if (!userInfo) {
-        common_vendor.index.switchTab({
-          url: "/pages/my/my",
+        common_vendor.index.reLaunch({
+          url: "/pages/login/login",
           success: () => {
-            console.log("跳转到登录页面成功");
+            console.log("跳转到身份验证登录页面成功");
           },
           fail: (err) => {
-            console.error("跳转到登录页面失败:", err);
+            console.error("跳转到身份验证登录页面失败:", err);
             common_vendor.index.showToast({
               title: "跳转失败,请重试",
               icon: "none"
@@ -55,8 +61,8 @@ const _sfc_main = {
       try {
         const parsedUserInfo = JSON.parse(userInfo);
         if (!parsedUserInfo.openid) {
-          common_vendor.index.switchTab({
-            url: "/pages/my/my"
+          common_vendor.index.navigateTo({
+            url: "/pages/login/login"
           });
           return false;
         }
@@ -64,8 +70,8 @@ const _sfc_main = {
       } catch (e) {
         console.error("解析用户信息失败:", e);
         common_vendor.index.removeStorageSync("userInfo");
-        common_vendor.index.switchTab({
-          url: "/pages/my/my"
+        common_vendor.index.navigateTo({
+          url: "/pages/login/login"
         });
         return false;
       }
@@ -94,9 +100,8 @@ const _sfc_main = {
         console.log("id:", userInfo.id);
         api_user.getUserInfo(userInfo.id).then((res) => {
           common_vendor.index.hideLoading();
-          console.log("res:", res);
           const userData = res;
-          if (userData.name == null && userData.phone == null) {
+          if (!userData.name || !userData.phone) {
             this.userInfoFilled = true;
             this.formData.name = userData.name || "";
             this.formData.gender = userData.gender || "";
@@ -128,7 +133,7 @@ const _sfc_main = {
           icon: "none"
         });
         common_vendor.index.navigateTo({
-          url: "/pages/my/my"
+          url: "/pages/login/login"
         });
       }
     },
@@ -209,13 +214,6 @@ const _sfc_main = {
         });
         return;
       }
-      if (!this.formData.gender) {
-        common_vendor.index.showToast({
-          title: "请选择性别",
-          icon: "none"
-        });
-        return;
-      }
       if (!this.formData.phone.trim()) {
         common_vendor.index.showToast({
           title: "请输入手机号",
@@ -230,13 +228,6 @@ const _sfc_main = {
         });
         return;
       }
-      if (this.formData.email && !/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/.test(this.formData.email)) {
-        common_vendor.index.showToast({
-          title: "请输入正确的邮箱",
-          icon: "none"
-        });
-        return;
-      }
       if (!this.formData.idCard.trim()) {
         common_vendor.index.showToast({
           title: "请输入身份证号",
@@ -252,34 +243,6 @@ const _sfc_main = {
         });
         return;
       }
-      if (!this.formData.emergencyContact.trim()) {
-        common_vendor.index.showToast({
-          title: "请输入紧急联系人",
-          icon: "none"
-        });
-        return;
-      }
-      if (!this.formData.emergencyPhone.trim()) {
-        common_vendor.index.showToast({
-          title: "请输入紧急联系人电话",
-          icon: "none"
-        });
-        return;
-      }
-      if (!/^1\d{10}$/.test(this.formData.emergencyPhone)) {
-        common_vendor.index.showToast({
-          title: "请输入正确的紧急联系人电话",
-          icon: "none"
-        });
-        return;
-      }
-      if (!this.formData.relation) {
-        common_vendor.index.showToast({
-          title: "请选择与紧急联系人关系",
-          icon: "none"
-        });
-        return;
-      }
       if (!this.isAgreed) {
         common_vendor.index.showToast({
           title: "请阅读并同意相关协议",
@@ -296,9 +259,9 @@ const _sfc_main = {
         source: "mini",
         examine: 0,
         tenant_id: "1",
-        emergency_contact: this.formData.emergencyContact,
+        /* emergency_contact: this.formData.emergencyContact,
         emergency_phone: this.formData.emergencyPhone,
-        relation: this.formData.relation,
+        relation: this.formData.relation, */
         age: "20",
         job_id: this.selectedJobId
       };
@@ -344,6 +307,16 @@ const _sfc_main = {
       }).catch((err) => {
         console.error("更新本地用户信息失败:", err);
       });
+    },
+    validatePhone() {
+      this.isPhoneValid = /^1\d{10}$/.test(this.formData.phone);
+    },
+    validateName() {
+      this.isNameValid = this.formData.name.trim().length >= 2;
+    },
+    validateIdCard() {
+      const idCardReg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
+      this.isIdCardValid = idCardReg.test(this.formData.idCard);
     }
   }
 };
@@ -365,30 +338,30 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     d: common_vendor.o((...args) => $options.applyForJob && $options.applyForJob(...args))
   } : {}, {
     e: $data.userInfoFilled
-  }, $data.userInfoFilled ? {
-    f: $data.formData.name,
-    g: common_vendor.o(($event) => $data.formData.name = $event.detail.value),
-    h: $data.formData.gender === "男" ? 1 : "",
-    i: common_vendor.o(($event) => $data.formData.gender = "男"),
-    j: $data.formData.gender === "女" ? 1 : "",
-    k: common_vendor.o(($event) => $data.formData.gender = "女"),
-    l: $data.formData.idCard,
-    m: common_vendor.o(($event) => $data.formData.idCard = $event.detail.value),
-    n: $data.formData.phone,
-    o: common_vendor.o(($event) => $data.formData.phone = $event.detail.value),
-    p: $data.formData.emergencyContact,
-    q: common_vendor.o(($event) => $data.formData.emergencyContact = $event.detail.value),
-    r: $data.formData.emergencyPhone,
-    s: common_vendor.o(($event) => $data.formData.emergencyPhone = $event.detail.value),
-    t: common_vendor.t($data.formData.relation || "请选择关系"),
-    v: common_vendor.o((...args) => $options.relationChange && $options.relationChange(...args)),
-    w: $data.relationIndex,
-    x: $data.relationOptions,
-    y: $data.isAgreed,
-    z: common_vendor.o((...args) => $options.toggleAgreement && $options.toggleAgreement(...args)),
-    A: !$options.canSubmit,
-    B: common_vendor.o((...args) => $options.submitForm && $options.submitForm(...args))
-  } : {});
+  }, $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: !$options.canSubmitSimple,
+    s: common_vendor.o((...args) => $options.submitForm && $options.submitForm(...args)),
+    t: $data.isAgreed,
+    v: common_vendor.o((...args) => $options.toggleAgreement && $options.toggleAgreement(...args))
+  }) : {});
 }
 const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
 wx.createPage(MiniProgramPage);

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/index/index.wxml


+ 102 - 78
unpackage/dist/dev/mp-weixin/pages/index/index.wxss

@@ -10,7 +10,7 @@
 		justify-content: space-between;
 		align-items: center;
 		padding: 20rpx 30rpx;
-		background-color: #6c5ce7;
+		background-color: #0039b3;
 		color: #fff;
 }
 .scan-btn {
@@ -23,7 +23,7 @@
 		font-size: 24rpx;
 }
 .interview-info {
-		background-color: #6c5ce7;
+		background-color: #0039b3;
 		color: #fff;
 		padding: 20rpx 30rpx 40rpx;
 }
@@ -37,54 +37,76 @@
 .form-container {
 		flex: 1;
 		background-color: #fff;
-		border-radius: 20rpx 20rpx 0 0;
-		margin-top: -20rpx;
 		padding: 40rpx 30rpx;
 }
 .form-title {
 		font-size: 32rpx;
 		font-weight: bold;
-		margin-bottom: 10rpx;
-}
-.form-subtitle {
-		font-size: 24rpx;
-		color: #999;
 		margin-bottom: 40rpx;
+		text-align: center;
+		color: #333;
 }
 .form-item {
 		margin-bottom: 30rpx;
+		position: relative;
 }
-.form-label {
-		display: block;
-		font-size: 28rpx;
-		margin-bottom: 10rpx;
+.validation-icon {
+		position: absolute;
+		right: 20rpx;
+		top: 50%;
+		transform: translateY(-50%);
+		font-size: 36rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+}
+.icon-success {
+		color: #4cd964;
 }
-.required {
-		color: #ff4757;
+.icon-error {
+		color: #ff3b30;
 }
 input {
 		width: 100%;
 		height: 80rpx;
 		border: 1px solid #eee;
 		border-radius: 8rpx;
-		padding: 0 20rpx;
+		padding: 0 60rpx 0 20rpx;
 		font-size: 28rpx;
 		box-sizing: border-box;
+		background-color: #f9f9f9;
+}
+.phone-item {
+		display: flex;
+		align-items: center;
+		position: relative;
+}
+.phone-item .validation-icon {
+		right: 20rpx;
+}
+.phone-item input {
+		flex: 1;
+		border-radius: 0 8rpx 8rpx 0;
 }
-.submit-btn {
+.verify-btn {
 		width: 100%;
 		height: 90rpx;
 		line-height: 90rpx;
-		background-color: #6c5ce7;
+		background-color: #0039b3;
 		color: #fff;
 		border-radius: 45rpx;
 		font-size: 32rpx;
 		margin-top: 60rpx;
 }
+.verify-btn[disabled] {
+		background-color: #b2b2b2;
+		color: #fff;
+		opacity: 0.7;
+}
 .agreement {
 		display: flex;
-		align-items: flex-start;
-		margin-top: 20rpx;
+		align-items: center;
+		margin-top: 30rpx;
 }
 .agreement-text {
 		font-size: 24rpx;
@@ -93,62 +115,7 @@ input {
 		margin-left: 10rpx;
 }
 .agreement-link {
-		color: #6c5ce7;
-}
-.submit-btn[disabled] {
-		background-color: #b2b2b2;
-		color: #fff;
-}
-.radio-group {
-		display: flex;
-		flex-direction: row;
-		margin-top: 10rpx;
-}
-.radio-item {
-		display: flex;
-		align-items: center;
-		margin-right: 60rpx;
-}
-.radio-circle {
-		width: 36rpx;
-		height: 36rpx;
-		border-radius: 50%;
-		border: 2rpx solid #999;
-		margin-right: 10rpx;
-		position: relative;
-}
-.radio-selected {
-		border-color: #6c5ce7;
-}
-.radio-selected:after {
-		content: '';
-		position: absolute;
-		width: 24rpx;
-		height: 24rpx;
-		background-color: #6c5ce7;
-		border-radius: 50%;
-		top: 50%;
-		left: 50%;
-		transform: translate(-50%, -50%);
-}
-.radio-text {
-		font-size: 28rpx;
-}
-.picker-view {
-		width: 100%;
-		height: 80rpx;
-		border: 1px solid #eee;
-		border-radius: 8rpx;
-		padding: 0 20rpx;
-		font-size: 28rpx;
-		box-sizing: border-box;
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-}
-.picker-arrow {
-		font-size: 24rpx;
-		color: #999;
+		color: #0039b3;
 }
 
 	/* 职位列表样式 */
@@ -176,7 +143,7 @@ input {
 		border: 2rpx solid transparent;
 }
 .job-selected {
-		border-color: #6c5ce7;
+		border-color: #0039b3;
 		background-color: rgba(108, 92, 231, 0.1);
 }
 .job-name {
@@ -197,7 +164,7 @@ input {
 		width: 100%;
 		height: 90rpx;
 		line-height: 90rpx;
-		background-color: #6c5ce7;
+		background-color: #0039b3;
 		color: #fff;
 		border-radius: 45rpx;
 		font-size: 32rpx;
@@ -207,3 +174,60 @@ input {
 		background-color: #b2b2b2;
 		color: #fff;
 }
+
+	/* 修复国家代码样式 */
+.country-code {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		width: 100rpx;
+		padding: 0 20rpx;
+		height: 80rpx;
+		border: 1px solid #eee;
+		border-radius: 8rpx 0 0 8rpx;
+		border-right: none;
+		font-size: 28rpx;
+		background-color: #f9f9f9;
+}
+.dropdown-icon {
+		font-size: 20rpx;
+		color: #999;
+		margin-left: 10rpx;
+}
+	
+	/* 修复手机号输入框样式 */
+.phone-item {
+		display: flex;
+		align-items: center;
+		position: relative;
+}
+.phone-item input {
+		flex: 1;
+		border-radius: 0 8rpx 8rpx 0;
+}
+	
+	/* 修复验证图标位置 */
+.validation-icon {
+		position: absolute;
+		right: 20rpx;
+		top: 50%;
+		transform: translateY(-50%);
+		font-size: 36rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		z-index: 2;
+}
+.phone-item .validation-icon {
+		right: 20rpx;
+}
+	
+	/* 修改图标样式与图片一致 */
+.icon-success {
+		color: #4cd964;
+		font-weight: bold;
+}
+.icon-error {
+		color: #ff3b30;
+		font-weight: bold;
+}

+ 0 - 1
unpackage/dist/dev/mp-weixin/pages/interview-notice/interview-notice.json

@@ -1,5 +1,4 @@
 {
   "navigationBarTitleText": "面试注意事项",
-  "autoBackButton": "false",
   "usingComponents": {}
 }

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

@@ -1 +1 @@
-<view class="notice-container"><view class="notice-title">面试注意事项</view><view class="notice-subtitle">为了保障面试顺利进行,请注意以下事项</view><view class="notice-grid"><view class="notice-item"><view class="icon-container light"><text class="iconfont">☀</text></view><text class="item-text">保持光线良好、干净背景、安静不受打扰</text></view><view class="notice-item"><view class="icon-container smile"><text class="iconfont">☺</text></view><text class="item-text">保持微笑、声音洪亮、让面试官看清表达</text></view><view class="notice-item"><view class="icon-container mic"><text class="iconfont">🎤</text></view><text class="item-text">保持声音回传准确、避免使用有线耳机</text></view><view class="notice-item"><view class="icon-container wifi"><text class="iconfont">📶</text></view><text class="item-text">保持网络通畅、避免网络间歇性断开</text></view><view class="notice-item"><view class="icon-container forbidden"><text class="iconfont">⛔</text></view><text class="item-text">请勿人脸离开屏幕</text></view><view class="notice-item"><view class="icon-container forbidden"><text class="iconfont">⛔</text></view><text class="item-text">请勿录屏/截屏</text></view></view><view class="warning-tip"><text>建议使用开启声音和视频打开模式,避免采用电话/短信等打断面试</text></view><view class="disclaimer"> 本公司保障您的隐私,根据法律法规和监管要求收集必要的面试信息,下载、存储、使用您的面试视频,仅用于面试评估,过程中不会泄露您的个人信息。 </view><view class="agreement"><checkbox checked="{{a}}" bindtap="{{b}}"/><text class="agreement-text">我同意并知晓</text></view><button class="start-btn" disabled="{{c}}" bindtap="{{d}}">开始面试</button></view>
+<view class="notice-container"><view class="notice-title">面试注意事项</view><view class="notice-subtitle">为了保障面试顺利进行,请注意以下事项</view><view class="notice-grid"><view class="notice-item light"><view class="icon-container"><text class="iconfont">☀</text></view><text class="item-text">保持光线良好、干净背景、安静不受打扰</text></view><view class="notice-item smile"><view class="icon-container"><text class="iconfont">☺</text></view><text class="item-text">保持微笑、声音洪亮、正面直视摄像头</text></view><view class="notice-item headphone"><view class="icon-container"><text class="iconfont">🎧</text></view><text class="item-text">保持声音回音接收正常、建议使用耳机</text></view><view class="notice-item wifi"><view class="icon-container"><text class="iconfont">📶</text></view><text class="item-text">保持网络通畅、面试期间勿断出</text></view><view class="notice-item forbidden"><view class="icon-container"><text class="iconfont">✖</text></view><text class="item-text">请勿人脸离开屏幕</text></view><view class="notice-item forbidden"><view class="icon-container"><text class="iconfont">✖</text></view><text class="item-text">请勿录屏、截屏</text></view></view><view class="warning-tip"> * 建议开启免提模式,避免采用\短信等打断面试 </view><view class="agreement"><radio checked="{{a}}" bindtap="{{b}}"/><text class="agreement-text">我同意并知晓</text></view><button class="next-btn" disabled="{{c}}" bindtap="{{d}}">下一步</button></view>

+ 38 - 36
unpackage/dist/dev/mp-weixin/pages/interview-notice/interview-notice.wxss

@@ -3,7 +3,7 @@
   display: flex;
   flex-direction: column;
   min-height: 100vh;
-  background-color: #f5f7fa;
+  background-color: #ffffff;
   padding: 30rpx;
 }
 .notice-title {
@@ -11,11 +11,12 @@
   font-weight: bold;
   margin-top: 20rpx;
   margin-bottom: 10rpx;
+  color: #333;
 }
 .notice-subtitle {
-  font-size: 28rpx;
-  color: #666;
-  margin-bottom: 40rpx;
+  font-size: 26rpx;
+  color: #999;
+  margin-bottom: 30rpx;
 }
 .notice-grid {
   display: flex;
@@ -24,60 +25,59 @@
   margin-bottom: 30rpx;
 }
 .notice-item {
-  width: 42%;
-  background-color: #fff;
-  border-radius: 12rpx;
+  width: 47%;
+  height: 180rpx;
+  border-radius: 8rpx;
   padding: 20rpx;
   margin-bottom: 20rpx;
   display: flex;
   flex-direction: column;
   align-items: center;
-  text-align: center;
-}
-.icon-container {
-  width: 80rpx;
-  height: 80rpx;
-  border-radius: 50%;
-  display: flex;
   justify-content: center;
-  align-items: center;
-  margin-bottom: 15rpx;
+  text-align: center;
+  box-sizing: border-box;
 }
 .light {
-  background-color: #f1c40f;
+  background-color: #f0f9eb;
 }
 .smile {
-  background-color: #2ecc71;
+  background-color: #f0f9eb;
 }
-.mic {
-  background-color: #3498db;
+.headphone {
+  background-color: #f0f9eb;
 }
 .wifi {
-  background-color: #9b59b6;
+  background-color: #f0f9eb;
 }
 .forbidden {
-  background-color: #e74c3c;
+  background-color: #fff8e6;
+}
+.icon-container {
+  width: 40rpx;
+  height: 40rpx;
+  border-radius: 50%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  margin-bottom: 15rpx;
 }
 .iconfont {
   font-size: 40rpx;
-  color: #fff;
+  color: #333;
 }
 .item-text {
   font-size: 24rpx;
   color: #333;
   line-height: 1.4;
+  display: -webkit-box;
+  -webkit-line-clamp: 3;
+  -webkit-box-orient: vertical;
+  overflow: hidden;
 }
 .warning-tip {
-  background-color: #fff8e1;
-  border-radius: 12rpx;
-  padding: 20rpx;
-  margin-bottom: 30rpx;
-  border-left: 8rpx solid #ffc107;
-}
-.warning-tip text {
-  font-size: 26rpx;
   color: #ff9800;
-  line-height: 1.4;
+  font-size: 24rpx;
+  margin-bottom: 60rpx;
 }
 .disclaimer {
   font-size: 24rpx;
@@ -88,6 +88,7 @@
 .agreement {
   display: flex;
   align-items: center;
+  justify-content: center;
   margin-bottom: 40rpx;
 }
 .agreement-text {
@@ -95,16 +96,17 @@
   color: #333;
   margin-left: 10rpx;
 }
-.start-btn {
+.next-btn {
   width: 100%;
   height: 90rpx;
   line-height: 90rpx;
-  background-color: #6c5ce7;
+  background-color: #0039b3;
   color: #fff;
-  border-radius: 45rpx;
+  border-radius: 8rpx;
   font-size: 32rpx;
+  text-align: center;
 }
-.start-btn[disabled] {
+.next-btn[disabled] {
   background-color: #b2b2b2;
   color: #fff;
 }

+ 203 - 0
unpackage/dist/dev/mp-weixin/pages/login/login.js

@@ -0,0 +1,203 @@
+"use strict";
+const common_vendor = require("../../common/vendor.js");
+const api_user = require("../../api/user.js");
+const common_assets = require("../../common/assets.js");
+const _sfc_main = {
+  data() {
+    return {
+      isAgreed: false,
+      wxLoginCode: ""
+    };
+  },
+  methods: {
+    toggleAgreement() {
+      this.isAgreed = !this.isAgreed;
+    },
+    handleLogin() {
+      if (!this.isAgreed) {
+        common_vendor.index.showToast({
+          title: "请先阅读并同意相关协议",
+          icon: "none"
+        });
+        return;
+      }
+      this.getWxLoginCode();
+    },
+    getWxLoginCode() {
+      common_vendor.index.showLoading({ title: "登录中..." });
+      common_vendor.index.login({
+        provider: "weixin",
+        success: (loginRes) => {
+          console.log("获取微信登录code成功:", loginRes.code);
+          this.wxLoginCode = loginRes.code;
+          common_vendor.index.hideLoading();
+          this.getUserProfile();
+        },
+        fail: (err) => {
+          common_vendor.index.hideLoading();
+          console.error("获取微信登录code失败:", err);
+          common_vendor.index.showToast({
+            title: "微信登录失败",
+            icon: "none"
+          });
+        }
+      });
+    },
+    getUserProfile() {
+      common_vendor.wx$1.getUserProfile({
+        desc: "用于完善用户资料",
+        success: (profileRes) => {
+          console.log("获取用户信息成功:", profileRes);
+          const loginParams = {
+            code: this.wxLoginCode,
+            userInfo: profileRes.userInfo,
+            signature: profileRes.signature,
+            rawData: profileRes.rawData,
+            encryptedData: profileRes.encryptedData,
+            iv: profileRes.iv
+          };
+          this.wxLoginRequest(loginParams);
+        },
+        fail: (err) => {
+          console.error("获取用户信息失败:", err);
+          this.wxLoginRequest({
+            code: this.wxLoginCode,
+            userInfo: {
+              nickName: "微信用户",
+              avatarUrl: "",
+              gender: 0,
+              province: "",
+              city: "",
+              country: ""
+            }
+          });
+        }
+      });
+    },
+    async wxLoginRequest(loginParams) {
+      try {
+        common_vendor.index.showLoading({ title: "登录中..." });
+        console.log("发送登录请求,参数:", loginParams);
+        const data = await api_user.wxLogin(loginParams);
+        console.log("登录成功,返回数据:", data);
+        const userData = this.buildUserData(data, loginParams);
+        this.saveLoginState(data, userData);
+      } catch (error) {
+        this.handleLoginError(error, loginParams);
+      }
+    },
+    buildUserData(data, loginParams) {
+      console.log("构建用户数据,服务器返回:", data);
+      let userData = {
+        username: data.username || data.nickName || (loginParams.userInfo ? loginParams.userInfo.nickName : "微信用户"),
+        name: data.name || data.username || data.nickName || (loginParams.userInfo ? loginParams.userInfo.nickName : ""),
+        id: data.id || data.userId || data.user_id || data.openid || "",
+        userId: data.userId || data.user_id || data.id || data.openid || "",
+        avatar: data.avatar || data.avatarUrl || (loginParams.userInfo ? loginParams.userInfo.avatarUrl : "/static/avatar.png"),
+        phone: data.phone || data.mobile || "",
+        gender: data.gender || (loginParams.userInfo ? loginParams.userInfo.gender : 0),
+        openid: data.openid || "",
+        unionid: data.unionid || "",
+        session_key: data.session_key || "",
+        is_new_user: data.is_new_user || false,
+        loginTime: (/* @__PURE__ */ new Date()).getTime()
+      };
+      console.log("构建的用户数据:", userData);
+      return userData;
+    },
+    saveLoginState(data, userData) {
+      const token = data.token || data.session_key || "";
+      if (token) {
+        common_vendor.index.setStorageSync("token", token);
+        console.log("Token已保存:", token);
+      }
+      if (userData.avatar) {
+        console.log("用户头像已保存:", userData.avatar);
+      } else if (data.avatarUrl) {
+        userData.avatar = data.avatarUrl;
+      }
+      common_vendor.index.setStorageSync("userInfo", JSON.stringify(userData));
+      console.log("基本用户信息已保存");
+      if (userData.id) {
+        this.fetchUserDetail(userData.id, userData);
+      } else {
+        this.completeLogin();
+      }
+    },
+    // 获取用户详细信息
+    async fetchUserDetail(userId, basicUserData) {
+      try {
+        console.log("获取用户详细信息,用户ID:", userId);
+        const userDetail = await api_user.getUserInfo(userId);
+        console.log("获取用户详细信息成功:", userDetail);
+        if (userDetail) {
+          const updatedUserInfo = {
+            ...basicUserData,
+            // 更新基本信息
+            name: userDetail.name || basicUserData.name,
+            phone: userDetail.phone || userDetail.mobile || basicUserData.phone,
+            gender: userDetail.gender || basicUserData.gender,
+            // 添加详细信息
+            id_card: userDetail.id_card || "",
+            emergency_contact: userDetail.emergency_contact || "",
+            emergency_phone: userDetail.emergency_phone || "",
+            relation: userDetail.relation || "",
+            // 其他可能的字段
+            ...userDetail
+          };
+          common_vendor.index.setStorageSync("userInfo", JSON.stringify(updatedUserInfo));
+          console.log("用户详细信息已更新并保存");
+        }
+      } catch (error) {
+        console.error("获取用户详细信息失败:", error);
+      } finally {
+        this.completeLogin();
+      }
+    },
+    // 完成登录流程
+    completeLogin() {
+      common_vendor.index.hideLoading();
+      common_vendor.index.showToast({
+        title: "登录成功",
+        icon: "success",
+        success: () => {
+          setTimeout(() => {
+            common_vendor.index.switchTab({
+              url: "/pages/index/index"
+            });
+          }, 1500);
+        }
+      });
+    },
+    handleLoginError(error, loginParams) {
+      common_vendor.index.hideLoading();
+      if (error.message && (error.message.includes("code无效") || error.message.includes("已过期") || error.message.includes("已被使用") || error.status === 999)) {
+        console.error("微信登录code无效,重新获取:", error);
+        common_vendor.index.showToast({
+          title: "code已过期,请重试",
+          icon: "none",
+          duration: 2e3
+        });
+        setTimeout(() => {
+          this.getWxLoginCode();
+        }, 1e3);
+        return;
+      }
+      console.error("微信登录失败:", error);
+      common_vendor.index.showToast({
+        title: error.message || "登录失败",
+        icon: "none"
+      });
+    }
+  }
+};
+function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
+  return {
+    a: common_assets._imports_0,
+    b: common_vendor.o((...args) => $options.handleLogin && $options.handleLogin(...args)),
+    c: $data.isAgreed,
+    d: common_vendor.o((...args) => $options.toggleAgreement && $options.toggleAgreement(...args))
+  };
+}
+const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
+wx.createPage(MiniProgramPage);

+ 4 - 0
unpackage/dist/dev/mp-weixin/pages/login/login.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "登录",
+  "usingComponents": {}
+}

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

@@ -0,0 +1 @@
+<view class="login-container"><image class="login-image" src="{{a}}" mode="aspectFit"></image><view class="login-title">登录后才,开始面试</view><button class="login-btn" bindtap="{{b}}">身份验证并登录</button><view class="agreement"><checkbox checked="{{c}}" bindtap="{{d}}" color="#6c5ce7"/><text class="agreement-text"> 我已阅读并同意 <text class="agreement-link">《用户协议》</text> 和 <text class="agreement-link">《隐私政策》</text></text></view></view>

+ 44 - 0
unpackage/dist/dev/mp-weixin/pages/login/login.wxss

@@ -0,0 +1,44 @@
+
+.login-container {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  padding: 40rpx;
+  height: 100vh;
+  background-color: #FFF;
+}
+.login-image {
+  width: 100%;
+
+  margin-bottom: 40rpx;
+}
+.login-title {
+  font-size: 36rpx;
+  font-weight: bold;
+  margin-bottom: 60rpx;
+  color: #333;
+}
+.login-btn {
+  width: 80%;
+  height: 90rpx;
+  line-height: 90rpx;
+  background-color: #0033cc;
+  color: #fff;
+  border-radius: 45rpx;
+  font-size: 32rpx;
+  margin-bottom: 30rpx;
+}
+.agreement {
+  display: flex;
+  align-items: center;
+  margin-top: 20rpx;
+}
+.agreement-text {
+  font-size: 24rpx;
+  color: #666;
+  margin-left: 10rpx;
+}
+.agreement-link {
+  color: #6c5ce7;
+}

+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/my/my.js

@@ -533,7 +533,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
   }, $data.userInfo.phone ? {
     e: common_vendor.t($options.formatPhone($data.userInfo.phone))
   } : {}) : {
-    f: common_assets._imports_0,
+    f: common_assets._imports_0$1,
     g: common_vendor.o((...args) => $options.wxLogin && $options.wxLogin(...args))
   }, {
     h: common_vendor.f($data.menuItems, (item, index, i0) => {

+ 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": {

BIN
unpackage/dist/dev/mp-weixin/static/login-image.png


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor