Commit 3f736ba960a690105159e41891e43d97a2ee0163

Authored by wangfan
1 parent 41229037

customer

... ... @@ -6,7 +6,8 @@
"pages/book/b_info",
"pages/book/b_desk",
"pages/customer/index",
"pages/customer/detail_owner"
"pages/customer/detail_owner",
"pages/customer/detail_customer"
],
"window": {
"backgroundTextStyle": "light",
... ...
<block wx:if="{{hasOpen}}">
<view class="mask" bindtap="close"></view>
<view class="opt flex-vc">
<view bindtap="makePhoneCall" class="item">
<view bindtap="makePhoneCall" class="item" wx:if="{{manager.cusman_phone}}">
<view class="one">
呼叫电话 <text>{{manager.cusman_phone}}</text>
</view>
</view>
<view bindtap="setClipboardData" class="item">
<view bindtap="setClipboardData" class="item" wx:if="{{manager.cusman_account}}">
<view class="one">
复制微信 <text>{{manager.cusman_account}}</text>
</view>
... ...
... ... @@ -40,7 +40,7 @@ Component({
App.Reserve.AddUser({
openid: getApp().openid,
headerimg: userInfo.avatarUrl,
avatar: userInfo.avatarUrl,
nickname: userInfo.nickName,
gender: userInfo.gender
})
... ...
// pages/customer/detail_owner.js
import util from '../../utils/util';
import App from '../../utils/api';
const {regeneratorRuntime} = global
Page({
/**
* 页面的初始数据
*/
data: {
detail:null,
},
id:null,
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.id=options.id;
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
App.Reserve.Detail({
openid: getApp().openid,
rid: this.id
}).then(res => {
this.setData({
detail:this.formatDatail(res.data)
})
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
formatDatail(detail){
detail.rdateStr=util.unixtoTime(detail.rdate,'MM月DD日 WW HH:II');
detail.tableFirst=detail.tables[0].name;
if(detail.tables.length>1){
detail.tableSubInfo='等'+(detail.tables.length)+'个'
+(detail.tables[0].tid==2?'包间':'');
}
if(!detail.cusman){
detail.cusman='vking';
detail.cusman_phone='15877556369';
detail.cusman_account='wx:vking';
}
return detail;
},
showManager(){
this.selectComponent('#manager').show();
},
lookLocation:function(){
wx.openLocation({
latitude:Number(this.data.detail.seller.lat),
longitude:Number(this.data.detail.seller.long),
scale:17,
address:this.data.detail.seller.map_address,
success:function (res) {
console.log(res)
}
})
},
})
\ No newline at end of file
... ...
{
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"navigationBarTitleText":"订座详情",
"usingComponents": {
"userinfo": "/components/userinfo/userinfo",
"manager": "/components/manager/manager"
}
}
\ No newline at end of file
... ...
<!--pages/customer/detail_owner.wxml-->
<view class="page">
<view class="tip">{{detail.rname}} 给你发了一个邀请:</view>
<view class="card">
<view class="top">
<view class="title">{{detail.topic?'#'+detail.topic+'#':''}}</view>
</view>
<view class="bottom">
<view class="rdateStr">{{detail.rdateStr}}</view>
<view class="seller flex-lr" bindtap="lookLocation">
<view class="avatar">
<image src="{{detail.seller.seller_image}}"></image>
</view>
<view class="seller-info">
<view class="name Medium">{{detail.seller.sellername}}</view>
<view class="addr">{{detail.seller.map_address}}</view>
</view>
<view class="addr-icon">
<image src="../image/gps-icon.png"></image>
</view>
</view>
<view>{{detail.tableFirst}} {{detail.tableSubInfo}}</view>
<view class="flex-lr" bindtap="showManager">
<view class="">容客户经理-{{detail.cusman}}</view>
<view style="text-decoration: underline">联系客户经理</view>
</view>
</view>
</view>
<userinfo binduserinfo="userinfo" class="share-but-view">
<view class="share-but Regular">我愿意</view>
</userinfo>
<view class="line-text">
<view class="text">
<view>{{detail.customers.length}}人参与</view>
</view>
</view>
<view>
<block wx:for="{{detail.customers}}" wx:key="detail.customers.key">
<view class="flex-lr customers">
<view class="flex-ll">
<image src="{{item.headimgurl}}" class="avatar" mode="aspectFill"></image>
<view>{{item.nickname}}</view>
</view>
<view>{{item.openid==detail.openid?'发起人':'已接受'}}</view>
</view>
</block>
</view>
</view>
<manager manager="{{detail}}" id="manager"></manager>
\ No newline at end of file
... ...
/* pages/customer/detail_customer.wxss */
.page{
width: 94%;
margin: 0 3%;
color:#353535;
}
.seller{
height: 84rpx;
}
.seller .avatar{
min-width: 60rpx;
width: 60rpx;
height: 60rpx;
background: #ccc;
}
.seller image{
width:100%;
height: 100%;
}
.seller .seller-info{
width: 60rpx;
height: 84rpx;
width:100%;
padding: 0 14rpx;
}
.seller .addr-icon{
min-width: 32rpx;
width: 32rpx;
height: 34rpx;
}
.seller .name{
font-size: 30rpx;
}
.seller .addr{
font-size: 26rpx;
}
.hr{
border-top: 2rpx solid #F1F0F4;
}
.share-but-view{
margin-top: 76rpx;
margin-bottom: 96rpx;
display: block;
}
.share-but{
color:#FEFEFE;
background: #262628;
width: 100%;
line-height: 80rpx;
font-size: 34rpx;
text-align: center;
}
.line-text{
border-top: 2rpx solid #F1F0F4;
position: relative;
text-align: center;
width:50%;
margin: 0 auto;
font-size: 26rpx;
}
.line-text .text{
position: absolute;
top:-16rpx;
width:100%;
}
.line-text .text view{
width:100rpx;
margin: 0 auto;
background-color: #fff;
}
.customers{
}
.customers .avatar{
width:80rpx;
height:80rpx;
border-radius: 50%;
}
\ No newline at end of file
... ...
... ... @@ -54,20 +54,6 @@ Page({
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
... ... @@ -90,5 +76,16 @@ Page({
showManager(){
this.selectComponent('#manager').show();
},
lookLocation:function(){
wx.openLocation({
latitude:Number(this.data.detail.seller.lat),
longitude:Number(this.data.detail.seller.long),
scale:17,
address:this.data.detail.seller.map_address,
success:function (res) {
console.log(res)
}
})
},
})
\ No newline at end of file
... ...
... ... @@ -5,12 +5,12 @@
<image src="http://qn.colorcun.com/custom/lite-yd/image/success-ok.png"></image>
</view>
<view class="title Medium">订座成功</view>
<view class="info">你可以将订座信息发送给朋友,邀请朋友参加</view>
<view class="info">你可以将订座信息发送给朋友,邀请朋友参加并及时获知朋友们的反馈</view>
</view>
<userinfo binduserinfo="userinfo" class="share-but-view">
<view class="share-but Regular">去邀请</view>
</userinfo>
<view class="seller flex-lr">
<view class="seller flex-lr" bindtap="lookLocation">
<view class="avatar">
<image src="{{detail.seller.seller_image}}"></image>
</view>
... ...
... ... @@ -41,15 +41,16 @@ Page({
openid: opt.openid,
rid: opt.id
}).then(res => {
if (!res.owner_openid) {//无预订人
if (!res.data.openid) {//无预订人
url = 'detail_owner';
} else {
url = 'detail_customer';
if (res.owner_openid == opt.openid) {
url = 'detail_owner';
if (res.data.openid == opt.openid) {
//url = 'detail_owner';
}
}
url+='?id='+opt.id
console.log('wx.redirectTo',url,res);
wx.redirectTo({url: url});
}).catch(res=>{
wx.redirectTo({url: url});
... ...
... ... @@ -72,7 +72,7 @@
"id": 6,
"name": "pages/customer/index",
"pathName": "pages/customer/index",
"query": "id=62"
"query": "id=63"
}
]
}
... ...