yangg 2 ヶ月 前
コミット
22809e861c

+ 5 - 1
api/user.js

@@ -134,8 +134,12 @@ export const applyJob = (params) => {
   return http.post('/api/job/apply', params);
 };
 
+/* 获取职位申请详情 */
+export const getApplicationDetail = (params) => {
+  return http.get('/api/job/application_detail', params);
+};
+
 /* 文件上传 */
 export const uploadPhoto = (params) => {
   return http.post('/api/system/upload/', params);
 };
-

+ 7 - 0
common/config.js

@@ -0,0 +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';
+
+// You can add other global configuration settings here
+export const appVersion = '1.0.0'; 

+ 2 - 2
pages/camera/camera.vue

@@ -150,7 +150,7 @@
 
 <script>
 	import { getInterviewList, getInterviewDetail } from '@/api/user.js';
-	
+	import { apiBaseUrl } from '@/common/config.js';
 	export default {
 		data() {
 			return {
@@ -532,7 +532,7 @@
 					console.log('提交数据:', submitData);
 					
 					// 调用API提交答案
-					const res = await this.$http.post('https://minlong.raycos.com.cn/api/job/submit_answer', submitData);
+					const res = await this.$http.post(`${apiBaseUrl}/api/job/submit_answer`, submitData);
 					
 					console.log('提交答案响应:', res);
 					

+ 4 - 3
pages/face-photo/face-photo.vue

@@ -7,10 +7,10 @@
     </view>
     
     <!-- 模式选择 -->
-    <view class="mode-selector">
+    <!-- <view class="mode-selector">
       <view class="mode-option" :class="{'active': mode === 'photo'}" @click="switchMode('photo')">拍照</view>
       <view class="mode-option" :class="{'active': mode === 'video'}" @click="switchMode('video')">录制视频</view>
-    </view>
+    </view> -->
     
     <!-- 照片/视频预览区域 -->
     <view class="photo-preview">
@@ -44,6 +44,7 @@
 
 <script>
 import { uploadPhoto,fillUserInfo,getUserInfo } from '@/api/user';
+import { apiBaseUrl } from '@/common/config.js';
 export default {
   data() {
     return {
@@ -236,7 +237,7 @@ export default {
       
       // 使用uni.uploadFile方式上传图片
       uni.uploadFile({
-        url: 'https://minlong.raycos.com.cn/api/system/upload/', 
+        url: `${apiBaseUrl}/api/system/upload/`, 
         filePath: this.mediaSource,
         name: 'file',
         formData: {

+ 4 - 3
pages/identity-verify/identity-verify.vue

@@ -115,6 +115,7 @@
 </template>
 
 <script>
+import { apiBaseUrl } from '@/common/config.js';
 export default {
   name: 'IdentityVerify',
   data() {
@@ -1133,7 +1134,7 @@ export default {
         
         // 使用XMLHttpRequest直接上传
         const xhr = new XMLHttpRequest();
-        xhr.open('POST', 'https://minlong.raycos.com.cn/api/system/upload/', true);
+        xhr.open('POST', `${apiBaseUrl}/api/system/upload/`, true);
         
         xhr.onload = () => {
           uni.hideLoading();
@@ -1196,7 +1197,7 @@ export default {
       
       // 对于小程序环境,使用uni.uploadFile
       uni.uploadFile({
-        url: 'https://minlong.raycos.com.cn/api/system/upload/',
+        url: `${apiBaseUrl}/api/system/upload/`,
         filePath: fileOrPath,
         name: 'file',
         formData: {
@@ -1289,7 +1290,7 @@ export default {
       
       // 发送请求到面试接口,使用form-data格式
       uni.request({
-        url: 'https://minlong.raycos.com.cn/api/job/upload_question_video',
+        url: `${apiBaseUrl}/api/job/upload_question_video`,
         method: 'POST',
         data: requestData,  // 使用data而不是formData
         header: {

+ 101 - 36
pages/index/index.vue

@@ -136,6 +136,7 @@
 			}
 		},
 		onLoad() {
+			this.checkLogin();
 			this.checkUserInfo();
 			this.fetchJobList();
 		},
@@ -155,6 +156,43 @@
 			}
 		},
 		methods: {
+			checkLogin() {
+				const userInfo = uni.getStorageSync('userInfo');
+				if (!userInfo) {
+					uni.switchTab({
+						url: '/pages/my/my',
+						success: () => {
+							console.log('跳转到登录页面成功');
+						},
+						fail: (err) => {
+							console.error('跳转到登录页面失败:', err);
+							uni.showToast({
+								title: '跳转失败,请重试',
+								icon: 'none'
+							});
+						}
+					});
+					return false;
+				}
+				
+				try {
+					const parsedUserInfo = JSON.parse(userInfo);
+					if (!parsedUserInfo.openid) {
+						uni.switchTab({
+							url: '/pages/my/my'
+						});
+						return false;
+					}
+					return true;
+				} catch (e) {
+					console.error('解析用户信息失败:', e);
+					uni.removeStorageSync('userInfo');
+					uni.switchTab({
+						url: '/pages/my/my'
+					});
+					return false;
+				}
+			},
 			goHome() {
 				uni.navigateBack({
 					delta: 1
@@ -168,49 +206,68 @@
 				this.formData.relation = this.relationOptions[this.relationIndex];
 			},
 			checkUserInfo() {
+				if (!this.checkLogin()) {
+					return;
+				}
+				
 				uni.showLoading({
 					title: '加载中...'
 				});
-				console.log('id:', JSON.parse(uni.getStorageSync('userInfo')).id);
-				getUserInfo(JSON.parse(uni.getStorageSync('userInfo')).id)
-					.then(res => {
-						uni.hideLoading();
-
-						if (res.code === 200 && res.data) {
-							const userData = res.data;
-
-							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;
+				
+				try {
+					const userInfo = JSON.parse(uni.getStorageSync('userInfo'));
+					console.log('id:', userInfo.id);
+					
+					getUserInfo(userInfo.id)
+						.then(res => {
+							uni.hideLoading();
+
+							if (res.code === 200 && res.data) {
+								const userData = res.data;
+
+								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'
-								});
+									uni.navigateTo({
+										url: '/pages/success/success'
+									});
+								}
 							}
-						}
-					})
-					.catch(err => {
-						uni.hideLoading();
-						console.error('获取用户信息失败:', err);
-						uni.showToast({
-							title: '获取用户信息失败',
-							icon: 'none'
+						})
+						.catch(err => {
+							uni.hideLoading();
+							console.error('获取用户信息失败:', err);
+							uni.showToast({
+								title: '获取用户信息失败',
+								icon: 'none'
+							});
 						});
+				} catch (e) {
+					uni.hideLoading();
+					console.error('获取用户信息失败:', e);
+					uni.showToast({
+						title: '获取用户信息失败',
+						icon: 'none'
 					});
+					uni.navigateTo({
+						url: '/pages/my/my'
+					});
+				}
 			},
 			fetchJobList() {
 				uni.showLoading({
@@ -238,6 +295,10 @@
 				this.selectedJob = job;
 			},
 			applyForJob() {
+				if (!this.checkLogin()) {
+					return;
+				}
+				
 				if (!this.selectedJobId) {
 					uni.showToast({
 						title: '请选择一个职位',
@@ -271,6 +332,10 @@
 				// this.userInfoFilled = true;
 			},
 			submitForm() {
+				if (!this.checkLogin()) {
+					return;
+				}
+				
 				if (!this.formData.name.trim()) {
 					uni.showToast({
 						title: '请输入姓名',
@@ -369,7 +434,7 @@
 				}
 
 				const submitData = {
-					openid: JSON.parse(uni.getStorageSync('userInfo')).openid || '',
+					openid: JSON.parse(uni.getStorageSync('userInfo') || '{}').openid || '',
 					name: this.formData.name,
 					phone: this.formData.phone,
 					id_card: this.formData.idCard,

+ 3 - 2
pages/interview/interview.vue

@@ -88,6 +88,7 @@
 </template>
 
 <script>
+import { apiBaseUrl } from '@/common/config.js'; // Import the base URL from a config file
 	export default {
 		data() {
 			return {
@@ -235,7 +236,7 @@
 					});
 					
 					// 使用fetch直接上传到 job/upload_posture_photo 接口
-					fetch('https://minlong.raycos.com.cn/job/upload_posture_photo', {
+					fetch(`${apiBaseUrl}/job/upload_posture_photo`, {
 						method: 'POST',
 						body: formData
 					})
@@ -274,7 +275,7 @@
 					});
 					
 					uni.uploadFile({
-						url: 'https://minlong.raycos.com.cn/job/upload_posture_photo',
+						url: `${apiBaseUrl}/job/upload_posture_photo`,
 						filePath: filePathOrData,
 						name: 'photo_file',  // 确保文件参数名称正确
 						formData: {  // 使用formData替代data以确保参数正确传递

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

@@ -0,0 +1,3 @@
+"use strict";
+const apiBaseUrl = "http://192.168.66.187:8083";
+exports.apiBaseUrl = apiBaseUrl;

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

@@ -1,6 +1,7 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
 const api_user = require("../../api/user.js");
+const common_config = require("../../common/config.js");
 const common_assets = require("../../common/assets.js");
 const _sfc_main = {
   data() {
@@ -314,7 +315,7 @@ const _sfc_main = {
           tenant_id: 1
         };
         console.log("提交数据:", submitData);
-        const res2 = await this.$http.post("https://minlong.raycos.com.cn/api/job/submit_answer", submitData);
+        const res2 = await this.$http.post(`${common_config.apiBaseUrl}/api/job/submit_answer`, submitData);
         console.log("提交答案响应:", res2);
         common_vendor.index.hideLoading();
         return res2;

+ 22 - 25
unpackage/dist/dev/mp-weixin/pages/face-photo/face-photo.js

@@ -1,6 +1,7 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
 const api_user = require("../../api/user.js");
+const common_config = require("../../common/config.js");
 const _sfc_main = {
   data() {
     return {
@@ -170,7 +171,7 @@ const _sfc_main = {
         return;
       }
       common_vendor.index.uploadFile({
-        url: "https://minlong.raycos.com.cn/api/system/upload/",
+        url: `${common_config.apiBaseUrl}/api/system/upload/`,
         filePath: this.mediaSource,
         name: "file",
         formData: {
@@ -271,43 +272,39 @@ const _sfc_main = {
 };
 function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
   return common_vendor.e({
-    a: $data.mode === "photo" ? 1 : "",
-    b: common_vendor.o(($event) => $options.switchMode("photo")),
-    c: $data.mode === "video" ? 1 : "",
-    d: common_vendor.o(($event) => $options.switchMode("video")),
-    e: !$data.mediaSource
+    a: !$data.mediaSource
   }, !$data.mediaSource ? {
-    f: $data.mode,
-    g: common_vendor.o((...args) => $options.handleCameraError && $options.handleCameraError(...args))
+    b: $data.mode,
+    c: common_vendor.o((...args) => $options.handleCameraError && $options.handleCameraError(...args))
   } : $data.mode === "photo" ? {
-    i: $data.mediaSource
+    e: $data.mediaSource
   } : $data.mode === "video" ? {
-    k: $data.mediaSource
+    g: $data.mediaSource
   } : {}, {
-    h: $data.mode === "photo",
-    j: $data.mode === "video",
-    l: $data.mode === "video" && $data.isRecording
+    d: $data.mode === "photo",
+    f: $data.mode === "video",
+    h: $data.mode === "video" && $data.isRecording
   }, $data.mode === "video" && $data.isRecording ? {
-    m: common_vendor.t($options.formatTime($data.recordingTime))
+    i: common_vendor.t($options.formatTime($data.recordingTime))
   } : {}, {
-    n: !$data.mediaSource
+    j: !$data.mediaSource
   }, !$data.mediaSource ? common_vendor.e({
-    o: $data.mode === "photo"
+    k: $data.mode === "photo"
   }, $data.mode === "photo" ? {
-    p: common_vendor.o((...args) => $options.takePhoto && $options.takePhoto(...args))
+    l: common_vendor.o((...args) => $options.takePhoto && $options.takePhoto(...args))
   } : $data.mode === "video" && !$data.isRecording ? {
-    r: common_vendor.o((...args) => $options.startRecording && $options.startRecording(...args))
+    n: common_vendor.o((...args) => $options.startRecording && $options.startRecording(...args))
   } : $data.mode === "video" && $data.isRecording ? {
-    t: common_vendor.o((...args) => $options.stopRecording && $options.stopRecording(...args))
+    p: common_vendor.o((...args) => $options.stopRecording && $options.stopRecording(...args))
   } : {}, {
-    q: $data.mode === "video" && !$data.isRecording,
-    s: $data.mode === "video" && $data.isRecording
+    m: $data.mode === "video" && !$data.isRecording,
+    o: $data.mode === "video" && $data.isRecording
   }) : {
-    v: common_vendor.t($data.mode === "photo" ? "拍照" : "录制"),
-    w: common_vendor.o((...args) => $options.retakeMedia && $options.retakeMedia(...args)),
-    x: common_vendor.o((...args) => $options.continueProcess && $options.continueProcess(...args))
+    q: common_vendor.t($data.mode === "photo" ? "拍照" : "录制"),
+    r: common_vendor.o((...args) => $options.retakeMedia && $options.retakeMedia(...args)),
+    s: common_vendor.o((...args) => $options.continueProcess && $options.continueProcess(...args))
   }, {
-    y: $data.isPageLoaded ? 1 : ""
+    t: $data.isPageLoaded ? 1 : ""
   });
 }
 const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);

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

@@ -1 +1 @@
-<view class="{{['photo-container', y && 'loaded']}}"><view class="photo-header"><text class="photo-title">拍摄面部照片</text><text class="photo-subtitle">我们将用于身份核验,请正对摄像头</text></view><view class="mode-selector"><view class="{{['mode-option', a && 'active']}}" bindtap="{{b}}">拍照</view><view class="{{['mode-option', c && 'active']}}" bindtap="{{d}}">录制视频</view></view><view class="photo-preview"><camera wx:if="{{e}}" device-position="front" flash="auto" class="camera" mode="{{f}}" binderror="{{g}}"></camera><image wx:elif="{{h}}" class="preview-image" src="{{i}}" mode="aspectFit"></image><video wx:elif="{{j}}" class="preview-video" src="{{k}}" controls autoplay></video><view class="face-outline"></view><view wx:if="{{l}}" class="recording-indicator"><view class="recording-dot"></view><text class="recording-time">{{m}}</text></view></view><view wx:if="{{n}}" class="capture-btn-container"><button wx:if="{{o}}" class="capture-btn" bindtap="{{p}}">拍照</button><button wx:elif="{{q}}" class="capture-btn" bindtap="{{r}}">开始录制</button><button wx:elif="{{s}}" class="stop-btn" bindtap="{{t}}">停止录制</button></view><view wx:else class="btn-group"><button class="retry-btn" bindtap="{{w}}">重新{{v}}</button><button class="start-btn" bindtap="{{x}}">完成</button></view></view>
+<view class="{{['photo-container', t && 'loaded']}}"><view class="photo-header"><text class="photo-title">拍摄面部照片</text><text class="photo-subtitle">我们将用于身份核验,请正对摄像头</text></view><view class="photo-preview"><camera wx:if="{{a}}" device-position="front" flash="auto" class="camera" mode="{{b}}" binderror="{{c}}"></camera><image wx:elif="{{d}}" class="preview-image" src="{{e}}" mode="aspectFit"></image><video wx:elif="{{f}}" class="preview-video" src="{{g}}" controls autoplay></video><view class="face-outline"></view><view wx:if="{{h}}" class="recording-indicator"><view class="recording-dot"></view><text class="recording-time">{{i}}</text></view></view><view wx:if="{{j}}" class="capture-btn-container"><button wx:if="{{k}}" class="capture-btn" bindtap="{{l}}">拍照</button><button wx:elif="{{m}}" class="capture-btn" bindtap="{{n}}">开始录制</button><button wx:elif="{{o}}" class="stop-btn" bindtap="{{p}}">停止录制</button></view><view wx:else class="btn-group"><button class="retry-btn" bindtap="{{r}}">重新{{q}}</button><button class="start-btn" bindtap="{{s}}">完成</button></view></view>

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

@@ -1,5 +1,6 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
+const common_config = require("../../common/config.js");
 const _sfc_main = {
   name: "IdentityVerify",
   data() {
@@ -808,7 +809,7 @@ const _sfc_main = {
         formData.append("video_duration", 0);
         formData.append("has_audio", "true");
         const xhr = new XMLHttpRequest();
-        xhr.open("POST", "https://minlong.raycos.com.cn/api/system/upload/", true);
+        xhr.open("POST", `${common_config.apiBaseUrl}/api/system/upload/`, true);
         xhr.onload = () => {
           common_vendor.index.hideLoading();
           if (xhr.status === 200) {
@@ -863,7 +864,7 @@ const _sfc_main = {
         return;
       }
       common_vendor.index.uploadFile({
-        url: "https://minlong.raycos.com.cn/api/system/upload/",
+        url: `${common_config.apiBaseUrl}/api/system/upload/`,
         filePath: fileOrPath,
         name: "file",
         formData: {
@@ -946,7 +947,7 @@ const _sfc_main = {
         tenant_id: common_vendor.index.getStorageSync("tenant_id") || "1"
       };
       common_vendor.index.request({
-        url: "https://minlong.raycos.com.cn/api/job/upload_question_video",
+        url: `${common_config.apiBaseUrl}/api/job/upload_question_video`,
         method: "POST",
         data: requestData,
         // 使用data而不是formData

+ 85 - 26
unpackage/dist/dev/mp-weixin/pages/index/index.js

@@ -24,6 +24,7 @@ const _sfc_main = {
     };
   },
   onLoad() {
+    this.checkLogin();
     this.checkUserInfo();
     this.fetchJobList();
   },
@@ -33,6 +34,42 @@ const _sfc_main = {
     }
   },
   methods: {
+    checkLogin() {
+      const userInfo = common_vendor.index.getStorageSync("userInfo");
+      if (!userInfo) {
+        common_vendor.index.switchTab({
+          url: "/pages/my/my",
+          success: () => {
+            console.log("跳转到登录页面成功");
+          },
+          fail: (err) => {
+            console.error("跳转到登录页面失败:", err);
+            common_vendor.index.showToast({
+              title: "跳转失败,请重试",
+              icon: "none"
+            });
+          }
+        });
+        return false;
+      }
+      try {
+        const parsedUserInfo = JSON.parse(userInfo);
+        if (!parsedUserInfo.openid) {
+          common_vendor.index.switchTab({
+            url: "/pages/my/my"
+          });
+          return false;
+        }
+        return true;
+      } catch (e) {
+        console.error("解析用户信息失败:", e);
+        common_vendor.index.removeStorageSync("userInfo");
+        common_vendor.index.switchTab({
+          url: "/pages/my/my"
+        });
+        return false;
+      }
+    },
     goHome() {
       common_vendor.index.navigateBack({
         delta: 1
@@ -46,42 +83,58 @@ const _sfc_main = {
       this.formData.relation = this.relationOptions[this.relationIndex];
     },
     checkUserInfo() {
+      if (!this.checkLogin()) {
+        return;
+      }
       common_vendor.index.showLoading({
         title: "加载中..."
       });
-      console.log("id:", JSON.parse(common_vendor.index.getStorageSync("userInfo")).id);
-      api_user.getUserInfo(JSON.parse(common_vendor.index.getStorageSync("userInfo")).id).then((res) => {
-        common_vendor.index.hideLoading();
-        if (res.code === 200 && res.data) {
-          const userData = res.data;
-          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;
+      try {
+        const userInfo = JSON.parse(common_vendor.index.getStorageSync("userInfo"));
+        console.log("id:", userInfo.id);
+        api_user.getUserInfo(userInfo.id).then((res) => {
+          common_vendor.index.hideLoading();
+          if (res.code === 200 && res.data) {
+            const userData = res.data;
+            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;
+                }
               }
+              common_vendor.index.navigateTo({
+                url: "/pages/success/success"
+              });
             }
-            common_vendor.index.navigateTo({
-              url: "/pages/success/success"
-            });
           }
-        }
-      }).catch((err) => {
+        }).catch((err) => {
+          common_vendor.index.hideLoading();
+          console.error("获取用户信息失败:", err);
+          common_vendor.index.showToast({
+            title: "获取用户信息失败",
+            icon: "none"
+          });
+        });
+      } catch (e) {
         common_vendor.index.hideLoading();
-        console.error("获取用户信息失败:", err);
+        console.error("获取用户信息失败:", e);
         common_vendor.index.showToast({
           title: "获取用户信息失败",
           icon: "none"
         });
-      });
+        common_vendor.index.navigateTo({
+          url: "/pages/my/my"
+        });
+      }
     },
     fetchJobList() {
       common_vendor.index.showLoading({
@@ -105,6 +158,9 @@ const _sfc_main = {
       this.selectedJob = job;
     },
     applyForJob() {
+      if (!this.checkLogin()) {
+        return;
+      }
       if (!this.selectedJobId) {
         common_vendor.index.showToast({
           title: "请选择一个职位",
@@ -133,6 +189,9 @@ const _sfc_main = {
       });
     },
     submitForm() {
+      if (!this.checkLogin()) {
+        return;
+      }
       if (!this.formData.name.trim()) {
         common_vendor.index.showToast({
           title: "请输入姓名",
@@ -219,7 +278,7 @@ const _sfc_main = {
         return;
       }
       const submitData = {
-        openid: JSON.parse(common_vendor.index.getStorageSync("userInfo")).openid || "",
+        openid: JSON.parse(common_vendor.index.getStorageSync("userInfo") || "{}").openid || "",
         name: this.formData.name,
         phone: this.formData.phone,
         id_card: this.formData.idCard,

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

@@ -1,5 +1,6 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
+const common_config = require("../../common/config.js");
 const _sfc_main = {
   data() {
     return {
@@ -123,7 +124,7 @@ const _sfc_main = {
           tenant_id,
           description: `手部照片-${type}`
         });
-        fetch("https://minlong.raycos.com.cn/job/upload_posture_photo", {
+        fetch(`${common_config.apiBaseUrl}/job/upload_posture_photo`, {
           method: "POST",
           body: formData
         }).then((response) => response.json()).then((result) => {
@@ -154,7 +155,7 @@ const _sfc_main = {
           description: `手部照片-${type}`
         });
         common_vendor.index.uploadFile({
-          url: "https://minlong.raycos.com.cn/job/upload_posture_photo",
+          url: `${common_config.apiBaseUrl}/job/upload_posture_photo`,
           filePath: filePathOrData,
           name: "photo_file",
           // 确保文件参数名称正确

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

@@ -1,7 +1,6 @@
 "use strict";
 const common_vendor = require("../common/vendor.js");
 const ERROR_CODE_MAP = {
-  400: "请求参数错误",
   401: "登录已过期,请重新登录",
   403: "没有权限执行此操作",
   404: "请求的资源不存在",

+ 2 - 1
unpackage/dist/dev/mp-weixin/utils/request.js

@@ -1,7 +1,8 @@
 "use strict";
 const common_vendor = require("../common/vendor.js");
 const utils_errorHandler = require("./errorHandler.js");
-const BASE_URL = "https://minlong.raycos.com.cn";
+const common_config = require("../common/config.js");
+const BASE_URL = common_config.apiBaseUrl;
 const TIMEOUT = 6e4;
 const requestInterceptor = (config) => {
   const token = common_vendor.index.getStorageSync("token");

+ 0 - 1
utils/errorHandler.js

@@ -4,7 +4,6 @@
 
 // 错误码映射表
 const ERROR_CODE_MAP = {
-  400: '请求参数错误',
   401: '登录已过期,请重新登录',
   403: '没有权限执行此操作',
   404: '请求的资源不存在',

+ 2 - 1
utils/request.js

@@ -4,9 +4,10 @@
  */
 
 import errorHandler from './errorHandler.js';
+import { apiBaseUrl } from '@/common/config.js';
 
 // 基础URL,可以根据环境变量等动态设置
-const BASE_URL = 'https://minlong.raycos.com.cn';
+const BASE_URL = apiBaseUrl;
 
 // 请求超时时间
 const TIMEOUT = 60000;