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