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:40:00 +08:00
commit 6c5347bb9c
8 changed files with 5276 additions and 5641 deletions

View File

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

View File

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

View File

@ -4,7 +4,9 @@
<view class="custom-navbar">
<!-- 左侧返回按钮和标题 -->
<view class="navbar-left">
<image class="back-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/456f4e6c-e86a-42c9-a272-484db9af6c7c" mode="aspectFit" @click="handleBack"></image>
<image class="back-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/456f4e6c-e86a-42c9-a272-484db9af6c7c"
mode="aspectFit" @click="handleBack"></image>
<text class="navbar-title">我的资料</text>
</view>
@ -36,24 +38,48 @@
<!-- 营业时间商家 / 服务时间手艺人 -->
<view class="info-item" @click="navigateToTimeSetting">
<view class="info-left">
<image class="item-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/21f1efaf-0c17-49b0-a2b2-e0fd573b92b3" mode="aspectFit"></image>
<image class="item-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/21f1efaf-0c17-49b0-a2b2-e0fd573b92b3"
mode="aspectFit"></image>
<text class="item-label">{{ identity == '2' ? '营业时间' : '服务时间' }}</text>
</view>
<image class="arrow-right" src="/static/images/arrow_right.png" mode="aspectFit"></image>
<view>
<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;">
</image>
<text style="margin-right: 16rpx; color: #ec5d57;">待完善</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" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/b90e2322-a261-4c17-a581-85010c3bc112" mode="aspectFit"></image>
<image class="item-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/b90e2322-a261-4c17-a581-85010c3bc112"
mode="aspectFit"></image>
<text class="item-label">服务技能</text>
</view>
<image class="arrow-right" src="/static/images/arrow_right.png" mode="aspectFit"></image>
<view>
<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;">
</image>
<text style="margin-right: 16rpx; color: #389930;">已认证</text>
<image class="arrow-right" src="/static/images/arrow_right.png" mode="aspectFit">
</image>
</view>
</view>
<!-- 门店信息 -->
<view class="info-item" v-if="identity == '2'" @click="navigateToShopInfo">
<view class="info-left">
<image class="item-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e9618006-db69-446e-92e1-ba9dd81e79f9" mode="aspectFit"></image>
<image class="item-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e9618006-db69-446e-92e1-ba9dd81e79f9"
mode="aspectFit"></image>
<text class="item-label">门店信息</text>
</view>
<image class="arrow-right" src="/static/images/arrow_right.png" mode="aspectFit"></image>
@ -62,7 +88,9 @@
<!-- 服务区域手艺人显示 -->
<view class="info-item" v-if="identity == '1'" @click="navigateToServiceArea">
<view class="info-left">
<image class="item-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/a35603b1-50fb-4248-9f2e-2dd4d5e249c0" mode="aspectFit"></image>
<image class="item-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/a35603b1-50fb-4248-9f2e-2dd4d5e249c0"
mode="aspectFit"></image>
<text class="item-label">服务区域</text>
</view>
<image class="arrow-right" src="/static/images/arrow_right.png" mode="aspectFit"></image>
@ -71,7 +99,9 @@
<!-- 个人信息手艺人显示 -->
<view class="info-item" v-if="identity == '1'" @click="navigateToPersonalInfo">
<view class="info-left">
<image class="item-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/77dc7a16-3b86-44e5-8acc-5f3b85ffc137" mode="aspectFit"></image>
<image class="item-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/77dc7a16-3b86-44e5-8acc-5f3b85ffc137"
mode="aspectFit"></image>
<text class="item-label">个人信息</text>
</view>
<image class="arrow-right" src="/static/images/arrow_right.png" mode="aspectFit"></image>
@ -80,7 +110,9 @@
<!-- 个人信息手艺人显示 -->
<view class="info-item" @click="navigateToimg">
<view class="info-left">
<image class="item-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/53a9d1e1-e2d2-4001-b599-82e0c0747f1a.png" mode="aspectFit"></image>
<image class="item-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/53a9d1e1-e2d2-4001-b599-82e0c0747f1a.png"
mode="aspectFit"></image>
<text class="item-label">相册管理</text>
</view>
<image class="arrow-right" src="/static/images/arrow_right.png" mode="aspectFit"></image>
@ -89,7 +121,9 @@
<!-- 个人信息手艺人显示 -->
<view class="info-item" @click="navigateTovideo">
<view class="info-left">
<image class="item-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/6fc821cd-8dd1-41f1-8854-889fb5f76b78.png" mode="aspectFit"></image>
<image class="item-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/6fc821cd-8dd1-41f1-8854-889fb5f76b78.png"
mode="aspectFit"></image>
<text class="item-label">视频管理</text>
</view>
<image class="arrow-right" src="/static/images/arrow_right.png" mode="aspectFit"></image>
@ -110,16 +144,29 @@
<!-- 资质信息 -->
<view class="info-item" @click="navigateToQualification">
<view class="info-left">
<image class="item-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/2677692c-5931-4ac7-846e-b6d321184789" mode="aspectFit"></image>
<image class="item-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/2677692c-5931-4ac7-846e-b6d321184789"
mode="aspectFit"></image>
<text class="item-label">资质信息</text>
</view>
<image class="arrow-right" src="/static/images/arrow_right.png" mode="aspectFit"></image>
<view>
<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;">
</image>
<text style="margin-right: 16rpx; color: #e59e45;">审核中</text>
<image class="arrow-right" src="/static/images/arrow_right.png" mode="aspectFit">
</image>
</view>
</view>
<!-- 所属门店手艺人显示 -->
<view class="info-item" v-if="identity == '1'" @click="navigateToBelongShop">
<view class="info-left">
<image class="item-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/b5541cb5-58c1-4e72-b88f-5cf6450338a8" mode="aspectFit"></image>
<image class="item-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/b5541cb5-58c1-4e72-b88f-5cf6450338a8"
mode="aspectFit"></image>
<text class="item-label">所属门店</text>
</view>
<image class="arrow-right" src="/static/images/arrow_right.png" mode="aspectFit"></image>
@ -131,10 +178,12 @@
</template>
<script>
import { handleImgSizeUni } from '@/utils/service.js'
import request from "../../utils/request";
import {
handleImgSizeUni
} from '@/utils/service.js'
import request from "../../utils/request";
export default {
export default {
data() {
return {
identity: '',
@ -252,9 +301,9 @@ export default {
//
handleMpAutoShare() {
//
const url = this.identity == '2'
? `/pages/user/store-detail?id=${this.currentUserId}`
: `/pages/user/syr-detail?id=${this.currentUserId}`;
const url = this.identity == '2' ?
`/pages/user/store-detail?id=${this.currentUserId}` :
`/pages/user/syr-detail?id=${this.currentUserId}`;
uni.navigateTo({
url: url,
@ -286,9 +335,9 @@ export default {
});
//
const url = this.identity == '2'
? `/pages/user/store-detail?id=${this.currentUserId}&autoShare=1`
: `/pages/user/syr-detail?id=${this.currentUserId}&autoShare=1`;
const url = this.identity == '2' ?
`/pages/user/store-detail?id=${this.currentUserId}&autoShare=1` :
`/pages/user/syr-detail?id=${this.currentUserId}&autoShare=1`;
uni.navigateTo({
url: url,
@ -312,12 +361,13 @@ export default {
// APP
executeAppShare(imageUrl) {
//
const backupImageUrl = "https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/yh/1756713709528-717.png?x-oss-process=image/resize,p_40"
const backupImageUrl =
"https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/yh/1756713709528-717.png?x-oss-process=image/resize,p_40"
//
const shareTitle = this.identity == '2'
? "好友刚推了个超赞商家点开认识TA ~"
: "好友刚推了个超赞手艺人点开认识TA ~"
const shareTitle = this.identity == '2' ?
"好友刚推了个超赞商家点开认识TA ~" :
"好友刚推了个超赞手艺人点开认识TA ~"
//
const shareConfig = {
@ -425,7 +475,9 @@ export default {
console.log('调用接口获取用户信息type:', type)
//
const result = await request.post('/user/getuser', { type })
const result = await request.post('/user/getuser', {
type
})
if (result.data && result.data.id) {
this.userInfo = result.data
@ -584,22 +636,23 @@ export default {
})
}
}
}
}
</script>
<style>
.profile-page {
.profile-page {
min-height: 100vh;
background-color: #f5f5f5;
}
}
/* 自定义导航栏样式 */
.custom-navbar {
/* 自定义导航栏样式 */
.custom-navbar {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 108rpx; /* 使用标准导航栏高度 */
height: 108rpx;
/* 使用标准导航栏高度 */
background: white;
display: flex;
align-items: center;
@ -610,21 +663,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;
@ -632,29 +685,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;
@ -662,29 +715,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;
@ -692,17 +745,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;
@ -712,45 +765,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 ;
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;
@ -758,11 +811,11 @@ export default {
line-height: 40rpx;
text-align: left;
font-style: normal;
}
}
.arrow-right {
.arrow-right {
margin-right: 19rpx;
width: 11rpx;
height: 22rpx;
}
}
</style>

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>
<!-- 步骤切换 -->
<step-tab :currentStep="currentStep" :identity="identity"></step-tab>
<step-tab v-if="currentStep !== 2" :mappedStep="mappedStep"></step-tab>
<!-- 内容区域根据身份和步骤显示不同内容 -->
<view class="content">
<!-- 入驻协议内容 -->
<view class="xieyi_content" v-if="currentStep === 0">
<rich-text :nodes="textData.text"></rich-text>
</view>
<!-- 步骤1: 根据身份显示不同内容 -->
<view v-else-if="currentStep === 1">
<!-- 手艺人显示个人信息商家显示资质信息 -->
<qualification-info ref="qualificationInfo"></qualification-info>
</view>
<!-- 步骤2: 根据身份显示不同内容 -->
<view v-else-if="currentStep === 2">
<!-- 手艺人显示资质信息商家显示门店信息 -->
<successruzhu :data="successData"></successruzhu>
</view>
<view v-else-if="currentStep === 3">
<store-info ref="storeInfo"></store-info>
</view>
</view>
@ -28,7 +28,7 @@
<!-- 底部按钮区域 -->
<view class="bottom-fixed">
<!-- 步骤0: 入驻协议 - 只显示下一步 -->
<!-- 步骤0: 入驻协议 -->
<view v-if="currentStep === 0" class="step-0-buttons">
<view class="agree">
<image v-if="!isAgree" src="/static/images/agree_n.png" class="agree-btn" mode="aspectFit"
@ -38,24 +38,36 @@
<text class="agree-tip">我已阅读并同意以上协议</text>
</view>
<view class="next-btn" @click="goNext">
<text class="next-text">下一步填写资质信息</text>
<text class="next-text">下一步填写基本信息</text>
</view>
</view>
<!-- 步骤1: 资质信息 - 显示上一步和下一步 -->
<!-- 步骤1: 资质信息 -->
<view v-else-if="currentStep === 1" class="step-1-buttons">
<view class="button-row">
<view class="prev-btn" @click="goPrev">
<text class="prev-text">上一步</text>
</view>
<view class="next-btn" @click="goNext">
<text class="next-text">下一步填写门店信息</text>
<text class="next-text">提交入驻</text>
</view>
</view>
</view>
<!-- 步骤2: 门店信息 - 显示上一步和提交申请 -->
<!-- 步骤2: 提交成功 -->
<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="prev-btn" @click="goPrev">
<text class="prev-text">上一步</text>
@ -74,16 +86,18 @@
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 {
components: {
StepTab,
QualificationInfo,
StoreInfo,
successruzhu
},
data() {
return {
currentStep: 0, //
currentStep:3, //
isAgree: false,
identity: null,
textData: {},
@ -92,6 +106,7 @@
navTitle: '商家入驻', //
qualificationData: null, //
storeInfoData: null, //
successData:{},//
//
artisanDataCache: {
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) {
this.identity = 2;
await this.getUserInfoSync()
@ -113,6 +136,11 @@
},
methods: {
topt(){
uni.switchTab({
url:'/pages/home/home'
})
},
//
async getUserInfoSync() {
await request.post('/sj/userSjAuth/details', {
@ -122,56 +150,33 @@
let data = result.data
if (getApp().globalData.artisanType == 2) {
//
let qualification_form_data = {
"uscc_num": data.uscc_num,
"uscc_name": data.uscc_name,
"legal_name": data.legal_name,
"legal_phone": data.legal_phone,
"legal_idcard_num": data.legal_idcard_num,
"uscc_photo": data.uscc_photo,
"legal_idcard_positive": data.legal_idcard_positive,
"legal_idcard_negative": data.legal_idcard_negative,
"uscc_type": data.uscc_type,
"license_valid_type": data.uscc_expiry_type,
}
if (data.uscc_expiry) {
let expirys = data.uscc_expiry.split(' —— ')
qualification_form_data.license_start_date = expirys[0]
qualification_form_data.license_end_date = expirys[1]
}
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 = ""
}
"uscc_type": data.uscc_type || '',
// "contact_identity": 'legal',
// "contact_name": data.legal_name || data.contact_name || '',
"contact_phone": data.legal_phone || data.contact_phone || '',
"backup_phone": data.backup_phone || '',
"invite_code": data.invite_code_other || '',
"dependency": data.dependency || '',
"address": data.address || '',
"dependency_code": data.dependency_code || '',
"dependency_province": data.dependency_province || '',
"dependency_city": data.dependency_city || '',
"longitude": data.longitude || '',
"latitude": data.latitude || '',
"name": data.name || '',
"contact_type": data.contact_type || ''
}
uni.setStorageSync('qualification_form_data', qualification_form_data);
let store_invite_state = {
"currentValidatingCode": data.invite_code_other
}
uni.setStorageSync('store_invite_state', store_invite_state);
let store_info_form_data = {
"head_photo": data.head_photo,
"name": data.name,
"business_time": data.business_time,
"servers_kill": data.servers_kill,
"dependency": data.dependency,
"address": data.address,
// "servers_kill": data.servers_kill,
"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
"major": data.major
}
console.log(111111111, store_info_form_data)
uni.setStorageSync('store_info_form_data', store_info_form_data);
@ -182,65 +187,6 @@
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() {
try {
@ -248,37 +194,14 @@
if (sjAddress) {
console.log('找到商家地址数据,准备传递:', sjAddress);
//
setTimeout(() => {
if (this.identity === 2 && this.$refs.storeInfo) {
console.log('传递地址给商家组件');
//
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('-');
if (this.identity === 2 && this.$refs.qualificationInfo) {
console.log('传递地址给资质组件');
if (typeof this.$refs.qualificationInfo.handleAddressSelected === 'function') {
this.$refs.qualificationInfo.handleAddressSelected(sjAddress);
}
this.$refs.storeInfo.saveFormDataToLocal();
this.$refs.storeInfo.$forceUpdate();
}
//
uni.removeStorageSync('sj_selected_address');
}
}, 300);
}
} catch (e) {
@ -400,82 +323,32 @@
//
async submitForReview() {
//
const userInfo = await this.checkAndGetUserInfo();
if (!userInfo) {
return;
}
uni.showLoading({
title: '提交中...'
});
uni.showLoading({ title: '提交中...' });
try {
console.log('=== 提交审核调试信息 ===');
console.log('身份类型:', this.identity);
console.log('门店信息数据:', this.storeInfoData);
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);
let formData = this.buildBusinessData(this.qualificationData, {});
formData.type = 1;
formData.id_type = 1;
const res = await request.post('/sj/userSjAuth/applyOne', formData);
uni.hideLoading();
if (res.state == 1 || res.code == 200) {
//
this.successData=res.data.customer_service
console.log(this.successData,'this.successDatathis.successDatathis.successDatathis.successData=======');
uni.showToast({
title: '提交成功',
icon: 'none',
duration: 1500,
success: () => {
duration: 1500
});
setTimeout(() => {
uni.redirectTo({
url: `./submitres?identity=${this.identity}&applyState=1`
});
this.currentStep = 2;
}, 1500);
}
});
} else {
uni.showToast({
title: res.msg || '提交失败',
@ -484,7 +357,6 @@
}
} catch (error) {
uni.hideLoading();
console.error('提交审核失败:', error);
uni.showToast({
title: '提交失败,请重试',
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) {
//
console.log(qualificationData,'storeDatastoreDatastoreData');
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) {
formData.uscc_type = qualificationData.uscc_type === 'individual' ? 1 : 2;
formData.uscc_type = qualificationData.uscc_type;
}
if (qualificationData.uscc_photo) {
formData.uscc_photo = qualificationData.uscc_photo;
// if (qualificationData.contact_identity) {
// 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) {
formData.uscc_num = qualificationData.uscc_num;
if (qualificationData.backup_phone) {
formData.backup_phone = qualificationData.backup_phone;
}
if (qualificationData.uscc_name) {
formData.uscc_name = qualificationData.uscc_name;
if (qualificationData.contact_type) {
formData.contact_type = qualificationData.contact_type;
}
if (qualificationData.license_valid_type) {
formData.uscc_expiry_type = qualificationData.license_valid_type === 'permanent' ? 1 : 2;
if (qualificationData.invite_code) {
formData.invite_code_other = qualificationData.invite_code;
}
if (qualificationData.contact_name) {
formData.contact_name = qualificationData.contact_name;
}
//
if (qualificationData.license_start_date) {
const startDate = this.formatDateForBackend(qualificationData.license_start_date);
if (qualificationData.dependency) {
formData.dependency = qualificationData.dependency;
}
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') {
// + " "
formData.uscc_expiry = `${startDate} —— `;
} else if (qualificationData.license_end_date) {
// + " " +
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 && storeData.servers_kill && storeData.servers_kill.length > 0) {
// // formData.servers_kill = Array.isArray(storeData.servers_kill) ?
// // storeData.servers_kill : [storeData.servers_kill];
// } else {
// formData.servers_kill = [];
// }
if (storeData.head_photo) {
formData.head_photo = storeData.head_photo;
}
@ -601,65 +430,23 @@
if (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) {
formData.get_msg_method = storeData.apply_state;
}
if (storeData.invite_code_other) {
formData.invite_code_other = storeData.invite_code_other;
}
if (storeData.major) {
formData.major = storeData.major;
}
// -
// 使 qualificationData storeData
const userInfo = uni.getStorageSync('userInfo');
const userInfo = uni.getStorageSync('userInfo');
if (userInfo && userInfo.account) {
formData.account = userInfo.account;
} else {
//
const loginAccount = uni.getStorageSync('loginAccount');
if (loginAccount) {
formData.account = loginAccount;
} else {
//
if (qualificationData.legal_phone) {
formData.account = qualificationData.legal_phone;
} else if (qualificationData.contact_phone) {
formData.contact_name = qualificationData.contact_name;
} else {
console.error('无法获取账号信息');
uni.showToast({
@ -669,18 +456,12 @@
return null;
}
}
}
console.log('使用的账号:', formData.account);
return formData;
},
async goNext() {
console.log('当前步骤:', this.currentStep);
console.log('身份类型:', this.identity);
// 0
if (this.currentStep === 0 && !this.isAgree) {
uni.showToast({
title: '请阅读并同意以上协议',
@ -689,68 +470,55 @@
return;
}
// 1
if (this.currentStep === 1) {
console.log('商家验证资质信息');
//
if (this.$refs.qualificationInfo) {
const isValid = await this.$refs.qualificationInfo.saveFormData();
if (!isValid) {
console.log('商家资质信息验证失败');
return;
}
this.qualificationData = this.$refs.qualificationInfo.getFormData();
console.log(' 商家资质信息验证通过 ');
}
}
// 2
if (this.currentStep === 2) {
//
if (this.$refs.storeInfo) {
const isValid = await this.$refs.storeInfo.saveFormData();
if (!isValid) {
console.log('商家门店信息验证失败');
await this.submitForReview();
return;
}
this.storeInfoData = this.$refs.storeInfo.getFormData();
console.log('商家门店信息验证通过');
}
}
if (this.currentStep < 2) {
if (this.currentStep < 3) {
this.currentStep++;
console.log('切换到步骤:', this.currentStep);
//
setTimeout(() => {
this.scrollToTop();
}, 100);
} else {
this.completeRegistration();
}
},
submitApplication() {
//
async submitApplication() {
if (this.$refs.storeInfo) {
if (!this.$refs.storeInfo.saveFormData()) {
return;
}
this.storeInfoData = this.$refs.storeInfo.getFormData();
console.log('商家门店信息数据:', this.storeInfoData);
}
//
if (this.$refs.storeInfo && this.$refs.storeInfo.confirmInviteCodeBeforeSubmit) {
this.$refs.storeInfo.confirmInviteCodeBeforeSubmit(() => {
//
this.completeRegistration();
});
uni.showLoading({ title: '提交中...' });
try {
let formData = {};
if (this.qualificationData) {
Object.assign(formData, this.qualificationData);
}
if (this.storeInfoData) {
Object.assign(formData, this.storeInfoData);
}
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 {
//
this.completeRegistration();
uni.showToast({ title: res.msg || '提交失败', icon: 'none' });
}
} catch (error) {
uni.hideLoading();
uni.showToast({ title: '提交失败,请重试', icon: 'none' });
}
},
@ -759,11 +527,6 @@
this.currentStep--;
}
},
completeRegistration() {
//
this.submitForReview();
},
//
scrollToTop() {
uni.pageScrollTo({
scrollTop: 0,
@ -850,7 +613,7 @@
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(180deg, #f52540 0%, #e8101e 100%);
background: #FF4767;
border-radius: 49rpx;
}
@ -875,7 +638,7 @@
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(180deg, #f52540 0%, #e8101e 100%);
background: #FF4767;
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>