Commit 775cfc2e by 杨北旺

提交

1 parent 37dba5ff
import { preReleaseAppId } from '~/config'
const target = ['ip', 'dev', 'uat', 'prod', 'preRelease']
let index = 1
let index = 2
/**
*
......@@ -108,9 +108,9 @@ const pathEnum = {
const defaultMerchantId = {
ip: '44211227',
dev: '44211227',
uat: '44210895',
uat: '44211651',
prod: '44208317',
preRelease: '44211283'
preRelease: '44209566'
}[target[index]]
const CONFIG_ENV_MAP={
......
......@@ -6,7 +6,7 @@ const serverConfig = {
mockTimer: {},
mockCache: null,
};
const configModule = 'mini-hmd'
const configModule = 'mini-wuye'
const configUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${configModule}&env=${env}`;
/**获取mock数据 */
......
{
"pages": [
"pages/loading/loading",
"pages/tab/index/index",
"pages/tab/equity/index",
"pages/tab/mall/index",
......
......@@ -26,7 +26,7 @@ Page({
if (options.url) {
return this.login(options)
}
this.login()
this.login(options)
},
async login(options = {}) {
if (options.merchantId) wx.$merchant_id = options.merchantId
......
const navStyle = "background-color: transparent;";
import { IMG_URL } from '../../../config'
import { IMG_URL } from '~/config';
import {env} from '~/api/env/index'
Page({
data: {
IMG_URL,
navStyle,
noticeContent: true,
noticeContent: '卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡',
bannerList: [{
bannerImg: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/wuye/home/banner_test.png'
}],
noticeContent: '',
bannerList: [],
codeList: [{
title: '官方',
desc: '福利群',
......@@ -20,8 +18,9 @@ Page({
tip: '超多福利,不容错过',
url: 'fuliguan'
}],
showModal:false,
urlName:''
showModal: false,
urlName: '',
merchantName:'深圳中海美居'
},
navbarReady(e) {
let { height } = e.detail;
......@@ -38,6 +37,7 @@ Page({
});
},
onLoad() {
this.getHomeConfig()
this.getStrategyList();
},
......@@ -50,7 +50,6 @@ Page({
mainFlag: 1,
})
.then((res) => {
console.log(res);
this.setData({
strategyList: res.list,
});
......@@ -83,4 +82,121 @@ Page({
toCarLife() {
wx.p.router.go("/packageIndex/pages/carLife/index");
},
getHomeConfig() {
wx.p.api.homeApi.getHomeConfig().then(data => {
let {
merchantName,
noticeContent
} = data
// let {
// userInfo
// } = this.data
//在线客服
// let customerlist = []
// if (data.customerServerName && data.customerServerOrCode) {
// customerlist.push({
// staffName: data.customerServerName,
// qrCode: data.customerServerOrCode,
// thumbAvatar: data.customerServerAvatar,
// staffPhone: data.customerServerPhone
// })
// }
// let utilList = [..._utilList_]
// if (data.clueList && data.clueList.length) {
// /**clueId 1:救援服务,2:维保预约,3:新车频道 */
// // const clueList = {
// // 2: {
// // name: '维保预约',
// // url: '/packageShopmall/packageIndex/pages/reservation/index/index',
// // icon: 'mainten-appoint',
// // hideMenu: true
// // },
// // 3: {
// // name: '新车频道',
// // url: '/packageShopmall/packageIndex/pages/newCars/index/index',
// // icon: 'new-car-channel',
// // badge: '特价新车'
// // },
// // 4: {
// // name: '代驾服务',
// // h5: '',
// // icon: 'sub-driving'
// // },
// // 5: {
// // name: '精品商城',
// // url: '',
// // icon: 'shop_icon',
// // tabBar: true
// // }
// // }
// // data.clueList.map(e => {
// // if (e.clueId == 1) {
// // let rescueTypeList = [{
// // confId: 0,
// // name: '紧急脱困',
// // icon: 'emergency_relief_icon'
// // },
// // {
// // confId: 1,
// // name: '拖车',
// // icon: 'trailer_icon'
// // },
// // {
// // confId: 2,
// // name: '换胎',
// // icon: 'trie_change_icon'
// // },
// // {
// // confId: 3,
// // name: '送油',
// // icon: 'send_oil_icon'
// // },
// // {
// // confId: 4,
// // name: '搭电',
// // icon: 'pick_up_power_icon'
// // },
// // {
// // confId: 5,
// // name: '事故救援',
// // icon: 'accident_rescue_icon'
// // }
// // ]
// // rescueTypeList.forEach(v => {
// // utilList.push({
// // ...v,
// // // url: 'packageEquity.road.index'
// // url: '/packageShopmall/packageEquity/pages/road/index/index'
// // })
// // })
// // } else utilList.push(clueList[e.clueId])
// // })
// }
let bannerList = []
if (data.bannerList && data.bannerList.length) bannerList = data.bannerList
bannerList.unshift({
bannerImg: `${this.data.IMG_URL}home/banner_test.png`,
equity: true
})
this.setData({
merchantName,
noticeContent,
bannerList
})
wx.hideLoading()
})
},
// 门店切换
changeStore(){
console.log(env);
const currentMerchantId = wx.$merchant_id
const merchantObj = {
'develop':[44211227,44209845],
'test':[44211651,44211654],
'beta':[],
'production':[44209566,44209565],
}
const MerchantList = merchantObj[env]
console.log(MerchantList);
},
});
......@@ -6,8 +6,8 @@
<view class="store-wrap">
<view class="inner flex_sc">
<glsx-image class="logo" webp src="home/store_logo.png"></glsx-image>
<view class="store_name">深圳中海美居</view>
<view class="change_box">
<view class="store_name">{{merchantName}}</view>
<view bind:tap="changeStore" class="change_box">
<glsx-image class="icon" webp src="home/change_store_icon.png"></glsx-image>
</view>
</view>
......@@ -44,7 +44,9 @@
</block>
</view>
<!-- 省钱攻略 -->
<MoneySavingTips list="{{strategyList}}" bind:selectStrategy="selectStrategy"></MoneySavingTips>
<block wx:if="{{strategyList.length}}">
<MoneySavingTips list="{{strategyList}}" bind:selectStrategy="selectStrategy"></MoneySavingTips>
</block>
</view>
<!-- 弹框 -->
<view wx:if="{{showModal}}" class="modal_widget">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!