Commit 427061e8 by 李伟康

commit 修复异常场景

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