Commit 96fca973baf5da858475bbabf88a2f1024cb6116

Authored by wangfan
1 parent 846950c8

customer

@@ -11,4 +11,5 @@ @@ -11,4 +11,5 @@
11 line-height: inherit; 11 line-height: inherit;
12 -webkit-tap-highlight-color: transparent; 12 -webkit-tap-highlight-color: transparent;
13 color: inherit; 13 color: inherit;
  14 + width: 100%;
14 } 15 }
@@ -36,14 +36,7 @@ Page({ @@ -36,14 +36,7 @@ Page({
36 * 生命周期函数--监听页面显示 36 * 生命周期函数--监听页面显示
37 */ 37 */
38 onShow: function () { 38 onShow: function () {
39 - App.Reserve.GetListFromScheAndRes({  
40 - flag:this.data.tabFlag,  
41 - openid:getApp().openid,  
42 - }).then(res => {  
43 - let data=this.formatList(res.data);  
44 - let list=this.data.list;  
45 - list[this.data.tabFlag]=data;  
46 - }) 39 + this.getListData();
47 }, 40 },
48 41
49 /** 42 /**
@@ -59,11 +52,25 @@ Page({ @@ -59,11 +52,25 @@ Page({
59 onUnload: function () { 52 onUnload: function () {
60 53
61 }, 54 },
  55 + getListData(){
  56 + App.Reserve.GetListFromScheAndRes({
  57 + flag:this.data.tabFlag,
  58 + openid:getApp().openid,
  59 + }).then(res => {
  60 + let data=this.formatList(res.data);
  61 + let list=this.data.list;
  62 + list[this.data.tabFlag]=data;
  63 + this.setData({
  64 + list:list
  65 + })
  66 + })
  67 + },
62 _formatList(list){ 68 _formatList(list){
63 if(!list) return []; 69 if(!list) return [];
64 if(list.length>0){ 70 if(list.length>0){
65 list.forEach(row=>{ 71 list.forEach(row=>{
66 row.rdateStr=util.unixtoTime(row.rdate,'MM月DD日 WW HH:II'); 72 row.rdateStr=util.unixtoTime(row.rdate,'MM月DD日 WW HH:II');
  73 + row.navigator=row.inviting==getApp().openid?'detail_owner':'detail_customer'
67 }) 74 })
68 } 75 }
69 return list; 76 return list;
@@ -77,5 +84,23 @@ Page({ @@ -77,5 +84,23 @@ Page({
77 this.setData({ 84 this.setData({
78 tabFlag:util.attr(e,'index') 85 tabFlag:util.attr(e,'index')
79 }) 86 })
  87 + this.getListData();
  88 + },
  89 + userinfo(e){
  90 + let id=e.target.dataset.id;
  91 + let type=e.target.dataset.type;
  92 + if(type=='padding'){
  93 + App.Reserve.SetRelaSuccess({
  94 + rid:id,
  95 + openid:getApp().openid
  96 + }).then(res=>{
  97 + this.getListData();
  98 + })
  99 + }else{
  100 + wx.navigateTo({
  101 + url:'invite?id='+id,
  102 + });
  103 + }
  104 +
80 } 105 }
81 }) 106 })
1 { 1 {
2 "navigationBarBackgroundColor": "#ffffff", 2 "navigationBarBackgroundColor": "#ffffff",
3 "navigationBarTextStyle": "black", 3 "navigationBarTextStyle": "black",
4 - "navigationBarTitleText":"定个座儿" 4 + "navigationBarTitleText":"定个座儿",
  5 + "usingComponents": {
  6 + "userinfo": "/components/userinfo/userinfo",
  7 + "formids":"/components/formids/formids"
  8 + }
5 } 9 }
@@ -8,28 +8,43 @@ @@ -8,28 +8,43 @@
8 bindtap="switchTab" data-index="1">我的订座</view> 8 bindtap="switchTab" data-index="1">我的订座</view>
9 </view> 9 </view>
10 <block wx:for="{{list}}" wx:key="list.key" wx:for-item="parts" wx:for-index="tabindex"> 10 <block wx:for="{{list}}" wx:key="list.key" wx:for-item="parts" wx:for-index="tabindex">
  11 + <text>{{parts.length}}</text>
11 <block wx:if="{{parts.success.length>0 || parts.padding.length>0}}"> 12 <block wx:if="{{parts.success.length>0 || parts.padding.length>0}}">
12 - <block wx:for="{{parts}}" wx:key="partskey" wx:for-item="part">  
13 - <view class="list-content" wx:if="{{tabindex==tabFlag}}">  
14 - <view>{{index=='success'?'即将开始':'待处理'}}<text>({{part.length}}条)</text></view> 13 + <block wx:for="{{parts}}" wx:key="partskey" wx:for-item="part" wx:for-index="partIndex">
  14 + <view class="list-content" wx:if="{{tabindex==tabFlag && part.length>0}}">
  15 + <view class="cate-class">{{partIndex=='success'?'即将开始':'待处理'}}<text>({{part.length}}条)</text></view>
15 <block wx:for="{{part}}" wx:key="part.key" wx:for-item="detail"> 16 <block wx:for="{{part}}" wx:key="part.key" wx:for-item="detail">
16 - <view class="card">  
17 - <view class="top" wx:if="{{detail.topic}}">  
18 - <view class="title">{{detail.topic?'#'+detail.topic+'#':''}}</view>  
19 - </view>  
20 - <view class="bottom">  
21 - <view class="rdateStr Medium">{{detail.rdateStr}}</view>  
22 - <view class="seller flex-lr" bindtap="lookLocation">  
23 - <view class="seller-info">  
24 - <view class="name Medium">{{detail.seller.sellername}}</view>  
25 - <view class="addr">{{detail.seller.map_address}}</view> 17 + <navigator url="/pages/customer/{{detail.navigator}}?id={{detail.id}}">
  18 + <view class="card" style="width: 100%;">
  19 + <view class="bottom">
  20 + <view class="rdateStr Medium">{{detail.rdateStr}}</view>
  21 + <view class="seller flex-lr" bindtap="lookLocation">
  22 + <view class="seller-info">
  23 + <view class="name Medium">{{detail.seller.sellername}}</view>
  24 + <view class="addr">{{detail.seller.map_address}}</view>
  25 + </view>
  26 + <image src="http://qn.colorcun.com/custom/lite-yd/image/success.png"
  27 + style="width:160rpx;height: 94rpx;"
  28 + wx:if="{{tabFlag==1}}"></image>
  29 + </view>
  30 + </view>
  31 + <view class="top">
  32 + <view class="customers flex-ll" wx:if="{{detail.customers.length>0}}">
  33 + <block wx:for="{{detail.customers}}">
  34 + <image src="{{item.headimgurl}}" wx:if="{{index<5}}"></image>
  35 + </block>
  36 + <view>等{{detail.customers.length}}人已参加</view>
26 </view> 37 </view>
27 - <view class="addr-icon">  
28 - <image src="../image/gps-icon.png"></image> 38 + <view class="flex-lr">
  39 + <view class="title">{{detail.topic?'#'+detail.topic+'#':''}}</view>
  40 + <userinfo binduserinfo="userinfo"
  41 + class="share-but-view" data-id="{{detail.id}}" data-type="{{partIndex}}">
  42 + <view class="share-but{{partIndex=='success'?'':'-write'}} Regular">{{partIndex=='success'?'邀请':'接受'}}</view>
  43 + </userinfo>
29 </view> 44 </view>
30 </view> 45 </view>
31 </view> 46 </view>
32 - </view> 47 + </navigator>
33 </block> 48 </block>
34 </view> 49 </view>
35 </block> 50 </block>
@@ -6,29 +6,54 @@ @@ -6,29 +6,54 @@
6 } 6 }
7 7
8 .card{ 8 .card{
9 - border-radius: 10rpx; 9 + /*border-radius: 0 10rpx;*/
10 box-shadow: 2rpx 2rpx 14rpx 6rpx rgba(231,228,228,.5); 10 box-shadow: 2rpx 2rpx 14rpx 6rpx rgba(231,228,228,.5);
  11 + margin-bottom: 44rpx;
11 } 12 }
12 .card .top{ 13 .card .top{
13 - min-height: 160rpx; 14 + min-height: 140rpx;
  15 + padding: 0 48rpx;
14 } 16 }
15 .card .title{ 17 .card .title{
16 - line-height: 160rpx;  
17 - font-size: 44rpx; 18 + line-height: 140rpx;
  19 + font-size: 30rpx;
18 font-weight: bold; 20 font-weight: bold;
19 color:#AD7644; 21 color:#AD7644;
20 - width:94%;  
21 - margin: 0 auto;  
22 } 22 }
23 .card .bottom{ 23 .card .bottom{
24 background-color: #EAECEE; 24 background-color: #EAECEE;
25 - border-radius: 10rpx;  
26 - box-shadow: 2rpx 2rpx 14rpx 6rpx rgba(231,228,228,.5);  
27 - padding: 36rpx 46rpx 40rpx; 25 + box-shadow: 2rpx 2rpx 14rpx 0rpx rgba(231,228,228,.5);
  26 + padding: 54rpx 50rpx 50rpx;
28 } 27 }
29 .card .bottom .rdateStr{ 28 .card .bottom .rdateStr{
30 font-size: 30rpx; 29 font-size: 30rpx;
31 } 30 }
  31 +.card .bottom .name{
  32 + margin-top: 28rpx;
  33 + margin-bottom: 8rpx;
  34 + font-size: 30rpx;
  35 +}
  36 +.card .bottom .addr{
  37 + font-size: 26rpx;
  38 + color:#999999;
  39 +}
  40 +.share-but-view button{
  41 + border-radius: 0;
  42 +}
  43 +.share-but,.share-but-write{
  44 + color:#FEFEFE;
  45 + background: #262628;
  46 + width: 120rpx;
  47 + height: 48rpx;
  48 + line-height: 48rpx;
  49 + font-size: 30rpx;
  50 + text-align: center;
  51 +}
  52 +.share-but-write{
  53 + border: 2rpx solid #353535;
  54 + background-color: #fefefe;
  55 + color:#262628;
  56 +}
32 57
33 .tabs{ 58 .tabs{
34 margin: 56rpx 0 88rpx; 59 margin: 56rpx 0 88rpx;
@@ -50,4 +75,22 @@ @@ -50,4 +75,22 @@
50 height: 296rpx; 75 height: 296rpx;
51 margin-bottom: 100rpx; 76 margin-bottom: 100rpx;
52 margin-top: 176rpx; 77 margin-top: 176rpx;
  78 +}
  79 +.cate-class{
  80 + margin-bottom: 72rpx;
  81 + font-size: 28rpx;
  82 +}
  83 +.customers{
  84 + font-size: 26rpx;
  85 + color:#999999;
  86 + margin-top: 20rpx;
  87 +}
  88 +.customers image{
  89 + width:60rpx;
  90 + height:60rpx;
  91 + border-radius: 50%;
  92 + margin-right: 8rpx;
  93 +}
  94 +.customers view{
  95 + margin-left: 14rpx;
53 } 96 }
@@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
30 "list": [] 30 "list": []
31 }, 31 },
32 "miniprogram": { 32 "miniprogram": {
33 - "current": 8, 33 + "current": 6,
34 "list": [ 34 "list": [
35 { 35 {
36 "id": 0, 36 "id": 0,
@@ -72,7 +72,8 @@ @@ -72,7 +72,8 @@
72 "id": 6, 72 "id": 6,
73 "name": "pages/customer/index", 73 "name": "pages/customer/index",
74 "pathName": "pages/customer/index", 74 "pathName": "pages/customer/index",
75 - "query": "id=64" 75 + "query": "id=67",
  76 + "scene": "1001"
76 }, 77 },
77 { 78 {
78 "id": -1, 79 "id": -1,
@@ -86,6 +87,13 @@ @@ -86,6 +87,13 @@
86 "pathName": "pages/customer/index", 87 "pathName": "pages/customer/index",
87 "query": "id=64&fromid=test", 88 "query": "id=64&fromid=test",
88 "scene": "1001" 89 "scene": "1001"
  90 + },
  91 + {
  92 + "id": -1,
  93 + "name": "预定本-无参数",
  94 + "pathName": "pages/book/b_index",
  95 + "query": "",
  96 + "scene": "1001"
89 } 97 }
90 ] 98 ]
91 } 99 }
@@ -28,4 +28,7 @@ export default { @@ -28,4 +28,7 @@ export default {
28 //列表----我的日程 28 //列表----我的日程
29 'App.Reserve.GetListFromScheAndRes':null, 29 'App.Reserve.GetListFromScheAndRes':null,
30 30
  31 + //订座详情页面----我愿意
  32 + 'App.Reserve.SetRelaSuccess':null,
  33 +
31 } 34 }