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
67e70295
Commit
67e70295
authored
Dec 26, 2019
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
积分换物库存校验,增加其他商户配置备注
parent
065dc74b
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
258 additions
and
54 deletions
+258
-54
index.js
src/config/index.js
+25
-7
confirmOrder.wxss
src/pages/confirmOrder/confirmOrder.wxss
+1
-1
coupons.js
src/pages/coupons/coupons.js
+5
-1
coupons.json
src/pages/coupons/coupons.json
+1
-1
coupons.wxss
src/pages/coupons/coupons.wxss
+7
-2
extendProduct.js
src/pages/extendProduct/extendProduct.js
+8
-8
extendProduct.wxml
src/pages/extendProduct/extendProduct.wxml
+2
-1
integralWater.js
src/pages/integralWater/integralWater.js
+12
-1
order.wxml
src/pages/order/order.wxml
+1
-1
orderDetail.js
src/pages/orderDetail/orderDetail.js
+11
-0
orderDetail.wxml
src/pages/orderDetail/orderDetail.wxml
+15
-5
orderDetail.wxss
src/pages/orderDetail/orderDetail.wxss
+28
-0
refund.js
src/pages/refund/refund.js
+3
-1
project.config.json
src/project.config.json
+1
-1
couponWriteOff.js
src/shoppingGuid/page/pages/couponWriteOff/couponWriteOff.js
+5
-3
home.js
src/shoppingGuid/page/pages/home/home.js
+2
-2
IntegralMallGoods.js
...Package/page/pages/IntegralMallGoods/IntegralMallGoods.js
+56
-4
IntegralMallGoods.wxml
...ckage/page/pages/IntegralMallGoods/IntegralMallGoods.wxml
+1
-0
IntegralMallGoods.wxss
...ckage/page/pages/IntegralMallGoods/IntegralMallGoods.wxss
+6
-0
IntegrateGoodsExchangeInfo.js
.../IntegrateGoodsExchangeInfo/IntegrateGoodsExchangeInfo.js
+47
-1
IntegrateGoodsExchangeInfo.json
...ntegrateGoodsExchangeInfo/IntegrateGoodsExchangeInfo.json
+2
-0
IntegrateGoodsExchangeInfo.wxml
...ntegrateGoodsExchangeInfo/IntegrateGoodsExchangeInfo.wxml
+2
-1
exchangeAddress.js
src/subPackage/page/pages/exchangeAddress/exchangeAddress.js
+1
-0
wxService.js
src/utils/wxService.js
+16
-13
No files found.
src/config/index.js
View file @
67e70295
...
...
@@ -5,7 +5,7 @@
// 组件plus 中数据请求 token 修改
// app.js 中brandId 修改为对应
const
PROJECT_ENV
=
'
prod
'
// 生产 prod, 开发 dev, 测试 test, 预生产 pre
const
PROJECT_ENV
=
'
test
'
// 生产 prod, 开发 dev, 测试 test, 预生产 pre
const
needMock
=
''
//
// 舞象联系我 :766c50920993bf9c41c6c3d2761a2df5
//泰华 联系我 :6e4314d558e55fbc64fe2e757e24d61f
...
...
@@ -60,11 +60,28 @@ const needMock = '' //
/**
* 多多一上 生产环境配置
* appId = wxf7bc302c51166dc0 //小程序 appId
* tunnel-token = //token 杨辰提供
* tunnel-token =
1ea3f0c0dd0c91ee54e546a99beafbfb
//token 杨辰提供
* brandId= 2007 //商户Id
* contactUspluginId = 64bf88d82b3f0d506bd00ed90d5706f1 联系我插件id
*/
/**
* 雪岛书屋 生产环境配置
* appId = wx207f8a95bbc9d3ab //小程序 appId
* tunnel-token = d93a5def7511da3d0f2d171d9c344e91 //token 杨辰提供
* brandId= 2008 //商户Id
* contactUspluginId = 联系我插件id
*
*/
/**
* 苏州邻里 生产环境配置
* appId = wxe7770946f9d93d38 //小程序 appId
* tunnel-token = fde4fde168dd5aabe962643843c19290 //token 杨辰提供
* brandId= 2003 //商户Id
* contactUspluginId = 联系我插件id
*
*/
// appid_dev_wx wxc3b64b09b1d3dfc2
...
...
@@ -104,7 +121,7 @@ const appId = {
dev
:
'wxc3b64b09b1d3dfc2'
,
//appid_dev_wx
test
:
'wxac09792264c49b5c'
,
//appid_test_wx 1002商城
pre
:
'wxac09792264c49b5c'
,
//appid_test_wx 1002商城
prod
:
'wx
313ec36b710125d4
'
,
//appid_prod_
prod
:
'wx
207f8a95bbc9d3ab
'
,
//appid_prod_
}
const
imgConfig
=
{
...
...
@@ -118,7 +135,7 @@ const token = {
dev
:
'brand1001'
,
//开发
test
:
'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD'
,
//测试
pre
:
'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD'
,
//预生产
prod
:
'
d6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8
'
,
// 生产
prod
:
'
fde4fde168dd5aabe962643843c19290
'
,
// 生产
}
const
envInfo
=
(()
=>
{
...
...
@@ -128,10 +145,11 @@ const envInfo = (() => {
imgCtx
:
imgConfig
[
PROJECT_ENV
],
tunnelToken
:
token
[
PROJECT_ENV
],
appId
:
appId
[
PROJECT_ENV
],
brandId
:
3001
,
// 1001 1002 3001 3002 //2711 711生产brandId,
plusIsOpen
:
tru
e
,
//是否开启plus
brandId
:
1002
,
// 1001 1002 3001 3002 //2711 711生产brandId,
plusIsOpen
:
fals
e
,
//是否开启plus
contactUsPluginId
:
'766c50920993bf9c41c6c3d2761a2df5'
,
contactUsIsOpen
:
true
,
//是否开启联系我
contactUsIsOpen
:
false
,
//是否开启联系我
hasTrial
:
false
,
//是否开启体验者功能
}
})()
...
...
src/pages/confirmOrder/confirmOrder.wxss
View file @
67e70295
...
...
@@ -192,7 +192,7 @@
.arrow-right-wrap{
position: absolute;
right: 0;
top:
2
0rpx;
top: 0rpx;
}
.pro-footer{
position: fixed;
...
...
src/pages/coupons/coupons.js
View file @
67e70295
...
...
@@ -62,6 +62,7 @@ wxService.page({
// invalidCouponList: [],
})
}
// 可使用
if
(
current
==
0
){
this
.
getCouponList
(
1
,
10
,
1
)
...
...
@@ -155,7 +156,10 @@ wxService.page({
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{},
onPullDownRefresh
:
function
()
{
// console.log(this.data.currentTab)
// wx.stopPullDownRefresh();
},
/**
* 页面上拉触底事件的处理函数
*/
...
...
src/pages/coupons/coupons.json
View file @
67e70295
{
"enablePullDownRefresh"
:
tru
e
,
"enablePullDownRefresh"
:
fals
e
,
"navigationBarTitleText"
:
"我的卡券"
,
"usingComponents"
:
{
"no-more"
:
"/component/noMore/noMore"
,
...
...
src/pages/coupons/coupons.wxss
View file @
67e70295
/* pages/userCenter.wxss */
@import './../../base/base.wxss';
page{
background: #f2f2f2;
}
scroll-view{
height: 100%;
}
...
...
@@ -40,12 +43,13 @@ scroll-view{
/* 卡劵列表 */
.coupon-wrap{
padding: 20rpx;
padding-top: 0;
}
.coupon-list{
width: 712rpx;
height: 209rpx;
position: relative;
margin-bottom:
20
rpx;
margin-bottom:
14
rpx;
}
.coupon-bg{
width: 712rpx;
...
...
@@ -61,6 +65,7 @@ scroll-view{
position: absolute;
top: 18rpx;
left: 16rpx;
border-radius: 5rpx;
}
.coupon-info{
position: absolute;
...
...
@@ -127,7 +132,7 @@ scroll-view{
swiper {
width: 100%;
flex: 1;
height:
10
0vh;
height:
9
0vh;
padding-bottom:20rpx;
position: absolute;
overflow: scroll;
...
...
src/pages/extendProduct/extendProduct.js
View file @
67e70295
...
...
@@ -5,6 +5,7 @@ const utils = require('../../utils/util')
const
envInfo
=
require
(
'../../config/index'
).
envInfo
import
{
Integer
}
from
'../../utils/integerDigitalConvertion'
const
{
memberId
,
member
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
defaultProImg
=
'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/product_defalut.jpg'
;
wxService
.
page
({
...
...
@@ -98,7 +99,7 @@ wxService.page({
proData
.
push
(
extendProList
[
i
])
}
}
console
.
log
(
proData
)
this
.
setData
({
proData
:
proData
})
...
...
@@ -111,7 +112,6 @@ wxService.page({
})
},
//全选
allSelect
()
{
this
.
setData
({
...
...
@@ -150,6 +150,7 @@ wxService.page({
})
return
false
;
}
let
spreadProducts
=
[]
for
(
var
i
in
this
.
data
.
proData
){
spreadProducts
.
push
({
...
...
@@ -158,7 +159,6 @@ wxService.page({
name
:
this
.
data
.
proData
[
i
].
productName
})
}
console
.
log
(
spreadProducts
)
wxService
.
post
(
`/merchant/spread/save`
,
{
spreadProducts
:
spreadProducts
...
...
@@ -169,7 +169,7 @@ wxService.page({
this
.
data
.
proData
.
forEach
((
item
)
=>
{
item
.
url
=
item
.
productImgUrl
item
.
title
=
item
.
productName
})
})
;
let
tentacleInfo
=
{
content
:
JSON
.
stringify
(
this
.
data
.
proData
),
contentId
:
data
.
id
,
...
...
@@ -191,19 +191,19 @@ wxService.page({
this
.
setData
({
showCardModal
:
true
,
cardTitle
:
this
.
data
.
proData
[
0
].
productName
,
cardUrl
:
this
.
data
.
proData
[
0
].
productImgUrl
,
cardUrl
:
this
.
data
.
proData
[
0
].
productImgUrl
||
defaultProImg
,
pagePath
:
path
,
scene
:
scene
});
}
else
{
this
.
setData
({
cardTitle
:
this
.
data
.
explain
?
this
.
data
.
explain
:
this
.
data
.
proData
[
0
].
productName
,
cardUrl
:
this
.
data
.
proData
[
0
].
productImgUrl
||
'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/product_defalut.jpg'
,
cardUrl
:
this
.
data
.
proData
[
0
].
productImgUrl
||
defaultProImg
,
pagePath
:
path
,
scene
:
scene
},()
=>
{
this
.
getMiniCode
()
});
this
.
getMiniCode
()
}
}
})
...
...
src/pages/extendProduct/extendProduct.wxml
View file @
67e70295
...
...
@@ -15,7 +15,8 @@
</view>
<view class="swiper-tab-item {{currentTab==1 ? 'active' : ''}}" wx:if="{{currentHasUserInfo}}" data-current="1" bindtap="clickTab">我的分享
<view class="swiper-tab-item {{currentTab==1 ? 'active' : ''}}"
wx:if="{{currentHasUserInfo}}" data-current="1" bindtap="clickTab">我的分享
<view class="line" wx-if="{{currentTab==1}}" />
</view>
</view>
...
...
src/pages/integralWater/integralWater.js
View file @
67e70295
...
...
@@ -23,11 +23,22 @@ wxService.page({
/**
* 生命周期函数--监听页面加载
*/
onLoad
()
{
},
onLoad
()
{
wx
.
hideShareMenu
();
this
.
refreshPointRequest
();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
},
//刷新积分请求
refreshPointRequest
()
{
const
{
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
if
(
!
memberId
)
{
return
;
}
wxService
.
get
(
'/member/memberPoint/refreshExpiredPoint?memberId='
+
memberId
).
then
(
res
=>
{
})
},
//查询会员积分信息
getMemberIntegrateInfo
()
{
// wx.showLoading({
...
...
src/pages/order/order.wxml
View file @
67e70295
...
...
@@ -93,7 +93,7 @@
<view class="upload_Item">
<image
class="upload_Item_img"
src="{{sub.skuImgUrl}}"
src="{{sub.skuImgUrl
? sub.skuImgUrl : sub.mainImgUrl
}}"
bindtap='goProDetail'
data-id='{{sub.goodsId}}'
/>
...
...
src/pages/orderDetail/orderDetail.js
View file @
67e70295
...
...
@@ -61,6 +61,16 @@ wxService.page({
data
.
countDownOrderTime
=
7200000
;
// 2时(h)=7200000毫秒(ms)
// 订单倒计时 超多两小时 刷新当前页
// 本地时间 - 创建时间 > 2小时 刷新当前页
if
(
data
.
logistic
){
let
receiverInfoArr
=
data
.
logistic
.
receiverInfo
.
split
(
','
).
reverse
().
filter
(
item
=>
item
);
data
.
logistic
.
receiverName
=
receiverInfoArr
[
1
];
data
.
logistic
.
receiverMobile
=
receiverInfoArr
[
0
];
data
.
logistic
.
receiverAddress
=
receiverInfoArr
[
2
]
+
receiverInfoArr
[
3
];
}
else
{
data
.
logistic
=
null
;
}
this
.
setData
({
detail
:
data
,
mergedAmount
:
data
.
mergedAmount
||
0
...
...
@@ -71,6 +81,7 @@ wxService.page({
}
})
},
initCountDown
(
countDownOrderTime
,
startTime
,
localTime
)
{
// 毫秒差 本地时间 - 创建时间
let
countTimeSpan
=
localTime
-
startTime
...
...
src/pages/orderDetail/orderDetail.wxml
View file @
67e70295
...
...
@@ -54,12 +54,10 @@
<view class="pro-wrap">
<block wx:for="{{detail.skuVOList}}" wx:for-item="item" wx:key="">
<view class="pro-list">
<image class="pro-img" src="{{item.skuImgUrl
}}"
/>
<image class="pro-img" src="{{item.skuImgUrl
? item.skuImgUrl : item.mainImgUrl}}" mode='aspectFit'
/>
<view class="pro-info">
<view class="pro-name">{{item.productName}}</view>
<view class="pro-desc">
规格 {{item.skuSpec}}
</view>
<view class="pro-desc">{{item.skuSpec}}</view>
<view class="pro-price">
<text class="price">¥{{item.price}}</text>
<text class="number">x {{item.count}}</text>
...
...
@@ -73,7 +71,7 @@
<view class="order-pro-info">
<view class="order-pro-list">
<text>商品合计</text>
<text>¥{{detail.
pay
Amount}}</text>
<text>¥{{detail.
sku
Amount}}</text>
</view>
<view class="order-pro-list">
<text>运费</text>
...
...
@@ -104,6 +102,18 @@
</view>
</view>
</view>
<!-- 收货地址信息 -->
<view class='receive-info' wx:if="{{detail.logistic}}">
<view class='title-desc'>收货信息</view>
<view class='re-address-info'>
<text class='re-u-name'>{{detail.logistic.receiverName}}</text>
<text>{{detail.logistic.receiverMobile}}</text>
</view>
<view class='re-address-info'>
<text>{{detail.logistic.receiverAddress}}</text>
</view>
</view>
<!-- 底部按钮 -->
<view class="button-wrap" wx-if="{{detail.status == 'C'}}">
<button class="btn btn-primary btn-lg" data-id="{{detail.id}}" bindtap="handelDelOrder">删除订单</button>
...
...
src/pages/orderDetail/orderDetail.wxss
View file @
67e70295
...
...
@@ -201,4 +201,31 @@ page{
line-height: 32rpx;
border-radius: 23rpx;
font-size: 18rpx;
}
/* 收货信息 */
.receive-info{
padding: 30rpx;
margin-top: 10rpx;
background: #ffffff;
font-size: 24rpx;
}
.receive-info .title-desc{
color: #333333;
font-weight: bold;
display: flex;
padding-bottom: 30rpx;
align-items: center;
}
.re-address-info{
font-size: 24rpx;
color: #666666;
display: flex;
margin-bottom: 10rpx;
}
.re-address-info .re-u-name{
margin-right: 30rpx;
}
\ No newline at end of file
src/pages/refund/refund.js
View file @
67e70295
...
...
@@ -92,7 +92,9 @@ wxService.page({
// 订单列表
setTimeout
(()
=>
{
// wxService.router(`/pages/order/order`).search({params})
wxService
.
router
(
`/pages/order/order`
)
wx
.
navigateBack
({
delta
:
1
});
},
2000
)
}
}
...
...
src/project.config.json
View file @
67e70295
...
...
@@ -13,7 +13,7 @@
},
"compileType"
:
"miniprogram"
,
"libVersion"
:
"2.8.2"
,
"appid"
:
"wx
313ec36b710125d4
"
,
"appid"
:
"wx
ac09792264c49b5c
"
,
"projectname"
:
"%E5%BE%AE%E5%95%86%E5%9F%8E"
,
"debugOptions"
:
{
"hidedInDevtools"
:
[]
...
...
src/shoppingGuid/page/pages/couponWriteOff/couponWriteOff.js
View file @
67e70295
...
...
@@ -112,9 +112,11 @@ wxService.page({
duration
:
2000
,
mask
:
true
,
success
:
function
(){
wx
.
navigateBack
({
delta
:
1
});
setTimeout
(()
=>
{
wx
.
navigateBack
({
delta
:
1
});
},
1500
);
}
});
}
...
...
src/shoppingGuid/page/pages/home/home.js
View file @
67e70295
...
...
@@ -416,9 +416,9 @@ wxService.page({
// 回到商城
onTapToMall
(){
wx
.
redirect
To
({
wx
.
navigate
To
({
url
:
'/pages/userCenter/userCenter'
,
})
})
;
},
//跳转到会员
onTapToMember
(){
...
...
src/subPackage/page/pages/IntegralMallGoods/IntegralMallGoods.js
View file @
67e70295
...
...
@@ -27,9 +27,19 @@ wxService.page({
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
wx
.
hideShareMenu
();
this
.
refreshPointRequest
();
this
.
initIntegralCouponList
();
this
.
initIntegralProductList
();
},
//刷新积分请求
refreshPointRequest
()
{
const
{
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
if
(
!
memberId
)
{
return
;
}
wxService
.
get
(
'/member/memberPoint/refreshExpiredPoint?memberId='
+
memberId
).
then
(
res
=>
{
})
},
handelTab
(
e
)
{
let
curTab
=
e
.
currentTarget
.
dataset
.
tab
this
.
setData
({
...
...
@@ -44,6 +54,10 @@ wxService.page({
// this.initIntegralCouponList();
//获取会员积分信息
this
.
getMemberIntegrateInfo
();
if
(
wx
.
getStorageSync
(
'needReloadExchangeList'
)){
wx
.
removeStorageSync
(
'needReloadExchangeList'
);
this
.
initIntegralProductList
();
}
},
//积分换物记录
onTapToExchangeRecords
()
{
...
...
@@ -99,16 +113,46 @@ wxService.page({
else
{
this
.
data
.
currentTab
=
'goods'
;
}
let
integralGoodsList
=
data
?
data
:
[];
this
.
setData
({
integralGoodsList
:
data
?
data
:
[],
currentTab
:
this
.
data
.
currentTab
})
});
this
.
findExchangeNumByIds
(
integralGoodsList
);
}
}
}).
finally
(()
=>
{
wx
.
hideLoading
();
})
},
//查询指定积分换物活动兑换数量
findExchangeNumByIds
(
integralGoodsList
){
//获取ids
let
ids
=
integralGoodsList
.
map
(
g
=>
{
return
g
.
id
;
});
wxService
.
post
(
`/member/pointsRedemptionProductSetting/getExchangeCount`
,
ids
).
then
(
res
=>
{
if
(
res
){
let
data
=
res
.
data
.
data
?
res
.
data
.
data
:
null
;
if
(
data
)
{
for
(
let
k
in
data
)
{
let
id
=
k
,
value
=
data
[
k
];
for
(
let
i
=
0
;
i
<
integralGoodsList
.
length
;
i
++
)
{
if
(
integralGoodsList
[
i
].
id
==
id
)
{
integralGoodsList
[
i
].
canExchange
=
integralGoodsList
[
i
].
stock
>
value
;
}
}
}
}
}
this
.
setData
({
integralGoodsList
:
integralGoodsList
,
});
});
},
// 积分兑换优惠券列表
initIntegralCouponList
()
{
wx
.
showLoading
({
...
...
@@ -140,8 +184,16 @@ wxService.page({
},
// 立即兑换物品
exchangeGoods
(
e
)
{
const
{
id
,
point
}
=
e
.
currentTarget
.
dataset
;
const
{
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
{
id
,
point
,
canexchange
}
=
e
.
currentTarget
.
dataset
;
const
{
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
);
if
(
!
canexchange
){
this
.
setData
({
dialogStockEmpty
:
true
});
return
;
}
//检查是不是可以兑换
wx
.
showLoading
({
title
:
'检查兑换资格中..'
,
...
...
src/subPackage/page/pages/IntegralMallGoods/IntegralMallGoods.wxml
View file @
67e70295
...
...
@@ -94,6 +94,7 @@
<view class='coupon-btn-click'
data-id="{{item.id}}"
data-point="{{item.point}}"
data-canexchange="{{item.canExchange}}"
catchtap='exchangeGoods'>立即兑换</view>
<view class='coupon-btn-num'>{{item.point}}积分</view>
</view>
...
...
src/subPackage/page/pages/IntegralMallGoods/IntegralMallGoods.wxss
View file @
67e70295
...
...
@@ -57,6 +57,12 @@ page {
font-size: 24rpx;
text-align: center;
}
.coupon-btn-click.disabled{
background-color: #dddddd !important;
box-shadow: none;
}
.coupon-btn-num {
width: 153.8rpx;
height: 22rpx;
...
...
src/subPackage/page/pages/IntegrateGoodsExchangeInfo/IntegrateGoodsExchangeInfo.js
View file @
67e70295
...
...
@@ -12,6 +12,7 @@ wxService.page({
data
:
{
isExchange
:
false
,
dialogUserLimit
:
false
,
dialogStockEmpty
:
false
,
integralMallDetail
:
{}
},
...
...
@@ -24,10 +25,34 @@ wxService.page({
this
.
getIntegralCouponDetail
(
id
)
},
//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
});
},
//立即兑换
exchange
()
{
const
{
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
);
const
id
=
this
.
data
.
integralMallDetail
.
id
;
if
(
!
this
.
data
.
integralMallDetail
.
canExchange
){
this
.
setData
({
dialogStockEmpty
:
true
,
});
return
;
}
//检查是不是可以兑换
wx
.
showLoading
({
title
:
'检查兑换资格中..'
,
...
...
@@ -57,12 +82,32 @@ wxService.page({
if
(
result
==
0
)
{
wx
.
hideLoading
()
data
.
desc
=
JSON
.
parse
(
data
.
desc
)
data
.
canExchange
=
true
;
this
.
setData
({
integralMallDetail
:
data
},()
=>
{
this
.
findExchangeNumByIds
(
id
);
});
}
}).
finally
(()
=>
{
wx
.
hideLoading
()
})
}
},
//查询指定积分换物活动兑换数量
findExchangeNumByIds
(
id
)
{
//获取ids
let
ids
=
[
id
];
wxService
.
post
(
`/member/pointsRedemptionProductSetting/getExchangeCount`
,
ids
).
then
(
res
=>
{
let
data
=
res
.
data
.
data
?
res
.
data
.
data
:
null
;
if
(
data
)
{
let
value
=
data
[
id
];
this
.
data
.
integralMallDetail
.
canExchange
=
this
.
data
.
integralMallDetail
.
stock
>
value
;
}
this
.
setData
({
integralMallDetail
:
this
.
data
.
integralMallDetail
});
});
},
})
\ No newline at end of file
src/subPackage/page/pages/IntegrateGoodsExchangeInfo/IntegrateGoodsExchangeInfo.json
View file @
67e70295
...
...
@@ -2,6 +2,7 @@
"navigationBarTitleText"
:
"积分换物详情"
,
"usingComponents"
:
{
"go-home"
:
"/component/goHome/goHome"
,
"dialog-stock-empty"
:
"/component/dialogStockEmpty/dialogStockEmpty"
,
"dialog-user-limit"
:
"/component/dialogUserLimit/dialogUserLimit"
}
}
\ No newline at end of file
src/subPackage/page/pages/IntegrateGoodsExchangeInfo/IntegrateGoodsExchangeInfo.wxml
View file @
67e70295
...
...
@@ -2,7 +2,6 @@
<view class='page-integral-detail'>
<view class='coupon-wrap'>
<view class='coupon-list'>
<view class='coupon-img'>
<image wx:if="{{integralMallDetail.thumbnail}}" src='{{integralMallDetail.thumbnail}}' />
<image wx:else src='/assets/imgs/qr-code.png' />
...
...
@@ -27,3 +26,5 @@
<!--goHome-->
<go-home/>
<dialog-user-limit show="{{dialogUserLimit}}"/>
<dialog-stock-empty show="{{dialogStockEmpty}}" bind:btnClick="onDialogBtnCallBack"/>
src/subPackage/page/pages/exchangeAddress/exchangeAddress.js
View file @
67e70295
...
...
@@ -128,6 +128,7 @@ wxService.page({
wx
.
showToast
({
title
:
'兑换成功'
,
});
wx
.
setStorageSync
(
'needReloadExchangeList'
,
true
)
setTimeout
(()
=>
{
wx
.
navigateBack
({
...
...
src/utils/wxService.js
View file @
67e70295
...
...
@@ -667,19 +667,22 @@ class WXService extends Http {
currentHasUserInfo
:
true
,
isVip
:
vipFlag
},
()
=>
{
_self
.
trialList
().
then
(
res
=>
{
if
(
!
res
)
return
false
const
{
currentPaths
}
=
res
if
(
currentPaths
.
indexOf
(
router
.
route
)
>
-
1
&&
isExperiencer
)
{
this
.
setData
({
experAccessible
:
true
})
}
else
{
this
.
setData
({
experAccessible
:
false
})
}
})
//开启体验功能时才进行校验这个功能
if
(
envInfo
.
hasTrial
)
{
_self
.
trialList
().
then
(
res
=>
{
if
(
!
res
)
return
false
const
{
currentPaths
}
=
res
if
(
currentPaths
.
indexOf
(
router
.
route
)
>
-
1
&&
isExperiencer
)
{
this
.
setData
({
experAccessible
:
true
})
}
else
{
this
.
setData
({
experAccessible
:
false
})
}
});
}
});
}
else
{
page
.
setData
({
...
...
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