Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
hmd
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3c15cfd6
authored
Jul 19, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
商城增加默认图
1 parent
046bcf18
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
10 deletions
api/env/index.js
pages/tab/mall/index.js
pages/tab/mall/index.wxml
project.config.json
api/env/index.js
View file @
3c15cfd
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
View file @
3c15cfd
// 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
({
...
...
pages/tab/mall/index.wxml
View file @
3c15cfd
...
@@ -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}}
...
...
project.config.json
View file @
3c15cfd
...
@@ -57,6 +57,6 @@
...
@@ -57,6 +57,6 @@
],
],
"include"
:
[]
"include"
:
[]
},
},
"appid"
:
"wx
e10067a63c1856ac
"
,
"appid"
:
"wx
2a9f38eb8e39b823
"
,
"projectname"
:
"hmd"
"projectname"
:
"hmd"
}
}
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment