Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
严立
/
mini-shimao
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9d452e3a
authored
Sep 19, 2020
by
zqm
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
MM - 积分模块
parent
c40da588
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
177 additions
and
37 deletions
pages/mine/accumulate/accumulate.js
pages/mine/accumulate/accumulate.wxml
pages/mine/accumulate/accumulate.wxss
pages/mine/home/home.js
pages/mine/home/home.wxml
pages/mine/home/home.wxss
pages/mine/order/order.wxss
pages/pay/order-detail/order-detail.wxss
pages/mine/accumulate/accumulate.js
View file @
9d452e3a
...
@@ -2,32 +2,58 @@ let App = getApp()
...
@@ -2,32 +2,58 @@ let App = getApp()
Page
({
Page
({
data
:
{
data
:
{
imageResourcesBase
:
App
.
globalData
.
appResourcesBase
,
showMenu
:
false
,
showMenu
:
false
,
menu
:
'全 部'
,
menu
:
'全 部'
,
menuList
:
[
menuList
:
[{
{
id
:
0
,
name
:
'全 部'
},
id
:
''
,
{
id
:
1
,
name
:
'获 取'
},
name
:
'全 部'
{
id
:
2
,
name
:
'已使用'
}
},
{
id
:
0
,
name
:
'获 取'
},
{
id
:
1
,
name
:
'已使用'
}
],
],
pageNo
:
'1'
,
pageNo
:
'1'
,
pageSize
:
'-1'
,
pageSize
:
'-1'
,
type
:
''
,
// "" 全部 0 获取 1消费(0 发放 1 兑换)
type
:
''
,
// "" 全部 0 获取 1消费(0 发放 1 兑换)
accumulateList
:
[],
accumulateList
:
[],
selectedList
:
[]
selectedList
:
[],
integral
:
'0'
,
type
:
''
},
},
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
getAccumulate
()
let
integral
=
options
.
integral
this
.
setData
({
integral
:
integral
})
App
.
login
({
timeout
:
0
,
success
:
(
result
)
=>
{
this
.
getAccumulate
()
},
})
},
},
// 获取积分列表
// 获取积分列表
getAccumulate
:
function
()
{
getAccumulate
:
function
()
{
wx
.
showLoading
({
title
:
'加载中'
,
})
App
.
wxRequest
({
App
.
wxRequest
({
url
:
'/api/v1/smUser/getIntegralDetails'
,
url
:
'/api/v1/smUser/getIntegralDetails'
,
data
:
{
data
:
{
'pageNo'
:
this
.
data
.
pageNo
,
'pageNo'
:
this
.
data
.
pageNo
,
'pageSize'
:
this
.
data
.
pageSize
,
'pageSize'
:
this
.
data
.
pageSize
,
type
:
''
type
:
this
.
data
.
type
},
},
success
:
(
response
)
=>
{
success
:
(
response
)
=>
{
wx
.
hideLoading
({
success
:
(
res
)
=>
{},
})
let
accumulateList
=
response
.
data
let
accumulateList
=
response
.
data
let
selectedList
=
accumulateList
let
selectedList
=
accumulateList
this
.
setData
({
this
.
setData
({
...
@@ -57,18 +83,23 @@ Page({
...
@@ -57,18 +83,23 @@ Page({
* @returns
* @returns
*/
*/
onTabMenu
:
function
(
event
)
{
onTabMenu
:
function
(
event
)
{
let
{
index
}
=
event
.
currentTarget
.
dataset
let
{
index
,
type
}
=
event
.
currentTarget
.
dataset
let
menu
=
this
.
data
.
menuList
[
index
].
name
let
menu
=
this
.
data
.
menuList
[
index
].
name
let
selectedList
=
[]
let
selectedList
=
[]
if
(
index
===
0
)
{
if
(
index
===
0
)
{
selectedList
=
this
.
data
.
accumulateList
selectedList
=
this
.
data
.
accumulateList
}
else
{
}
else
{
selectedList
=
selectedList
.
filter
(
v
=>
v
.
type
===
index
-
1
)
selectedList
=
selectedList
.
filter
(
v
=>
v
.
type
===
index
-
1
)
}
}
this
.
setData
({
this
.
setData
({
menu
,
menu
,
selectedList
selectedList
,
type
:
type
})
})
this
.
onHideMenu
()
this
.
onHideMenu
()
this
.
getAccumulate
()
}
}
})
})
\ No newline at end of file
pages/mine/accumulate/accumulate.wxml
View file @
9d452e3a
...
@@ -2,22 +2,24 @@
...
@@ -2,22 +2,24 @@
<view class="container con-s" bindtap="onHideMenu">
<view class="container con-s" bindtap="onHideMenu">
<!-- 积分背景图 -->
<!-- 积分背景图 -->
<image class="banner" src=""></image>
<image class="banner" src="{{imageResourcesBase + 'mine/home/integral-bg.png'}}"></image>
<view class="opacity-cover"></view>
<view class="my-accumulate">
<view class="my-accumulate">
<text>
1888
</text>
<text>
{{integral}}
</text>
</view>
</view>
<view class="accumulate-tips">
<view class="accumulate-tips">
<text>积分用于兑换积分商品,积分商城即将上线,敬请期待</text>
<text>积分用于兑换积分商品,积分商城即将上线,敬请期待</text>
</view>
</view>
<view class="banner-menu row con-b align-c" catchtap="onShowMenu">
<view class="banner-menu row con-b align-c" catchtap="onShowMenu">
<text>{{menu}}</text>
<text>{{menu}}</text>
<image src="/image/icon/arrow-b-2.png"></image>
<image src="/image/icon/arrow-b-2.png"></image>
<view class="banner-menu-down col" wx:if="{{showMenu}}">
<view class="banner-menu-down col" wx:if="{{showMenu}}">
<block wx:for="{{menuList}}" wx:key="id">
<block wx:for="{{menuList}}" wx:key="id">
<text class="{{menu === item.name ? 'selected' : ''}}" catchtap="onTabMenu" data-index="{{index}}">{{item.name}}</text>
<text class="{{menu === item.name ? 'selected' : ''}}" data-type="{{item.id}}" catchtap="onTabMenu"
data-index="{{index}}">{{item.name}}</text>
</block>
</block>
</view>
</view>
</view>
</view>
...
...
pages/mine/accumulate/accumulate.wxss
View file @
9d452e3a
...
@@ -9,6 +9,15 @@ page {
...
@@ -9,6 +9,15 @@ page {
.banner {
.banner {
position: fixed;
position: fixed;
z-index: -2;
top: 0;
left: 0;
width: 750rpx;
height: 480rpx;
}
.opacity-cover {
position: fixed;
z-index: -1;
z-index: -1;
top: 0;
top: 0;
left: 0;
left: 0;
...
@@ -54,11 +63,11 @@ page {
...
@@ -54,11 +63,11 @@ page {
width: 166rpx;
width: 166rpx;
height: 180rpx;
height: 180rpx;
background: rgba(255, 255, 255, 0.95);
background: rgba(255, 255, 255, 0.95);
box-shadow: 10px 4px 40px 0px rgba(181,
164,164,
0.3);
box-shadow: 10px 4px 40px 0px rgba(181,
164, 164,
0.3);
border-radius: 4rpx;
border-radius: 4rpx;
}
}
.banner-menu-down text{
.banner-menu-down text
{
flex: 1;
flex: 1;
padding-left: 24rpx;
padding-left: 24rpx;
color: #959CA8;
color: #959CA8;
...
@@ -123,9 +132,11 @@ page {
...
@@ -123,9 +132,11 @@ page {
font-size: 30rpx;
font-size: 30rpx;
color: #E66060;
color: #E66060;
}
}
.accumulate-right text {
.accumulate-right text {
margin-left: 6rpx;
margin-left: 6rpx;
}
}
.accumulate-type-color {
.accumulate-type-color {
color: #959DA9;
color: #959DA9;
}
}
\ No newline at end of file
pages/mine/home/home.js
View file @
9d452e3a
...
@@ -8,6 +8,7 @@ Page({
...
@@ -8,6 +8,7 @@ Page({
data
:
{
data
:
{
isCheckPermission
:
false
,
isCheckPermission
:
false
,
imageBase
:
App
.
globalData
.
appImageBase
,
imageBase
:
App
.
globalData
.
appImageBase
,
imageResourcesBase
:
App
.
globalData
.
appResourcesBase
,
orderType
:
1
,
// 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
orderType
:
1
,
// 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
...
@@ -79,7 +80,8 @@ Page({
...
@@ -79,7 +80,8 @@ Page({
title
:
'日落观光游船体验活动之船行碧波共赏美景'
,
title
:
'日落观光游船体验活动之船行碧波共赏美景'
,
num
:
3
num
:
3
}],
}],
orderListBackup
:
[]
orderListBackup
:
[],
integral
:
0
,
//积分
},
},
close
()
{
close
()
{
...
@@ -90,14 +92,7 @@ Page({
...
@@ -90,14 +92,7 @@ Page({
animation
:
true
,
animation
:
true
,
})
})
},
},
maskShow
()
{
this
.
setData
({
mask
:
true
});
wx
.
hideTabBar
({
animation
:
true
,
})
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
...
@@ -108,6 +103,13 @@ Page({
...
@@ -108,6 +103,13 @@ Page({
onShow
:
function
()
{
onShow
:
function
()
{
this
.
setUserInfo
()
this
.
setUserInfo
()
},
},
// 查看积分明细
goIntegralDetail
(
event
)
{
let
integral
=
event
.
currentTarget
.
dataset
.
integral
wx
.
navigateTo
({
url
:
'/pages/mine/accumulate/accumulate?integral='
+
integral
,
})
},
// 去核销
// 去核销
goCouponInput
(
event
)
{
goCouponInput
(
event
)
{
wx
.
navigateTo
({
wx
.
navigateTo
({
...
@@ -115,7 +117,7 @@ Page({
...
@@ -115,7 +117,7 @@ Page({
})
})
},
},
// 获取核销权限
// 获取核销权限
// api/v1/login/getPermissions权限更上去了
getPermissions
()
{
getPermissions
()
{
let
that
=
this
let
that
=
this
App
.
wxRequest
({
App
.
wxRequest
({
...
@@ -143,6 +145,23 @@ Page({
...
@@ -143,6 +145,23 @@ Page({
}
}
})
})
},
},
// 获取积分
getIntegral
()
{
let
that
=
this
App
.
wxRequest
({
url
:
'/api/v1/smUser/getIntegral'
,
//api/v1/smUser/getIntegral
data
:
{},
success
:
function
(
res
)
{
let
integral
=
res
.
data
?
res
.
data
.
integral
:
'0'
that
.
setData
({
integral
:
integral
})
}
})
},
//获取待使用订单
//获取待使用订单
getWillUseOrders
()
{
getWillUseOrders
()
{
let
that
=
this
let
that
=
this
...
@@ -227,10 +246,16 @@ Page({
...
@@ -227,10 +246,16 @@ Page({
isRegister
:
true
,
isRegister
:
true
,
userInfo
:
funcUserInfo
userInfo
:
funcUserInfo
})
})
this
.
getMyActivityList
()
App
.
login
({
this
.
getCardList
()
timeout
:
0
,
this
.
getWillUseOrders
()
success
:
(
result
)
=>
{
this
.
getPermissions
()
this
.
getMyActivityList
()
this
.
getCardList
()
this
.
getWillUseOrders
()
this
.
getPermissions
()
this
.
getIntegral
()
},
})
}
else
{
}
else
{
this
.
setData
({
this
.
setData
({
isRegister
:
false
,
isRegister
:
false
,
...
...
pages/mine/home/home.wxml
View file @
9d452e3a
This diff is collapsed.
Click to expand it.
pages/mine/home/home.wxss
View file @
9d452e3a
...
@@ -23,6 +23,26 @@
...
@@ -23,6 +23,26 @@
padding: 220rpx 0 0 48rpx;
padding: 220rpx 0 0 48rpx;
}
}
.user-type {
width: 126rpx;
height: 40rpx;
font-weight: 500;
font-size: 22rpx;
color: #fff;
background-color: #6783AE;
text-align: center;
line-height: 40rpx;
border-radius: 4rpx;
letter-spacing: 10rpx;
margin-top: 20rpx;
}
.owner-tag {
height: 80rpx;
width: 142rpx;
/* margin-top: 8rpx!important; */
}
.mine-avatar {
.mine-avatar {
z-index: 11;
z-index: 11;
margin-right: 32rpx;
margin-right: 32rpx;
...
@@ -40,6 +60,43 @@
...
@@ -40,6 +60,43 @@
font-size: 42rpx;
font-size: 42rpx;
font-weight: bolder;
font-weight: bolder;
}
}
.padding-l-18{
padding-left: 18rpx;
}
/* 积分 */
.integral {
color: #0D0D0E;
text-align: right;
}
.glod {
color: #F0DABB;
}
.integral-num {
font-size: 54rpx;
line-height: 76rpx;
padding-right: 80rpx;
}
.integral-title {
display: flex;
height: 80rpx;
align-items: center;
font-size: 26rpx;
line-height: 36rpx;
flex-direction: row;
justify-content: flex-end;
padding-right: 40rpx;
}
.arrow-r {
width: 32rpx;
height: 32rpx;
margin-left: 8rpx;
}
.mine-info view:nth-child(1) image {
.mine-info view:nth-child(1) image {
z-index: 11;
z-index: 11;
...
@@ -64,7 +121,7 @@
...
@@ -64,7 +121,7 @@
padding: 41rpx 32rpx;
padding: 41rpx 32rpx;
background-color: #fff;
background-color: #fff;
border-radius: 4rpx;
border-radius: 4rpx;
margin-top:48rpx;
margin-top:
48rpx;
}
}
.cpopon-info {
.cpopon-info {
...
@@ -557,8 +614,6 @@
...
@@ -557,8 +614,6 @@
border-radius: 4rpx;
border-radius: 4rpx;
}
}
.appointment-activity-content {}
.appointment-activity-img {
.appointment-activity-img {
width: 140rpx;
width: 140rpx;
height: 136rpx;
height: 136rpx;
...
@@ -642,4 +697,17 @@
...
@@ -642,4 +697,17 @@
image {
image {
width: 100%;
width: 100%;
height: 100%;
height: 100%;
}
.logo-box {
width: 100rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
margin-right: 20rpx;
}
.logo-box image {
max-width: 100%!important;
max-height: 100%!important;
}
}
\ No newline at end of file
pages/mine/order/order.wxss
View file @
9d452e3a
...
@@ -344,10 +344,10 @@ page {
...
@@ -344,10 +344,10 @@ page {
height: 80rpx;
height: 80rpx;
line-height: 80rpx;
line-height: 80rpx;
text-align: center;
text-align: center;
margin-right: 20rpx;
}
}
.logo-box image {
.logo-box image {
max-width: 100%!important;
max-width: 100%!important;
max-height: 100%!important;
max-height: 100%!important;
}
}
\ No newline at end of file
pages/pay/order-detail/order-detail.wxss
View file @
9d452e3a
...
@@ -828,6 +828,7 @@ image {
...
@@ -828,6 +828,7 @@ image {
height: 80rpx;
height: 80rpx;
line-height: 80rpx;
line-height: 80rpx;
text-align: center;
text-align: center;
margin-right: 20rpx;
}
}
.logo-box image {
.logo-box image {
...
...
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