Commit 90a16180 by 李伟康

commit 修改登录错误提示

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