Commit e356025ba15e52a25b76ef7d9ace33cddf5d2b93

Authored by vking
1 parent af3c56b8

new 2.0

@@ -91,7 +91,7 @@ page { @@ -91,7 +91,7 @@ page {
91 } 91 }
92 92
93 .radius { 93 .radius {
94 - border-radius: 6rpx; 94 + border-radius: 20rpx;
95 } 95 }
96 96
97 /* ================== 97 /* ==================
  1 +// components/2.0/reserve/card.js
  2 +import util from '../../../utils/util';
  3 +import RS from '../../../utils/reserveStatus'
  4 +Component({
  5 + /**
  6 + * 组件的属性列表
  7 + */
  8 + properties: {
  9 + detail:Object,
  10 + },
  11 +
  12 + /**
  13 + * 组件的初始数据
  14 + */
  15 + data: {
  16 +
  17 + },
  18 + attached(){
  19 + this.init()
  20 + },
  21 + /**
  22 + * 组件的方法列表
  23 + */
  24 + methods: {
  25 + init(){
  26 + let detail=RS.reserve(this.data.detail)
  27 + console.log('detail.init',detail)
  28 + let tableSubInfo = ''
  29 + let tableFirst = '';
  30 + if (detail.tableFirst) {
  31 + tableSubInfo = (detail.tableFirst || '') + ' ' + (detail.tableSubInfo || '');
  32 + tableFirst = detail.tableFirst
  33 + } else if(detail.tables && detail.tables.length>0) {
  34 + tableFirst = detail.tables[0].name
  35 + tableSubInfo = detail.tables[0].name;
  36 + if (detail.tables.length > 1) {
  37 + tableSubInfo += ' 等' + (detail.tables.length) + '个'
  38 + + (detail.tables[0].tid == 2 ? '包间' : '');
  39 + tableFirst += '等';
  40 + }
  41 + }
  42 + detail.tableFirst=tableFirst
  43 + detail.tableSubInfo=tableSubInfo
  44 + this.setData({
  45 + detail:detail,
  46 + })
  47 + }
  48 + }
  49 +})
  1 +{
  2 + "component": true,
  3 + "usingComponents": {}
  4 +}
  1 +<!--components/2.0/reserve/card.wxml-->
  2 +<wxs src="../../../utils/util.wxs" module="util" />
  3 +<view class="view margin-lr-lg margin-top-sm solid radius padding padding-bottom-lg" style="box-shadow: 0px 0px 20rpx 0px #EEF0F2;">
  4 + <view class="view flex padding-bottom-sm solid-bottom">
  5 + <view class="view round margin-right-sm"
  6 + style="width: 44rpx;height: 44rpx; background-image: url('{{detail.seller.seller_image}}');">
  7 + </view>
  8 + <view class="view text-cut flex-treble">
  9 + <view class="view text-lg text-cut" style="margin-bottom: 16rpx;">{{detail.seller.sellername}}</view>
  10 + <view class="view text-df bg-white text-cut">{{detail.seller.map_address}}</view>
  11 + </view>
  12 + <view class="view margin-left-sm text-blue text-lg" style="min-width: 100rpx;">
  13 + {{detail.getStatusStr}}
  14 + </view>
  15 + </view>
  16 + <view class="view margin-top-sm">
  17 + <view class="view flex margin-bottom-sm align-center">
  18 + <view class="view flex-sub bg-white">预订时间</view>
  19 + <view class="view flex-treble text-bold" style="font-size: 36rpx;">
  20 + <view class="value" wx:if="{{detail.hasOnlineReserve || detail.hasUpdateDate}}">
  21 + <text wx:if="{{detail.ddate>0}}">{{util.unixtoTime(detail.ddate||'','MM月DD日')}} {{detail.soltName}}</text>
  22 + </view>
  23 + <view class="value" wx:else="">{{detail.rdateStr}}</view>
  24 + </view>
  25 + </view>
  26 + <view class="view flex align-center">
  27 + <view class="view flex-sub bg-white" style="min-width: 140rpx;">包间类型</view>
  28 + <view class="view flex-treble text-bold text-cut" style="font-size: 36rpx;">
  29 + {{detail.tableFirst||util.getRoomName(detail.room_demand)}}
  30 + </view>
  31 + </view>
  32 + </view>
  33 +</view>
  1 +/* components/2.0/reserve/card.wxss */
  2 +@import "../../../colorui/main.wxss";
@@ -21,10 +21,10 @@ @@ -21,10 +21,10 @@
21 <view class="context flex-lr"> 21 <view class="context flex-lr">
22 <view class="left info Medium"> 22 <view class="left info Medium">
23 <view class="label">时间</view> 23 <view class="label">时间</view>
24 - <view class="value" wx:if="{{hasOnlineReserve || detail.hasUpdateDate}}"> 24 + <view class="value" wx:if="{{detail.hasUpdateDate}}">
25 <text wx:if="{{detail.ddate>0}}">{{util.unixtoTime(detail.ddate||'','MM月DD日')}} {{util.reserveTimeSpace(detail.ddate_solt||detail.section)}}</text> 25 <text wx:if="{{detail.ddate>0}}">{{util.unixtoTime(detail.ddate||'','MM月DD日')}} {{util.reserveTimeSpace(detail.ddate_solt||detail.section)}}</text>
26 </view> 26 </view>
27 - <view class="value" wx:else="">{{rdateStr}}</view> 27 + <view class="value" wx:else="">{{detail.rdateStr}}</view>
28 </view> 28 </view>
29 <view class="line"></view> 29 <view class="line"></view>
30 <view class="right info Medium" wx:if="{{(detail.type==1 && (detail.status==4 || detail.status==0)) || hasOnlineReserve || detail.status==0 || detail.status==6}}"> 30 <view class="right info Medium" wx:if="{{(detail.type==1 && (detail.status==4 || detail.status==0)) || hasOnlineReserve || detail.status==0 || detail.status==6}}">
@@ -12,6 +12,12 @@ @@ -12,6 +12,12 @@
12 </view> 12 </view>
13 <view class="pages"> 13 <view class="pages">
14 <view class="block-rev money flex-lr"> 14 <view class="block-rev money flex-lr">
  15 + <navigator url="/pages/we/follow" class="money-item">
  16 + <view class="flex-vc">
  17 + <view class="money-value">{{user.collection||0}}</view>
  18 + <view class="money-title">关注</view>
  19 + </view>
  20 + </navigator>
15 <navigator url="/pack-activity/pages/money" class="money-item"> 21 <navigator url="/pack-activity/pages/money" class="money-item">
16 <view class="flex-vc"> 22 <view class="flex-vc">
17 <view class="money-value">¥{{user.balance.price||0}}</view> 23 <view class="money-value">¥{{user.balance.price||0}}</view>
@@ -31,7 +31,7 @@ Page({ @@ -31,7 +31,7 @@ Page({
31 tabType:this.tabType 31 tabType:this.tabType
32 }) 32 })
33 } 33 }
34 - this.selectComponent('#getpos').getPos(); 34 + this.getListData();
35 }, 35 },
36 36
37 /** 37 /**
@@ -46,6 +46,7 @@ Page({ @@ -46,6 +46,7 @@ Page({
46 */ 46 */
47 onShow: function () { 47 onShow: function () {
48 PubSub.emit('custom-tab-bar') 48 PubSub.emit('custom-tab-bar')
  49 +
49 }, 50 },
50 51
51 /** 52 /**
@@ -79,9 +80,9 @@ Page({ @@ -79,9 +80,9 @@ Page({
79 [`list[`+tabType+`]`]: this.data.list[tabType].concat(data), 80 [`list[`+tabType+`]`]: this.data.list[tabType].concat(data),
80 hasMore:this.hasMore 81 hasMore:this.hasMore
81 }) 82 })
82 - if(res.data.length==0){  
83 - this.GetRecommendSellerLists()  
84 - } 83 + // if(res.data.length==0){
  84 + // this.GetRecommendSellerLists()
  85 + // }
85 }) 86 })
86 }, 87 },
87 formatList(list) { 88 formatList(list) {
@@ -89,9 +90,9 @@ Page({ @@ -89,9 +90,9 @@ Page({
89 let dlist = []; 90 let dlist = [];
90 let openid = getApp().openid; 91 let openid = getApp().openid;
91 list.forEach(row => { 92 list.forEach(row => {
92 - row.rdateStr = util.unixtoTime(row.ddate, 'MM月DD日 WW HH:II'); 93 + //row.rdateStr = util.unixtoTime(row.ddate, 'MM月DD日 WW HH:II');
93 row.navigator = row.openid == openid ? 'detail_owner' : 'detail_customer'; 94 row.navigator = row.openid == openid ? 'detail_owner' : 'detail_customer';
94 - row=RS.reserve(row) 95 + //row=RS.reserve(row)
95 dlist.push(row); 96 dlist.push(row);
96 }) 97 })
97 return dlist; 98 return dlist;
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 "sb-tr":"/components/reserve/seller-box-transverse/seller-box", 9 "sb-tr":"/components/reserve/seller-box-transverse/seller-box",
10 "getpos":"/components/userinfo/getpos", 10 "getpos":"/components/userinfo/getpos",
11 "as-phone":"/components/actionSheet/phone", 11 "as-phone":"/components/actionSheet/phone",
12 - "card":"/components/seller-card/seller-card" 12 + "card-bak":"/components/seller-card/seller-card",
  13 + "card":"/components/2.0/reserve/card"
13 } 14 }
14 } 15 }
1 <!--pages/customer/list.wxml--> 1 <!--pages/customer/list.wxml-->
2 <nav hasHome>我的订单</nav> 2 <nav hasHome>我的订单</nav>
3 -<view class="tabs flex-lr">  
4 - <view class="item {{tabType==1?'active':''}}" data-type="1" bindtap="switchType">等待确认</view>  
5 - <view class="item {{tabType==2?'active':''}}" data-type="2" bindtap="switchType">预订成功</view>  
6 - <view class="item {{tabType==3?'active':''}}" data-type="3" bindtap="switchType">历史订单</view>  
7 - <view class="item {{tabType==4?'active':''}}" data-type="4" bindtap="switchType">无效预订</view> 3 +<view class="view tabs flex padding-lg padding-top-xs">
  4 + <view class="view item {{tabType==1?'active':''}}" data-type="1" bindtap="switchType">等待确认</view>
  5 + <view class="view item {{tabType==2?'active':''}}" data-type="2" bindtap="switchType">预订成功</view>
  6 + <view class="view item {{tabType==3?'active':''}}" data-type="3" bindtap="switchType">历史订单</view>
  7 + <view class="view item {{tabType==4?'active':''}}" data-type="4" bindtap="switchType">无效预订</view>
8 </view> 8 </view>
9 -<view class="page"> 9 +<view class="view pages">
10 <block wx:if="{{list[tabType].length==0}}"> 10 <block wx:if="{{list[tabType].length==0}}">
11 <view class="flex-vc empry"> 11 <view class="flex-vc empry">
12 - <image src="http://nosqn.colorcun.com/reserve/images/order-empty.png"></image>  
13 - <view class="Medium">暂无订单</view> 12 + <image src="http://nosqn.colorcun.com/2.0/home%20%2817%29.png"></image>
  13 + <view class="Medium">暂无订单哦</view>
14 </view> 14 </view>
15 </block> 15 </block>
16 <block wx:else=""> 16 <block wx:else="">
17 <block wx:for="{{list[tabType]}}" wx:key="success.key" wx:for-item="detail" wx:for-index="dateIndex"> 17 <block wx:for="{{list[tabType]}}" wx:key="success.key" wx:for-item="detail" wx:for-index="dateIndex">
18 - <view class="card">  
19 - <card  
20 - hasShowStatus bindevent="gotoDetail"  
21 - seller="{{detail.seller}}" detail="{{detail}}"></card>  
22 - </view> 18 + <navigator url="/pages/customer/{{detail.navigator}}?id={{detail.id}}">
  19 + <card
  20 + hasShowStatus bindevent="gotoDetail"
  21 + seller="{{detail.seller}}" detail="{{detail}}"></card>
  22 + </navigator>
23 </block> 23 </block>
  24 + <view class="view" style="height: 192rpx;"></view>
24 </block> 25 </block>
25 -</view>  
26 -<block wx:if="{{list[tabType].length==0 && rsl.length>0}}">  
27 - <view class="rsl-block">  
28 - <view class="line-push">为你推荐</view>  
29 - <view class="transverse-list">  
30 - <swiper  
31 - indicator-dots="{{false}}" autoplay="{{false}}" circular="{{false}}" vertical="{{false}}"  
32 - interval="2000" duration="500"  
33 - previous-margin="{{15}}px" next-margin="{{15}}px" style="height: 350rpx;"  
34 - current="{{current}}" bindchange="bindtransition" bindanimationfinish="bindtransition">  
35 - <block wx:for="{{rsl}}" wx:key="rsl.key">  
36 - <swiper-item bindtap="gotoSellerDetail" id="{{item.id}}">  
37 - <view class="seller" id="seller-{{item.id}}">  
38 - <sb-tr seller="{{item}}"  
39 - hasInSwiper bindevent="sbtrEvent"  
40 - hasActivityTags="{{false}}"  
41 - hasActivityShort="{{true}}"  
42 - hasBrand="true" hasActivityTese="true"  
43 - hasSlogan="{{false}}"></sb-tr>  
44 - </view>  
45 - </swiper-item>  
46 - </block>  
47 - </swiper>  
48 - </view>  
49 - </view>  
50 -</block>  
51 -<getpos bindpos="onpos" id="getpos" hasAllowFail hasAllowLoading="{{false}}"></getpos>  
52 -<as-phone id="as"></as-phone>  
  26 +</view>
1 /* pages/customer/list.wxss */ 1 /* pages/customer/list.wxss */
2 -.page{  
3 - width: 90%;  
4 - margin: 90rpx 5% 0;  
5 - color:#353535;  
6 - padding-bottom: 60rpx; 2 +@import "../../colorui/main.wxss";
  3 +.pages{
  4 + margin-top: 100rpx;
7 } 5 }
8 -  
9 -.card{  
10 - /*border-radius: 0 10rpx;*/  
11 - box-shadow: 2rpx 2rpx 14rpx 6rpx rgba(231,228,228,.5);  
12 - margin-bottom: 44rpx;  
13 -}  
14 -.card .top{  
15 - min-height: 140rpx;  
16 - padding: 0 48rpx;  
17 -}  
18 -.card .title{  
19 - line-height: 140rpx;  
20 - font-size: 30rpx;  
21 - font-weight: bold;  
22 - color:#AD7644;  
23 -}  
24 -.card .bottom{  
25 - background-color: #EAECEE;  
26 - box-shadow: 2rpx 2rpx 14rpx 0rpx rgba(231,228,228,.5);  
27 - padding: 54rpx 50rpx 50rpx;  
28 -}  
29 -.card .bottom .rdateStr{  
30 - font-size: 30rpx;  
31 -}  
32 -.card .bottom .name{  
33 - margin-top: 28rpx;  
34 - margin-bottom: 8rpx;  
35 - font-size: 30rpx;  
36 -}  
37 -.card .bottom .addr{  
38 - font-size: 26rpx;  
39 - color:#999999;  
40 -}  
41 -.share-but-view button{  
42 - border-radius: 0;  
43 -}  
44 -.share-but,.share-but-write{  
45 - color:#FEFEFE;  
46 - background: #262628;  
47 - width: 120rpx;  
48 - height: 48rpx;  
49 - line-height: 48rpx;  
50 - font-size: 30rpx;  
51 - text-align: center;  
52 -}  
53 -.share-but-write{  
54 - border: 2rpx solid #353535;  
55 - background-color: #fefefe;  
56 - color:#262628;  
57 -}  
58 -  
59 .tabs{ 6 .tabs{
60 - font-size: 30rpx;  
61 - color:##353535; 7 + font-size: 32rpx;
  8 + font-family: PingFangSC-Regular, PingFang SC;
  9 + font-weight: 400;
  10 + color: #333333;
  11 + line-height: 44rpx;
  12 +
62 position: fixed; 13 position: fixed;
63 - width: 90%;  
64 - padding: 0 5%;  
65 background-color: #fff; 14 background-color: #fff;
66 z-index: 9; 15 z-index: 9;
  16 + width: 100%;
67 } 17 }
68 .tabs .item{ 18 .tabs .item{
  19 + position: relative;
69 width: 25%; 20 width: 25%;
70 - border: 2rpx solid #E0E0E0;  
71 - height: 56rpx;  
72 - line-height: 56rpx;  
73 text-align: center; 21 text-align: center;
74 - border-right-width: 0;  
75 -}  
76 -.tabs .item:last-child{  
77 - border-right-width: 2rpx;  
78 } 22 }
79 .tabs .active{ 23 .tabs .active{
80 - color:#FFFFFF;  
81 - background-color: #C8B16D;  
82 - border-color: #C8B16D; 24 + font-weight: 600;
  25 + color: #42A5FF;
  26 +}
  27 +.tabs .active:after{
  28 + display: block;
  29 + position: absolute;
  30 + content: "";
  31 + bottom: -10rpx;
  32 + left:calc(50% - 30rpx);
  33 + width: 60rpx;
  34 + height: 6rpx;
  35 + background: linear-gradient(90deg, #3BBFF5 0%, #57A0FF 100%);
  36 + border-radius: 3rpx;
83 } 37 }
84 .empry{ 38 .empry{
85 font-size: 28rpx; 39 font-size: 28rpx;
@@ -73,17 +73,10 @@ @@ -73,17 +73,10 @@
73 } 73 }
74 }, 74 },
75 "condition": { 75 "condition": {
76 - "search": {  
77 - "list": []  
78 - },  
79 - "conversation": {  
80 - "list": []  
81 - },  
82 "plugin": { 76 "plugin": {
83 "list": [] 77 "list": []
84 }, 78 },
85 "game": { 79 "game": {
86 - "currentL": -1,  
87 "list": [] 80 "list": []
88 }, 81 },
89 "gamePlugin": { 82 "gamePlugin": {
@@ -515,10 +508,9 @@ @@ -515,10 +508,9 @@
515 "scene": null 508 "scene": null
516 }, 509 },
517 { 510 {
518 - "id": -1,  
519 "name": "pages/me/list 我的订单", 511 "name": "pages/me/list 我的订单",
520 "pathName": "pages/me/list", 512 "pathName": "pages/me/list",
521 - "query": "id=1017&act=quanzi", 513 + "query": "type=2",
522 "scene": null 514 "scene": null
523 }, 515 },
524 { 516 {