@@ -2,6 +2,7 @@ | |||
var config = require("../../config/config.js"); | |||
const Http = require("../../utils/HttpBasics"); | |||
const imgurl = require("../../utils/imgurl"); | |||
const utils = require("../../utils/util.js") | |||
Page({ | |||
/** | |||
@@ -21,6 +22,7 @@ Page({ | |||
hour: "00", | |||
min: "00", | |||
sec: "00", | |||
paramData:null | |||
}, | |||
/** | |||
@@ -29,6 +31,7 @@ Page({ | |||
onLoad: function (options) { | |||
console.log(options,22) | |||
this.setData({ | |||
paramData:options, | |||
couponChannelId: options.couponChannelId, | |||
couponId: options.couponId, | |||
orderGroupId: options.orderGroupId, | |||
@@ -54,6 +57,7 @@ Page({ | |||
id: options.orderGroupId, | |||
} | |||
}).then(res => { | |||
wx.stopPullDownRefresh(); | |||
if (res.data.attend == true || res.data.status!=10) { | |||
wx.redirectTo({ | |||
url: `/pages/spellDetail/index?orderId=${options.orderId}&couponId=${options.couponId}&orderGroupId=${options.orderGroupId}&couponChannelId=${options.couponChannelId}`, | |||
@@ -184,6 +188,8 @@ Page({ | |||
let data = res.data; | |||
data.price = (data.price / 100).toFixed(2) | |||
data.salePrice = (data.salePrice / 100).toFixed(2) | |||
data.validStartDate = utils.formatTime(data.validStartDate, 'yyyy-MM-dd') | |||
data.validEndDate = utils.formatTime(data.validEndDate, 'yyyy-MM-dd') | |||
that.setData({ | |||
data | |||
}); | |||
@@ -485,7 +491,7 @@ Page({ | |||
* 页面相关事件处理函数--监听用户下拉动作 | |||
*/ | |||
onPullDownRefresh: function () { | |||
this.checkUser(this.data.paramData) | |||
}, | |||
/** | |||
@@ -10,29 +10,6 @@ | |||
<view class='des-peoplenum'>【拼团购】{{data.pressLimitNum}}人拼团成功,单价仅需</view> | |||
<view class='des-saleprice'>{{data.salePriceStr}}元</view> | |||
</view> | |||
<view class='status'> | |||
<view class='status01 st'> | |||
<image src='{{avatarUrl}}'></image> | |||
</view> | |||
<view class='status04 st join-c' style='width:auto;'> | |||
<view class='j-f'>您的好友 {{nickName}} 邀请您参加拼团</view> | |||
<view class='j-t'>剩余时间:<view class='j-time'>{{hour+' : '+min+' : '+sec}}</view></view> | |||
</view> | |||
</view> | |||
<!-- <view class='status'> | |||
<view class='status01 st'> | |||
<image src='{{spellData.avatarUrl}}'></image> | |||
</view> | |||
<view class='status02 st'>{{spellData.nickName}}的团还差<view class='r-p-num'>1人</view></view> | |||
<view class='status03 st'> | |||
<view class='hh'>{{hour}}</view>: | |||
<view class='mm'>{{min}}</view>: | |||
<view class='ss'>{{sec}}</view> | |||
</view> | |||
<view class='status04 st'> | |||
<view class='s-button' bindtap='gotoPartner'>去拼团</view> | |||
</view> | |||
</view> --> | |||
<view class='rest' wx:if="{{data.validType==1}}">有效期: | |||
<text class='time'>{{data.validStartDate}}至{{data.validEndDate}}<text class="use">(请在有效期内使用)</text></text> | |||
</view> | |||
@@ -42,6 +19,15 @@ | |||
<text class='times' style='margin-left:10rpx;' wx:if="{{data.autoRefund == 0}}">(支持过期自动退款)</text> | |||
<text class='times' style='margin-left:10rpx;' wx:if="{{data.autoRefund == 1}}">(不支持过期自动退款)</text> | |||
</view> | |||
<view class='status'> | |||
<view class='status01 st'> | |||
<image src='{{avatarUrl}}'></image> | |||
</view> | |||
<view class='status04 st join-c' style='width:auto;'> | |||
<view class='j-f'>您的好友 {{nickName}} 邀请您参加拼团</view> | |||
<view class='j-t'>剩余时间:<view class='j-time'>{{hour+' : '+min+' : '+sec}}</view></view> | |||
</view> | |||
</view> | |||
<view class='p-des'> | |||
<view class='p-title'>购买须知:</view> | |||
<view class='p-list'>{{data.remark}}</view> | |||
@@ -86,6 +86,7 @@ Page({ | |||
id: options.orderGroupId, | |||
} | |||
}).then(res => { | |||
wx.stopPullDownRefresh(); | |||
console.log(res.data, 3333333333) | |||
that.setData({ | |||
isMyself: res.data.attend | |||
@@ -179,7 +180,7 @@ Page({ | |||
id: this.data.paramData.orderGroupId | |||
} | |||
}).then(res => { | |||
console.log(res, 555555555) | |||
wx.stopPullDownRefresh(); | |||
let data = res.data; | |||
data.statustext = that.changeSatus(data.status); | |||
if (data.status != 11) { | |||
@@ -232,7 +233,6 @@ Page({ | |||
* 页面相关事件处理函数--监听用户下拉动作 | |||
*/ | |||
onPullDownRefresh: function () { | |||
this.getUserInfo() | |||
this.getDetail(this.data.paramData); | |||
this.checkUser(this.data.paramData) | |||
}, | |||
@@ -148,6 +148,7 @@ Page({ | |||
couponId: couponId | |||
} | |||
}).then(res => { | |||
wx.stopPullDownRefresh(); | |||
if(res.data){ | |||
that.countdown(res.data.expiredDate); | |||
that.setData({ | |||
@@ -167,6 +168,7 @@ Page({ | |||
couponChannelId: couponChannelId | |||
} | |||
}).then(res => { | |||
wx.stopPullDownRefresh(); | |||
let data = res.data; | |||
data.price = (data.price / 100).toFixed(2) | |||
data.salePrice = (data.salePrice / 100).toFixed(2); | |||
@@ -475,8 +477,10 @@ Page({ | |||
/** | |||
* 页面相关事件处理函数--监听用户下拉动作 | |||
*/ | |||
onPullDownRefresh: function () { | |||
onPullDownRefresh: function (e) { | |||
let that=this; | |||
that.getDetail(that.data.couponChannelId); | |||
that.getOneSpell(that.data.couponId) | |||
}, | |||
/** | |||