Commit d16732cc19a3bc7eaae58c1006b2f45a1d03ac6a

Authored by wangfan
1 parent f0ff6b44

v2 customer view

... ... @@ -36,12 +36,15 @@ Component({
methods: {
init(){
if(this.data.detail && this.data.detail.rdate){
let masterMan=(this.data.detail.rname||'')+' ('
+this.data.detail.phone
.replace(/([\d]{2}).*([\d]{4})/,function($0,$1,$2){
return $1+'*'+$2
})
+')';
let masterMan=(this.data.detail.rname||'');
if(this.data.detail.phone){
masterMan+=' ('+
this.data.detail.phone
.replace(/([\d]{2}).*([\d]{4})/,function($0,$1,$2){
return $1+'*'+$2
})
+')';
}
this.setData({
rdateStr:util.unixtoTime(this.data.detail.rdate,'MM月DD日 HH:II'),
tableSubInfo:(this.data.detail.tableFirst||'')+' '+(this.data.detail.tableSubInfo||''),
... ...
... ... @@ -38,7 +38,7 @@
{{masterMan}}
</view>
</view>
<view class="seller opt">
<view>
<slot></slot>
</view>
</view>
... ...
... ... @@ -55,10 +55,10 @@ Page({
},
/**
* 页面相关事件处理函数--监听用户下拉动作
* 用户点击右上角分享
*/
onPullDownRefresh: function () {
onShareAppMessage: function () {
return this.shareSetting();
},
getDetail(fouce=false){
App.Reserve.Detail({
... ... @@ -120,9 +120,9 @@ Page({
this.getDetail(true);
})
}else{
wx.navigateTo({
url:'invite?id='+this.id,
});
// wx.navigateTo({
// url:'invite?id='+this.id,
// });
}
},
reserveCancel(){
... ... @@ -133,5 +133,22 @@ Page({
}).then(res=>{
this.getDetail(true);
})
},
shareSetting(){
console.log('this.topicVal',this.topicVal)
if(this.topicVal && this.data.detail.openid==getApp().openid){
App.Reserve.SetTopicFromShare({
rid:this.id,
topic:this.topicVal
})
}
let nickname="";
try{
nickname=util.cache('userInfo').nickName;
}catch(e){}
return {
title: nickname+'给你发了一个邀请,点击查看',
path: '/pages/customer/index?id='+this.id+'&fromid='+getApp().openid+'&invite_name='+nickname,
}
}
})
\ No newline at end of file
... ...
... ... @@ -7,6 +7,7 @@
"manager": "/components/manager/manager",
"nav":"/components/nav/nav",
"card":"/components/seller-card/seller-card",
"formids":"/components/formids/formids"
"formids":"/components/formids/formids",
"userinfo-share": "/components/userinfo/share"
}
}
\ No newline at end of file
... ...
... ... @@ -16,9 +16,12 @@
<formids url="./remind?id={{detail.id}}&rdate={{detail.rdate}}">
<view class="opt-button">提醒</view>
</formids>
<userinfo binduserinfo="userinfo">
<userinfo-share
binduserinfo="userinfo"
bindshare="share"
share="{{detail}}">
<view class="opt-button">分享日程</view>
</userinfo>
</userinfo-share>
</block>
</view>
</card>
... ...
... ... @@ -130,7 +130,11 @@
font-size: 30rpx;
margin-top: 26rpx;
}
.opt{
padding: 0 36rpx 36rpx;
height: 50rpx;
line-height: 50rpx;
}
.opt .opt-button{
width: 120rpx;
height: 40rpx;
... ...