Commit 3c15cfd6 by 李伟康

商城增加默认图

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