update 入驻流程增加退出登录

This commit is contained in:
qijq 2025-05-08 20:06:29 +08:00
parent ce84b73f68
commit f70ad01c29
8 changed files with 132 additions and 75 deletions

View File

@ -15,7 +15,7 @@
{
"path": "pages/audit/shop1",
"style": {
"navigationBarTitleText": "填写店铺信息第1步/共3步"
"navigationStyle": "custom"
}
},
{
@ -27,19 +27,19 @@
{
"path":"pages/audit/shop2",
"style":{
"navigationBarTitleText":"填写店铺信息第2步/共3步"
"navigationStyle": "custom"
}
},
{
"path":"pages/audit/shop3",
"style":{
"navigationBarTitleText":"填写店铺信息第3步/共3步"
"navigationStyle": "custom"
}
},
{
"path":"pages/audit/checkAudit",
"style": {
"navigationBarTitleText": "商户入驻申请"
"navigationStyle": "custom"
}
},
{

View File

@ -1,5 +1,10 @@
<template>
<view class="checkAudit-container">
<u-navbar :autoBack="true" :safeAreaInsetTop="true" title="商户入驻申请">
<template slot="right">
<view class="btn-login-out" @click="LoginOut">退出登录</view>
</template>
</u-navbar>
<favorite-loading
class="checkAudit-loading"
v-show="showLoading"
@ -108,7 +113,7 @@ import {
} from "../../api/audit";
import { GetAccountDashboard } from "../../api/user";
import { UploadFilePromise } from "../../api/upload";
import { mapState } from "vuex";
import { mapState, mapActions } from "vuex";
import favoriteLoading from "@/components/favorite-loading/favorite-loading.vue";
export default {
name: "checkAudit",
@ -156,6 +161,7 @@ export default {
...mapState("user", ["userInfo"]),
},
methods: {
...mapActions("user", ["LoginOut"]),
async getAuditInfo() {
var params = {};
@ -479,5 +485,10 @@ export default {
background: #4b71ff;
color: #fff;
}
.btn-login-out {
font-size: 28rpx;
color: #4b71ff;
}
}
</style>

View File

@ -6,6 +6,15 @@
icon-size="30"
loading-text="加载中,请稍等..."
></u-loading-page> -->
<u-navbar
:autoBack="true"
:safeAreaInsetTop="true"
title="填写店铺信息第1步 / 共3步"
>
<template slot="right">
<view class="btn-login-out" @click="LoginOut">退出登录</view>
</template>
</u-navbar>
<u-form :model="form" class="form" ref="uForm" label-width="70">
<u-form-item label="联系人" prop="contact_name" required>
<u-input
@ -105,6 +114,7 @@
</view>
</template>
<script>
import { mapActions } from "vuex";
import { UploadFilePromise } from "../../api/upload";
export default {
data() {
@ -184,6 +194,7 @@ export default {
this.$refs["uForm"].setRules(this.rules);
},
methods: {
...mapActions("user", ["LoginOut"]),
async afterRead1(e) {
const item = e.file;
const imgUrl = item.url;
@ -369,5 +380,10 @@ export default {
background: #4b71ff;
color: #fff;
}
.btn-login-out {
font-size: 28rpx;
color: #4b71ff;
}
}
</style>

View File

@ -1,5 +1,14 @@
<template>
<view class="shop-2-container">
<u-navbar
:autoBack="true"
:safeAreaInsetTop="true"
title="填写店铺信息第2步 / 共3步"
>
<template slot="right">
<view class="btn-login-out" @click="LoginOut">退出登录</view>
</template>
</u-navbar>
<view class="shop-2-content">
<u-subsection
class="subsection"
@ -261,6 +270,7 @@
</template>
<script>
import { mapActions } from "vuex";
import { UploadFilePromise } from "../../api/upload";
export default {
data() {
@ -404,6 +414,7 @@ export default {
this.$refs["uForm2"].setRules(this.rules2);
},
methods: {
...mapActions("user", ["LoginOut"]),
//
async afterRead(e, type) {
const item = e.file;
@ -727,5 +738,10 @@ export default {
background: #4b71ff;
color: #fff;
}
.btn-login-out {
font-size: 28rpx;
color: #4b71ff;
}
}
</style>

View File

@ -1,5 +1,14 @@
<template>
<view class="shop-3-container">
<u-navbar
:autoBack="true"
:safeAreaInsetTop="true"
title="填写店铺信息第3步 / 共3步"
>
<template slot="right">
<view class="btn-login-out" @click="LoginOut">退出登录</view>
</template>
</u-navbar>
<u-form :model="form" ref="uForm" label-width="90">
<u-form-item
label="开户行"
@ -69,7 +78,7 @@
<script>
import { GetBankList, GetMerchApply, GetRestartMerchApply } from "@/api/audit";
import lzcPicker from "@/components/lzc-picker/lzc-picker.vue";
import { mapState } from "vuex";
import { mapState, mapActions } from "vuex";
export default {
components: {
lzcPicker,
@ -130,6 +139,7 @@ export default {
this.getBankList();
},
methods: {
...mapActions("user", ["LoginOut"]),
async getBankList() {
let res = await GetBankList();
if (res && res.status == 200) {
@ -203,5 +213,10 @@ export default {
background: #4b71ff;
color: #fff;
}
.btn-login-out {
font-size: 28rpx;
color: #4b71ff;
}
}
</style>

View File

@ -30,14 +30,14 @@ export default {
...mapState("user", ["ukey", "approvalStatus"]),
},
onShow() {
// if (this.ukey && [1, 2, 3].includes(this.approvalStatus)) {
// uni.navigateTo({ url: "/pages/audit/checkAudit" });
// return;
// }
// if (this.ukey && this.approvalStatus == 4) {
// uni.navigateTo({ url: "/pages/audit/shop1" });
// return;
// }
if (this.ukey && [1, 2, 3].includes(this.approvalStatus)) {
uni.navigateTo({ url: "/pages/audit/checkAudit" });
return;
}
if (this.ukey && this.approvalStatus == 4) {
uni.navigateTo({ url: "/pages/audit/shop1" });
return;
}
},
methods: {
skipuLogin() {

View File

@ -176,15 +176,15 @@ export default {
...mapState("user", ["ukey", "approvalStatus"]),
},
onShow() {
// if (this.ukey && [1, 2, 3].includes(this.approvalStatus)) {
// uni.navigateTo({ url: "/pages/audit/checkAudit" });
// return;
// }
if (this.ukey && [1, 2, 3].includes(this.approvalStatus)) {
uni.navigateTo({ url: "/pages/audit/checkAudit" });
return;
}
// if (this.ukey && this.approvalStatus == 4) {
// uni.navigateTo({ url: "/pages/audit/shop1" });
// return;
// }
if (this.ukey && this.approvalStatus == 4) {
uni.navigateTo({ url: "/pages/audit/shop1" });
return;
}
let time = uni.getStorageSync("loginSmsTime") || 0;
if (time > 0) {

View File

@ -1,5 +1,6 @@
import { GetLogin, GetSmsCode, GetAccountLogin } from '../../api/login';
import { GetAuditInfo, GetBizCategoryList } from '../../api/audit';
import { OutLogin } from '../../api/user';
import { GetAuditInfo } from '../../api/audit';
import { GetAuditStatus } from '../../api/audit';
// import $cookies from '../../utils/vue-cookies'
@ -29,6 +30,16 @@ const mutations = {
state.userInfo = userInfo;
state.auditStatusInfo = auditStatusInfo;
},
LOGIN_OUT(state) {
state.ukey = '';
state.uid = '';
state.auditStatusInfo = {
approval_invalid_col: [],
approval_status: -4,
approval_remark: '',
id: 0,
};
},
};
const actions = {
@ -151,7 +162,7 @@ const actions = {
}
}
},
LoginOut() {
LoginOut({ commit }) {
uni.showModal({
title: '退出登录',
content: `您是否要退出登录?`,
@ -169,14 +180,8 @@ const actions = {
uni.removeStorageSync('pdfjs.history');
uni.removeStorageSync('userInfo');
this.$store.state.user.ukey = '';
this.$store.state.user.uid = '';
this.$store.state.user.auditStatusInfo = {
approval_invalid_col: [],
approval_status: -4,
approval_remark: '',
id: 0,
};
commit('LOGIN_OUT');
setTimeout(() => {
uni.redirectTo({
url: '/pages/index/index',
@ -188,53 +193,47 @@ const actions = {
},
});
},
async checkAccountIsPass(mobile) {
let res = await GetAuditStatus({ mobile: mobile });
if (res && res.status == 200) {
let { approval_status, signed_status, store_status } = res.data;
// async checkAccountIsPass(mobile) {
// let res = await GetAuditStatus({ mobile: mobile });
// if (res && res.status == 200) {
// let { approval_status, signed_status, store_status } = res.data;
//2-未通过3-待审核4-未申请过5-已提交审核;'
if ([2, 3, 4, 5].includes(approval_status)) {
uni.navigateTo({
url: '/pages/audit/checkAudit',
});
return;
}
// //2-未通过3-待审核4-未申请过5-已提交审核;'
// if ([2, 3, 4, 5].includes(approval_status)) {
// uni.navigateTo({
// url: '/pages/audit/checkAudit',
// });
// return;
// }
if (signed_status != 2) {
uni.navigateTo({
url: '/pages/audit/checkAudit',
});
return;
}
// 合同签署状态:
// -1预备数据阶段0-等待签署1-已部分签署;
// 2 - 已完成所有签署方完成签署3 - 已撤销(发起方撤销签署任务)
// 5 - 已过期签署截止日到期后触发7 - 已拒签(签署方拒绝签署)',
if (store_status != 1) {
uni.navigateTo({
url: '/pages/audit/checkAudit',
});
return;
}
// store_status int '店铺创建状态1-已启用入驻已审批合同已生成2-未启用',
if (approval_status == 1 && signed_status == 2 && store_status == 1) {
let result = await GetAuditInfo();
// // 合同签署状态:
// // -1预备数据阶段0-等待签署1-已部分签署;
// // 2 - 已完成所有签署方完成签署3 - 已撤销(发起方撤销签署任务)
// // 5 - 已过期签署截止日到期后触发7 - 已拒签(签署方拒绝签署)',
// if (signed_status != 2) {
// uni.navigateTo({
// url: '/pages/audit/checkAudit',
// });
// return;
// }
uni.setStorageSync(
'contractDownloadUrl',
result.data.contract_download_url
);
uni.setStorageSync('auditId', result.data.id);
uni.setStorageSync('accountDashboard', result.data);
// // store_status int '店铺创建状态1-已启用入驻已审批合同已生成2-未启用',
// if (approval_status == 1 && signed_status == 2 && store_status == 1) {
// let result = await GetAuditInfo();
uni.switchTab({
url: '/pages/order/order',
});
return;
}
}
},
// uni.setStorageSync(
// 'contractDownloadUrl',
// result.data.contract_download_url
// );
// uni.setStorageSync('auditId', result.data.id);
// uni.switchTab({
// url: '/pages/order/order',
// });
// return;
// }
// }
// },
};
export default {