Commit 7b8996e2 by 高淑倩

modify: 集点列表

parent ec3af9aa
...@@ -38,7 +38,7 @@ wxService.page({ ...@@ -38,7 +38,7 @@ wxService.page({
data.forEach(item => { data.forEach(item => {
let endT = item.endTime let endT = item.endTime
// ios 兼容 // ios 兼容
let currentEndTime = (new Date(endT.replace(/-/g,'/'))).getTime(); let currentEndTime = (new Date(endT.replace(/-/g, '/'))).getTime();
let currentTime = (new Date()).getTime(); let currentTime = (new Date()).getTime();
let distancetime = currentEndTime - currentTime let distancetime = currentEndTime - currentTime
...@@ -83,12 +83,14 @@ wxService.page({ ...@@ -83,12 +83,14 @@ wxService.page({
wxService.post(`/sale/touchpoints/pointConsumptionCount/getPointConsumptionCount?activityId=${activityId}&memberId=${memberId}`).then(res => { wxService.post(`/sale/touchpoints/pointConsumptionCount/getPointConsumptionCount?activityId=${activityId}&memberId=${memberId}`).then(res => {
if (res) { if (res) {
const { result, data } = res.data const { result, data } = res.data
const { pointList } = this.data
if (result == 0) { if (result == 0) {
wx.hideLoading() wx.hideLoading()
const { pointList } = this.data
pointList.forEach(item => { pointList.forEach(item => {
if (item.id == activityId) { if (item.id == data.activityId) {
item.surplusPoints = data.surplusPoints item.surplusPoints = data.surplusPoints
item.totalPoints = data.totalPoints
this.setData({ this.setData({
pointList pointList
}) })
......
...@@ -18,3 +18,6 @@ ...@@ -18,3 +18,6 @@
</view> </view>
</block> </block>
</view> </view>
<!-- <text class="point_color" wx:if="{{countObj.surplusExchangeCount}}"> {{countObj.totalPoints ? tools.parse(countObj.totalPoints / goal) : 0}}</text>
<text class="point_color" wx:else> {{countObj.totalPoints ? countObj.totalPoints % goal : 0}}</text>-->
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment