Commit 56cec9d7e8568a494708b8b5df498831503d6531

Authored by wangfan
1 parent 1b33ea5e

seller

... ... @@ -5,11 +5,19 @@ Component({
item:Object
},
data:{
vitem:null
},
attached(){
let item=this.data.item;
item.table_ids=item.tid.split(',');
item.phone_mask=item.phone.replace(/(\d{2})(.{5})(\d{3})/,function($0,$1,$2,$3){
return $1+'**'+$3;
})
this.setData({vitem:item})
},
methods:{
detail:function(e){
var obj=e.currentTarget.dataset.obj;
var obj=this.data.vitem;
var path='';
var i=0;
for (var key in obj){
... ...
<view class="book-list-tds flex-lr font30r black-font" data-obj="{{item}}" bindtap="detail">
<view class="book-list-td flex-cc">
<view class="book-list-info font-more-two" style="display:block;">{{item.name}}</view>
<view class="book-list-tds flex-lr font30r black-font" bindtap="detail">
<view class="book-list-td flex-vc">
<view class="Medium" style="font-size: 30rpx;">{{vitem.name}}</view>
<view class="Medium" style="font-size: 28rpx;" wx:if="{{vitem.table_ids.length>1}}">等{{vitem.table_ids.length}}桌</view>
</view>
<view class="book-list-td flex-cc">{{item.order_time}}</view>
<view class="book-list-td flex-cc">
<block wx:if="{{item.status==1}}">已预订</block>
<block wx:if="{{item.status==2}}">点餐中</block>
<view class="book-list-td flex-cc">{{vitem.order_time}}</view>
<view class="book-list-td flex-vc">
<view class="Medium">{{vitem.rname}}</view>
<view class="Medium">{{vitem.phone_mask}}</view>
</view>
<view class="book-list-td flex-rr green-font">查看详情</view>
<view class="book-list-td flex-rr green-font">通知订座人</view>
</view>
\ No newline at end of file
... ...
... ... @@ -37,7 +37,7 @@ Component({
if(e.detail.errMsg=='getUserInfo:ok'){
var userInfo = e.detail.userInfo //avatarUrl nickName gender;
console.log('xxxxx',userInfo)
util.cache('userInfo',userInfo);
App.Reserve.AddUser({
openid: getApp().openid,
avatar: userInfo.avatarUrl,
... ...
... ... @@ -87,8 +87,11 @@ Page({
duration:2000,
success:function(){
setTimeout(function () {
wx.navigateBack({
delta: 2
// wx.navigateBack({
// delta: 2
// })
wx.reLaunch({
url:util.http_build_query(json.data,'b_detail')
})
},2500)
}
... ...
{
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"navigationBarTitleText":"定个座儿",
"navigationBarTitleText":"订个座儿",
"backgroundTextStyle": "light",
"usingComponents": {
... ...
... ... @@ -100,8 +100,12 @@ Page({
topic:this.topicVal
})
}
let nickname="";
try{
nickname='"'+util.cache('userInfo').nickName+'"';
}catch(e){}
return {
title: this.topicVal,
title: nickname+'给你发送了一个订座信息,点击查看详情',
path: '/pages/customer/index?id='+this.id+'&fromid='+getApp().openid,
}
}
... ...
{
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"navigationBarTitleText":"定个座儿",
"navigationBarTitleText":"订个座儿",
"usingComponents": {
"userinfo": "/components/userinfo/userinfo",
"formids":"/components/formids/formids"
... ...
... ... @@ -30,13 +30,14 @@
"list": []
},
"miniprogram": {
"current": 10,
"current": 0,
"list": [
{
"id": 0,
"name": "预定本",
"pathName": "pages/book/b_index",
"query": "sellerid=1"
"query": "seller_id=1&seller_openid=o9pcQ0cbjRKnRWczcOJaaSRGP1lE",
"scene": "1001"
},
{
"id": 1,
... ...
... ... @@ -740,7 +740,7 @@ module.exports = {
http_build_query(obj,url=''){
let ps=[]
for(let i in obj){
if(typeof obj[i]=='undefined') continue;
if(typeof obj[i]=='undefined' || obj[i]==null) continue;
ps.push(i+'='+obj[i].toString())
}
ps=ps.join('&');
... ...