Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
zhwy
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 8bb53f92
authored
Sep 26, 2023
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v1.0.0' of
http://192.168.3.233:8090/saas/mini-program/zhwy
into v1.0.0
2 parents
775cfc2e
63d96bfc
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
457 additions
and
42 deletions
app.json
packageIndex/components/GoodsItem/GoodsItem.wxss
packageIndex/pages/constant/lifeConstant.js
packageIndex/pages/homeLife/index.js
packageIndex/pages/homeLife/index.json
packageIndex/pages/homeLife/index.scss
packageIndex/pages/homeLife/index.wxml
packageSaveMoney/pages/allEquity/allEquity.js
packageSaveMoney/pages/allEquity/allEquity.json
packageSaveMoney/pages/allEquity/allEquity.wxml
packageSaveMoney/pages/allEquity/allEquity.wxss
pages/tab/equity/index.js
pages/tab/equity/index.wxml
app.json
View file @
8bb53f9
...
@@ -130,6 +130,12 @@
...
@@ -130,6 +130,12 @@
"pages"
:
[
"pages"
:
[
"pages/strategyDetail/index"
"pages/strategyDetail/index"
]
]
},
{
"root"
:
"packageSaveMoney"
,
"pages"
:
[
"pages/allEquity/allEquity"
]
}
}
],
],
"usingComponents"
:
{
"usingComponents"
:
{
...
...
packageIndex/components/GoodsItem/GoodsItem.wxss
View file @
8bb53f9
...
@@ -18,7 +18,6 @@
...
@@ -18,7 +18,6 @@
.goods-title-box {
.goods-title-box {
display: flex;
display: flex;
max-width: 236rpx;
}
}
.goods-title-tips {
.goods-title-tips {
...
@@ -41,6 +40,7 @@
...
@@ -41,6 +40,7 @@
}
}
.goods-title-text {
.goods-title-text {
max-width: 176rpx;
font-weight: 500;
font-weight: 500;
font-size: 26rpx;
font-size: 26rpx;
color: #333333;
color: #333333;
...
...
packageIndex/pages/constant/lifeConstant.js
View file @
8bb53f9
...
@@ -127,10 +127,97 @@ const goodsList = [
...
@@ -127,10 +127,97 @@ const goodsList = [
}
}
]
]
const
classifyTitleList
=
[
'超值爆款'
,
'商品分类'
,
'商品分分分类'
]
const
classifyGoodsList1
=
[
{
goodsUrl
:
'https://img01.glsx.com.cn/group1/M00/0F/3B/wKgFDWTclNCAdRMqAAHIp1r8d3w346.png'
,
goodsStatus
:
1
,
name
:
'360全景导航'
,
view
:
9900
,
sale
:
1550
,
newPrice
:
129
,
oldPrice
:
169
},
{
goodsUrl
:
'https://img01.glsx.com.cn/group1/M00/0F/3B/wKgFDWTclNCAdRMqAAHIp1r8d3w346.png'
,
goodsStatus
:
2
,
name
:
'360全景导航导航导航导航'
,
view
:
9900
,
sale
:
1550
,
newPrice
:
129
,
oldPrice
:
169
},
{
goodsUrl
:
'https://img01.glsx.com.cn/group1/M00/0F/3B/wKgFDWTclNCAdRMqAAHIp1r8d3w346.png'
,
goodsStatus
:
1
,
name
:
'大闸蟹提货'
,
view
:
9900
,
sale
:
1550
,
newPrice
:
129
,
oldPrice
:
169
},
{
goodsUrl
:
'https://img01.glsx.com.cn/group1/M00/0F/3B/wKgFDWTclNCAdRMqAAHIp1r8d3w346.png'
,
goodsStatus
:
1
,
name
:
'大闸蟹提货大闸蟹提货'
,
view
:
9900
,
sale
:
1550
,
newPrice
:
129
,
oldPrice
:
169
}
]
const
classifyGoodsList2
=
[
{
goodsUrl
:
'https://img01.glsx.com.cn/group1/M00/0F/3B/wKgFDWTclNCAdRMqAAHIp1r8d3w346.png'
,
goodsStatus
:
1
,
name
:
'360全景导航'
,
view
:
9900
,
sale
:
1550
,
newPrice
:
129
,
oldPrice
:
169
},
{
goodsUrl
:
'https://img01.glsx.com.cn/group1/M00/0F/3B/wKgFDWTclNCAdRMqAAHIp1r8d3w346.png'
,
goodsStatus
:
1
,
name
:
'360全景导航导航导航导航'
,
view
:
9900
,
sale
:
1550
,
newPrice
:
129
,
oldPrice
:
169
}
]
const
classifyGoodsList3
=
[
{
goodsUrl
:
'https://img01.glsx.com.cn/group1/M00/0F/3B/wKgFDWTclNCAdRMqAAHIp1r8d3w346.png'
,
goodsStatus
:
1
,
name
:
'大闸蟹提货'
,
view
:
9900
,
sale
:
1550
,
newPrice
:
129
,
oldPrice
:
169
},
{
goodsUrl
:
'https://img01.glsx.com.cn/group1/M00/0F/3B/wKgFDWTclNCAdRMqAAHIp1r8d3w346.png'
,
goodsStatus
:
1
,
name
:
'大闸蟹提货大闸蟹提货'
,
view
:
9900
,
sale
:
1550
,
newPrice
:
129
,
oldPrice
:
169
}
]
export
{
export
{
recreationMenu
,
recreationMenu
,
foodMenu
,
foodMenu
,
tripMenu
,
tripMenu
,
maintainCarMenu
,
maintainCarMenu
,
goodsList
goodsList
,
classifyTitleList
,
classifyGoodsList1
,
classifyGoodsList2
,
classifyGoodsList3
}
}
\ No newline at end of file
\ No newline at end of file
packageIndex/pages/homeLife/index.js
View file @
8bb53f9
// packageIndex/pages/carLife/index.js
// packageIndex/pages/carLife/index.js
import
{
recreationMenu
,
foodMenu
}
from
'../constant/lifeConstant'
import
{
recreationMenu
,
foodMenu
,
classifyTitleList
,
classifyGoodsList1
,
classifyGoodsList2
,
classifyGoodsList3
,
}
from
"../constant/lifeConstant"
;
Page
({
Page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
recreationMenu
,
recreationMenu
,
foodMenu
,
foodMenu
,
strategyList
:
[]
strategyList
:
[],
classifyTitleList
,
titleActive
:
0
,
goodsList
:
[],
classifyGoodsList1
,
classifyGoodsList2
,
classifyGoodsList3
,
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
()
{
onLoad
()
{
this
.
getStrategyList
();
this
.
getStrategyList
();
},
},
...
@@ -23,62 +35,56 @@ Page({
...
@@ -23,62 +35,56 @@ Page({
wx
.
p
.
api
.
strategyApi
wx
.
p
.
api
.
strategyApi
.
getStrategyList
({
.
getStrategyList
({
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
100
pageSize
:
100
,
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
console
.
log
(
res
);
this
.
setData
({
this
.
setData
({
strategyList
:
res
.
list
,
strategyList
:
res
.
list
,
});
});
});
});
},
},
switchTitle
(
e
)
{
const
{
index
}
=
e
.
currentTarget
.
dataset
;
const
_list
=
[
'classifyGoodsList1'
,
'classifyGoodsList2'
,
'classifyGoodsList3'
]
this
.
setData
({
titleActive
:
index
,
goodsList
:
this
.
data
[
_list
[
index
]]
});
},
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
*/
*/
onReady
()
{
onReady
()
{},
},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
()
{
onShow
()
{},
},
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
onHide
()
{
onHide
()
{},
},
/**
/**
* 生命周期函数--监听页面卸载
* 生命周期函数--监听页面卸载
*/
*/
onUnload
()
{
onUnload
()
{},
},
/**
/**
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
*/
*/
onPullDownRefresh
()
{
onPullDownRefresh
()
{},
},
/**
/**
* 页面上拉触底事件的处理函数
* 页面上拉触底事件的处理函数
*/
*/
onReachBottom
()
{
onReachBottom
()
{},
},
/**
/**
* 用户点击右上角分享
* 用户点击右上角分享
*/
*/
onShareAppMessage
()
{
}
})
\ No newline at end of file
\ No newline at end of file
onShareAppMessage
()
{},
});
packageIndex/pages/homeLife/index.json
View file @
8bb53f9
...
@@ -2,7 +2,8 @@
...
@@ -2,7 +2,8 @@
"usingComponents"
:
{
"usingComponents"
:
{
"main-title"
:
"../../../components/MainTitle/MainTitle"
,
"main-title"
:
"../../../components/MainTitle/MainTitle"
,
"menu-box"
:
"../../components/MenuBox/MenuBox"
,
"menu-box"
:
"../../components/MenuBox/MenuBox"
,
"money-saving-tips"
:
"../../../components/MoneySavingTips/MoneySavingTips"
"money-saving-tips"
:
"../../../components/MoneySavingTips/MoneySavingTips"
,
"goods-swiper"
:
"../../components/GoodsSwiper/GoodsSwiper"
},
},
"navigationBarTitleText"
:
"家生活"
"navigationBarTitleText"
:
"家生活"
}
}
\ No newline at end of file
\ No newline at end of file
packageIndex/pages/homeLife/index.scss
View file @
8bb53f9
...
@@ -9,4 +9,35 @@
...
@@ -9,4 +9,35 @@
.title-box
{
.title-box
{
margin
:
30rpx
0
20rpx
0
;
margin
:
30rpx
0
20rpx
0
;
}
}
.classify-title-box
{
display
:
flex
;
align-items
:
baseline
;
}
.classify-title
{
font-weight
:
400
;
font-size
:
32rpx
;
color
:
#333333
;
margin-right
:
48rpx
;
}
.classify-title
:last-child
{
margin-right
:
0
;
}
.classify-title-active
{
position
:
relative
;
font-weight
:
500
;
font-size
:
36rpx
;
color
:
#333333
;
margin-right
:
48rpx
;
}
.
classify-title-active
:
:
after
{
content
:
""
;
display
:
block
;
/* width: 144rpx; */
width
:
100%
;
height
:
12rpx
;
background-image
:
linear-gradient
(
90deg
,
#61a5ff
00
0%
,
#2699fd
100%
);
border-radius
:
6rpx
;
position
:
absolute
;
bottom
:
4rpx
;
}
}
}
packageIndex/pages/homeLife/index.wxml
View file @
8bb53f9
...
@@ -8,5 +8,11 @@
...
@@ -8,5 +8,11 @@
<main-title title="美食推荐"></main-title>
<main-title title="美食推荐"></main-title>
</view>
</view>
<menu-box menuList="{{foodMenu}}"></menu-box>
<menu-box menuList="{{foodMenu}}"></menu-box>
<view class="title-box classify-title-box">
<view class="{{titleActive === index? 'classify-title-active':'classify-title'}}" wx:for="{{classifyTitleList}}" data-index="{{index}}" bind:tap="switchTitle">
{{item}}
</view>
</view>
<goods-swiper goodsList="{{goodsList.length ? goodsList : classifyGoodsList1}}"></goods-swiper>
</view>
</view>
<money-saving-tips list="{{strategyList}}"></money-saving-tips>
<money-saving-tips list="{{strategyList}}"></money-saving-tips>
\ No newline at end of file
\ No newline at end of file
packageSaveMoney/pages/allEquity/allEquity.js
0 → 100644
View file @
8bb53f9
// import { equityApi } from '~/api/api'
import
{
isMember
}
from
'~/utils/cache/storageApi'
Page
({
/**
* 页面的初始数据
*/
data
:
{
cHeight
:
600
,
curIndex
:
0
,
equityList
:
[],
to
:
'to-0'
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
let
system
=
wx
.
getSystemInfoSync
()
this
.
getAllMerchantList
()
this
.
setData
(
{
cHeight
:
system
.
windowHeight
},
()
=>
{
isMember
(
true
)
}
)
if
(
options
.
showToast
)
{
setTimeout
(()
=>
{
wx
.
$api
.
showToast
(
'原商品及品牌均已下架,您可查看其他权益商品'
)
},
500
)
}
},
computerHeight
()
{
let
query
=
wx
.
createSelectorQuery
().
in
(
this
)
let
heightArr
=
[]
let
s
=
0
query
.
selectAll
(
'.scroll_item_wrap'
)
.
boundingClientRect
(
react
=>
{
react
.
forEach
(
item
=>
{
s
+=
item
.
height
heightArr
.
push
(
s
)
})
this
.
data
.
heightArr
=
heightArr
})
.
exec
()
query
.
select
(
'.right_wrap'
)
.
boundingClientRect
(
res
=>
{
this
.
data
.
rightHeight
=
res
.
height
})
.
exec
()
},
scrollViewFn
(
e
)
{
let
scrollTop
=
e
.
detail
.
scrollTop
let
scrollArr
=
this
.
data
.
heightArr
if
(
this
.
data
.
isClickLeft
)
{
this
.
data
.
isClickLeft
=
false
return
}
if
(
scrollTop
>=
scrollArr
[
scrollArr
.
length
-
1
]
-
this
.
data
.
rightHeight
)
{
return
}
else
{
for
(
let
i
=
0
;
i
<
scrollArr
.
length
;
i
++
)
{
if
(
scrollTop
>=
0
&&
scrollTop
<
scrollArr
[
0
])
{
this
.
setData
({
curIndex
:
0
})
}
else
if
(
scrollTop
>=
scrollArr
[
i
-
1
]
-
110
&&
scrollTop
<
scrollArr
[
i
]
-
110
)
{
this
.
setData
({
curIndex
:
i
})
}
}
}
},
slectLeftItem
(
e
)
{
const
{
index
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
curIndex
:
index
,
to
:
`to-
${
index
}
`
,
isClickLeft
:
true
})
},
getAllMerchantList
()
{
let
merchantId
=
wx
.
$storage
.
get
(
'srcm_shopmall_merchant_id'
)
let
para
=
{
merchantId
}
wx
.
p
.
api
.
equityApi
.
getAllEquity
(
para
).
then
(
res
=>
{
let
tempArr
=
res
.
goodsServiceList
tempArr
.
unshift
({
goodsCategory
:
'汽车权益'
,
equityGoodsGroupDescDtos
:
res
.
carServiceList
})
this
.
setData
(
{
equityList
:
tempArr
},
()
=>
{
this
.
computerHeight
()
}
)
})
},
toNewPage
(
e
)
{
const
{
item
}
=
e
.
currentTarget
.
dataset
let
url
=
''
if
(
item
.
supplier
==
'GL_OIL'
)
{
let
sid
=
wx
.
$util
.
getSessionId
()
if
(
!
sid
)
{
url
=
'/packageShopmall/packageEquity/pages/oil/oil?open=2'
}
else
{
const
vip
=
isMember
()
url
=
'/packageShopmall/packageEquity/pages/oil/oil?open='
+
`
${
vip
?
1
:
2
}
`
}
// let para = 'https://mp.weixin.qq.com/s/Gj3PE3n31PHMOMc5S1CYkg'
}
else
if
(
item
.
supplier
==
'GL_ROAD_RESCUE'
)
{
url
=
'/packageShopmall/packageEquity/pages/road/index/index'
}
else
if
(
item
.
supplier
==
'EDJ'
)
{
let
para
=
wx
.
$storage
.
get
(
'edjurl'
)
||
''
para
=
encodeURIComponent
(
para
)
url
=
'/pages/webView/webView?url='
+
para
}
else
if
(
item
.
appearance
==
1
)
{
let
para
=
{
supplier
:
item
.
supplier
,
brandName
:
item
.
brandName
,
location
:
true
}
const
temp
=
JSON
.
stringify
(
para
)
url
=
'/packageShopmall/packageEquity/pages/commodity/detail/detail?param='
+
temp
}
else
if
(
item
.
appearance
==
2
)
{
let
para
=
{
supplier
:
item
.
supplier
,
brandName
:
item
.
brandName
,
icon
:
item
.
equityIcon
}
const
temp
=
JSON
.
stringify
(
para
)
url
=
'/packageShopmall/packageEquity/pages/commodity/chargeDetail/chargeDetail?param='
+
temp
}
wx
.
navigateTo
({
url
})
}
})
packageSaveMoney/pages/allEquity/allEquity.json
0 → 100644
View file @
8bb53f9
{
"usingComponents"
:
{}
}
\ No newline at end of file
\ No newline at end of file
packageSaveMoney/pages/allEquity/allEquity.wxml
0 → 100644
View file @
8bb53f9
<view class="allEquity-container">
<view style="height:{{cHeight}}px" class="left_wrap">
<block wx:for="{{equityList}}" wx:key="index">
<view bind:tap="slectLeftItem" data-index="{{index}}" class="selecTab flex_cc {{curIndex==index?'actvie_class':''}}">
<text>{{item.goodsCategory}}</text>
<view wx:if="{{curIndex==index}}" class="active_line"></view>
</view>
</block>
</view>
<view style="height:{{cHeight}}px" class="right_wrap">
<scroll-view scroll-y="{{true}}" scroll-with-animation scroll-into-view="{{to}}" bindscroll="scrollViewFn" style="height:{{cHeight}}px">
<block wx:for="{{equityList}}" wx:key="index">
<view id="to-{{index}}" class="scroll_item_wrap">
<view class="scroll_title">{{item.goodsCategory}}</view>
<view class="scroll_content">
<view wx:for="{{item.equityGoodsGroupDescDtos}}" wx:for-item="childItem" wx:for-index="indexs" wx:key="indexs" class="element" data-item="{{childItem}}" bind:tap="toNewPage">
<image webp class="element_icon" src="{{childItem.equityIcon}}" />
<view class="element_label common_element_text">
{{childItem.equityName}}
</view>
<view class="element_tip common_element_text">
{{childItem.equityDesc}}
</view>
</view>
</view>
</view>
</block>
</scroll-view>
</view>
</view>
\ No newline at end of file
\ No newline at end of file
packageSaveMoney/pages/allEquity/allEquity.wxss
0 → 100644
View file @
8bb53f9
/* packageEquity/pages/allEquity/allEquity.wxss */
page {
background: #F7F8FA;
}
.allEquity-container {
display: flex;
}
.left_wrap {
width: 21.33%;
}
.right_wrap {
width: 78.67%;
overflow: hidden;
background: white;
box-sizing: border-box;
padding: 0rpx 30rpx 0rpx 32rpx;
}
.scroll_item_wrap {
width: 100%;
padding: 16rpx 0 0rpx 0;
}
.scroll_title {
font-size: 26rpx;
font-weight: 600;
color: #282829;
}
.scroll_content {
margin-top: 36rpx;
display: flex;
flex-wrap: wrap;
}
.element {
width: 25%;
min-height: 176rpx;
margin-bottom: 20rpx;
}
.element_icon {
width: 70%;
height: 92rpx;
}
.element_label {
font-size: 24rpx;
font-weight: 400;
color: #282829;
line-height: 34rpx;
margin-top: 10rpx;
}
.element_tip {
font-size: 20rpx;
font-weight: 400;
color: #FC5B32;
line-height: 40rpx;
text-align: center;
}
.common_element_text {
width: calc(100% - 21rpx);
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.selecTab {
height: 120rpx;
position: relative;
background: #EFF0F2;
font-size: 26rpx;
font-weight: 400;
color: #656566;
}
.active_line {
position: absolute;
top: 50%;
left: 0;
transform: translate(0, -50%);
width: 8rpx;
height: 60rpx;
background: #FC5B32;
border-radius: 2rpx;
}
.actvie_class {
background: #FFFFFF;
color: #282829;
}
.flex_cc {
display: flex;
align-items: center;
justify-content: center;
}
\ No newline at end of file
\ No newline at end of file
pages/tab/equity/index.js
View file @
8bb53f9
...
@@ -32,13 +32,8 @@ Page({
...
@@ -32,13 +32,8 @@ Page({
},
},
navbarReady
(
e
)
{
goMorePage
()
{
let
{
wx
.
p
.
router
.
go
(
'/packageSaveMoney/pages/allEquity/allEquity'
)
height
}
=
e
.
detail
this
.
setData
({
user_box_style
:
`padding-top:
${
height
+
20
}
px`
})
},
},
// 获取附近优惠数据
// 获取附近优惠数据
...
@@ -60,7 +55,7 @@ Page({
...
@@ -60,7 +55,7 @@ Page({
if
(
page
)
{
if
(
page
)
{
para
.
pageSize
=
0
para
.
pageSize
=
0
}
}
equityApi
.
lasteCommodity
(
para
).
then
(
res
=>
{
wx
.
p
.
api
.
equityApi
.
lasteCommodity
(
para
).
then
(
res
=>
{
if
(
!
res
)
{
if
(
!
res
)
{
this
.
setData
({
this
.
setData
({
loadOver
:
true
loadOver
:
true
...
...
pages/tab/equity/index.wxml
View file @
8bb53f9
...
@@ -10,17 +10,17 @@
...
@@ -10,17 +10,17 @@
</view>
</view>
<view class="title-box flex">
<view class="title-box flex">
<main-title title="吃喝省"></main-title>
<main-title title="吃喝省"></main-title>
<view class="more-text">更多 <gl-icon iconName="{{'gl-icon-the-arrow'}}" fontSize="26" color="#666666"></gl-icon></view>
<view class="more-text"
bind:tap="goMorePage"
>更多 <gl-icon iconName="{{'gl-icon-the-arrow'}}" fontSize="26" color="#666666"></gl-icon></view>
</view>
</view>
<menu-box menuList="{{foodMenuList}}"></menu-box>
<menu-box menuList="{{foodMenuList}}"></menu-box>
<view class="title-box flex">
<view class="title-box flex">
<main-title title="娱乐省"></main-title>
<main-title title="娱乐省"></main-title>
<view class="more-text">更多 <gl-icon iconName="{{'gl-icon-the-arrow'}}" fontSize="26" color="#666666"></gl-icon></view>
<view class="more-text"
bind:tap="goMorePage"
>更多 <gl-icon iconName="{{'gl-icon-the-arrow'}}" fontSize="26" color="#666666"></gl-icon></view>
</view>
</view>
<menu-box menuList="{{funMenuList}}"></menu-box>
<menu-box menuList="{{funMenuList}}"></menu-box>
<view class="title-box flex">
<view class="title-box flex">
<main-title title="用车省"></main-title>
<main-title title="用车省"></main-title>
<view class="more-text">更多 <gl-icon iconName="{{'gl-icon-the-arrow'}}" fontSize="26" color="#666666"></gl-icon></view>
<view class="more-text"
bind:tap="goMorePage"
>更多 <gl-icon iconName="{{'gl-icon-the-arrow'}}" fontSize="26" color="#666666"></gl-icon></view>
</view>
</view>
<menu-box menuList="{{carMenuList}}"></menu-box>
<menu-box menuList="{{carMenuList}}"></menu-box>
<view class="title-box">
<view class="title-box">
...
...
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