Commit 427061e8 by 李伟康

commit 修复异常场景

1 parent dd5249cb
......@@ -34,18 +34,18 @@ module.exports = {
/**选择帐号登陆 */
selectAccountLogin (data) {
data.projectName = "boutique";
return http.fetch(
"dj.api.smartcarlife.workWechat.selectAccountLogin",
data
);
return http.post({
method: "dj.api.smartcarlife.workWechat.selectAccountLogin",
...data,
});
},
// 选择4s店和场景
selectMerchantScene (data) {
data.projectName = "boutique";
return http.fetch(
"dj.api.smartcarlife.selectMerchantScene",
data
);
return http.post({
method: "dj.api.smartcarlife.selectMerchantScene",
...data,
});
},
// 获取园区店开通的场景入口
getYqMerchantSceneConfigAPI (data) {
......
......@@ -74,7 +74,7 @@ export default {
uni.$storage.set('sessionId', sessionId);
this.loginUserInfoList = loginUserInfoList
this.copyLoginUserInfoList = loginUserInfoList
if(autoLogin) this.chooseAccount(loginUserInfoList[0])
if (autoLogin) this.chooseAccount(loginUserInfoList[0])
} else uni.showToast({
title: message,
icon: 'none',
......@@ -117,14 +117,13 @@ export default {
if (this.requestFlag) return
this.requestFlag = true
uni.showLoading()
uni.$api.userApi.selectAccountLogin({ id }).then(res => {
uni.$api.userApi.selectAccountLogin({ id }).then(data => {
uni.hideLoading()
this.requestFlag = false
let { data, message } = res,
[userInfo] = data.loginUserInfoList
let [userInfo] = data.loginUserInfoList
if (data && userInfo) this.get4SStoreList(userInfo)
else uni.showToast({
title: message,
title: '获取4S店列表失败',
icon: 'none',
})
})
......
......@@ -80,13 +80,12 @@ export default {
if (userInfo?.isSuper) this.jump(userInfo)
else {
try {
const { message, data, code } = await uni.$api.userApi.selectMerchantScene({
const data = await uni.$api.userApi.selectMerchantScene({
merchantId: userInfo.shopMerchantId,
merchantName: userInfo.shopMerchantName,
sceneType
})
if (code == 0) this.jump(userInfo, data)
else throw message
if (data) this.jump(userInfo, data)
} catch (error) {
uni.showToast({
title: error,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!