Commit 3c15cfd6 by 李伟康

商城增加默认图

1 parent 046bcf18
import { preReleaseAppId } from '~/config' import { preReleaseAppId } from '~/config'
const target = ['ip', 'dev', 'uat', 'prod', 'preRelease'] const target = ['ip', 'dev', 'uat', 'prod', 'preRelease']
let index = 1 let index = 2
/** /**
* *
...@@ -108,7 +108,7 @@ const defaultMerchantId = { ...@@ -108,7 +108,7 @@ const defaultMerchantId = {
ip: '44211227', ip: '44211227',
dev: '44211227', dev: '44211227',
uat: '44210895', uat: '44210895',
prod: '44189923' prod: '101430'
}[target[index]] }[target[index]]
const CONFIG_ENV_MAP={ const CONFIG_ENV_MAP={
......
// pages/tab/mall/index.js // pages/tab/mall/index.js
const defaultClassify = ['今日推荐', '新酒预售', '口粮特选', '店铺爆款', '寰球名庄', '红葡萄酒', '白葡萄酒', '雷司令', '起泡酒', '果汁', '西班牙', '南非', '意大利', '德国']
Page({ Page({
/** /**
...@@ -40,7 +41,7 @@ Page({ ...@@ -40,7 +41,7 @@ Page({
let tabList = [{ let tabList = [{
zoneName: '全部', zoneName: '全部',
id: '', id: '',
zoneImg: `mall/default-banner.png` zoneImg : `mall/default-banner.png`
}] }]
let classifyList = [] let classifyList = []
data.map(e => { data.map(e => {
...@@ -67,7 +68,7 @@ Page({ ...@@ -67,7 +68,7 @@ Page({
}) })
obj = { obj = {
goodsData: arr, goodsData: arr,
id: e.id id: e.id,
} }
} else { } else {
val.classifyName = e.classifyName val.classifyName = e.classifyName
...@@ -78,11 +79,14 @@ Page({ ...@@ -78,11 +79,14 @@ Page({
} }
} }
}) })
classifyList.push(obj) let tab = {
tabList.push({
zoneName: e.classifyName, zoneName: e.classifyName,
id: e.id id: e.id,
}) zoneImg: `mall/${e.classifyName}.png`
}
if (!defaultClassify.includes(e.classifyName)) tab.zoneImg = `mall/default-banner.png`
classifyList.push(obj)
tabList.push(tab)
} }
}) })
this.setData({ this.setData({
......
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
<block wx:if='{{goodsFlag}}'> <block wx:if='{{goodsFlag}}'>
<view class="box"> <view class="box">
<view class="banner"> <view class="banner">
<glsx-image webp src="{{tabList[tagIndex].zoneImg}}"></glsx-image> <!-- <glsx-image webp src="{{tabList[tagIndex].zoneImg}}"></glsx-image> -->
<glsx-image src="{{tabList[tagIndex].zoneImg}}"></glsx-image>
</view> </view>
<view class="title"> <view class="title">
{{tabList[tagIndex].zoneName}} {{tabList[tagIndex].zoneName}}
......
...@@ -57,6 +57,6 @@ ...@@ -57,6 +57,6 @@
], ],
"include": [] "include": []
}, },
"appid": "wxe10067a63c1856ac", "appid": "wx2a9f38eb8e39b823",
"projectname": "hmd" "projectname": "hmd"
} }
\ 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!