Showing
11 changed files
with
251 additions
and
24 deletions
| @@ -6,7 +6,8 @@ | @@ -6,7 +6,8 @@ | ||
| 6 | "pages/book/b_info", | 6 | "pages/book/b_info", |
| 7 | "pages/book/b_desk", | 7 | "pages/book/b_desk", |
| 8 | "pages/customer/index", | 8 | "pages/customer/index", |
| 9 | - "pages/customer/detail_owner" | 9 | + "pages/customer/detail_owner", |
| 10 | + "pages/customer/detail_customer" | ||
| 10 | ], | 11 | ], |
| 11 | "window": { | 12 | "window": { |
| 12 | "backgroundTextStyle": "light", | 13 | "backgroundTextStyle": "light", |
| 1 | <block wx:if="{{hasOpen}}"> | 1 | <block wx:if="{{hasOpen}}"> |
| 2 | <view class="mask" bindtap="close"></view> | 2 | <view class="mask" bindtap="close"></view> |
| 3 | <view class="opt flex-vc"> | 3 | <view class="opt flex-vc"> |
| 4 | - <view bindtap="makePhoneCall" class="item"> | 4 | + <view bindtap="makePhoneCall" class="item" wx:if="{{manager.cusman_phone}}"> |
| 5 | <view class="one"> | 5 | <view class="one"> |
| 6 | 呼叫电话 <text>{{manager.cusman_phone}}</text> | 6 | 呼叫电话 <text>{{manager.cusman_phone}}</text> |
| 7 | </view> | 7 | </view> |
| 8 | </view> | 8 | </view> |
| 9 | - <view bindtap="setClipboardData" class="item"> | 9 | + <view bindtap="setClipboardData" class="item" wx:if="{{manager.cusman_account}}"> |
| 10 | <view class="one"> | 10 | <view class="one"> |
| 11 | 复制微信 <text>{{manager.cusman_account}}</text> | 11 | 复制微信 <text>{{manager.cusman_account}}</text> |
| 12 | </view> | 12 | </view> |
| @@ -40,7 +40,7 @@ Component({ | @@ -40,7 +40,7 @@ Component({ | ||
| 40 | 40 | ||
| 41 | App.Reserve.AddUser({ | 41 | App.Reserve.AddUser({ |
| 42 | openid: getApp().openid, | 42 | openid: getApp().openid, |
| 43 | - headerimg: userInfo.avatarUrl, | 43 | + avatar: userInfo.avatarUrl, |
| 44 | nickname: userInfo.nickName, | 44 | nickname: userInfo.nickName, |
| 45 | gender: userInfo.gender | 45 | gender: userInfo.gender |
| 46 | }) | 46 | }) |
pages/customer/detail_customer.js
0 → 100644
| 1 | +// pages/customer/detail_owner.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 | + detail:null, | ||
| 12 | + }, | ||
| 13 | + id:null, | ||
| 14 | + /** | ||
| 15 | + * 生命周期函数--监听页面加载 | ||
| 16 | + */ | ||
| 17 | + onLoad: function (options) { | ||
| 18 | + this.id=options.id; | ||
| 19 | + }, | ||
| 20 | + | ||
| 21 | + /** | ||
| 22 | + * 生命周期函数--监听页面初次渲染完成 | ||
| 23 | + */ | ||
| 24 | + onReady: function () { | ||
| 25 | + | ||
| 26 | + }, | ||
| 27 | + | ||
| 28 | + /** | ||
| 29 | + * 生命周期函数--监听页面显示 | ||
| 30 | + */ | ||
| 31 | + onShow: function () { | ||
| 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 | + }) | ||
| 40 | + }, | ||
| 41 | + | ||
| 42 | + /** | ||
| 43 | + * 生命周期函数--监听页面隐藏 | ||
| 44 | + */ | ||
| 45 | + onHide: function () { | ||
| 46 | + | ||
| 47 | + }, | ||
| 48 | + | ||
| 49 | + /** | ||
| 50 | + * 生命周期函数--监听页面卸载 | ||
| 51 | + */ | ||
| 52 | + onUnload: function () { | ||
| 53 | + | ||
| 54 | + }, | ||
| 55 | + | ||
| 56 | + /** | ||
| 57 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
| 58 | + */ | ||
| 59 | + onPullDownRefresh: function () { | ||
| 60 | + | ||
| 61 | + }, | ||
| 62 | + | ||
| 63 | + formatDatail(detail){ | ||
| 64 | + detail.rdateStr=util.unixtoTime(detail.rdate,'MM月DD日 WW HH:II'); | ||
| 65 | + detail.tableFirst=detail.tables[0].name; | ||
| 66 | + if(detail.tables.length>1){ | ||
| 67 | + detail.tableSubInfo='等'+(detail.tables.length)+'个' | ||
| 68 | + +(detail.tables[0].tid==2?'包间':''); | ||
| 69 | + } | ||
| 70 | + if(!detail.cusman){ | ||
| 71 | + detail.cusman='vking'; | ||
| 72 | + detail.cusman_phone='15877556369'; | ||
| 73 | + detail.cusman_account='wx:vking'; | ||
| 74 | + } | ||
| 75 | + return detail; | ||
| 76 | + }, | ||
| 77 | + showManager(){ | ||
| 78 | + this.selectComponent('#manager').show(); | ||
| 79 | + }, | ||
| 80 | + lookLocation:function(){ | ||
| 81 | + wx.openLocation({ | ||
| 82 | + latitude:Number(this.data.detail.seller.lat), | ||
| 83 | + longitude:Number(this.data.detail.seller.long), | ||
| 84 | + scale:17, | ||
| 85 | + address:this.data.detail.seller.map_address, | ||
| 86 | + success:function (res) { | ||
| 87 | + console.log(res) | ||
| 88 | + } | ||
| 89 | + }) | ||
| 90 | + }, | ||
| 91 | + | ||
| 92 | +}) |
pages/customer/detail_customer.json
0 → 100644
pages/customer/detail_customer.wxml
0 → 100644
| 1 | +<!--pages/customer/detail_owner.wxml--> | ||
| 2 | +<view class="page"> | ||
| 3 | + <view class="tip">{{detail.rname}} 给你发了一个邀请:</view> | ||
| 4 | + <view class="card"> | ||
| 5 | + <view class="top"> | ||
| 6 | + <view class="title">{{detail.topic?'#'+detail.topic+'#':''}}</view> | ||
| 7 | + </view> | ||
| 8 | + <view class="bottom"> | ||
| 9 | + <view class="rdateStr">{{detail.rdateStr}}</view> | ||
| 10 | + <view class="seller flex-lr" bindtap="lookLocation"> | ||
| 11 | + <view class="avatar"> | ||
| 12 | + <image src="{{detail.seller.seller_image}}"></image> | ||
| 13 | + </view> | ||
| 14 | + <view class="seller-info"> | ||
| 15 | + <view class="name Medium">{{detail.seller.sellername}}</view> | ||
| 16 | + <view class="addr">{{detail.seller.map_address}}</view> | ||
| 17 | + </view> | ||
| 18 | + <view class="addr-icon"> | ||
| 19 | + <image src="../image/gps-icon.png"></image> | ||
| 20 | + </view> | ||
| 21 | + </view> | ||
| 22 | + <view>{{detail.tableFirst}} {{detail.tableSubInfo}}</view> | ||
| 23 | + <view class="flex-lr" bindtap="showManager"> | ||
| 24 | + <view class="">容客户经理-{{detail.cusman}}</view> | ||
| 25 | + <view style="text-decoration: underline">联系客户经理</view> | ||
| 26 | + </view> | ||
| 27 | + </view> | ||
| 28 | + </view> | ||
| 29 | + <userinfo binduserinfo="userinfo" class="share-but-view"> | ||
| 30 | + <view class="share-but Regular">我愿意</view> | ||
| 31 | + </userinfo> | ||
| 32 | + <view class="line-text"> | ||
| 33 | + <view class="text"> | ||
| 34 | + <view>{{detail.customers.length}}人参与</view> | ||
| 35 | + </view> | ||
| 36 | + </view> | ||
| 37 | + <view> | ||
| 38 | + <block wx:for="{{detail.customers}}" wx:key="detail.customers.key"> | ||
| 39 | + <view class="flex-lr customers"> | ||
| 40 | + <view class="flex-ll"> | ||
| 41 | + <image src="{{item.headimgurl}}" class="avatar" mode="aspectFill"></image> | ||
| 42 | + <view>{{item.nickname}}</view> | ||
| 43 | + </view> | ||
| 44 | + <view>{{item.openid==detail.openid?'发起人':'已接受'}}</view> | ||
| 45 | + </view> | ||
| 46 | + </block> | ||
| 47 | + </view> | ||
| 48 | +</view> | ||
| 49 | +<manager manager="{{detail}}" id="manager"></manager> |
pages/customer/detail_customer.wxss
0 → 100644
| 1 | +/* pages/customer/detail_customer.wxss */ | ||
| 2 | +.page{ | ||
| 3 | + width: 94%; | ||
| 4 | + margin: 0 3%; | ||
| 5 | + color:#353535; | ||
| 6 | +} | ||
| 7 | +.seller{ | ||
| 8 | + height: 84rpx; | ||
| 9 | +} | ||
| 10 | +.seller .avatar{ | ||
| 11 | + min-width: 60rpx; | ||
| 12 | + width: 60rpx; | ||
| 13 | + height: 60rpx; | ||
| 14 | + background: #ccc; | ||
| 15 | +} | ||
| 16 | +.seller image{ | ||
| 17 | + width:100%; | ||
| 18 | + height: 100%; | ||
| 19 | +} | ||
| 20 | +.seller .seller-info{ | ||
| 21 | + width: 60rpx; | ||
| 22 | + height: 84rpx; | ||
| 23 | + width:100%; | ||
| 24 | + padding: 0 14rpx; | ||
| 25 | +} | ||
| 26 | +.seller .addr-icon{ | ||
| 27 | + min-width: 32rpx; | ||
| 28 | + width: 32rpx; | ||
| 29 | + height: 34rpx; | ||
| 30 | +} | ||
| 31 | +.seller .name{ | ||
| 32 | + font-size: 30rpx; | ||
| 33 | +} | ||
| 34 | +.seller .addr{ | ||
| 35 | + font-size: 26rpx; | ||
| 36 | +} | ||
| 37 | +.hr{ | ||
| 38 | + border-top: 2rpx solid #F1F0F4; | ||
| 39 | +} | ||
| 40 | +.share-but-view{ | ||
| 41 | + margin-top: 76rpx; | ||
| 42 | + margin-bottom: 96rpx; | ||
| 43 | + display: block; | ||
| 44 | +} | ||
| 45 | +.share-but{ | ||
| 46 | + color:#FEFEFE; | ||
| 47 | + background: #262628; | ||
| 48 | + width: 100%; | ||
| 49 | + line-height: 80rpx; | ||
| 50 | + font-size: 34rpx; | ||
| 51 | + text-align: center; | ||
| 52 | +} | ||
| 53 | +.line-text{ | ||
| 54 | + border-top: 2rpx solid #F1F0F4; | ||
| 55 | + position: relative; | ||
| 56 | + text-align: center; | ||
| 57 | + width:50%; | ||
| 58 | + margin: 0 auto; | ||
| 59 | + font-size: 26rpx; | ||
| 60 | +} | ||
| 61 | +.line-text .text{ | ||
| 62 | + position: absolute; | ||
| 63 | + top:-16rpx; | ||
| 64 | + width:100%; | ||
| 65 | +} | ||
| 66 | +.line-text .text view{ | ||
| 67 | + width:100rpx; | ||
| 68 | + margin: 0 auto; | ||
| 69 | + background-color: #fff; | ||
| 70 | +} | ||
| 71 | +.customers{ | ||
| 72 | + | ||
| 73 | +} | ||
| 74 | +.customers .avatar{ | ||
| 75 | + width:80rpx; | ||
| 76 | + height:80rpx; | ||
| 77 | + border-radius: 50%; | ||
| 78 | +} |
| @@ -54,20 +54,6 @@ Page({ | @@ -54,20 +54,6 @@ Page({ | ||
| 54 | }, | 54 | }, |
| 55 | 55 | ||
| 56 | /** | 56 | /** |
| 57 | - * 页面相关事件处理函数--监听用户下拉动作 | ||
| 58 | - */ | ||
| 59 | - onPullDownRefresh: function () { | ||
| 60 | - | ||
| 61 | - }, | ||
| 62 | - | ||
| 63 | - /** | ||
| 64 | - * 页面上拉触底事件的处理函数 | ||
| 65 | - */ | ||
| 66 | - onReachBottom: function () { | ||
| 67 | - | ||
| 68 | - }, | ||
| 69 | - | ||
| 70 | - /** | ||
| 71 | * 用户点击右上角分享 | 57 | * 用户点击右上角分享 |
| 72 | */ | 58 | */ |
| 73 | onShareAppMessage: function () { | 59 | onShareAppMessage: function () { |
| @@ -90,5 +76,16 @@ Page({ | @@ -90,5 +76,16 @@ Page({ | ||
| 90 | showManager(){ | 76 | showManager(){ |
| 91 | this.selectComponent('#manager').show(); | 77 | this.selectComponent('#manager').show(); |
| 92 | }, | 78 | }, |
| 79 | + lookLocation:function(){ | ||
| 80 | + wx.openLocation({ | ||
| 81 | + latitude:Number(this.data.detail.seller.lat), | ||
| 82 | + longitude:Number(this.data.detail.seller.long), | ||
| 83 | + scale:17, | ||
| 84 | + address:this.data.detail.seller.map_address, | ||
| 85 | + success:function (res) { | ||
| 86 | + console.log(res) | ||
| 87 | + } | ||
| 88 | + }) | ||
| 89 | + }, | ||
| 93 | 90 | ||
| 94 | }) | 91 | }) |
| @@ -5,12 +5,12 @@ | @@ -5,12 +5,12 @@ | ||
| 5 | <image src="http://qn.colorcun.com/custom/lite-yd/image/success-ok.png"></image> | 5 | <image src="http://qn.colorcun.com/custom/lite-yd/image/success-ok.png"></image> |
| 6 | </view> | 6 | </view> |
| 7 | <view class="title Medium">订座成功</view> | 7 | <view class="title Medium">订座成功</view> |
| 8 | - <view class="info">你可以将订座信息发送给朋友,邀请朋友参加</view> | 8 | + <view class="info">你可以将订座信息发送给朋友,邀请朋友参加并及时获知朋友们的反馈</view> |
| 9 | </view> | 9 | </view> |
| 10 | <userinfo binduserinfo="userinfo" class="share-but-view"> | 10 | <userinfo binduserinfo="userinfo" class="share-but-view"> |
| 11 | <view class="share-but Regular">去邀请</view> | 11 | <view class="share-but Regular">去邀请</view> |
| 12 | </userinfo> | 12 | </userinfo> |
| 13 | - <view class="seller flex-lr"> | 13 | + <view class="seller flex-lr" bindtap="lookLocation"> |
| 14 | <view class="avatar"> | 14 | <view class="avatar"> |
| 15 | <image src="{{detail.seller.seller_image}}"></image> | 15 | <image src="{{detail.seller.seller_image}}"></image> |
| 16 | </view> | 16 | </view> |
| @@ -41,15 +41,16 @@ Page({ | @@ -41,15 +41,16 @@ Page({ | ||
| 41 | openid: opt.openid, | 41 | openid: opt.openid, |
| 42 | rid: opt.id | 42 | rid: opt.id |
| 43 | }).then(res => { | 43 | }).then(res => { |
| 44 | - if (!res.owner_openid) {//无预订人 | 44 | + if (!res.data.openid) {//无预订人 |
| 45 | url = 'detail_owner'; | 45 | url = 'detail_owner'; |
| 46 | } else { | 46 | } else { |
| 47 | url = 'detail_customer'; | 47 | url = 'detail_customer'; |
| 48 | - if (res.owner_openid == opt.openid) { | ||
| 49 | - url = 'detail_owner'; | 48 | + if (res.data.openid == opt.openid) { |
| 49 | + //url = 'detail_owner'; | ||
| 50 | } | 50 | } |
| 51 | } | 51 | } |
| 52 | url+='?id='+opt.id | 52 | url+='?id='+opt.id |
| 53 | + console.log('wx.redirectTo',url,res); | ||
| 53 | wx.redirectTo({url: url}); | 54 | wx.redirectTo({url: url}); |
| 54 | }).catch(res=>{ | 55 | }).catch(res=>{ |
| 55 | wx.redirectTo({url: url}); | 56 | wx.redirectTo({url: url}); |
-
Please register or login to post a comment