Commit 90a16180 by 李伟康

commit 修改登录错误提示

1 parent e99ced9e
......@@ -86,10 +86,12 @@
v-show="stepIndex == 1"
ref="merchant"
@chooseMerchant="chooseMerchant"
:userInfo="userInfo"
/>
<scene
v-show="stepIndex == 2"
ref="scene"
:userInfo="userInfo"
/>
</scroll-view>
</view>
......@@ -109,6 +111,7 @@ export default {
stepIndex: 0,
searchValue: '',
edit: false,
userInfo:{}
}
},
onLoad (options) {
......@@ -140,6 +143,7 @@ export default {
chooseAccount (userInfo) {
this.stepIndex = 1
this.searchValue = ''
this.userInfo = userInfo
this.$nextTick(() => {
this.$refs.merchant.init(userInfo)
})
......@@ -147,6 +151,7 @@ export default {
chooseMerchant (userInfo) {
this.stepIndex = 2
this.searchValue = ''
this.userInfo = userInfo
this.$refs.scene.init(userInfo)
},
setStep (index) {
......
......@@ -36,6 +36,12 @@ import NoData from './NoData.vue'
export default {
name: 'MerchantList',
props:{
userInfo: {
type: Object,
default: () => ({})
}
},
data () {
return {
loginUserInfoList: [],
......@@ -43,7 +49,6 @@ export default {
showSelect: false,
openSceneArr: [],
flag: false,
userInfo: {},
selectMerchantId: ''
}
},
......@@ -51,8 +56,7 @@ export default {
NoData
},
methods: {
init (userInfo) {
this.userInfo = userInfo
init () {
this.getSceneArr()
},
getSceneArr () {
......
......@@ -25,6 +25,12 @@
<script type='text/ecmascript-6'>
export default {
name: '',
props:{
userInfo: {
type: Object,
default: () => ({})
}
},
data () {
return {
sceneList: [
......@@ -41,15 +47,13 @@ export default {
actived: false
},
],
userInfo: {},
openSceneArr: []
}
},
mounted () {
},
methods: {
init (userInfo) {
this.userInfo = userInfo
init () {
this.getSceneArr()
},
getSceneArr () {
......@@ -68,11 +72,15 @@ export default {
this.openSceneArr = result.map(val => { if (val.sceneOpenFlag == 0) return val.scene }) || []
}).catch(() => {
uni.hideLoading()
uni.showToast({
title: '获取4s店关联场景失败,请重新选择门店',
icon: 'none'
})
})
},
// 选择场景
async selectScene ({ sceneType }, index) {
let { sceneList, openSceneArr, userInfo } = this
let { sceneList, openSceneArr, userInfo } = this
try {
if (!openSceneArr.includes(sceneType) && !userInfo?.isSuper) return uni.showToast({
title: '暂未开通此场景',
......@@ -98,13 +106,13 @@ export default {
}
}
} catch (error) {
this.$sendSentry(`选择场景异常:merchantId:${userInfo.shopMerchantId},merchantName:${userInfo.shopMerchantName},sceneType:${sceneType},失败原因:${JSON.stringify(error)}`)
console.log(error)
uni.hideLoading()
uni.showToast({
title: error,
title: typeof error == "string" ? error : error.toString(),
icon: 'none'
})
console.log(error)
this.$sendSentry(`选择场景异常:userInfo:${userInfo}merchantId:${userInfo ? userInfo.shopMerchantId : ''},merchantName:${userInfo ? userInfo.shopMerchantName : ''},sceneType:${sceneType},失败原因:${typeof error == "string" ? error : error.toString()}`)
}
},
async jump (userInfo, data) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!