Merge branch 'mrr_sj_develop_hjy_20260520_商家改版' of https://gitee.com/qtvbidt/mrr.sj.front into mrr_sj_develop_hjy_20260520_商家改版
This commit is contained in:
commit
0a8e130c33
|
|
@ -47,14 +47,17 @@
|
|||
<image
|
||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/338d957b-cbb6-409b-9e7a-ef5faa0f9b70.png"
|
||||
mode="widthFix"
|
||||
style="width:26rpx;margin-top: 26rpx;position: relative;top: 4rpx;left: -10rpx;">
|
||||
style="width:26rpx;margin-top: 26rpx;position: relative;top: 4rpx;left: -10rpx;"
|
||||
v-if="!userInfo.business_time">
|
||||
</image>
|
||||
<text style="margin-right: 16rpx; color: #ec5d57;">待完善</text>
|
||||
<text style="margin-right: 16rpx;"
|
||||
:style="{ color: userInfo.business_time ? '#c9c9c9' : '#ec5d57' }">
|
||||
{{ userInfo.business_time ? '已设置' : '待完善' }}
|
||||
</text>
|
||||
<image class="arrow-right" src="/static/images/arrow_right.png" mode="aspectFit">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 服务技能 -->
|
||||
<view class="info-item" @click="navigateToServiceSkill">
|
||||
<view class="info-left">
|
||||
<image class="item-icon"
|
||||
|
|
@ -66,9 +69,14 @@
|
|||
<image
|
||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/338d957b-cbb6-409b-9e7a-ef5faa0f9b70.png"
|
||||
mode="widthFix"
|
||||
style="width:26rpx;margin-top: 26rpx;position: relative;top: 4rpx;left: -10rpx;">
|
||||
style="width:26rpx;margin-top: 26rpx;position: relative;top: 4rpx;left: -10rpx;"
|
||||
v-if="!userInfo.servers_kill_arr || userInfo.servers_kill_arr.length === 0">
|
||||
</image>
|
||||
<text style="margin-right: 16rpx; color: #389930;">已认证</text>
|
||||
<text style="margin-right: 16rpx;"
|
||||
:style="{ color: (userInfo.servers_kill_arr && userInfo.servers_kill_arr.length > 0) ? '#333333' : '#ec5d57' }">
|
||||
{{ (userInfo.servers_kill_arr && userInfo.servers_kill_arr.length > 0) ? '已设置' :
|
||||
'待完善' }}
|
||||
</text>
|
||||
<image class="arrow-right" src="/static/images/arrow_right.png" mode="aspectFit">
|
||||
</image>
|
||||
</view>
|
||||
|
|
@ -153,9 +161,14 @@
|
|||
<image
|
||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/338d957b-cbb6-409b-9e7a-ef5faa0f9b70.png"
|
||||
mode="widthFix"
|
||||
style="width:26rpx;margin-top: 26rpx;position: relative;top: 4rpx;left: -10rpx;">
|
||||
style="width:26rpx;margin-top: 26rpx;position: relative;top: 4rpx;left: -10rpx;"
|
||||
v-if="userInfo.credentials_state === 0">
|
||||
</image>
|
||||
<text style="margin-right: 16rpx; color: #e59e45;">审核中</text>
|
||||
<text style="margin-right: 16rpx;"
|
||||
:style="{ color: userInfo.credentials_state === 0 ? '#ec5d57' : userInfo.credentials_state === 1 ? '#e59e45' : '#c9c9c9' }">
|
||||
{{ userInfo.credentials_state === 0 ? '待完善' : userInfo.credentials_state === 1 ? '审核中' :
|
||||
'已认证' }}
|
||||
</text>
|
||||
<image class="arrow-right" src="/static/images/arrow_right.png" mode="aspectFit">
|
||||
</image>
|
||||
</view>
|
||||
|
|
@ -475,7 +488,7 @@
|
|||
console.log('调用接口获取用户信息,type:', type)
|
||||
|
||||
// 调用接口获取用户信息
|
||||
const result = await request.post('/user/getuser', {
|
||||
const result = await request.post('/sj/user/getUser', {
|
||||
type
|
||||
})
|
||||
|
||||
|
|
@ -494,6 +507,7 @@
|
|||
|
||||
// 降级方案:尝试从其他可能的位置获取用户ID
|
||||
this.tryAlternativeUserInfo()
|
||||
uni.hideLoading();
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -617,15 +631,15 @@
|
|||
},
|
||||
|
||||
navigateToQualification() { // 商家手艺人:资质信息
|
||||
if (this.identity == '2') {
|
||||
if (this.userInfo.credentials_state == '1') {
|
||||
// 商家跳转到资质信息页面
|
||||
uni.navigateTo({
|
||||
url: '/pages/shop/qualification_sj_change'
|
||||
url: '/pages/ruzhu/ruzhu?type=1'
|
||||
})
|
||||
} else {
|
||||
// 手艺人跳转到资质信息页面
|
||||
uni.navigateTo({
|
||||
url: '/pages/artisan/qualification_syr_change'
|
||||
url: '/pages/shop/qualification_sj_change'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -177,13 +177,13 @@ export default {
|
|||
title: "店铺装修",
|
||||
url: "https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/4b558456-2e38-4185-8713-d1f0e6645820.png",
|
||||
// https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e6e72039-eec4-414c-8a86-aad404602962.png
|
||||
path: "/pages/shop/staff/distribution-service",
|
||||
path: "/pages/shop/qualification_sj_change",
|
||||
go_id_type: 1,
|
||||
},
|
||||
{
|
||||
title: "财务管理",
|
||||
url: "https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/edafae37-8258-4e1c-9dcc-019484117047.png",
|
||||
path: "/pages/shop/staff/distribution-service",
|
||||
path: "/pages/wallet/wallet",
|
||||
go_id_type: 1,
|
||||
},
|
||||
],
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -10,9 +10,8 @@
|
|||
<view class="form-item-one box-cont">
|
||||
<text class="label required">资质照片</text>
|
||||
<text class="upload-desc">请保证照片上的文字清晰、无遮挡、证件边角可见</text>
|
||||
<view class="" @click="chooseImage('business_license')">
|
||||
<image v-if="formData.business_license" :src="formData.business_license" mode="aspectFill"
|
||||
class="upload-preview"></image>
|
||||
<view class="" @click="chooseImage('uscc_photo')">
|
||||
<image v-if="formData.uscc_photo" :src="formData.uscc_photo" mode="aspectFill" class="upload-preview"></image>
|
||||
<view class="" v-else>
|
||||
<image
|
||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/fa75ea1c-8f9d-4b2a-8d0c-b94de516afd0.png"
|
||||
|
|
@ -24,88 +23,48 @@
|
|||
|
||||
<view class="form-item-two box-cont">
|
||||
<text class="label required">商户类型</text>
|
||||
<input type="text" v-model="formData.household_type" placeholder="请输入商户类型" placeholder-class="placeholder"
|
||||
class="input" @input="saveFormDataToLocalDebounce" />
|
||||
<input type="text" v-model="formData.uscc_type" placeholder="请输入商户类型" placeholder-class="placeholder"
|
||||
class="input" />
|
||||
</view>
|
||||
|
||||
<view class="form-item-two box-cont">
|
||||
<text class="label required">证件号码</text>
|
||||
<view class="picker-content">
|
||||
<input type="text" v-model="formData.license_number" placeholder="请输入营业执照的证件号码"
|
||||
placeholder-class="placeholder" class="input" @input="saveFormDataToLocalDebounce" />
|
||||
<input type="text" v-model="formData.uscc_num" placeholder="请输入营业执照的证件号码" placeholder-class="placeholder"
|
||||
class="input" />
|
||||
<image class="label-icon"
|
||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/25bd7f38-1a3e-4282-84ea-190d7f820108"
|
||||
mode="aspectFit" @click.stop="showTipPopup('license_number')"></image>
|
||||
mode="aspectFit" @click.stop="showTipPopup('uscc_num')"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-item-two box-cont">
|
||||
<text class="label required">营业名称</text>
|
||||
<input type="text" v-model="formData.business_name" placeholder="请输入营业执照的企业名称" placeholder-class="placeholder"
|
||||
class="input" @input="saveFormDataToLocalDebounce" />
|
||||
<input type="text" v-model="formData.uscc_name" placeholder="请输入营业执照的企业名称" placeholder-class="placeholder"
|
||||
class="input" />
|
||||
</view>
|
||||
|
||||
<view class="form-item-two box-cont" @click="showRegionPicker">
|
||||
<text class="label required">注册地区</text>
|
||||
<view class="picker-content">
|
||||
<text :class="formData.register_region ? 'picker-value' : 'placeholder1'">
|
||||
{{ formData.register_region || '请选择' }}
|
||||
<text :class="formData.uscc_dependency ? 'picker-value' : 'placeholder1'">
|
||||
{{ formData.uscc_dependency || '请选择' }}
|
||||
</text>
|
||||
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/dccc4513-377c-4bfa-9fd2-a5cfdb9798f3"
|
||||
class="arrow-right" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-item-two box-cont">
|
||||
<view class="form-item-two box-cont" @click="getAddressInfo">
|
||||
<text class="label required">注册详细地址</text>
|
||||
<view class="picker-content">
|
||||
<input type="text" v-model="formData.register_address" placeholder="请输入注册地址" placeholder-class="placeholder"
|
||||
class="input" @input="saveFormDataToLocalDebounce" />
|
||||
<text :class="formData.uscc_address ? 'picker-value' : 'placeholder'">
|
||||
{{ formData.uscc_address || '请选择' }}
|
||||
</text>
|
||||
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/dccc4513-377c-4bfa-9fd2-a5cfdb9798f3"
|
||||
class="arrow-right" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item-column box-cont">
|
||||
<text class="label required">营业执照有效期至:</text>
|
||||
<view class="radio-group">
|
||||
<view class="radio-item" @click="setIdcardExpiryType('permanent')">
|
||||
<view class="radio" :class="{ checked: formData.legal_idcard_expiry_type === 'permanent' }">
|
||||
<image v-if="formData.legal_idcard_expiry_type === 'permanent'"
|
||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/cb185ec8-9d30-4e53-b5dc-14b546013a60"
|
||||
class="radio-icon-image" mode="aspectFit"></image>
|
||||
</view>
|
||||
<text class="radio-label">永久有效</text>
|
||||
</view>
|
||||
<view class="radio-item" @click="setIdcardExpiryType('date')">
|
||||
<view class="radio" :class="{ checked: formData.legal_idcard_expiry_type === 'date' }">
|
||||
<image v-if="formData.legal_idcard_expiry_type === 'date'"
|
||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/cb185ec8-9d30-4e53-b5dc-14b546013a60"
|
||||
class="radio-icon-image" mode="aspectFit"></image>
|
||||
</view>
|
||||
<text class="radio-label">指定日期有效</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="date-row box-cont">
|
||||
<view class="date-col" @click="showDatePicker('start')">
|
||||
<text class="date-label">开始日期</text>
|
||||
<view class="date-input-box">
|
||||
<text :class="formData.idcard_start_date ? 'date-value' : 'date-placeholder'">
|
||||
{{ formData.idcard_start_date || '选择日期' }}
|
||||
</text>
|
||||
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/5b01823b-7672-4e60-b6cc-a4de52294605.png"
|
||||
class="date-icon" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="date-col" @click="showDatePicker('end')">
|
||||
<text class="date-label">结束日期</text>
|
||||
<view class="date-input-box">
|
||||
<text :class="formData.idcard_end_date ? 'date-value' : 'date-placeholder'">
|
||||
{{ formData.idcard_end_date || '选择日期' }}
|
||||
</text>
|
||||
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/5b01823b-7672-4e60-b6cc-a4de52294605.png"
|
||||
class="date-icon" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
|
|
@ -117,8 +76,9 @@
|
|||
<view class="form-item-one box-cont">
|
||||
<text class="label required">身份证照片</text>
|
||||
<text class="upload-desc">请保证照片上的文字清晰、无遮挡、证件边角可见</text>
|
||||
<view class="upload-area" @click="chooseImage('id_card_front')">
|
||||
<image v-if="formData.id_card_front" :src="formData.id_card_front" mode="aspectFill" class="upload-preview">
|
||||
<view class="upload-area" @click="chooseImage('legal_idcard_positive')">
|
||||
<image v-if="formData.legal_idcard_positive" :src="formData.legal_idcard_positive" mode="aspectFill"
|
||||
class="upload-preview">
|
||||
</image>
|
||||
<view class="" v-else>
|
||||
<image
|
||||
|
|
@ -127,8 +87,9 @@
|
|||
</view>
|
||||
<text class="placeholder1 required">请上传身份证正面(人像面)</text>
|
||||
</view>
|
||||
<view class="upload-area" @click="chooseImage('id_card_back')" style="margin-top: 48rpx;">
|
||||
<image v-if="formData.id_card_back" :src="formData.id_card_back" mode="aspectFill" class="upload-preview">
|
||||
<view class="upload-area" @click="chooseImage('legal_idcard_negative')" style="margin-top: 48rpx;">
|
||||
<image v-if="formData.legal_idcard_negative" :src="formData.legal_idcard_negative" mode="aspectFill"
|
||||
class="upload-preview">
|
||||
</image>
|
||||
<view class="" v-else>
|
||||
<image
|
||||
|
|
@ -141,36 +102,36 @@
|
|||
|
||||
<view class="form-item-two box-cont">
|
||||
<text class="label required">法人代表</text>
|
||||
<input type="text" v-model="formData.legal_person" placeholder="请输入营业执照的法人代表" placeholder-class="placeholder"
|
||||
class="input" @input="saveFormDataToLocalDebounce" />
|
||||
<input type="text" v-model="formData.legal_name" placeholder="请输入营业执照的法人代表" placeholder-class="placeholder"
|
||||
class="input" />
|
||||
</view>
|
||||
|
||||
<view class="form-item-two box-cont">
|
||||
<text class="label required">法人联系方式</text>
|
||||
<input type="number" v-model="formData.legal_phone" placeholder="请输入法人的联系方式" placeholder-class="placeholder"
|
||||
class="input" @input="saveFormDataToLocalDebounce" />
|
||||
class="input" />
|
||||
</view>
|
||||
|
||||
<view class="form-item-two box-cont">
|
||||
<text class="label required">法人身份证号</text>
|
||||
<input type="text" v-model="formData.legal_id_number" placeholder="请输入法人的身份证号码" placeholder-class="placeholder"
|
||||
class="input" @input="saveFormDataToLocalDebounce" />
|
||||
<input type="text" v-model="formData.legal_idcard_num" placeholder="请输入法人的身份证号码" placeholder-class="placeholder"
|
||||
class="input" />
|
||||
</view>
|
||||
|
||||
<view class="form-item-column box-cont">
|
||||
<text class="label required">营业执照有效期至:</text>
|
||||
<text class="label required">身份证有效期:</text>
|
||||
<view class="radio-group">
|
||||
<view class="radio-item" @click="setIdcardExpiryType('permanent')">
|
||||
<view class="radio" :class="{ checked: formData.legal_idcard_expiry_type === 'permanent' }">
|
||||
<image v-if="formData.legal_idcard_expiry_type === 'permanent'"
|
||||
<view class="radio-item" @click="setIdcardExpiryType('1')">
|
||||
<view class="radio" :class="{ checked: formData.legal_idcard_expiry_type === '1' }">
|
||||
<image v-if="formData.legal_idcard_expiry_type === '1'"
|
||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/cb185ec8-9d30-4e53-b5dc-14b546013a60"
|
||||
class="radio-icon-image" mode="aspectFit"></image>
|
||||
</view>
|
||||
<text class="radio-label">永久有效</text>
|
||||
</view>
|
||||
<view class="radio-item" @click="setIdcardExpiryType('date')">
|
||||
<view class="radio" :class="{ checked: formData.legal_idcard_expiry_type === 'date' }">
|
||||
<image v-if="formData.legal_idcard_expiry_type === 'date'"
|
||||
<view class="radio-item" @click="setIdcardExpiryType('2')">
|
||||
<view class="radio" :class="{ checked: formData.legal_idcard_expiry_type === '2' }">
|
||||
<image v-if="formData.legal_idcard_expiry_type === '2'"
|
||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/cb185ec8-9d30-4e53-b5dc-14b546013a60"
|
||||
class="radio-icon-image" mode="aspectFit"></image>
|
||||
</view>
|
||||
|
|
@ -182,20 +143,22 @@
|
|||
<view class="date-col" @click="showDatePicker('start')">
|
||||
<text class="date-label">开始日期</text>
|
||||
<view class="date-input-box">
|
||||
<text :class="formData.idcard_start_date ? 'date-value' : 'date-placeholder'">
|
||||
{{ formData.idcard_start_date || '选择日期' }}
|
||||
<text :class="formData.legal_idcard_expiry_start ? 'date-value' : 'date-placeholder'">
|
||||
{{ formData.legal_idcard_expiry_start || '选择日期' }}
|
||||
</text>
|
||||
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/5b01823b-7672-4e60-b6cc-a4de52294605.png"
|
||||
<image
|
||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/5b01823b-7672-4e60-b6cc-a4de52294605.png"
|
||||
class="date-icon" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="date-col" @click="showDatePicker('end')">
|
||||
<text class="date-label">结束日期</text>
|
||||
<view class="date-input-box">
|
||||
<text :class="formData.idcard_end_date ? 'date-value' : 'date-placeholder'">
|
||||
{{ formData.idcard_end_date || '选择日期' }}
|
||||
<text :class="formData.legal_idcard_expiry_end ? 'date-value' : 'date-placeholder'">
|
||||
{{ formData.legal_idcard_expiry_end || '选择日期' }}
|
||||
</text>
|
||||
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/5b01823b-7672-4e60-b6cc-a4de52294605.png"
|
||||
<image
|
||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/5b01823b-7672-4e60-b6cc-a4de52294605.png"
|
||||
class="date-icon" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -212,30 +175,34 @@
|
|||
<view class="form-item-one box-cont">
|
||||
<text class="label required">行业资质</text>
|
||||
<view class="image-list">
|
||||
<view class="image-item" v-for="(img, index) in formData.industry_qualifications" :key="'industry-' + index">
|
||||
<view class="image-item" v-for="(img, index) in formData.qualifications_sector" :key="'industry-' + index">
|
||||
<image :src="img" mode="aspectFill" class="qualification-image"></image>
|
||||
<view class="image-delete" @click="removeImage('industry_qualifications', index)">×</view>
|
||||
<view class="image-delete" @click="removeImage('qualifications_sector', index)">×</view>
|
||||
</view>
|
||||
<view class="image-add" @click="chooseMultiImage('industry_qualifications')"
|
||||
v-if="formData.industry_qualifications.length < 9">
|
||||
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/0d4af728-c7bf-447d-85b2-e7c682471b86.png" mode="aspectFit" class="upload-icon-small"></image>
|
||||
<view class="image-add" @click="chooseMultiImage('qualifications_sector')"
|
||||
v-if="(formData.qualifications_sector || []).length < 9">
|
||||
<image
|
||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/0d4af728-c7bf-447d-85b2-e7c682471b86.png"
|
||||
mode="aspectFit" class="upload-icon-small"></image>
|
||||
<text class="add-text">添加照片</text>
|
||||
</view>
|
||||
</view>
|
||||
<text class="label" style="margin-top: 30rpx;">其他资质</text>
|
||||
<view class="image-list">
|
||||
<view class="image-item" v-for="(img, index) in formData.other_qualifications" :key="'other-' + index">
|
||||
<image :src="img" mode="aspectFill" class="qualification-image"></image>
|
||||
<view class="image-delete" @click="removeImage('other_qualifications', index)">×</view>
|
||||
</view>
|
||||
<view class="image-add" @click="chooseMultiImage('other_qualifications')"
|
||||
v-if="formData.other_qualifications.length < 9">
|
||||
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/0d4af728-c7bf-447d-85b2-e7c682471b86.png" mode="aspectFit" class="upload-icon-small"></image>
|
||||
<text class="add-text">添加照片</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<text class="label" style="margin-top: 30rpx;">其他资质</text>
|
||||
<view class="image-list">
|
||||
<view class="image-item" v-for="(img, index) in formData.qualifications_other" :key="'other-' + index">
|
||||
<image :src="img" mode="aspectFill" class="qualification-image"></image>
|
||||
<view class="image-delete" @click="removeImage('qualifications_other', index)">×</view>
|
||||
</view>
|
||||
<view class="image-add" @click="chooseMultiImage('qualifications_other')"
|
||||
v-if="(formData.qualifications_other || []).length < 9">
|
||||
<image
|
||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/0d4af728-c7bf-447d-85b2-e7c682471b86.png"
|
||||
mode="aspectFit" class="upload-icon-small"></image>
|
||||
<text class="add-text">添加照片</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="popup" :class="{ show: showRegionPopupFlag }">
|
||||
<view class="popup-mask" @click="hideRegionPopup"></view>
|
||||
|
|
@ -319,35 +286,33 @@
|
|||
<script>
|
||||
import request from '../../utils/request';
|
||||
import ChinaCitys from '../../static/data/ChinaCitys.json';
|
||||
import {
|
||||
debounce
|
||||
} from '@/utils/debounce.js';
|
||||
import { recognizeIdCard, recognizeBusinessLicense, parseValidPeriod } from '../../utils/orc';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
const loadedData = this.loadFormDataFromLocal();
|
||||
|
||||
return {
|
||||
formData: loadedData || {
|
||||
business_license: '',
|
||||
household_type: '',
|
||||
license_number: '',
|
||||
business_name: '',
|
||||
register_region: '',
|
||||
register_address: '',
|
||||
register_province: '',
|
||||
register_city: '',
|
||||
register_area: '',
|
||||
id_card_front: '',
|
||||
id_card_back: '',
|
||||
legal_person: '',
|
||||
formData: {
|
||||
uscc_photo: '',
|
||||
uscc_type: '',
|
||||
uscc_num: '',
|
||||
uscc_name: '',
|
||||
uscc_dependency: '',
|
||||
uscc_address: '',
|
||||
uscc_province: '',
|
||||
uscc_city: '',
|
||||
uscc_area: '',
|
||||
longitude: '',
|
||||
latitude: '',
|
||||
legal_idcard_positive: '',
|
||||
legal_idcard_negative: '',
|
||||
legal_name: '',
|
||||
legal_phone: '',
|
||||
legal_id_number: '',
|
||||
legal_idcard_expiry_type: 'permanent',
|
||||
idcard_start_date: '',
|
||||
idcard_end_date: '',
|
||||
industry_qualifications: [],
|
||||
other_qualifications: []
|
||||
legal_idcard_num: '',
|
||||
legal_idcard_expiry_type: '1',
|
||||
legal_idcard_expiry_start: '',
|
||||
legal_idcard_expiry_end: '',
|
||||
qualifications_sector: [],
|
||||
qualifications_other: []
|
||||
},
|
||||
ChinaCitys: ChinaCitys,
|
||||
regionCitys: [],
|
||||
|
|
@ -358,8 +323,12 @@ export default {
|
|||
currentPickerType: 'start',
|
||||
datePickerValue: [0, 0, 0],
|
||||
indicatorStyle: 'height: 68rpx;',
|
||||
isRecognizing: false,
|
||||
recognizeType: '',
|
||||
userId: null,
|
||||
identity: 3
|
||||
identity: 3,
|
||||
addressListener: null,
|
||||
sjAddressListener: null
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -385,6 +354,10 @@ export default {
|
|||
await this.getUserInfo();
|
||||
this.regionCitys = this.ChinaCitys[0].citys;
|
||||
this.regionAreas = this.regionCitys[0].areas;
|
||||
this.setupAddressListener();
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.removeAddressListener();
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
|
@ -396,29 +369,6 @@ export default {
|
|||
});
|
||||
},
|
||||
|
||||
loadFormDataFromLocal() {
|
||||
try {
|
||||
const stored = uni.getStorageSync('sj_info_form_data');
|
||||
if (stored) return stored;
|
||||
} catch (e) { }
|
||||
return null;
|
||||
},
|
||||
|
||||
saveFormDataToLocal() {
|
||||
try {
|
||||
uni.setStorageSync('sj_info_form_data', this.formData);
|
||||
} catch (e) { }
|
||||
},
|
||||
|
||||
saveFormDataToLocalDebounce() {
|
||||
if (!this._saveDebounce) {
|
||||
this._saveDebounce = debounce(() => {
|
||||
this.saveFormDataToLocal();
|
||||
}, 500);
|
||||
}
|
||||
this._saveDebounce();
|
||||
},
|
||||
|
||||
chooseImage(type) {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
|
|
@ -434,7 +384,13 @@ export default {
|
|||
const url = await this.directUpload(file, this.userId, 3);
|
||||
if (url) {
|
||||
this.$set(this.formData, type, url);
|
||||
this.saveFormDataToLocal();
|
||||
if (type === 'uscc_photo') {
|
||||
await this.recognizeBusinessLicense(url);
|
||||
} else if (type === 'legal_idcard_positive') {
|
||||
await this.recognizeIdCardFront(url);
|
||||
} else if (type === 'legal_idcard_negative') {
|
||||
await this.recognizeIdCardBack(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -474,7 +430,6 @@ export default {
|
|||
}
|
||||
}
|
||||
this.$set(this.formData, type, current);
|
||||
this.saveFormDataToLocal();
|
||||
uni.hideLoading();
|
||||
}
|
||||
});
|
||||
|
|
@ -484,7 +439,6 @@ export default {
|
|||
const list = [...this.formData[type]];
|
||||
list.splice(index, 1);
|
||||
this.$set(this.formData, type, list);
|
||||
this.saveFormDataToLocal();
|
||||
},
|
||||
|
||||
async directUpload(file, userId, type) {
|
||||
|
|
@ -554,14 +508,19 @@ export default {
|
|||
let province = this.ChinaCitys[index1].province;
|
||||
let city = this.regionCitys[index2].city;
|
||||
let area = this.regionAreas[index3].area;
|
||||
this.formData.register_region = province + '-' + city + '-' + area;
|
||||
this.formData.register_province = this.ChinaCitys[index1].code ? this.ChinaCitys[index1].code.toString()
|
||||
.substring(0, 6) : '';
|
||||
this.formData.register_city = this.regionCitys[index2].code ? this.regionCitys[index2].code.toString()
|
||||
.substring(0, 6) : '';
|
||||
this.formData.register_area = this.regionAreas[index3].code ? this.regionAreas[index3].code.toString()
|
||||
.substring(0, 6) : '';
|
||||
this.saveFormDataToLocal();
|
||||
this.formData.uscc_dependency = province + '-' + city + '-' + area;
|
||||
if (this.ChinaCitys[index1] && this.ChinaCitys[index1].code) {
|
||||
this.formData.uscc_province = String(this.ChinaCitys[index1].code).substring(0, 6);
|
||||
}
|
||||
if (this.regionCitys[index2] && this.regionCitys[index2].code) {
|
||||
this.formData.uscc_city = String(this.regionCitys[index2].code).substring(0, 6);
|
||||
}
|
||||
if (this.regionAreas[index3] && this.regionAreas[index3].code) {
|
||||
this.formData.uscc_area = String(this.regionAreas[index3].code).substring(0, 6);
|
||||
}
|
||||
this.formData.uscc_address = '';
|
||||
this.formData.longitude = '';
|
||||
this.formData.latitude = '';
|
||||
this.hideRegionPopup();
|
||||
},
|
||||
|
||||
|
|
@ -575,14 +534,13 @@ export default {
|
|||
|
||||
setIdcardExpiryType(type) {
|
||||
this.$set(this.formData, 'legal_idcard_expiry_type', type);
|
||||
if (type === 'permanent') {
|
||||
this.formData.idcard_end_date = '长久有效';
|
||||
if (type === '1') {
|
||||
this.formData.legal_idcard_expiry_end = '长久有效';
|
||||
} else {
|
||||
if (this.formData.idcard_end_date === '长久有效') {
|
||||
this.formData.idcard_end_date = '';
|
||||
if (this.formData.legal_idcard_expiry_end === '长久有效') {
|
||||
this.formData.legal_idcard_expiry_end = '';
|
||||
}
|
||||
}
|
||||
this.saveFormDataToLocal();
|
||||
},
|
||||
|
||||
showDatePicker(type) {
|
||||
|
|
@ -604,78 +562,359 @@ export default {
|
|||
const day = this.days[this.datePickerValue[2]];
|
||||
const dateStr = `${year}年${month < 10 ? '0' + month : month}月${day < 10 ? '0' + day : day}日`;
|
||||
if (this.currentPickerType === 'start') {
|
||||
this.formData.idcard_start_date = dateStr;
|
||||
this.formData.legal_idcard_expiry_start = dateStr;
|
||||
} else {
|
||||
this.formData.idcard_end_date = dateStr;
|
||||
this.formData.legal_idcard_expiry_end = dateStr;
|
||||
}
|
||||
this.saveFormDataToLocal();
|
||||
this.hideDatePicker();
|
||||
},
|
||||
|
||||
buildRegionTextForSearch() {
|
||||
const dependency = String(this.formData.uscc_dependency || '').trim();
|
||||
if (!dependency) return '';
|
||||
const parts = dependency.split('-');
|
||||
const province = parts[0] || '';
|
||||
const city = parts[1] || '';
|
||||
const district = parts[2] || '';
|
||||
let regionText = '';
|
||||
if (province) regionText += province;
|
||||
if (city && city !== province) regionText += city;
|
||||
if (district) regionText += district;
|
||||
return regionText;
|
||||
},
|
||||
|
||||
getAddressValueForSearch() {
|
||||
const rawAddress = String(this.formData.uscc_address || '').trim();
|
||||
if (!rawAddress) return '';
|
||||
const dependencyText = String(this.formData.uscc_dependency || '').trim();
|
||||
const regionText = this.buildRegionTextForSearch();
|
||||
let detail = rawAddress;
|
||||
if (regionText && detail.indexOf(regionText) === 0) {
|
||||
detail = detail.slice(regionText.length).trim();
|
||||
} else if (dependencyText && detail.indexOf(dependencyText) === 0) {
|
||||
detail = detail.slice(dependencyText.length).trim();
|
||||
}
|
||||
detail = detail.replace(/^[\s,-]+/, '').trim();
|
||||
return detail || rawAddress;
|
||||
},
|
||||
|
||||
getAddressInfo() {
|
||||
const dependency = String(this.formData.uscc_dependency || '').trim();
|
||||
const dependencyCode = String(this.formData.uscc_area || '').trim();
|
||||
const address = this.getAddressValueForSearch();
|
||||
const longitude = String(this.formData.longitude || '').trim();
|
||||
const latitude = String(this.formData.latitude || '').trim();
|
||||
|
||||
const hasDependency = !!dependency;
|
||||
const hasAddress = !!address;
|
||||
const hasLocation = !!(longitude && latitude);
|
||||
|
||||
let params = 'source=sj_info';
|
||||
|
||||
if (hasDependency) {
|
||||
params += `&dependency=${encodeURIComponent(dependency)}`;
|
||||
if (dependencyCode) {
|
||||
params += `&dependency_code=${dependencyCode}`;
|
||||
}
|
||||
}
|
||||
if (hasAddress) {
|
||||
params += `&address=${encodeURIComponent(address)}`;
|
||||
}
|
||||
if (hasLocation) {
|
||||
params += `&longitude=${longitude}&latitude=${latitude}`;
|
||||
}
|
||||
if (!hasDependency && !hasAddress && !hasLocation) {
|
||||
params += '&init_current_location=1&silent_locate=1';
|
||||
}
|
||||
|
||||
uni.navigateTo({
|
||||
url: `/pages/address/search?${params}`
|
||||
});
|
||||
},
|
||||
|
||||
setupAddressListener() {
|
||||
this.addressListener = (addressData) => {
|
||||
this.handleAddressSelected(addressData);
|
||||
};
|
||||
this.sjAddressListener = (addressData) => {
|
||||
this.handleAddressSelected(addressData);
|
||||
};
|
||||
uni.$on('address-selected', this.addressListener);
|
||||
uni.$on('address-selected-for-sj', this.sjAddressListener);
|
||||
},
|
||||
|
||||
removeAddressListener() {
|
||||
if (this.addressListener) {
|
||||
uni.$off('address-selected', this.addressListener);
|
||||
this.addressListener = null;
|
||||
}
|
||||
if (this.sjAddressListener) {
|
||||
uni.$off('address-selected-for-sj', this.sjAddressListener);
|
||||
this.sjAddressListener = null;
|
||||
}
|
||||
},
|
||||
|
||||
checkAddressData() {
|
||||
try {
|
||||
const storedAddress = uni.getStorageSync('sj_selected_address');
|
||||
if (storedAddress) {
|
||||
this.handleAddressSelected(storedAddress);
|
||||
uni.removeStorageSync('sj_selected_address');
|
||||
return;
|
||||
}
|
||||
} catch (e) { }
|
||||
|
||||
if (getApp().globalData && getApp().globalData.selectedAddress) {
|
||||
this.handleAddressSelected(getApp().globalData.selectedAddress);
|
||||
delete getApp().globalData.selectedAddress;
|
||||
}
|
||||
|
||||
try {
|
||||
const selectedAddress = uni.getStorageSync('selectedAddress');
|
||||
if (selectedAddress) {
|
||||
this.handleAddressSelected(selectedAddress);
|
||||
uni.removeStorageSync('selectedAddress');
|
||||
}
|
||||
} catch (e) { }
|
||||
},
|
||||
|
||||
handleAddressSelected(addressData) {
|
||||
if (!addressData) return;
|
||||
|
||||
let detailAddress = '';
|
||||
if (addressData.address) {
|
||||
detailAddress = String(addressData.address).trim();
|
||||
} else if (addressData.name) {
|
||||
detailAddress = String(addressData.name).trim();
|
||||
const regionParts = [];
|
||||
if (addressData.pname) regionParts.push(addressData.pname);
|
||||
if (addressData.cityname && addressData.cityname !== addressData.pname) regionParts.push(addressData.cityname);
|
||||
if (addressData.adname) regionParts.push(addressData.adname);
|
||||
const regionText = regionParts.join('');
|
||||
if (regionText && detailAddress.indexOf(regionText) === 0) {
|
||||
detailAddress = detailAddress.slice(regionText.length).trim();
|
||||
}
|
||||
detailAddress = detailAddress.replace(/^[\s,-]+/, '').trim();
|
||||
}
|
||||
|
||||
this.$set(this.formData, 'uscc_address', detailAddress);
|
||||
|
||||
if (addressData.location) {
|
||||
const [longitude, latitude] = String(addressData.location).split(',');
|
||||
this.$set(this.formData, 'longitude', longitude || '');
|
||||
this.$set(this.formData, 'latitude', latitude || '');
|
||||
}
|
||||
|
||||
if (addressData.pname || addressData.cityname || addressData.adname) {
|
||||
const locationParts = [];
|
||||
if (addressData.pname) locationParts.push(addressData.pname);
|
||||
if (addressData.cityname) locationParts.push(addressData.cityname);
|
||||
if (addressData.adname) locationParts.push(addressData.adname);
|
||||
this.$set(this.formData, 'uscc_dependency', locationParts.join('-'));
|
||||
}
|
||||
|
||||
if (addressData.provinceCode) {
|
||||
this.$set(this.formData, 'uscc_province', String(addressData.provinceCode).substring(0, 6));
|
||||
}
|
||||
if (addressData.cityCode) {
|
||||
this.$set(this.formData, 'uscc_city', String(addressData.cityCode).substring(0, 6));
|
||||
}
|
||||
if (addressData.districtCode) {
|
||||
this.$set(this.formData, 'uscc_area', String(addressData.districtCode).substring(0, 6));
|
||||
}
|
||||
|
||||
this.$forceUpdate();
|
||||
},
|
||||
|
||||
async recognizeBusinessLicense(imageUrl) {
|
||||
try {
|
||||
this.isRecognizing = true;
|
||||
this.recognizeType = 'uscc_photo';
|
||||
uni.showLoading({ title: '正在识别营业执照...', mask: true });
|
||||
const result = await recognizeBusinessLicense(imageUrl);
|
||||
console.log('营业执照识别结果:', result);
|
||||
const hasRecognizedData = this.checkBusinessLicenseRecognition(result);
|
||||
if (!hasRecognizedData) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({ title: '未识别到营业执照信息,请手动填写或重新拍摄', icon: 'none', duration: 3000 });
|
||||
this.isRecognizing = false;
|
||||
return;
|
||||
}
|
||||
let recognizedFields = 0;
|
||||
if (result.uscc_name && result.uscc_name.trim() && result.uscc_name !== '无') {
|
||||
this.$set(this.formData, 'uscc_name', result.uscc_name);
|
||||
recognizedFields++;
|
||||
}
|
||||
if (result.uscc_num && result.uscc_num.trim()) {
|
||||
this.$set(this.formData, 'uscc_num', result.uscc_num);
|
||||
recognizedFields++;
|
||||
}
|
||||
if (result.uscc_type && result.uscc_type.trim()) {
|
||||
this.$set(this.formData, 'uscc_type', result.uscc_type);
|
||||
recognizedFields++;
|
||||
}
|
||||
uni.hideLoading();
|
||||
if (recognizedFields > 0) {
|
||||
uni.showToast({ title: '营业执照识别成功', icon: 'none', duration: 2000 });
|
||||
} else {
|
||||
uni.showToast({ title: '识别完成,但未获取到有效信息', icon: 'none', duration: 3000 });
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('营业执照识别失败:', error);
|
||||
uni.hideLoading();
|
||||
uni.showToast({ title: error.message || '识别失败,请手动填写', icon: 'none', duration: 3000 });
|
||||
} finally {
|
||||
this.isRecognizing = false;
|
||||
}
|
||||
},
|
||||
|
||||
checkBusinessLicenseRecognition(result) {
|
||||
const requiredFields = ['uscc_num', 'uscc_name', 'uscc_type'];
|
||||
for (const field of requiredFields) {
|
||||
if (result[field] && result[field].trim()) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
async recognizeIdCardFront(imageUrl) {
|
||||
try {
|
||||
this.isRecognizing = true;
|
||||
this.recognizeType = 'legal_idcard_positive';
|
||||
uni.showLoading({ title: '正在识别身份证正面...', mask: true });
|
||||
const result = await recognizeIdCard(imageUrl, 1);
|
||||
const hasRecognizedData = (result.name && result.name.trim()) || (result.id_number && result.id_number.trim());
|
||||
if (!hasRecognizedData) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({ title: '未识别到身份证信息,请手动填写或重新拍摄', icon: 'none', duration: 3000 });
|
||||
this.isRecognizing = false;
|
||||
return;
|
||||
}
|
||||
if (result.name) {
|
||||
this.$set(this.formData, 'legal_name', result.name);
|
||||
}
|
||||
if (result.id_number) {
|
||||
this.$set(this.formData, 'legal_idcard_num', result.id_number);
|
||||
}
|
||||
uni.hideLoading();
|
||||
uni.showToast({ title: '身份证正面识别成功', icon: 'none' });
|
||||
} catch (error) {
|
||||
console.error('身份证正面识别失败:', error);
|
||||
uni.hideLoading();
|
||||
uni.showToast({ title: error.message || '识别失败,请手动填写', icon: 'none', duration: 3000 });
|
||||
} finally {
|
||||
this.isRecognizing = false;
|
||||
}
|
||||
},
|
||||
|
||||
async recognizeIdCardBack(imageUrl) {
|
||||
try {
|
||||
this.isRecognizing = true;
|
||||
this.recognizeType = 'legal_idcard_negative';
|
||||
uni.showLoading({ title: '正在识别身份证反面...', mask: true });
|
||||
const result = await recognizeIdCard(imageUrl, 2);
|
||||
const hasRecognizedData = (result.start_date && result.start_date.trim()) || (result.end_date && result.end_date.trim());
|
||||
if (!hasRecognizedData) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({ title: '未识别到身份证有效期信息,请手动填写或重新拍摄', icon: 'none', duration: 3000 });
|
||||
this.isRecognizing = false;
|
||||
return;
|
||||
}
|
||||
const validPeriod = parseValidPeriod(result.start_date, result.end_date);
|
||||
if (validPeriod.startDate) {
|
||||
this.$set(this.formData, 'legal_idcard_expiry_start', validPeriod.startDate);
|
||||
}
|
||||
if (validPeriod.isPermanent) {
|
||||
this.$set(this.formData, 'legal_idcard_expiry_type', '1');
|
||||
this.$set(this.formData, 'legal_idcard_expiry_end', '长久有效');
|
||||
} else if (validPeriod.endDate) {
|
||||
this.$set(this.formData, 'legal_idcard_expiry_type', '2');
|
||||
this.$set(this.formData, 'legal_idcard_expiry_end', validPeriod.endDate);
|
||||
}
|
||||
uni.hideLoading();
|
||||
uni.showToast({ title: '身份证反面识别成功', icon: 'none' });
|
||||
} catch (error) {
|
||||
console.error('身份证反面识别失败:', error);
|
||||
uni.hideLoading();
|
||||
uni.showToast({ title: error.message || '识别失败,请手动填写', icon: 'none', duration: 3000 });
|
||||
} finally {
|
||||
this.isRecognizing = false;
|
||||
}
|
||||
},
|
||||
|
||||
showTipPopup(field) { },
|
||||
|
||||
getFormData() {
|
||||
return this.formData;
|
||||
},
|
||||
|
||||
setData(data) {
|
||||
if (!data) return;
|
||||
const keys = Object.keys(this.formData);
|
||||
keys.forEach(key => {
|
||||
if (data[key] !== undefined && data[key] !== null) {
|
||||
this.$set(this.formData, key, data[key]);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
saveFormData() {
|
||||
if (!this.formData.business_license) {
|
||||
if (!this.formData.uscc_photo) {
|
||||
uni.showToast({
|
||||
title: '请上传营业执照',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!this.formData.household_type) {
|
||||
if (!this.formData.uscc_type) {
|
||||
uni.showToast({
|
||||
title: '请选择户主类型',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!this.formData.license_number) {
|
||||
if (!this.formData.uscc_num) {
|
||||
uni.showToast({
|
||||
title: '请输入证件号码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!this.formData.business_name) {
|
||||
if (!this.formData.uscc_name) {
|
||||
uni.showToast({
|
||||
title: '请输入营业名称',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!this.formData.register_region) {
|
||||
if (!this.formData.uscc_dependency) {
|
||||
uni.showToast({
|
||||
title: '请选择注册地区',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!this.formData.register_address) {
|
||||
if (!this.formData.uscc_address) {
|
||||
uni.showToast({
|
||||
title: '请输入注册详细地址',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!this.formData.id_card_front) {
|
||||
if (!this.formData.legal_idcard_positive) {
|
||||
uni.showToast({
|
||||
title: '请上传法人身份证正面',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!this.formData.id_card_back) {
|
||||
if (!this.formData.legal_idcard_negative) {
|
||||
uni.showToast({
|
||||
title: '请上传法人身份证反面',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!this.formData.legal_person) {
|
||||
if (!this.formData.legal_name) {
|
||||
uni.showToast({
|
||||
title: '请输入法人代表',
|
||||
icon: 'none'
|
||||
|
|
@ -696,35 +935,34 @@ export default {
|
|||
});
|
||||
return false;
|
||||
}
|
||||
if (!this.formData.legal_id_number) {
|
||||
if (!this.formData.legal_idcard_num) {
|
||||
uni.showToast({
|
||||
title: '请输入法人身份证号',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!this.formData.idcard_start_date) {
|
||||
if (!this.formData.legal_idcard_expiry_start) {
|
||||
uni.showToast({
|
||||
title: '请选择开始日期',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!this.formData.idcard_end_date) {
|
||||
if (!this.formData.legal_idcard_expiry_end) {
|
||||
uni.showToast({
|
||||
title: '请选择结束日期',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!this.formData.industry_qualifications || this.formData.industry_qualifications.length === 0) {
|
||||
if (!this.formData.qualifications_sector || this.formData.qualifications_sector.length === 0) {
|
||||
uni.showToast({
|
||||
title: '请上传行业资质',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
this.saveFormDataToLocal();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -1052,10 +1290,10 @@ export default {
|
|||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 2rpx dashed #DDDDDD;
|
||||
width: 214rpx;
|
||||
height: 214rpx;
|
||||
background: #F5F5F5;
|
||||
border: 2rpx dashed #DDDDDD;
|
||||
width: 214rpx;
|
||||
height: 214rpx;
|
||||
background: #F5F5F5;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,94 +1,110 @@
|
|||
<template>
|
||||
<view class="pages">
|
||||
<custom-navbar title="入驻成功" :showBack="true"></custom-navbar>
|
||||
<view class="title-icon">恭喜您!</view>
|
||||
<!-- <view class="title-icon">{{data.residency_notice}}</view> -->
|
||||
<view class="title-content">成功入驻成为美融融门店</view>
|
||||
<!-- <view class="title-content">{{data.approve_notice}}</view> -->
|
||||
<custom-navbar :title="infoData.top" :showBack="true"></custom-navbar>
|
||||
<view class="title-icon">{{infoData.title}}</view>
|
||||
<view class="title-content">{{infoData.notice}}</view>
|
||||
<view class="erweimabox">
|
||||
<view class="erweimab">
|
||||
<!-- <image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/26bd4004-c7aa-4997-9f31-8562060e7659.jpeg" mode="" style="width: 404rpx;height: 404rpx;"></image> -->
|
||||
<image :src="data.photo" mode="widthFix" style="width: 404rpx;border-radius:25rpx ;margin: 37rpx 0 0 36rpx;"></image>
|
||||
</view>
|
||||
<view class="erweimab">
|
||||
<image :src="infoData.photo" mode="widthFix"
|
||||
style="width: 404rpx;border-radius:25rpx ;margin: 37rpx 0 0 36rpx;"></image>
|
||||
</view>
|
||||
<view class="kefubtn">扫码联系专属客服</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
// 核心:用 props 接收
|
||||
props: {
|
||||
data: {
|
||||
type: Object, // 类型:对象
|
||||
default: () => ({}) // 默认空对象
|
||||
}
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
// 在 JS 里使用
|
||||
console.log(this.data,'--------------------')
|
||||
}
|
||||
}
|
||||
<script>
|
||||
import request from '../../utils/request';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
infoData: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getCustomerService();
|
||||
},
|
||||
methods: {
|
||||
async getCustomerService() {
|
||||
try {
|
||||
const res = await request.post('/sj/userSjAuth/getCustomerService');
|
||||
console.log('客服接口返回:', JSON.stringify(res));
|
||||
if (res && (res.state == 1 || res.code == 200)) {
|
||||
this.infoData = res.data || {};
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('获取客服信息失败:', e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.kefubtn{
|
||||
height: 42rpx;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 30rpx;
|
||||
color: #5A5A5A;
|
||||
line-height: 42rpx;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
margin-top: 23rpx;
|
||||
}
|
||||
.pages {
|
||||
background-image: url('https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/467f6b5f-32dc-4ba3-847a-22be4569c45e.png');
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
<style>
|
||||
.kefubtn {
|
||||
height: 42rpx;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 30rpx;
|
||||
color: #5A5A5A;
|
||||
line-height: 42rpx;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
margin-top: 23rpx;
|
||||
}
|
||||
|
||||
.erweimab {
|
||||
margin: 70rpx 0 0 103rpx;
|
||||
width: 477rpx;
|
||||
height: 477rpx;
|
||||
background-image: url('https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e5461570-10e3-4e11-a6ca-8543f106639a.png');
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.pages {
|
||||
background-image: url('https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/467f6b5f-32dc-4ba3-847a-22be4569c45e.png');
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.erweimabox {
|
||||
margin: 71rpx 0 0 6rpx;
|
||||
width: 690rpx;
|
||||
height: 690rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 62rpx;
|
||||
border: 1rpx solid #F2F4F6;
|
||||
}
|
||||
.erweimab {
|
||||
margin: 70rpx 0 0 103rpx;
|
||||
width: 477rpx;
|
||||
height: 477rpx;
|
||||
background-image: url('https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e5461570-10e3-4e11-a6ca-8543f106639a.png');
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.title-icon {
|
||||
margin-left: 283rpx;
|
||||
height: 67rpx;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 48rpx;
|
||||
color: #333333;
|
||||
line-height: 67rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
.erweimabox {
|
||||
margin: 71rpx 0 0 6rpx;
|
||||
width: 690rpx;
|
||||
height: 690rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 62rpx;
|
||||
border: 1rpx solid #F2F4F6;
|
||||
}
|
||||
|
||||
.title-content {
|
||||
margin: 14rpx 0 0 195rpx;
|
||||
height: 42rpx;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 30rpx;
|
||||
color: #666666;
|
||||
line-height: 42rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
.title-icon {
|
||||
/* margin-left: 283rpx; */
|
||||
height: 67rpx;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 48rpx;
|
||||
color: #333333;
|
||||
line-height: 67rpx;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.title-content {
|
||||
margin: 14rpx 0 0 0rpx;
|
||||
height: 42rpx;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 30rpx;
|
||||
color: #666666;
|
||||
line-height: 42rpx;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -125,7 +125,7 @@ export default {
|
|||
// 加载当前营业时间
|
||||
async loadCurrentTime() {
|
||||
try {
|
||||
const res = await request.post('/user/getuser', {
|
||||
const res = await request.post('/sj/user/getuser', {
|
||||
type: 3 // 商家类型
|
||||
})
|
||||
console.log('获取用户信息响应:', res)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -187,13 +187,22 @@ const request = async (options, isUpdate) => {
|
|||
uni.request({
|
||||
...options,
|
||||
success: (res) => {
|
||||
// #ifdef H5
|
||||
if (!options.hideLoading) {
|
||||
uni.hideLoading()
|
||||
// #ifdef H5
|
||||
if (!options.hideLoading) {
|
||||
uni.hideLoading()
|
||||
}
|
||||
// #endif
|
||||
try {
|
||||
const result = responseInterceptor(options, res, resolve, reject)
|
||||
if (result && typeof result.then === 'function') {
|
||||
result.then(data => resolve(data)).catch(err => reject(err))
|
||||
} else {
|
||||
resolve(result)
|
||||
}
|
||||
// #endif
|
||||
resolve(responseInterceptor(options, res, resolve, reject))
|
||||
},
|
||||
} catch (err) {
|
||||
reject(err)
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
// #ifdef H5
|
||||
if (!options.hideLoading) {
|
||||
|
|
@ -221,6 +230,7 @@ const request = async (options, isUpdate) => {
|
|||
// 处理 401 未授权
|
||||
async function handleUnauthorized(originalRequest, resolve, reject) {
|
||||
if (!getToken()) {
|
||||
reject(new Error('未登录'))
|
||||
return redirectToLogin()
|
||||
}
|
||||
// 如果正在刷新 Token,将请求加入队列
|
||||
|
|
@ -246,7 +256,7 @@ async function handleUnauthorized(originalRequest, resolve, reject) {
|
|||
} catch (error) {
|
||||
removeToken()
|
||||
redirectToLogin()
|
||||
// reject(error)
|
||||
reject(error)
|
||||
return error
|
||||
} finally {
|
||||
isRefreshing = false
|
||||
|
|
|
|||
Loading…
Reference in New Issue