Commit fde76953 by 李伟康

commit 修复单个园区店无法选门店问题

1 parent 3617cbf0
......@@ -2,31 +2,32 @@ export default {
methods: {
// 获取园区店下4s店数据
get4SStoreList (loginUserObj) {
console.log(loginUserObj,'-=-')
try {
let { merchantId, isSuper, uuid } = loginUserObj
uni.$api.userApi.getSceneMerchantRefStoreList({
merchantId: isSuper ? undefined : merchantId,
staffUUID: isSuper ? undefined : uuid
}).then(result => {
// 超管跳过选择4s店
let userInfo = uni.$storage.get('userInfo') || {}
if (isSuper) {
let { merchantName, merchantId } = result[0]
// if (isSuper) {
// let { merchantName, merchantId } = result[0]
uni.$storage.set('userInfo', {
...userInfo,
shopMerchantName: merchantName,
shopMerchantId: merchantId
})
uni.redirectTo({
url: '/pages/home/home'
})
return
}
// uni.$storage.set('userInfo', {
// ...loginUserObj,
// shopMerchantName: merchantName,
// shopMerchantId: merchantId
// })
// uni.redirectTo({
// url: '/pages/home/home'
// })
// return
// }
// 仅一家4s店
if (result?.length == 1) {
let { merchantName, merchantId } = result[0]
uni.$storage.set('userInfo', {
...userInfo,
...loginUserObj,
shopMerchantName: merchantName,
shopMerchantId: merchantId,
default4SStoreInfo: {
......@@ -50,10 +51,16 @@ export default {
title: '园区店关联的4s店商户账号无效,请联系总部管理员',
icon: 'none',
})
} else uni.navigateTo({
} else {
uni.$storage.set('userInfo', loginUserObj)
uni.navigateTo({
url: '/pages/common/merchantList'
})
}
})
} catch (error) {
console.log(error)
}
},
}
}
\ No newline at end of file
......@@ -75,7 +75,7 @@
</template>
<script type='text/ecmascript-6'>
import { loginMixin } from '@/mixin'
import { loginMixin } from '@/mixin/index'
import wnCanvas from '../../components/Canvas/wn-canvas.vue'
export default {
mixins: [loginMixin],
......
......@@ -61,9 +61,11 @@
</view>
</template>
<script>
<script type='text/ecmascript-6'>
const phoneRex = /^[1]([3-9])[0-9]{9}$/;
import {loginMixin} from '@/mixin/index'
export default {
mixins: [loginMixin],
data () {
return {
mobile: '',
......@@ -158,7 +160,8 @@ export default {
},
// 获取登录账号下园区店列表
getAccountLoginList (loginUserInfoList) {
if (loginUserInfoList?.length == 1) this.get4SStoreList(loginUserObj)
console.log(loginUserInfoList,'===')
if (loginUserInfoList?.length == 1) this.get4SStoreList(loginUserInfoList[0])
else uni.navigateTo({
url: '/pages/common/accountItems'
})
......
......@@ -123,7 +123,7 @@
src="{{IMG_URL}}/{{customSearchFlag ? 'no_data_bg' : 'search_icon_bg'}}.png"
mode=""
/> -->
<view class="list_not_text">{{customSearchFlag ? '您搜索的内容暂无结果' : '快去搜索看看'}}</view>
<!-- <view class="list_not_text">{{customSearchFlag ? '您搜索的内容暂无结果' : '快去搜索看看'}}</view> -->
</view>
</template>
</view>
......@@ -155,7 +155,6 @@ export default {
let userInfo = uni.$storage.get('userInfo')
// 超管开通全部场景
if (userInfo?.isSuper) return
uni.showLoading()
// 获取4s店关联场景数据
uni.$api.userApi.getYqMerchantSceneConfigAPI({
yqMerchantId: userInfo?.subLoginUser?.merchantId,
......@@ -166,16 +165,19 @@ export default {
})
},
getMerchantList () {
uni.showLoading()
let userInfo = uni.$storage.get('userInfo')
let params = {
merchantId: userInfo?.isSuper ? '' : userInfo?.merchantId,
staffUUID: userInfo?.isSuper ? '' : userInfo?.uuid
}
uni.$api.userApi.getSceneMerchantRefStoreList(params).then(result => {
uni.hideLoading()
this.loginUserInfoList = result
this.copyLoginUserInfoList = result
this.flag = true
}).catch(err => {
uni.hideLoading()
console.log(err)
})
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!