From 123745bf1343a7f5d219fcfabf6d19c0dc9e87e0 Mon Sep 17 00:00:00 2001 From: meo <18801474720@163.com> Date: Thu, 24 Jan 2019 11:06:55 +0800 Subject: [PATCH] =?UTF-8?q?[bug=E4=BF=AE=E6=94=B9]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.js | 6 +- pages/bargain/bargain.js | 3 +- pages/bargain/bargain.wxml | 33 +++++----- pages/bargain/bargain.wxss | 5 +- pages/coupon/detail/index.js | 10 ++- pages/coupon/detail/index.wxss | 2 +- pages/czdetail/czdetail.js | 74 ++++++++++------------ pages/czdetail/czdetail.wxml | 4 +- pages/order/detail/index.js | 19 +++++- pages/order/detail/index.wxml | 2 +- pages/passCar/choicecoupon/choicecoupon.js | 2 +- project.config.json | 2 +- 12 files changed, 87 insertions(+), 75 deletions(-) diff --git a/config/config.js b/config/config.js index 9562f71..916e7e9 100755 --- a/config/config.js +++ b/config/config.js @@ -1,9 +1,9 @@ var extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}; var appId = extConfig.appId; var config = { - url: "https://ciformall.youlane.cn/C/api", + // url: "https://ciformall.youlane.cn/C/api", // url:"https://c.malls.iformall.com/C/api", - // url:'https://ctest.malls.iformall.com/C/api', + url:'https://ctest.malls.iformall.com/C/api', // url:'http://10.100.33.68:7000/C/api', // url: 'http://202.165.179.86:4000/C/api', api: { @@ -219,7 +219,7 @@ var config = { }, weapp: { - AppId: "wxea71200db93d756b" + AppId: "wx649b3be73c1afe47" }, ErrorCode: { diff --git a/pages/bargain/bargain.js b/pages/bargain/bargain.js index b644902..b0be2fb 100644 --- a/pages/bargain/bargain.js +++ b/pages/bargain/bargain.js @@ -21,10 +21,9 @@ Page({ loadingUrl: imgurl.loading.url, flag: 'bargaingoods', }, - onShow: function () { + onLoad: function () { let that = this; that.getBannerlist(); - console.log("onShow") var todayDate=new Date().getTime(); that.setData({ todayDate:todayDate diff --git a/pages/bargain/bargain.wxml b/pages/bargain/bargain.wxml index 1dddbfe..9bce1ee 100644 --- a/pages/bargain/bargain.wxml +++ b/pages/bargain/bargain.wxml @@ -4,7 +4,7 @@ - + @@ -15,17 +15,12 @@ 发起砍价 - - - 请您敬请期待 - 我们正在筹备一大波优惠活动 - {{content}} - {{loadingtext}} + - + {{item.title}} @@ -37,29 +32,31 @@ 邀请好友砍价 - 立即支付 - + + + + 重新砍价 - - + + - - - 请您敬请期待 - 我们正在筹备一大波优惠活动 - {{content}} - {{loadingtext}} + + + + 请您敬请期待 + 我们正在筹备一大波优惠活动 + 砍价商品 我的砍价 diff --git a/pages/bargain/bargain.wxss b/pages/bargain/bargain.wxss index f565eff..026a04a 100644 --- a/pages/bargain/bargain.wxss +++ b/pages/bargain/bargain.wxss @@ -78,7 +78,7 @@ page{ .listitem{ position: relative; padding: 21rpx 0; - border-bottom: 1rpx solid #F9F9F9; + border-bottom: 1rpx solid #ededed; } .botton{ position: absolute; @@ -413,4 +413,7 @@ page{ position: relative; width: 686rpx; height: 200rpx; + } + .banner{ + margin-bottom: 20rpx; } \ No newline at end of file diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index d11a848..fe166fb 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -348,13 +348,19 @@ Page({ data: {} }) .then(res => { - if (discount == 'discount' || discount == 'discount1') { + if (discount == 'discount') { var data = { couponChannelId: "" + that.data.couponChannelId, couponId: "" + that.data.couponId, press: true } - } else if (that.data.couponChannelId == null) { + } else if (discount == 'discount1'){ + var data = { + couponChannelId: "" + that.data.couponChannelId, + couponId: "" + that.data.couponId, + press: false + } + }else if (that.data.couponChannelId == null) { var data = { couponId: "" + that.data.couponId }; diff --git a/pages/coupon/detail/index.wxss b/pages/coupon/detail/index.wxss index ab627bb..8a21dbc 100644 --- a/pages/coupon/detail/index.wxss +++ b/pages/coupon/detail/index.wxss @@ -3,7 +3,7 @@ page { background: #fff; } - +button::after{ border: none; } .coupons { width: 100%; position: relative; diff --git a/pages/czdetail/czdetail.js b/pages/czdetail/czdetail.js index 78efb33..967e42a 100644 --- a/pages/czdetail/czdetail.js +++ b/pages/czdetail/czdetail.js @@ -2,6 +2,7 @@ var config = require("../../config/config.js"); var app = getApp(); const Http = require("../../utils/HttpBasics"); let util = require("../../utils/util"); +const imgurl = require("../../utils/imgurl"); Page({ /** @@ -12,7 +13,9 @@ Page({ pageNum:1, list:[], showcontent:false, - loading:"" + loading:"", + loadingUrl: imgurl.loading.url, + allow_load: true }, /** @@ -32,55 +35,44 @@ Page({ onShow: function () { let that = this; that.getScore(); - let pageNum = that.data.pageNum; - let pageSize = that.data.pageSize; - that.record(pageNum, pageSize); + that.record(1, 15); }, - record: function (pageNum) { - let that = this; - Http.get({ + record(pageNum) { + var that = this; + console + if (that.data.allow_load) { + Http.get({ url: config.api.scoreHistory, data: { pageNum: pageNum, - pageSize: 15 + pageSize: 20, } - }) - .then(res => { - console.log(res) - if (res.data.list.length > 0 && res.data.pageNum >= pageNum) { - var tmpArr = that.data.list.concat(res.data.list); - - tmpArr.map(file => { - file.createDate = util.formatTime(file.createDate, "yyyy-MM-dd hh:mm:ss") - }); + }).then(res => { + res.data.list.map(file => { + file.createDate = util.formatTime( + file.createDate, + "yyyy-MM-dd hh:mm:ss" + ); + }); + if (pageNum >= res.data.pages) { that.setData({ - list:tmpArr - }) - setTimeout(function(){ - wx.hideLoading() - },1200) - } - else if (res.data.list.length == 0){ - that.setData({ - loading:"暂无数据" - }) - setTimeout(function () { - wx.hideLoading() - }, 1200) - } - else{ - setTimeout(function () { - wx.hideLoading() - }, 1200) + allow_load: false + }); } + that.data.list = that.data.list.concat(res.data.list); + that.setData({ + list: that.data.list + }); }) - .catch(err => { - wx.showModal({ - title: '抱歉', - content: err.message, - showCancel:false + .catch(err => { + wx.showToast({ + title: err.errMsg, + icon: 'none', + duration: 2000, + mask: false + }); }) - }) + } }, getScore: function() { let that = this; diff --git a/pages/czdetail/czdetail.wxml b/pages/czdetail/czdetail.wxml index 85f7f33..d909b38 100644 --- a/pages/czdetail/czdetail.wxml +++ b/pages/czdetail/czdetail.wxml @@ -26,6 +26,6 @@ - - {{loading}} + + {{content}} \ No newline at end of file diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js index 90e7b4e..d510020 100644 --- a/pages/order/detail/index.js +++ b/pages/order/detail/index.js @@ -21,7 +21,8 @@ Page({ mystatus: '', staticGamedata: {}, showIf: false, - showPage:false + showPage:false, + showButton:false }, phone: function (e) { @@ -139,12 +140,20 @@ Page({ }) }) }, - + onShow:function(){ + let that = this; + that.setData({ + showButton: false + }) + }, /** * 发起支付 */ orderFunc(e) { var that = this; + that.setData({ + showButton: true + }) wx.showLoading({ title: "加载中..." }); @@ -159,6 +168,9 @@ Page({ } }).then(res => { /// Begin payment ---- + that.setData({ + showButton: false + }) var payOrderId = "" + res.data.payOrderId; wx.hideLoading(); wx.requestPayment({ @@ -190,6 +202,9 @@ Page({ } }, fail: res => { + that.setData({ + showButton:false + }) that.payOrderUpdate(that.data.orderId, payOrderId, 2,'','fail',that); return; }, diff --git a/pages/order/detail/index.wxml b/pages/order/detail/index.wxml index 2615eb6..896da2c 100644 --- a/pages/order/detail/index.wxml +++ b/pages/order/detail/index.wxml @@ -72,7 +72,7 @@ - + diff --git a/pages/passCar/choicecoupon/choicecoupon.js b/pages/passCar/choicecoupon/choicecoupon.js index d816f85..d5d1459 100644 --- a/pages/passCar/choicecoupon/choicecoupon.js +++ b/pages/passCar/choicecoupon/choicecoupon.js @@ -60,7 +60,7 @@ Page({ "yyyy-MM-dd hh:mm:ss" ); }); - if (pageNum > res.data.pages) { + if (pageNum >= res.data.pages) { that.setData({ allow_load: false }); diff --git a/project.config.json b/project.config.json index 4e30ca0..2970aaf 100644 --- a/project.config.json +++ b/project.config.json @@ -13,7 +13,7 @@ }, "compileType": "miniprogram", "libVersion": "2.0.9", - "appid": "wxea71200db93d756b", + "appid": "wx649b3be73c1afe47", "projectname": "C", "isGameTourist": false, "condition": {