Commit c55ac5ac by daqian

add: 进度条

parent 653a96d1
...@@ -22,7 +22,8 @@ wxService.page({ ...@@ -22,7 +22,8 @@ wxService.page({
popupType: 0, // 默认不跳转 1 优惠券 2 积分 popupType: 0, // 默认不跳转 1 优惠券 2 积分
goal: 0, goal: 0,
detailImage: '', detailImage: '',
countObj: null countObj: null,
currentPercent: 0 // 当前进度
}, },
/** /**
...@@ -41,6 +42,7 @@ wxService.page({ ...@@ -41,6 +42,7 @@ wxService.page({
const { result, data } = res.data const { result, data } = res.data
if (result == 0) { if (result == 0) {
wx.hideLoading() wx.hideLoading()
this.setData({ this.setData({
activityId: data.id, activityId: data.id,
type: data.type, type: data.type,
...@@ -67,7 +69,9 @@ wxService.page({ ...@@ -67,7 +69,9 @@ wxService.page({
if (result == 0) { if (result == 0) {
wx.hideLoading() wx.hideLoading()
this.setData({ this.setData({
countObj: data countObj: data,
currentPercent: (100 / 5) * 2
// currentPercent: (100 / this.data.goal) * data.surplusPoints
}) })
} }
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</view> </view>
<view class="info-progress border_box"> <view class="info-progress border_box">
<progress <progress
percent="100" percent="{{currentPercent}}"
activeColor="#C09A74" activeColor="#C09A74"
stroke-width="10" stroke-width="10"
active active
......
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