Showing
18 changed files
with
246 additions
and
53 deletions
| @@ -9,10 +9,11 @@ | @@ -9,10 +9,11 @@ | ||
| 9 | "pages/customer/detail_owner", | 9 | "pages/customer/detail_owner", |
| 10 | "pages/customer/detail_customer", | 10 | "pages/customer/detail_customer", |
| 11 | "pages/customer/invite", | 11 | "pages/customer/invite", |
| 12 | - "pages/customer/list" | 12 | + "pages/customer/list", |
| 13 | + "pages/customer/remind" | ||
| 13 | ], | 14 | ], |
| 14 | "window": { | 15 | "window": { |
| 15 | - "navigationStyle":"custom", | 16 | + "navigationStyle": "custom", |
| 16 | "backgroundTextStyle": "light", | 17 | "backgroundTextStyle": "light", |
| 17 | "navigationBarBackgroundColor": "#199095", | 18 | "navigationBarBackgroundColor": "#199095", |
| 18 | "navigationBarTitleText": "点餐商户端", | 19 | "navigationBarTitleText": "点餐商户端", |
| @@ -22,6 +22,7 @@ Component({ | @@ -22,6 +22,7 @@ Component({ | ||
| 22 | data: { | 22 | data: { |
| 23 | rdateStr:"", | 23 | rdateStr:"", |
| 24 | tableSubInfo:"", | 24 | tableSubInfo:"", |
| 25 | + masterMan:"", | ||
| 25 | }, | 26 | }, |
| 26 | attached(){ | 27 | attached(){ |
| 27 | 28 | ||
| @@ -35,9 +36,16 @@ Component({ | @@ -35,9 +36,16 @@ Component({ | ||
| 35 | methods: { | 36 | methods: { |
| 36 | init(){ | 37 | init(){ |
| 37 | if(this.data.detail && this.data.detail.rdate){ | 38 | if(this.data.detail && this.data.detail.rdate){ |
| 39 | + let masterMan=(this.data.detail.rname||'')+' (' | ||
| 40 | + +this.data.detail.phone | ||
| 41 | + .replace(/([\d]{2}).*([\d]{4})/,function($0,$1,$2){ | ||
| 42 | + return $1+'*'+$2 | ||
| 43 | + }) | ||
| 44 | + +')'; | ||
| 38 | this.setData({ | 45 | this.setData({ |
| 39 | rdateStr:util.unixtoTime(this.data.detail.rdate,'MM月DD日 HH:II'), | 46 | rdateStr:util.unixtoTime(this.data.detail.rdate,'MM月DD日 HH:II'), |
| 40 | tableSubInfo:(this.data.detail.tableFirst||'')+' '+(this.data.detail.tableSubInfo||''), | 47 | tableSubInfo:(this.data.detail.tableFirst||'')+' '+(this.data.detail.tableSubInfo||''), |
| 48 | + masterMan:masterMan, | ||
| 41 | }) | 49 | }) |
| 42 | } | 50 | } |
| 43 | } | 51 | } |
| @@ -30,5 +30,15 @@ | @@ -30,5 +30,15 @@ | ||
| 30 | {{seller.map_address}} | 30 | {{seller.map_address}} |
| 31 | </view> | 31 | </view> |
| 32 | </view> | 32 | </view> |
| 33 | - <view class="opt"></view> | 33 | + <view class="seller master flex-lr"> |
| 34 | + <view class="master-label"> | ||
| 35 | + 预订人 | ||
| 36 | + </view> | ||
| 37 | + <view class="master-man"> | ||
| 38 | + {{masterMan}} | ||
| 39 | + </view> | ||
| 40 | + </view> | ||
| 41 | + <view class="seller opt"> | ||
| 42 | + <slot></slot> | ||
| 43 | + </view> | ||
| 34 | </view> | 44 | </view> |
| @@ -74,4 +74,24 @@ | @@ -74,4 +74,24 @@ | ||
| 74 | height: 34rpx; | 74 | height: 34rpx; |
| 75 | min-width: 28rpx; | 75 | min-width: 28rpx; |
| 76 | margin-right: 20rpx; | 76 | margin-right: 20rpx; |
| 77 | -} | ||
| 77 | +} | ||
| 78 | + | ||
| 79 | +.master{ | ||
| 80 | + padding-top: 0; | ||
| 81 | +} | ||
| 82 | +.master-label{ | ||
| 83 | + font-size: 20rpx; | ||
| 84 | + background-color: #C8B16D; | ||
| 85 | + line-height: 30rpx; | ||
| 86 | + height: 30rpx; | ||
| 87 | + width: 70rpx; | ||
| 88 | + padding: 5rpx 10rpx; | ||
| 89 | + text-align: center; | ||
| 90 | + color:#FEFEFE; | ||
| 91 | +} | ||
| 92 | +.master-man{ | ||
| 93 | + font-size: 26rpx; | ||
| 94 | +} | ||
| 95 | +.opt{ | ||
| 96 | + padding-top: 0; | ||
| 97 | +} |
| 1 | -.button-none { | ||
| 2 | - display: inline-block; | ||
| 3 | - padding-left: 0; | ||
| 4 | - padding-right: 0; | ||
| 5 | - box-sizing: border-box; | ||
| 6 | - font-size: inherit; | ||
| 7 | - text-align: center; | ||
| 8 | - text-decoration: none; | ||
| 9 | - line-height: inherit; | ||
| 10 | - -webkit-tap-highlight-color: transparent; | ||
| 11 | - color: inherit; | ||
| 12 | - width:100%; | ||
| 13 | - border-radius: 0; | ||
| 14 | -} | ||
| 1 | +@import "../../app.wxss"; |
| @@ -60,11 +60,11 @@ Page({ | @@ -60,11 +60,11 @@ Page({ | ||
| 60 | onPullDownRefresh: function () { | 60 | onPullDownRefresh: function () { |
| 61 | 61 | ||
| 62 | }, | 62 | }, |
| 63 | - getDetail(){ | 63 | + getDetail(fouce=false){ |
| 64 | App.Reserve.Detail({ | 64 | App.Reserve.Detail({ |
| 65 | openid: getApp().openid, | 65 | openid: getApp().openid, |
| 66 | rid: this.id | 66 | rid: this.id |
| 67 | - }).then(res => { | 67 | + },fouce).then(res => { |
| 68 | this.setData({ | 68 | this.setData({ |
| 69 | detail:this.formatDatail(res.data) | 69 | detail:this.formatDatail(res.data) |
| 70 | }) | 70 | }) |
| @@ -117,7 +117,7 @@ Page({ | @@ -117,7 +117,7 @@ Page({ | ||
| 117 | rid:this.id, | 117 | rid:this.id, |
| 118 | openid:getApp().openid | 118 | openid:getApp().openid |
| 119 | }).then(res=>{ | 119 | }).then(res=>{ |
| 120 | - this.getDetail(); | 120 | + this.getDetail(true); |
| 121 | }) | 121 | }) |
| 122 | }else{ | 122 | }else{ |
| 123 | wx.navigateTo({ | 123 | wx.navigateTo({ |
| @@ -125,5 +125,13 @@ Page({ | @@ -125,5 +125,13 @@ Page({ | ||
| 125 | }); | 125 | }); |
| 126 | } | 126 | } |
| 127 | }, | 127 | }, |
| 128 | - | 128 | + reserveCancel(){ |
| 129 | + App.Reserve.SetRelaSuccess({ | ||
| 130 | + rid:this.id, | ||
| 131 | + openid:getApp().openid, | ||
| 132 | + cancel:'cancel' | ||
| 133 | + }).then(res=>{ | ||
| 134 | + this.getDetail(true); | ||
| 135 | + }) | ||
| 136 | + } | ||
| 129 | }) | 137 | }) |
| @@ -5,6 +5,8 @@ | @@ -5,6 +5,8 @@ | ||
| 5 | "usingComponents": { | 5 | "usingComponents": { |
| 6 | "userinfo": "/components/userinfo/userinfo", | 6 | "userinfo": "/components/userinfo/userinfo", |
| 7 | "manager": "/components/manager/manager", | 7 | "manager": "/components/manager/manager", |
| 8 | - "nav":"/components/nav/nav" | 8 | + "nav":"/components/nav/nav", |
| 9 | + "card":"/components/seller-card/seller-card", | ||
| 10 | + "formids":"/components/formids/formids" | ||
| 9 | } | 11 | } |
| 10 | } | 12 | } |
| 1 | <!--pages/customer/detail_owner.wxml--> | 1 | <!--pages/customer/detail_owner.wxml--> |
| 2 | <nav hasHome>订座详情</nav> | 2 | <nav hasHome>订座详情</nav> |
| 3 | <view class="page"> | 3 | <view class="page"> |
| 4 | - <view class="tip">{{detail.rname}} 给你发了一个邀请:</view> | ||
| 5 | - <view class="card"> | ||
| 6 | - <view class="top" wx:if="{{detail.topic}}"> | ||
| 7 | - <view class="title">{{detail.topic?'#'+detail.topic+'#':''}}</view> | ||
| 8 | - </view> | ||
| 9 | - <view class="bottom"> | ||
| 10 | - <view class="rdateStr Medium">{{detail.rdateStr}}</view> | ||
| 11 | - <view class="seller flex-lr" bindtap="lookLocation"> | ||
| 12 | - <view class="seller-info"> | ||
| 13 | - <view class="name Medium">{{detail.seller.sellername}}</view> | ||
| 14 | - <view class="addr">{{detail.seller.map_address}}</view> | ||
| 15 | - </view> | ||
| 16 | - <view class="addr-icon"> | ||
| 17 | - <image src="../image/gps-icon.png"></image> | ||
| 18 | - </view> | 4 | + <view class="card" style="margin-top: 42rpx; margin-bottom: 168rpx;"> |
| 5 | + <card seller="{{detail.seller}}" detail="{{detail}}"> | ||
| 6 | + <view class="opt flex-rr"> | ||
| 7 | + <block wx:if="{{!detail.hasCanSuccess}}"> | ||
| 8 | + <userinfo binduserinfo="userinfo"> | ||
| 9 | + <view class="opt-button">赴约</view> | ||
| 10 | + </userinfo> | ||
| 11 | + </block> | ||
| 12 | + <block wx:else=""> | ||
| 13 | + <formids bindclick="reserveCancel"> | ||
| 14 | + <view class="opt-button">取消</view> | ||
| 15 | + </formids> | ||
| 16 | + <formids url="./remind?id={{detail.id}}&rdate={{detail.rdate}}"> | ||
| 17 | + <view class="opt-button">提醒</view> | ||
| 18 | + </formids> | ||
| 19 | + <userinfo binduserinfo="userinfo"> | ||
| 20 | + <view class="opt-button">分享日程</view> | ||
| 21 | + </userinfo> | ||
| 22 | + </block> | ||
| 19 | </view> | 23 | </view> |
| 20 | - <view class="tableInfo">{{detail.tableFirst}} <text class="tableSubInfo"> {{detail.tableSubInfo}}</text></view> | ||
| 21 | - <view class="flex-lr showManager" bindtap="showManager" wx:if="{{detail.cusman}}"> | ||
| 22 | - <view class="">容客户经理-{{detail.cusman}}</view> | ||
| 23 | - <view style="text-decoration: underline" wx:if="{{detail.cusman_phone || detail.cusman_account}}">联系客户经理</view> | ||
| 24 | - </view> | ||
| 25 | - </view> | 24 | + </card> |
| 26 | </view> | 25 | </view> |
| 27 | - <userinfo binduserinfo="userinfo" class="share-but-view"> | ||
| 28 | - <view class="share-but Regular">{{!detail.hasCanSuccess?'我愿意':'去邀请'}}</view> | ||
| 29 | - </userinfo> | 26 | + |
| 30 | <block wx:if="{{detail.customers.length>0}}"> | 27 | <block wx:if="{{detail.customers.length>0}}"> |
| 31 | <view class="line-text"> | 28 | <view class="line-text"> |
| 32 | <view class="text"> | 29 | <view class="text"> |
| 33 | - <view>{{detail.customers.length}}人参与</view> | 30 | + <view> {{detail.customers.length}}人参与 </view> |
| 34 | </view> | 31 | </view> |
| 35 | </view> | 32 | </view> |
| 36 | <view> | 33 | <view> |
| @@ -67,7 +67,7 @@ | @@ -67,7 +67,7 @@ | ||
| 67 | width:100%; | 67 | width:100%; |
| 68 | } | 68 | } |
| 69 | .line-text .text view{ | 69 | .line-text .text view{ |
| 70 | - width:100rpx; | 70 | + width:130rpx; |
| 71 | margin: 0 auto; | 71 | margin: 0 auto; |
| 72 | background-color: #fff; | 72 | background-color: #fff; |
| 73 | } | 73 | } |
| @@ -129,4 +129,16 @@ | @@ -129,4 +129,16 @@ | ||
| 129 | .showManager{ | 129 | .showManager{ |
| 130 | font-size: 30rpx; | 130 | font-size: 30rpx; |
| 131 | margin-top: 26rpx; | 131 | margin-top: 26rpx; |
| 132 | +} | ||
| 133 | + | ||
| 134 | +.opt .opt-button{ | ||
| 135 | + width: 120rpx; | ||
| 136 | + height: 40rpx; | ||
| 137 | + line-height: 40rpx; | ||
| 138 | + font-size: 26rpx; | ||
| 139 | + color:#262628; | ||
| 140 | + border: 2rpx solid #262628; | ||
| 141 | + text-align: center; | ||
| 142 | + margin-left: 18rpx; | ||
| 143 | + | ||
| 132 | } | 144 | } |
pages/customer/remind.js
0 → 100644
| 1 | +// pages/customer/remind.js | ||
| 2 | +import util from '../../utils/util'; | ||
| 3 | +import App from '../../utils/api'; | ||
| 4 | +const {regeneratorRuntime} = global | ||
| 5 | +Page({ | ||
| 6 | + | ||
| 7 | + /** | ||
| 8 | + * 页面的初始数据 | ||
| 9 | + */ | ||
| 10 | + data: { | ||
| 11 | + reminds:[ | ||
| 12 | + {val:0,label:'不提醒'}, | ||
| 13 | + {val:30,label:'30分钟前'}, | ||
| 14 | + {val:60,label:'1小时前'}, | ||
| 15 | + {val:120,label:'2小时前'}, | ||
| 16 | + {val:24*60,label:'1天前'}, | ||
| 17 | + {val:48*60,label:'2天前'}, | ||
| 18 | + ], | ||
| 19 | + }, | ||
| 20 | + remind_date:0, | ||
| 21 | + id:null, | ||
| 22 | + rdate:0, | ||
| 23 | + /** | ||
| 24 | + * 生命周期函数--监听页面加载 | ||
| 25 | + */ | ||
| 26 | + onLoad: function (options) { | ||
| 27 | + console.log('onLoad',options); | ||
| 28 | + this.id=options.id; | ||
| 29 | + this.rdate=options.rdate; | ||
| 30 | + }, | ||
| 31 | + | ||
| 32 | + /** | ||
| 33 | + * 生命周期函数--监听页面初次渲染完成 | ||
| 34 | + */ | ||
| 35 | + onReady: function () { | ||
| 36 | + | ||
| 37 | + }, | ||
| 38 | + | ||
| 39 | + /** | ||
| 40 | + * 生命周期函数--监听页面显示 | ||
| 41 | + */ | ||
| 42 | + onShow: function () { | ||
| 43 | + | ||
| 44 | + }, | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * 生命周期函数--监听页面隐藏 | ||
| 48 | + */ | ||
| 49 | + onHide: function () { | ||
| 50 | + | ||
| 51 | + }, | ||
| 52 | + | ||
| 53 | + /** | ||
| 54 | + * 生命周期函数--监听页面卸载 | ||
| 55 | + */ | ||
| 56 | + onUnload: function () { | ||
| 57 | + | ||
| 58 | + }, | ||
| 59 | + radioChange(e){ | ||
| 60 | + let val=util.val(e); | ||
| 61 | + console.log(val); | ||
| 62 | + this.remind_date=0; | ||
| 63 | + if(val>0){ | ||
| 64 | + this.remind_date=parseInt(this.rdate)-parseInt(val*60); | ||
| 65 | + } | ||
| 66 | + }, | ||
| 67 | + remind(){ | ||
| 68 | + App.Reserve.SetRelaSuccess({ | ||
| 69 | + rid:this.id, | ||
| 70 | + openid:getApp().openid, | ||
| 71 | + remind_date:this.remind_date | ||
| 72 | + }).then(res=>{ | ||
| 73 | + wx.navigateBack() | ||
| 74 | + }) | ||
| 75 | + } | ||
| 76 | +}) |
pages/customer/remind.json
0 → 100644
pages/customer/remind.wxml
0 → 100644
| 1 | +<!--pages/customer/remind.wxml--> | ||
| 2 | +<nav hasHome>设置提醒</nav> | ||
| 3 | +<view class="page"> | ||
| 4 | + <view class="reminds"> | ||
| 5 | + <radio-group class="radio-group" bindchange="radioChange" > | ||
| 6 | + <label class="radio" wx:for="{{reminds}}" wx:key="reminds.key"> | ||
| 7 | + <radio value="{{item.val}}" color="#262628"/>{{item.label}} | ||
| 8 | + </label> | ||
| 9 | + </radio-group> | ||
| 10 | + </view> | ||
| 11 | + <formids bindclick="remind"> | ||
| 12 | + <view class="share-but">确定</view> | ||
| 13 | + </formids> | ||
| 14 | +</view> |
pages/customer/remind.wxss
0 → 100644
| 1 | +/* pages/customer/remind.wxss */ | ||
| 2 | +.page{ | ||
| 3 | + width: 90%; | ||
| 4 | + margin: 0 5%; | ||
| 5 | + color:#353535; | ||
| 6 | +} | ||
| 7 | +.reminds{ | ||
| 8 | + font-size: 34rpx; | ||
| 9 | + margin: 102rpx 5% 0; | ||
| 10 | +} | ||
| 11 | +.reminds label{ | ||
| 12 | + display: flex; | ||
| 13 | + display: -webkit-flex; | ||
| 14 | + justify-content: space-between; | ||
| 15 | + align-items:center; | ||
| 16 | + flex-direction: row-reverse; | ||
| 17 | + -webkit-flex-direction: row-reverse; | ||
| 18 | + line-height: 48rpx; | ||
| 19 | + margin-bottom: 102rpx; | ||
| 20 | + height: 48rpx; | ||
| 21 | +} | ||
| 22 | +.reminds label.radio radio{ | ||
| 23 | + | ||
| 24 | +} | ||
| 25 | +.reminds label.radio radio[checked]{ | ||
| 26 | + | ||
| 27 | +} | ||
| 28 | +.share-but{ | ||
| 29 | + color:#FEFEFE; | ||
| 30 | + background: #262628; | ||
| 31 | + width: 100%; | ||
| 32 | + line-height: 80rpx; | ||
| 33 | + font-size: 34rpx; | ||
| 34 | + text-align: center; | ||
| 35 | +} |
| @@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
| 30 | "list": [] | 30 | "list": [] |
| 31 | }, | 31 | }, |
| 32 | "miniprogram": { | 32 | "miniprogram": { |
| 33 | - "current": 6, | 33 | + "current": 11, |
| 34 | "list": [ | 34 | "list": [ |
| 35 | { | 35 | { |
| 36 | "id": 0, | 36 | "id": 0, |
| @@ -107,6 +107,18 @@ | @@ -107,6 +107,18 @@ | ||
| 107 | "pathName": "pages/book/b_info", | 107 | "pathName": "pages/book/b_info", |
| 108 | "query": "year=2018&date=08-23&time=18:30", | 108 | "query": "year=2018&date=08-23&time=18:30", |
| 109 | "scene": "1001" | 109 | "scene": "1001" |
| 110 | + }, | ||
| 111 | + { | ||
| 112 | + "id": 11, | ||
| 113 | + "name": "pages/customer/remind", | ||
| 114 | + "pathName": "pages/customer/remind", | ||
| 115 | + "query": "id=21&rdate=153745200", | ||
| 116 | + "scene": "1044", | ||
| 117 | + "shareInfo": { | ||
| 118 | + "groupName": "测试模拟群1", | ||
| 119 | + "shareName": "8DEbIRpK4pa9mH_QY2vU4ZUKYPuI97WoQ4BQoFej-Q8@cr4dev", | ||
| 120 | + "shareKey": "PZhnqMlY2TnRuHhATyGeSamVmBQUDXXr_WtjRSddeeFK17UAiOP-HNOdhxiEN7PFub5S1DjAeUl0IXOdW-VDqg~~" | ||
| 121 | + } | ||
| 110 | } | 122 | } |
| 111 | ] | 123 | ] |
| 112 | } | 124 | } |
| @@ -51,10 +51,11 @@ function rpc(host='',act,data={},fouce=false,header={},silence=true,cachetime=0, | @@ -51,10 +51,11 @@ function rpc(host='',act,data={},fouce=false,header={},silence=true,cachetime=0, | ||
| 51 | if(!silence){ | 51 | if(!silence){ |
| 52 | wx.showLoading({ | 52 | wx.showLoading({ |
| 53 | title: '数据加载中', | 53 | title: '数据加载中', |
| 54 | + mask:true | ||
| 54 | }) | 55 | }) |
| 55 | } | 56 | } |
| 56 | return new Promise((success,fail)=>{ | 57 | return new Promise((success,fail)=>{ |
| 57 | - let openid = wx.getStorageSync('openid'); | 58 | + let openid = wx.getStorageSync('customer_openid'); |
| 58 | let formids = wx.getStorageSync('formids'); | 59 | let formids = wx.getStorageSync('formids'); |
| 59 | if(formids){ | 60 | if(formids){ |
| 60 | wx.removeStorage({key:'formids'}); | 61 | wx.removeStorage({key:'formids'}); |
-
Please register or login to post a comment