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
5c916155
You need to sign in or sign up before continuing.
Commit
5c916155
authored
May 24, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
ssh://gitlab.bigaka.net:2287/gaoshq/7-Eleven
into dev
parents
a6226c87
a7c52287
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
165 additions
and
140 deletions
+165
-140
IntegralMall.js
src/pages/IntegralMall/IntegralMall.js
+46
-30
IntegralMall.wxml
src/pages/IntegralMall/IntegralMall.wxml
+3
-0
consumptionDetails.js
src/pages/consumptionDetails/consumptionDetails.js
+9
-39
couponDetail.js
src/pages/couponDetail/couponDetail.js
+10
-45
coupons.js
src/pages/coupons/coupons.js
+77
-4
coupons.wxml
src/pages/coupons/coupons.wxml
+2
-0
integralMallDetail.js
src/pages/integralMallDetail/integralMallDetail.js
+12
-8
mySpend.js
src/pages/mySpend/mySpend.js
+1
-1
mySpend.wxml
src/pages/mySpend/mySpend.wxml
+5
-13
No files found.
src/pages/IntegralMall/IntegralMall.js
View file @
5c916155
...
...
@@ -9,7 +9,11 @@ wxService.page({
* 页面的初始数据
*/
data
:
{
params
:
{
pageNo
:
'1'
,
pageSize
:
'10'
},
totalPages
:
''
},
/**
...
...
@@ -20,51 +24,62 @@ wxService.page({
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{
this
.
initIntegralCouponList
()
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
//获取消费列表
initIntegralCouponList
(
type
)
{
wx
.
showLoading
({
title
:
'加载中'
})
wxService
.
get
(
`/coupon/pointsRedemptionCouponSetting/findPage?pageNo=
${
this
.
data
.
params
.
pageNo
}
&pageSize=
${
this
.
data
.
params
.
pageSize
}
`
).
then
(
res
=>
{
let
integralCouponList
=
[];
integralCouponList
=
this
.
data
.
params
.
pageNo
==
1
?
res
.
data
.
data
:
this
.
data
.
integralCouponList
.
concat
(
res
.
data
.
data
);
this
.
setData
({
integralCouponList
,
totalPages
:
res
.
data
.
data
.
totalPages
,
})
wx
.
hideLoading
();
if
(
type
&&
type
.
pullDown
)
wx
.
stopPullDownRefresh
();
}).
finally
(()
=>
{
wx
.
hideLoading
();
this
.
setData
({
integralCouponList
:
''
})
})
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
this
.
setData
({
params
:
{
pageNo
:
1
,
pageSize
:
10
,
},
})
this
.
initIntegralCouponList
({
pullDown
:
true
});
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
bindDownLoad
:
function
()
{
if
(
this
.
data
.
params
.
pageNo
<
this
.
data
.
totalPages
)
{
this
.
setData
({
params
:
{
pageNo
:
this
.
data
.
params
.
pageNo
+
1
,
pageSize
:
10
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
loadDataDone
:
true
})
this
.
initIntegralCouponList
()
}
},
})
\ No newline at end of file
src/pages/IntegralMall/IntegralMall.wxml
View file @
5c916155
<!--pages/userCenter.wxml-->
<view class='page-integral-mall'>
<navigator hover-class='none' url='/pages/memberRules/memberRules'> <view class='integral-vip-rules'>会员规则</view></navigator>
<scroll-view scroll-y bindscrolltolower="bindDownLoad">
<view class='coupon-wrap'>
<view class='coupon-list'>
<navigator hover-class='none' url='/pages/couponDetail/couponDetail'>
...
...
@@ -29,6 +30,8 @@
<view class='coupon-code fs-24'>出示劵码</view>
</view>
</view>
</scroll-view>
<view class='empty-wrap'>
<view class='empty-info'>
<image class='empty-img' src='/assets/imgs/empty-coupon.png'></image>
...
...
src/pages/consumptionDetails/consumptionDetails.js
View file @
5c916155
...
...
@@ -34,13 +34,6 @@ wxService.page({
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
...
...
@@ -48,38 +41,14 @@ wxService.page({
console
.
log
(
'options'
,
options
.
memberid
)
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
initOrderDetail
(){
wxService
.
post
(
`/order/findById?id=
${
id
}
`
).
then
(
res
=>
{
this
.
setData
({
orderDetail
:
res
.
data
.
ddat
.
content
})
}).
finally
(()
=>
{
})
}
})
\ No newline at end of file
src/pages/couponDetail/couponDetail.js
View file @
5c916155
...
...
@@ -12,19 +12,6 @@ wxService.page({
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
},
/**
* 生命周期函数--监听页面显示
...
...
@@ -33,38 +20,15 @@ wxService.page({
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
// 查询单个优惠券
getCouponDetail
(){
wxService
.
post
(
`/coupon/coupon/setting/get/
${
id
}
`
).
then
(
res
=>
{
this
.
setData
({
couponDetail
:
res
.
data
.
data
.
content
})
}).
finally
(()
=>
{
})
}
})
\ No newline at end of file
src/pages/coupons/coupons.js
View file @
5c916155
...
...
@@ -18,8 +18,20 @@ wxService.page({
name
:
'已失效'
}
],
navIndex
:
'1'
navIndex
:
'1'
,
params
:{
pageNo
:
1
,
pageSize
:
10
},
queryData
:{
query
:{
"brandId"
:
0
,
"couponSettingId"
:
0
,
"status"
:
0
,
"title"
:
""
}
},
totalPages
:
''
},
/**
...
...
@@ -34,13 +46,73 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
this
.
queryData
.
setData
({
'query.status'
:
this
.
data
.
navIndex
})
this
.
getCouponList
()
},
//切换tab
switchTab
(
e
){
this
.
setData
({
navIndex
:
e
.
currentTarget
.
dataset
.
index
navIndex
:
e
.
currentTarget
.
dataset
.
index
,
'query.status'
:
e
.
currentTarget
.
dataset
.
index
})
this
.
getCouponList
()
},
//获取优惠券列表
getCouponList
(
type
){
wx
.
showLoading
({
title
:
'加载中'
})
this
.
queryData
.
setData
({
'query.status'
:
this
.
data
.
navIndex
})
wxService
.
post
(
`/coupon/coupon/setting/list?pageNo=
${
this
.
data
.
params
.
pageNo
}
&pageSize=
${
this
.
data
.
params
.
pageSize
}
`
,
this
.
queryData
).
then
(
res
=>
{
let
couponList
=
[];
couponList
=
this
.
data
.
params
.
pageNo
==
1
?
res
.
data
.
data
:
this
.
data
.
couponList
.
concat
(
res
.
data
.
data
);
this
.
setData
({
couponList
,
totalPages
:
res
.
data
.
data
.
totalPages
,
})
wx
.
hideLoading
();
if
(
type
&&
type
.
pullDown
)
wx
.
stopPullDownRefresh
();
}).
finally
(()
=>
{
wx
.
hideLoading
();
this
.
setData
({
couponList
:
''
})
})
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
this
.
setData
({
params
:
{
pageNo
:
1
,
pageSize
:
10
,
},
})
this
.
getCouponList
({
pullDown
:
true
});
},
/**
* 页面上拉触底事件的处理函数
*/
bindDownLoad
:
function
()
{
if
(
this
.
data
.
params
.
pageNo
<
this
.
data
.
totalPages
)
{
this
.
setData
({
params
:
{
pageNo
:
this
.
data
.
params
.
pageNo
+
1
,
pageSize
:
10
},
loadDataDone
:
true
})
this
.
getCouponList
()
}
},
})
\ No newline at end of file
src/pages/coupons/coupons.wxml
View file @
5c916155
...
...
@@ -3,6 +3,7 @@
<view class='tabs-wrap'>
<view wx:for='{{nav}}' wx:key='{{index}}' class="tab-nav fs-25 {{navIndex == item.type ? 'nav-active' : ''}}" data-index='{{item.type}}' bindtap='switchTab'>{{item.name}}(0)</view>
</view>
<scroll-view scroll-y bindscrolltolower="bindDownLoad">
<view class='coupon-wrap'>
<view class='coupon-list'>
<navigator hover-class='none' url='/pages/couponDetail/couponDetail'>
...
...
@@ -41,4 +42,5 @@
<view class='empty-text'>没有任何卡劵</view>
</view>
</view>
</scroll-view>
</view>
src/pages/integralMallDetail/integralMallDetail.js
View file @
5c916155
...
...
@@ -9,14 +9,6 @@ Page({
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
...
...
@@ -28,5 +20,16 @@ Page({
this
.
setData
({
isExchange
:
true
})
},
//获取积分兑换优惠券详情
getIntegralCouponDetail
(){
wxService
.
get
(
`/coupon/pointsRedemptionCouponSetting/get/
${
id
}
`
).
then
(
res
=>
{
this
.
setData
({
integralCouponDetail
:
res
.
data
.
data
.
content
})
}).
finally
(()
=>
{
})
}
})
\ No newline at end of file
src/pages/mySpend/mySpend.js
View file @
5c916155
...
...
@@ -35,7 +35,7 @@ wxService.page({
wx
.
showLoading
({
title
:
'加载中'
})
wxService
.
post
(
'/sale/order/list'
,
this
.
data
.
params
).
then
(
res
=>
{
wxService
.
post
(
`/sale/order/list?pageNo=
${
this
.
data
.
params
.
pageNo
}
&pageSize=
${
this
.
data
.
params
.
pageSize
}
`
,{}
).
then
(
res
=>
{
let
orderList
=
[];
orderList
=
this
.
data
.
params
.
pageNo
==
1
?
res
.
data
.
data
:
this
.
data
.
orderList
.
concat
(
res
.
data
.
data
);
this
.
setData
({
...
...
src/pages/mySpend/mySpend.wxml
View file @
5c916155
<!--pages/userCenter.wxml-->
<view class='page-mySpend'>
<scroll-view scroll-y bindscrolltolower="bindDownLoad">
<
view class='spend-wrap'
>
<
!-- <view class='spend-wrap' wx:for='{{orderList}}' wx:key='{{index}}'> --
>
<navigator url='/pages/consumptionDetails/consumptionDetails' hover-class='none'>
<view class='spend-list'>
<view class='spend-id fs-22'>订单编号:
8327878435
</view>
<view class='spend-time fs-25'>消费时间:</view>
<view class='spend-shop fs-25'>消费门店:
张江高科店
</view>
<view class='spend-id fs-22'>订单编号:
{{item.orderId}}
</view>
<view class='spend-time fs-25'>消费时间:
{{item.createTime}}
</view>
<view class='spend-shop fs-25'>消费门店:
{{item.storeName}}
</view>
<view class="spend-status fs-22 {{true ? 'fail-status' : ''}}">交易成功</view>
</view>
</navigator>
</view>
<view class='spend-wrap'>
<view class='spend-list'>
<view class='spend-id fs-22'>订单编号:8327878435</view>
<view class='spend-time fs-25'>消费时间:</view>
<view class='spend-shop fs-25'>消费门店:张江高科店</view>
<view class='spend-status fs-22'>交易成功</view>
</view>
</view>
<!-- </view> -->
</scroll-view>
</view>
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