Commit 6d2687ca3263ef2a030c83ddb2653ef29107a260

Authored by wangfan
1 parent 03d12fdd

customer

@@ -204,4 +204,11 @@ image{ @@ -204,4 +204,11 @@ image{
204 } 204 }
205 .border-right{ 205 .border-right{
206 border-right:1px solid #efeef3; 206 border-right:1px solid #efeef3;
  207 +}
  208 +.font-bold,.Semibold{
  209 + font-weight:bold;
  210 +}
  211 +
  212 +.Medium{
  213 + font-weight: 400;
207 } 214 }
@@ -9,4 +9,5 @@ @@ -9,4 +9,5 @@
9 line-height: inherit; 9 line-height: inherit;
10 -webkit-tap-highlight-color: transparent; 10 -webkit-tap-highlight-color: transparent;
11 color: inherit; 11 color: inherit;
  12 + width:100%;
12 } 13 }
1 // pages/customer/detail_owner.js 1 // pages/customer/detail_owner.js
  2 +import util from '../../utils/util';
  3 +import App from '../../utils/api';
  4 +const {regeneratorRuntime} = global
2 Page({ 5 Page({
3 6
4 /** 7 /**
5 * 页面的初始数据 8 * 页面的初始数据
6 */ 9 */
7 data: { 10 data: {
8 - 11 + detail:null,
9 }, 12 },
10 - 13 + id:null,
11 /** 14 /**
12 * 生命周期函数--监听页面加载 15 * 生命周期函数--监听页面加载
13 */ 16 */
14 onLoad: function (options) { 17 onLoad: function (options) {
15 - 18 + this.id=options.id;
16 }, 19 },
17 20
18 /** 21 /**
19 * 生命周期函数--监听页面初次渲染完成 22 * 生命周期函数--监听页面初次渲染完成
20 */ 23 */
21 onReady: function () { 24 onReady: function () {
22 - 25 +
23 }, 26 },
24 27
25 /** 28 /**
26 * 生命周期函数--监听页面显示 29 * 生命周期函数--监听页面显示
27 */ 30 */
28 onShow: function () { 31 onShow: function () {
29 - 32 + App.Reserve.Detail({
  33 + openid: getApp().openid,
  34 + rid: this.id
  35 + }).then(res => {
  36 + this.setData({
  37 + detail:this.formatDatail(res.data)
  38 + })
  39 + })
30 }, 40 },
31 41
32 /** 42 /**
@@ -62,5 +72,14 @@ Page({ @@ -62,5 +72,14 @@ Page({
62 */ 72 */
63 onShareAppMessage: function () { 73 onShareAppMessage: function () {
64 74
  75 + },
  76 + formatDatail(detail){
  77 + detail.rdateStr=util.unixtoTime(detail.rdate,'MM月DD日 WW HH:II');
  78 + detail.tableFirst=detail.tables[0].name;
  79 + if(detail.tables.length>1){
  80 + detail.tableSubInfo='等'+(detail.tables.length)+'个'
  81 + +(detail.tables[0].tid==2?'包间':'');
  82 + }
  83 + return detail;
65 } 84 }
66 }) 85 })
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 + }
5 } 8 }
1 <!--pages/customer/detail_owner.wxml--> 1 <!--pages/customer/detail_owner.wxml-->
2 -<text>pages/customer/detail_owner.wxml</text> 2 +<view class="page">
  3 + <view class="flex-vc success">
  4 + <view class="icon">
  5 + <image src="http://qn.colorcun.com/custom/lite-yd/image/success-ok.png"></image>
  6 + </view>
  7 + <view class="title Medium">订座成功</view>
  8 + <view class="info">你可以将订座信息发送给朋友,邀请朋友参加</view>
  9 + </view>
  10 + <userinfo binduserinfo="userinfo" class="share-but-view">
  11 + <view class="share-but Regular">去邀请</view>
  12 + </userinfo>
  13 + <view class="seller flex-lr">
  14 + <view class="avatar">
  15 + <image src="{{detail.seller.seller_image}}"></image>
  16 + </view>
  17 + <view class="seller-info">
  18 + <view class="name Medium">{{detail.seller.sellername}}</view>
  19 + <view class="addr">{{detail.seller.map_address}}</view>
  20 + </view>
  21 + <view class="addr-icon">
  22 + <image src="../image/gps-icon.png"></image>
  23 + </view>
  24 + </view>
  25 + <view class="hr" style="margin-top: 52rpx;margin-bottom: 48rpx;"></view>
  26 + <view class="detail-info Medium">
  27 + <view class="flex-lr">
  28 + <view>用餐时间</view>
  29 + <view class="detail-info-right">{{detail.rdateStr}}</view>
  30 + </view>
  31 + <view class="flex-lr" style="margin-top: 43rpx;">
  32 + <view>预定座位</view>
  33 + <view class="detail-info-right">{{detail.tableFirst}}
  34 + <text class="tableSubInfo">{{detail.tableSubInfo}}</text>
  35 + </view>
  36 + </view>
  37 + <view class="flex-lr" style="margin-top: 43rpx;">
  38 + <view>用餐人数</view>
  39 + <view class="detail-info-right">{{detail.pnum}}人</view>
  40 + </view>
  41 + <view class="flex-lr" wx:if="{{detail.cusman}}" style="margin-top: 43rpx;">
  42 + <view>客户经理</view>
  43 + <view class="detail-info-right">{{detail.cusman||''}}</view>
  44 + </view>
  45 + <view class="flex-lr" wx:if="{{detail.cusman}}" style="margin-top: 24rpx;">
  46 + <view></view>
  47 + <view class="detail-info-right">联系客户经理</view>
  48 + </view>
  49 + </view>
  50 + <view class="hr" style="margin-top: 56rpx;margin-bottom: 50rpx;"></view>
  51 + <view class="detail-info Medium" style="line-height: 48rpx; margin-bottom: 80rpx;">
  52 + <view class="flex-lr">
  53 + <view>预 定 人</view>
  54 + <view class="detail-info-right">{{detail.rname}}</view>
  55 + </view>
  56 + <view class="flex-lr" wx:if="{{detail.phone}}">
  57 + <view>手机号码</view>
  58 + <view class="detail-info-right">{{detail.phone}}</view>
  59 + </view>
  60 + <view class="flex-lr" wx:if="{{detail.cusdem}}">
  61 + <view>备注信息</view>
  62 + <view class="detail-info-right">{{detail.cusdem}}</view>
  63 + </view>
  64 + </view>
  65 +</view>
@@ -2,4 +2,79 @@ @@ -2,4 +2,79 @@
2 page{ 2 page{
3 width: 94%; 3 width: 94%;
4 margin: 0 3%; 4 margin: 0 3%;
  5 + color:#353535;
  6 +}
  7 +.success image{
  8 + width: 100%;
  9 + height: 100%;
  10 +}
  11 +.success .icon{
  12 + width: 120rpx;
  13 + height: 120rpx;
  14 + margin-top: 10rpx;
  15 +}
  16 +.success .title{
  17 + font-size: 36rpx;
  18 + margin-top: 32rpx;
  19 + margin-bottom: 26rpx;
  20 +}
  21 +.success .info{
  22 + font-size: 26rpx;
  23 + color:#999999
  24 +}
  25 +.share-but-view{
  26 + margin-top: 76rpx;
  27 + margin-bottom: 96rpx;
  28 + display: block;
  29 +}
  30 +.share-but{
  31 + color:#FEFEFE;
  32 + background: #262628;
  33 + width: 100%;
  34 + line-height: 80rpx;
  35 + font-size: 34rpx;
  36 + text-align: center;
  37 +}
  38 +.seller{
  39 + height: 84rpx;
  40 +}
  41 +.seller .avatar{
  42 + min-width: 60rpx;
  43 + width: 60rpx;
  44 + height: 60rpx;
  45 + background: #ccc;
  46 +}
  47 +.seller image{
  48 + width:100%;
  49 + height: 100%;
  50 +}
  51 +.seller .seller-info{
  52 + width: 60rpx;
  53 + height: 84rpx;
  54 + width:100%;
  55 + padding: 0 14rpx;
  56 +}
  57 +.seller .addr-icon{
  58 + min-width: 32rpx;
  59 + width: 32rpx;
  60 + height: 34rpx;
  61 +}
  62 +.seller .name{
  63 + font-size: 30rpx;
  64 +}
  65 +.seller .addr{
  66 + font-size: 26rpx;
  67 +}
  68 +.hr{
  69 + border-top: 2rpx solid #F1F0F4;
  70 +}
  71 +.detail-info{
  72 + font-size: 30rpx;
  73 +}
  74 +.detail-info .detail-info-right{
  75 + font-size: 34rpx;
  76 +}
  77 +.tableSubInfo{
  78 + font-size: 30rpx;
  79 + color:#ccc;
5 } 80 }
@@ -32,14 +32,14 @@ Page({ @@ -32,14 +32,14 @@ Page({
32 } 32 }
33 let url = 'list'; 33 let url = 'list';
34 App.Reserve.SetRelaOpenid({ 34 App.Reserve.SetRelaOpenid({
35 - id:opt.id, 35 + rid:opt.id,
36 openid:opt.openid, 36 openid:opt.openid,
37 fromid:opt.fromid?opt.fromid:'' 37 fromid:opt.fromid?opt.fromid:''
38 }) 38 })
39 if (opt.id > 0) { 39 if (opt.id > 0) {
40 App.Reserve.Detail({ 40 App.Reserve.Detail({
41 openid: opt.openid, 41 openid: opt.openid,
42 - id: opt.id 42 + rid: opt.id
43 }).then(res => { 43 }).then(res => {
44 if (!res.owner_openid) {//无预订人 44 if (!res.owner_openid) {//无预订人
45 url = 'detail_owner'; 45 url = 'detail_owner';
@@ -69,10 +69,10 @@ @@ -69,10 +69,10 @@
69 "query": "" 69 "query": ""
70 }, 70 },
71 { 71 {
72 - "id": -1, 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=61" 75 + "query": "id=62"
76 } 76 }
77 ] 77 ]
78 } 78 }
@@ -46,13 +46,13 @@ function unixtoTime(ns,format) { @@ -46,13 +46,13 @@ function unixtoTime(ns,format) {
46 result=result.replace('SS',ss>9?ss:'0'+ss); 46 result=result.replace('SS',ss>9?ss:'0'+ss);
47 var week; 47 var week;
48 switch (time.getDay()) { 48 switch (time.getDay()) {
49 - case 0:week="星期天";break  
50 - case 1:week="星期一";break  
51 - case 2:week="星期二";break  
52 - case 3:week="星期三";break  
53 - case 4:week="星期四";break  
54 - case 5:week="星期五";break  
55 - case 6:week="星期六";break 49 + case 0:week="周日";break
  50 + case 1:week="周一";break
  51 + case 2:week="周二";break
  52 + case 3:week="周三";break
  53 + case 4:week="周四";break
  54 + case 5:week="周五";break
  55 + case 6:week="周六";break
56 } 56 }
57 result=result.replace('WW',week); 57 result=result.replace('WW',week);
58 return result; 58 return result;