Commit 59d27628 by zhangxw

冒烟修改

1 parent d0303068
......@@ -257,15 +257,14 @@ Page({
// 获取园区店下4s店数据
get4SStoreList(loginUserObj) {
let { merchantId, isSuper, uuid } = loginUserObj
// 超管跳过选择4s店页面
if (isSuper) {
// this.setShopMerchantObj(obj)
wx.$router.go('pages.sceneIndex')
return
}
get4SStoreList({merchantId: isSuper ? undefined : merchantId, staffUUID: uuid}).then(result => {
// 超管/仅一家4s店
let obj = (result && result[0]) || {}
// 超管跳过选择4s店页面
if (isSuper) {
// this.setShopMerchantObj(obj)
wx.$router.go('pages.sceneIndex')
return
}
// 仅一家4s店
if (result?.length == 1) {
this.setShopMerchantObj(obj)
......
......@@ -8,7 +8,8 @@ Page({
*/
data: {
sceneList: constantData.sceneList,
openSceneArr: []
openSceneArr: [],
showPage: false
},
// 选择场景
......@@ -57,7 +58,7 @@ Page({
getSceneArr() {
// 超管默认开通全部场景
let userInfo = wx.$util.getUserInfo()
if (userInfo?.isSuper) return
if (userInfo?.isSuper) return this.setData({showPage: true})
wx.$util.showLoading()
// 获取4s店关联场景数据
getShopSceneConfig({yqMerchantId: userInfo?.subLoginUser?.merchantId, merchantId: userInfo?.isSuper ? undefined : userInfo?.shopMerchantId}).then(result => {
......@@ -77,7 +78,7 @@ Page({
})
wx.$router.reLaunch('pages.loading')
}
this.setData({openSceneArr: arr})
this.setData({openSceneArr: arr, showPage: true})
})
},
......
<!-- pages/sceneIndex/sceneIndex.wxml -->
<view class="layout">
<scroll-view class="scene-box" scroll-y style="height: calc(100vh - 140rpx - {{isFullSucreen ? 34 : 0}}px - 60rpx);">
<scroll-view wx:if="{{showPage}}" class="scene-box" scroll-y style="height: calc(100vh - 140rpx - {{isFullSucreen ? 34 : 0}}px - 60rpx);">
<block wx:for="{{sceneList}}" wx:key="index">
<view class="scene-item {{item.actived ? 'active' : ''}}" bindtap="selectScene" data-scene="{{item.sceneType}}" data-index="{{index}}">
<view class="left">
......
......@@ -259,9 +259,11 @@ export const get4SStoreList = options => {
.getSceneMerchantRefStoreList(options)
.then(res => {
wx.$util.hideLoading()
let { code, data } = res
let { code, data, message } = res
if (code == 0) {
resolve(data || [])
} else {
wx.$util.showToast(message)
}
})
.catch(error => {
......
......@@ -77,6 +77,10 @@ Component({
api.getHomeStaticData(params).then(res => {
let { code, data } = res
if (code == 0) {
// 分转元
if (data.todayAmount) data.todayAmount = NP.divide(data.todayAmount,100)
if (data.monthAmount) data.todayAmount = NP.divide(data.monthAmount,100)
if (data.totalAmount) data.todayAmount = NP.divide(data.totalAmount,100)
this.setData({
staticData: data || {}
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!