From b711035a0cf8d5e3920645b7b1c757b0b5ff2f5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=99=96?= Date: Wed, 13 Mar 2019 11:05:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E6=8B=89=E5=88=B7=E6=96=B0bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/joinFrDpell/index.js | 8 ++++++- pages/joinFrDpell/index.wxml | 32 ++++++++------------------ pages/spellDetail/index.js | 4 ++-- pages/spellGroup/mySpellGroup/index.js | 8 +++++-- 4 files changed, 24 insertions(+), 28 deletions(-) diff --git a/pages/joinFrDpell/index.js b/pages/joinFrDpell/index.js index f42a056..bcb20f1 100644 --- a/pages/joinFrDpell/index.js +++ b/pages/joinFrDpell/index.js @@ -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) }, /** diff --git a/pages/joinFrDpell/index.wxml b/pages/joinFrDpell/index.wxml index b20c802..9bf648b 100644 --- a/pages/joinFrDpell/index.wxml +++ b/pages/joinFrDpell/index.wxml @@ -10,29 +10,6 @@ 【拼团购】{{data.pressLimitNum}}人拼团成功,单价仅需 {{data.salePriceStr}}元 - - - - - - 您的好友 {{nickName}} 邀请您参加拼团 - 剩余时间:{{hour+' : '+min+' : '+sec}} - - - 有效期: {{data.validStartDate}}至{{data.validEndDate}}(请在有效期内使用) @@ -42,6 +19,15 @@ (支持过期自动退款) (不支持过期自动退款) + + + + + + 您的好友 {{nickName}} 邀请您参加拼团 + 剩余时间:{{hour+' : '+min+' : '+sec}} + + 购买须知: {{data.remark}} diff --git a/pages/spellDetail/index.js b/pages/spellDetail/index.js index 1d25f61..12fcdd3 100644 --- a/pages/spellDetail/index.js +++ b/pages/spellDetail/index.js @@ -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) }, diff --git a/pages/spellGroup/mySpellGroup/index.js b/pages/spellGroup/mySpellGroup/index.js index b51097c..98a27f1 100644 --- a/pages/spellGroup/mySpellGroup/index.js +++ b/pages/spellGroup/mySpellGroup/index.js @@ -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) }, /**