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
e0787249
Commit
e0787249
authored
Nov 19, 2019
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
积分换物优化
parent
e1a90987
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
287 additions
and
12 deletions
+287
-12
dialogStockEmpty.js
src/component/dialogStockEmpty/dialogStockEmpty.js
+42
-0
dialogStockEmpty.json
src/component/dialogStockEmpty/dialogStockEmpty.json
+5
-0
dialogStockEmpty.wxml
src/component/dialogStockEmpty/dialogStockEmpty.wxml
+11
-0
dialogStockEmpty.wxss
src/component/dialogStockEmpty/dialogStockEmpty.wxss
+63
-0
dialogUserLimit.js
src/component/dialogUserLimit/dialogUserLimit.js
+31
-0
dialogUserLimit.json
src/component/dialogUserLimit/dialogUserLimit.json
+5
-0
dialogUserLimit.wxml
src/component/dialogUserLimit/dialogUserLimit.wxml
+10
-0
dialogUserLimit.wxss
src/component/dialogUserLimit/dialogUserLimit.wxss
+46
-0
IntegralMallGoods.js
...Package/page/pages/IntegralMallGoods/IntegralMallGoods.js
+10
-2
IntegralMallGoods.json
...ckage/page/pages/IntegralMallGoods/IntegralMallGoods.json
+3
-0
IntegralMallGoods.wxml
...ckage/page/pages/IntegralMallGoods/IntegralMallGoods.wxml
+6
-0
IntegrateGoodsExchangeInfo.js
.../IntegrateGoodsExchangeInfo/IntegrateGoodsExchangeInfo.js
+7
-2
IntegrateGoodsExchangeInfo.json
...ntegrateGoodsExchangeInfo/IntegrateGoodsExchangeInfo.json
+3
-1
IntegrateGoodsExchangeInfo.wxml
...ntegrateGoodsExchangeInfo/IntegrateGoodsExchangeInfo.wxml
+1
-1
exchangeAddress.js
src/subPackage/page/pages/exchangeAddress/exchangeAddress.js
+36
-3
exchangeAddress.json
...ubPackage/page/pages/exchangeAddress/exchangeAddress.json
+4
-1
exchangeAddress.wxml
...ubPackage/page/pages/exchangeAddress/exchangeAddress.wxml
+4
-2
No files found.
src/component/dialogStockEmpty/dialogStockEmpty.js
0 → 100644
View file @
e0787249
// component/dialogStockEmpty/dialogStockEmpty.js
const
wxService
=
require
(
'../../utils/wxService'
)
Component
({
/**
* 组件的属性列表
*/
properties
:
{
show
:
{
type
:
Boolean
,
default
:
''
}
},
/**
* 组件的初始数据
*/
data
:
{
},
/**
* 组件的方法列表
*/
methods
:
{
//关闭
onTapClose
(){
this
.
setData
({
show
:
false
})
},
//查看更多活动
onTapViewMore
(){
this
.
setData
({
show
:
false
});
wxService
.
nextTick
(()
=>
{
this
.
triggerEvent
(
'btnClick'
)
})
}
}
})
src/component/dialogStockEmpty/dialogStockEmpty.json
0 → 100644
View file @
e0787249
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
src/component/dialogStockEmpty/dialogStockEmpty.wxml
0 → 100644
View file @
e0787249
<!--component/dialogStockEmpty/dialogStockEmpty.wxml-->
<view class='dialog-stock' wx:if="{{show}}">
<view class='body'>
<image bindtap='onTapClose'
class='close'
src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_tips_close.png' mode='aspectFit'></image>
<view class='empty'>已抢光</view>
<view>很遗憾,你来晚了~</view>
<view class='view-btn' bindtap='onTapViewMore'>查看其它活动</view>
</view>
</view>
src/component/dialogStockEmpty/dialogStockEmpty.wxss
0 → 100644
View file @
e0787249
/* component/dialogStockEmpty/dialogStockEmpty.wxss */
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.dialog-stock{
position: fixed;
z-index: 10;
left: 0;
top: 0;
background: rgba(0, 0, 0, 0.5);
width: 100%;
height: 100%;
}
.dialog-stock .body{
width: 76vw;
height: 340rpx;
background: #ffffff;
position: relative;
top: 15vw;
left: 12vw;
border-radius: 10rpx;
padding: 30rpx;
display: flex;
flex-direction:column;
align-items: center;
justify-content: center;
color: #999999;
font-size: 28rpx;
}
.dialog-stock .body .empty{
font-size: 44rpx;
color: #ff3333;
font-weight: bold;
margin-bottom: 20rpx;
}
.dialog-stock .body .view-btn{
width: 260rpx;
height: 70rpx;
background: #ff3333;
color: #ffffff;
margin-top: 40rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8rpx;
}
.dialog-stock .body .view-btn:active{
opacity: 0.7;
}
.dialog-stock .body .close{
width: 36rpx;
height: 36rpx;
position: absolute;
right: 20rpx;
top: 20rpx;
}
src/component/dialogUserLimit/dialogUserLimit.js
0 → 100644
View file @
e0787249
// component/dialogStockEmpty/dialogStockEmpty.js
Component
({
/**
* 组件的属性列表
*/
properties
:
{
show
:
{
type
:
Boolean
,
default
:
''
}
},
/**
* 组件的初始数据
*/
data
:
{
},
/**
* 组件的方法列表
*/
methods
:
{
//关闭
onTapClose
()
{
this
.
setData
({
show
:
false
})
}
}
})
src/component/dialogUserLimit/dialogUserLimit.json
0 → 100644
View file @
e0787249
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
src/component/dialogUserLimit/dialogUserLimit.wxml
0 → 100644
View file @
e0787249
<!--component/dialogStockEmpty/dialogStockEmpty.wxml-->
<view class='dialog-stock' wx:if="{{show}}">
<view class='body'>
<image bindtap='onTapClose'
class='close'
src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_tips_close.png' mode='aspectFit'></image>
<image class='tips-icon' src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/tips_icon.png' mode='aspectFit'></image>
<view>您已达到上限了哦</view>
</view>
</view>
src/component/dialogUserLimit/dialogUserLimit.wxss
0 → 100644
View file @
e0787249
/* component/dialogStockEmpty/dialogStockEmpty.wxss */
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.dialog-stock{
position: fixed;
z-index: 10;
left: 0;
top: 0;
background: rgba(0, 0, 0, 0.5);
width: 100%;
height: 100%;
}
.dialog-stock .body{
width: 76vw;
height: 340rpx;
background: #ffffff;
position: relative;
top: 15vw;
left: 12vw;
border-radius: 10rpx;
padding: 30rpx;
display: flex;
flex-direction:column;
align-items: center;
justify-content: center;
color: #999999;
font-size: 28rpx;
}
.dialog-stock .body .tips-icon{
width: 120rpx;
height: 120rpx;
margin-bottom: 20rpx;
}
.dialog-stock .body .close{
width: 36rpx;
height: 36rpx;
position: absolute;
right: 20rpx;
top: 20rpx;
}
\ No newline at end of file
src/subPackage/page/pages/IntegralMallGoods/IntegralMallGoods.js
View file @
e0787249
...
@@ -18,7 +18,9 @@ wxService.page({
...
@@ -18,7 +18,9 @@ wxService.page({
total
:
'--'
,
total
:
'--'
,
expirePoint
:
0
,
expirePoint
:
0
,
expireDate
:
''
expireDate
:
''
}
},
dialogStockEmpty
:
false
,
dialogUserLimit
:
false
,
},
},
/**
/**
...
@@ -133,9 +135,15 @@ wxService.page({
...
@@ -133,9 +135,15 @@ wxService.page({
wx
.
showLoading
({
wx
.
showLoading
({
title
:
'检查兑换资格中..'
,
title
:
'检查兑换资格中..'
,
});
});
wxService
.
post
(
`/member/pointsRedemptionProductRecord/checkByMemberIdAndSettingId?memberId=
${
memberId
}
&settingId=
${
id
}
`
).
wxService
.
post
(
`/member/pointsRedemptionProductRecord/checkByMemberIdAndSettingId?memberId=
${
memberId
}
&settingId=
${
id
}
`
).
then
(
res
=>
{
then
(
res
=>
{
if
(
res
)
{
if
(
res
.
data
.
data
==
-
1
){
this
.
setData
({
dialogUserLimit
:
true
})
}
else
{
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
'/subPackage/page/pages/exchangeAddress/exchangeAddress?id='
+
id
,
url
:
'/subPackage/page/pages/exchangeAddress/exchangeAddress?id='
+
id
,
});
});
...
...
src/subPackage/page/pages/IntegralMallGoods/IntegralMallGoods.json
View file @
e0787249
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
"usingComponents"
:
{
"usingComponents"
:
{
"no-more"
:
"/component/noMore/noMore"
,
"no-more"
:
"/component/noMore/noMore"
,
"exchange-coupon-modal"
:
"/component/exchange-coupon-modal/exchange-coupon-modal"
,
"exchange-coupon-modal"
:
"/component/exchange-coupon-modal/exchange-coupon-modal"
,
"dialog-stock-empty"
:
"/component/dialogStockEmpty/dialogStockEmpty"
,
"dialog-user-limit"
:
"/component/dialogUserLimit/dialogUserLimit"
,
"go-home"
:
"/component/goHome/goHome"
"go-home"
:
"/component/goHome/goHome"
}
}
}
}
\ No newline at end of file
src/subPackage/page/pages/IntegralMallGoods/IntegralMallGoods.wxml
View file @
e0787249
...
@@ -117,4 +117,10 @@
...
@@ -117,4 +117,10 @@
<!--goHome-->
<!--goHome-->
<go-home/>
<go-home/>
</view>
</view>
<!-- 库存没了 -->
<dialog-stock-empty show="{{dialogStockEmpty}}"/>
<dialog-user-limit show="{{dialogUserLimit}}"/>
src/subPackage/page/pages/IntegrateGoodsExchangeInfo/IntegrateGoodsExchangeInfo.js
View file @
e0787249
...
@@ -11,6 +11,7 @@ wxService.page({
...
@@ -11,6 +11,7 @@ wxService.page({
*/
*/
data
:
{
data
:
{
isExchange
:
false
,
isExchange
:
false
,
dialogUserLimit
:
false
,
integralMallDetail
:
{}
integralMallDetail
:
{}
},
},
...
@@ -33,8 +34,12 @@ wxService.page({
...
@@ -33,8 +34,12 @@ wxService.page({
});
});
wxService
.
post
(
`/member/pointsRedemptionProductRecord/checkByMemberIdAndSettingId?memberId=
${
memberId
}
&settingId=
${
id
}
`
).
wxService
.
post
(
`/member/pointsRedemptionProductRecord/checkByMemberIdAndSettingId?memberId=
${
memberId
}
&settingId=
${
id
}
`
).
then
(
res
=>
{
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
data
.
data
==
-
1
)
{
if
(
res
){
this
.
setData
({
dialogUserLimit
:
true
})
}
else
{
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
'/subPackage/page/pages/exchangeAddress/exchangeAddress?id='
+
id
,
url
:
'/subPackage/page/pages/exchangeAddress/exchangeAddress?id='
+
id
,
});
});
...
...
src/subPackage/page/pages/IntegrateGoodsExchangeInfo/IntegrateGoodsExchangeInfo.json
View file @
e0787249
{
{
"navigationBarTitleText"
:
"积分换物详情"
,
"navigationBarTitleText"
:
"积分换物详情"
,
"usingComponents"
:
{
"usingComponents"
:
{
"go-home"
:
"/component/goHome/goHome"
"go-home"
:
"/component/goHome/goHome"
,
"dialog-user-limit"
:
"/component/dialogUserLimit/dialogUserLimit"
}
}
}
}
\ No newline at end of file
src/subPackage/page/pages/IntegrateGoodsExchangeInfo/IntegrateGoodsExchangeInfo.wxml
View file @
e0787249
...
@@ -26,4 +26,4 @@
...
@@ -26,4 +26,4 @@
</view>
</view>
<!--goHome-->
<!--goHome-->
<go-home/>
<go-home/>
<dialog-user-limit show="{{dialogUserLimit}}"/>
src/subPackage/page/pages/exchangeAddress/exchangeAddress.js
View file @
e0787249
...
@@ -10,6 +10,7 @@ wxService.page({
...
@@ -10,6 +10,7 @@ wxService.page({
data
:
{
data
:
{
region
:
[],
region
:
[],
point
:
0
,
point
:
0
,
dialogStockEmpty
:
false
,
form
:
{
form
:
{
activateId
:
''
,
activateId
:
''
,
name
:
''
,
name
:
''
,
...
@@ -123,17 +124,49 @@ wxService.page({
...
@@ -123,17 +124,49 @@ wxService.page({
wxService
.
post
(
`/member/pointsRedemptionProductSetting/exchange`
,
this
.
data
.
form
).
then
(
res
=>
{
wxService
.
post
(
`/member/pointsRedemptionProductSetting/exchange`
,
this
.
data
.
form
).
then
(
res
=>
{
wx
.
hideLoading
();
wx
.
hideLoading
();
if
(
res
.
data
.
result
==
0
){
if
(
res
.
data
.
data
==
0
){
wx
.
showToast
({
wx
.
showToast
({
title
:
'兑换成功'
,
title
:
'兑换成功'
,
});
});
setTimeout
(()
=>
{
setTimeout
(()
=>
{
wx
.
navigateBack
({
wx
.
navigateBack
({
delta
:
1
delta
:
1
});
});
},
300
);
},
300
);
}
else
if
(
res
.
data
.
data
==
1
){
// 库存不足
this
.
setData
({
dialogStockEmpty
:
true
,
});
}
else
if
(
res
.
data
.
data
==
2
){
wx
.
showToast
({
title
:
'对不起,您积分不足'
,
icon
:
'none'
});
}
}
else
{
wx
.
showToast
({
title
:
'您已经达到上限了哦'
,
icon
:
'none'
});
}
});
},
//btn回调
onDialogBtnCallBack
(
e
){
let
pages
=
getCurrentPages
();
let
index
=
pages
.
length
-
1
;
for
(
let
i
=
0
;
i
<
pages
.
length
;
i
++
){
if
(
pages
[
i
].
route
.
indexOf
(
'IntegralMallGoods/IntegralMallGoods'
)
>
-
1
){
index
=
index
-
i
;
break
;
}
}
wx
.
navigateBack
({
delta
:
index
});
});
},
},
...
...
src/subPackage/page/pages/exchangeAddress/exchangeAddress.json
View file @
e0787249
{
{
"navigationBarTitleText"
:
"填写收货地址"
,
"navigationBarTitleText"
:
"填写收货地址"
,
"usingComponents"
:
{}
"usingComponents"
:
{
"dialog-stock-empty"
:
"/component/dialogStockEmpty/dialogStockEmpty"
}
}
}
\ No newline at end of file
src/subPackage/page/pages/exchangeAddress/exchangeAddress.wxml
View file @
e0787249
...
@@ -27,4 +27,6 @@
...
@@ -27,4 +27,6 @@
<view class='sumbit' bindtap='onTapSubmit'>确认</view>
<view class='sumbit' bindtap='onTapSubmit'>确认</view>
</view>
</view>
\ No newline at end of file
<dialog-stock-empty show="{{dialogStockEmpty}}" bind:btnClick="onDialogBtnCallBack"/>
\ No newline at end of file
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