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:
BAKEYi 2026-05-28 11:46:15 +08:00
parent c4c134417a
commit ab99d37f99
8 changed files with 5276 additions and 5641 deletions

View File

@ -1,63 +1,54 @@
<template> <template>
<view class="step-tab"> <view class="step-tab">
<view class="step-container"> <view class="step-container">
<!-- 步骤1: 入驻协议 -->
<view class="step-item" :class="getStepClass(0)"> <view class="step-item" :class="getStepClass(0)">
<view class="step-icon"> <view class="step-icon">
<image <image
v-if="currentStep === 0" v-if="mappedStep === 0"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/55a51333-318f-4ae4-8402-aca265bd499d" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/55a51333-318f-4ae4-8402-aca265bd499d"
class="step-img active-circle" class="step-img active-circle"
mode="aspectFit" mode="aspectFit"
/> />
<view v-else-if="currentStep > 0" class="step-done">1</view> <view v-else-if="mappedStep > 0" class="step-done">1</view>
<view v-else class="step-number">1</view> <view v-else class="step-number">1</view>
</view> </view>
<text class="step-text" :class="{ active: currentStep === 0 }">入驻协议</text> <text class="step-text" :class="{ active: mappedStep === 0 }">入驻协议</text>
</view> </view>
<!-- 第一个连接线 -->
<view class="line-segment line-1"> <view class="line-segment line-1">
<view class="line-progress" :class="{ active: line1Active, deactivating: line1Deactivating }"></view> <view class="line-progress" :class="{ active: line1Active, deactivating: line1Deactivating }"></view>
</view> </view>
<!-- 步骤2: 根据身份显示不同信息 -->
<view class="step-item" :class="getStepClass(1)"> <view class="step-item" :class="getStepClass(1)">
<view class="step-icon"> <view class="step-icon">
<image <image
v-if="currentStep === 1" v-if="mappedStep === 1"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/55a51333-318f-4ae4-8402-aca265bd499d" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/55a51333-318f-4ae4-8402-aca265bd499d"
class="step-img active-circle" class="step-img active-circle"
mode="aspectFit" mode="aspectFit"
/> />
<view v-else-if="currentStep > 1" class="step-done">2</view> <view v-else-if="mappedStep > 1" class="step-done">2</view>
<view v-else class="step-number">2</view> <view v-else class="step-number">2</view>
</view> </view>
<text class="step-text" :class="{ active: currentStep === 1 }"> <text class="step-text" :class="{ active: mappedStep === 1 }">基本信息</text>
{{ identity === 1 ? '个人信息' : '资质信息' }}
</text>
</view> </view>
<!-- 第二个连接线 -->
<view class="line-segment line-2"> <view class="line-segment line-2">
<view class="line-progress" :class="{ active: line2Active, deactivating: line2Deactivating }"></view> <view class="line-progress" :class="{ active: line2Active, deactivating: line2Deactivating }"></view>
</view> </view>
<!-- 步骤3: 根据身份显示不同信息 -->
<view class="step-item" :class="getStepClass(2)"> <view class="step-item" :class="getStepClass(2)">
<view class="step-icon"> <view class="step-icon">
<image <image
v-if="currentStep === 2" v-if="mappedStep === 2"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/55a51333-318f-4ae4-8402-aca265bd499d" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/55a51333-318f-4ae4-8402-aca265bd499d"
class="step-img active-circle" class="step-img active-circle"
mode="aspectFit" mode="aspectFit"
/> />
<view v-else-if="currentStep > 2" class="step-done">3</view> <view v-else-if="mappedStep > 2" class="step-done">3</view>
<view v-else class="step-number">3</view> <view v-else class="step-number">3</view>
</view> </view>
<text class="step-text" :class="{ active: currentStep === 2 }"> <text class="step-text" :class="{ active: mappedStep === 2 }">资质认证</text>
{{ identity === 1 ? '资质信息' : '门店信息' }}
</text>
</view> </view>
</view> </view>
</view> </view>
@ -67,32 +58,23 @@
export default { export default {
name: "StepTab", name: "StepTab",
props: { props: {
// (0, 1, 2) mappedStep: {
currentStep: {
type: Number, type: Number,
default: 0 default: 0
},
// 1-2-
identity: {
type: Number,
default: 2
} }
}, },
data() { data() {
return { return {
prevStep: 0, // prevStep: 0,
line1Active: false, // 线 line1Active: false,
line2Active: false, // 线 line2Active: false,
line1Deactivating: false, // 线 line1Deactivating: false,
line2Deactivating: false // 线 line2Deactivating: false
}; };
}, },
watch: { watch: {
// currentStep线 mappedStep(newVal, oldVal) {
currentStep(newVal, oldVal) {
this.prevStep = oldVal; this.prevStep = oldVal;
//
if (newVal > oldVal) { if (newVal > oldVal) {
if (newVal >= 1) { if (newVal >= 1) {
this.line1Active = true; this.line1Active = true;
@ -102,38 +84,34 @@ export default {
this.line2Active = true; this.line2Active = true;
this.line2Deactivating = false; this.line2Deactivating = false;
} }
} } else if (newVal < oldVal) {
//
else if (newVal < oldVal) {
if (newVal < 2) { if (newVal < 2) {
this.line2Deactivating = true; this.line2Deactivating = true;
setTimeout(() => { setTimeout(() => {
this.line2Active = false; this.line2Active = false;
this.line2Deactivating = false; this.line2Deactivating = false;
}, 300); // }, 300);
} }
if (newVal < 1) { if (newVal < 1) {
this.line1Deactivating = true; this.line1Deactivating = true;
setTimeout(() => { setTimeout(() => {
this.line1Active = false; this.line1Active = false;
this.line1Deactivating = false; this.line1Deactivating = false;
}, 300); // }, 300);
} }
} }
} }
}, },
mounted() { mounted() {
// 线 this.line1Active = this.mappedStep >= 1;
this.line1Active = this.currentStep >= 1; this.line2Active = this.mappedStep >= 2;
this.line2Active = this.currentStep >= 2;
}, },
methods: { methods: {
// CSS
getStepClass(stepIndex) { getStepClass(stepIndex) {
if (stepIndex === this.currentStep) { if (stepIndex === this.mappedStep) {
return 'active'; return 'active';
} }
else if (stepIndex < this.currentStep) { else if (stepIndex < this.mappedStep) {
return 'completed'; return 'completed';
} }
return ''; return '';
@ -259,35 +237,16 @@ export default {
transform-origin: left center; transform-origin: left center;
} }
/* 激活状态的线条 - 前进动画 */
.line-progress.active { .line-progress.active {
width: 100%; width: 100%;
background-color: #E8101E; background-color: #E8101E;
transition: width 0.3s ease; transition: width 0.3s ease;
} }
/* 取消激活状态的线条 - 返回动画 */
.line-progress.deactivating { .line-progress.deactivating {
width: 0%; width: 0%;
background-color: #E8101E; background-color: #E8101E;
transition: width 0.3s ease; transition: width 0.3s ease;
transform-origin: right center; transform-origin: right center;
} }
/* 响应式调整 */
@media (max-width: 750rpx) {
.step-container {
/* padding: 5rpx 40rpx; */
}
.line-segment {
/* width: 100rpx; */
}
/* .line-1,
.line-2 {
margin-left: 15rpx;
margin-right: 15rpx;
} */
}
</style> </style>

View File

@ -1006,6 +1006,12 @@
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path": "pages/ruzhu/successruzhu",
"style": {
"navigationBarTitleText": "入驻成功"
}
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -4,23 +4,23 @@
<custom-navbar :title="navTitle" :showBack="true"></custom-navbar> <custom-navbar :title="navTitle" :showBack="true"></custom-navbar>
<!-- 步骤切换 --> <!-- 步骤切换 -->
<step-tab :currentStep="currentStep" :identity="identity"></step-tab> <step-tab v-if="currentStep !== 2" :mappedStep="mappedStep"></step-tab>
<!-- 内容区域根据身份和步骤显示不同内容 --> <!-- 内容区域根据身份和步骤显示不同内容 -->
<view class="content"> <view class="content">
<!-- 入驻协议内容 -->
<view class="xieyi_content" v-if="currentStep === 0"> <view class="xieyi_content" v-if="currentStep === 0">
<rich-text :nodes="textData.text"></rich-text> <rich-text :nodes="textData.text"></rich-text>
</view> </view>
<!-- 步骤1: 根据身份显示不同内容 -->
<view v-else-if="currentStep === 1"> <view v-else-if="currentStep === 1">
<!-- 手艺人显示个人信息商家显示资质信息 -->
<qualification-info ref="qualificationInfo"></qualification-info> <qualification-info ref="qualificationInfo"></qualification-info>
</view> </view>
<!-- 步骤2: 根据身份显示不同内容 -->
<view v-else-if="currentStep === 2"> <view v-else-if="currentStep === 2">
<!-- 手艺人显示资质信息商家显示门店信息 --> <successruzhu :data="successData"></successruzhu>
</view>
<view v-else-if="currentStep === 3">
<store-info ref="storeInfo"></store-info> <store-info ref="storeInfo"></store-info>
</view> </view>
</view> </view>
@ -28,7 +28,7 @@
<!-- 底部按钮区域 --> <!-- 底部按钮区域 -->
<view class="bottom-fixed"> <view class="bottom-fixed">
<!-- 步骤0: 入驻协议 - 只显示下一步 --> <!-- 步骤0: 入驻协议 -->
<view v-if="currentStep === 0" class="step-0-buttons"> <view v-if="currentStep === 0" class="step-0-buttons">
<view class="agree"> <view class="agree">
<image v-if="!isAgree" src="/static/images/agree_n.png" class="agree-btn" mode="aspectFit" <image v-if="!isAgree" src="/static/images/agree_n.png" class="agree-btn" mode="aspectFit"
@ -38,24 +38,36 @@
<text class="agree-tip">我已阅读并同意以上协议</text> <text class="agree-tip">我已阅读并同意以上协议</text>
</view> </view>
<view class="next-btn" @click="goNext"> <view class="next-btn" @click="goNext">
<text class="next-text">下一步填写资质信息</text> <text class="next-text">下一步填写基本信息</text>
</view> </view>
</view> </view>
<!-- 步骤1: 资质信息 - 显示上一步和下一步 --> <!-- 步骤1: 资质信息 -->
<view v-else-if="currentStep === 1" class="step-1-buttons"> <view v-else-if="currentStep === 1" class="step-1-buttons">
<view class="button-row"> <view class="button-row">
<view class="prev-btn" @click="goPrev"> <view class="prev-btn" @click="goPrev">
<text class="prev-text">上一步</text> <text class="prev-text">上一步</text>
</view> </view>
<view class="next-btn" @click="goNext"> <view class="next-btn" @click="goNext">
<text class="next-text">下一步填写门店信息</text> <text class="next-text">提交入驻</text>
</view> </view>
</view> </view>
</view> </view>
<!-- 步骤2: 门店信息 - 显示上一步和提交申请 --> <!-- 步骤2: 提交成功 -->
<view v-else-if="currentStep === 2" class="step-2-buttons"> <view v-else-if="currentStep === 2" class="step-2-buttons">
<view class="button-row">
<view class="prev-btn" @click="topt">
<text class="prev-text">进入平台</text>
</view>
<view class="submit-btn" @click="goNext">
<text class="submit-text">去完成资质认证</text>
</view>
</view>
</view>
<!-- 步骤3: 门店信息 -->
<view v-else-if="currentStep === 3" class="step-2-buttons">
<view class="button-row"> <view class="button-row">
<view class="prev-btn" @click="goPrev"> <view class="prev-btn" @click="goPrev">
<text class="prev-text">上一步</text> <text class="prev-text">上一步</text>
@ -74,16 +86,18 @@
import StepTab from '@/components/step-tab/step-tab.vue'; import StepTab from '@/components/step-tab/step-tab.vue';
import QualificationInfo from './qualification_sj.vue'; import QualificationInfo from './qualification_sj.vue';
import StoreInfo from './sj-info.vue'; import StoreInfo from './sj-info.vue';
import successruzhu from './successruzhu.vue';
export default { export default {
components: { components: {
StepTab, StepTab,
QualificationInfo, QualificationInfo,
StoreInfo, StoreInfo,
successruzhu
}, },
data() { data() {
return { return {
currentStep: 0, // currentStep:3, //
isAgree: false, isAgree: false,
identity: null, identity: null,
textData: {}, textData: {},
@ -92,6 +106,7 @@
navTitle: '商家入驻', // navTitle: '商家入驻', //
qualificationData: null, // qualificationData: null, //
storeInfoData: null, // storeInfoData: null, //
successData:{},//
// //
artisanDataCache: { artisanDataCache: {
personalInfo: null, personalInfo: null,
@ -99,6 +114,14 @@
} }
} }
}, },
computed: {
mappedStep() {
if (this.currentStep === 0) return 0;
if (this.currentStep === 1) return 1;
if (this.currentStep === 3) return 2;
return 0;
}
},
async onLoad(options) { async onLoad(options) {
this.identity = 2; this.identity = 2;
await this.getUserInfoSync() await this.getUserInfoSync()
@ -113,6 +136,11 @@
}, },
methods: { methods: {
topt(){
uni.switchTab({
url:'/pages/home/home'
})
},
// //
async getUserInfoSync() { async getUserInfoSync() {
await request.post('/sj/userSjAuth/details', { await request.post('/sj/userSjAuth/details', {
@ -122,59 +150,36 @@
let data = result.data let data = result.data
if (getApp().globalData.artisanType == 2) { if (getApp().globalData.artisanType == 2) {
//
let qualification_form_data = { let qualification_form_data = {
"uscc_num": data.uscc_num, "uscc_type": data.uscc_type || '',
"uscc_name": data.uscc_name, // "contact_identity": 'legal',
"legal_name": data.legal_name, // "contact_name": data.legal_name || data.contact_name || '',
"legal_phone": data.legal_phone, "contact_phone": data.legal_phone || data.contact_phone || '',
"legal_idcard_num": data.legal_idcard_num, "backup_phone": data.backup_phone || '',
"uscc_photo": data.uscc_photo, "invite_code": data.invite_code_other || '',
"legal_idcard_positive": data.legal_idcard_positive, "dependency": data.dependency || '',
"legal_idcard_negative": data.legal_idcard_negative, "address": data.address || '',
"uscc_type": data.uscc_type, "dependency_code": data.dependency_code || '',
"license_valid_type": data.uscc_expiry_type, "dependency_province": data.dependency_province || '',
} "dependency_city": data.dependency_city || '',
if (data.uscc_expiry) { "longitude": data.longitude || '',
let expirys = data.uscc_expiry.split(' —— ') "latitude": data.latitude || '',
qualification_form_data.license_start_date = expirys[0] "name": data.name || '',
qualification_form_data.license_end_date = expirys[1] "contact_type": data.contact_type || ''
}
if (data.legal_idcard_expiry) {
let expirys = data.legal_idcard_expiry.split(' —— ')
qualification_form_data.idcard_start_date = expirys[0]
if (expirys[1]) {
qualification_form_data.legal_idcard_expiry_type = "date"
qualification_form_data.idcard_end_date = expirys[1]
} else {
qualification_form_data.legal_idcard_expiry_type = "permanent"
qualification_form_data.idcard_end_date = ""
}
} }
uni.setStorageSync('qualification_form_data', qualification_form_data); uni.setStorageSync('qualification_form_data', qualification_form_data);
let store_invite_state = { let store_info_form_data = {
"currentValidatingCode": data.invite_code_other "head_photo": data.head_photo,
} "name": data.name,
uni.setStorageSync('store_invite_state', store_invite_state); "business_time": data.business_time,
let store_info_form_data = { // "servers_kill": data.servers_kill,
"head_photo": data.head_photo, "apply_state": data.apply_state,
"name": data.name, "invite_code_other": data.invite_code_other,
"business_time": data.business_time, "major": data.major
"servers_kill": data.servers_kill, }
"dependency": data.dependency, console.log(111111111, store_info_form_data)
"address": data.address, uni.setStorageSync('store_info_form_data', store_info_form_data);
"apply_state": data.apply_state,
"invite_code_other": data.invite_code_other,
"major": data.major,
"dependency_code": data.dependency_code,
"dependency_province": data.dependency_province,
"dependency_city": data.dependency_city,
"longitude": data.longitude,
"latitude": data.latitude
}
console.log(111111111, store_info_form_data)
uni.setStorageSync('store_info_form_data', store_info_form_data);
} }
} }
@ -182,65 +187,6 @@
console.error('获取用户信息接口错误:', error); console.error('获取用户信息接口错误:', error);
}); });
}, },
/**
* 解析身份证有效期字符串转换为中文日期格式兼容低版本iOS支持结束日期为空/长期
* @param {string} expiryStr 原有效期字符串格式如"2016-01-29 —— 2026-01-29" | "2016-01-29 —— " | "2016-01-29 —— 长期"
* @returns {Object} 包含开始和结束日期的对象
*/
parseIdCardExpiry(expiryStr) {
//
let id_card_start_date = '';
let id_card_end_date = '';
try {
// 1. ---
const dateParts = expiryStr.split(/\s*[-—]{1,2}\s*/).map(str => str.trim());
//
const startStr = dateParts[0] || '';
const endStr = dateParts[1] || '';
// 2. iOS
const formatDateToChinese = (dateStr) => {
//
if (!dateStr) return '';
//
if (dateStr === '长期') return '长期';
// iOSyyyy-mm-ddyyyy/mm/dd
const compatibleStr = dateStr.replace(/-/g, '/');
const date = new Date(compatibleStr);
//
if (isNaN(date.getTime())) {
return ''; //
}
//
const year = date.getFullYear();
const month = date.getMonth() + 1;
const day = date.getDate();
return `${year}${month}${day}`;
};
// 3.
if (startStr) {
id_card_start_date = formatDateToChinese(startStr);
}
// 4.
id_card_end_date = formatDateToChinese(endStr);
} catch (err) {
console.error('解析身份证有效期失败:', err);
}
// 5.
return {
id_card_start_date,
id_card_end_date
};
},
// //
checkAndPassAddressToSj() { checkAndPassAddressToSj() {
try { try {
@ -248,38 +194,15 @@
if (sjAddress) { if (sjAddress) {
console.log('找到商家地址数据,准备传递:', sjAddress); console.log('找到商家地址数据,准备传递:', sjAddress);
//
setTimeout(() => { setTimeout(() => {
if (this.identity === 2 && this.$refs.storeInfo) { if (this.identity === 2 && this.$refs.qualificationInfo) {
console.log('传递地址给商家组件'); console.log('传递地址给资质组件');
if (typeof this.$refs.qualificationInfo.handleAddressSelected === 'function') {
// this.$refs.qualificationInfo.handleAddressSelected(sjAddress);
if (typeof this.$refs.storeInfo.handleAddressSelected === 'function') {
this.$refs.storeInfo.handleAddressSelected(sjAddress);
} else if (this.$refs.storeInfo.formData) {
//
this.$refs.storeInfo.formData.address = sjAddress.address || sjAddress
.name;
this.$refs.storeInfo.formData.longitude = sjAddress.longitude;
this.$refs.storeInfo.formData.latitude = sjAddress.latitude;
//
if (sjAddress.pname || sjAddress.cityname || sjAddress.adname) {
const locationParts = [];
if (sjAddress.pname) locationParts.push(sjAddress.pname);
if (sjAddress.cityname) locationParts.push(sjAddress.cityname);
if (sjAddress.adname) locationParts.push(sjAddress.adname);
this.$refs.storeInfo.formData.dependency = locationParts.join('-');
}
this.$refs.storeInfo.saveFormDataToLocal();
this.$refs.storeInfo.$forceUpdate();
}
//
uni.removeStorageSync('sj_selected_address');
} }
}, 300); }
uni.removeStorageSync('sj_selected_address');
}, 300);
} }
} catch (e) { } catch (e) {
console.error('处理商家地址失败:', e); console.error('处理商家地址失败:', e);
@ -400,82 +323,32 @@
// //
async submitForReview() { async submitForReview() {
//
const userInfo = await this.checkAndGetUserInfo(); const userInfo = await this.checkAndGetUserInfo();
if (!userInfo) { if (!userInfo) {
return; return;
} }
uni.showLoading({ uni.showLoading({ title: '提交中...' });
title: '提交中...'
});
try { try {
console.log('=== 提交审核调试信息 ==='); let formData = this.buildBusinessData(this.qualificationData, {});
console.log('身份类型:', this.identity); formData.type = 1;
console.log('门店信息数据:', this.storeInfoData); formData.id_type = 1;
console.log('资质信息数据:', this.qualificationData);
console.log('个人信息数据:', this.personalInfoData);
let apiUrl = '';
let formData = {};
if (this.identity === 2) {
//
apiUrl = '/sj/userSjAuth/apply';
//
if (this.$refs.storeInfo) {
if (!this.$refs.storeInfo.saveFormData()) {
uni.hideLoading();
return;
}
this.storeInfoData = this.$refs.storeInfo.getFormData();
console.log('重新获取的门店信息:', this.storeInfoData);
}
//
if (!this.storeInfoData || !this.storeInfoData.servers_kill || this.storeInfoData
.servers_kill.length === 0) {
uni.hideLoading();
uni.showToast({
title: '请选择服务技能',
icon: 'none'
});
return;
}
formData = this.buildBusinessData(this.qualificationData, this.storeInfoData);
}
console.log('提交的数据:', formData);
console.log('API URL:', apiUrl);
formData.type = 1
formData.id_type = 1
const res = await request.post(apiUrl, formData);
const res = await request.post('/sj/userSjAuth/applyOne', formData);
uni.hideLoading(); uni.hideLoading();
if (res.state == 1 || res.code == 200) { if (res.state == 1 || res.code == 200) {
// this.successData=res.data.customer_service
console.log(this.successData,'this.successDatathis.successDatathis.successDatathis.successData=======');
uni.showToast({ uni.showToast({
title: '提交成功', title: '提交成功',
icon: 'none', icon: 'none',
duration: 1500, duration: 1500
success: () => {
setTimeout(() => {
uni.redirectTo({
url: `./submitres?identity=${this.identity}&applyState=1`
});
}, 1500);
}
}); });
setTimeout(() => {
this.currentStep = 2;
}, 1500);
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg || '提交失败', title: res.msg || '提交失败',
@ -484,7 +357,6 @@
} }
} catch (error) { } catch (error) {
uni.hideLoading(); uni.hideLoading();
console.error('提交审核失败:', error);
uni.showToast({ uni.showToast({
title: '提交失败,请重试', title: '提交失败,请重试',
icon: 'none' icon: 'none'
@ -492,106 +364,63 @@
} }
}, },
//
formatDateForBackend(dateStr) {
if (!dateStr) return '';
if (dateStr === '长久有效' || dateStr === '长久有效') return '';
// YYYY-MM-DD
const match = dateStr.match(/(\d+)年(\d+)月(\d+)日/);
if (match) {
const year = match[1];
const month = match[2].padStart(2, '0');
const day = match[3].padStart(2, '0');
return `${year}-${month}-${day}`;
}
// YYYY-MM-DD
return dateStr;
},
// //
buildBusinessData(qualificationData, storeData) { buildBusinessData(qualificationData, storeData) {
// console.log(qualificationData,'storeDatastoreDatastoreData');
const formData = {}; const formData = {};
// -
if (storeData && storeData.servers_kill && storeData.servers_kill.length > 0) {
// servers_kill
formData.servers_kill = Array.isArray(storeData.servers_kill) ?
storeData.servers_kill : [storeData.servers_kill];
console.log('服务技能数组:', formData.servers_kill);
} else {
console.warn('警告:没有服务技能数据');
formData.servers_kill = [];
}
//
if (qualificationData.uscc_type) { if (qualificationData.uscc_type) {
formData.uscc_type = qualificationData.uscc_type === 'individual' ? 1 : 2; formData.uscc_type = qualificationData.uscc_type;
} }
if (qualificationData.uscc_photo) { // if (qualificationData.contact_identity) {
formData.uscc_photo = qualificationData.uscc_photo; // formData.contact_identity = qualificationData.contact_identity;
// }
// if (qualificationData.contact_name) {
// formData.contact_name = qualificationData.contact_name;
// }
if (qualificationData.contact_phone) {
formData.contact_phone = qualificationData.contact_phone;
} }
if (qualificationData.uscc_num) { if (qualificationData.backup_phone) {
formData.uscc_num = qualificationData.uscc_num; formData.backup_phone = qualificationData.backup_phone;
} }
if (qualificationData.uscc_name) { if (qualificationData.contact_type) {
formData.uscc_name = qualificationData.uscc_name; formData.contact_type = qualificationData.contact_type;
} }
if (qualificationData.license_valid_type) { if (qualificationData.invite_code) {
formData.uscc_expiry_type = qualificationData.license_valid_type === 'permanent' ? 1 : 2; formData.invite_code_other = qualificationData.invite_code;
}
if (qualificationData.contact_name) {
formData.contact_name = qualificationData.contact_name;
} }
// if (qualificationData.dependency) {
if (qualificationData.license_start_date) { formData.dependency = qualificationData.dependency;
const startDate = this.formatDateForBackend(qualificationData.license_start_date); }
if (qualificationData.dependency_code) {
formData.dependency_code = qualificationData.dependency_code;
}
if (qualificationData.dependency_province) {
formData.dependency_province = qualificationData.dependency_province;
}
if (qualificationData.dependency_city) {
formData.dependency_city = qualificationData.dependency_city;
}
if (qualificationData.name) {
formData.name = qualificationData.name;
}
if (qualificationData.address) {
formData.address = qualificationData.address;
}
if (qualificationData.longitude) formData.longitude = qualificationData.longitude;
if (qualificationData.latitude) formData.latitude = qualificationData.latitude;
if (qualificationData.license_valid_type === 'permanent') { // if (storeData && storeData.servers_kill && storeData.servers_kill.length > 0) {
// + " " // // formData.servers_kill = Array.isArray(storeData.servers_kill) ?
formData.uscc_expiry = `${startDate} —— `; // // storeData.servers_kill : [storeData.servers_kill];
} else if (qualificationData.license_end_date) { // } else {
// + " " + // formData.servers_kill = [];
const endDate = this.formatDateForBackend(qualificationData.license_end_date); // }
formData.uscc_expiry = `${startDate} —— ${endDate}`;
}
}
//
if (qualificationData.legal_name) {
formData.legal_name = qualificationData.legal_name;
}
if (qualificationData.legal_phone) {
formData.legal_phone = qualificationData.legal_phone;
}
if (qualificationData.legal_idcard_num) {
formData.legal_idcard_num = qualificationData.legal_idcard_num;
}
if (qualificationData.legal_idcard_expiry_type) {
formData.legal_idcard_expiry_type = qualificationData.legal_idcard_expiry_type === 'permanent' ? 1 : 2;
}
//
if (qualificationData.idcard_start_date) {
const idcardStartDate = this.formatDateForBackend(qualificationData.idcard_start_date);
if (qualificationData.legal_idcard_expiry_type === 'permanent') {
formData.legal_idcard_expiry = `${idcardStartDate} —— `;
} else if (qualificationData.idcard_end_date) {
const idcardEndDate = this.formatDateForBackend(qualificationData.idcard_end_date);
formData.legal_idcard_expiry = `${idcardStartDate} —— ${idcardEndDate}`;
}
}
if (qualificationData.legal_idcard_positive) {
formData.legal_idcard_positive = qualificationData.legal_idcard_positive;
}
if (qualificationData.legal_idcard_negative) {
formData.legal_idcard_negative = qualificationData.legal_idcard_negative;
}
//
if (storeData.head_photo) { if (storeData.head_photo) {
formData.head_photo = storeData.head_photo; formData.head_photo = storeData.head_photo;
} }
@ -601,86 +430,38 @@
if (storeData.business_time) { if (storeData.business_time) {
formData.business_time = storeData.business_time; formData.business_time = storeData.business_time;
} }
if (storeData.servers_kill && storeData.servers_kill.length > 0) {
//
formData.servers_kill = storeData.servers_kill;
console.log('服务技能数组:', formData.servers_kill);
} else {
formData.servers_kill = [];
console.warn('警告:没有服务技能数据');
}
console.log('最终 formData 中的 servers_kill:', formData.servers_kill);
console.log('=== 调试结束 ===');
if (storeData.dependency) {
formData.dependency = storeData.dependency;
//
if (storeData.dependency_code) {
formData.dependency_code = storeData.dependency_code;
}
if (storeData.dependency_province) {
formData.dependency_province = storeData.dependency_province;
}
if (storeData.dependency_city) {
formData.dependency_city = storeData.dependency_city;
}
}
if (storeData.address) {
formData.address = storeData.address;
}
//
if (storeData.longitude) formData.longitude = storeData.longitude;
if (storeData.latitude) formData.latitude = storeData.latitude;
//
if (storeData.apply_state) { if (storeData.apply_state) {
formData.get_msg_method = storeData.apply_state; formData.get_msg_method = storeData.apply_state;
} }
if (storeData.invite_code_other) {
formData.invite_code_other = storeData.invite_code_other;
}
if (storeData.major) { if (storeData.major) {
formData.major = storeData.major; formData.major = storeData.major;
} }
// -
// 使 qualificationData storeData
const userInfo = uni.getStorageSync('userInfo');
const userInfo = uni.getStorageSync('userInfo');
if (userInfo && userInfo.account) { if (userInfo && userInfo.account) {
formData.account = userInfo.account; formData.account = userInfo.account;
} else { } else {
//
const loginAccount = uni.getStorageSync('loginAccount'); const loginAccount = uni.getStorageSync('loginAccount');
if (loginAccount) { if (loginAccount) {
formData.account = loginAccount; formData.account = loginAccount;
} else if (qualificationData.contact_phone) {
formData.contact_name = qualificationData.contact_name;
} else { } else {
// console.error('无法获取账号信息');
if (qualificationData.legal_phone) { uni.showToast({
formData.account = qualificationData.legal_phone; title: '无法获取用户账号',
} else { icon: 'none'
console.error('无法获取账号信息'); });
uni.showToast({ return null;
title: '无法获取用户账号',
icon: 'none'
});
return null;
}
} }
} }
console.log('使用的账号:', formData.account);
return formData; return formData;
}, },
async goNext() { async goNext() {
console.log('当前步骤:', this.currentStep);
console.log('身份类型:', this.identity);
// 0
if (this.currentStep === 0 && !this.isAgree) { if (this.currentStep === 0 && !this.isAgree) {
uni.showToast({ uni.showToast({
title: '请阅读并同意以上协议', title: '请阅读并同意以上协议',
@ -689,68 +470,55 @@
return; return;
} }
// 1
if (this.currentStep === 1) { if (this.currentStep === 1) {
console.log('商家验证资质信息');
//
if (this.$refs.qualificationInfo) { if (this.$refs.qualificationInfo) {
const isValid = await this.$refs.qualificationInfo.saveFormData(); const isValid = await this.$refs.qualificationInfo.saveFormData();
if (!isValid) { if (!isValid) {
console.log('商家资质信息验证失败');
return; return;
} }
this.qualificationData = this.$refs.qualificationInfo.getFormData(); this.qualificationData = this.$refs.qualificationInfo.getFormData();
console.log(' 商家资质信息验证通过 ');
} }
await this.submitForReview();
return;
} }
// 2 if (this.currentStep < 3) {
if (this.currentStep === 2) {
//
if (this.$refs.storeInfo) {
const isValid = await this.$refs.storeInfo.saveFormData();
if (!isValid) {
console.log('商家门店信息验证失败');
return;
}
this.storeInfoData = this.$refs.storeInfo.getFormData();
console.log('商家门店信息验证通过');
}
}
if (this.currentStep < 2) {
this.currentStep++; this.currentStep++;
console.log('切换到步骤:', this.currentStep);
//
setTimeout(() => { setTimeout(() => {
this.scrollToTop(); this.scrollToTop();
}, 100); }, 100);
} else {
this.completeRegistration();
} }
}, },
submitApplication() { async submitApplication() {
//
if (this.$refs.storeInfo) { if (this.$refs.storeInfo) {
if (!this.$refs.storeInfo.saveFormData()) { if (!this.$refs.storeInfo.saveFormData()) {
return; return;
} }
this.storeInfoData = this.$refs.storeInfo.getFormData(); this.storeInfoData = this.$refs.storeInfo.getFormData();
console.log('商家门店信息数据:', this.storeInfoData);
} }
// uni.showLoading({ title: '提交中...' });
if (this.$refs.storeInfo && this.$refs.storeInfo.confirmInviteCodeBeforeSubmit) { try {
this.$refs.storeInfo.confirmInviteCodeBeforeSubmit(() => { let formData = {};
// if (this.qualificationData) {
this.completeRegistration(); Object.assign(formData, this.qualificationData);
}); }
} else { if (this.storeInfoData) {
// Object.assign(formData, this.storeInfoData);
this.completeRegistration(); }
formData.type = 1;
formData.id_type = 1;
const res = await request.post('/sj/userSjAuth/apply', formData);
uni.hideLoading();
if (res.state == 1 || res.code == 200) {
uni.showToast({ title: '提交成功', icon: 'none' });
} else {
uni.showToast({ title: res.msg || '提交失败', icon: 'none' });
}
} catch (error) {
uni.hideLoading();
uni.showToast({ title: '提交失败,请重试', icon: 'none' });
} }
}, },
@ -759,11 +527,6 @@
this.currentStep--; this.currentStep--;
} }
}, },
completeRegistration() {
//
this.submitForReview();
},
//
scrollToTop() { scrollToTop() {
uni.pageScrollTo({ uni.pageScrollTo({
scrollTop: 0, scrollTop: 0,
@ -850,7 +613,7 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background: linear-gradient(180deg, #f52540 0%, #e8101e 100%); background: #FF4767;
border-radius: 49rpx; border-radius: 49rpx;
} }
@ -875,7 +638,7 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background: linear-gradient(180deg, #f52540 0%, #e8101e 100%); background: #FF4767;
border-radius: 49rpx; border-radius: 49rpx;
} }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,94 @@
<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> -->
<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="kefubtn">扫码联系专属客服</view>
</view>
</view>
</template>
<script>
export default {
// props
props: {
data: {
type: Object, //
default: () => ({}) //
}
},
onLoad() {
// JS 使
console.log(this.data,'--------------------')
}
}
</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;
}
.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;
}
.erweimabox {
margin: 71rpx 0 0 6rpx;
width: 690rpx;
height: 690rpx;
background: #FFFFFF;
border-radius: 62rpx;
border: 1rpx solid #F2F4F6;
}
.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;
}
.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;
}
</style>