Showing
7 changed files
with
64 additions
and
48 deletions
| @@ -84,44 +84,36 @@ Page({ | @@ -84,44 +84,36 @@ Page({ | ||
| 84 | }, | 84 | }, |
| 85 | //申请退款 | 85 | //申请退款 |
| 86 | subscribeDrawback() { | 86 | subscribeDrawback() { |
| 87 | + if(this.data.checkName==''){ | ||
| 88 | + return wx.showToast({ | ||
| 89 | + title:'请选择退款原因', | ||
| 90 | + duration:2000, | ||
| 91 | + icon:'none' | ||
| 92 | + }) | ||
| 93 | + } | ||
| 87 | App.PayOnline.RechargeRefundApply({ | 94 | App.PayOnline.RechargeRefundApply({ |
| 88 | reason:this.data.checkName, | 95 | reason:this.data.checkName, |
| 89 | id:this.data.id, | 96 | id:this.data.id, |
| 90 | }).then(res=>{ | 97 | }).then(res=>{ |
| 91 | console.log(res); | 98 | console.log(res); |
| 99 | + if(res.ret=='200'){ | ||
| 100 | + this.modal.showModal() | ||
| 101 | + } | ||
| 102 | + }) | ||
| 103 | + }, | ||
| 104 | + // 退款后跳转我的券页面 | ||
| 105 | + closeModalFun(){ | ||
| 106 | + this.closeModal() | ||
| 107 | + wx.reLaunch({ | ||
| 108 | + url: '/pages/me/coupon_news' | ||
| 92 | }) | 109 | }) |
| 93 | - // this.modal.showModal() | ||
| 94 | - // wx.showModal({ | ||
| 95 | - // title: '申请成功', | ||
| 96 | - // cancelText:' ', | ||
| 97 | - // confirmText:'朕知道了', | ||
| 98 | - // content: '您的退款已经在办理中,预计3个工作日到账,请注意检查原支付渠道收款通知。您也可以从周到安排公众号了解详查看退款进度。谢谢您的支持!', | ||
| 99 | - // success: function (res) { | ||
| 100 | - // if (res.confirm) { //这里是点击了确定以后 | ||
| 101 | - // console.log('用户点击确定') | ||
| 102 | - // } else { //这里是点击了取消以后 | ||
| 103 | - // console.log('用户点击取消') | ||
| 104 | - // } | ||
| 105 | - // } | ||
| 106 | - // }) | ||
| 107 | }, | 110 | }, |
| 108 | // 选择退款原因 | 111 | // 选择退款原因 |
| 109 | radioChange(e) { | 112 | radioChange(e) { |
| 110 | - console.log('checkbox发生change事件,携带value值为:', e.detail.value) | ||
| 111 | - const radioboxList = this.data.radioboxList | ||
| 112 | - const values = e.detail.value | 113 | + console.log('checkbox发生change事件,携带value值为:', e.detail) |
| 113 | let checkName; | 114 | let checkName; |
| 114 | - for (let i = 0, lenI = radioboxList.length; i < lenI; ++i) { | ||
| 115 | - radioboxList[i].checked = false | ||
| 116 | - for (let j = 0, lenJ = values.length; j < lenJ; ++j) { | ||
| 117 | - if (radioboxList[i].value === values[j]) { | ||
| 118 | - radioboxList[i].checked = true; | ||
| 119 | - break | ||
| 120 | - } | ||
| 121 | - } | ||
| 122 | - } | 115 | + checkName=this.data.radioboxList[(e.detail.value*1)-1].name; |
| 123 | this.setData({ | 116 | this.setData({ |
| 124 | - radioboxList, | ||
| 125 | checkName | 117 | checkName |
| 126 | }) | 118 | }) |
| 127 | }, | 119 | }, |
| @@ -58,7 +58,7 @@ | @@ -58,7 +58,7 @@ | ||
| 58 | 您也可以从<text>周到安排</text>公众号了解详查看退款进度。谢谢您的支持! | 58 | 您也可以从<text>周到安排</text>公众号了解详查看退款进度。谢谢您的支持! |
| 59 | </view> | 59 | </view> |
| 60 | <view class="modalCloseBtns"> | 60 | <view class="modalCloseBtns"> |
| 61 | - <button class="modalClose" bindtap="closeModal">朕知道了</button> | 61 | + <button class="modalClose" bindtap="closeModalFun">朕知道了</button> |
| 62 | </view> | 62 | </view> |
| 63 | </view> | 63 | </view> |
| 64 | </my-modal> | 64 | </my-modal> |
| @@ -262,21 +262,33 @@ Page({ | @@ -262,21 +262,33 @@ Page({ | ||
| 262 | sid | 262 | sid |
| 263 | }).then(res => { | 263 | }).then(res => { |
| 264 | let data=res.data | 264 | let data=res.data |
| 265 | - let home,chef,marketing,reserve,signboard,store,homeColor,coupon_data,priceInfo,scoreInfo,recharge_list; | 265 | + console.log('data',data); |
| 266 | + let home,chef,marketing,reserve,signboard,store,homeColor,coupon_data,priceInfo,scoreInfo,recharge_list,stringifyUse; | ||
| 266 | chef = data.chef ? JSON.parse(data.chef) : ''; | 267 | chef = data.chef ? JSON.parse(data.chef) : ''; |
| 267 | reserve = data.reserve ? JSON.parse(data.reserve) : ''; | 268 | reserve = data.reserve ? JSON.parse(data.reserve) : ''; |
| 268 | marketing = data.marketing ? JSON.parse(data.marketing) : ''; | 269 | marketing = data.marketing ? JSON.parse(data.marketing) : ''; |
| 269 | signboard = data.signboard ? JSON.parse(data.signboard) : ''; | 270 | signboard = data.signboard ? JSON.parse(data.signboard) : ''; |
| 270 | store = data.store ? JSON.parse(data.store) : ''; | 271 | store = data.store ? JSON.parse(data.store) : ''; |
| 271 | home = data.home ? JSON.parse(data.home) : ''; | 272 | home = data.home ? JSON.parse(data.home) : ''; |
| 272 | - coupon_data=marketing.coupon_data; | ||
| 273 | - let stringifyUse=JSON.stringify(marketing.coupon_data.use) | 273 | + console.log('chef', chef); |
| 274 | + console.log('reserve', reserve); | ||
| 275 | + console.log('marketing', marketing); | ||
| 276 | + console.log('signboard', signboard); | ||
| 277 | + console.log('store', store); | ||
| 278 | + console.log('home', home); | ||
| 279 | + if(marketing.coupon_data){ | ||
| 280 | + coupon_data=marketing.coupon_data; | ||
| 281 | + stringifyUse=JSON.stringify(marketing.coupon_data.use) | ||
| 282 | + } | ||
| 283 | + console.log('coupon_data', coupon_data); | ||
| 284 | + console.log('stringifyUse', stringifyUse); | ||
| 274 | if(marketing.is_recharge=='1' && marketing.recharge_data){ | 285 | if(marketing.is_recharge=='1' && marketing.recharge_data){ |
| 275 | let recharge_data=marketing.recharge_data | 286 | let recharge_data=marketing.recharge_data |
| 276 | recharge_list=marketing.recharge_data.recharge_list | 287 | recharge_list=marketing.recharge_data.recharge_list |
| 277 | if(recharge_list.is_price=='1') priceInfo='会员充值满'+recharge_data.recharge_money+'元赠送'+recharge_list.price+'元余额'; | 288 | if(recharge_list.is_price=='1') priceInfo='会员充值满'+recharge_data.recharge_money+'元赠送'+recharge_list.price+'元余额'; |
| 278 | if(recharge_list.is_score=='1') scoreInfo='会员充值满'+recharge_data.recharge_money+'元赠送'+recharge_list.score+'积分'; | 289 | if(recharge_list.is_score=='1') scoreInfo='会员充值满'+recharge_data.recharge_money+'元赠送'+recharge_list.score+'积分'; |
| 279 | console.log('scoreInfo',scoreInfo); | 290 | console.log('scoreInfo',scoreInfo); |
| 291 | + console.log('priceInfo',priceInfo); | ||
| 280 | this.setData({ | 292 | this.setData({ |
| 281 | recharge_data:marketing.recharge_data | 293 | recharge_data:marketing.recharge_data |
| 282 | }) | 294 | }) |
| @@ -310,14 +322,6 @@ Page({ | @@ -310,14 +322,6 @@ Page({ | ||
| 310 | }else{ | 322 | }else{ |
| 311 | homeColor ='67,142,147,1' | 323 | homeColor ='67,142,147,1' |
| 312 | } | 324 | } |
| 313 | - console.log('coupon_data', coupon_data); | ||
| 314 | - console.log('stringifyUse', stringifyUse); | ||
| 315 | - console.log('chef', chef); | ||
| 316 | - console.log('reserve', reserve); | ||
| 317 | - console.log('signboard', signboard); | ||
| 318 | - console.log('home', home); | ||
| 319 | - console.log('store', store); | ||
| 320 | - console.log('marketing', marketing); | ||
| 321 | console.log('homeColor',homeColor); | 325 | console.log('homeColor',homeColor); |
| 322 | this.setData({ | 326 | this.setData({ |
| 323 | chef, | 327 | chef, |
| @@ -84,7 +84,7 @@ | @@ -84,7 +84,7 @@ | ||
| 84 | <view class="introduce" wx:if="{{store && store.style=='1'}}"> | 84 | <view class="introduce" wx:if="{{store && store.style=='1'}}"> |
| 85 | <view class="IntroductionItems" wx:for="{{store.images}}" wx:key="arryIndex" wx:for-index="arryIndex"> | 85 | <view class="IntroductionItems" wx:for="{{store.images}}" wx:key="arryIndex" wx:for-index="arryIndex"> |
| 86 | <view class="imgMask"> | 86 | <view class="imgMask"> |
| 87 | - <!-- <image src="{{item}}" mode="aspectFill" /> --> | 87 | + <image src="{{item}}" mode="aspectFill" /> |
| 88 | <view class="IntroduceColor chief Introducepublic {{theme+'chief'}}" wx:if="{{arryIndex=='0'}}"> | 88 | <view class="IntroduceColor chief Introducepublic {{theme+'chief'}}" wx:if="{{arryIndex=='0'}}"> |
| 89 | <view class="englishText">Introduce</view> | 89 | <view class="englishText">Introduce</view> |
| 90 | <view class="chefText">品牌介绍</view> | 90 | <view class="chefText">品牌介绍</view> |
| @@ -117,7 +117,7 @@ | @@ -117,7 +117,7 @@ | ||
| 117 | </text> | 117 | </text> |
| 118 | </view> | 118 | </view> |
| 119 | </view> | 119 | </view> |
| 120 | - <!-- <image src="{{item}}" mode="aspectFill"/> --> | 120 | + <image src="{{item}}" mode="aspectFill"/> |
| 121 | </view> | 121 | </view> |
| 122 | </view> | 122 | </view> |
| 123 | </view> | 123 | </view> |
| @@ -3,15 +3,26 @@ import App from '../../utils/api'; | @@ -3,15 +3,26 @@ import App from '../../utils/api'; | ||
| 3 | Page({ | 3 | Page({ |
| 4 | data: { | 4 | data: { |
| 5 | list:[], | 5 | list:[], |
| 6 | + status:1, | ||
| 6 | }, | 7 | }, |
| 8 | + page:1, | ||
| 9 | + size:10, | ||
| 10 | + hasMore:true, | ||
| 7 | onLoad() { | 11 | onLoad() { |
| 8 | this.init(); | 12 | this.init(); |
| 9 | this.getlist(); | 13 | this.getlist(); |
| 10 | }, | 14 | }, |
| 11 | getlist() { | 15 | getlist() { |
| 12 | - App.Activity.GetNewRechargeListByOpenid().then((res) => { | 16 | + App.Activity.GetNewRechargeListByOpenid({ |
| 17 | + page:this.page, | ||
| 18 | + size:this.size, | ||
| 19 | + }).then((res) => { | ||
| 13 | if (res.ret == 200) { | 20 | if (res.ret == 200) { |
| 14 | - let list=res.data; | 21 | + let list=this.data.list; |
| 22 | + list=list.concat(res.data) | ||
| 23 | + if(res.data.length<this.size){ | ||
| 24 | + this.hasMore=false | ||
| 25 | + } | ||
| 15 | let date=Date.now()*1; | 26 | let date=Date.now()*1; |
| 16 | list.forEach(item=>{ | 27 | list.forEach(item=>{ |
| 17 | if(date>item.etime){ | 28 | if(date>item.etime){ |
| @@ -21,7 +32,7 @@ Page({ | @@ -21,7 +32,7 @@ Page({ | ||
| 21 | } | 32 | } |
| 22 | }) | 33 | }) |
| 23 | this.setData({ | 34 | this.setData({ |
| 24 | - list: res.data | 35 | + list |
| 25 | }) | 36 | }) |
| 26 | 37 | ||
| 27 | } | 38 | } |
| @@ -67,5 +78,14 @@ Page({ | @@ -67,5 +78,14 @@ Page({ | ||
| 67 | wx.navigateTo({ | 78 | wx.navigateTo({ |
| 68 | url: './wananchi' | 79 | url: './wananchi' |
| 69 | }) | 80 | }) |
| 70 | - } | 81 | + }, |
| 82 | + /** | ||
| 83 | + * 页面上拉触底事件的处理函数 | ||
| 84 | + */ | ||
| 85 | + onReachBottom: function () { | ||
| 86 | + if(this.hasMore){ | ||
| 87 | + this.page+=1 | ||
| 88 | + this.todetail() | ||
| 89 | + } | ||
| 90 | + }, | ||
| 71 | }) | 91 | }) |
| 1 | <!--pages/taocan/coupon_news.wxml 用户端--我的--卡券--> | 1 | <!--pages/taocan/coupon_news.wxml 用户端--我的--卡券--> |
| 2 | <wxs src="../../utils/util.wxs" module="util" /> | 2 | <wxs src="../../utils/util.wxs" module="util" /> |
| 3 | <nav>卡券</nav> | 3 | <nav>卡券</nav> |
| 4 | -<scroll-view class="list" style="height:{{contentHeight}}px;padding-bottom: 140rpx;" scroll-y> | 4 | +<scroll-view class="list" style="height:{{contentHeight}}px;" scroll-y> |
| 5 | <block wx:if="{{list.length>0}}"> | 5 | <block wx:if="{{list.length>0}}"> |
| 6 | <view wx:for="{{list}}" class="card bg-white" bindtap="todetail" data-id="{{item.id}}" data-examine="{{item.is_examine}}" data-expire="{{item.is_expire}}" data-name="{{item.recharge_name}}" data-sid="{{item.sellerid}}"> | 6 | <view wx:for="{{list}}" class="card bg-white" bindtap="todetail" data-id="{{item.id}}" data-examine="{{item.is_examine}}" data-expire="{{item.is_expire}}" data-name="{{item.recharge_name}}" data-sid="{{item.sellerid}}"> |
| 7 | <view class="flex-vl gray-font card-main" style="justify-content:space-between;"> | 7 | <view class="flex-vl gray-font card-main" style="justify-content:space-between;"> |
| @@ -17,7 +17,7 @@ page { | @@ -17,7 +17,7 @@ page { | ||
| 17 | font-family: PingFang SC; | 17 | font-family: PingFang SC; |
| 18 | font-size: 66rpx; | 18 | font-size: 66rpx; |
| 19 | line-height: 52rpx; | 19 | line-height: 52rpx; |
| 20 | - padding: 140rpx 0 116rpx 0; | 20 | + padding: 12% 0 8% 0; |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | .qrcode { | 23 | .qrcode { |
| @@ -31,7 +31,7 @@ page { | @@ -31,7 +31,7 @@ page { | ||
| 31 | font-family: PingFang SC; | 31 | font-family: PingFang SC; |
| 32 | font-size: 26rpx; | 32 | font-size: 26rpx; |
| 33 | line-height: 53rpx; | 33 | line-height: 53rpx; |
| 34 | - padding: 30rpx 0 90rpx 0; | 34 | + padding: 6% 0 8% 0; |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | .text1 { | 37 | .text1 { |
-
Please register or login to post a comment