Commit f3158552 by 胡悦

Merge branch 'v1.0.1' of http://192.168.3.233:8090/glsx/gl_tape into v1.0.1

2 parents 1e65f58b 37c340e4
...@@ -16,6 +16,15 @@ module.exports = { ...@@ -16,6 +16,15 @@ module.exports = {
/**获取当前登录账号能查看的园区店列表 */ /**获取当前登录账号能查看的园区店列表 */
getYQList () { getYQList () {
data.projectName = 'boutique'
return http.fetch('dj.api.smartcarlife.serviceMerchant.curYqList') return http.fetch('dj.api.smartcarlife.serviceMerchant.curYqList')
}, },
// 获取园区店下的4s店
getSceneMerchantRefStoreList (data) {
data.projectName = 'boutique'
return http.post({
method: 'dj.api.scenemerchantref.query4SRefByYqShopByLogin',
...data,
})
},
} }
\ No newline at end of file \ No newline at end of file
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
}, },
"pages": [ "pages": [
{ {
"path": "pages/home/home", "path": "pages/common/login",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/common/login", "path": "pages/home/home",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
...@@ -35,6 +35,24 @@ ...@@ -35,6 +35,24 @@
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},
{
"path": "pages/common/nothing",
"style": {
"navigationBarTitleText": "提示"
}
},
{
"path": "pages/common/accountItems",
"style": {
"navigationBarTitleText": "选择账号"
}
},
{
"path": "pages/common/merchantList",
"style": {
"navigationBarTitleText": "选择4S店"
}
} }
], ],
"globalStyle": { "globalStyle": {
...@@ -43,4 +61,4 @@ ...@@ -43,4 +61,4 @@
"navigationBarBackgroundColor": "#F8F8F8", "navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8" "backgroundColor": "#F8F8F8"
} }
} }
\ No newline at end of file \ No newline at end of file
<template>
<div>
</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
</style>
\ No newline at end of file \ No newline at end of file
...@@ -46,10 +46,7 @@ ...@@ -46,10 +46,7 @@
</view> </view>
</template> </template>
<!-- :class="['code-btn', { 'code-disabled': count }]" --> <!-- :class="['code-btn', { 'code-disabled': count }]" -->
<view <view @click="getSmsCode">{{ count ? `重新发送(${count}s)` : '获取验证码' }}</view>
@click="getSmsCode"
>{{ count ? `重新发送(${count}s)` : '获取验证码' }}</view>
</view> </view>
<button <button
class="btn" class="btn"
...@@ -126,34 +123,13 @@ export default { ...@@ -126,34 +123,13 @@ export default {
let { let {
loginUserInfoList, loginUserInfoList,
sessionId, sessionId,
noSignInUuid,
needSelectAccount,
} = data; } = data;
if (loginUserInfoList.length) { if (loginUserInfoList.length) {
const loginUserObj =
loginUserInfoList.filter(
(val) =>
val.subLoginUser && Object.keys(val.subLoginUser)?.length
)[0] || {};
uni.$storage.set('sessionId', sessionId); uni.$storage.set('sessionId', sessionId);
this.getAccountLoginList(loginUserInfoList)
console.log(loginUserObj) } else uni.reLaunch({
// getYQList(); url: '/pages/common/nothing'
// noSignInUuid ? setNoSignInUuid(noSignInUuid) : rmNoSignInUuid(); });
// 记录登录信息 已选园区店、4s店和场景
if (!needSelectAccount && Object.keys(loginUserObj)?.length && loginUserObj?.shopMerchantId && !((loginUserObj?.sceneType ?? '') === '')) {
this.getYqMerchantSceneConfig(loginUserObj, 0);
} else if (!needSelectAccount && Object.keys(loginUserObj)?.length && loginUserObj?.shopMerchantId && (loginUserObj?.sceneType ?? '') === '') {
// 已选园区店、4s店
this.getYqMerchantSceneConfig(loginUserObj, 1);
} else if (!needSelectAccount) {
// 仅选择园区店
this.getYqMerchantSceneConfig(loginUserObj, 2);
} else {
// 未记录到登录信息
this.getAccountLoginList(loginUserInfoList);
}
} else wx.$router.reLaunch('pages.nothing');
} else } else
uni.showModal({ uni.showModal({
title: '温馨提示', title: '温馨提示',
...@@ -170,48 +146,74 @@ export default { ...@@ -170,48 +146,74 @@ export default {
}); });
} }
}, },
async getYqMerchantSceneConfig (loginUserObj, num) {
// let checkAgreeClient = await this.checkAgreeClient(loginUserObj)
// if (!checkAgreeClient) return wx.$router.go('pages.accountItems')
// num 0已选园区店、4s店和场景 1已选园区店、4s店 2仅选择园区店
let pageUrl = ['pages.loading', 'pages.sceneIndex', 'pages.merchantList']
let { shopMerchantId, shopMerchantName } = loginUserObj
wx.$util.setUserInfo(loginUserObj)
if (num == 2) {
this.get4SStoreList(loginUserObj, pageUrl[num])
} else {
// 兼容除精品升级外场景 已选门店数据
wx.$util.setUserInfo({
...wx.$util.getUserInfo(),
default4SStoreInfo: {
merchantId: shopMerchantId,
merchantName: shopMerchantName
},
default4SStoreInfo_crowdFunding: {
merchantId: shopMerchantId,
merchantName: shopMerchantName
},
default4SStoreInfo_newCarConversion: {
merchantId: shopMerchantId,
merchantName: shopMerchantName
}
})
if (num == 0) wx.$router.reLaunch(pageUrl[num])
else wx.$router.go(pageUrl[num])
this.setData({ jumpPageFlag: false })
}
},
// 获取登录账号下园区店列表 // 获取登录账号下园区店列表
getAccountLoginList (loginUserInfoList) { getAccountLoginList (loginUserInfoList) {
if (loginUserInfoList?.length == 1) this.getYqMerchantSceneConfig(loginUserInfoList[0], 2) if (loginUserInfoList?.length == 1) this.get4SStoreList(loginUserObj)
else wx.$router.go('pages.accountItems') else uni.navigateTo({
url: '/pages/common/accountItems'
})
},
// 获取园区店下4s店数据
get4SStoreList (loginUserObj) {
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]
uni.$storage.set('userInfo', {
...userInfo,
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,
shopMerchantName: merchantName,
shopMerchantId: merchantId,
default4SStoreInfo: {
merchantId: merchantId,
merchantName: merchantName
},
default4SStoreInfo_crowdFunding: {
merchantId: merchantId,
merchantName: merchantName
},
default4SStoreInfo_newCarConversion: {
merchantId: merchantId,
merchantName: merchantName
}
})
uni.redirectTo({
url: '/pages/home/home'
})
} else if (!result?.length) {
return uni.showToast({
title: '园区店关联的4s店商户账号无效,请联系总部管理员',
icon: 'none',
})
} else uni.navigateTo({
url: '/pages/common/merchantList'
})
})
}, },
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.a{ .a {
width: 500px; width: 500px;
height: 200px; height: 200px;
} }
......
<template>
<div>
</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div>
</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
</style>
\ No newline at end of file \ No newline at end of file
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-04-08 11:11:15 * @LastEditTime: 2024-04-08 11:11:15
*/ */
// import modules from './modules' // // import modules from './modules'
// import Vue from 'vue' // // import Vue from 'vue'
// import Router from '@/plugin/uni-simple-router/index.js' // // import Router from '@/plugin/uni-simple-router/index.js'
// Vue.use(Router) // Vue.use(Router)
// //初始化 // //初始化
......
...@@ -20,5 +20,33 @@ const routes = [ ...@@ -20,5 +20,33 @@ const routes = [
title: '详情', title: '详情',
}, },
}, },
{
path: "/pages/common/nothing",
name: 'login',
meta: {
title: '提示',
},
},
{
path: "/pages/common/accountItems",
name: 'login',
meta: {
title: '选择账号',
},
},
{
path: "/pages/common/merchantList",
name: 'login',
meta: {
title: '选择4S店',
},
},
{
path: "/pages/home/home",
name: 'login',
meta: {
title: '首页',
},
},
] ]
export default routes export default routes
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!