初次提交被驳回逻辑优化
This commit is contained in:
parent
5ac5be413b
commit
181a93e314
|
|
@ -1,29 +1,18 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="service-code-modal" v-if="show" :style="{bottom:`${popBotom}px`}">
|
<view class="service-code-modal" v-if="show" :style="{ bottom: `${popBotom}px` }">
|
||||||
<view class="modal-mask" @touchmove.stop.prevent></view>
|
<view class="modal-mask" @touchmove.stop.prevent></view>
|
||||||
<view class="modal-content">
|
<view class="modal-content">
|
||||||
<view class="modal-title">开始服务</view>
|
<view class="modal-title">开始服务</view>
|
||||||
<view class="modal-subtitle">请输入服务码</view>
|
<view class="modal-subtitle">请输入服务码</view>
|
||||||
<view class="code-box">
|
<view class="code-box">
|
||||||
<view
|
<view v-for="(item, idx) in codeLength" :key="idx"
|
||||||
v-for="(item, idx) in codeLength"
|
|
||||||
:key="idx"
|
|
||||||
:class="['code-cell', idx === currentIndex ? 'active' : '', code[idx] ? 'filled' : '']">
|
:class="['code-cell', idx === currentIndex ? 'active' : '', code[idx] ? 'filled' : '']">
|
||||||
<text v-if="code[idx]">{{ code[idx] }}</text>
|
<text v-if="code[idx]">{{ code[idx] }}</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- 隐藏真实输入框 -->
|
<!-- 隐藏真实输入框 -->
|
||||||
<input
|
<input :adjust-position="false" class="real-input" type="number" :maxlength="codeLength"
|
||||||
:adjust-position="false"
|
v-model="inputValue" :focus="true" @input="onInput" @focus="onFocus"
|
||||||
class="real-input"
|
@keyboardheightchange="onkeyboardheightchange" @blur="onBlur" cursor-spacing="100"
|
||||||
type="number"
|
|
||||||
:maxlength="codeLength"
|
|
||||||
v-model="inputValue"
|
|
||||||
:focus="true"
|
|
||||||
@input="onInput"
|
|
||||||
@focus="onFocus"
|
|
||||||
@keyboardheightchange="onkeyboardheightchange"
|
|
||||||
@blur="onBlur"
|
|
||||||
cursor-spacing="100"
|
|
||||||
ref="realInput" />
|
ref="realInput" />
|
||||||
</view>
|
</view>
|
||||||
<button class="confirm-btn" :disabled="code.length < codeLength" @click="onConfirm">确定</button>
|
<button class="confirm-btn" :disabled="code.length < codeLength" @click="onConfirm">确定</button>
|
||||||
|
|
@ -33,210 +22,211 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'serviceCodeInput',
|
name: 'serviceCodeInput',
|
||||||
props: {
|
props: {
|
||||||
show: {
|
show: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
codeLength: {
|
codeLength: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 6
|
default: 6
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
inputValue: '',
|
||||||
|
isFocus: true,
|
||||||
|
keyboardHeight: 0,
|
||||||
|
popBotom: 0,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
code() {
|
||||||
|
return this.inputValue.split('').slice(0, this.codeLength)
|
||||||
|
},
|
||||||
|
currentIndex() {
|
||||||
|
return this.inputValue.length
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
// show(val) {
|
||||||
|
// if (val) {
|
||||||
|
// this.$refs.realInput && this.$refs.realInput.focus
|
||||||
|
// } else {
|
||||||
|
// this.inputValue = ''
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
// uni.onKeyboardHeightChange((res)=>{
|
||||||
|
// this.keyboardHeight = res.height;
|
||||||
|
// })
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onInput(e) {
|
||||||
|
let val = e.detail.value.replace(/[^0-9]/g, '').slice(0, this.codeLength)
|
||||||
|
this.inputValue = val
|
||||||
|
this.$emit('input', val)
|
||||||
|
if (val.length === this.codeLength) {
|
||||||
|
this.$emit('finish', val)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
onFocus(e) {
|
||||||
return {
|
this.isFocus = true
|
||||||
inputValue: '',
|
this.inputValue = ''
|
||||||
isFocus: true,
|
},
|
||||||
keyboardHeight: 0,
|
onkeyboardheightchange(e) {
|
||||||
popBotom:0,
|
this.popBotom = e.target.height || 0
|
||||||
|
},
|
||||||
|
onBlur() {
|
||||||
|
this.isFocus = false
|
||||||
|
},
|
||||||
|
onConfirm() {
|
||||||
|
if (this.inputValue.length === this.codeLength) {
|
||||||
|
this.$emit('confirm', this.inputValue);
|
||||||
}
|
}
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
code() {
|
|
||||||
return this.inputValue.split('').slice(0, this.codeLength)
|
|
||||||
},
|
|
||||||
currentIndex() {
|
|
||||||
return this.inputValue.length
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
// show(val) {
|
|
||||||
// if (val) {
|
|
||||||
// this.$refs.realInput && this.$refs.realInput.focus
|
|
||||||
// } else {
|
|
||||||
// this.inputValue = ''
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
// uni.onKeyboardHeightChange((res)=>{
|
|
||||||
// this.keyboardHeight = res.height;
|
|
||||||
// })
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
onInput(e) {
|
|
||||||
let val = e.detail.value.replace(/[^0-9]/g, '').slice(0, this.codeLength)
|
|
||||||
this.inputValue = val
|
|
||||||
this.$emit('input', val)
|
|
||||||
if (val.length === this.codeLength) {
|
|
||||||
this.$emit('finish', val)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onFocus(e) {
|
|
||||||
this.isFocus = true
|
|
||||||
this.inputValue = ''
|
|
||||||
},
|
|
||||||
onkeyboardheightchange(e){
|
|
||||||
this.popBotom = e.target.height || 0
|
|
||||||
},
|
|
||||||
onBlur() {
|
|
||||||
this.isFocus = false
|
|
||||||
},
|
|
||||||
onConfirm() {
|
|
||||||
if (this.inputValue.length === this.codeLength) {
|
|
||||||
this.$emit('confirm', this.inputValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.$emit('close')
|
this.$emit('close')
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.service-code-modal {
|
.service-code-modal {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 999999;
|
||||||
|
|
||||||
|
.modal-mask {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
z-index: 999999;
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
|
||||||
.modal-mask {
|
.modal-content {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 32rpx 32rpx 0 0;
|
||||||
|
padding: 56rpx 40rpx 40rpx 40rpx;
|
||||||
|
box-shadow: 0 -8rpx 32rpx rgba(0, 0, 0, 0.08);
|
||||||
|
min-height: 340rpx;
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
animation: modalUp 0.25s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-title {
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #222;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-subtitle {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #888;
|
||||||
|
margin: 24rpx 0 40rpx 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code-box {
|
||||||
|
flex-direction: row;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
margin-bottom: 48rpx;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.code-cell {
|
||||||
|
width: 72rpx;
|
||||||
|
height: 72rpx;
|
||||||
|
border: 2rpx solid #eee;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
margin-right: 24rpx;
|
||||||
|
font-size: 40rpx;
|
||||||
|
color: #ff4d8d;
|
||||||
|
background: #fff;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 72rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
transition: border-color 0.2s;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
border-color: #ff4d8d;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.filled {
|
||||||
|
border-color: #ff4d8d;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.real-input {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
background: rgba(0, 0, 0, 0.15);
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-content {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
background: #fff;
|
|
||||||
border-radius: 32rpx 32rpx 0 0;
|
|
||||||
padding: 56rpx 40rpx 40rpx 40rpx;
|
|
||||||
box-shadow: 0 -8rpx 32rpx rgba(0, 0, 0, 0.08);
|
|
||||||
min-height: 340rpx;
|
|
||||||
align-items: center;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
animation: modalUp 0.25s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-title {
|
|
||||||
font-size: 36rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #222;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-subtitle {
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #888;
|
|
||||||
margin: 24rpx 0 40rpx 0;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-box {
|
|
||||||
flex-direction: row;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
margin-bottom: 48rpx;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.code-cell {
|
|
||||||
width: 72rpx;
|
|
||||||
height: 72rpx;
|
|
||||||
border: 2rpx solid #eee;
|
|
||||||
border-radius: 16rpx;
|
|
||||||
margin-right: 24rpx;
|
|
||||||
font-size: 40rpx;
|
|
||||||
color: #ff4d8d;
|
|
||||||
background: #fff;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 72rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
transition: border-color 0.2s;
|
|
||||||
|
|
||||||
&.active {
|
|
||||||
border-color: #ff4d8d;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.filled {
|
|
||||||
border-color: #ff4d8d;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:last-child {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.real-input {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
opacity: 0;
|
|
||||||
z-index: 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.confirm-btn {
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 88rpx;
|
height: 100%;
|
||||||
background: #ff4d8d;
|
opacity: 0;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirm-btn {
|
||||||
|
width: 100%;
|
||||||
|
height: 88rpx;
|
||||||
|
background: #ff4d8d;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 32rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
margin-top: 16rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 88rpx;
|
||||||
|
border: none;
|
||||||
|
|
||||||
|
&:disabled {
|
||||||
|
background: #ffd1e3;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 32rpx;
|
|
||||||
border-radius: 16rpx;
|
|
||||||
margin-top: 16rpx;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 88rpx;
|
|
||||||
border: none;
|
|
||||||
|
|
||||||
&:disabled {
|
|
||||||
background: #ffd1e3;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.close-btn {
|
|
||||||
position: absolute;
|
|
||||||
right: 32rpx;
|
|
||||||
top: 32rpx;
|
|
||||||
font-size: 48rpx;
|
|
||||||
color: #bbb;
|
|
||||||
z-index: 10;
|
|
||||||
font-weight: bold;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes modalUp {
|
.close-btn {
|
||||||
from {
|
position: absolute;
|
||||||
transform: translateY(100%);
|
right: 32rpx;
|
||||||
}
|
top: 32rpx;
|
||||||
|
font-size: 48rpx;
|
||||||
to {
|
color: #bbb;
|
||||||
transform: translateY(0);
|
z-index: 10;
|
||||||
}
|
font-weight: bold;
|
||||||
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes modalUp {
|
||||||
|
from {
|
||||||
|
transform: translateY(100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
<cover-view class="slider-track">
|
<cover-view class="slider-track">
|
||||||
<cover-view class="slider-bg"></cover-view>
|
<cover-view class="slider-bg"></cover-view>
|
||||||
<cover-view class="slider-active" :style="activeStyle"></cover-view>
|
<cover-view class="slider-active" :style="activeStyle"></cover-view>
|
||||||
<cover-view class="slider-thumb" :style="thumbStyle"></cover-view>
|
<cover-view class="slider-thumb" v-if="currentTime > 0" :style="thumbStyle"></cover-view>
|
||||||
</cover-view>
|
</cover-view>
|
||||||
|
|
||||||
<cover-view class="time-text">{{ formatTime(duration) }}</cover-view>
|
<cover-view class="time-text">{{ formatTime(duration) }}</cover-view>
|
||||||
|
|
@ -143,7 +143,8 @@ export default {
|
||||||
iconFullscreen: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/4286ef33-6849-4851-8866-4230d2523a33.png',
|
iconFullscreen: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/4286ef33-6849-4851-8866-4230d2523a33.png',
|
||||||
|
|
||||||
article: {},
|
article: {},
|
||||||
recommendList: []
|
recommendList: [],
|
||||||
|
recommendPage: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -301,9 +302,7 @@ export default {
|
||||||
this.isFavorite = data.collect_state === 1;
|
this.isFavorite = data.collect_state === 1;
|
||||||
request.post("/sj/skill/list", {
|
request.post("/sj/skill/list", {
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 10,
|
limit: 3,
|
||||||
link_type: data.link_type,
|
|
||||||
link_id: data.link_id,
|
|
||||||
skill_id: data.id
|
skill_id: data.id
|
||||||
}).then((listRes) => {
|
}).then((listRes) => {
|
||||||
if (listRes.code == 200 && listRes.data && listRes.data.list) {
|
if (listRes.code == 200 && listRes.data && listRes.data.list) {
|
||||||
|
|
@ -376,11 +375,58 @@ export default {
|
||||||
if (this.isRefreshing) return;
|
if (this.isRefreshing) return;
|
||||||
this.isRefreshing = true;
|
this.isRefreshing = true;
|
||||||
uni.showLoading({ title: '加载中' });
|
uni.showLoading({ title: '加载中' });
|
||||||
setTimeout(() => {
|
|
||||||
this.recommendList = this.recommendList.sort(() => Math.random() - 0.5);
|
// 页码逻辑:到达10重置为1,否则+1
|
||||||
|
if (this.recommendPage >= 10) {
|
||||||
|
this.recommendPage = 1;
|
||||||
|
} else {
|
||||||
|
this.recommendPage++;
|
||||||
|
}
|
||||||
|
|
||||||
|
request.post("/sj/skill/list", {
|
||||||
|
page: this.recommendPage,
|
||||||
|
limit: 3,
|
||||||
|
skill_id: this.article.id
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200 && res.data && res.data.list && res.data.list.length > 0) {
|
||||||
|
this.recommendList = res.data.list.map(item => ({
|
||||||
|
id: item.id,
|
||||||
|
title: item.name || '暂无标题',
|
||||||
|
coverSrc: item.cover_img || '',
|
||||||
|
type: item.link_name || '平台课程',
|
||||||
|
views: item.browse_num || 0,
|
||||||
|
time: item.create_time ? item.create_time.split(' ')[0] : '',
|
||||||
|
typeIcon: item.link_logo || '',
|
||||||
|
video: item.video || ''
|
||||||
|
}));
|
||||||
|
} else {
|
||||||
|
// 下一页没有数据,重置为1重新请求
|
||||||
|
this.recommendPage = 1;
|
||||||
|
request.post("/sj/skill/list", {
|
||||||
|
page: 1,
|
||||||
|
limit: 3,
|
||||||
|
skill_id: this.article.id
|
||||||
|
}).then((res2) => {
|
||||||
|
if (res2.code == 200 && res2.data && res2.data.list) {
|
||||||
|
this.recommendList = res2.data.list.map(item => ({
|
||||||
|
id: item.id,
|
||||||
|
title: item.name || '暂无标题',
|
||||||
|
coverSrc: item.cover_img || '',
|
||||||
|
type: item.link_name || '平台课程',
|
||||||
|
views: item.browse_num || 0,
|
||||||
|
time: item.create_time ? item.create_time.split(' ')[0] : '',
|
||||||
|
typeIcon: item.link_logo || '',
|
||||||
|
video: item.video || ''
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
this.isRefreshing = false;
|
this.isRefreshing = false;
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}, 600);
|
}).catch(() => {
|
||||||
|
this.isRefreshing = false;
|
||||||
|
uni.hideLoading();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
injectMockData() {
|
injectMockData() {
|
||||||
|
|
|
||||||
|
|
@ -909,8 +909,8 @@ export default {
|
||||||
toruzhu() {
|
toruzhu() {
|
||||||
const idType = this.userInfo.id_type;
|
const idType = this.userInfo.id_type;
|
||||||
const credentialsState = this.userInfo.credentials_state;
|
const credentialsState = this.userInfo.credentials_state;
|
||||||
|
console.log(idType, credentialsState)
|
||||||
if (idType === 0 && credentialsState === 0) {
|
if (idType <= 0 && credentialsState === 0) {
|
||||||
// 从未入驻
|
// 从未入驻
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/ruzhu/ruzhu'
|
url: '/pages/ruzhu/ruzhu'
|
||||||
|
|
|
||||||
|
|
@ -123,8 +123,9 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
filterIcon() {
|
filterIcon() {
|
||||||
// 这里的图标链接可以统一成一个,配合CSS的旋转动画更好看
|
return this.filterVisible
|
||||||
return 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e00ab2ac-bccf-42d8-820c-65727327e279.png'
|
? 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e00ab2ac-bccf-42d8-820c-65727327e279.png'
|
||||||
|
: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/bfe7a104-bef8-4432-9487-42f05e3e9035.png'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
@ -466,13 +467,13 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.filter-icon {
|
.filter-icon {
|
||||||
width: 16rpx;
|
width: 24rpx;
|
||||||
height: 10rpx;
|
height: 24rpx;
|
||||||
transition: transform 0.3s ease;
|
|
||||||
|
|
||||||
/* 展开时图标倒转 */
|
/* 展开时切换为上下箭头图标,调整大小 */
|
||||||
&.rotate {
|
&.rotate {
|
||||||
transform: rotate(180deg);
|
width: 18rpx;
|
||||||
|
height: 12rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -574,7 +575,6 @@ export default {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
transition: all 0.3s;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
/* 防止 padding 会撑大盒子 */
|
/* 防止 padding 会撑大盒子 */
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -17,7 +17,7 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-else-if="currentStep === 2">
|
<view v-else-if="currentStep === 2">
|
||||||
<successruzhu :data="successData"></successruzhu>
|
<successruzhu :data="successData" @stateChange="onStateChange"></successruzhu>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-else-if="currentStep === 3">
|
<view v-else-if="currentStep === 3">
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-else-if="currentStep === 4">
|
<view v-else-if="currentStep === 4">
|
||||||
<successruzhu :data="successData"></successruzhu>
|
<successruzhu :data="successData" @stateChange="onStateChange"></successruzhu>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="kong"></view>
|
<view class="kong"></view>
|
||||||
|
|
@ -73,7 +73,7 @@
|
||||||
<!-- 步骤3: 门店信息 -->
|
<!-- 步骤3: 门店信息 -->
|
||||||
<view v-else-if="currentStep === 3" class="step-2-buttons">
|
<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 v-if="!isRejected" class="prev-btn" @click="goPrev">
|
||||||
<text class="prev-text">上一步</text>
|
<text class="prev-text">上一步</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="submit-btn" @click="submitApplication">
|
<view class="submit-btn" @click="submitApplication">
|
||||||
|
|
@ -84,7 +84,15 @@
|
||||||
|
|
||||||
<!-- 步骤4: 资质认证成功 -->
|
<!-- 步骤4: 资质认证成功 -->
|
||||||
<view v-else-if="currentStep === 4" class="step-2-buttons">
|
<view v-else-if="currentStep === 4" class="step-2-buttons">
|
||||||
<view class="button-row">
|
<view v-if="isRejected" class="button-row">
|
||||||
|
<view class="prev-btn" @click="resubmit">
|
||||||
|
<text class="prev-text">重新提交</text>
|
||||||
|
</view>
|
||||||
|
<view class="showziliao1" @click="topt">
|
||||||
|
<text class="showziliaotext1">进入平台</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="button-row">
|
||||||
<view class="showziliao" @click="topt">
|
<view class="showziliao" @click="topt">
|
||||||
<text class="showziliaotext">进入平台</text>
|
<text class="showziliaotext">进入平台</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -110,7 +118,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
currentStep: 3, // 当前步骤索引
|
currentStep: 0, // 当前步骤索引
|
||||||
isAgree: false,
|
isAgree: false,
|
||||||
identity: null,
|
identity: null,
|
||||||
textData: {},
|
textData: {},
|
||||||
|
|
@ -120,6 +128,7 @@ export default {
|
||||||
qualificationData: null, // 新增:保存资质信息
|
qualificationData: null, // 新增:保存资质信息
|
||||||
storeInfoData: null, // 新增:保存门店信息
|
storeInfoData: null, // 新增:保存门店信息
|
||||||
successData: {}, //入驻提示
|
successData: {}, //入驻提示
|
||||||
|
isRejected: false, // 是否审核失败
|
||||||
// 新增:缓存手艺人数据
|
// 新增:缓存手艺人数据
|
||||||
artisanDataCache: {
|
artisanDataCache: {
|
||||||
personalInfo: null,
|
personalInfo: null,
|
||||||
|
|
@ -138,6 +147,10 @@ export default {
|
||||||
},
|
},
|
||||||
async onLoad(options) {
|
async onLoad(options) {
|
||||||
console.log(options, 'options---');
|
console.log(options, 'options---');
|
||||||
|
if (options.type == 0 && options.step == 3) {
|
||||||
|
this.currentStep = 3
|
||||||
|
this.isRejected = true
|
||||||
|
}
|
||||||
if (options.type == 1) {
|
if (options.type == 1) {
|
||||||
this.currentStep = 4
|
this.currentStep = 4
|
||||||
}
|
}
|
||||||
|
|
@ -165,6 +178,16 @@ export default {
|
||||||
url: '/pages/home/home'
|
url: '/pages/home/home'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
onStateChange(state) {
|
||||||
|
if (state === 3) {
|
||||||
|
this.isRejected = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
resubmit() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/ruzhu/ruzhu?type=0&step=3'
|
||||||
|
});
|
||||||
|
},
|
||||||
// 获取用户信息(复用不可服务时间页面的方法)
|
// 获取用户信息(复用不可服务时间页面的方法)
|
||||||
async getUserInfoSync() {
|
async getUserInfoSync() {
|
||||||
await request.post('/sj/userSjAuth/details', {
|
await request.post('/sj/userSjAuth/details', {
|
||||||
|
|
@ -807,6 +830,13 @@ export default {
|
||||||
border-radius: 49rpx;
|
border-radius: 49rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.showziliao1 {
|
||||||
|
width: 400rpx;
|
||||||
|
height: 98rpx;
|
||||||
|
background: #FF4767;
|
||||||
|
border-radius: 49rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.showziliaotext {
|
.showziliaotext {
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
|
@ -818,4 +848,16 @@ export default {
|
||||||
margin: 0 0 0 281rpx;
|
margin: 0 0 0 281rpx;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.showziliaotext1 {
|
||||||
|
height: 40rpx;
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
line-height: 96rpx;
|
||||||
|
font-style: normal;
|
||||||
|
margin: 0 0 0 140rpx;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -391,6 +391,7 @@ export default {
|
||||||
this.regionCitys = this.ChinaCitys[0].citys;
|
this.regionCitys = this.ChinaCitys[0].citys;
|
||||||
this.regionAreas = this.regionCitys[0].areas;
|
this.regionAreas = this.regionCitys[0].areas;
|
||||||
this.setupAddressListener();
|
this.setupAddressListener();
|
||||||
|
await this.loadDetailsData();
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.removeAddressListener();
|
this.removeAddressListener();
|
||||||
|
|
@ -405,6 +406,67 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async loadDetailsData() {
|
||||||
|
try {
|
||||||
|
const res = await request.post('/sj/userSjAuth/details', {
|
||||||
|
type: 1
|
||||||
|
});
|
||||||
|
if (res.code === 200 && res.data) {
|
||||||
|
const data = res.data;
|
||||||
|
this.$set(this.formData, 'uscc_photo', data.uscc_photo || '');
|
||||||
|
this.$set(this.formData, 'uscc_type', data.uscc_type || '');
|
||||||
|
this.$set(this.formData, 'uscc_num', data.uscc_num || '');
|
||||||
|
this.$set(this.formData, 'uscc_name', data.uscc_name || '');
|
||||||
|
this.$set(this.formData, 'uscc_dependency', data.uscc_dependency || '');
|
||||||
|
this.$set(this.formData, 'uscc_address', data.uscc_address || '');
|
||||||
|
this.$set(this.formData, 'uscc_province', data.uscc_province || '');
|
||||||
|
this.$set(this.formData, 'uscc_city', data.uscc_city || '');
|
||||||
|
this.$set(this.formData, 'uscc_area', data.uscc_area || '');
|
||||||
|
this.$set(this.formData, 'longitude', data.longitude || '');
|
||||||
|
this.$set(this.formData, 'latitude', data.latitude || '');
|
||||||
|
this.$set(this.formData, 'legal_idcard_positive', data.legal_idcard_positive || '');
|
||||||
|
this.$set(this.formData, 'legal_idcard_negative', data.legal_idcard_negative || '');
|
||||||
|
this.$set(this.formData, 'legal_name', data.legal_name || '');
|
||||||
|
this.$set(this.formData, 'legal_phone', data.legal_phone || '');
|
||||||
|
this.$set(this.formData, 'legal_idcard_num', data.legal_idcard_num || '');
|
||||||
|
// 处理身份证有效期:legal_idcard_expiry 拆分为 type、start、end
|
||||||
|
if (data.legal_idcard_expiry) {
|
||||||
|
const expiry = data.legal_idcard_expiry;
|
||||||
|
if (expiry === '长久' || expiry === '长久有效') {
|
||||||
|
this.$set(this.formData, 'legal_idcard_expiry_type', '1');
|
||||||
|
this.$set(this.formData, 'legal_idcard_expiry_end', '长久有效');
|
||||||
|
} else if (expiry.includes('——') || expiry.includes('--') || expiry.includes('-')) {
|
||||||
|
const separator = expiry.includes('——') ? '——' : (expiry.includes('--') ? '--' : '-');
|
||||||
|
const [startStr, endStr] = expiry.split(separator);
|
||||||
|
const startDate = startStr.trim();
|
||||||
|
const endDate = endStr.trim();
|
||||||
|
this.$set(this.formData, 'legal_idcard_expiry_start', startDate);
|
||||||
|
if (endDate === '长久' || !endDate) {
|
||||||
|
this.$set(this.formData, 'legal_idcard_expiry_type', '1');
|
||||||
|
this.$set(this.formData, 'legal_idcard_expiry_end', '长久有效');
|
||||||
|
} else {
|
||||||
|
this.$set(this.formData, 'legal_idcard_expiry_type', '2');
|
||||||
|
this.$set(this.formData, 'legal_idcard_expiry_end', endDate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$set(this.formData, 'legal_idcard_expiry_type', data.legal_idcard_expiry_type || '1');
|
||||||
|
this.$set(this.formData, 'legal_idcard_expiry_start', data.legal_idcard_expiry_start || '');
|
||||||
|
this.$set(this.formData, 'legal_idcard_expiry_end', data.legal_idcard_expiry_end || '');
|
||||||
|
}
|
||||||
|
if (data.qualifications_sector) {
|
||||||
|
this.$set(this.formData, 'qualifications_sector', typeof data.qualifications_sector === 'string' ? JSON.parse(data.qualifications_sector) : data.qualifications_sector);
|
||||||
|
}
|
||||||
|
if (data.qualifications_other) {
|
||||||
|
this.$set(this.formData, 'qualifications_other', typeof data.qualifications_other === 'string' ? JSON.parse(data.qualifications_other) : data.qualifications_other);
|
||||||
|
}
|
||||||
|
console.log('sj-info 数据回显完成:', this.formData);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('获取详情数据失败:', error);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
chooseImage(type) {
|
chooseImage(type) {
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 1,
|
count: 1,
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="pages">
|
<view class="pages">
|
||||||
<custom-navbar :title="infoData.top" :showBack="true"></custom-navbar>
|
<custom-navbar :title="infoData.top" :showBack="true"></custom-navbar>
|
||||||
<view class="title-icon">{{infoData.title}}</view>
|
<view class="title-icon">{{ infoData.title }}</view>
|
||||||
<view class="title-content">{{infoData.notice}}</view>
|
<view class="title-content">{{ infoData.notice }}</view>
|
||||||
<view class="erweimabox">
|
<view class="erweimabox">
|
||||||
<view class="erweimab">
|
<view class="erweimab">
|
||||||
<image :src="infoData.photo" mode="widthFix"
|
<image :src="infoData.photo" mode="widthFix"
|
||||||
|
|
@ -37,7 +37,27 @@ export default {
|
||||||
const res = await request.post('/sj/userSjAuth/getCustomerService');
|
const res = await request.post('/sj/userSjAuth/getCustomerService');
|
||||||
console.log('客服接口返回:', res);
|
console.log('客服接口返回:', res);
|
||||||
if (res && (res.state == 1 || res.code == 200)) {
|
if (res && (res.state == 1 || res.code == 200)) {
|
||||||
this.infoData = res.data || {};
|
if (res.data.state != 3) {
|
||||||
|
this.infoData = res.data || {};
|
||||||
|
} else {
|
||||||
|
this.infoData = {
|
||||||
|
top: '审核结果',
|
||||||
|
title: '审核失败',
|
||||||
|
photo: res.data.photo
|
||||||
|
};
|
||||||
|
this.$emit('stateChange', 3);
|
||||||
|
request.post('/sj/userSjAuth/details', {
|
||||||
|
type: 1
|
||||||
|
}).then(res => {
|
||||||
|
if (res && (res.state == 1 || res.code == 200)) {
|
||||||
|
console.log(res.data.back_text, '驳回res')
|
||||||
|
this.infoData = {
|
||||||
|
...this.infoData,
|
||||||
|
notice: res.data.back_text || '您的入驻申请未通过,请重新提交申请'
|
||||||
|
};
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('获取客服信息失败:', e);
|
console.error('获取客服信息失败:', e);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue