Commit 066572abc23b17c55845382eb4a321bd9c457595

Authored by liuxuqinfhp1220
2 parents 999a2a6f eabe276e

Merge branch 'master' of http://123.56.79.57/xt/xcx-book

# By vking
# Via vking
* 'master' of http://123.56.79.57/xt/xcx-book:
  share blur
  推荐商家
  推荐商家
  推荐商家
  推荐商家
  推荐商家
@@ -40,19 +40,7 @@ Page({ @@ -40,19 +40,7 @@ Page({
40 * 生命周期函数--监听页面显示 40 * 生命周期函数--监听页面显示
41 */ 41 */
42 onShow: function () { 42 onShow: function () {
43 - App.Reserve.Detail({  
44 - openid: getApp().openid,  
45 - rid: this.id  
46 - }).then(res => {  
47 - let detail=this.formatDatail(res.data)  
48 - this.setData({  
49 - detail: detail,  
50 - hasOnlineReserve:res.data.type==1,  
51 - })  
52 - if(detail.type==1 && detail.status==6){  
53 - this.GetRecommendSellerList(detail.seller.id)  
54 - }  
55 - }) 43 + this.selectComponent('#getpos').getPos();
56 }, 44 },
57 45
58 /** 46 /**
@@ -185,9 +173,14 @@ Page({ @@ -185,9 +173,14 @@ Page({
185 console.log(e) 173 console.log(e)
186 }, 174 },
187 GetRecommendSellerList(sid){ 175 GetRecommendSellerList(sid){
188 - App.Customer.GetRecommendSellerList({ 176 + let param={
189 sid:sid, 177 sid:sid,
190 - }).then(res=>{ 178 + }
  179 + if(this.location){
  180 + param.lat=this.location.latitude
  181 + param.lng=this.location.longitude
  182 + }
  183 + App.Customer.GetRecommendSellerList(param).then(res=>{
191 this.setData({ 184 this.setData({
192 rsl:res.data 185 rsl:res.data
193 }) 186 })
@@ -209,4 +202,29 @@ Page({ @@ -209,4 +202,29 @@ Page({
209 } 202 }
210 } 203 }
211 }, 204 },
  205 + location:null,
  206 + onpos(e){
  207 + console.log('onpos',e);
  208 + this.location=e.detail
  209 + App.Reserve.Detail({
  210 + openid: getApp().openid,
  211 + rid: this.id
  212 + }).then(res => {
  213 + let detail=this.formatDatail(res.data)
  214 + this.setData({
  215 + detail: detail,
  216 + hasOnlineReserve:res.data.type==1,
  217 + })
  218 + if(detail.type==1 && detail.status==6){
  219 + this.GetRecommendSellerList(detail.seller.id)
  220 + }
  221 + })
  222 + },
  223 + gotoSellerDetail(e){
  224 + console.log(e)
  225 + let url='/pages/reserve/detail?id='+e.currentTarget.id
  226 + wx.navigateTo({
  227 + url:url,
  228 + })
  229 + },
212 }) 230 })
@@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
10 "card":"/components/seller-card/seller-card", 10 "card":"/components/seller-card/seller-card",
11 "formids":"/components/formids/formids", 11 "formids":"/components/formids/formids",
12 "sb-tr":"/components/reserve/seller-box-transverse/seller-box", 12 "sb-tr":"/components/reserve/seller-box-transverse/seller-box",
  13 + "getpos":"/components/userinfo/getpos",
13 "as":"/components/actionSheet/index" 14 "as":"/components/actionSheet/index"
14 } 15 }
15 } 16 }
@@ -2,7 +2,14 @@ @@ -2,7 +2,14 @@
2 <nav hasHome>订座详情</nav> 2 <nav hasHome>订座详情</nav>
3 <view class="page"> 3 <view class="page">
4 <view class="flex-vc success"> 4 <view class="flex-vc success">
5 - <block wx:if="{{detail.hasCancel}}"> 5 + <block wx:if="{{detail.hasRunning}}">
  6 + <view class="icon">
  7 + <icon type="success" size="47" color="#C8B16D"/>
  8 + </view>
  9 + <view class="title Medium">订座成功</view>
  10 + <view class="info">分享订座信息给朋友,及时获知朋友们的反馈</view>
  11 + </block>
  12 + <block wx:elif="{{detail.hasCancel}}">
6 <view class="icon"> 13 <view class="icon">
7 <icon type="info" size="47" color="#C9C9C9"/> 14 <icon type="info" size="47" color="#C9C9C9"/>
8 </view> 15 </view>
@@ -26,18 +33,11 @@ @@ -26,18 +33,11 @@
26 <view class="icon"> 33 <view class="icon">
27 <icon type="warn" size="47" color="#999999"/> 34 <icon type="warn" size="47" color="#999999"/>
28 </view> 35 </view>
29 - <view class="title Medium">{{detail.cancel.desc||'包间已订满'}}</view>  
30 - </block>  
31 - <block wx:else="">  
32 - <view class="icon">  
33 - <icon type="success" size="47" color="#C8B16D"/>  
34 - </view>  
35 - <view class="title Medium">订座成功</view>  
36 - <view class="info">分享订座信息给朋友,及时获知朋友们的反馈</view> 36 + <view class="title Medium" style="font-size: 36rpx;">抱歉!</view>
  37 + <view class="info Medium" style="font-size: 36rpx;color: #353535;">您相中的餐厅包间已经订满</view>
37 </block> 38 </block>
38 </block> 39 </block>
39 </view> 40 </view>
40 -  
41 <block wx:if="{{detail.hasRunning}}"> 41 <block wx:if="{{detail.hasRunning}}">
42 <view class="flex-lr share-view" wx:if="{{detail.type==1}}"> 42 <view class="flex-lr share-view" wx:if="{{detail.type==1}}">
43 <formids url="/pages/customer/detail_owner_invitation?id={{detail.id}}&hasInvitation=1&hasSellerShare=1&tplid=1" 43 <formids url="/pages/customer/detail_owner_invitation?id={{detail.id}}&hasInvitation=1&hasSellerShare=1&tplid=1"
@@ -86,7 +86,7 @@ @@ -86,7 +86,7 @@
86 <view>预订人</view> 86 <view>预订人</view>
87 <view class="detail-info-right">{{detail.rname}}</view> 87 <view class="detail-info-right">{{detail.rname}}</view>
88 </view> 88 </view>
89 - <view class="flex-lr" style="margin-top: 43rpx;"> 89 + <view class="flex-lr" style="margin-top: 43rpx;" wx:if="{{detail.type!=1}}">
90 <view>用餐人数</view> 90 <view>用餐人数</view>
91 <view class="detail-info-right">{{detail.pnum||detail.pnum_str}}人</view> 91 <view class="detail-info-right">{{detail.pnum||detail.pnum_str}}人</view>
92 </view> 92 </view>
@@ -103,18 +103,20 @@ @@ -103,18 +103,20 @@
103 <view class="detail-info-right">{{detail.cusdem}}</view> 103 <view class="detail-info-right">{{detail.cusdem}}</view>
104 </view> 104 </view>
105 </view> 105 </view>
106 - <view class="hr" style="margin-top: 52rpx;margin-bottom: 48rpx;"></view>  
107 - <formids url="./detail_owner_part?id={{detail.id}}" hover-class="navigator-hover" wx:if="{{detail.customers.length>0}}">  
108 - <view class="flex-lr customers_view">  
109 - <view class="customers flex-ll">  
110 - <block wx:for="{{detail.customers}}" wx:key="detail.customers.key">  
111 - <image src="{{item.headimgurl}}" class="avatar" mode="aspectFill" wx:if="{{index<3}}"></image>  
112 - </block>  
113 - <view style="margin-left: 12rpx;">等{{detail.customers.length}}人已参加</view> 106 + <block wx:if="{{detail.customers.length>1}}">
  107 + <view class="hr" style="margin-top: 52rpx;margin-bottom: 48rpx;"></view>
  108 + <formids url="./detail_owner_part?id={{detail.id}}" hover-class="navigator-hover" wx:if="{{detail.customers.length>0}}">
  109 + <view class="flex-lr customers_view">
  110 + <view class="customers flex-ll">
  111 + <block wx:for="{{detail.customers}}" wx:key="detail.customers.key">
  112 + <image src="{{item.headimgurl}}" class="avatar" mode="aspectFill" wx:if="{{index<3}}"></image>
  113 + </block>
  114 + <view style="margin-left: 12rpx;">等{{detail.customers.length}}人已参加</view>
  115 + </view>
  116 + <image src="http://qn.colorcun.com/custom/lite-yd/image/click.png" class="more"></image>
114 </view> 117 </view>
115 - <image src="http://qn.colorcun.com/custom/lite-yd/image/click.png" class="more"></image>  
116 - </view>  
117 - </formids> 118 + </formids>
  119 + </block>
118 <view class="detail-info Medium tuiding"> 120 <view class="detail-info Medium tuiding">
119 <view class="flex-rr"> 121 <view class="flex-rr">
120 <view class="item" bindtap="callSeller">联系商家</view> 122 <view class="item" bindtap="callSeller">联系商家</view>
@@ -130,8 +132,8 @@ @@ -130,8 +132,8 @@
130 previous-margin="{{15}}px" next-margin="{{15}}px" style="height: 350rpx;" 132 previous-margin="{{15}}px" next-margin="{{15}}px" style="height: 350rpx;"
131 current="{{current}}" bindchange="bindtransition" bindanimationfinish="bindtransition"> 133 current="{{current}}" bindchange="bindtransition" bindanimationfinish="bindtransition">
132 <block wx:for="{{rsl}}" wx:key="rsl.key"> 134 <block wx:for="{{rsl}}" wx:key="rsl.key">
133 - <swiper-item bindtap="gotoDetail" data-sid="{{id}}">  
134 - <view class="seller" id="seller-{{id}}"> 135 + <swiper-item bindtap="gotoSellerDetail" id="{{item.id}}">
  136 + <view class="seller" id="seller-{{item.id}}">
135 <sb-tr seller="{{item}}" 137 <sb-tr seller="{{item}}"
136 hasActivityTags="{{false}}" 138 hasActivityTags="{{false}}"
137 hasActivityShort="{{true}}" 139 hasActivityShort="{{true}}"
@@ -146,4 +148,5 @@ @@ -146,4 +148,5 @@
146 <view style="height: 50rpx;"></view> 148 <view style="height: 50rpx;"></view>
147 </view> 149 </view>
148 <manager manager="{{detail}}" id="manager"></manager> 150 <manager manager="{{detail}}" id="manager"></manager>
149 -<as id="as" items="{{detail.seller.seller_tel}}" bindclick="callSellerPhone">拨打电话</as>  
  151 +<as id="as" items="{{detail.seller.seller_tel}}" bindclick="callSellerPhone">拨打电话</as>
  152 +<getpos bindpos="onpos" id="getpos" hasAllowFail></getpos>
@@ -107,7 +107,6 @@ @@ -107,7 +107,6 @@
107 .customers_view{ 107 .customers_view{
108 height: 60rpx; 108 height: 60rpx;
109 line-height: 60rpx; 109 line-height: 60rpx;
110 - margin-bottom: 54rpx;  
111 font-size: 26rpx; 110 font-size: 26rpx;
112 color: #999999; 111 color: #999999;
113 } 112 }
@@ -128,6 +127,7 @@ @@ -128,6 +127,7 @@
128 } 127 }
129 .tuiding{ 128 .tuiding{
130 font-size: 30rpx; 129 font-size: 30rpx;
  130 + margin-top: 54rpx;
131 } 131 }
132 .tuiding .item{ 132 .tuiding .item{
133 margin-left: 40rpx; 133 margin-left: 40rpx;
@@ -13,9 +13,10 @@ Page({ @@ -13,9 +13,10 @@ Page({
13 total: 0, 13 total: 0,
14 tabType:1, 14 tabType:1,
15 hasMore:true, 15 hasMore:true,
  16 + rsl:[],//推荐商家
16 }, 17 },
17 tabType:1, 18 tabType:1,
18 - offset:1, 19 + offset:0,
19 limit:10, 20 limit:10,
20 hasMore:true, 21 hasMore:true,
21 /** 22 /**
@@ -36,7 +37,7 @@ Page({ @@ -36,7 +37,7 @@ Page({
36 * 生命周期函数--监听页面显示 37 * 生命周期函数--监听页面显示
37 */ 38 */
38 onShow: function () { 39 onShow: function () {
39 - this.getListData(); 40 + this.selectComponent('#getpos').getPos();
40 }, 41 },
41 42
42 /** 43 /**
@@ -53,49 +54,41 @@ Page({ @@ -53,49 +54,41 @@ Page({
53 54
54 }, 55 },
55 getListData() { 56 getListData() {
56 - App.Reserve.GetListFromScheAndRes({  
57 - flag: 1, 57 + App.Customer.GetMyOrder({
58 type: this.tabType, 58 type: this.tabType,
59 openid: getApp().openid, 59 openid: getApp().openid,
60 offset:this.offset, 60 offset:this.offset,
61 limit:this.limit, 61 limit:this.limit,
62 }).then(res => { 62 }).then(res => {
63 - let total = res.data.success.length 63 + let total = res.data.length
64 let data = this.formatList(res.data); 64 let data = this.formatList(res.data);
65 -  
66 - this.hasMore=data.success.length>=this.limit 65 + this.hasMore=res.data.length>=this.limit
67 if(this.hasMore){ 66 if(this.hasMore){
68 this.offset+=this.limit 67 this.offset+=this.limit
69 } 68 }
70 this.setData({ 69 this.setData({
71 - list: data.success, 70 + list: this.data.list.concat(data),
72 hasMore:this.hasMore 71 hasMore:this.hasMore
73 }) 72 })
  73 + if(res.data.length==0){
  74 + this.GetRecommendSellerLists()
  75 + }
74 }) 76 })
75 }, 77 },
76 - _formatList(list) {  
77 - if (!list) return {};  
78 - let dlist = {};  
79 - if (list.length > 0) {  
80 - let openid = getApp().openid;  
81 - list.forEach(row => {  
82 - row.rdateStr = util.unixtoTime(row.ddate, 'MM月DD日 WW HH:II');  
83 - row.navigator = row.openid == openid ? 'detail_owner' : 'detail_customer';  
84 - let d = util.unixtoTime(row.rdate, 'MM月DD日 DAY 星期WW');  
85 - typeof dlist[d] == 'undefined' ? dlist[d] = [] : '';  
86 - dlist[d].push(row);  
87 - })  
88 - } 78 + formatList(list) {
  79 + if (list.length<1) return [];
  80 + let dlist = [];
  81 + let openid = getApp().openid;
  82 + list.forEach(row => {
  83 + row.rdateStr = util.unixtoTime(row.ddate, 'MM月DD日 WW HH:II');
  84 + row.navigator = row.openid == openid ? 'detail_owner' : 'detail_customer';
  85 + dlist.push(row);
  86 + })
89 return dlist; 87 return dlist;
90 }, 88 },
91 - formatList(res) {  
92 - res.success = this._formatList(res.success);  
93 - res.padding = this._formatList(res.padding);  
94 - return res;  
95 - },  
96 switchTab(e) { 89 switchTab(e) {
97 this.setData({ 90 this.setData({
98 - tabFlag: util.attr(e, 'index') 91 + tabFlag: util.attr(e, 'index'),
99 }) 92 })
100 this.getListData(); 93 this.getListData();
101 }, 94 },
@@ -121,10 +114,21 @@ Page({ @@ -121,10 +114,21 @@ Page({
121 url:url, 114 url:url,
122 }) 115 })
123 }, 116 },
  117 + gotoSellerDetail(e){
  118 + console.log(e)
  119 + let url='/pages/reserve/detail?id='+e.currentTarget.id
  120 + wx.navigateTo({
  121 + url:url,
  122 + })
  123 + },
124 switchType(e){ 124 switchType(e){
  125 + this.hasRecommend=true
  126 + this.offset=0
125 this.tabType=util.attr(e,'type') 127 this.tabType=util.attr(e,'type')
126 this.setData({ 128 this.setData({
127 tabType:this.tabType, 129 tabType:this.tabType,
  130 + list: [],
  131 + hasMore:false
128 }) 132 })
129 this.getListData() 133 this.getListData()
130 }, 134 },
@@ -137,4 +141,43 @@ Page({ @@ -137,4 +141,43 @@ Page({
137 this.getListData(); 141 this.getListData();
138 } 142 }
139 }, 143 },
  144 + hasRecommend:true,
  145 + GetRecommendSellerLists(){
  146 + if(!this.hasRecommend) return
  147 + let param={}
  148 + if(this.location){
  149 + param={
  150 + lat:this.location.latitude,
  151 + lng:this.location.longitude
  152 + }
  153 + }
  154 + App.Customer.GetRecommendSellerLists(param).then(res=>{
  155 + this.setData({
  156 + rsl:res.data
  157 + })
  158 + })
  159 + },
  160 + hasGoto:false,
  161 + bindtransition(e){
  162 + console.log(e)
  163 + if('change'==e.type){
  164 + this.hasGoto=false
  165 + }
  166 + if('animationfinish'==e.type){
  167 + if(this.hasGoto && (e.detail.current+1)==this.data.rsl.length){
  168 + wx.switchTab({
  169 + url: '/pages/reserve/index'
  170 + })
  171 + return;
  172 + }else{
  173 + this.hasGoto=true
  174 + }
  175 + }
  176 + },
  177 + location:null,
  178 + onpos(e){
  179 + console.log('onpos',e);
  180 + this.location=e.detail
  181 + this.getListData();
  182 + },
140 }) 183 })
@@ -6,6 +6,8 @@ @@ -6,6 +6,8 @@
6 "userinfo": "/components/userinfo/userinfo", 6 "userinfo": "/components/userinfo/userinfo",
7 "formids":"/components/formids/formids", 7 "formids":"/components/formids/formids",
8 "nav":"/components/nav/nav", 8 "nav":"/components/nav/nav",
  9 + "sb-tr":"/components/reserve/seller-box-transverse/seller-box",
  10 + "getpos":"/components/userinfo/getpos",
9 "card":"/components/seller-card/seller-card" 11 "card":"/components/seller-card/seller-card"
10 } 12 }
11 } 13 }
@@ -9,21 +9,40 @@ @@ -9,21 +9,40 @@
9 <view class="page"> 9 <view class="page">
10 <block wx:if="{{list.length==0}}"> 10 <block wx:if="{{list.length==0}}">
11 <view class="flex-vc empry"> 11 <view class="flex-vc empry">
12 - <image src="http://qn.colorcun.com/custom/lite/image/empty-order.png"></image>  
13 - <view class="Medium">暂无订座</view> 12 + <image src="http://qn.colorcun.com/reserve/images/order-empty.png"></image>
  13 + <view class="Medium">暂无订单</view>
14 </view> 14 </view>
  15 + <block wx:if="{{rsl.length>0}}">
  16 + <view class="line-push">为你推荐</view>
  17 + <view class="transverse-list">
  18 + <swiper
  19 + indicator-dots="{{false}}" autoplay="{{false}}" circular="{{false}}" vertical="{{false}}"
  20 + interval="2000" duration="500"
  21 + previous-margin="{{15}}px" next-margin="{{15}}px" style="height: 350rpx;"
  22 + current="{{current}}" bindchange="bindtransition" bindanimationfinish="bindtransition">
  23 + <block wx:for="{{rsl}}" wx:key="rsl.key">
  24 + <swiper-item bindtap="gotoSellerDetail" id="{{item.id}}">
  25 + <view class="seller" id="seller-{{item.id}}">
  26 + <sb-tr seller="{{item}}"
  27 + hasActivityTags="{{false}}"
  28 + hasActivityShort="{{true}}"
  29 + hasBrand="true" hasActivityTese="true"
  30 + hasSlogan="{{false}}"></sb-tr>
  31 + </view>
  32 + </swiper-item>
  33 + </block>
  34 + </swiper>
  35 + </view>
  36 + </block>
15 </block> 37 </block>
16 <block wx:else=""> 38 <block wx:else="">
17 - <block wx:for="{{list}}" wx:key="success.key" wx:for-item="part" wx:for-index="dateIndex">  
18 - <view class="list-content" wx:if="{{part.length>0}}">  
19 - <block wx:for="{{part}}" wx:key="part.key" wx:for-item="detail">  
20 - <view class="card">  
21 - <card  
22 - hasShowStatus bindevent="gotoDetail"  
23 - seller="{{detail.seller}}" detail="{{detail}}"></card>  
24 - </view>  
25 - </block> 39 + <block wx:for="{{list}}" wx:key="success.key" wx:for-item="detail" wx:for-index="dateIndex">
  40 + <view class="card">
  41 + <card
  42 + hasShowStatus bindevent="gotoDetail"
  43 + seller="{{detail.seller}}" detail="{{detail}}"></card>
26 </view> 44 </view>
27 </block> 45 </block>
28 </block> 46 </block>
29 </view> 47 </view>
  48 +<getpos bindpos="onpos" id="getpos" hasAllowFail></getpos>
@@ -81,13 +81,13 @@ @@ -81,13 +81,13 @@
81 border-color: #C8B16D; 81 border-color: #C8B16D;
82 } 82 }
83 .empry{ 83 .empry{
84 - font-size: 34rpx; 84 + font-size: 28rpx;
  85 + margin-top: 210rpx;
85 } 86 }
86 .empry image{ 87 .empry image{
87 width:384rpx; 88 width:384rpx;
88 height: 296rpx; 89 height: 296rpx;
89 - margin-bottom: 100rpx;  
90 - margin-top: 176rpx; 90 + margin-bottom: 60rpx;
91 } 91 }
92 .cate-class{ 92 .cate-class{
93 margin-bottom: 72rpx; 93 margin-bottom: 72rpx;
@@ -106,4 +106,27 @@ @@ -106,4 +106,27 @@
106 } 106 }
107 .customers view{ 107 .customers view{
108 margin-left: 14rpx; 108 margin-left: 14rpx;
  109 +}
  110 +
  111 +.line-push{
  112 + background-image: url("https://qn.colorcun.com/reserve/images/line-push.png");
  113 + width: 328rpx;
  114 + height: 42rpx;
  115 + background-size: 100% 24rpx;
  116 + margin: 0 auto;
  117 + font-size:30rpx;
  118 + color: #C0A369;
  119 + line-height: 24rpx;
  120 + background-repeat: no-repeat;
  121 + text-align: center;
  122 + margin-top: 158rpx;
  123 +}
  124 +.transverse-list{
  125 + background-color: #fefefe;
  126 + width: 100%;
  127 + margin-top: 40rpx;
  128 +}
  129 +.transverse-list .seller{
  130 + width: 98%;
  131 + margin: 0 auto;
109 } 132 }
@@ -130,7 +130,7 @@ Page({ @@ -130,7 +130,7 @@ Page({
130 +'?imageView2/1/w/750/h/500/q/100' 130 +'?imageView2/1/w/750/h/500/q/100'
131 share_image_full=seller.share_image 131 share_image_full=seller.share_image
132 .replace('http://','https://') 132 .replace('http://','https://')
133 - +'?imageView2/0/w/25/q/100' 133 + +'?imageMogr2/thumbnail/750x/blur/20x50'
134 console.log('share_image:',share_image) 134 console.log('share_image:',share_image)
135 palette={ 135 palette={
136 background: '#fff', 136 background: '#fff',
@@ -352,7 +352,7 @@ @@ -352,7 +352,7 @@
352 "id": 39, 352 "id": 39,
353 "name": "pages/reserve/detail 在线订座 ", 353 "name": "pages/reserve/detail 在线订座 ",
354 "pathName": "pages/reserve/detail", 354 "pathName": "pages/reserve/detail",
355 - "query": "id=1&fromid=&activeTab=", 355 + "query": "id=1&fromid=&activeTab=reserve",
356 "scene": null 356 "scene": null
357 }, 357 },
358 { 358 {
@@ -285,6 +285,10 @@ export default { @@ -285,6 +285,10 @@ export default {
285 openid:'openid', 285 openid:'openid',
286 silence:false, 286 silence:false,
287 }, 287 },
  288 +
  289 + //我的订单
  290 + 'App.Customer.GetMyOrder':null,
  291 +
288 // 预定失败推荐商家接口 292 // 预定失败推荐商家接口
289 'App.Customer.GetRecommendSellerList':null, 293 'App.Customer.GetRecommendSellerList':null,
290 294
@@ -10,21 +10,35 @@ const status=[ @@ -10,21 +10,35 @@ const status=[
10 ]; 10 ];
11 export default { 11 export default {
12 reserve(detail){ 12 reserve(detail){
  13 + /*
13 let ns = new Date() / 1000 14 let ns = new Date() / 1000
14 //取消 15 //取消
15 detail.hasCancel=detail.status==4; 16 detail.hasCancel=detail.status==4;
16 //结束 17 //结束
17 - detail.hasOvered= ns > detail.edate || (detail.status >= 2 && detail.status <= 3) 18 + detail.hasOvered= (ns > detail.edate || (detail.status >= 2 && detail.status <= 3)) && detail.status!=6
18 //正常运行已接单 19 //正常运行已接单
19 if(detail.type==0){//B端 20 if(detail.type==0){//B端
20 detail.hasRunning = !detail.hasOvered && !detail.hasCancel 21 detail.hasRunning = !detail.hasOvered && !detail.hasCancel
21 }else{//C端 22 }else{//C端
22 detail.hasRunning = !detail.hasOvered && !detail.hasCancel && detail.status==5 23 detail.hasRunning = !detail.hasOvered && !detail.hasCancel && detail.status==5
23 } 24 }
  25 + */
  26 + detail.hasRunning=this.hasRunningFlag(detail)
  27 + if(!detail.hasRunning){
  28 + detail.hasCancel=detail.status==4;
  29 + detail.hasOvered=detail.status!=0 && detail.status!=6;
  30 + }
24 detail.getStatusStr=''; 31 detail.getStatusStr='';
25 if(detail.status>=0){ 32 if(detail.status>=0){
26 detail.getStatusStr=status[detail.status]; 33 detail.getStatusStr=status[detail.status];
27 } 34 }
28 return detail; 35 return detail;
29 }, 36 },
  37 + hasRunningFlag(detail){//判断订单正在运行
  38 + let ns = new Date() / 1000
  39 + let flag=true;
  40 + if(detail.status==0 || detail.status==6 || detail.status==4) return false//未进行状态
  41 + if(ns > detail.edate) return false//超时
  42 + return flag
  43 + }
30 } 44 }