| @@ -1,10 +1,10 @@ | |||||
| var extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}; | var extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}; | ||||
| var appId = extConfig.appId; | var appId = extConfig.appId; | ||||
| var config = { | 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://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://10.100.33.69:7000/C/api', | |||||
| // url: 'http://202.165.179.86:4000/C/api', | // url: 'http://202.165.179.86:4000/C/api', | ||||
| api: { | api: { | ||||
| /** | /** | ||||
| @@ -127,7 +127,7 @@ Page({ | |||||
| console.log(tmpArr) | console.log(tmpArr) | ||||
| let lists = []; | let lists = []; | ||||
| tmpArr.map(file => { | tmpArr.map(file => { | ||||
| if (file.orderStatus != 0) { | |||||
| if (file.orderStatus != 1) { | |||||
| lists.push(file); | lists.push(file); | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -135,8 +135,10 @@ Page({ | |||||
| lists: lists | lists: lists | ||||
| }) | }) | ||||
| } | } | ||||
| wx.stopPullDownRefresh(); | |||||
| }) | }) | ||||
| .catch(err => { | .catch(err => { | ||||
| wx.stopPullDownRefresh(); | |||||
| wx.showToast({ | wx.showToast({ | ||||
| title: err.message, | title: err.message, | ||||
| icon: 'none', | icon: 'none', | ||||
| @@ -5,7 +5,7 @@ | |||||
| </view> | </view> | ||||
| <view class="list" hover-class="none" hover-stop-propagation="false"> | <view class="list" hover-class="none" hover-stop-propagation="false"> | ||||
| <view class="listitem clearfix" wx:for="{{lists}}" wx:key="{{index}}" hover-stop-propagation="false" data-couponId='{{item.couponId}}' data-id='{{item.id}}' bindtap='invite'> | <view class="listitem clearfix" wx:for="{{lists}}" wx:key="{{index}}" hover-stop-propagation="false" data-couponId='{{item.couponId}}' data-id='{{item.id}}' bindtap='invite'> | ||||
| <image class="fl" src="{{item.coverImg}}" mode="widthFix" lazy-load="true" binderror="" | |||||
| <image class="fl" src="{{item.coverImg}}" mode="aspectFill" lazy-load="true" binderror="" | |||||
| bindload=""></image> | bindload=""></image> | ||||
| <view class="fl ri" hover-class="none" hover-stop-propagation="false"> | <view class="fl ri" hover-class="none" hover-stop-propagation="false"> | ||||
| <text class="txt01">{{item.title}}</text> | <text class="txt01">{{item.title}}</text> | ||||
| @@ -15,13 +15,13 @@ | |||||
| </view> | </view> | ||||
| <view class="botton" hover-class="none" hover-stop-propagation="false">发起砍价</view> | <view class="botton" hover-class="none" hover-stop-propagation="false">发起砍价</view> | ||||
| </view> | </view> | ||||
| <view class="loading" wx:if="{{loading}}"><image src="{{loadingUrl}}" mode="widthFix"></image>{{content}}</view> | |||||
| <view class="loading" wx:if="{{loading}}"><image src="{{loadingUrl}}" mode="aspectFill"></image>{{content}}</view> | |||||
| <!-- <view class='loadingtext' wx:if="{{loadingtext}}">{{loadingtext}}</view> --> | <!-- <view class='loadingtext' wx:if="{{loadingtext}}">{{loadingtext}}</view> --> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view class="list mybargain" wx:if="{{mybargain}}" hover-class="none" hover-stop-propagation="false"> | <view class="list mybargain" wx:if="{{mybargain}}" hover-class="none" hover-stop-propagation="false"> | ||||
| <view class="listitem clearfix" wx:for="{{lists}}" wx:key="index" hover-stop-propagation="false"> | <view class="listitem clearfix" wx:for="{{lists}}" wx:key="index" hover-stop-propagation="false"> | ||||
| <image class="fl" src="{{item.coverImg}}" mode="widthFix" lazy-load="true"></image> | |||||
| <image class="fl" src="{{item.coverImg}}" mode="aspectFill" lazy-load="true"></image> | |||||
| <view class="fl ri" hover-class="none" hover-stop-propagation="false"> | <view class="fl ri" hover-class="none" hover-stop-propagation="false"> | ||||
| <text class="txt01">{{item.title}}</text> | <text class="txt01">{{item.title}}</text> | ||||
| <text class="txt02">{{item.subTitle}}</text> | <text class="txt02">{{item.subTitle}}</text> | ||||
| @@ -36,11 +36,7 @@ | |||||
| <view class="botton2" hover-class="none" hover-stop-propagation="false">立即支付</view> | <view class="botton2" hover-class="none" hover-stop-propagation="false">立即支付</view> | ||||
| <image class="icon" src="./../../assets/images/bargainsuccess.png" lazy-load="true"/> | <image class="icon" src="./../../assets/images/bargainsuccess.png" lazy-load="true"/> | ||||
| </view> | </view> | ||||
| <view class='again' wx:if="{{item.orderStatus == 1}}" data-id="{{item.id}}" bindtap="inviteFriend"> | |||||
| <!-- <view class="botton2" hover-class="none" hover-stop-propagation="false">立即支付</view> --> | |||||
| <image class="icon" style='margin-top:60rpx;' src="./../../assets/images/bargainsuccess.png" lazy-load="true"/> | |||||
| </view> | |||||
| <view class='again' wx:if="{{item.orderStatus == 8||item.orderStatus == 6&&todayDate>item.pressEndDate}}" data-couponChannelId="{{item.couponChannelId}}" data-couponId="{{item.productId}}" data-id="{{item.id}}" bindtap="barginAgain"> | |||||
| <view class='again' wx:if="{{item.orderStatus == 8||item.orderStatus == 6&&todayDate>item.pressEndDate}}" data-couponChannelId="{{item.couponChannelId}}" data-couponId="{{item.productId}}" data-id="{{item.id}}" bindtap="barginAgain"> | |||||
| <view class="botton3" hover-class="none" hover-stop-propagation="false">重新砍价</view> | <view class="botton3" hover-class="none" hover-stop-propagation="false">重新砍价</view> | ||||
| <image class="icon" src="./../../assets/images/bargainfail.png" lazy-load="true"/> | <image class="icon" src="./../../assets/images/bargainfail.png" lazy-load="true"/> | ||||
| </view> | </view> | ||||
| @@ -49,7 +45,7 @@ | |||||
| <image class="icon" style="margin-top:60rpx;" src="./../../assets/images/bargaincancel.png" lazy-load="true"/> | <image class="icon" style="margin-top:60rpx;" src="./../../assets/images/bargaincancel.png" lazy-load="true"/> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view class="loading" wx:if="{{loading}}"><image src="{{loadingUrl}}" mode="widthFix"></image>{{content}}</view> | |||||
| <view class="loading" wx:if="{{loading}}"><image src="{{loadingUrl}}" mode="aspectFill"></image>{{content}}</view> | |||||
| <!-- <view class='loadingtext' wx:if="{{loadingtext}}">{{loadingtext}}</view> --> | <!-- <view class='loadingtext' wx:if="{{loadingtext}}">{{loadingtext}}</view> --> | ||||
| </view> | </view> | ||||
| <view class='dingdan' wx:if="{{lists.length==0}}"> | <view class='dingdan' wx:if="{{lists.length==0}}"> | ||||
| @@ -18,7 +18,8 @@ Page({ | |||||
| showPage: false, | showPage: false, | ||||
| discountStatus:null, | discountStatus:null, | ||||
| disabled:false, | disabled:false, | ||||
| display:"block!important" | |||||
| display:"block!important", | |||||
| showButton: false | |||||
| }, | }, | ||||
| /** | /** | ||||
| @@ -47,6 +48,7 @@ Page({ | |||||
| var todayDate = new Date().getTime(); | var todayDate = new Date().getTime(); | ||||
| that.setData({ | that.setData({ | ||||
| todayDate: todayDate, | todayDate: todayDate, | ||||
| showButton:false | |||||
| }) | }) | ||||
| }, | }, | ||||
| /** | /** | ||||
| @@ -69,6 +71,8 @@ Page({ | |||||
| } | } | ||||
| }) | }) | ||||
| .then(res => { | .then(res => { | ||||
| console.log(res) | |||||
| console.log("--------------------------------status------------------------------------------") | |||||
| if (res.data.status == 1) { | if (res.data.status == 1) { | ||||
| that.setData({ | that.setData({ | ||||
| discountStatus: 1 | discountStatus: 1 | ||||
| @@ -135,6 +139,10 @@ Page({ | |||||
| file.createDate = diffTime(file.createDate) | file.createDate = diffTime(file.createDate) | ||||
| }) | }) | ||||
| that.countdown(res.data.pressEndDate); | that.countdown(res.data.pressEndDate); | ||||
| res.data.orderPressList.map(file=>{ | |||||
| compare(file.first); | |||||
| }) | |||||
| console.log(res.data.orderPressList.sort(compare('first'))) | |||||
| that.setData({ | that.setData({ | ||||
| data: res.data, | data: res.data, | ||||
| already: (res.data.price / 100 - res.data.salePrice / 100 - res.data.pressCurrentValue / 100).toFixed(2), | already: (res.data.price / 100 - res.data.salePrice / 100 - res.data.pressCurrentValue / 100).toFixed(2), | ||||
| @@ -251,12 +259,17 @@ Page({ | |||||
| */ | */ | ||||
| orderFunc(e) { | orderFunc(e) { | ||||
| var that = this; | var that = this; | ||||
| console.log(e) | |||||
| that.setData({ | |||||
| showButton:true | |||||
| }) | |||||
| Http.post({ | Http.post({ | ||||
| url: config.api.checkPhoneStatus, | url: config.api.checkPhoneStatus, | ||||
| data: {} | data: {} | ||||
| }) | }) | ||||
| .then(res => { | .then(res => { | ||||
| that.setData({ | |||||
| showButton: false | |||||
| }) | |||||
| if (typeof(res) != "undefined") { | if (typeof(res) != "undefined") { | ||||
| let orderId = "" + e.currentTarget.dataset.orderid; | let orderId = "" + e.currentTarget.dataset.orderid; | ||||
| that.setData({ | that.setData({ | ||||
| @@ -350,6 +363,9 @@ Page({ | |||||
| } | } | ||||
| }) | }) | ||||
| .catch(err => { | .catch(err => { | ||||
| that.setData({ | |||||
| showButton: true | |||||
| }) | |||||
| if (err.code == 2011) { | if (err.code == 2011) { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: "商户信息没找到", | title: "商户信息没找到", | ||||
| @@ -373,7 +389,7 @@ Page({ | |||||
| }); | }); | ||||
| } else if (err.code == 3001) { | } else if (err.code == 3001) { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: "领取达到上限", | |||||
| title: "超过限购条件", | |||||
| image: './../../../assets/images/fail.png', | image: './../../../assets/images/fail.png', | ||||
| duration: 2000, | duration: 2000, | ||||
| mask: false | mask: false | ||||
| @@ -440,6 +456,7 @@ Page({ | |||||
| * @param {朋友邀请砍价} e | * @param {朋友邀请砍价} e | ||||
| */ | */ | ||||
| barginAgain: function(e) { | barginAgain: function(e) { | ||||
| let that = this; | |||||
| let couponChannelId = e.currentTarget.dataset.couponchannelid; | let couponChannelId = e.currentTarget.dataset.couponchannelid; | ||||
| let couponId = e.currentTarget.dataset.couponid; | let couponId = e.currentTarget.dataset.couponid; | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| @@ -515,4 +532,11 @@ function diffTime(startDate) { | |||||
| }else{ | }else{ | ||||
| return '1秒' | return '1秒' | ||||
| } | } | ||||
| } | |||||
| } | |||||
| function compare(property) { | |||||
| return function (a, b) { | |||||
| var value1 = a[property]; | |||||
| var value2 = b[property]; | |||||
| return value2 - value1; | |||||
| } | |||||
| } | |||||
| @@ -1,7 +1,6 @@ | |||||
| <view class="bargainDetail" hover-class="none" hover-stop-propagation="false" wx:if="{{showPage}}"> | <view class="bargainDetail" hover-class="none" hover-stop-propagation="false" wx:if="{{showPage}}"> | ||||
| <view class="listitem clearfix" hover-class="none" hover-stop-propagation="false"> | <view class="listitem clearfix" hover-class="none" hover-stop-propagation="false"> | ||||
| <image class="fl" src="{{data.coverImg}}" lazy-load="true" binderror="" | |||||
| bindload=""></image> | |||||
| <image class="fl" src="{{data.coverImg}}" lazy-load="true" binderror="" bindload="" mode='aspectFill'></image> | |||||
| <view class="fl ri" hover-class="none" hover-stop-propagation="false"> | <view class="fl ri" hover-class="none" hover-stop-propagation="false"> | ||||
| <text class="txt01">{{data.title}}</text> | <text class="txt01">{{data.title}}</text> | ||||
| <text class="txt02">{{data.subTitle}}</text> | <text class="txt02">{{data.subTitle}}</text> | ||||
| @@ -19,7 +18,7 @@ | |||||
| 还剩 <text>{{hour}}</text>:<text>{{min}}</text>:<text>{{sec}}</text> 结束 | 还剩 <text>{{hour}}</text>:<text>{{min}}</text>:<text>{{sec}}</text> 结束 | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view class="fail" hover-class="none" hover-stop-propagation="false" wx:if="{{todayDate>data.pressEndDate && from=='discount'&& discountStatus !=1}}"> | |||||
| <view class="fail" hover-class="none" hover-stop-propagation="false" wx:if="{{todayDate>data.pressEndDate && discountStatus !=1}}"> | |||||
| 好友的砍价已过期 | 好友的砍价已过期 | ||||
| </view> | </view> | ||||
| <view class="fail" hover-class="none" hover-stop-propagation="false" wx:if="{{todayDate>data.pressEndDate && discountStatus ==1}}"> | <view class="fail" hover-class="none" hover-stop-propagation="false" wx:if="{{todayDate>data.pressEndDate && discountStatus ==1}}"> | ||||
| @@ -29,24 +28,29 @@ | |||||
| <button bindtap="barginAgain" data-couponChannelId="{{data.couponChannelId}}" data-couponId="{{data.productId}}" data-id="{{data.id}}">发起砍价</button> | <button bindtap="barginAgain" data-couponChannelId="{{data.couponChannelId}}" data-couponId="{{data.productId}}" data-id="{{data.id}}">发起砍价</button> | ||||
| <button bindtap="gotomore">更多砍价商品</button> | <button bindtap="gotomore">更多砍价商品</button> | ||||
| </view> | </view> | ||||
| <view class='help' wx:if="{{(data.pressLimitNum-data.orderPressList.length)!=0&&data.orderStatus != 7||(data.pressLimitNum-data.orderPressList.length)!=0&&data.orderStatus != 1}}">还需邀请<text>{{data.pressLimitNum-data.orderPressList.length}}</text>位好友,帮忙砍至底价</view> | |||||
| <view class="success" wx:if="{{data.orderStatus == 7||data.orderStatus == 1}}" hover-class="none" hover-stop-propagation="false"> | <view class="success" wx:if="{{data.orderStatus == 7||data.orderStatus == 1}}" hover-class="none" hover-stop-propagation="false"> | ||||
| <image src="./../../../assets/images/success01.png" mode="widthFix"></image> | <image src="./../../../assets/images/success01.png" mode="widthFix"></image> | ||||
| <text class="" selectable="false" space="false" decode="false"> | <text class="" selectable="false" space="false" decode="false"> | ||||
| 砍价成功 | |||||
| 已砍至底价 | |||||
| </text> | </text> | ||||
| </view> | </view> | ||||
| <view wx:if="{{data.orderStatus == 6&&discountStatus == 2}}"> | |||||
| <button bindtap='helpDiscount' class='helpDiscount'>帮好友砍价</button> | |||||
| <view class='helpDiscount' wx:if="{{data.orderStatus == 6&&discountStatus == 2}}"> | |||||
| <!-- <button bindtap='helpDiscount' class='helpDiscount'>帮好友砍价</button> --> | |||||
| <image bindtap='helpDiscount' src='./../../../assets/images/help.gif' mode='widthFix'></image> | |||||
| </view> | </view> | ||||
| <view class="people" hover-class="none" hover-stop-propagation="false"> | <view class="people" hover-class="none" hover-stop-propagation="false"> | ||||
| <view class='title'> | |||||
| 砍价人数{{data.orderPressList.length}}/{{data.pressLimitNum}}人 | |||||
| </view> | |||||
| <view class="clearfix person" wx:for="{{data.orderPressList}}" wx:key="index"> | <view class="clearfix person" wx:for="{{data.orderPressList}}" wx:key="index"> | ||||
| <view class="head fl"> | <view class="head fl"> | ||||
| <image class="headicon" src="{{item.avatarUrl}}" mode="widthFix" lazy-load="true" binderror="" bindload="" /> | <image class="headicon" src="{{item.avatarUrl}}" mode="widthFix" lazy-load="true" binderror="" bindload="" /> | ||||
| <text wx:if="{{item.first==1}}">发起人</text> | <text wx:if="{{item.first==1}}">发起人</text> | ||||
| </view> | </view> | ||||
| <view class="text fl clearfix"> | <view class="text fl clearfix"> | ||||
| <text class="text01 fl"><text>{{item.nickName}}</text>砍价成功!</text> | |||||
| <text class="text01 fl"><text>{{item.nickName}}</text></text> | |||||
| <text class="text02 fl"><text class="fl">砍掉</text><text class="fl">{{item.pressValue/100}}元</text></text> | <text class="text02 fl"><text class="fl">砍掉</text><text class="fl">{{item.pressValue/100}}元</text></text> | ||||
| <text class="text03 fr">{{item.createDate}}前</text> | <text class="text03 fr">{{item.createDate}}前</text> | ||||
| </view> | </view> | ||||
| @@ -54,10 +58,10 @@ | |||||
| </view> | </view> | ||||
| <view wx:if="{{data.orderStatus != 7&&discountStatus==1&&todayDate<=data.pressEndDate&&data.orderStatus!=1}}" class="btns clearfix" hover-class="none" hover-stop-propagation="false"> | <view wx:if="{{data.orderStatus != 7&&discountStatus==1&&todayDate<=data.pressEndDate&&data.orderStatus!=1}}" class="btns clearfix" hover-class="none" hover-stop-propagation="false"> | ||||
| <view class="fl" bindtap='orderFunc' data-orderId="{{data.id}}" data-price="{{data.price/100}}"> | |||||
| <button class="fl" bindtap='orderFunc' disabled='{{showButton}}' data-orderId="{{data.id}}" data-price="{{data.price/100}}"> | |||||
| <text>{{data.price/100}}元</text> | <text>{{data.price/100}}元</text> | ||||
| <text>立即购买</text> | <text>立即购买</text> | ||||
| </view> | |||||
| </button> | |||||
| <button class='share user-motto fr' data-orderId='{{data.id}}' id="shareBtn" open-type="share" hover-class="other-button-hover">邀请好友继续砍价</button> | <button class='share user-motto fr' data-orderId='{{data.id}}' id="shareBtn" open-type="share" hover-class="other-button-hover">邀请好友继续砍价</button> | ||||
| </view> | </view> | ||||
| <view style='display:{{display}}' wx:if="{{data.orderStatus == 7&&discountStatus == 1}}" class="btns01 clearfix" hover-class="none" hover-stop-propagation="false"> | <view style='display:{{display}}' wx:if="{{data.orderStatus == 7&&discountStatus == 1}}" class="btns01 clearfix" hover-class="none" hover-stop-propagation="false"> | ||||
| @@ -15,7 +15,26 @@ | |||||
| top: 12rpx; | top: 12rpx; | ||||
| right: 0; | 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 { | .listitem .ri { | ||||
| margin-left: 26rpx; | margin-left: 26rpx; | ||||
| width: 305rpx; | width: 305rpx; | ||||
| @@ -109,6 +128,7 @@ | |||||
| line-height: 40rpx; | line-height: 40rpx; | ||||
| background: rgba(51, 51, 51, 1); | background: rgba(51, 51, 51, 1); | ||||
| border-radius: 10rpx; | border-radius: 10rpx; | ||||
| margin: 0 4px; | |||||
| } | } | ||||
| .head{ | .head{ | ||||
| width:10%; | width:10%; | ||||
| @@ -140,9 +160,11 @@ | |||||
| font-size: 26rpx; | font-size: 26rpx; | ||||
| } | } | ||||
| .text01{ | .text01{ | ||||
| width: 220rpx; | |||||
| width: 100rpx; | |||||
| margin-right: 6rpx; | margin-right: 6rpx; | ||||
| overflow: hidden; | overflow: hidden; | ||||
| height: 76rpx; | |||||
| line-height: 76rpx; | |||||
| } | } | ||||
| .text01 text{ | .text01 text{ | ||||
| width: 100rpx; | width: 100rpx; | ||||
| @@ -155,14 +177,16 @@ | |||||
| } | } | ||||
| .text02{ | .text02{ | ||||
| display: inline-block; | display: inline-block; | ||||
| width: 140rpx; | |||||
| width: 220rpx; | |||||
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| .text03{ | .text03{ | ||||
| width: 212rpx; | |||||
| overflow: hidden; | |||||
| width: 240rpx; | |||||
| text-align: right; | text-align: right; | ||||
| font-size:24rpx; | font-size:24rpx; | ||||
| height: 76rpx; | |||||
| line-height: 76rpx; | |||||
| overflow: hidden; | |||||
| } | } | ||||
| .person{ | .person{ | ||||
| border-bottom: 1px solid #F9F9F9; | border-bottom: 1px solid #F9F9F9; | ||||
| @@ -178,8 +202,11 @@ | |||||
| text-align: left; | text-align: left; | ||||
| } | } | ||||
| .people{ | .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{ | .btns{ | ||||
| padding:33rpx; | padding:33rpx; | ||||
| @@ -224,11 +251,14 @@ | |||||
| font-size: 26rpx; | font-size: 26rpx; | ||||
| text-align: center; | text-align: center; | ||||
| line-height: 200rpx; | 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; | color: #fff!important; | ||||
| } | } | ||||
| .helpDiscount image{ | |||||
| display: block; | |||||
| width: 200rpx; | |||||
| height: 200rpx; | |||||
| } | |||||
| .helpDiscount::after{ border: none; } | .helpDiscount::after{ border: none; } | ||||
| .success{ | .success{ | ||||
| margin-top: 50rpx; | margin-top: 50rpx; | ||||
| @@ -363,7 +363,7 @@ Page({ | |||||
| }); | }); | ||||
| } else if (err.code == "3001") { | } else if (err.code == "3001") { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: "领取达到上限", | |||||
| title: "超过限购条件", | |||||
| image: imgurl.fail.url, | image: imgurl.fail.url, | ||||
| duration: 2000, | duration: 2000, | ||||
| mask: false | mask: false | ||||
| @@ -6,7 +6,7 @@ | |||||
| </i-tabs> | </i-tabs> | ||||
| <view class='cards clearfix'> | <view class='cards clearfix'> | ||||
| <view class="nocoupon" wx:if="{{list.length==0}}"> | <view class="nocoupon" wx:if="{{list.length==0}}"> | ||||
| <image src="{{couponUrl}}" mode="widthFix" lazy-load="true" /> | |||||
| <image src="{{couponUrl}}" mode="aspectFill" lazy-load="true" /> | |||||
| <text class="txt001">请您敬请期待</text> | <text class="txt001">请您敬请期待</text> | ||||
| <text class='txt002'>我们正在筹备一大波优惠活动</text> | <text class='txt002'>我们正在筹备一大波优惠活动</text> | ||||
| <navigator class='nav' url="/pages/index/index" open-type="switchTab" hover-class="other-navigator-hover"> | <navigator class='nav' url="/pages/index/index" open-type="switchTab" hover-class="other-navigator-hover"> | ||||
| @@ -41,17 +41,6 @@ Page({ | |||||
| data: {} | data: {} | ||||
| }) | }) | ||||
| .then(res=>{ | .then(res=>{ | ||||
| // if true 则开启特享礼遇 | |||||
| if (res.data.discountEnable) { | |||||
| that.setData({ | |||||
| discountEnable: true | |||||
| }) | |||||
| } | |||||
| else { | |||||
| that.setData({ | |||||
| discountEnable: false | |||||
| }) | |||||
| } | |||||
| that.setData({ | that.setData({ | ||||
| flags: 'have', | flags: 'have', | ||||
| rules: JSON.parse(res.data.score.rules).concat(JSON.parse(res.data.score.rules)[1].childs), | rules: JSON.parse(res.data.score.rules).concat(JSON.parse(res.data.score.rules)[1].childs), | ||||
| @@ -40,6 +40,6 @@ | |||||
| <image class='img' src='{{actUrl}}' mode='widthFix'></image> | <image class='img' src='{{actUrl}}' mode='widthFix'></image> | ||||
| <text class="txt">暂无配置信息</text> | <text class="txt">暂无配置信息</text> | ||||
| </view> | </view> | ||||
| <view class='growthbg' bindtap='gotospecialcourtesy' wx:if="{{discountEnable}}"> | |||||
| <view class='growthbg' bindtap='gotospecialcourtesy'> | |||||
| <image src='{{growthbgUrl}}' mode='widthFix'></image> | <image src='{{growthbgUrl}}' mode='widthFix'></image> | ||||
| </view> | </view> | ||||
| @@ -25,7 +25,6 @@ Page({ | |||||
| havePlayEd: app.globalData.havePlayEd, | havePlayEd: app.globalData.havePlayEd, | ||||
| staticGamedata: {}, | staticGamedata: {}, | ||||
| showIf: false, | showIf: false, | ||||
| discountEnable:false, | |||||
| page: 1 // 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 | page: 1 // 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 | ||||
| }, | }, | ||||
| gotodiscountCardList:function(){ | gotodiscountCardList:function(){ | ||||
| @@ -38,26 +37,6 @@ Page({ | |||||
| url: '/pages/rushToBuy/index', | 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) { | qrcode: function (e) { | ||||
| var that = this; | var that = this; | ||||
| that.setData({ | that.setData({ | ||||
| @@ -172,8 +151,7 @@ Page({ | |||||
| * 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||
| */ | */ | ||||
| onLoad: function (options) { | onLoad: function (options) { | ||||
| wx.setStorageSync('imgurl', imgurl) | |||||
| wx.setStorageSync('imgurl', imgurl) | |||||
| if (options.played == "true") { | if (options.played == "true") { | ||||
| this.setData({ | this.setData({ | ||||
| played: true | played: true | ||||
| @@ -319,7 +297,6 @@ Page({ | |||||
| } | } | ||||
| Http.setToken(res.data.token); | Http.setToken(res.data.token); | ||||
| that.checkUserCarStatus(); | that.checkUserCarStatus(); | ||||
| that.showSpecial(); | |||||
| that.getUserInfo(); | that.getUserInfo(); | ||||
| that.getBannerlist(); | that.getBannerlist(); | ||||
| if (app.couponChannelListCallback) { | if (app.couponChannelListCallback) { | ||||
| @@ -33,6 +33,6 @@ | |||||
| <view class="canvas-box"> | <view class="canvas-box"> | ||||
| <text class='memberIds' wx:if="{{levelName!='无'}}">{{levelName}}</text> | <text class='memberIds' wx:if="{{levelName!='无'}}">{{levelName}}</text> | ||||
| <canvas hidden="{{canvasHidden}}" style="width:500rpx;height:460rpx;background:0 0 0 .6;margin:-10rpx auto;overflow:hidden" canvas-id="mycanvas2" /> | <canvas hidden="{{canvasHidden}}" style="width:500rpx;height:460rpx;background:0 0 0 .6;margin:-10rpx auto;overflow:hidden" canvas-id="mycanvas2" /> | ||||
| <button class='button' bindtap='mySpecial' wx:if="{{discountEnable}}">特享礼遇</button> | |||||
| <button class='button' bindtap='mySpecial'>特享礼遇</button> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| @@ -57,13 +57,13 @@ Page({ | |||||
| if (key == 'all') { | if (key == 'all') { | ||||
| var variable = { | var variable = { | ||||
| pageNum: pageNum, | pageNum: pageNum, | ||||
| pageSize: 5, | |||||
| pageSize: 15, | |||||
| paymentType: 0 | paymentType: 0 | ||||
| }; | }; | ||||
| } else { | } else { | ||||
| var variable = { | var variable = { | ||||
| pageNum: pageNum, | pageNum: pageNum, | ||||
| pageSize: 5, | |||||
| pageSize: 15, | |||||
| orderStatus: key, | orderStatus: key, | ||||
| paymentType: 0 | paymentType: 0 | ||||
| }; | }; | ||||
| @@ -101,8 +101,17 @@ Page({ | |||||
| } | } | ||||
| var tmpArr = that.data.list; | var tmpArr = that.data.list; | ||||
| tmpArr.push.apply(tmpArr, res.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({ | that.setData({ | ||||
| list: tmpArr | |||||
| list: list | |||||
| }) | }) | ||||
| for (let i = 0; i < that.data.list.length; i++) { | 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"); | var createDate1 = util.formatTime(that.data.list[i].createDate, "yyyy-MM-dd hh:mm:ss"); | ||||
| @@ -125,7 +134,6 @@ Page({ | |||||
| }) | }) | ||||
| } | } | ||||
| else { | else { | ||||
| console.log("加载完成allow_load设置成false"); | |||||
| that.setData({ | that.setData({ | ||||
| loading: true, | loading: true, | ||||
| content: "——— 再拉裤子就掉了啦 ———" | content: "——— 再拉裤子就掉了啦 ———" | ||||
| @@ -14,6 +14,7 @@ Page({ | |||||
| cardList: [], | cardList: [], | ||||
| arrays: [], | arrays: [], | ||||
| showModel: false, | showModel: false, | ||||
| showInput:false, | |||||
| ids: "" | ids: "" | ||||
| }, | }, | ||||
| @@ -67,6 +68,7 @@ Page({ | |||||
| wx.hideLoading(); | wx.hideLoading(); | ||||
| that.setData({ | that.setData({ | ||||
| showModel: false, | showModel: false, | ||||
| showInput: false, | |||||
| cardid: that.data.cardids, | cardid: that.data.cardids, | ||||
| ids: "", | ids: "", | ||||
| remainingAmount: that.data.remainingAmounts | remainingAmount: that.data.remainingAmounts | ||||
| @@ -126,7 +128,8 @@ Page({ | |||||
| if (res.code == 200) { | if (res.code == 200) { | ||||
| wx.hideLoading(); | wx.hideLoading(); | ||||
| that.setData({ | that.setData({ | ||||
| showModel: false | |||||
| showModel: false, | |||||
| showInput: false | |||||
| }) | }) | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: `/pages/paySuccess/paySuccess?data=${JSON.stringify(res.data)}`, | 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)) { | } else if (that.data.inputValue != "" && Number(that.data.remainingAmount) < Number(that.data.inputValue)) { | ||||
| that.setData({ | that.setData({ | ||||
| showModel: true | |||||
| showModel: true, | |||||
| showInput:'disabled' | |||||
| }) | }) | ||||
| that.getList(); | that.getList(); | ||||
| console.log("1111") | console.log("1111") | ||||
| @@ -191,7 +195,8 @@ Page({ | |||||
| url: '/pages/discountCardList/discountCardList' | url: '/pages/discountCardList/discountCardList' | ||||
| }) | }) | ||||
| this.setData({ | this.setData({ | ||||
| showModel: false | |||||
| showModel: false, | |||||
| showInput: false | |||||
| }) | }) | ||||
| }, | }, | ||||
| getList() { | getList() { | ||||
| @@ -239,6 +244,7 @@ Page({ | |||||
| showModel: function() { | showModel: function() { | ||||
| this.setData({ | this.setData({ | ||||
| showModel: false, | showModel: false, | ||||
| showInput: false, | |||||
| cardid: this.data.cardids, | cardid: this.data.cardids, | ||||
| ids: "", | ids: "", | ||||
| remainingAmount: this.data.remainingAmounts | remainingAmount: this.data.remainingAmounts | ||||
| @@ -6,7 +6,7 @@ | |||||
| <text class='txt1'>金额</text> | <text class='txt1'>金额</text> | ||||
| <view class='money'> | <view class='money'> | ||||
| <text class='icon'>¥</text> | <text class='icon'>¥</text> | ||||
| <input bindinput="bindKeyInput" class='num' type="digit" focus placeholder="" /> | |||||
| <input bindinput="bindKeyInput" disabled='{{showInput}}' class='num' type="digit" focus placeholder="" /> | |||||
| <button bindtap='startAuth' hover-class='active'>确认付款</button> | <button bindtap='startAuth' hover-class='active'>确认付款</button> | ||||
| </view> | </view> | ||||
| <view class='model' wx:if="{{showModel}}"> | <view class='model' wx:if="{{showModel}}"> | ||||
| @@ -2,7 +2,7 @@ | |||||
| <image src="{{myspeacialUrl}}" mode='widthFix'></image> | <image src="{{myspeacialUrl}}" mode='widthFix'></image> | ||||
| </view> | </view> | ||||
| <view class='con'> | <view class='con'> | ||||
| <view class="title">以下为商城<text class='level'>{{level}}</text>对应门店的优惠折扣</view> | |||||
| <view class="title">会员等级为<text class='level'>[{{level}}]</text>对应门店的优惠折扣</view> | |||||
| </view> | </view> | ||||
| <view class='cards clearfix'> | <view class='cards clearfix'> | ||||
| <view class='card' wx:for="{{discountMerchantList}}" wx:key="{{index}}" wx:if="{{discountMerchantList.length>0}}"> | <view class='card' wx:for="{{discountMerchantList}}" wx:key="{{index}}" wx:if="{{discountMerchantList.length>0}}"> | ||||
| @@ -22,6 +22,6 @@ | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view class='none' wx:if="{{discountMerchantList.length==0}}"> | <view class='none' wx:if="{{discountMerchantList.length==0}}"> | ||||
| 暂无数据 | |||||
| 此等级暂未开放折扣 | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| @@ -5,7 +5,7 @@ Page{ | |||||
| font-size: 28rpx; | font-size: 28rpx; | ||||
| text-align: center; | text-align: center; | ||||
| margin-top: 30rpx; | margin-top: 30rpx; | ||||
| color: #000; | |||||
| color: #fff; | |||||
| float:none!important; | float:none!important; | ||||
| } | } | ||||
| .headerbg image{ | .headerbg image{ | ||||
| @@ -164,24 +164,6 @@ Page({ | |||||
| }) | }) | ||||
| //暂时注释 | //暂时注释 | ||||
| // that.getrun(); | // 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(){ | hideQrcode:function(){ | ||||
| let that = this; | let that = this; | ||||
| @@ -63,7 +63,7 @@ | |||||
| </view> | </view> | ||||
| </navigator> | </navigator> | ||||
| <!-- 当商场开启使用折扣按钮的时候, --> | <!-- 当商场开启使用折扣按钮的时候, --> | ||||
| <navigator url="/pages/specialcourtesy/specialcourtesy" wx:if="{{discountEnable}}"> | |||||
| <navigator url="/pages/specialcourtesy/specialcourtesy"> | |||||
| <view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
| <view> | <view> | ||||
| <image class='icons' src="{{giftUrl}}" mode='widthFix'></image>特享礼遇</view> | <image class='icons' src="{{giftUrl}}" mode='widthFix'></image>特享礼遇</view> | ||||
| @@ -76,7 +76,7 @@ | |||||
| <view class="margin"></view> | <view class="margin"></view> | ||||
| <!-- <button bindtap="navigateTo" class="user-out-btn">退出登陆</button> --> | <!-- <button bindtap="navigateTo" class="user-out-btn">退出登陆</button> --> | ||||
| <view bindlongtap='showVersion' class='version'> | <view bindlongtap='showVersion' class='version'> | ||||
| <view wx:if="{{flag=='show'}}">版本号:3.3.2</view> | |||||
| <view wx:if="{{flag=='show'}}">版本号:3.3.3</view> | |||||
| <view wx:if="{{flag=='hidden'}}"></view> | <view wx:if="{{flag=='hidden'}}"></view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| @@ -52,6 +52,10 @@ class HttpBasics { | |||||
| err.errMsg = '请求超时,请检查您的网络设置!' | err.errMsg = '请求超时,请检查您的网络设置!' | ||||
| } else if (err.errMsg == 'request:fail '){ | } else if (err.errMsg == 'request:fail '){ | ||||
| err.errMsg = '未检查到您的网络,请检查您的网络设置!' | err.errMsg = '未检查到您的网络,请检查您的网络设置!' | ||||
| } else if (err.code == 1052){ | |||||
| wx.switchTab({ | |||||
| url: '/pages/index/index', | |||||
| }) | |||||
| } | } | ||||
| reject(err); | reject(err); | ||||
| } | } | ||||
| @@ -84,6 +88,10 @@ class HttpBasics { | |||||
| err.errMsg = '请求超时,请检查您的网络设置!' | err.errMsg = '请求超时,请检查您的网络设置!' | ||||
| } else if (err.errMsg == 'request:fail ') { | } else if (err.errMsg == 'request:fail ') { | ||||
| err.errMsg = '未检查到您的网络,请检查您的网络设置!' | err.errMsg = '未检查到您的网络,请检查您的网络设置!' | ||||
| } else if (err.code == 1052) { | |||||
| wx.switchTab({ | |||||
| url: '/pages/index/index', | |||||
| }) | |||||
| } | } | ||||
| reject(err); | reject(err); | ||||
| }, | }, | ||||
| @@ -337,7 +337,7 @@ module.exports = { | |||||
| 'name': '' | 'name': '' | ||||
| }, | }, | ||||
| 'icon004': { | 'icon004': { | ||||
| 'url': baseUrl + 'icon004.png', | |||||
| 'url': baseUrl + 'icon004.gif', | |||||
| 'name': '' | 'name': '' | ||||
| } | } | ||||
| } | } | ||||