diff --git a/app.json b/app.json index e4e3850..efb542d 100644 --- a/app.json +++ b/app.json @@ -54,8 +54,7 @@ "backgroundTextStyle": "red", "navigationBarBackgroundColor": "#02C0FF", "navigationBarTitleText": "WeChat", - "navigationBarTextStyle": "white", - "enablePullDownRefresh": true + "navigationBarTextStyle": "white" }, "networkTimeout": { "request": 10000, diff --git a/pages/couponorder/index/index.js b/pages/couponorder/index/index.js index ef9ec8f..b384cf1 100644 --- a/pages/couponorder/index/index.js +++ b/pages/couponorder/index/index.js @@ -70,6 +70,8 @@ Page({ res.data.list.map(file => { file.expiredTime = util.fmtDate(file.expiredTime); }); + + setTimeout(function () { that.setData({ loading: false diff --git a/pages/index/index.js b/pages/index/index.js index 4553c7f..ebfd910 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -21,6 +21,7 @@ Page({ var that = this; var scene = decodeURIComponent(options.scene); app.getLocation(); + that.userLogin(); }, /** * 下拉刷新 @@ -38,9 +39,6 @@ Page({ wx.stopPullDownRefresh(); }; }, - onShow: function () { - this.userLogin(); - }, onGetCode: function (e) { //子组件传递给父组件的值 diff --git a/pages/index/index.json b/pages/index/index.json index 834a073..adcf946 100644 --- a/pages/index/index.json +++ b/pages/index/index.json @@ -5,7 +5,5 @@ "c-coupons": "./coupons/index" }, "navigationBarTitleText": "首页", - "window": { - "enablePullDownRefresh": true - } + "enablePullDownRefresh": true } diff --git a/pages/login/index.json b/pages/login/index.json index 49e3163..ddeacd2 100644 --- a/pages/login/index.json +++ b/pages/login/index.json @@ -2,5 +2,5 @@ "usingComponents": { "i-button": "../../dist/button/index" }, - "navigationBarTitleText": "登陆" + "navigationBarTitleText": "登录" } \ No newline at end of file diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js index 8427395..0718c9e 100644 --- a/pages/order/detail/index.js +++ b/pages/order/detail/index.js @@ -77,7 +77,7 @@ Page({ }); //createDate 创建时间 - var createDate = util.fmtDate(res.data.createDate); + var createDate = util.formatTime(res.data.createDate, "yyyy-MM-dddd hh:mm:ss"); console.log(createDate); that.setData({ createDate: createDate diff --git a/pages/order/index/index.js b/pages/order/index/index.js index b5da7fd..5c43451 100644 --- a/pages/order/index/index.js +++ b/pages/order/index/index.js @@ -97,10 +97,23 @@ Page({ that.setData({ list: tmpArr }) + // for (let i = 0; i < that.data.list.length; i++) { + // that.setData({ + // createDate: util.formatTime(that.data.list[i].createDate, "201y-M-d h:m:s") + // }) + // } + + for (let i = 0; i < that.data.list.length; i++) { + var createDate1 = util.formatTime(that.data.list[i].createDate, "yyyy-MM-dddd hh:mm:ss"); + /** + * 修改list的endtime + * 渲染到页面 + */ + var createDate = 'list[' + i + '].createDate' that.setData({ - createDate: util.fmtDate(that.data.list[i].createDate) - }) + [createDate]: createDate1 + }); } }); } else { @@ -130,7 +143,7 @@ Page({ list: [], allow_load: true, current_scroll: detail.key, - page:1 + page: 1 }) this.getList(detail.key, 1); }, diff --git a/pages/order/index/index.wxml b/pages/order/index/index.wxml index 3937595..708f4a3 100644 --- a/pages/order/index/index.wxml +++ b/pages/order/index/index.wxml @@ -12,14 +12,16 @@ {{item.title}} 待付款 - 已退款 + 待退款 + 已取消 + 已退款 + 退款失败 免费领取 已付款 - 已过期 {{item.subTitle}} - 下单时间:{{createDate}} + 下单时间:{{item.createDate}} @@ -38,14 +40,20 @@ 查看详情 - 支付 + 去支付 - 已过期 + 已取消 + 待退款 + + 已退款 + + 退款失败 + diff --git a/pages/rushToBuy/index.js b/pages/rushToBuy/index.js index e55fd22..f6cc74b 100644 --- a/pages/rushToBuy/index.js +++ b/pages/rushToBuy/index.js @@ -52,38 +52,38 @@ Page({ loading: false, }) }, 1400); - } else { - setTimeout(function () { - that.setData({ - loading: false, - }) - }, 1400); - console.log(pageNum); - if (pageNum == 1) { - that.setData({ - list: [] - }) - } - var tmpArr = that.data.list; - tmpArr.push.apply(tmpArr, res.data.list); + } + + setTimeout(function () { that.setData({ - list: tmpArr + loading: false, }) - console.log(tmpArr); - for (let i = 0; i < that.data.list.length; i++) { - var startTime = util.fmtDate(that.data.list[i].endTime); - util.timechuo(startTime); - console.log(util.timechuo(startTime)); - /** - * 修改list的endtime - * 渲染到页面 - */ - var endtime = 'list[' + i + '].endtime' - that.setData({ - [endtime]: util.timechuo(startTime) - }); - } + }, 1400); + // if (pageNum == 2) { + // that.setData({ + // list: [] + // }) + // } + var tmpArr = that.data.list; + tmpArr.push.apply(tmpArr, res.data.list); + that.setData({ + list: tmpArr + }) + console.log(tmpArr); + for (let i = 0; i < that.data.list.length; i++) { + var startTime = util.fmtDate(that.data.list[i].endTime); + util.timechuo(startTime); + console.log(util.timechuo(startTime)); + /** + * 修改list的endtime + * 渲染到页面 + */ + var endtime = 'list[' + i + '].endtime' + that.setData({ + [endtime]: util.timechuo(startTime) + }); } + }); } else { console.info("allow_load==false 已禁止加载"); diff --git a/pages/rushToBuy/index.json b/pages/rushToBuy/index.json index 8b8550b..fc70d1c 100644 --- a/pages/rushToBuy/index.json +++ b/pages/rushToBuy/index.json @@ -1,7 +1,5 @@ { - "usingComponents": { - + "usingComponents": { }, "navigationBarTitleText": "限时抢购" - } \ No newline at end of file