Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
49a26d29
Commit
49a26d29
authored
Nov 14, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 积分商城页面
parent
66829686
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
275 additions
and
2 deletions
+275
-2
app.json
src/app.json
+2
-1
project.config.json
src/project.config.json
+7
-1
IntegralMallGoods.js
...Package/page/pages/IntegralMallGoods/IntegralMallGoods.js
+105
-0
IntegralMallGoods.json
...ckage/page/pages/IntegralMallGoods/IntegralMallGoods.json
+10
-0
IntegralMallGoods.wxml
...ckage/page/pages/IntegralMallGoods/IntegralMallGoods.wxml
+45
-0
IntegralMallGoods.wxss
...ckage/page/pages/IntegralMallGoods/IntegralMallGoods.wxss
+106
-0
No files found.
src/app.json
View file @
49a26d29
...
@@ -59,7 +59,8 @@
...
@@ -59,7 +59,8 @@
"pages/noPermission/noPermission"
,
"pages/noPermission/noPermission"
,
"pages/scanCoupon/scanCoupon"
,
"pages/scanCoupon/scanCoupon"
,
"pages/scanCouponStoreList/scanCouponStoreList"
,
"pages/scanCouponStoreList/scanCouponStoreList"
,
"pages/recordList/recordList"
"pages/recordList/recordList"
,
"pages/IntegralMallGoods/IntegralMallGoods"
]
]
},
},
{
{
...
...
src/project.config.json
View file @
49a26d29
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
"list"
:
[]
"list"
:
[]
},
},
"miniprogram"
:
{
"miniprogram"
:
{
"current"
:
6
2
,
"current"
:
6
3
,
"list"
:
[
"list"
:
[
{
{
"id"
:
-1
,
"id"
:
-1
,
...
@@ -455,6 +455,12 @@
...
@@ -455,6 +455,12 @@
"pathName"
:
"subPackage/page/pages/recordList/recordList"
,
"pathName"
:
"subPackage/page/pages/recordList/recordList"
,
"query"
:
""
,
"query"
:
""
,
"scene"
:
null
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"积分商城新"
,
"pathName"
:
"subPackage/page/pages/IntegralMallGoods/IntegralMallGoods"
,
"scene"
:
null
}
}
]
]
}
}
...
...
src/subPackage/page/pages/IntegralMallGoods/IntegralMallGoods.js
0 → 100644
View file @
49a26d29
// pages/userCenter.js
const
wxService
=
require
(
'../../../../utils/wxService'
)
wxService
.
page
({
/**
* 页面的初始数据
*/
data
:
{
pageNo
:
1
,
pageSize
:
10
,
query
:
''
,
totalPages
:
0
,
integralCouponList
:
[],
// 积分兑换优惠券列表
noMore
:
false
,
isExchange
:
false
,
exchangeId
:
''
,
exchangePoint
:
0
,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
this
.
initIntegralCouponList
()
},
// 积分兑换优惠券列表
initIntegralCouponList
()
{
wx
.
showLoading
({
title
:
'加载中'
})
// wxService.get(`/coupon/pointsRedemptionCouponSetting/findPage?pageNo=${pageNo}&pageSize=${pageSize}&query=${this.data.query}`).then(res => {
// const {result,data} = res.data
// if(result == 0){
// wx.hideLoading()
// this.setData({
// integralCouponList: this.data.pageNo == 1? [...data.content]: [...this.data.integralCouponList,...data.content],
// totalPages: data.totalPages
// })
// }
// }).finally(() => {
// wx.hideLoading();
// })
// 查询所有生效中的活动
wxService
.
get
(
`/coupon/pointsRedemptionCouponSetting/getAllValid`
).
then
(
res
=>
{
if
(
res
){
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
){
wx
.
hideLoading
()
this
.
setData
({
integralCouponList
:
data
.
reverse
()
})
}
}
}).
finally
(()
=>
{
wx
.
hideLoading
();
})
},
//立即兑换
exchange
(
e
){
const
{
id
,
point
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
isExchange
:
true
,
exchangeId
:
id
,
exchangePoint
:
point
})
},
// 点击跳转至会员规则页
handleGoMemberRulesRules
()
{
wxService
.
router
(
`/pages/memberRules/memberRules?type=2`
)
},
goCouponDetail
(
e
)
{
const
{
id
}
=
e
.
currentTarget
.
dataset
wxService
.
router
(
`/pages/integralMallDetail/integralMallDetail?id=
${
id
}
`
)
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
// if (this.data.pageNo < this.data.totalPages) {
// this.setData({
// pageNo: this.data.pageNo + 1,
// pageSize: 10,
// noMore: true
// })
// this.initIntegralCouponList(this.data.pageNo, this.data.pageSize)
// } else {
// this.setData({
// noMore: true
// })
// }
},
})
\ No newline at end of file
src/subPackage/page/pages/IntegralMallGoods/IntegralMallGoods.json
0 → 100644
View file @
49a26d29
{
"enablePullDownRefresh"
:
true
,
"navigationBarTitleText"
:
"积分商城"
,
"usingComponents"
:
{
"no-more"
:
"/component/noMore/noMore"
,
"exchange-coupon-modal"
:
"/component/exchange-coupon-modal/exchange-coupon-modal"
,
"go-home"
:
"/component/goHome/goHome"
}
}
\ No newline at end of file
src/subPackage/page/pages/IntegralMallGoods/IntegralMallGoods.wxml
0 → 100644
View file @
49a26d29
<!--pages/userCenter.wxml-->
<view class='page-integral-mall' style="padding-bottom: 40rpx">
<view class='integral-vip-rules' wx:if="{{integralCouponList.length}}" bindtap="handleGoMemberRulesRules">会员规则</view>
<view class='coupon-wrap' wx:if="{{integralCouponList.length}}">
<view
class='coupon-list'
wx:for="{{integralCouponList}}"
wx:for-item="item"
wx:for-index="k"
wx:key="{{k}}"
data-id="{{item.id}}"
bindtap="goCouponDetail"
>
<view class="coupon-item">
<view class='coupon-img'>
<image wx:if="{{item.thumbnail}}" src='{{item.thumbnail}}' />
<image wx:else src='/assets/imgs/qr-code.png' />
</view>
<view class='coupon-info'>
<view class='coupon-time fs-24'>{{item.point}}积分</view>
<view class='coupon-name fs-28'>{{item.title}}</view>
<view class='coupon-desc fs-24'>查看详情 >>></view>
</view>
<view
class='coupon-code fs-24'
data-id="{{item.id}}"
data-point="{{item.point}}"
catchtap='exchange'
>立即兑换
</view>
</view>
</view>
</view>
<view class='empty-wrap' wx:if="{{!integralCouponList.length}}">
<view class='empty-info'>
<image class='empty-img' src='/assets/imgs/empty-coupon.png' />
<view class='empty-text'>没有任何卡劵</view>
</view>
</view>
<exchange-coupon-modal exchangeId="{{exchangeId}}" exchangePoint="{{exchangePoint}}" isExchange='{{isExchange}}' />
<!--<no-more wx:if="{{noMore}}"/>-->
<!--goHome-->
<go-home/>
</view>
src/subPackage/page/pages/IntegralMallGoods/IntegralMallGoods.wxss
0 → 100644
View file @
49a26d29
/* pages/userCenter.wxss */
@import '/base/base.wxss';
page {
background-color: rgba(0, 0, 0, 0.05);
}
.integral-vip-rules{
width:140rpx;
height:35rpx;
line-height: 35rpx;
text-align: center;
color: rgb(64, 205, 147);
font-size: 28rpx;
font-weight: 700;
border: 4rpx solid rgb(64, 205, 147);
padding: 5rpx 8rpx;
border-radius: 50rpx;
margin-top: 25rpx;
float: right;
margin-right: 20rpx;
}
.empty-wrap{
width: 300rpx;
margin: 190rpx auto 0;
text-align: center;
}
.empty-img{
width: 197rpx;
height: 176rpx;
margin-bottom: 48rpx;
}
.empty-text{
color: #cccccc;
font-size: 28rpx;
}
/* 卡劵列表 */
.coupon-wrap{
padding: 20rpx;
clear: both;
}
.coupon-list{
margin-bottom: 20rpx;
}
.coupon-item {
display: flex;
background-repeat: no-repeat;
background-position: center;
background-size: 100% 100%;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAsgAAADRCAYAAADR7UQMAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFW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XbwFHyNeWMEYMzEhdB1b5FIk4/8ezOH8Vd2pC/dccEXrjk+jqPBZd5OZLZ/wCQ+u15v4F4U7EUGYLwcDOvcYhHd/vzPHig67Us22zcf3whkxxkfun+w33gt/xVgAJby87DGApohAAAAAElFTkSuQmCC")
}
.coupon-img {
padding: 15rpx;
box-sizing: border-box;
}
.coupon-img image{
width: 172rpx;
height: 172rpx;
}
.coupon-info{
padding: 42rpx 39rpx;
box-sizing: border-box;
}
.coupon-name{
color:#333;
}
.coupon-time{
color:#fc921e;
margin-bottom: 18rpx;
font-size: 26rpx;
}
.coupon-desc{
color:#999;
margin-top: 11rpx;
width: 360rpx;
font-size: 24rpx;
}
.coupon-code{
color: #ffffff;
word-wrap: break-word;
font-weight: bold;
margin: 0 10rpx;
padding: 35rpx 20rpx;
box-sizing: content-box;
width: 40rpx;
line-height: 35rpx;
}
.invalid-coupon{
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background-color: rgba(0,0,0,0.5);
z-index:3;
border-radius: 7rpx;
}
.invalid-img{
position: absolute;
width: 147rpx;
height: 147rpx;
right: 81rpx;
top: 31rpx;
z-index: 4;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment