update
This commit is contained in:
parent
b1ca2ac652
commit
47e9f6e313
@ -109,7 +109,8 @@ export function GetAuditStatus(params = {}) {
|
||||
* 获取申请信息详情
|
||||
* @author Seven
|
||||
* @data 2025-3-4
|
||||
* @returns { }
|
||||
* @param { }
|
||||
* @returns { mobile:13199998888 }
|
||||
* @see https://mall.gpxscs.cn/mobile/shop/merch/detail
|
||||
*/
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ import config from '../config/config';
|
||||
*/
|
||||
|
||||
export function GetLogin(params) {
|
||||
http({
|
||||
return http({
|
||||
url: '/account/login/doMerchSmsRegisterAndLogin',
|
||||
method: 'post',
|
||||
data: params,
|
||||
|
||||
@ -21,25 +21,32 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
import { mapState, mapActions } from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {
|
||||
...mapState("user", ["ukey", "approvalStatus"]),
|
||||
...mapState("user", ["userInfo"]),
|
||||
},
|
||||
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.userInfo) {
|
||||
var _userinfo = JSON.parse(JSON.stringify(this.userInfo));
|
||||
var mobile = "";
|
||||
|
||||
let isContain = _userinfo.user_mobile.indexOf("86");
|
||||
|
||||
if (isContain != -1 && _userinfo.user_mobile.length > 11) {
|
||||
mobile = _userinfo.user_mobile.slice(2);
|
||||
} else {
|
||||
mobile = _userinfo.user_mobile;
|
||||
}
|
||||
|
||||
this.checkAccountIsPass({ userInfo: _userinfo, mobile: mobile });
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapActions("user", ["checkAccountIsPass"]),
|
||||
skipuLogin() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login",
|
||||
|
||||
@ -173,16 +173,23 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState("user", ["ukey", "approvalStatus"]),
|
||||
...mapState("user", ["userInfo"]),
|
||||
},
|
||||
onShow() {
|
||||
if (this.ukey && [1, 2, 3].includes(this.approvalStatus)) {
|
||||
uni.navigateTo({ url: "/pages/audit/checkAudit" });
|
||||
return;
|
||||
}
|
||||
if (this.userInfo) {
|
||||
var _userinfo = JSON.parse(JSON.stringify(this.userInfo));
|
||||
var mobile = "";
|
||||
|
||||
let isContain = _userinfo.user_mobile.indexOf("86");
|
||||
|
||||
if (isContain != -1 && _userinfo.user_mobile.length > 11) {
|
||||
mobile = _userinfo.user_mobile.slice(2);
|
||||
} else {
|
||||
mobile = _userinfo.user_mobile;
|
||||
}
|
||||
|
||||
this.checkAccountIsPass({ userInfo: _userinfo, mobile: mobile });
|
||||
|
||||
if (this.ukey && this.approvalStatus == 4) {
|
||||
uni.navigateTo({ url: "/pages/audit/shop1" });
|
||||
return;
|
||||
}
|
||||
|
||||
@ -195,7 +202,11 @@ export default {
|
||||
},
|
||||
onHide() {},
|
||||
methods: {
|
||||
...mapActions("user", ["GetLogin", "GetAccountLogin"]),
|
||||
...mapActions("user", [
|
||||
"GetLogin",
|
||||
"GetAccountLogin",
|
||||
"checkAccountIsPass",
|
||||
]),
|
||||
loadSmsTime() {
|
||||
this.time = setInterval(() => {
|
||||
this.verifyText--;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { GetLogin, GetAccountLogin } from '../../api/login';
|
||||
import { OutLogin } from '../../api/user';
|
||||
import { GetAuditStatus } from '../../api/audit';
|
||||
import { GetAuditStatus, GetAuditInfo } from '../../api/audit';
|
||||
// import $cookies from '../../utils/vue-cookies'
|
||||
|
||||
const defaultState = () => {
|
||||
@ -42,7 +42,7 @@ const mutations = {
|
||||
};
|
||||
|
||||
const actions = {
|
||||
async GetAccountLogin({ commit }, params) {
|
||||
async GetAccountLogin({ dispatch }, params) {
|
||||
const res = await GetAccountLogin(params);
|
||||
|
||||
if (res && res.status == 200) {
|
||||
@ -56,51 +56,19 @@ const actions = {
|
||||
mobile = res.data.user_mobile;
|
||||
}
|
||||
|
||||
const result = await GetAuditStatus({ mobile: mobile });
|
||||
|
||||
const userInfo = res.data;
|
||||
const auditStatusInfo = result.data;
|
||||
|
||||
commit('GET_LOGIN', { userInfo, auditStatusInfo });
|
||||
await dispatch('checkAccountIsPass', {
|
||||
mobile: mobile,
|
||||
userInfo: userInfo,
|
||||
});
|
||||
|
||||
uni.setStorageSync('uid', res.data.user_id);
|
||||
uni.setStorageSync('ukey', res.data.key);
|
||||
uni.setStorageSync('userInfo', res.data);
|
||||
|
||||
// #ifdef H5
|
||||
$cookies.set('uid', res.data.user_id);
|
||||
$cookies.set('ukey', res.data.key);
|
||||
// #endif
|
||||
|
||||
// 如果是管理员 或者 通过的商家直接登录
|
||||
if (res.data.user_is_admin == 1 || result.data.signed_status == 2) {
|
||||
uni.switchTab({
|
||||
url: '/pages/order/order',
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if ([1, 2, 3].includes(result.data.approval_status)) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/audit/checkAudit',
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
let approval_invalid_col = JSON.parse(result.data.approval_invalid_col);
|
||||
|
||||
if (
|
||||
result.data.approval_status == 4 ||
|
||||
approval_invalid_col.includes('all')
|
||||
) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/audit/shop1',
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
async GetLogin({ commit }, params) {
|
||||
async GetLogin({ dispatch }, params) {
|
||||
const res = await GetLogin(params);
|
||||
|
||||
if (res && res.status == 200) {
|
||||
@ -114,51 +82,16 @@ const actions = {
|
||||
mobile = res.data.user_mobile;
|
||||
}
|
||||
|
||||
const result = await GetAuditStatus({ mobile: mobile });
|
||||
|
||||
if (result && result.status == 200) {
|
||||
res.data.merch_approval_status = result.data.approval_status;
|
||||
}
|
||||
|
||||
const userInfo = res.data;
|
||||
const auditStatusInfo = result.data;
|
||||
|
||||
commit('GET_LOGIN', { userInfo, auditStatusInfo });
|
||||
|
||||
uni.setStorageSync('uid', res.data.user_id);
|
||||
uni.setStorageSync('ukey', res.data.key);
|
||||
uni.setStorageSync('userInfo', res.data);
|
||||
|
||||
// // #ifdef H5
|
||||
// $cookies.set("uid", res.data.user_id);
|
||||
// $cookies.set("ukey", res.data.key);
|
||||
// // #endif
|
||||
|
||||
// 如果是管理员 或者 通过的商家直接登录
|
||||
if (res.data.user_is_admin == 1 || result.data.signed_status == 2) {
|
||||
uni.switchTab({
|
||||
url: '/pages/order/order',
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if ([1, 2, 3].includes(result.data.approval_status)) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/audit/checkAudit',
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
let approval_invalid_col = JSON.parse(result.data.approval_invalid_col);
|
||||
|
||||
if (
|
||||
result.data.approval_status == 4 ||
|
||||
approval_invalid_col.includes('all')
|
||||
) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/audit/shop1',
|
||||
});
|
||||
}
|
||||
await dispatch('checkAccountIsPass', {
|
||||
mobile: mobile,
|
||||
userInfo: userInfo,
|
||||
});
|
||||
}
|
||||
},
|
||||
LoginOut({ commit }) {
|
||||
@ -192,47 +125,50 @@ 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({ commit }, { mobile, userInfo }) {
|
||||
let res = await GetAuditStatus({ mobile: mobile });
|
||||
if (res && res.status == 200) {
|
||||
const auditStatusInfo = res.data;
|
||||
commit('GET_LOGIN', { userInfo, auditStatusInfo });
|
||||
|
||||
// //2-未通过;3-待审核;4-未申请过;5-已提交审核;'
|
||||
// if ([2, 3, 4, 5].includes(approval_status)) {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/audit/checkAudit',
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
let { approval_status, signed_status, store_status } = res.data;
|
||||
|
||||
// // 合同签署状态:
|
||||
// // -1:预备数据阶段;0-等待签署;1-已部分签署;
|
||||
// // 2 - 已完成(所有签署方完成签署)3 - 已撤销(发起方撤销签署任务)
|
||||
// // 5 - 已过期(签署截止日到期后触发)7 - 已拒签(签署方拒绝签署)',
|
||||
// if (signed_status != 2) {
|
||||
// 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;
|
||||
}
|
||||
|
||||
// // 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);
|
||||
// store_status int '店铺创建状态:1-已启用(入驻已审批,合同已生成);2-未启用',
|
||||
if (approval_status == 1 && signed_status == 2 && store_status == 1) {
|
||||
let result = await GetAuditInfo({ mobile: mobile });
|
||||
|
||||
// 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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user