diff --git a/assets/images/help.gif b/assets/images/help.gif new file mode 100644 index 0000000..44c136d Binary files /dev/null and b/assets/images/help.gif differ diff --git a/assets/images/icon004.gif b/assets/images/icon004.gif new file mode 100644 index 0000000..f7d3701 Binary files /dev/null and b/assets/images/icon004.gif differ diff --git a/config/config.js b/config/config.js index 9562f71..231e260 100755 --- a/config/config.js +++ b/config/config.js @@ -1,10 +1,10 @@ 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:'http://10.100.33.68:7000/C/api', + url:'http://10.100.33.69:7000/C/api', // url: 'http://202.165.179.86:4000/C/api', api: { /** diff --git a/pages/bargain/bargain.js b/pages/bargain/bargain.js index 9b4a3fd..c52e522 100644 --- a/pages/bargain/bargain.js +++ b/pages/bargain/bargain.js @@ -127,7 +127,7 @@ Page({ console.log(tmpArr) let lists = []; tmpArr.map(file => { - if (file.orderStatus != 0) { + if (file.orderStatus != 1) { lists.push(file); } }) @@ -135,8 +135,10 @@ Page({ lists: lists }) } + wx.stopPullDownRefresh(); }) .catch(err => { + wx.stopPullDownRefresh(); wx.showToast({ title: err.message, icon: 'none', diff --git a/pages/bargain/bargain.wxml b/pages/bargain/bargain.wxml index 14eb59b..9c4e65b 100644 --- a/pages/bargain/bargain.wxml +++ b/pages/bargain/bargain.wxml @@ -5,7 +5,7 @@ - {{item.title}} @@ -15,13 +15,13 @@ 发起砍价 - {{content}} + {{content}} - + {{item.title}} {{item.subTitle}} @@ -36,11 +36,7 @@ 立即支付 - - - - - + 重新砍价 @@ -49,7 +45,7 @@ - {{content}} + {{content}} diff --git a/pages/bargain/bargainDatail/bargainDatail.js b/pages/bargain/bargainDatail/bargainDatail.js index 53aec78..0c85742 100644 --- a/pages/bargain/bargainDatail/bargainDatail.js +++ b/pages/bargain/bargainDatail/bargainDatail.js @@ -18,7 +18,8 @@ Page({ showPage: false, discountStatus:null, disabled:false, - display:"block!important" + display:"block!important", + showButton: false }, /** @@ -47,6 +48,7 @@ Page({ var todayDate = new Date().getTime(); that.setData({ todayDate: todayDate, + showButton:false }) }, /** @@ -69,6 +71,8 @@ Page({ } }) .then(res => { + console.log(res) + console.log("--------------------------------status------------------------------------------") if (res.data.status == 1) { that.setData({ discountStatus: 1 @@ -135,6 +139,10 @@ Page({ file.createDate = diffTime(file.createDate) }) that.countdown(res.data.pressEndDate); + res.data.orderPressList.map(file=>{ + compare(file.first); + }) + console.log(res.data.orderPressList.sort(compare('first'))) that.setData({ data: res.data, already: (res.data.price / 100 - res.data.salePrice / 100 - res.data.pressCurrentValue / 100).toFixed(2), @@ -251,12 +259,17 @@ Page({ */ orderFunc(e) { var that = this; - console.log(e) + that.setData({ + showButton:true + }) Http.post({ url: config.api.checkPhoneStatus, data: {} }) .then(res => { + that.setData({ + showButton: false + }) if (typeof(res) != "undefined") { let orderId = "" + e.currentTarget.dataset.orderid; that.setData({ @@ -350,6 +363,9 @@ Page({ } }) .catch(err => { + that.setData({ + showButton: true + }) if (err.code == 2011) { wx.showToast({ title: "商户信息没找到", @@ -373,7 +389,7 @@ Page({ }); } else if (err.code == 3001) { wx.showToast({ - title: "领取达到上限", + title: "超过限购条件", image: './../../../assets/images/fail.png', duration: 2000, mask: false @@ -440,6 +456,7 @@ Page({ * @param {朋友邀请砍价} e */ barginAgain: function(e) { + let that = this; let couponChannelId = e.currentTarget.dataset.couponchannelid; let couponId = e.currentTarget.dataset.couponid; wx.navigateTo({ @@ -515,4 +532,11 @@ function diffTime(startDate) { }else{ return '1秒' } -} \ No newline at end of file +} +function compare(property) { + return function (a, b) { + var value1 = a[property]; + var value2 = b[property]; + return value2 - value1; + } +} diff --git a/pages/bargain/bargainDatail/bargainDatail.wxml b/pages/bargain/bargainDatail/bargainDatail.wxml index 65de04a..08c0a41 100644 --- a/pages/bargain/bargainDatail/bargainDatail.wxml +++ b/pages/bargain/bargainDatail/bargainDatail.wxml @@ -1,7 +1,6 @@ - + {{data.title}} {{data.subTitle}} @@ -19,7 +18,7 @@ 还剩 {{hour}}:{{min}}:{{sec}} 结束 - + 好友的砍价已过期 @@ -29,24 +28,29 @@ + 还需邀请{{data.pressLimitNum-data.orderPressList.length}}位好友,帮忙砍至底价 - 砍价成功 + 已砍至底价 - - + + + + + 砍价人数{{data.orderPressList.length}}/{{data.pressLimitNum}}人 + 发起人 - {{item.nickName}}砍价成功! + {{item.nickName}} 砍掉{{item.pressValue/100}}元 {{item.createDate}}前 @@ -54,10 +58,10 @@ - + diff --git a/pages/bargain/bargainDatail/bargainDatail.wxss b/pages/bargain/bargainDatail/bargainDatail.wxss index e30d51b..4123b26 100644 --- a/pages/bargain/bargainDatail/bargainDatail.wxss +++ b/pages/bargain/bargainDatail/bargainDatail.wxss @@ -15,7 +15,26 @@ top: 12rpx; right: 0; } - +.title{ + display: block; + font-size: 30rpx; + color: #333; + height: 40rpx; + line-height: 40rpx; + padding-top: 20rpx; +} +.help{ + display: block; + text-align: center; + font-size: 28rpx; + height: 40rpx; + line-height: 40rpx; + margin-top: 47rpx; + margin-bottom: 40rpx; +} +.help text{ + color: red; +} .listitem .ri { margin-left: 26rpx; width: 305rpx; @@ -109,6 +128,7 @@ line-height: 40rpx; background: rgba(51, 51, 51, 1); border-radius: 10rpx; + margin: 0 4px; } .head{ width:10%; @@ -140,9 +160,11 @@ font-size: 26rpx; } .text01{ - width: 220rpx; + width: 100rpx; margin-right: 6rpx; overflow: hidden; + height: 76rpx; + line-height: 76rpx; } .text01 text{ width: 100rpx; @@ -155,14 +177,16 @@ } .text02{ display: inline-block; - width: 140rpx; + width: 220rpx; overflow: hidden; } .text03{ - width: 212rpx; - overflow: hidden; + width: 240rpx; text-align: right; font-size:24rpx; + height: 76rpx; + line-height: 76rpx; + overflow: hidden; } .person{ border-bottom: 1px solid #F9F9F9; @@ -178,8 +202,11 @@ text-align: left; } .people{ - margin-top: 20rpx; - padding-bottom: 130rpx; + border-radius:16rpx; + background: rgba(255, 245, 240, 1); + margin-top: 20rpx; + padding:0 10rpx; + margin-bottom: 130rpx; } .btns{ padding:33rpx; @@ -224,11 +251,14 @@ font-size: 26rpx; text-align: center; line-height: 200rpx; - margin-top: 30rpx; - background: linear-gradient(90deg,rgba(236,59,45,1) 0%,rgba(248,98,52,1) 100%); - box-shadow: 0px 8px 8px 1px rgba(246,93,51,0.32); + margin: 30rpx auto 0; color: #fff!important; } +.helpDiscount image{ + display: block; + width: 200rpx; + height: 200rpx; +} .helpDiscount::after{ border: none; } .success{ margin-top: 50rpx; diff --git a/pages/cardListDetail/cardListDetail.js b/pages/cardListDetail/cardListDetail.js index 9ed624a..fe63ddc 100644 --- a/pages/cardListDetail/cardListDetail.js +++ b/pages/cardListDetail/cardListDetail.js @@ -363,7 +363,7 @@ Page({ }); } else if (err.code == "3001") { wx.showToast({ - title: "领取达到上限", + title: "超过限购条件", image: imgurl.fail.url, duration: 2000, mask: false diff --git a/pages/discountCardList/discountCardList.wxml b/pages/discountCardList/discountCardList.wxml index e2e2466..dac3ee4 100644 --- a/pages/discountCardList/discountCardList.wxml +++ b/pages/discountCardList/discountCardList.wxml @@ -6,7 +6,7 @@ - + 请您敬请期待 我们正在筹备一大波优惠活动 diff --git a/pages/grade/grade.js b/pages/grade/grade.js index 3709948..544e3fe 100644 --- a/pages/grade/grade.js +++ b/pages/grade/grade.js @@ -41,17 +41,6 @@ Page({ data: {} }) .then(res=>{ - // if true 则开启特享礼遇 - if (res.data.discountEnable) { - that.setData({ - discountEnable: true - }) - } - else { - that.setData({ - discountEnable: false - }) - } that.setData({ flags: 'have', rules: JSON.parse(res.data.score.rules).concat(JSON.parse(res.data.score.rules)[1].childs), diff --git a/pages/grade/grade.wxml b/pages/grade/grade.wxml index fbd3f86..e8f5db5 100644 --- a/pages/grade/grade.wxml +++ b/pages/grade/grade.wxml @@ -40,6 +40,6 @@ 暂无配置信息 - + \ No newline at end of file diff --git a/pages/index/index.js b/pages/index/index.js index ecfb1bc..3cb244e 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -25,7 +25,6 @@ Page({ havePlayEd: app.globalData.havePlayEd, staticGamedata: {}, showIf: false, - discountEnable:false, page: 1 // 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 }, gotodiscountCardList:function(){ @@ -38,26 +37,6 @@ Page({ url: '/pages/rushToBuy/index', }) }, - showSpecial:function(){ - let that = this; - Http.get({ - url: config.api.scoreLevelInfo, - data: {} - }) - .then(res => { - // if true 则开启特享礼遇 - if (res.data.discountEnable) { - that.setData({ - discountEnable: true - }) - } - else { - that.setData({ - discountEnable: false - }) - } - }) - }, qrcode: function (e) { var that = this; that.setData({ @@ -172,8 +151,7 @@ Page({ * 生命周期函数--监听页面初次渲染完成 */ onLoad: function (options) { - - wx.setStorageSync('imgurl', imgurl) + wx.setStorageSync('imgurl', imgurl) if (options.played == "true") { this.setData({ played: true @@ -319,7 +297,6 @@ Page({ } Http.setToken(res.data.token); that.checkUserCarStatus(); - that.showSpecial(); that.getUserInfo(); that.getBannerlist(); if (app.couponChannelListCallback) { diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 51eea81..2b29058 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -33,6 +33,6 @@ {{levelName}} diff --git a/pages/order/index/index.js b/pages/order/index/index.js index 4e84e80..f20c731 100644 --- a/pages/order/index/index.js +++ b/pages/order/index/index.js @@ -57,13 +57,13 @@ Page({ if (key == 'all') { var variable = { pageNum: pageNum, - pageSize: 5, + pageSize: 15, paymentType: 0 }; } else { var variable = { pageNum: pageNum, - pageSize: 5, + pageSize: 15, orderStatus: key, paymentType: 0 }; @@ -101,8 +101,17 @@ Page({ } var tmpArr = that.data.list; tmpArr.push.apply(tmpArr, res.data.list); + // 将砍价的状态过滤出来 + let list = []; + console.log(tmpArr) + tmpArr.map(file=>{ + if (file.orderStatus == 6 || file.orderStatus == 7 || file.orderStatus == 8 || file.orderStatus == 9){}else{ + list.push(file); + } + }) + console.log(list) that.setData({ - list: tmpArr + list: list }) 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"); @@ -125,7 +134,6 @@ Page({ }) } else { - console.log("加载完成allow_load设置成false"); that.setData({ loading: true, content: "——— 再拉裤子就掉了啦 ———" diff --git a/pages/scanPay/scanPay.js b/pages/scanPay/scanPay.js index aac5a4d..748bea5 100644 --- a/pages/scanPay/scanPay.js +++ b/pages/scanPay/scanPay.js @@ -14,6 +14,7 @@ Page({ cardList: [], arrays: [], showModel: false, + showInput:false, ids: "" }, @@ -67,6 +68,7 @@ Page({ wx.hideLoading(); that.setData({ showModel: false, + showInput: false, cardid: that.data.cardids, ids: "", remainingAmount: that.data.remainingAmounts @@ -126,7 +128,8 @@ Page({ if (res.code == 200) { wx.hideLoading(); that.setData({ - showModel: false + showModel: false, + showInput: false }) wx.navigateTo({ url: `/pages/paySuccess/paySuccess?data=${JSON.stringify(res.data)}`, @@ -171,7 +174,8 @@ Page({ }) } else if (that.data.inputValue != "" && Number(that.data.remainingAmount) < Number(that.data.inputValue)) { that.setData({ - showModel: true + showModel: true, + showInput:'disabled' }) that.getList(); console.log("1111") @@ -191,7 +195,8 @@ Page({ url: '/pages/discountCardList/discountCardList' }) this.setData({ - showModel: false + showModel: false, + showInput: false }) }, getList() { @@ -239,6 +244,7 @@ Page({ showModel: function() { this.setData({ showModel: false, + showInput: false, cardid: this.data.cardids, ids: "", remainingAmount: this.data.remainingAmounts diff --git a/pages/scanPay/scanPay.wxml b/pages/scanPay/scanPay.wxml index b94580f..3106208 100644 --- a/pages/scanPay/scanPay.wxml +++ b/pages/scanPay/scanPay.wxml @@ -6,7 +6,7 @@ 金额 ¥ - + diff --git a/pages/specialcourtesy/specialcourtesy.wxml b/pages/specialcourtesy/specialcourtesy.wxml index 9abc819..64170ab 100644 --- a/pages/specialcourtesy/specialcourtesy.wxml +++ b/pages/specialcourtesy/specialcourtesy.wxml @@ -2,7 +2,7 @@ - 以下为商城{{level}}对应门店的优惠折扣 + 会员等级为[{{level}}]对应门店的优惠折扣 @@ -22,6 +22,6 @@ - 暂无数据 + 此等级暂未开放折扣 diff --git a/pages/specialcourtesy/specialcourtesy.wxss b/pages/specialcourtesy/specialcourtesy.wxss index 3d0bd60..5bd5ee7 100644 --- a/pages/specialcourtesy/specialcourtesy.wxss +++ b/pages/specialcourtesy/specialcourtesy.wxss @@ -5,7 +5,7 @@ Page{ font-size: 28rpx; text-align: center; margin-top: 30rpx; - color: #000; + color: #fff; float:none!important; } .headerbg image{ diff --git a/pages/user/index.js b/pages/user/index.js index 419bd24..e2acc92 100644 --- a/pages/user/index.js +++ b/pages/user/index.js @@ -164,24 +164,6 @@ Page({ }) //暂时注释 // that.getrun(); - // 判断是否显示特享礼遇 - Http.get({ - url: config.api.scoreLevelInfo, - data: {} - }) - .then(res=>{ - // if true 则开启特享礼遇 - if (res.data.discountEnable){ - that.setData({ - discountEnable:true - }) - } - else{ - that.setData({ - discountEnable: false - }) - } - }) }, hideQrcode:function(){ let that = this; diff --git a/pages/user/index.wxml b/pages/user/index.wxml index b85c788..743f6b3 100644 --- a/pages/user/index.wxml +++ b/pages/user/index.wxml @@ -63,7 +63,7 @@ - + 特享礼遇 @@ -76,7 +76,7 @@ - 版本号:3.3.2 + 版本号:3.3.3 diff --git a/utils/HttpBasics.js b/utils/HttpBasics.js index 092b523..efe56da 100644 --- a/utils/HttpBasics.js +++ b/utils/HttpBasics.js @@ -52,6 +52,10 @@ class HttpBasics { err.errMsg = '请求超时,请检查您的网络设置!' } else if (err.errMsg == 'request:fail '){ err.errMsg = '未检查到您的网络,请检查您的网络设置!' + } else if (err.code == 1052){ + wx.switchTab({ + url: '/pages/index/index', + }) } reject(err); } @@ -84,6 +88,10 @@ class HttpBasics { err.errMsg = '请求超时,请检查您的网络设置!' } else if (err.errMsg == 'request:fail ') { err.errMsg = '未检查到您的网络,请检查您的网络设置!' + } else if (err.code == 1052) { + wx.switchTab({ + url: '/pages/index/index', + }) } reject(err); }, diff --git a/utils/imgurl.js b/utils/imgurl.js index 8595f5e..3f266ea 100644 --- a/utils/imgurl.js +++ b/utils/imgurl.js @@ -337,7 +337,7 @@ module.exports = { 'name': '' }, 'icon004': { - 'url': baseUrl + 'icon004.png', + 'url': baseUrl + 'icon004.gif', 'name': '' } } \ No newline at end of file