refactor(用户认证): 移除银行卡照片和身份证有效期字段
简化用户认证流程,移除银行卡正面照上传和身份证有效期相关字段 更新相关组件、存储和API调用以适配字段变更 切换测试服务器配置
Showing
7 changed files
with
31 additions
and
282 deletions
| ... | @@ -40,12 +40,9 @@ export const payCheckAPI = (params) => fn(fetch.post(Api.PAY_CHECK, params)); | ... | @@ -40,12 +40,9 @@ export const payCheckAPI = (params) => fn(fetch.post(Api.PAY_CHECK, params)); |
| 40 | * @param name 真实姓名 | 40 | * @param name 真实姓名 |
| 41 | * @param bank_id 开户行id | 41 | * @param bank_id 开户行id |
| 42 | * @param bank_no 银行卡号 | 42 | * @param bank_no 银行卡号 |
| 43 | - * @param bank_img 银行卡正面照 | ||
| 44 | * @param idcard 身份证号 | 43 | * @param idcard 身份证号 |
| 45 | * @param idcard_1_img 身份证正面照 | 44 | * @param idcard_1_img 身份证正面照 |
| 46 | * @param idcard_2_img 身份证反面照 | 45 | * @param idcard_2_img 身份证反面照 |
| 47 | - * @param idcard_effect_begin 身份证有效期开始 | ||
| 48 | - * @param idcard_effect_end 身份证有效期结束 | ||
| 49 | * @param idcard_address 身份证地址 | 46 | * @param idcard_address 身份证地址 |
| 50 | * @param is_signed 是否阅读协议 | 47 | * @param is_signed 是否阅读协议 |
| 51 | * @param division_agree_pic 分账协议照片 | 48 | * @param division_agree_pic 分账协议照片 | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2022-09-19 14:11:06 | 2 | * @Date: 2022-09-19 14:11:06 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-08-01 15:04:35 | 4 | + * @LastEditTime: 2025-08-13 17:16:45 |
| 5 | * @FilePath: /jgdl/src/pages/auth/index.vue | 5 | * @FilePath: /jgdl/src/pages/auth/index.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -92,6 +92,10 @@ export default { | ... | @@ -92,6 +92,10 @@ export default { |
| 92 | if (process.env.NODE_ENV === 'development') { | 92 | if (process.env.NODE_ENV === 'development') { |
| 93 | // requestData.openid = 'h-008'; | 93 | // requestData.openid = 'h-008'; |
| 94 | // requestData.openid = 'h-009'; | 94 | // requestData.openid = 'h-009'; |
| 95 | + // requestData.openid = 'h-010'; | ||
| 96 | + // requestData.openid = 'h-011'; | ||
| 97 | + // requestData.openid = 'h-012'; | ||
| 98 | + // requestData.openid = 'h-013'; | ||
| 95 | requestData.openid = 'oWbdFvkD5VtloC50wSNR9IWiU2q8'; | 99 | requestData.openid = 'oWbdFvkD5VtloC50wSNR9IWiU2q8'; |
| 96 | } | 100 | } |
| 97 | 101 | ... | ... |
| ... | @@ -17,8 +17,8 @@ | ... | @@ -17,8 +17,8 @@ |
| 17 | </view> | 17 | </view> |
| 18 | <view class="setting-right"> | 18 | <view class="setting-right"> |
| 19 | <text class="setting-status" | 19 | <text class="setting-status" |
| 20 | - :class="{ 'status-set': accountInfo.bankName && accountInfo.bankAccount && accountInfo.bankImg }"> | 20 | + :class="{ 'status-set': accountInfo.bankName && accountInfo.bankAccount }"> |
| 21 | - {{ accountInfo.bankName && accountInfo.bankAccount && accountInfo.bankImg ? '已设置' : '未设置' }} | 21 | + {{ accountInfo.bankName && accountInfo.bankAccount ? '已设置' : '未设置' }} |
| 22 | </text> | 22 | </text> |
| 23 | <!-- <text class="arrow">></text> --> | 23 | <!-- <text class="arrow">></text> --> |
| 24 | <RectRight color="#999" size="10" /> | 24 | <RectRight color="#999" size="10" /> |
| ... | @@ -32,9 +32,9 @@ | ... | @@ -32,9 +32,9 @@ |
| 32 | </view> | 32 | </view> |
| 33 | <view class="setting-right"> | 33 | <view class="setting-right"> |
| 34 | <text class="setting-status" | 34 | <text class="setting-status" |
| 35 | - :class="{ 'status-set': identityInfo.userName && identityInfo.idCard && identityInfo.idcard_1_img && identityInfo.idcard_2_img && identityInfo.idcard_effect_begin && identityInfo.idcard_effect_end && (identityInfo.idcard_province && identityInfo.idcard_city && identityInfo.idcard_district && identityInfo.idcard_address) }"> | 35 | + :class="{ 'status-set': identityInfo.userName && identityInfo.idCard && identityInfo.idcard_1_img && identityInfo.idcard_2_img && (identityInfo.idcard_province && identityInfo.idcard_city && identityInfo.idcard_district && identityInfo.idcard_address) }"> |
| 36 | {{ identityInfo.userName && identityInfo.idCard && identityInfo.idcard_1_img && identityInfo.idcard_2_img && | 36 | {{ identityInfo.userName && identityInfo.idCard && identityInfo.idcard_1_img && identityInfo.idcard_2_img && |
| 37 | - identityInfo.idcard_effect_begin && identityInfo.idcard_effect_end && (identityInfo.idcard_province && identityInfo.idcard_city && identityInfo.idcard_district && identityInfo.idcard_address) ? '已设置' : | 37 | + (identityInfo.idcard_province && identityInfo.idcard_city && identityInfo.idcard_district && identityInfo.idcard_address) ? '已设置' : |
| 38 | '未设置' }} | 38 | '未设置' }} |
| 39 | </text> | 39 | </text> |
| 40 | <!-- <text class="arrow">></text> --> | 40 | <!-- <text class="arrow">></text> --> |
| ... | @@ -70,23 +70,7 @@ | ... | @@ -70,23 +70,7 @@ |
| 70 | <text v-if="bankAccountError" class="error-text">{{ bankAccountError }}</text> | 70 | <text v-if="bankAccountError" class="error-text">{{ bankAccountError }}</text> |
| 71 | </view> | 71 | </view> |
| 72 | 72 | ||
| 73 | - <!-- 银行卡正面照片上传 --> | 73 | + |
| 74 | - <view class="form-item"> | ||
| 75 | - <text class="form-label"><text class="required-mark">*</text>银行卡正面照</text> | ||
| 76 | - <view class="bank-img-container"> | ||
| 77 | - <view v-if="tempAccountInfo.bankImg" class="bank-img-preview"> | ||
| 78 | - <image :src="tempAccountInfo.bankImg" class="bank-img-image" mode="aspectFill" @tap="previewBankImg" /> | ||
| 79 | - <view class="bank-img-actions"> | ||
| 80 | - <text class="change-img-btn" @tap="changeBankImg">重新上传</text> | ||
| 81 | - <text class="delete-img-btn" @tap="deleteBankImg">删除</text> | ||
| 82 | - </view> | ||
| 83 | - </view> | ||
| 84 | - <view v-else class="bank-img-upload" @tap="changeBankImg"> | ||
| 85 | - <text class="upload-icon">+</text> | ||
| 86 | - <text class="upload-text">上传银行卡正面照</text> | ||
| 87 | - </view> | ||
| 88 | - </view> | ||
| 89 | - </view> | ||
| 90 | </view> | 74 | </view> |
| 91 | 75 | ||
| 92 | <view class="modal-footer"> | 76 | <view class="modal-footer"> |
| ... | @@ -94,7 +78,7 @@ | ... | @@ -94,7 +78,7 @@ |
| 94 | 关闭 | 78 | 关闭 |
| 95 | </nut-button> | 79 | </nut-button> |
| 96 | <nut-button type="primary" @click="saveAccountInfo" color="#ffa500" | 80 | <nut-button type="primary" @click="saveAccountInfo" color="#ffa500" |
| 97 | - :disabled="!tempAccountInfo.bankName || !tempAccountInfo.bankAccount || !tempAccountInfo.bankImg" | 81 | + :disabled="!tempAccountInfo.bankName || !tempAccountInfo.bankAccount" |
| 98 | class="footer-btn footer-btn-save"> | 82 | class="footer-btn footer-btn-save"> |
| 99 | 保存 | 83 | 保存 |
| 100 | </nut-button> | 84 | </nut-button> |
| ... | @@ -167,29 +151,9 @@ | ... | @@ -167,29 +151,9 @@ |
| 167 | </view> | 151 | </view> |
| 168 | </view> | 152 | </view> |
| 169 | 153 | ||
| 170 | - <!-- 证件有效期开始日期 --> | ||
| 171 | - <view class="form-item"> | ||
| 172 | - <text class="form-label"><text class="required-mark">*</text>证件有效期开始</text> | ||
| 173 | - <view class="date-selector" @click="showIdcardBeginDatePicker"> | ||
| 174 | - <text class="date-text" :class="{ 'date-selected': tempIdentityInfo.idcard_effect_begin }"> | ||
| 175 | - {{ tempIdentityInfo.idcard_effect_begin || '请选择开始日期' }} | ||
| 176 | - </text> | ||
| 177 | - <!-- <text class="arrow-down">></text> --> | ||
| 178 | - <RectRight color="#999" size="10" /> | ||
| 179 | - </view> | ||
| 180 | - </view> | ||
| 181 | 154 | ||
| 182 | - <!-- 证件有效期结束日期 --> | 155 | + |
| 183 | - <view class="form-item"> | 156 | + |
| 184 | - <text class="form-label"><text class="required-mark">*</text>证件有效期结束</text> | ||
| 185 | - <view class="date-selector" @click="showIdcardEndDatePicker"> | ||
| 186 | - <text class="date-text" :class="{ 'date-selected': tempIdentityInfo.idcard_effect_end }"> | ||
| 187 | - {{ tempIdentityInfo.idcard_effect_end || '请选择结束日期' }} | ||
| 188 | - </text> | ||
| 189 | - <!-- <text class="arrow-down">></text> --> | ||
| 190 | - <RectRight color="#999" size="10" /> | ||
| 191 | - </view> | ||
| 192 | - </view> | ||
| 193 | 157 | ||
| 194 | <!-- 身份证地址 --> | 158 | <!-- 身份证地址 --> |
| 195 | <view class="form-item"> | 159 | <view class="form-item"> |
| ... | @@ -212,7 +176,7 @@ | ... | @@ -212,7 +176,7 @@ |
| 212 | 关闭 | 176 | 关闭 |
| 213 | </nut-button> | 177 | </nut-button> |
| 214 | <nut-button type="primary" @click="saveIdentityInfo" color="#ffa500" | 178 | <nut-button type="primary" @click="saveIdentityInfo" color="#ffa500" |
| 215 | - :disabled="!tempIdentityInfo.userName || !tempIdentityInfo.idCard || !tempIdentityInfo.idcard_1_img || !tempIdentityInfo.idcard_2_img || !tempIdentityInfo.idcard_effect_begin || !tempIdentityInfo.idcard_effect_end || !tempIdentityInfo.idcard_province || !tempIdentityInfo.idcard_city || !tempIdentityInfo.idcard_district || !tempIdentityInfo.idcard_address || !!idCardError" | 179 | + :disabled="!tempIdentityInfo.userName || !tempIdentityInfo.idCard || !tempIdentityInfo.idcard_1_img || !tempIdentityInfo.idcard_2_img || !tempIdentityInfo.idcard_province || !tempIdentityInfo.idcard_city || !tempIdentityInfo.idcard_district || !tempIdentityInfo.idcard_address || !!idCardError" |
| 216 | class="footer-btn footer-btn-save"> | 180 | class="footer-btn footer-btn-save"> |
| 217 | 保存 | 181 | 保存 |
| 218 | </nut-button> | 182 | </nut-button> |
| ... | @@ -220,23 +184,7 @@ | ... | @@ -220,23 +184,7 @@ |
| 220 | </view> | 184 | </view> |
| 221 | </nut-popup> | 185 | </nut-popup> |
| 222 | 186 | ||
| 223 | - <!-- 身份证有效期开始日期选择器 --> | ||
| 224 | - <nut-popup v-model:visible="showIdcardBeginDate" position="bottom" :style="{ height: '50%' }"> | ||
| 225 | - <nut-date-picker v-model="idcardBeginDate" type="date" title="选择证件有效期开始日期" :max-date="maxYearDate" | ||
| 226 | - :min-date="minYearDate" @confirm="onIdcardBeginDateConfirm" @cancel="showIdcardBeginDate = false" /> | ||
| 227 | - </nut-popup> | ||
| 228 | 187 | ||
| 229 | - <!-- 证件有效期结束类型选择器弹窗 --> | ||
| 230 | - <nut-popup v-model:visible="showEndDateTypeModal" position="bottom"> | ||
| 231 | - <nut-picker v-model="endDateTypePickerValue" :columns="endDateTypeOptions" title="选择证件有效期类型" | ||
| 232 | - @confirm="onEndDateTypeConfirm" @cancel="showEndDateTypeModal = false"></nut-picker> | ||
| 233 | - </nut-popup> | ||
| 234 | - | ||
| 235 | - <!-- 身份证有效期结束日期选择器 --> | ||
| 236 | - <nut-popup v-model:visible="showIdcardEndDate" position="bottom" :style="{ height: '50%' }"> | ||
| 237 | - <nut-date-picker v-model="idcardEndDate" type="date" title="选择证件有效期结束日期" :max-date="maxYearDate" | ||
| 238 | - :min-date="minYearDate" @confirm="onIdcardEndDateConfirm" @cancel="showIdcardEndDate = false" /> | ||
| 239 | - </nut-popup> | ||
| 240 | 188 | ||
| 241 | <!-- 固定返回按钮 - 只有当参数target=sell时才显示 --> | 189 | <!-- 固定返回按钮 - 只有当参数target=sell时才显示 --> |
| 242 | <view v-if="showBackButton" class="fixed-back-btn" @click="goBack"> | 190 | <view v-if="showBackButton" class="fixed-back-btn" @click="goBack"> |
| ... | @@ -294,7 +242,7 @@ const showBackButton = computed(() => { | ... | @@ -294,7 +242,7 @@ const showBackButton = computed(() => { |
| 294 | const accountInfo = ref({ | 242 | const accountInfo = ref({ |
| 295 | bankName: '', | 243 | bankName: '', |
| 296 | bankAccount: '', | 244 | bankAccount: '', |
| 297 | - bankImg: '' | 245 | + // bankImg字段已移除 |
| 298 | }); | 246 | }); |
| 299 | 247 | ||
| 300 | /** | 248 | /** |
| ... | @@ -305,8 +253,7 @@ const identityInfo = ref({ | ... | @@ -305,8 +253,7 @@ const identityInfo = ref({ |
| 305 | idCard: '', | 253 | idCard: '', |
| 306 | idcard_1_img: '', | 254 | idcard_1_img: '', |
| 307 | idcard_2_img: '', | 255 | idcard_2_img: '', |
| 308 | - idcard_effect_begin: '', | 256 | + // idcard_effect_begin和idcard_effect_end字段已移除 |
| 309 | - idcard_effect_end: '', | ||
| 310 | idcard_address: '' | 257 | idcard_address: '' |
| 311 | }); | 258 | }); |
| 312 | 259 | ||
| ... | @@ -315,8 +262,7 @@ const identityInfo = ref({ | ... | @@ -315,8 +262,7 @@ const identityInfo = ref({ |
| 315 | */ | 262 | */ |
| 316 | const tempAccountInfo = ref({ | 263 | const tempAccountInfo = ref({ |
| 317 | bankName: '', | 264 | bankName: '', |
| 318 | - bankAccount: '', | 265 | + bankAccount: '' |
| 319 | - bankImg: '' | ||
| 320 | }); | 266 | }); |
| 321 | 267 | ||
| 322 | /** | 268 | /** |
| ... | @@ -327,8 +273,6 @@ const tempIdentityInfo = ref({ | ... | @@ -327,8 +273,6 @@ const tempIdentityInfo = ref({ |
| 327 | idCard: '', | 273 | idCard: '', |
| 328 | idcard_1_img: '', | 274 | idcard_1_img: '', |
| 329 | idcard_2_img: '', | 275 | idcard_2_img: '', |
| 330 | - idcard_effect_begin: '', | ||
| 331 | - idcard_effect_end: '', | ||
| 332 | // 身份证地址相关字段(显示用中文名称) | 276 | // 身份证地址相关字段(显示用中文名称) |
| 333 | province: '', | 277 | province: '', |
| 334 | city: '', | 278 | city: '', |
| ... | @@ -361,43 +305,9 @@ const idCardError = ref(''); | ... | @@ -361,43 +305,9 @@ const idCardError = ref(''); |
| 361 | */ | 305 | */ |
| 362 | const bankAccountError = ref(''); | 306 | const bankAccountError = ref(''); |
| 363 | 307 | ||
| 364 | -/** | ||
| 365 | - * 日期选择器相关状态 | ||
| 366 | - */ | ||
| 367 | -const idcardBeginDate = ref(new Date()); | ||
| 368 | -const idcardEndDate = ref(new Date()); | ||
| 369 | - | ||
| 370 | -/** | ||
| 371 | - * 日期选择器的最大日期(当前年份后80年) | ||
| 372 | - */ | ||
| 373 | -const currentYear = new Date().getFullYear(); | ||
| 374 | -const maxYearDate = ref(new Date(currentYear + 80, 11, 31)); // 80年后的12月31日 | ||
| 375 | - | ||
| 376 | -/** | ||
| 377 | - * 日期选择器的最小日期(当前年份前80年) | ||
| 378 | - */ | ||
| 379 | -const minYearDate = ref(new Date(currentYear - 80, 0, 1)); // 80年前的1月1日 | ||
| 380 | - | ||
| 381 | // 银行选择器当前选中的值 | 308 | // 银行选择器当前选中的值 |
| 382 | const bankPickerValue = ref([]); | 309 | const bankPickerValue = ref([]); |
| 383 | 310 | ||
| 384 | -// 证件有效期结束类型选择器当前选中的值 | ||
| 385 | -const endDateTypePickerValue = ref([]); | ||
| 386 | - | ||
| 387 | -/** | ||
| 388 | - * 证件有效期结束类型选项 | ||
| 389 | - */ | ||
| 390 | -const endDateTypeOptions = ref([ | ||
| 391 | - { | ||
| 392 | - text: '长期', | ||
| 393 | - value: 'long_term' | ||
| 394 | - }, | ||
| 395 | - { | ||
| 396 | - text: '选择日期', | ||
| 397 | - value: 'select_date' | ||
| 398 | - } | ||
| 399 | -]); | ||
| 400 | - | ||
| 401 | /** | 311 | /** |
| 402 | * 银行列表数据(从接口获取) | 312 | * 银行列表数据(从接口获取) |
| 403 | */ | 313 | */ |
| ... | @@ -434,8 +344,7 @@ const getUserInfo = async () => { | ... | @@ -434,8 +344,7 @@ const getUserInfo = async () => { |
| 434 | if (userInfo.bank_id && userInfo.bank_no) { | 344 | if (userInfo.bank_id && userInfo.bank_no) { |
| 435 | accountInfo.value = { | 345 | accountInfo.value = { |
| 436 | bankName: userInfo.bank_id, // 存储银行ID | 346 | bankName: userInfo.bank_id, // 存储银行ID |
| 437 | - bankAccount: userInfo.bank_no, // 存储银行账号 | 347 | + bankAccount: userInfo.bank_no // 存储银行账号 |
| 438 | - bankImg: userInfo.bank_img || '' // 存储银行卡图片 | ||
| 439 | }; | 348 | }; |
| 440 | } | 349 | } |
| 441 | 350 | ||
| ... | @@ -453,8 +362,6 @@ const getUserInfo = async () => { | ... | @@ -453,8 +362,6 @@ const getUserInfo = async () => { |
| 453 | idCard: userInfo.idcard, | 362 | idCard: userInfo.idcard, |
| 454 | idcard_1_img: userInfo.idcard_1_img || '', | 363 | idcard_1_img: userInfo.idcard_1_img || '', |
| 455 | idcard_2_img: userInfo.idcard_2_img || '', | 364 | idcard_2_img: userInfo.idcard_2_img || '', |
| 456 | - idcard_effect_begin: userInfo.idcard_effect_begin || '', | ||
| 457 | - idcard_effect_end: userInfo.idcard_effect_end || '', | ||
| 458 | // 地址字段(用于显示的中文名称) | 365 | // 地址字段(用于显示的中文名称) |
| 459 | province: areaText.province, | 366 | province: areaText.province, |
| 460 | city: areaText.city, | 367 | city: areaText.city, |
| ... | @@ -626,7 +533,7 @@ const openAccountModal = () => { | ... | @@ -626,7 +533,7 @@ const openAccountModal = () => { |
| 626 | */ | 533 | */ |
| 627 | const closeAccountModal = () => { | 534 | const closeAccountModal = () => { |
| 628 | showAccountModal.value = false; | 535 | showAccountModal.value = false; |
| 629 | - tempAccountInfo.value = { bankName: '', bankAccount: '', bankImg: '' }; | 536 | + tempAccountInfo.value = { bankName: '', bankAccount: '' }; |
| 630 | bankAccountError.value = ''; | 537 | bankAccountError.value = ''; |
| 631 | }; | 538 | }; |
| 632 | 539 | ||
| ... | @@ -646,8 +553,7 @@ const saveAccountInfo = async () => { | ... | @@ -646,8 +553,7 @@ const saveAccountInfo = async () => { |
| 646 | // 调用API保存收款账号信息 | 553 | // 调用API保存收款账号信息 |
| 647 | const result = await updateProfileAPI({ | 554 | const result = await updateProfileAPI({ |
| 648 | bank_id: tempAccountInfo.value.bankName, // 发送银行ID | 555 | bank_id: tempAccountInfo.value.bankName, // 发送银行ID |
| 649 | - bank_no: String(tempAccountInfo.value.bankAccount), // 转换为字符串传给接口 | 556 | + bank_no: String(tempAccountInfo.value.bankAccount) // 转换为字符串传给接口 |
| 650 | - bank_img: tempAccountInfo.value.bankImg // 发送银行卡图片 | ||
| 651 | }); | 557 | }); |
| 652 | 558 | ||
| 653 | if (result.code) { | 559 | if (result.code) { |
| ... | @@ -656,8 +562,7 @@ const saveAccountInfo = async () => { | ... | @@ -656,8 +562,7 @@ const saveAccountInfo = async () => { |
| 656 | // 更新全局用户状态 | 562 | // 更新全局用户状态 |
| 657 | userStore.updateUserInfo({ | 563 | userStore.updateUserInfo({ |
| 658 | bank_id: tempAccountInfo.value.bankName, // 存储银行ID | 564 | bank_id: tempAccountInfo.value.bankName, // 存储银行ID |
| 659 | - bank_no: tempAccountInfo.value.bankAccount, // 保持数字类型存储到全局状态 | 565 | + bank_no: tempAccountInfo.value.bankAccount // 保持数字类型存储到全局状态 |
| 660 | - bank_img: tempAccountInfo.value.bankImg // 存储银行卡图片 | ||
| 661 | }); | 566 | }); |
| 662 | 567 | ||
| 663 | closeAccountModal(); | 568 | closeAccountModal(); |
| ... | @@ -726,8 +631,7 @@ const closeIdentityModal = () => { | ... | @@ -726,8 +631,7 @@ const closeIdentityModal = () => { |
| 726 | idCard: '', | 631 | idCard: '', |
| 727 | idcard_1_img: '', | 632 | idcard_1_img: '', |
| 728 | idcard_2_img: '', | 633 | idcard_2_img: '', |
| 729 | - idcard_effect_begin: '', | 634 | + // idcard_effect_begin和idcard_effect_end字段已移除 |
| 730 | - idcard_effect_end: '', | ||
| 731 | province: '', | 635 | province: '', |
| 732 | city: '', | 636 | city: '', |
| 733 | county: '', | 637 | county: '', |
| ... | @@ -739,110 +643,9 @@ const closeIdentityModal = () => { | ... | @@ -739,110 +643,9 @@ const closeIdentityModal = () => { |
| 739 | idCardError.value = ''; | 643 | idCardError.value = ''; |
| 740 | }; | 644 | }; |
| 741 | 645 | ||
| 742 | -/** | 646 | +// 银行卡图片上传相关函数已完全移除 |
| 743 | - * 上传银行卡正面照 | ||
| 744 | - */ | ||
| 745 | -const changeBankImg = () => { | ||
| 746 | - Taro.chooseImage({ | ||
| 747 | - count: 1, | ||
| 748 | - sizeType: ['compressed'], | ||
| 749 | - sourceType: ['album', 'camera'], | ||
| 750 | - success: function (res) { | ||
| 751 | - const tempFilePath = res.tempFilePaths[0] | ||
| 752 | - uploadBankImage(tempFilePath) | ||
| 753 | - }, | ||
| 754 | - fail: function () { | ||
| 755 | - Taro.showToast({ | ||
| 756 | - title: '选择图片失败', | ||
| 757 | - icon: 'none' | ||
| 758 | - }) | ||
| 759 | - } | ||
| 760 | - }) | ||
| 761 | -} | ||
| 762 | - | ||
| 763 | -/** | ||
| 764 | - * 上传银行卡图片到服务器 | ||
| 765 | - * @param {String} filePath - 图片文件路径 | ||
| 766 | - */ | ||
| 767 | -const uploadBankImage = (filePath) => { | ||
| 768 | - // 显示上传中提示 | ||
| 769 | - Taro.showLoading({ | ||
| 770 | - title: '上传中', | ||
| 771 | - mask: true | ||
| 772 | - }) | ||
| 773 | - | ||
| 774 | - // 上传图片 | ||
| 775 | - wx.uploadFile({ | ||
| 776 | - url: BASE_URL + '/admin/?m=srv&a=upload', | ||
| 777 | - filePath, | ||
| 778 | - name: 'file', | ||
| 779 | - header: { | ||
| 780 | - 'content-type': 'multipart/form-data', | ||
| 781 | - }, | ||
| 782 | - success: function (res) { | ||
| 783 | - let upload_data = JSON.parse(res.data); | ||
| 784 | - Taro.hideLoading({ | ||
| 785 | - success: () => { | ||
| 786 | - if (res.statusCode === 200) { | ||
| 787 | - tempAccountInfo.value.bankImg = upload_data.data.src; | ||
| 788 | - Taro.showToast({ | ||
| 789 | - title: '上传成功', | ||
| 790 | - icon: 'success' | ||
| 791 | - }) | ||
| 792 | - } else { | ||
| 793 | - Taro.showToast({ | ||
| 794 | - icon: 'error', | ||
| 795 | - title: '服务器错误,稍后重试!', | ||
| 796 | - mask: true | ||
| 797 | - }) | ||
| 798 | - } | ||
| 799 | - }, | ||
| 800 | - }); | ||
| 801 | - }, | ||
| 802 | - fail: function (res) { | ||
| 803 | - Taro.hideLoading({ | ||
| 804 | - success: () => { | ||
| 805 | - Taro.showToast({ | ||
| 806 | - icon: 'error', | ||
| 807 | - title: '上传失败,稍后重试!', | ||
| 808 | - mask: true | ||
| 809 | - }) | ||
| 810 | - }, | ||
| 811 | - }); | ||
| 812 | - } | ||
| 813 | - }) | ||
| 814 | -} | ||
| 815 | - | ||
| 816 | -/** | ||
| 817 | - * 预览银行卡图片 | ||
| 818 | - */ | ||
| 819 | -const previewBankImg = () => { | ||
| 820 | - if (tempAccountInfo.value.bankImg) { | ||
| 821 | - Taro.previewImage({ | ||
| 822 | - urls: [tempAccountInfo.value.bankImg], | ||
| 823 | - current: tempAccountInfo.value.bankImg | ||
| 824 | - }) | ||
| 825 | - } | ||
| 826 | -} | ||
| 827 | 647 | ||
| 828 | -/** | 648 | +// 银行卡图片预览和删除功能已移除 |
| 829 | - * 删除银行卡图片 | ||
| 830 | - */ | ||
| 831 | -const deleteBankImg = () => { | ||
| 832 | - Taro.showModal({ | ||
| 833 | - title: '确认删除', | ||
| 834 | - content: '确定要删除银行卡照片吗?', | ||
| 835 | - success: function (res) { | ||
| 836 | - if (res.confirm) { | ||
| 837 | - tempAccountInfo.value.bankImg = '' | ||
| 838 | - Taro.showToast({ | ||
| 839 | - title: '删除成功', | ||
| 840 | - icon: 'success' | ||
| 841 | - }) | ||
| 842 | - } | ||
| 843 | - } | ||
| 844 | - }) | ||
| 845 | -} | ||
| 846 | 649 | ||
| 847 | /** | 650 | /** |
| 848 | * 选择身份证人像面照片 | 651 | * 选择身份证人像面照片 |
| ... | @@ -1020,49 +823,7 @@ const showIdcardEndDatePicker = () => { | ... | @@ -1020,49 +823,7 @@ const showIdcardEndDatePicker = () => { |
| 1020 | showEndDateTypeModal.value = true | 823 | showEndDateTypeModal.value = true |
| 1021 | } | 824 | } |
| 1022 | 825 | ||
| 1023 | -/** | 826 | +// 证件有效期相关的日期选择器确认函数已移除 |
| 1024 | - * 确认选择身份证有效期开始日期 | ||
| 1025 | - * @param {Object} param - 日期选择器返回的参数 | ||
| 1026 | - */ | ||
| 1027 | -const onIdcardBeginDateConfirm = (param) => { | ||
| 1028 | - const { selectedValue } = param | ||
| 1029 | - const year = selectedValue[0] | ||
| 1030 | - const month = selectedValue[1].toString().padStart(2, '0') | ||
| 1031 | - const day = selectedValue[2].toString().padStart(2, '0') | ||
| 1032 | - tempIdentityInfo.value.idcard_effect_begin = `${year}-${month}-${day}` | ||
| 1033 | - showIdcardBeginDate.value = false | ||
| 1034 | -} | ||
| 1035 | - | ||
| 1036 | -/** | ||
| 1037 | - * 证件有效期结束类型选择确认回调 | ||
| 1038 | - * @param {Object} param - 选择器返回的参数 | ||
| 1039 | - */ | ||
| 1040 | -const onEndDateTypeConfirm = ({ selectedValue }) => { | ||
| 1041 | - const selectedType = selectedValue[0]; | ||
| 1042 | - | ||
| 1043 | - if (selectedType === 'long_term') { | ||
| 1044 | - // 选择长期,直接设置为"长期" | ||
| 1045 | - tempIdentityInfo.value.idcard_effect_end = '长期'; | ||
| 1046 | - showEndDateTypeModal.value = false; | ||
| 1047 | - } else if (selectedType === 'select_date') { | ||
| 1048 | - // 选择日期,打开日期选择器 | ||
| 1049 | - showEndDateTypeModal.value = false; | ||
| 1050 | - showIdcardEndDate.value = true; | ||
| 1051 | - } | ||
| 1052 | -}; | ||
| 1053 | - | ||
| 1054 | -/** | ||
| 1055 | - * 确认选择身份证有效期结束日期 | ||
| 1056 | - * @param {Object} param - 日期选择器返回的参数 | ||
| 1057 | - */ | ||
| 1058 | -const onIdcardEndDateConfirm = (param) => { | ||
| 1059 | - const { selectedValue } = param | ||
| 1060 | - const year = selectedValue[0] | ||
| 1061 | - const month = selectedValue[1].toString().padStart(2, '0') | ||
| 1062 | - const day = selectedValue[2].toString().padStart(2, '0') | ||
| 1063 | - tempIdentityInfo.value.idcard_effect_end = `${year}-${month}-${day}` | ||
| 1064 | - showIdcardEndDate.value = false | ||
| 1065 | -} | ||
| 1066 | 827 | ||
| 1067 | /** | 828 | /** |
| 1068 | * 保存身份信息 | 829 | * 保存身份信息 |
| ... | @@ -1092,8 +853,6 @@ const saveIdentityInfo = async () => { | ... | @@ -1092,8 +853,6 @@ const saveIdentityInfo = async () => { |
| 1092 | idcard: tempIdentityInfo.value.idCard, | 853 | idcard: tempIdentityInfo.value.idCard, |
| 1093 | idcard_1_img: tempIdentityInfo.value.idcard_1_img, | 854 | idcard_1_img: tempIdentityInfo.value.idcard_1_img, |
| 1094 | idcard_2_img: tempIdentityInfo.value.idcard_2_img, | 855 | idcard_2_img: tempIdentityInfo.value.idcard_2_img, |
| 1095 | - idcard_effect_begin: tempIdentityInfo.value.idcard_effect_begin, | ||
| 1096 | - idcard_effect_end: tempIdentityInfo.value.idcard_effect_end, | ||
| 1097 | // 使用真实的身份证地址字段名 | 856 | // 使用真实的身份证地址字段名 |
| 1098 | idcard_province: tempIdentityInfo.value.idcard_province, | 857 | idcard_province: tempIdentityInfo.value.idcard_province, |
| 1099 | idcard_city: tempIdentityInfo.value.idcard_city, | 858 | idcard_city: tempIdentityInfo.value.idcard_city, |
| ... | @@ -1110,8 +869,6 @@ const saveIdentityInfo = async () => { | ... | @@ -1110,8 +869,6 @@ const saveIdentityInfo = async () => { |
| 1110 | idcard: tempIdentityInfo.value.idCard, | 869 | idcard: tempIdentityInfo.value.idCard, |
| 1111 | idcard_1_img: tempIdentityInfo.value.idcard_1_img, | 870 | idcard_1_img: tempIdentityInfo.value.idcard_1_img, |
| 1112 | idcard_2_img: tempIdentityInfo.value.idcard_2_img, | 871 | idcard_2_img: tempIdentityInfo.value.idcard_2_img, |
| 1113 | - idcard_effect_begin: tempIdentityInfo.value.idcard_effect_begin, | ||
| 1114 | - idcard_effect_end: tempIdentityInfo.value.idcard_effect_end, | ||
| 1115 | // 身份证地址字段 | 872 | // 身份证地址字段 |
| 1116 | idcard_province: tempIdentityInfo.value.idcard_province, | 873 | idcard_province: tempIdentityInfo.value.idcard_province, |
| 1117 | idcard_city: tempIdentityInfo.value.idcard_city, | 874 | idcard_city: tempIdentityInfo.value.idcard_city, | ... | ... |
| ... | @@ -1165,7 +1165,7 @@ const checkUserPermission = async () => { | ... | @@ -1165,7 +1165,7 @@ const checkUserPermission = async () => { |
| 1165 | Taro.redirectTo({ | 1165 | Taro.redirectTo({ |
| 1166 | url: '/pages/register/index?target=sell' | 1166 | url: '/pages/register/index?target=sell' |
| 1167 | }) | 1167 | }) |
| 1168 | - } else if (permissionResult.missingFields.includes('name') || permissionResult.missingFields.includes('bank_id') || permissionResult.missingFields.includes('bank_no') || permissionResult.missingFields.includes('idcard') || permissionResult.missingFields.includes('bank_img') || permissionResult.missingFields.includes('idcard_1_img') || permissionResult.missingFields.includes('idcard_2_img') || permissionResult.missingFields.includes('idcard_effect_begin') || permissionResult.missingFields.includes('idcard_effect_end') || permissionResult.missingFields.includes('idcard_address')) { | 1168 | + } else if (permissionResult.missingFields.includes('name') || permissionResult.missingFields.includes('bank_id') || permissionResult.missingFields.includes('bank_no') || permissionResult.missingFields.includes('idcard') || permissionResult.missingFields.includes('idcard_1_img') || permissionResult.missingFields.includes('idcard_2_img') || permissionResult.missingFields.includes('idcard_address')) { |
| 1169 | // 收款信息未填写 | 1169 | // 收款信息未填写 |
| 1170 | Taro.redirectTo({ | 1170 | Taro.redirectTo({ |
| 1171 | url: '/pages/collectionSettings/index?target=sell' | 1171 | url: '/pages/collectionSettings/index?target=sell' | ... | ... |
| ... | @@ -29,11 +29,8 @@ export const useUserStore = defineStore('user', { | ... | @@ -29,11 +29,8 @@ export const useUserStore = defineStore('user', { |
| 29 | bank_no: '', | 29 | bank_no: '', |
| 30 | idcard: '', | 30 | idcard: '', |
| 31 | is_signed: false, | 31 | is_signed: false, |
| 32 | - bank_img: '', | ||
| 33 | idcard_1_img: '', | 32 | idcard_1_img: '', |
| 34 | idcard_2_img: '', | 33 | idcard_2_img: '', |
| 35 | - idcard_effect_begin: '', | ||
| 36 | - idcard_effect_end: '', | ||
| 37 | // 身份证地址字段 | 34 | // 身份证地址字段 |
| 38 | idcard_province: '', | 35 | idcard_province: '', |
| 39 | idcard_city: '', | 36 | idcard_city: '', |
| ... | @@ -61,7 +58,6 @@ export const useUserStore = defineStore('user', { | ... | @@ -61,7 +58,6 @@ export const useUserStore = defineStore('user', { |
| 61 | return !!( | 58 | return !!( |
| 62 | state.userInfo.bank_id && | 59 | state.userInfo.bank_id && |
| 63 | state.userInfo.bank_no && | 60 | state.userInfo.bank_no && |
| 64 | - state.userInfo.bank_img && | ||
| 65 | state.userInfo.idcard_1_img && | 61 | state.userInfo.idcard_1_img && |
| 66 | state.userInfo.idcard_2_img && | 62 | state.userInfo.idcard_2_img && |
| 67 | state.userInfo.name && | 63 | state.userInfo.name && |
| ... | @@ -69,9 +65,7 @@ export const useUserStore = defineStore('user', { | ... | @@ -69,9 +65,7 @@ export const useUserStore = defineStore('user', { |
| 69 | state.userInfo.idcard_province && | 65 | state.userInfo.idcard_province && |
| 70 | state.userInfo.idcard_city && | 66 | state.userInfo.idcard_city && |
| 71 | state.userInfo.idcard_district && | 67 | state.userInfo.idcard_district && |
| 72 | - state.userInfo.idcard_address && | 68 | + state.userInfo.idcard_address |
| 73 | - state.userInfo.idcard_effect_begin && | ||
| 74 | - state.userInfo.idcard_effect_end | ||
| 75 | ) | 69 | ) |
| 76 | }, | 70 | }, |
| 77 | 71 | ||
| ... | @@ -144,11 +138,8 @@ export const useUserStore = defineStore('user', { | ... | @@ -144,11 +138,8 @@ export const useUserStore = defineStore('user', { |
| 144 | bank_no: '', | 138 | bank_no: '', |
| 145 | idcard: '', | 139 | idcard: '', |
| 146 | is_signed: false, | 140 | is_signed: false, |
| 147 | - bank_img: '', | ||
| 148 | idcard_1_img: '', | 141 | idcard_1_img: '', |
| 149 | idcard_2_img: '', | 142 | idcard_2_img: '', |
| 150 | - idcard_effect_begin: '', | ||
| 151 | - idcard_effect_end: '', | ||
| 152 | // 身份证地址字段 | 143 | // 身份证地址字段 |
| 153 | idcard_province: '', | 144 | idcard_province: '', |
| 154 | idcard_city: '', | 145 | idcard_city: '', | ... | ... |
| 1 | /* | 1 | /* |
| 2 | * @Date: 2022-09-19 14:11:06 | 2 | * @Date: 2022-09-19 14:11:06 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-08-12 09:21:10 | 4 | + * @LastEditTime: 2025-08-12 15:09:48 |
| 5 | * @FilePath: /jgdl/src/utils/config.js | 5 | * @FilePath: /jgdl/src/utils/config.js |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | */ | 7 | */ |
| 8 | // TAG:服务器环境配置 | 8 | // TAG:服务器环境配置 |
| 9 | -// const BASE_URL = "https://oa-dev.onwall.cn"; // 测试服务器 | 9 | +const BASE_URL = "https://oa-dev.onwall.cn"; // 测试服务器 |
| 10 | -const BASE_URL = "https://oa.onwall.cn"; // 正式服务器 | 10 | +// const BASE_URL = "https://jiangedianlv.onwall.cn"; // 正式服务器 |
| 11 | 11 | ||
| 12 | export default BASE_URL | 12 | export default BASE_URL |
| 13 | 13 | ... | ... |
| ... | @@ -40,7 +40,7 @@ const PERMISSION_CONFIG = { | ... | @@ -40,7 +40,7 @@ const PERMISSION_CONFIG = { |
| 40 | [PERMISSION_TYPES.SELL_CAR]: { | 40 | [PERMISSION_TYPES.SELL_CAR]: { |
| 41 | message: '发布车源需要先完善个人信息', | 41 | message: '发布车源需要先完善个人信息', |
| 42 | redirectUrl: '/pages/register/index', | 42 | redirectUrl: '/pages/register/index', |
| 43 | - checkFields: ['phone', 'name', 'bank_id', 'bank_no', 'idcard', 'bank_img', 'idcard_1_img', 'idcard_2_img', 'idcard_effect_begin', 'idcard_effect_end', 'idcard_address'] | 43 | + checkFields: ['phone', 'name', 'bank_id', 'bank_no', 'idcard', 'idcard_1_img', 'idcard_2_img', 'idcard_address'] |
| 44 | }, | 44 | }, |
| 45 | [PERMISSION_TYPES.BUY_CAR]: { | 45 | [PERMISSION_TYPES.BUY_CAR]: { |
| 46 | message: '购买车辆需要先完善个人信息', | 46 | message: '购买车辆需要先完善个人信息', | ... | ... |
-
Please register or login to post a comment