From 1aff4a452563a03f26b9056ba212fb0c93c388dc Mon Sep 17 00:00:00 2001 From: meo <18801474720@163.com> Date: Mon, 17 Dec 2018 11:25:33 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98=E7=9A=84?= =?UTF-8?q?=E5=A4=84=E7=90=86=EF=BC=8C=E6=8A=98=E6=89=A3=E4=BF=AE=E6=94=B9?= =?UTF-8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/coupon/detail/index.js | 25 +-- pages/coupon/detail/index.wxml | 196 +++++++++++---------- pages/coupon/detail/index.wxss | 1 - pages/couponorder/index/index.js | 5 - pages/edit/edit.js | 16 +- pages/edit/edit.wxml | 2 +- pages/index/index.js | 16 +- pages/index/index.wxss | 2 +- pages/order/detail/index.js | 20 ++- pages/order/detail/index.wxml | 2 +- pages/order/detail/index.wxss | 2 +- pages/order/index/index.js | 18 +- pages/specialcourtesy/specialcourtesy.wxml | 2 +- pages/user/index.js | 11 +- utils/HttpBasics.js | 2 - 15 files changed, 159 insertions(+), 161 deletions(-) diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index b9e78b9..769faaa 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -8,6 +8,7 @@ Page({ data: { title: null }, + showPage:false, questions1: null, questions2: null, carList: [], @@ -221,7 +222,13 @@ Page({ couponChannelId: options.couponChannelId } }; - Http.get(parmer).then(res => { + Http.get(parmer) + .then(res => { + if(res.code==200){ + that.setData({ + showPage:true + }) + } if (res.data.endTime) { that.countdown(res.data.endTime); //当前时间与优惠券下架时间做计算 @@ -236,11 +243,11 @@ Page({ }); } } - wx.hideLoading(); that.setData({ data: res.data }); + if (res.data.validType == 1) { that.setData({ validStartDate: util.formatTime(res.data.validStartDate, "yyyy-MM-dd"), @@ -309,7 +316,6 @@ Page({ // wx.showLoading({ // title: "加载中..." // }); - if (that.data.data.type == 6) {} else { Http.post({ url: config.api.checkPhoneStatus, data: {} @@ -461,13 +467,6 @@ Page({ key: 'couponNum', data: "couponNum", }) - // if (that.data.data.type == 5) { - // setTimeout(() => { - // wx.switchTab({ - // url: '/pages/passCar/passCar' - // }); - // }, 1600); - // } } }, fail: res => { @@ -499,11 +498,6 @@ Page({ key: 'couponNum', data: "couponNum" }) - // wx.navigateTo({ - // url: `/pages/order/detail/index?orderId=${ - // that.data.orderId - // }` - // }); } } }) @@ -515,7 +509,6 @@ Page({ mask: false }); }) - } }, onShow(){ this.setData({ diff --git a/pages/coupon/detail/index.wxml b/pages/coupon/detail/index.wxml index d14b945..c2caf4e 100644 --- a/pages/coupon/detail/index.wxml +++ b/pages/coupon/detail/index.wxml @@ -1,124 +1,126 @@ - - - - - - - - + + + + + - - - - - 距结束还剩 : + + + + + + + + + + 距结束还剩 : + + + {{day}}天 + {{hour}}: + {{min}}: + {{sec}} + + + {{day}}天 + {{hour}}: + {{min}}: + {{sec}} + - - {{day}}天 - {{hour}}: - {{min}}: - {{sec}} + {{data.title}} + {{data.subTitle}} + + 售价: + {{data.salePriceStr}} + + {{data.priceStr}}元 + {{data.priceStr}}小时 + + 剩余{{data.remainInventory}}件 - - {{day}}天 - {{hour}}: - {{min}}: - {{sec}} + 有效期:自领取之日起 + {{validDays}}天内有效 + 有效期: + {{validStartDate}}至{{validEndDate}} - - {{data.title}} - {{data.subTitle}} - - 售价: - {{data.salePriceStr}} - - {{data.priceStr}}元 - {{data.priceStr}}小时 + + 当次有效 + + + 使用条件: + 满{{data.usePriceStr}}元可用 + + + 限购条件: + 每人{{data.useLimitQuantity}}张 - 剩余{{data.remainInventory}}件 - - 有效期:自领取之日起 - {{validDays}}天内有效 - 有效期: - {{validStartDate}}至{{validEndDate}} - - - 当次有效 - - - 使用条件: - 满{{data.usePriceStr}}元可用 - - 限购条件: - 每人{{data.useLimitQuantity}}张 + + + - - - - - - 购买须知 - - - {{data.remark}} - - - - - - - - - + + + + + + + - - - - - - - - - - {{questionnaire.title}} - - - + + + + + + + + {{questionnaire.title}} + + + - + - - - - - - 确定 + + + + + + 确定 + \ No newline at end of file diff --git a/pages/coupon/detail/index.wxss b/pages/coupon/detail/index.wxss index 63c1acc..a477b15 100644 --- a/pages/coupon/detail/index.wxss +++ b/pages/coupon/detail/index.wxss @@ -190,7 +190,6 @@ page { background: #fff; height: 100rpx; margin-bottom: 20rpx; - border-bottom: 1px solid #f9f9f9; } .posi_logo view:nth-child(1) { diff --git a/pages/couponorder/index/index.js b/pages/couponorder/index/index.js index 7fd5207..ff78930 100644 --- a/pages/couponorder/index/index.js +++ b/pages/couponorder/index/index.js @@ -42,11 +42,6 @@ Page({ wx.hideTabBarRedDot({ index:2 }) - // wx.getScreenBrightness({ - // success:function(res){ - // app.globalData.sight = res.value; - // } - // }); }, //点击跳转到券详情页面 gotouse: function (e) { diff --git a/pages/edit/edit.js b/pages/edit/edit.js index b7a71c4..b546890 100644 --- a/pages/edit/edit.js +++ b/pages/edit/edit.js @@ -19,6 +19,7 @@ Page({ array1: ['附近住户', '距离2km', '距离3km', '更远'], index: 0, index1: 0, + showPage:false }, /** * 获得生日 @@ -146,7 +147,13 @@ Page({ Http.get({ url: config.api.getScore, data: {} - }).then(res => { + }) + .then(res => { + if(res.code == 200){ + that.setData({ + showPage:true + }) + } console.log(res.data.address); var reg = RegExp(/address/); if (res.data.address.match(reg)) { @@ -190,5 +197,12 @@ Page({ }) } }) + .catch(error=>{ + wx.showModal({ + title: '提示', + content: error.errMsg, + showCancel:false + }) + }) } }) \ No newline at end of file diff --git a/pages/edit/edit.wxml b/pages/edit/edit.wxml index bcb0fa2..01b17d7 100644 --- a/pages/edit/edit.wxml +++ b/pages/edit/edit.wxml @@ -1,4 +1,4 @@ -
+ 姓名 diff --git a/pages/index/index.js b/pages/index/index.js index 1320217..daa3c6c 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -110,18 +110,10 @@ Page({ }) }) .catch(err => { - console.log(err); - if (err.message == '请求超时,请检查您的网络设置!') { - that.setData({ - loading: false, - loadingtext: "请求超时,请检查您的网络设置!" - }) - } - wx.showToast({ - title: err.message, - icon: 'none', - duration: 2000, - mask: false + wx.showModal({ + title: "提示", + content:err.errMsg, + showCancel:false }); }); }, diff --git a/pages/index/index.wxss b/pages/index/index.wxss index 0a58b52..859ada7 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -25,7 +25,7 @@ page { .game-entry{ width: 690rpx; height: 140rpx; - margin: 10rpx auto 0; + margin: 30rpx auto 0; } .gameimg{ display: block; diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js index 97f0edb..d577d36 100644 --- a/pages/order/detail/index.js +++ b/pages/order/detail/index.js @@ -15,7 +15,8 @@ Page({ setInter: "", mystatus: '', staticGamedata: {}, - showIf: false + showIf: false, + showPage:false }, phone: function (e) { @@ -101,7 +102,13 @@ Page({ data: { orderId: options.orderId } - }).then(res => { + }) + .then(res => { + if(res.code == 200){ + that.setData({ + showPage:true + }) + } that.setData({ order: res.data }); @@ -111,7 +118,14 @@ Page({ that.setData({ createDate: createDate }); - }); + }) + .catch(error=>{ + wx.showModal({ + title: '提示', + content: error.errMsg, + showCancel:false + }) + }) }, /** diff --git a/pages/order/detail/index.wxml b/pages/order/detail/index.wxml index 16d21d0..7d8945f 100644 --- a/pages/order/detail/index.wxml +++ b/pages/order/detail/index.wxml @@ -1,4 +1,4 @@ - + 领取成功,请尽快到门店使用 diff --git a/pages/order/detail/index.wxss b/pages/order/detail/index.wxss index 21bb668..316ef0b 100644 --- a/pages/order/detail/index.wxss +++ b/pages/order/detail/index.wxss @@ -412,6 +412,6 @@ radio { top: 0; bottom: 0; margin: auto; - right: 30rpx; + right: 14rpx; z-index: 10; } \ No newline at end of file diff --git a/pages/order/index/index.js b/pages/order/index/index.js index 5970b14..a26fcd7 100644 --- a/pages/order/index/index.js +++ b/pages/order/index/index.js @@ -94,13 +94,6 @@ 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-dd hh:mm:ss"); /** @@ -114,12 +107,11 @@ Page({ } }) .catch(err => { - wx.showToast({ - title: err.errMsg, - icon: 'none', - duration: 2000, - mask: false - }); + wx.showModal({ + title: '提示', + content: err.errMsg, + showCancel:false + }) }) } else { diff --git a/pages/specialcourtesy/specialcourtesy.wxml b/pages/specialcourtesy/specialcourtesy.wxml index 19a1b86..4d798aa 100644 --- a/pages/specialcourtesy/specialcourtesy.wxml +++ b/pages/specialcourtesy/specialcourtesy.wxml @@ -11,7 +11,7 @@ > - {{item.vipDiscountRate1/100}} + {{item.vipDiscountRate1/1000}} {{item.merchantName}} {{item.buildingName}}{{item.floorName}} diff --git a/pages/user/index.js b/pages/user/index.js index 3b8f7c8..82cfec1 100644 --- a/pages/user/index.js +++ b/pages/user/index.js @@ -128,12 +128,11 @@ Page({ } }) .catch(err => { - wx.showToast({ - title: err.errMsg, - icon: 'none', - duration: 2000, - mask: false - }); + wx.showModal({ + title: '提示', + content: err.errMsg, + showCancel:false + }) }) //暂时注释 // that.getrun(); diff --git a/utils/HttpBasics.js b/utils/HttpBasics.js index 5f70d9a..092b523 100644 --- a/utils/HttpBasics.js +++ b/utils/HttpBasics.js @@ -48,8 +48,6 @@ class HttpBasics { this.responseMap(res, resolve, reject); }, fail: err => { - // wx.hideLoading(); - console.log(err) if (err.errMsg == 'request:fail timeout') { err.errMsg = '请求超时,请检查您的网络设置!' } else if (err.errMsg == 'request:fail '){