Commit 7eac5b19c0ef507115d13b74d9b5cdb4922f0d7b

Authored by wangfan
1 parent a5944268

v2 发起人页面及组件

... ... @@ -211,4 +211,18 @@ image{
.Medium{
font-weight: 400;
}
.button-none {
display: inline-block;
padding-left: 0;
padding-right: 0;
box-sizing: border-box;
font-size: inherit;
text-align: center;
text-decoration: none;
line-height: inherit;
-webkit-tap-highlight-color: transparent;
color: inherit;
width:100%;
border-radius: 0;
}
\ No newline at end of file
... ...
// components/seller-card/seller-card.js
import util from '../../utils/util';
Component({
/**
* 组件的属性列表
*/
properties: {
seller:Object,
detail:{
type:Object,
value:{},
observer:function(){
console.log('observer',arguments);
this.init();
}
},
},
/**
* 组件的初始数据
*/
data: {
rdateStr:"",
tableSubInfo:"",
},
attached(){
},
detached(){
},
/**
* 组件的方法列表
*/
methods: {
init(){
if(this.data.detail && this.data.detail.rdate){
this.setData({
rdateStr:util.unixtoTime(this.data.detail.rdate,'MM月DD日 HH:II'),
tableSubInfo:this.data.detail.tableFirst+' '+this.data.detail.tableSubInfo,
})
}
}
}
})
... ...
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--components/seller-card/seller-card.wxml-->
<view class="card">
<view class="seller flex-lr">
<view class="flex-ll">
<view class="avatar">
<image src="{{seller.seller_image}}"></image>
</view>
<view class="name Medium">{{seller.sellername}}</view>
</view>
<view class="more">
<image src="/pages/image/click.png"></image>
</view>
</view>
<view class="context flex-lr">
<view class="left info Medium">
<view class="label">时间</view>
<view class="value">{{rdateStr}}</view>
</view>
<view class="line"></view>
<view class="right info Medium">
<view class="label">包间</view>
<view class="value">{{tableSubInfo}}</view>
</view>
</view>
<view class="seller address flex-ll">
<view class="gps-icon">
<image src="/pages/image/gps-icon.png"></image>
</view>
<view>
{{seller.map_address}}
</view>
</view>
<view class="opt"></view>
</view>
... ...
/* components/seller-card/seller-card.wxss */
@import "../../app.wxss";
.card{
border-radius: 10rpx;
box-shadow: 2rpx 2rpx 14rpx 6rpx rgba(231,228,228,.5);
}
.seller{
padding: 36rpx;
height: 50rpx;
line-height: 50rpx;
}
.seller .avatar{
width: 60rpx;
height: 60rpx;
min-width: 60rpx;
border-radius: 50%;
}
.seller .more{
width: 14rpx;
height: 26rpx;
min-width: 14rpx;
}
.seller image{
width: 100%;
height: 100%;
display: inherit;
}
.seller .name{
font-size: 36rpx;
margin-left: 20rpx;
color:#AD7644;
}
.context{
background-color: #E6EBEE;
width: 100%;
padding: 30rpx 0;
height: 160rpx;
}
.context .left,.context .right{
width: 49%;
min-width: 49%;
}
.context .line{
width: 2rpx;
background-color: #D8D6D6;
height: 160rpx;
color: #353535;
}
.info {
text-indent: 40rpx;
}
.info .label{
font-size: 26rpx;
height: 36rpx;
line-height: 36rpx;
}
.info .value{
font-size: 36rpx;
height: 50rpx;
line-height: 50rpx;
margin-top: 6rpx;
font-weight: bold;
}
.address{
font-size: 30rpx;
color: #999999;
line-height: 70rpx;
height: 70rpx;
}
.gps-icon{
width: 28rpx;
height: 34rpx;
min-width: 28rpx;
margin-right: 20rpx;
}
\ No newline at end of file
... ...
// components/userinfo/share.js
Component({
/**
* 组件的属性列表
*/
properties: {
share:Object,
},
/**
* 组件的初始数据
*/
data: {
hasShare:false,
},
attached(){
this.init();
},
ready () {
},
detached(){
},
/**
* 组件的方法列表
*/
methods: {
init(){
wx.getStorage({
key:'userInfo',
success:()=>{
this.setData({
hasShare:true
})
}
})
},
userinfo(e){
console.log('userinfo-share',e);
this.triggerEvent("userinfo",e.detail);
}
},
})
... ...
{
"component": true,
"usingComponents": {
"userinfo": "/components/userinfo/userinfo"
}
}
\ No newline at end of file
... ...
<!--components/userinfo/share.wxml-->
<block wx:if="{{!hasShare}}">
<userinfo binduserinfo="userinfo" class="share-but-view">
<slot></slot>
</userinfo>
</block>
<block wx:else="">
<button class="button-none" open-type="share" data-id="{{share.id}}">
<slot></slot>
</button>
</block>
\ No newline at end of file
... ...
/* components/userinfo/share.wxss */
@import "../../app.wxss";
\ No newline at end of file
... ...
... ... @@ -10,4 +10,5 @@
-webkit-tap-highlight-color: transparent;
color: inherit;
width:100%;
border-radius: 0;
}
\ No newline at end of file
... ...
... ... @@ -57,7 +57,8 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage: function () {
console.log('onShareAppMessage',arguments)
return this.shareSetting();
},
formatDatail(detail){
detail.rdateStr=util.unixtoTime(detail.rdate,'MM月DD日 WW HH:II');
... ... @@ -87,9 +88,27 @@ Page({
}
})
},
userinfo(){
wx.navigateTo({
url:'invite?id='+this.id,
});
userinfo(e){
console.log('userinfo',e)
// wx.navigateTo({
// url:'invite?id='+this.id,
// });
},
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
... ...
... ... @@ -3,8 +3,9 @@
"navigationBarTextStyle": "black",
"navigationBarTitleText":"订座详情",
"usingComponents": {
"userinfo": "/components/userinfo/userinfo",
"userinfo-share": "/components/userinfo/share",
"manager": "/components/manager/manager",
"nav":"/components/nav/nav"
"nav":"/components/nav/nav",
"card":"/components/seller-card/seller-card"
}
}
\ No newline at end of file
... ...
... ... @@ -3,66 +3,50 @@
<view class="page">
<view class="flex-vc success">
<view class="icon">
<image src="http://qn.colorcun.com/custom/lite-yd/image/success-ok.png"></image>
<icon type="success" size="47" color="#C8B16D"/>
</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" bindtap="lookLocation">
<view class="avatar">
<image src="{{detail.seller.seller_image}}" mode="aspectFill"></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 class="hr" style="margin-top: 52rpx;margin-bottom: 48rpx;"></view>
<view class="detail-info Medium">
<userinfo-share
binduserinfo="userinfo"
bindshare="share"
share="{{detail}}"
class="share-but-view">
<view class="share-but Regular">邀请同行的朋友</view>
</userinfo-share>
<card seller="{{detail.seller}}" detail="{{detail}}"></card>
<view class="detail-info Medium" style="margin-top: 56rpx;">
<view class="flex-lr">
<view>用餐时间</view>
<view class="detail-info-right">{{detail.rdateStr}}</view>
</view>
<view class="flex-lr" style="margin-top: 43rpx;">
<view>预定座位</view>
<view class="detail-info-right">{{detail.tableFirst}}
<text class="tableSubInfo">{{detail.tableSubInfo}}</text>
</view>
<view>预订人</view>
<view class="detail-info-right">{{detail.rname}}</view>
</view>
<view class="flex-lr" style="margin-top: 43rpx;">
<view>用餐人数</view>
<view class="detail-info-right">{{detail.pnum}}人</view>
</view>
<view class="flex-lr" wx:if="{{detail.cusman}}" style="margin-top: 43rpx;">
<view class="flex-lr" wx:if="{{detail.cusman}}"
style="margin-top: 43rpx;"
bindtap="{{(detail.cusman_phone || detail.cusman_account)?'showManager':''}}">
<view>客户经理</view>
<view class="detail-info-right">{{detail.cusman||''}}</view>
<view class="detail-info-right"
style="{{(detail.cusman_phone || detail.cusman_account)?'text-decoration: underline;':''}}"
>{{detail.cusman||''}}</view>
</view>
<view class="flex-lr" wx:if="{{detail.cusman_phone || detail.cusman_account}}" style="margin-top: 24rpx;">
<view></view>
<view class="detail-info-right" style="text-decoration: underline"
bindtap="showManager">联系客户经理</view>
<view class="flex-lr" style="margin-top: 43rpx;">
<view>备注信息</view>
<view class="detail-info-right">{{detail.cusdem}}</view>
</view>
</view>
<view class="hr" style="margin-top: 56rpx;margin-bottom: 50rpx;"></view>
<view class="detail-info Medium" style="line-height: 48rpx; margin-bottom: 80rpx;">
<view class="hr" style="margin-top: 52rpx;margin-bottom: 48rpx;"></view>
<view class="detail-info Medium">
<view class="flex-lr">
<view>预 定 人</view>
<view class="detail-info-right">{{detail.rname}}</view>
<view>退订政策</view>
</view>
<view class="flex-lr" wx:if="{{detail.phone}}">
<view>手机号码</view>
<view class="detail-info-right">{{detail.phone}}</view>
</view>
<view class="flex-lr" wx:if="{{detail.cusdem}}">
<view>备注信息</view>
<view class="detail-info-right">{{detail.cusdem}}</view>
<view class="flex-lr" style="margin-top: 43rpx;">
<view>免费退订,已提前点菜,交押金,无法退订</view>
</view>
</view>
<view style="height: 50rpx;"></view>
</view>
<manager manager="{{detail}}" id="manager"></manager>
... ...
... ... @@ -9,13 +9,13 @@
height: 100%;
}
.success .icon{
width: 120rpx;
height: 120rpx;
margin-top: 10rpx;
width: 94rpx;
height: 94rpx;
margin-top: 44rpx;
}
.success .title{
font-size: 36rpx;
margin-top: 32rpx;
margin-top: 38rpx;
margin-bottom: 26rpx;
}
.success .info{
... ... @@ -23,8 +23,8 @@
color:#999999
}
.share-but-view{
margin-top: 76rpx;
margin-bottom: 96rpx;
margin-top: 58rpx;
margin-bottom: 20rpx;
display: block;
}
.share-but{
... ...
... ... @@ -73,7 +73,7 @@
"id": 6,
"name": "pages/customer/index",
"pathName": "pages/customer/index",
"query": "id=",
"query": "id=17",
"scene": "1044",
"shareInfo": {
"groupName": "测试模拟群1",
... ...