入驻流程优化
This commit is contained in:
parent
21425c0306
commit
e79c8eda8a
|
|
@ -191,12 +191,12 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
import {
|
||||
handleImgSizeUni
|
||||
} from '@/utils/service.js'
|
||||
import request from "../../utils/request";
|
||||
} from '@/utils/service.js'
|
||||
import request from "../../utils/request";
|
||||
|
||||
export default {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
identity: '',
|
||||
|
|
@ -631,15 +631,15 @@ export default {
|
|||
},
|
||||
|
||||
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'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
@ -650,17 +650,17 @@ export default {
|
|||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.profile-page {
|
||||
.profile-page {
|
||||
min-height: 100vh;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
}
|
||||
|
||||
/* 自定义导航栏样式 */
|
||||
.custom-navbar {
|
||||
/* 自定义导航栏样式 */
|
||||
.custom-navbar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
|
@ -677,21 +677,21 @@ export default {
|
|||
/* 适配不同机型的顶部安全区域 */
|
||||
padding-top: var(--status-bar-height);
|
||||
height: calc(128rpx + var(--status-bar-height));
|
||||
}
|
||||
}
|
||||
|
||||
/* 导航栏左侧 */
|
||||
.navbar-left {
|
||||
/* 导航栏左侧 */
|
||||
.navbar-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.back-icon {
|
||||
.back-icon {
|
||||
width: 16rpx;
|
||||
height: 32rpx;
|
||||
margin-right: 23rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-title {
|
||||
.navbar-title {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
|
|
@ -699,29 +699,29 @@ export default {
|
|||
line-height: 45rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
/* 导航栏右侧状态栏 */
|
||||
.navbar-right {
|
||||
/* 导航栏右侧状态栏 */
|
||||
.navbar-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-status-item {
|
||||
.nav-status-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-left: 11rpx;
|
||||
padding: 16rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-status-icon {
|
||||
.nav-status-icon {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
margin-bottom: 7rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-status-text {
|
||||
.nav-status-text {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 20rpx;
|
||||
|
|
@ -729,29 +729,29 @@ export default {
|
|||
line-height: 28rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
.content {
|
||||
padding: 20rpx;
|
||||
/* 动态计算内容区域的上边距 */
|
||||
padding-top: calc(128rpx + var(--status-bar-height) + 20rpx);
|
||||
}
|
||||
}
|
||||
|
||||
/* 部分卡片 */
|
||||
.section-card {
|
||||
/* 部分卡片 */
|
||||
.section-card {
|
||||
background: white;
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx 20rpx 0 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.section-header {
|
||||
.section-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.section-title {
|
||||
.section-title {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
|
|
@ -759,17 +759,17 @@ export default {
|
|||
line-height: 48rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.title-bar {
|
||||
.title-bar {
|
||||
width: 6rpx;
|
||||
height: 30rpx;
|
||||
background-color: #E8101E;
|
||||
margin-right: 10rpx;
|
||||
border-radius: 5rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.section-desc {
|
||||
.section-desc {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
|
|
@ -779,45 +779,45 @@ export default {
|
|||
font-style: normal;
|
||||
margin-left: 20rpx;
|
||||
letter-spacing: 0.5rpx;
|
||||
}
|
||||
}
|
||||
|
||||
/* 子部分 */
|
||||
.subsection {
|
||||
/* 子部分 */
|
||||
.subsection {
|
||||
/* margin-top: 10rpx; */
|
||||
/* margin-left: 17rpx; */
|
||||
}
|
||||
}
|
||||
|
||||
.subsection-content {
|
||||
.subsection-content {
|
||||
border-radius: 12rpx;
|
||||
overflow: hidden;
|
||||
margin-left: 17rpx;
|
||||
}
|
||||
}
|
||||
|
||||
/* 信息项 */
|
||||
.info-item {
|
||||
/* 信息项 */
|
||||
.info-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 32rpx 0;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
}
|
||||
|
||||
.info-item:last-child {
|
||||
.info-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
.info-left {
|
||||
.info-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.item-icon {
|
||||
.item-icon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.item-label {
|
||||
.item-label {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
|
|
@ -825,11 +825,11 @@ export default {
|
|||
line-height: 40rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.arrow-right {
|
||||
.arrow-right {
|
||||
margin-right: 19rpx;
|
||||
width: 11rpx;
|
||||
height: 22rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -95,13 +95,13 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import request from '../../utils/request';
|
||||
import StepTab from '@/components/step-tab/step-tab.vue';
|
||||
import QualificationInfo from './qualification_sj.vue';
|
||||
import StoreInfo from './sj-info.vue';
|
||||
import successruzhu from './successruzhu.vue';
|
||||
import request from '../../utils/request';
|
||||
import StepTab from '@/components/step-tab/step-tab.vue';
|
||||
import QualificationInfo from './qualification_sj.vue';
|
||||
import StoreInfo from './sj-info.vue';
|
||||
import successruzhu from './successruzhu.vue';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
components: {
|
||||
StepTab,
|
||||
QualificationInfo,
|
||||
|
|
@ -137,6 +137,10 @@ export default {
|
|||
}
|
||||
},
|
||||
async onLoad(options) {
|
||||
console.log(options, 'options---');
|
||||
if (options.type == 1) {
|
||||
this.currentStep = 4
|
||||
}
|
||||
this.identity = 2;
|
||||
await this.getUserInfoSync()
|
||||
// 确保子组件也能访问到 identity
|
||||
|
|
@ -546,6 +550,7 @@ export default {
|
|||
delete formData.contact_phone
|
||||
delete formData.contact_type
|
||||
delete formData.contact_name
|
||||
delete formData.invite_code_other
|
||||
if (Array.isArray(formData.qualifications_sector)) {
|
||||
formData.qualifications_sector = JSON.stringify(formData.qualifications_sector);
|
||||
}
|
||||
|
|
@ -611,61 +616,61 @@ export default {
|
|||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.ruzhu-page {
|
||||
.ruzhu-page {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
.content {
|
||||
padding: 20rpx 20rpx 50rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
.xieyi_content {
|
||||
.xieyi_content {
|
||||
padding: 20rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.ruzhu-cont {
|
||||
.ruzhu-cont {
|
||||
padding: 24rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.ruzhu-text {
|
||||
.ruzhu-text {
|
||||
font-size: 28rpx;
|
||||
color: #3D3D3D;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
.kong {
|
||||
.kong {
|
||||
width: 100vw;
|
||||
height: 180rpx;
|
||||
}
|
||||
}
|
||||
|
||||
/* 底部按钮区域样式 */
|
||||
.bottom-fixed {
|
||||
/* 底部按钮区域样式 */
|
||||
.bottom-fixed {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background-color: #ffffff;
|
||||
padding: 24rpx 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* 步骤0按钮布局 */
|
||||
.step-0-buttons {
|
||||
/* 步骤0按钮布局 */
|
||||
.step-0-buttons {
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
/* 步骤0中的下一步按钮*/
|
||||
.step-0-buttons .next-btn {
|
||||
/* 步骤0中的下一步按钮*/
|
||||
.step-0-buttons .next-btn {
|
||||
width: 702rpx;
|
||||
height: 98rpx !important;
|
||||
display: flex;
|
||||
|
|
@ -673,24 +678,24 @@ export default {
|
|||
align-items: center;
|
||||
background: #FF4767;
|
||||
border-radius: 49rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.step-0-buttons .next-text {
|
||||
.step-0-buttons .next-text {
|
||||
color: #ffffff;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
/* 步骤1和步骤2按钮布局 */
|
||||
.step-1-buttons,
|
||||
.step-2-buttons {
|
||||
/* 步骤1和步骤2按钮布局 */
|
||||
.step-1-buttons,
|
||||
.step-2-buttons {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
/* 步骤1中的按钮 */
|
||||
.step-1-buttons .next-btn {
|
||||
/* 步骤1中的按钮 */
|
||||
.step-1-buttons .next-btn {
|
||||
flex: 1;
|
||||
height: 98rpx;
|
||||
display: flex;
|
||||
|
|
@ -698,16 +703,16 @@ export default {
|
|||
align-items: center;
|
||||
background: #FF4767;
|
||||
border-radius: 49rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.step-1-buttons .next-text {
|
||||
.step-1-buttons .next-text {
|
||||
color: #ffffff;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
/* 步骤2中的提交按钮 */
|
||||
.step-2-buttons .submit-btn {
|
||||
/* 步骤2中的提交按钮 */
|
||||
.step-2-buttons .submit-btn {
|
||||
flex: 1;
|
||||
height: 98rpx;
|
||||
display: flex;
|
||||
|
|
@ -715,16 +720,16 @@ export default {
|
|||
align-items: center;
|
||||
background: linear-gradient(180deg, #f52540 0%, #e8101e 100%);
|
||||
border-radius: 49rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.step-2-buttons .submit-text {
|
||||
.step-2-buttons .submit-text {
|
||||
color: #ffffff;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
/* 上一步按钮 - 统一所有步骤中的样式 */
|
||||
.prev-btn {
|
||||
/* 上一步按钮 - 统一所有步骤中的样式 */
|
||||
.prev-btn {
|
||||
width: 249rpx;
|
||||
height: 98rpx;
|
||||
display: flex;
|
||||
|
|
@ -732,75 +737,77 @@ export default {
|
|||
align-items: center;
|
||||
background-color: #f8f8f8;
|
||||
border-radius: 60rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.prev-text {
|
||||
.prev-text {
|
||||
color: #E8101E;
|
||||
font-size: 36rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.button-row {
|
||||
.button-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 702rpx;
|
||||
height: 147rpx;
|
||||
gap: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.agree {
|
||||
.agree {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.agree-btn {
|
||||
.agree-btn {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-right: 13rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.agree-tip {
|
||||
.agree-tip {
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.next-text {
|
||||
.next-text {
|
||||
color: #ffffff;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.prev-text {
|
||||
.prev-text {
|
||||
color: #333;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.submit-text {
|
||||
.submit-text {
|
||||
color: #ffffff;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.showziliao{
|
||||
}
|
||||
|
||||
.showziliao {
|
||||
width: 690rpx;
|
||||
height: 98rpx;
|
||||
background: #FF4767;
|
||||
border-radius: 49rpx;
|
||||
}
|
||||
.showziliaotext{
|
||||
}
|
||||
|
||||
.showziliaotext {
|
||||
height: 40rpx;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 80rpx;
|
||||
line-height: 96rpx;
|
||||
font-style: normal;
|
||||
margin: 0 0 0 281rpx;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -55,11 +55,14 @@
|
|||
</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.uscc_address" placeholder="请输入注册地址" placeholder-class="placeholder"
|
||||
class="input" />
|
||||
<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>
|
||||
|
|
@ -295,6 +298,11 @@ export default {
|
|||
uscc_name: '',
|
||||
uscc_dependency: '',
|
||||
uscc_address: '',
|
||||
uscc_province: '',
|
||||
uscc_city: '',
|
||||
uscc_area: '',
|
||||
longitude: '',
|
||||
latitude: '',
|
||||
legal_idcard_positive: '',
|
||||
legal_idcard_negative: '',
|
||||
legal_name: '',
|
||||
|
|
@ -318,7 +326,9 @@ export default {
|
|||
isRecognizing: false,
|
||||
recognizeType: '',
|
||||
userId: null,
|
||||
identity: 3
|
||||
identity: 3,
|
||||
addressListener: null,
|
||||
sjAddressListener: null
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -344,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: {
|
||||
|
|
@ -495,6 +509,18 @@ export default {
|
|||
let city = this.regionCitys[index2].city;
|
||||
let area = this.regionAreas[index3].area;
|
||||
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();
|
||||
},
|
||||
|
||||
|
|
@ -543,6 +569,163 @@ export default {
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -23,8 +23,11 @@
|
|||
<view class="upload-container">
|
||||
<view class="upload-box" @click="editable && chooseImage('uscc_photo')">
|
||||
<view class="upload-camera license-upload">
|
||||
<image v-if="displayData.uscc_photo" :src="displayData.uscc_photo" mode="aspectFill" class="preview-image"></image>
|
||||
<image v-else src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/92bd4268-b4d7-4725-8664-9e44f828c7d9" mode="aspectFit" class="camera-icon"></image>
|
||||
<image v-if="displayData.uscc_photo" :src="displayData.uscc_photo" mode="aspectFill"
|
||||
class="preview-image"></image>
|
||||
<image v-else
|
||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/92bd4268-b4d7-4725-8664-9e44f828c7d9"
|
||||
mode="aspectFit" class="camera-icon"></image>
|
||||
</view>
|
||||
</view>
|
||||
<text class="upload-label required">请上传营业执照原件</text>
|
||||
|
|
@ -36,27 +39,31 @@
|
|||
<view class="label-wrapper">
|
||||
<text class="label required">商户类型</text>
|
||||
</view>
|
||||
<input type="text" v-model="displayData.uscc_type" placeholder="请输入商户类型"
|
||||
:disabled="!editable" placeholder-class="placeholder" class="input" />
|
||||
<input type="text" v-model="displayData.uscc_type" placeholder="请输入商户类型" :disabled="!editable"
|
||||
placeholder-class="placeholder" class="input" />
|
||||
</view>
|
||||
|
||||
<!-- 营业执照信息 -->
|
||||
<view class="form-item-one box-cont">
|
||||
<view class="label-wrapper">
|
||||
<text class="label required">证件号码</text>
|
||||
<image class="label-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/25bd7f38-1a3e-4282-84ea-190d7f820108" mode="aspectFit" @click="showTipPopup('uscc_num')"></image>
|
||||
<image class="label-icon"
|
||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/25bd7f38-1a3e-4282-84ea-190d7f820108"
|
||||
mode="aspectFit" @click="showTipPopup('uscc_num')"></image>
|
||||
</view>
|
||||
<input type="text" v-model="displayData.uscc_num" placeholder="请输入营业执照的证件号码"
|
||||
:disabled="!editable" placeholder-class="placeholder" class="input" />
|
||||
<input type="text" v-model="displayData.uscc_num" placeholder="请输入营业执照的证件号码" :disabled="!editable"
|
||||
placeholder-class="placeholder" class="input" />
|
||||
</view>
|
||||
|
||||
<view class="form-item-one box-cont">
|
||||
<view class="label-wrapper">
|
||||
<text class="label required">企业名称</text>
|
||||
<image class="label-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/25bd7f38-1a3e-4282-84ea-190d7f820108" mode="aspectFit" @click="showTipPopup('uscc_name')"></image>
|
||||
<image class="label-icon"
|
||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/25bd7f38-1a3e-4282-84ea-190d7f820108"
|
||||
mode="aspectFit" @click="showTipPopup('uscc_name')"></image>
|
||||
</view>
|
||||
<input type="text" v-model="displayData.uscc_name" placeholder="请输入营业执照的企业名称"
|
||||
:disabled="!editable" placeholder-class="placeholder" class="input" />
|
||||
<input type="text" v-model="displayData.uscc_name" placeholder="请输入营业执照的企业名称" :disabled="!editable"
|
||||
placeholder-class="placeholder" class="input" />
|
||||
</view>
|
||||
|
||||
<view class="form-item-one box-cont" @click="editable && showRegionPicker()">
|
||||
|
|
@ -72,12 +79,17 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-item-one box-cont">
|
||||
<view class="form-item-one box-cont" @click="editable && getAddressInfo()">
|
||||
<view class="label-wrapper">
|
||||
<text class="label required">注册详细地址</text>
|
||||
</view>
|
||||
<input type="text" v-model="displayData.uscc_address" placeholder="请输入注册地址"
|
||||
:disabled="!editable" placeholder-class="placeholder" class="input" />
|
||||
<view class="picker-content">
|
||||
<text :class="displayData.uscc_address ? 'picker-value' : 'placeholder'">
|
||||
{{ displayData.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>
|
||||
|
||||
|
|
@ -100,8 +112,11 @@
|
|||
<view class="idcard-upload-vertical-item">
|
||||
<view class="upload-box" @click="editable && chooseImage('legal_idcard_positive')">
|
||||
<view class="upload-camera idcard-front">
|
||||
<image v-if="displayData.legal_idcard_positive" :src="displayData.legal_idcard_positive" mode="aspectFill" class="preview-image"></image>
|
||||
<image v-else src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/043b0c97-79c1-4f95-810f-c33e3d5269a3" mode="aspectFit" class="camera-icon"></image>
|
||||
<image v-if="displayData.legal_idcard_positive" :src="displayData.legal_idcard_positive"
|
||||
mode="aspectFill" class="preview-image"></image>
|
||||
<image v-else
|
||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/043b0c97-79c1-4f95-810f-c33e3d5269a3"
|
||||
mode="aspectFit" class="camera-icon"></image>
|
||||
</view>
|
||||
</view>
|
||||
<text class="upload-label required">请上传身份证正面(人像面)</text>
|
||||
|
|
@ -111,8 +126,11 @@
|
|||
<view class="idcard-upload-vertical-item">
|
||||
<view class="upload-box" @click="editable && chooseImage('legal_idcard_negative')">
|
||||
<view class="upload-camera idcard-back">
|
||||
<image v-if="displayData.legal_idcard_negative" :src="displayData.legal_idcard_negative" mode="aspectFill" class="preview-image"></image>
|
||||
<image v-else src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/203cfdf4-2501-44e6-8565-ad251c6bf0fa" mode="aspectFit" class="camera-icon"></image>
|
||||
<image v-if="displayData.legal_idcard_negative" :src="displayData.legal_idcard_negative"
|
||||
mode="aspectFill" class="preview-image"></image>
|
||||
<image v-else
|
||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/203cfdf4-2501-44e6-8565-ad251c6bf0fa"
|
||||
mode="aspectFit" class="camera-icon"></image>
|
||||
</view>
|
||||
</view>
|
||||
<text class="upload-label required">请上传身份证反面(国徽面)</text>
|
||||
|
|
@ -125,22 +143,24 @@
|
|||
<view class="form-item-one box-cont">
|
||||
<view class="label-wrapper">
|
||||
<text class="label required">法人代表</text>
|
||||
<image class="label-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/25bd7f38-1a3e-4282-84ea-190d7f820108" mode="aspectFit" @click="showTipPopup('legal_name')"></image>
|
||||
<image class="label-icon"
|
||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/25bd7f38-1a3e-4282-84ea-190d7f820108"
|
||||
mode="aspectFit" @click="showTipPopup('legal_name')"></image>
|
||||
</view>
|
||||
<input type="text" v-model="displayData.legal_name" placeholder="请输入营业执照的法人代表"
|
||||
:disabled="!editable" placeholder-class="placeholder" class="input" />
|
||||
<input type="text" v-model="displayData.legal_name" placeholder="请输入营业执照的法人代表" :disabled="!editable"
|
||||
placeholder-class="placeholder" class="input" />
|
||||
</view>
|
||||
|
||||
<view class="form-item-one box-cont">
|
||||
<text class="label required">法人联系方式</text>
|
||||
<input type="number" v-model="displayData.legal_phone" placeholder="请输入法人的联系方式"
|
||||
:disabled="!editable" placeholder-class="placeholder" class="input" />
|
||||
<input type="number" v-model="displayData.legal_phone" placeholder="请输入法人的联系方式" :disabled="!editable"
|
||||
placeholder-class="placeholder" class="input" />
|
||||
</view>
|
||||
|
||||
<view class="form-item-one box-cont">
|
||||
<text class="label required">法人身份证号</text>
|
||||
<input type="idcard" v-model="displayData.legal_idcard_num" placeholder="请输入法人身份证号"
|
||||
:disabled="!editable" placeholder-class="placeholder" class="input" />
|
||||
<input type="idcard" v-model="displayData.legal_idcard_num" placeholder="请输入法人身份证号" :disabled="!editable"
|
||||
placeholder-class="placeholder" class="input" />
|
||||
</view>
|
||||
|
||||
<!-- 身份证有效期 -->
|
||||
|
|
@ -149,13 +169,17 @@
|
|||
<view class="radio-group">
|
||||
<view class="radio-item" @click="editable && setIdcardValidType('permanent')">
|
||||
<view class="radio" :class="{ checked: displayData.legal_idcard_expiry_type === 1 }">
|
||||
<image v-if="displayData.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>
|
||||
<image v-if="displayData.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="editable && setIdcardValidType('date')">
|
||||
<view class="radio" :class="{ checked: displayData.legal_idcard_expiry_type === 2 }">
|
||||
<image v-if="displayData.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>
|
||||
<image v-if="displayData.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>
|
||||
<text class="radio-label">指定日期有效</text>
|
||||
</view>
|
||||
|
|
@ -169,10 +193,12 @@
|
|||
<text class="date-label">开始日期</text>
|
||||
<view class="date-picker-box" @click="editable && openDatePicker('idcard_start_date')">
|
||||
<text :class="displayData.idcard_start_date ? 'date-value' : 'placeholder'">
|
||||
{{formatDateForDisplay(displayData.idcard_start_date) || '请选择日期'}}
|
||||
{{ formatDateForDisplay(displayData.idcard_start_date) || '请选择日期' }}
|
||||
</text>
|
||||
<view class="date-divider"></view>
|
||||
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ce52b49f-2261-49ca-96ed-e9ad47049649" class="date-arrow" mode="aspectFit"></image>
|
||||
<image
|
||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ce52b49f-2261-49ca-96ed-e9ad47049649"
|
||||
class="date-arrow" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="date-item">
|
||||
|
|
@ -180,7 +206,7 @@
|
|||
<view class="date-picker-box" :class="{ disabled: displayData.legal_idcard_expiry_type === 1 }"
|
||||
@click="editable && displayData.legal_idcard_expiry_type !== 1 && openDatePicker('idcard_end_date')">
|
||||
<text :class="displayData.idcard_end_date ? 'date-value' : 'placeholder'">
|
||||
{{formatDateForDisplay(displayData.idcard_end_date) || '请选择日期'}}
|
||||
{{ formatDateForDisplay(displayData.idcard_end_date) || '请选择日期' }}
|
||||
</text>
|
||||
<view class="date-divider"></view>
|
||||
<image :src="displayData.legal_idcard_expiry_type === 1 ?
|
||||
|
|
@ -200,10 +226,11 @@
|
|||
<text class="title-text">其他信息</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item-image-box box-cont" >
|
||||
<view class="form-item-image-box box-cont">
|
||||
<text class="label required">行业资质</text>
|
||||
<view class="image-list">
|
||||
<view class="image-item" v-for="(img, index) in displayData.qualifications_sector" :key="'industry-' + index">
|
||||
<view class="image-item" v-for="(img, index) in displayData.qualifications_sector"
|
||||
:key="'industry-' + index">
|
||||
<image :src="img" mode="aspectFill" class="qualification-image"></image>
|
||||
<view class="image-delete" v-if="editable" @click="removeImage('qualifications_sector', index)">×</view>
|
||||
</view>
|
||||
|
|
@ -286,9 +313,11 @@
|
|||
<view class="radio-item" v-for="(item, index) in merchantTypeList" :key="index"
|
||||
@click="selectMerchantType(item)">
|
||||
<view class="radio" :class="{ checked: displayData.uscc_type === item.value }">
|
||||
<image v-if="displayData.uscc_type === item.value" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/cb185ec8-9d30-4e53-b5dc-14b546013a60" class="radio-icon-image" mode="aspectFit"></image>
|
||||
<image v-if="displayData.uscc_type === item.value"
|
||||
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">{{item.label}}</text>
|
||||
<text class="radio-label">{{ item.label }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -313,13 +342,13 @@
|
|||
<picker-view :value="dateValue" @change="bindDateChange" class="picker-scroll"
|
||||
:indicator-style="indicatorStyle" mode="date" fields="day">
|
||||
<picker-view-column>
|
||||
<view class="picker-item" v-for="(year, index) in years" :key="index">{{year}}年</view>
|
||||
<view class="picker-item" v-for="(year, index) in years" :key="index">{{ year }}年</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view class="picker-item" v-for="(month, index) in months" :key="index">{{month}}月</view>
|
||||
<view class="picker-item" v-for="(month, index) in months" :key="index">{{ month }}月</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view class="picker-item" v-for="(day, index) in days" :key="index">{{day}}日</view>
|
||||
<view class="picker-item" v-for="(day, index) in days" :key="index">{{ day }}日</view>
|
||||
</picker-view-column>
|
||||
</picker-view>
|
||||
</view>
|
||||
|
|
@ -331,7 +360,9 @@
|
|||
<view class="tip-popup-mask" @click="hideTipPopup"></view>
|
||||
<view class="tip-popup-content">
|
||||
<!-- 弹窗背景图片 -->
|
||||
<image class="tip-popup-bg" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ab410a5d-5819-47f2-a0fc-3fd6b90d6770" mode="aspectFit"></image>
|
||||
<image class="tip-popup-bg"
|
||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ab410a5d-5819-47f2-a0fc-3fd6b90d6770"
|
||||
mode="aspectFit"></image>
|
||||
|
||||
<!-- 弹窗内容 -->
|
||||
<view class="tip-popup-body">
|
||||
|
|
@ -416,9 +447,9 @@ export default {
|
|||
data() {
|
||||
const currentDate = new Date();
|
||||
const currentYear = new Date().getFullYear();
|
||||
const years = Array.from({length: 130}, (_, i) => 1970 + i);
|
||||
const months = Array.from({length: 12}, (_, i) => i + 1);
|
||||
const days = Array.from({length: 31}, (_, i) => i + 1);
|
||||
const years = Array.from({ length: 130 }, (_, i) => 1970 + i);
|
||||
const months = Array.from({ length: 12 }, (_, i) => i + 1);
|
||||
const days = Array.from({ length: 31 }, (_, i) => i + 1);
|
||||
|
||||
return {
|
||||
// 页面状态
|
||||
|
|
@ -471,6 +502,8 @@ export default {
|
|||
regionCitys: [],
|
||||
regionAreas: [],
|
||||
regionValue: [0, 0, 0],
|
||||
addressListener: null,
|
||||
sjAddressListener: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -488,6 +521,8 @@ export default {
|
|||
this.regionCitys = this.ChinaCitys[0].citys;
|
||||
this.regionAreas = this.regionCitys[0].areas;
|
||||
|
||||
this.setupAddressListener();
|
||||
|
||||
this.getUserInfo().then(() => {
|
||||
this.loadApplyDetails();
|
||||
});
|
||||
|
|
@ -496,19 +531,18 @@ export default {
|
|||
this.getButtonAreaHeight();
|
||||
},
|
||||
onShow() {
|
||||
// 只有在非编辑状态下才重新加载数据
|
||||
this.checkAddressData();
|
||||
if (!this.editable) {
|
||||
console.log('非编辑状态,刷新数据');
|
||||
this.loadApplyDetails();
|
||||
|
||||
if (this.auditStatus !== 3) {
|
||||
this.backText = '';
|
||||
this.hasResubmitted = false;
|
||||
}
|
||||
} else {
|
||||
console.log('编辑状态,保持当前状态不刷新');
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
this.removeAddressListener();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 识别营业执照
|
||||
|
|
@ -777,6 +811,11 @@ export default {
|
|||
uscc_name: userData.uscc_name || '',
|
||||
uscc_dependency: userData.uscc_dependency || '',
|
||||
uscc_address: userData.uscc_address || '',
|
||||
uscc_province: userData.uscc_province || '',
|
||||
uscc_city: userData.uscc_city || '',
|
||||
uscc_area: userData.uscc_area || '',
|
||||
longitude: userData.longitude || '',
|
||||
latitude: userData.latitude || '',
|
||||
uscc_expiry_type: userData.uscc_expiry_type || null,
|
||||
uscc_expiry: userData.uscc_expiry || '',
|
||||
license_start_date: '',
|
||||
|
|
@ -982,6 +1021,11 @@ export default {
|
|||
uscc_name: detail.uscc_name || this.originalData.uscc_name,
|
||||
uscc_dependency: detail.uscc_dependency || this.originalData.uscc_dependency,
|
||||
uscc_address: detail.uscc_address || this.originalData.uscc_address,
|
||||
uscc_province: detail.uscc_province || this.originalData.uscc_province,
|
||||
uscc_city: detail.uscc_city || this.originalData.uscc_city,
|
||||
uscc_area: detail.uscc_area || this.originalData.uscc_area,
|
||||
longitude: detail.longitude || this.originalData.longitude || '',
|
||||
latitude: detail.latitude || this.originalData.latitude || '',
|
||||
uscc_expiry_type: detail.uscc_expiry_type || this.originalData.uscc_expiry_type,
|
||||
uscc_expiry: detail.uscc_expiry || this.originalData.uscc_expiry,
|
||||
license_start_date: '',
|
||||
|
|
@ -1084,6 +1128,11 @@ export default {
|
|||
uscc_name: userData.uscc_name || '',
|
||||
uscc_dependency: userData.uscc_dependency || '',
|
||||
uscc_address: userData.uscc_address || '',
|
||||
uscc_province: userData.uscc_province || '',
|
||||
uscc_city: userData.uscc_city || '',
|
||||
uscc_area: userData.uscc_area || '',
|
||||
longitude: userData.longitude || '',
|
||||
latitude: userData.latitude || '',
|
||||
uscc_expiry_type: userData.uscc_expiry_type || null,
|
||||
uscc_expiry: userData.uscc_expiry || '',
|
||||
license_start_date: '',
|
||||
|
|
@ -1304,6 +1353,9 @@ export default {
|
|||
uscc_name: this.displayData.uscc_name,
|
||||
uscc_dependency: this.displayData.uscc_dependency,
|
||||
uscc_address: this.displayData.uscc_address,
|
||||
uscc_province: this.displayData.uscc_province,
|
||||
uscc_city: this.displayData.uscc_city,
|
||||
uscc_area: this.displayData.uscc_area,
|
||||
uscc_expiry_type: this.displayData.uscc_expiry_type,
|
||||
uscc_expiry: this.displayData.uscc_expiry,
|
||||
legal_name: this.displayData.legal_name,
|
||||
|
|
@ -1426,6 +1478,18 @@ export default {
|
|||
let city = this.regionCitys[index2].city;
|
||||
let area = this.regionAreas[index3].area;
|
||||
this.$set(this.displayData, 'uscc_dependency', province + '-' + city + '-' + area);
|
||||
if (this.ChinaCitys[index1] && this.ChinaCitys[index1].code) {
|
||||
this.$set(this.displayData, 'uscc_province', String(this.ChinaCitys[index1].code).substring(0, 6));
|
||||
}
|
||||
if (this.regionCitys[index2] && this.regionCitys[index2].code) {
|
||||
this.$set(this.displayData, 'uscc_city', String(this.regionCitys[index2].code).substring(0, 6));
|
||||
}
|
||||
if (this.regionAreas[index3] && this.regionAreas[index3].code) {
|
||||
this.$set(this.displayData, 'uscc_area', String(this.regionAreas[index3].code).substring(0, 6));
|
||||
}
|
||||
this.$set(this.displayData, 'uscc_address', '');
|
||||
this.$set(this.displayData, 'longitude', '');
|
||||
this.$set(this.displayData, 'latitude', '');
|
||||
this.hideRegionPopup();
|
||||
},
|
||||
|
||||
|
|
@ -1764,6 +1828,163 @@ export default {
|
|||
this.showTipPopupFlag = false;
|
||||
},
|
||||
|
||||
buildRegionTextForSearch() {
|
||||
const dependency = String(this.displayData.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.displayData.uscc_address || '').trim();
|
||||
if (!rawAddress) return '';
|
||||
const dependencyText = String(this.displayData.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.displayData.uscc_dependency || '').trim();
|
||||
const dependencyCode = String(this.displayData.uscc_area || '').trim();
|
||||
const address = this.getAddressValueForSearch();
|
||||
const longitude = String(this.displayData.longitude || '').trim();
|
||||
const latitude = String(this.displayData.latitude || '').trim();
|
||||
|
||||
const hasDependency = !!dependency;
|
||||
const hasAddress = !!address;
|
||||
const hasLocation = !!(longitude && latitude);
|
||||
|
||||
let params = 'source=sj_change';
|
||||
|
||||
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.displayData, 'uscc_address', detailAddress);
|
||||
|
||||
if (addressData.location) {
|
||||
const [longitude, latitude] = String(addressData.location).split(',');
|
||||
this.$set(this.displayData, 'longitude', longitude || '');
|
||||
this.$set(this.displayData, '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.displayData, 'uscc_dependency', locationParts.join('-'));
|
||||
}
|
||||
|
||||
if (addressData.provinceCode) {
|
||||
this.$set(this.displayData, 'uscc_province', String(addressData.provinceCode).substring(0, 6));
|
||||
}
|
||||
if (addressData.cityCode) {
|
||||
this.$set(this.displayData, 'uscc_city', String(addressData.cityCode).substring(0, 6));
|
||||
}
|
||||
if (addressData.districtCode) {
|
||||
this.$set(this.displayData, 'uscc_area', String(addressData.districtCode).substring(0, 6));
|
||||
}
|
||||
|
||||
this.$forceUpdate();
|
||||
},
|
||||
|
||||
// 图片上传方法
|
||||
async chooseImage(type) {
|
||||
if (!this.editable) return;
|
||||
|
|
@ -1913,7 +2134,7 @@ export default {
|
|||
let name = `${userId}_${artisan}_${fieldName}_${timestamp}_${random}.${fileExtension}`;
|
||||
console.log('唯一文件名(包含时间戳):', name);
|
||||
|
||||
const ossConfig = await request.post('/user/getalioss', {type: type, kind: 1});
|
||||
const ossConfig = await request.post('/user/getalioss', { type: type, kind: 1 });
|
||||
|
||||
return await new Promise((resolve, reject) => {
|
||||
uni.uploadFile({
|
||||
|
|
@ -2196,8 +2417,13 @@ export default {
|
|||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.picker-content {
|
||||
|
|
@ -2385,7 +2611,9 @@ export default {
|
|||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.change-info-btn, .view-change-btn, .resubmit-btn {
|
||||
.change-info-btn,
|
||||
.view-change-btn,
|
||||
.resubmit-btn {
|
||||
background: linear-gradient(180deg, #f52540 0%, #e8101e 100%);
|
||||
}
|
||||
|
||||
|
|
@ -2513,7 +2741,8 @@ export default {
|
|||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.cancel-text, .confirm-text {
|
||||
.cancel-text,
|
||||
.confirm-text {
|
||||
font-size: 32rpx;
|
||||
padding: 16rpx;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue