Showing
5 changed files
with
36 additions
and
6 deletions
| @@ -21,6 +21,15 @@ Component({ | @@ -21,6 +21,15 @@ Component({ | ||
| 21 | * 组件的方法列表 | 21 | * 组件的方法列表 |
| 22 | */ | 22 | */ |
| 23 | methods: { | 23 | methods: { |
| 24 | - | 24 | + clickSeller(){ |
| 25 | + if(this.data.hasTopStatus) return; | ||
| 26 | + let seller_tel=this.data.order_info.seller_tel||this.data.order_info.phone | ||
| 27 | + if(typeof seller_tel=='string'){ | ||
| 28 | + seller_tel=seller_tel.split(',') | ||
| 29 | + } | ||
| 30 | + this.selectComponent('#as').show({ | ||
| 31 | + seller_tel:seller_tel, | ||
| 32 | + }); | ||
| 33 | + }, | ||
| 25 | } | 34 | } |
| 26 | }) | 35 | }) |
| 1 | <!--components/2.0/taocan/subject.wxml--> | 1 | <!--components/2.0/taocan/subject.wxml--> |
| 2 | <wxs src="../../../utils/util.wxs" module="util" /> | 2 | <wxs src="../../../utils/util.wxs" module="util" /> |
| 3 | <view class="view card padding-lr-lg padding-tb"> | 3 | <view class="view card padding-lr-lg padding-tb"> |
| 4 | - <view class="header view flex align-center"> | 4 | + <view class="header view flex align-center" bindtap="clickSeller"> |
| 5 | <view class="view avatar margin-right-sm" style="background-image: url('{{order_info.seller_image}}?imageView2/2/w/320')"></view> | 5 | <view class="view avatar margin-right-sm" style="background-image: url('{{order_info.seller_image}}?imageView2/2/w/320')"></view> |
| 6 | <view class="flex-treble"> | 6 | <view class="flex-treble"> |
| 7 | <view class="txt-32-h text-cut" style="margin-bottom: 2rpx;">{{order_info.sellername}}</view> | 7 | <view class="txt-32-h text-cut" style="margin-bottom: 2rpx;">{{order_info.sellername}}</view> |
| @@ -33,4 +33,5 @@ | @@ -33,4 +33,5 @@ | ||
| 33 | </view> | 33 | </view> |
| 34 | <slot></slot> | 34 | <slot></slot> |
| 35 | </view> | 35 | </view> |
| 36 | +<as-phone id="as"></as-phone> | ||
| 36 | 37 |
| @@ -81,12 +81,26 @@ Page({ | @@ -81,12 +81,26 @@ Page({ | ||
| 81 | onUnload: function () { | 81 | onUnload: function () { |
| 82 | 82 | ||
| 83 | }, | 83 | }, |
| 84 | + getLisType(){ | ||
| 85 | + if(this.tabType<5) return {type:this.tabType} | ||
| 86 | + //2=交易成功(待使用) 3=已使用 5=已退款 6=已过期 | ||
| 87 | + return {status:{5:2,6:3,7:6,8:5}[this.tabType]} | ||
| 88 | + }, | ||
| 89 | + getOffset(){ | ||
| 90 | + if(this.tabType<5) return this.offset | ||
| 91 | + let page=Math.ceil(this.offset/this.limit) | ||
| 92 | + return page<1?1:page | ||
| 93 | + }, | ||
| 84 | getListData() { | 94 | getListData() { |
| 85 | let tabType=this.tabType | 95 | let tabType=this.tabType |
| 86 | - App.Customer.GetMyOrder({ | ||
| 87 | - type: tabType, | 96 | + let lisFun=App.Customer.GetMyOrder |
| 97 | + if(tabType>4){ | ||
| 98 | + lisFun=App.Foodset.GetUserFoodOrders | ||
| 99 | + } | ||
| 100 | + lisFun({ | ||
| 101 | + ...this.getLisType(),//tabType, | ||
| 88 | openid: getApp().openid, | 102 | openid: getApp().openid, |
| 89 | - offset:this.offset, | 103 | + offset:this.getOffset(), |
| 90 | limit:this.limit, | 104 | limit:this.limit, |
| 91 | }).then(res => { | 105 | }).then(res => { |
| 92 | let resData=res.data||[] | 106 | let resData=res.data||[] |
| @@ -507,6 +507,10 @@ export default { | @@ -507,6 +507,10 @@ export default { | ||
| 507 | 'App.PayOnline.JsApiPay':{ | 507 | 'App.PayOnline.JsApiPay':{ |
| 508 | openid:'openid', | 508 | openid:'openid', |
| 509 | }, | 509 | }, |
| 510 | + //获取用户已购买的套餐信息 | ||
| 511 | + 'App.Foodset.GetUserFoodOrders':{ | ||
| 512 | + openid:'openid', | ||
| 513 | + }, | ||
| 510 | 514 | ||
| 511 | //根据账单ID获取账单详情 | 515 | //根据账单ID获取账单详情 |
| 512 | 'App.Foodset.GetFoodOrdersDetail':null, | 516 | 'App.Foodset.GetFoodOrdersDetail':null, |
-
Please register or login to post a comment