Commit f9f85abd4685fbd86e6556fb55b35920e76ddbf1

Authored by pengye
1 parent 8083dd87

邀请函主题页面按照模板1,模板2等区分

... ... @@ -55,12 +55,13 @@
"pages/reserve/reserve",
"pages/tcads/cmyy",
"pages/pinglun/video",
"pages/customer/detail_owner_invitation_new1",
"pages/me/coupon_news",
"pages/me/wananchi",
"pages/pinglun/createOpinion",
"pages/pinglun/opinionSuccess",
"pages/customer/detail_owner_invitation_new2"
"pages/customer/detail_owner_invitation1",
"pages/customer/detail_owner_invitation4",
"pages/customer/detail_owner_invitation6"
],
"requiredPrivateInfos": [
"getLocation",
... ...
// pages/customer/detail_owner1.js
var mta = require('mta-wechat-analysis')
import util from '../../utils/util';
import App from '../../utils/api';
import TP from '../../utils/tpls';
import RS from '../../utils/reserveStatus'
const {
regeneratorRuntime
} = global
import ST from '../../utils/sms_tpls';
Page({
/**
* 页面的初始数据
*/
data: {
detail: null,
height: 667,
current: 0,
tpls: [],
seller: {
name: '',
room: '',
date: '',
addr: ''
},
options: {
tplid: ''
},
hasOwner: true, //是否为发起人
animation: 'animation',
couponhidden: true,
getcoupon: false,
menuhidden: true,
selecthidden: true,
morehidden: true,
openid: getApp().openid
},
id: null,
msgTpl: '',
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.id = options.id
let param = {
options: options,
hasOwner: options.hasSellerShare == 1, //是否为发起人
}
param.tpls = [TP.tpls(options.tplid)]
this.setData(param)
mta.Page.init({
"appID": "500667280",
"eventID": "500667287",
"statPullDownFresh": true,
"statShareApp": true,
"statReachBottom": true,
"lauchOpts": options, //渠道分析
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
//导航栏自适应
let systemInfo = wx.getSystemInfoSync();
let reg = /ios/i;
let pt = 20; //导航状态栏上内边距
let h = 44; //导航状态栏高度
if (reg.test(systemInfo.system)) {
pt = systemInfo.statusBarHeight;
h = 44;
} else {
pt = systemInfo.statusBarHeight;
h = 48;
}
this.setData({
statusBarHeight: pt,
titleBarHeight: h,
height: systemInfo.windowHeight
})
this.getDetail(getCurrentPages().length == 1);
},
cloudsendmsg() {
wx.cloud.callFunction({
name: 'sms',
data: {
content: '测试发送短信息年底是否会iv',
path: 'index.html?id=' + this.data.options.id + '&hasInvation=1&hasSellerShare=1&uid=' + this.data.options.uid,
phoneNumberList: ['15735929096']
},
success: (res) => {
console.log('success', res)
},
fail: (fail) => {
console.log('fail', res)
}
})
},
cli() {
wx.setClipboardData({
data: this.data.staffinfo.wechat,
success(res) {
wx.getClipboardData({
success(res) {
console.log(res.data) // data
}
})
}
})
},
call() {
wx.reportMonitor('1012', 1)
wx.makePhoneCall({
phoneNumber: this.data.staffinfo.phone
})
},
test(e) {
console.log('ttttttttttttttt');
// App.Contact.UploadCustomerMedia({url:this.data.staffinfo.qrcode}).then((json)=>{
// if(json.ret==200) {
// console.log('json')
// }
// })
},
addwechat() {
// wx.previewImage({
// current: this.data.staffinfo.qrcode, // 当前显示图片的http链接
// urls: [this.data.staffinfo.qrcode] // 需要预览的图片http链接列表
// })
wx.reportMonitor('1011', 1)
util.cache('staffinfo', this.data.staffinfo);
wx.navigateTo({
url: './wechat?qrcode=' + this.data.staffinfo.qrcode
})
},
getstaffinfo() {
App.Activity.GetCustomerActivityBaseinfo({
sellerid: this.data.detail.seller.id,
uid: this.data.options.uid
}).then((json) => {
if (json.ret == 200) {
console.log(json)
this.setData({
staffinfo: json.data
})
}
})
},
getroomimage() {
App.Tables.GetTablesPhoto({
sellerid: this.data.detail.seller.id,
tableids: this.tablestr
}).then((json) => {
if (json.ret == 200) {
this.setData({
roomimage: json.data
})
var urlsArr = [];
json.data.forEach((v, i) => {
urlsArr.push(v.url);
})
this.urlsValue = urlsArr;
console.log(urlsArr, 'lllllll')
}
})
},
lookroom() {
wx.previewImage({
current: '', // 当前显示图片的http链接
urls: this.urlsValue, // 需要预览的图片http链接列表
})
},
secondbook() {
wx.reportMonitor('1013', 1)
if (this.data.list) {
wx.navigateTo({
url: './discount?sid=' + this.data.detail.seller.id + '&id=' + this.data.options.id
})
} else {
wx.redirectTo({
url: '../reserve/detail?id=' + this.data.detail.seller.id
})
}
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
return this.sharesetting();
},
onShareTimeline() {
return this.sharesetting();
},
getDetail(fouce = false) {
App.Reserve.Detail({
openid: getApp().openid,
rid: this.data.options.id
}, fouce).then(res => {
let tables = [],
regions = [],
tabaleids = [];
res.data.tables.forEach(t => {
tables.push(t.name);
tabaleids.push(t.id);
if (regions.indexOf('t.rname') == -1) {
regions.push(t.rname);
}
})
this.tablestr = tabaleids.toString();
let reserev = RS.reserve(res.data)
console.log('reserev', reserev)
let dateSmart
if (res.data.type == 1) {
dateSmart = util.unixtoTime(reserev.ddate, this.data.tpls[this.data.current].timeStrSmart[0])
if (res.data.is_set_ddate == 1) {
dateSmart += ' ' + util.unixtoTime(reserev.ddate, this.data.tpls[this.data.current].timeStrSmart[1])
} else {
dateSmart += ' ' + reserev.soltName
}
} else {
dateSmart = util.unixtoTime(reserev.ddate, this.data.tpls[this.data.current].timeStr)
}
this.setData({
detail: this.formatDatail(reserev, dateSmart),
seller: {
name: reserev.seller.sellername,
room: tables.join('、'),
date: dateSmart,
region: regions.join('、'),
addr: reserev.seller.real_address || reserev.seller.map_address,
image: reserev.image_url,
hasOwner: true,
type: reserev.type,
is_set_ddate: reserev.is_set_ddate,
hasUpTime: reserev.type == 1 && reserev.hasRunning && reserev.status != 2,
tel: reserev.seller.seller_tel.split(',')[0]
}
})
if (this.data.detail.type == 0 || this.data.detail.type == 1) {
this.getstaffinfo();
this.getroomimage();
this.getactivity();
}
/*
App.Reserve.SellerInfo({seller_id:reserev.seller.id}).then(async sc=>{
this.msgTpl=await ST.getTplMsg(reserev,sc.data.setting.template_code,sc.data)
console.log('this.msgTpl',this.msgTpl);
})*/
})
App.SendSMS.GetSmsContent({
rid: this.data.options.id,
}).then(res => {
this.msgTpl = res.data.content
})
},
formatDatail(detail, dateSmart) {
detail.rdateStr = dateSmart;
detail.tableFirst = detail.tables[0].name;
if (detail.tables.length > 1) {
detail.tableSubInfo = '等' + (detail.tables.length) + '个' +
(detail.tables[0].tid == 2 ? '包间' : '');
}
if (detail.rname && detail.sex != 3) {
detail.rnameStr = detail.rname.substr(0, 1) + (detail.sex == 1 ? '先生' : '女士')
} else {
detail.rnameStr = detail.rname
}
detail.eatStr = '邀请您共进晚餐';
let hi = util.unixtoTime(detail.ddate, 'HHII');
if (hi < '10:00') {
detail.eatStr = '邀请您共进早餐';
} else if (hi < '15:00') {
detail.eatStr = '邀请您共进午餐';
}
// if(!detail.cusman){
// detail.cusman='vking';
// detail.cusman_phone='15877556369';
// detail.cusman_account='wx:vking';
// }
//detail=RS.reserve(detail);
return detail;
},
showManager() {
if (this.data.detail.cusman_phone || this.data.detail.cusman_account) {
this.selectComponent('#manager').show();
}
},
looklocation: function () {
wx.reportMonitor('1015', 1)
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)
}
})
},
userinfo() {
if (!this.data.detail.hasCanSuccess) {
let userInfo = util.cache('userInfo');
if (userInfo) {
userInfo = JSON.stringify({
openid: getApp().openid,
avatar: userInfo.avatarUrl,
nickname: userInfo.nickName,
gender: userInfo.gender
})
}
App.Reserve.SetRelaSuccess({
rid: this.id,
openid: getApp().openid,
is_agree: 1,
userinfo: userInfo
}).then(res => {
App.Reserve.Detail({
openid: getApp().openid,
rid: this.id
}, 'clear')
wx.navigateTo({
//id={{detail.id}}&rdate={{detail.rdate}}
url: 'remind?id=' + this.id + '&rdate=' + this.data.detail.rdate,
});
})
} else {
// wx.navigateTo({
// url:'invite?id='+this.id,
// });
}
},
setUserInfoSuccess() {
util.toast('授权成功,可以继续转发', 'none');
},
toast() {
util.toast('本区域暂无配送人员', 'none');
},
reserveCancel() {
let userInfo = util.cache('userInfo');
if (userInfo) {
userInfo = JSON.stringify({
openid: getApp().openid,
avatar: userInfo.avatarUrl,
nickname: userInfo.nickName,
gender: userInfo.gender
})
}
App.Reserve.SetRelaSuccess({
rid: this.id,
openid: getApp().openid,
cancel: 'cancel',
is_agree: 0,
userinfo: userInfo
}).then(res => {
this.getDetail(true);
})
},
sharesetting() {
wx.reportMonitor('1017', 1)
let parmdata = {
id: this.id,
fromid: getApp().openid,
hasInvitation: 1,
tplid: this.data.options.tplid,
}
if (this.data.options.uid) {
parmdata.uid = this.data.options.uid;
}
return {
title: this.data.tpls[0].shareTitle,
path: util.http_build_query(parmdata, '/pages/customer/index'),
imageUrl: this.data.tpls[0].shareImage,
}
},
cookbook() {
if (this.data.detail.order && this.data.detail.order.cookbooklist.length > 0) {
wx.navigateTo({
url: util.http_build_query({
rid: this.id,
oid: this.data.detail.order.id,
identity: 1
}, '/pack-cookbook/pages/success')
});
} else {
App.Advance.CreateOrder({
rid: this.id,
openid: getApp().openid,
}).then(res => {
if (res.ret != 200) {
return util.toast(res.msg, 'none')
}
wx.navigateTo({
url: util.http_build_query({
rid: this.id,
oid: res.data.id,
identity: 1,
sid: res.data.sellerid
}, '/pack-cookbook/pages/index')
});
})
}
},
sendmsg() {
wx.setClipboardData({
data: this.msgTpl
})
},
upTime() {
this.selectComponent('#ddate').show();
},
ddateEvent(e) {
console.log(e.detail.ddate)
this.getDetail(true)
},
gotoHome() {
wx.switchTab({
url: '/pages/reserve/index'
})
},
load(e) {
console.log(e, 'care')
},
setcoupon() {
if (this.data.list && this.data.list.length > 0) {
let list = this.data.list,
liststr = [];
list.forEach((v, i) => {
liststr.push(v.id);
})
App.Activity.SetActivityAsReserve({
aid: liststr.toString()
}).then((json) => {
if (json.ret == 200) {
this.setData({
getcoupon: true
})
}
})
}
},
tohref() {
let systemInfo = wx.getSystemInfoSync();
let reg = /ios/i;
if (reg.test(systemInfo.system)) {
wx.showModal({
content: '关注"周到安排"公众号,及时获取更多优惠信息',
comfirmText: '去关注',
comfirmColor: '#5EB2FF',
cancelText: '取消',
cancelColor: '#999999',
success: (res) => {
if (res.confirm) {
wx.setClipboardData({
data: '周到安排',
success(res) {
wx.getClipboardData({
success(res) {
console.log(res.data) // data
}
})
}
})
}
}
})
} else {
wx.navigateTo({
url: './care'
})
}
},
getactivity() {
App.Activity.GetActivityByRid({
rid: this.id
}).then((json) => {
if (json.ret == 200) {
console.log(json.data);
this.setData({
list: json.data
})
this.setcoupon();
}
})
},
todetail(e) {
let aid = e.currentTarget.dataset.id;
console.log(aid)
wx.navigateTo({
url: '../me/coupon_detail?aid=' + aid
})
},
close() {
this.setData({
couponhidden: true,
})
},
checkout() {
if (this.data.detail.status == 0) {
this.selectComponent('#showModal').options({
header: '您点早啦!',
body: '商家分配包间后,您可以通过在线买单支付,无需到前台结账排队等发票。'
}).show();
} else {
wx.navigateTo({
url: util.http_build_query({
rid: this.data.detail.id,
sid: this.data.detail.sid
}, '/pack-checkout/pages/index')
})
}
},
showmenu() {
this.setData({
menuhidden: false
})
},
hidemenu() {
this.setData({
menuhidden: true
})
},
noopen(e) {
let mark = e.currentTarget.dataset.mark;
wx.showToast({
title: '该商家未开通' + (mark == 'buy' ? '提前点餐' : '在线买单'),
duration: 2000,
mask: true
})
},
noopenservice() {
wx.showToast({
title: '当前城市暂未开通该服务,敬请期待',
icon: 'none'
})
},
showselect() {
wx.reportMonitor('1014', 1)
if (this.data.selecthidden == false) {
this.closeselect();
} else {
this.setData({
selecthidden: false
})
}
},
closeselect() {
console.log('ttttt')
this.setData({
selecthidden: true
})
},
showmore() {
if (this.data.morehidden == false) {
this.closemore();
} else {
this.setData({
morehidden: false
})
}
},
closemore() {
this.setData({
morehidden: true
})
},
cancelmodal() {
wx.showModal({
title: '取消预订',
content: '点击“确认取消”撤回当前预订,否则点击返回',
confirmColor: '#576B95',
confirmText: '确认取消',
cancelColor: '#999999',
cancelText: '返回',
success: (res) => {
if (res.confirm) {
this.cancelSubmit();
}
}
})
},
cancelSubmit() {
App.Reserve.Detail({
openid: getApp().openid,
rid: this.options.id
}, 'clear')
App.Customer.SetReserveStatusByUser({
rid: this.options.id,
desc: '',
}).then(res => {
if (res.ret != 200) {
return util.toast(res.msg, 'none')
}
})
},
})
\ No newline at end of file
... ...
{
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "订座详情",
"usingComponents": {
"userinfo": "/components/userinfo/userinfo",
"nav": "/components/nav/nav",
"formids": "/components/formids/formids",
"ddate": "/components/reserve/invitation/ddate",
"a2l": "/components/tips/add-to-lite",
"userinfo-share": "/components/userinfo/share",
"service": "/components/tips/service",
"showModal": "/components/tips/showModal/showModal"
}
}
\ No newline at end of file
... ...
<!--pages/customer/detail_owner1.wxml-->
<wxs src="../../utils/util.wxs" module="util" />
<import src="../../tpl/invitation"></import>
<nav backgroundColor="rgba(0,0,0,0)" hasHome style="position: fixed;z-index: 1;" class="navhome" place="{{true}}">
</nav>
<!-- 内部预定 -->
<block wx:if="{{detail}}">
<showModal id="showModal" confirmText="知道了" bindshowModal="showModal" cla="checkout"></showModal>
<scroll-view class="last-book-bg" style="line-height: 1.4;height:{{height}}px;" scroll-y>
<view style="height:{{statusBarHeight+titleBarHeight}}px;"></view>
<view class="book-flower" style="top:{{statusBarHeight+titleBarHeight}}px;"></view>
<view style="padding-left: 40rpx;box-sizing: border-box;">
<view class="last-book-staff flex-vr" style="align-items: flex-end;">
<image src="{{staffinfo.photo}}" class="book-staff-headerimg" mode="aspectFit"></image>
<view class="flex-rr" style="margin-bottom: 20rpx;">
<view class="flex-rr font26r yellow-font">客户经理:{{staffinfo.name}}</view>
<view class="book-staff-item-button flex-cc" bindtap="cli">
<image src="http://nosqn.colorcun.com/book-wechat.png" class="book-header-icon"></image>
<view class="font22r brown-font">复制微信号</view>
</view>
</view>
<view class="flex-rr">
<view class="flex-rr font26r yellow-font">{{staffinfo.phone ? staffinfo.phone : seller.tel}}</view>
<view class="book-staff-item-button flex-cc" bindtap="call">
<image src="http://nosqn.colorcun.com/book-phone.png" class="book-header-icon"></image>
<view class="font22r brown-font">拨打电话</view>
</view>
</view>
</view>
<view class="book-font"></view>
<view class="flex-lr" style="padding-right: 40rpx;box-sizing: border-box;align-items: flex-start;">
<view class="yellow-font font44r" style="max-width:428rpx;margin-bottom: 60rpx;">{{seller.name}}</view>
<block wx:if="{{detail.seller.is_open_order==1 && !detail.hasOvered && !detail.hasCancel}}">
<block wx:if="{{detail && detail.seller.is_open_order==1}}">
<view class="last-book-food flex-cc" bindtap="cookbook">
<view class="white-font font30r smooth" style="color: #043341;">提前点餐</view>
<image src="http://nosqn.colorcun.com/book-direction.png" style="width: 12rpx;height: 24rpx;margin-left: 10rpx;"></image>
<view class="notice"></view>
</view>
</block>
<block wx:else>
<view class="last-book-food flex-ll" bindtap="noopen" data-mark="buy">
<view class="white-font font30r smooth">提前点餐</view>
<image src="http://nosqn.colorcun.com/book-direction.png" style="width: 12rpx;height: 24rpx;margin-left: 10rpx;"></image>
<view class="notice"></view>
</view>
</block>
</block>
</view>
<view>
<view class="font26r" style="color: #C9BD89;margin-bottom: 20rpx;">已为您安排在包间</view>
<view class="font40r" style="color: #E8D47E;margin-bottom: 20rpx;">{{seller.region}}</view>
<view class="book-room-rect flex-cc">
<view class="font44r yellow-font">{{seller.room}}</view>
<view class="book-look-button brown-font font22r flex-cc" wx:if="{{roomimage && roomimage.length>0}}" bindtap="lookroom">浏览照片</view>
<view class="book-look-button gray-font font22r flex-cc" wx:else style="background: #CCCCCC;">浏览照片</view>
</view>
<view class="yellow-font font30r" style="margin-bottom: 24rpx;">时间:{{seller.date}}</view>
<view class="flex-lr" style="line-height: 1.2;padding-right: 40rpx;box-sizing: border-box;">
<view class="yellow-font font30r">地址:{{seller.addr}}</view>
<view class="loaction-button black-font font22r flex-cc" bindtap="looklocation">一键导航</view>
</view>
</view>
</view>
<view style="height: 240rpx;"></view>
</scroll-view>
<view class="all-button flex-lr">
<block wx:if="{{detail.hasCancel}}">
<view class="book-item-font flex-cc">
<image src="http://nosqn.colorcun.com/book-share-nouse-button.png" class="button-item-icon"></image>
<view class="font30r" style="color: #999999;">转发好友</view>
</view>
</block>
<block wx:else>
<button class="book-item-font flex-cc" open-type="share">
<image src="http://nosqn.colorcun.com/book-share-button.png" class="button-item-icon"></image>
<view class="font30r">转发好友</view>
</button>
</block>
<view class="book-item-font second-book-button flex-cc" bindtap="secondbook" style="position: relative;">
<image src="http://nosqn.colorcun.com/second-book.png" class="button-item-icon"></image>
<view class="font30r">再次预订</view>
<view class="notice" style="top: -10rpx;right: 0rpx;"></view>
</view>
<view class="line-border"></view>
<block wx:if="{{list}}">
<view class="book-notice flex-vc">
<view class="white-font font26r flex-cc">再次预订可享“{{list[0].aname}}”优惠</view>
<view class="angel"></view>
</view>
</block>
</view>
<view class="book-mask" hidden="{{selecthidden}}" bindtap="closeselect"></view>
<view class="book-buttons">
<view class="select-button white-font font28r flex-cc" bindtap="showselect">选项</view>
<view hidden="{{selecthidden}}">
<navigator class="select-item-button flex-cc white-font font24r" style="left: 75rpx;bottom:290rpx;" open-type="redirect" url="/pages/customer/index?islove=custom">首页</navigator>
<navigator class="select-item-button flex-cc white-font font24r" style="left: 150rpx;bottom:160rpx;" open-type="redirect" url="/pages/me/index">我的</navigator>
<block wx:if="{{detail.hasCancel}}">
<view class="select-item-button flex-cc gray-font font28r" style="left: 75rpx;bottom:30rpx;">取消订单</view>
</block>
<block wx:else>
<view class="select-item-button flex-cc white-font font24r" style="left: 75rpx;bottom:30rpx;" bindtap="cancelmodal">取消订单</view>
</block>
<!-- <view class="select-item-button flex-cc white-font font24r" style="left: 42rpx;bottom:10rpx;" bindtap="closeselect">返回</view> -->
</view>
</view>
<view class="book-mask" hidden="{{morehidden}}" bindtap="closemore"></view>
<view class="service-buttons">
<view class="more-button white-font font28r flex-vc" bindtap="showmore" hidden="true">更多<view>服务</view>
</view>
<view hidden="{{morehidden}}">
<view class="select-item-button flex-cc gray-font font24r" style="right: 39rpx;bottom:681rpx;" bindtap="noopenservice">酒水</view>
<view class="select-item-button flex-cc gray-font font24r" style="right: 136rpx;bottom:599rpx;" bindtap="noopenservice">代驾</view>
<view class="select-item-button flex-cc gray-font font24r" style="right: 136rpx;bottom:473rpx;" bindtap="noopenservice">酒店</view>
<view class="select-item-button flex-cc gray-font font24r" style="right: 39rpx;bottom:391rpx;" bindtap="noopenservice">茶楼沐足</view>
<!-- <view class="select-item-button flex-cc white-font font24r" style="right: 0rpx;bottom:368rpx;" bindtap="closemore">返回</view> -->
</view>
</view>
<block wx:if="{{detail.hasCancel}}">
<view class="cancel-mark"></view>
</block>
</block>
<block wx:else>
<block wx:if="{{detail}}">
<view class="pages bg-{{options.tplid}} flex-vc" style="height:{{height}}px;" wx:if="{{options.tplid}}">
<template is="tpl-{{options.tplid}}" data="{{seller,options,hasOwner,animation}}"></template>
<view class="opt-view flex-vc">
<block wx:if="{{!detail.hasOvered && !detail.hasCancel}}">
<button open-type="share" class="button-none flex-vc" catchtap="setUserInfoSuccess">
<view class="buts-share"></view>
</button>
</block>
<block wx:elif="{{detail.hasCancel}}">
<view class="opt-view-tip Medium">订座已取消</view>
</block>
<block wx:else="">
<view class="opt-view-tip Medium">订座已完成</view>
</block>
</view>
</view>
</block>
</block>
<!-- <view class="menu" wx:if="{{detail && detail.type==0 && detail.channel==2}}" bindtap="showmenu"></view> -->
<view class="menu-list flex-vl" style="justify-content: flex-end;" wx:if="{{detail && detail.type==0 && detail.channel==5}}" hidden="{{menuhidden}}" catchtap="hidemenu">
<view class="menu-item menu-seller-item flex-ll" catchtap="secondbook">
<view class="menu-item-image" style="background: url({{detail.seller.seller_image}}) center center no-repeat;background-size: cover;"></view>
<view class="white-font font30r smooth">{{seller.name}}</view>
<view class="click-icon"></view>
</view>
<view class="menu-item menu-seller-item flex-ll" bindtap="secondbook">
<view class="menu-item-image menu-item-book"></view>
<view class="white-font font30r smooth">再次预订</view>
</view>
<block wx:if="{{detail.seller.is_open_order==1 && !detail.hasOvered && !detail.hasCancel}}">
<block wx:if="{{detail && detail.seller.is_open_order==1}}">
<view class="menu-item menu-seller-item flex-ll" bindtap="cookbook">
<view class="menu-item-image menu-item-buy"></view>
<view class="white-font font30r smooth">提前点餐</view>
</view>
</block>
<block wx:else>
<view class="menu-item menu-seller-item flex-ll" bindtap="noopen" data-mark="buy">
<view class="menu-item-image menu-item-buy-nouse"></view>
<view class="gray-font font30r smooth">提前点餐</view>
</view>
</block>
<block wx:if="{{detail && detail.seller.isopen_md==1}}">
<view class="menu-item menu-seller-item flex-ll" bindtap="checkout">
<view class="menu-item-image menu-item-check"></view>
<view class="white-font font30r smooth">在线买单</view>
</view>
</block>
<block wx:else>
<view class="menu-item menu-seller-item flex-ll" bindtap="noopen" data-mark="checkout">
<view class="menu-item-image menu-item-check-nouse"></view>
<view class="gray-font font30r smooth">在线买单</view>
</view>
</block>
</block>
<view class="menu-item menu-seller-item flex-ll" bindtap="hidemenu">
<view class="menu-item-image menu-item-back"></view>
<view class="white-font font30r smooth">返回</view>
</view>
</view>
<view class="bottom flex-lr" wx:if="{{!detail.hasOvered && !detail.hasCancel && detail.channel!=5}}">
<view bindtap="gotoHome" class="dingbaojian flex-vc">
<image src="http://nosqn.colorcun.com/reserve/images/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20191114105901.png" class="icon"></image>
<view class="text">订包间</view>
</view>
<formids bindclick="sendmsg" class="diancan" style="{{detail.seller.is_open_order!=1 && detail.seller.is_open_wine!=1?'width:100%;':''}}">
<view class="buts-text flex-cc">
<image src="http://nosqn.colorcun.com/reserve/images/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_201911141059011.png" class="icon"></image>
短信通知
</view>
</formids>
<userinfo binduserinfo="cookbook" class="diancan left-border" wx:if="{{detail.seller.is_open_order==1}}">
<view class="buts-text flex-cc">
<image src="http://nosqn.colorcun.com/manager-invitation/wx2/%E6%8F%90%E5%89%8D%E7%82%B9%E9%A4%90.png" class="icon"></image>
提前点餐
</view>
</userinfo>
<block wx:if="{{detail.seller.is_open_wine==1}}">
<view class="vline" wx:if="{{detail.seller.is_open_order==1}}"></view>
<formids bindclick="toast" class="jiushui">
<view class="buts-text flex-cc">
<image src="http://nosqn.colorcun.com/manager-invitation/wx2/%E8%87%AA%E5%B8%A6%E9%85%92%E6%B0%B4.png" class="icon"></image>
自带酒水
</view>
</formids>
</block>
</view>
<!--//商务-->
<template name="tpl-1">
<view class="flex-vc shangwu" bindtap="{{options.rid?'goEditor':''}}">
<template is="tpl-shangwu" data="{{...seller,options}}"></template>
</view>
</template>
<!--//温馨-->
<template name="tpl-2">
<template is="tpl-wenxin" data="{{...seller,options}}"></template>
</template>
<ddate id="ddate" order="{{detail}}" wx:if="{{detail}}" bindevent="ddateEvent"></ddate>
<a2l bindshow="a2lshow" bindhide="a2lshow" key="INVIT-OWNER"></a2l>
\ No newline at end of file
... ...
/* pages/customer/detail_customer.wxss1 */
@import "../tpl/tpls.wxss";
.pages {
width: 100%;
background-size: 100%;
font-size: 34rpx;
position: fixed;
left: 0;
top: 0;
bottom: 0;
}
image {
width: 100%;
height: 100%;
}
.buts-share {
background-image: url("http://nosqn.colorcun.com/manager-invitation/wx2/%E5%8F%91%E9%82%80%E8%AF%B7%E5%87%BD.png");
}
.buts-share.customer {
background-image: url("http://nosqn.colorcun.com/manager-invitation/wx/%E7%A1%AE%E8%AE%A4%E6%94%B6%E5%88%B0.png");
}
.shangwu {
margin-top: 52rpx;
}
.shangwu .seller {
margin-bottom: 42rpx;
}
.shangwu .invit-logo.owner {
width: 380rpx;
height: 200rpx;
background-image: url("http://nosqn.colorcun.com/manager-invitation/wx2/%E9%A2%84%E8%AE%A2%E5%AE%89%E6%8E%92.png");
}
.shangwu .invit-logo.customer {
width: 352rpx;
height: 164rpx;
background-image: url("http://nosqn.colorcun.com/custom/lite-yd/image/invit-logo.png");
}
.wenxin-mask {
margin-top: 20rpx;
}
.wenxin-baitou {
margin-top: 20rpx;
}
.wenxin .seller {
margin-bottom: 22rpx;
}
.wenxin .invit-logo.owner {
width: 340rpx;
height: 184rpx;
background-image: url("http://nosqn.colorcun.com/manager-invitation/wx2/%E9%A2%84%E8%AE%A2%E5%AE%89%E6%8E%92-%E6%B8%A9%E9%A6%A8.png");
}
.wenxin .invit-logo.customer {
width: 344rpx;
height: 198rpx;
background-image: url("http://nosqn.colorcun.com/manager-invitation/wx/%E9%82%80%E8%AF%B7%E5%87%BD.png");
}
.bottom {
position: fixed;
bottom: 0;
height: 90rpx;
line-height: 90rpx;
background-color: #ECD9B7;
width: 100%;
font-size: 30rpx;
box-sizing: border-box;
}
.bottom .dingbaojian {
background-color: #262628;
color: #ECD9B7;
min-width: 160rpx;
height: 90rpx;
line-height: 90rpx;
border-top: 2rpx solid #ECD9B7;
box-sizing: border-box;
}
.bottom .dingbaojian .icon {
width: 30rpx;
height: 30rpx;
}
.bottom .dingbaojian .text {
height: 34rpx;
font-size: 24rpx;
color: rgba(236, 217, 183, 1);
line-height: 34rpx;
margin-top: 8rpx;
}
.bottom .sendmsg {
background-color: #262628;
color: #ECD9B7;
min-width: 25%;
}
.bottom .diancan {
text-align: center;
color: #794F28;
height: 66rpx;
line-height: 66rpx;
min-width: 33%;
width: 100%;
}
.bottom .diancan .buts-text {
height: 66rpx;
line-height: 66rpx;
}
.bottom .diancan.left-border {
border-left: 2rpx solid #D3BF9C;
}
.bottom .jiushui {
text-align: center;
color: #794F28;
height: 90rpx;
line-height: 90rpx;
min-width: 33%;
width: 70%;
}
.bottom .diancan .icon {
width: 40rpx;
height: 34rpx;
margin-right: 40rpx;
}
.bottom .jiushui .icon {
width: 32rpx;
height: 38rpx;
margin-right: 40rpx;
}
.buts-text {
height: 90rpx;
line-height: 90rpx;
}
.vline {
background-color: #D3BF9C;
width: 6rpx;
height: 66rpx;
min-width: 6rpx;
}
.opt-view-tip {
font-size: 30rpx;
color: #ccc;
}
.service-view {
width: 88rpx;
height: 64rpx;
background: rgba(0, 0, 0, 0.15);
border-radius: 50rpx;
border: 1rpx solid rgba(255, 255, 255, 0.25);
box-sizing: border-box;
margin-right: 20rpx;
}
.service-icon {
background-image: url("http://nosqn.colorcun.com/shead2.png");
background-size: 100% 100%;
width: 36rpx;
height: 36rpx;
}
.coupon {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, .5);
}
.coupon-content {
width: 658rpx;
position: absolute;
left: 0;
right: 0;
top: 50%;
margin: auto;
}
.coupon-bg {
width: 658rpx;
height: 468rpx;
background: url(http://nosqn.colorcun.com/coupon.jpg) center center no-repeat;
background-size: contain;
}
.coupon-info {
width: 502rpx;
border-radius: 20rpx;
overflow: hidden;
background: #F65636;
position: relative;
top: -152rpx;
margin: 0 auto;
}
.coupon-header {
width: 100%;
height: 152rpx;
}
.coupon-header>view:first-child {
font-size: 48rpx;
}
.coupon-header>view {
background: linear-gradient(to bottom, #FFFFFF, #FAECA5);
-webkit-background-clip: text;
line-height: 1.4;
-webkit-text-fill-color: transparent;
}
.coupon-button {
width: 100%;
padding: 20rpx 0;
line-height: 34rpx;
position: relative;
}
.coupon-list {
width: 502rpx;
max-height: 360rpx;
overflow-y: scroll;
}
.coupon-single {
width: 452rpx;
height: 134rpx;
border-radius: 20rpx;
line-height: 1.4;
margin: 0 auto 16rpx;
background: #FFFFFF;
}
.coupon-main {
width: 310rpx;
height: 100%;
padding-left: 30rpx;
box-sizing: border-box;
}
.coupon-border {
width: 32rpx;
height: 100%;
}
.circle {
width: 20rpx;
height: 10rpx;
background: #F65636;
border: 2rpx solid #F65636;
}
.circle-top {
border-radius: 10rpx 10rpx 0 0;
}
.coupon-line {
width: 2rpx;
height: 114rpx;
background: rgba(246, 86, 54, .2);
}
.circle-bottom {
border-radius: 0 0 10rpx 10rpx;
}
.use-button {
width: 92rpx;
height: 44rpx;
border-radius: 22rpx;
background: #E84033;
color: #FFFFFF;
}
::-webkit-scrollbar {
display: none;
/* Chrome Safari */
}
.care {
width: 380px;
height: 84px;
/* position: absolute;
left: 0;
top: 0; */
/* padding-left: 100rpx; */
box-sizing: border-box;
background: #E84033;
}
.get-button {
background: transparent;
padding: 30rpx 0;
}
.menu {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
position: fixed;
left: 40rpx;
bottom: 80rpx;
background: url(http://nosqn.colorcun.com/invite_menu.png) center center no-repeat;
background-size: contain;
}
.menu-list {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, .69);
z-index: 100;
padding-left: 40rpx;
padding-bottom: 40rpx;
box-sizing: border-box;
}
.menu-item {
height: 100rpx;
margin-bottom: 40rpx;
}
.menu-item-image {
width: 100rpx;
height: 100rpx;
margin-right: 20rpx;
border-radius: 50%;
}
/* .menu-item-book{
width: 100rpx;
height: 100rpx;
border-radius: 50%;
position: fixed;
left: 40rpx;
bottom: 80rpx;
background: url(http://nosqn.colorcun.com/invite_menu.png) center center no-repeat;
background-size: contain;
} */
.menu-list {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, .69);
z-index: 100;
padding-left: 40rpx;
padding-bottom: 40rpx;
box-sizing: border-box;
}
.menu-item {
height: 100rpx;
margin-bottom: 40rpx;
}
.menu-item-image {
width: 100rpx;
height: 100rpx;
margin-right: 20rpx;
border-radius: 50%;
}
.menu-item-book {
background: url(http://nosqn.colorcun.com/menu-book.png) center center no-repeat;
background-size: contain;
}
.menu-item-buy {
background: url(http://nosqn.colorcun.com/menu-buy.png) center center no-repeat;
background-size: contain;
}
.menu-item-buy-nouse {
background: url(http://nosqn.colorcun.com/menu-buy-nouse.png) center center no-repeat;
background-size: contain;
}
.menu-item-check {
background: url(http://nosqn.colorcun.com/menu-check.png) center center no-repeat;
background-size: contain;
}
.menu-item-check-nouse {
background: url(http://nosqn.colorcun.com/menu-check-nouse.png) center center no-repeat;
background-size: contain;
}
.menu-item-back {
background: url(http://nosqn.colorcun.com/menu-back.png) center center no-repeat;
background-size: contain;
}
.click-icon {
width: 12rpx;
height: 12rpx;
border-top: 2rpx solid #FFFFFF;
border-right: 2rpx solid #FFFFFF;
transform: rotate(45deg);
margin-left: -6rpx;
}
.gray-font {
color: #999999;
}
.menu-item-buy {
background: url(http://nosqn.colorcun.com/menu-buy.png) center center no-repeat;
background-size: contain;
}
.menu-item-buy-nouse {
background: url(http://nosqn.colorcun.com/menu-buy-nouse.png) center center no-repeat;
background-size: contain;
}
.menu-item-check {
background: url(http://nosqn.colorcun.com/menu-check.png) center center no-repeat;
background-size: contain;
}
.menu-item-check-nouse {
background: url(http://nosqn.colorcun.com/menu-check-nouse.png) center center no-repeat;
background-size: contain;
}
.menu-item-back {
background: url(http://nosqn.colorcun.com/menu-back.png) center center no-repeat;
background-size: contain;
}
.click-icon {
width: 12rpx;
height: 12rpx;
border-top: 2rpx solid #FFFFFF;
border-right: 2rpx solid #FFFFFF;
transform: rotate(45deg);
margin-left: -6rpx;
}
.gray-font {
color: #999999;
}
.last-book-food {
width: 202rpx;
height: 62rpx;
background: linear-gradient(to right, #E1B275, #FEEFBC, #E1B275);
border-radius: 32rpx;
position: relative;
z-index: 100;
}
.notice {
width: 20rpx;
height: 20rpx;
border-radius: 50%;
position: absolute;
right: -10rpx;
top: 10rpx;
background: #E61010;
}
\ No newline at end of file
... ...
// pages/customer/detail_owner_invitation_new1.js
// pages/customer/detail_owner_invitation6.js
var mta = require('mta-wechat-analysis')
import util from '../../utils/util';
import App from '../../utils/api';
... ... @@ -45,7 +45,8 @@ Page({
is_comments: '0',
is_user_comments: false,
tableinfo: [],
StyleType:'',
StyleType: '',
showMoreTip: true,
},
tablestr: '',
urlsValue: [],
... ... @@ -71,6 +72,26 @@ Page({
"lauchOpts": options, //渠道分析
});
},
onPageScroll: function (event) {
let that = this;
// 获取滚动条的位置
var scrollTop = event.scrollTop;
// 获取屏幕的高度
wx.getSystemInfo({
success(res) {
var screenHeight = res.windowHeight;
if (scrollTop > screenHeight || scrollTop < 10) {
that.setData({
showMoreTip: true
});
} else {
that.setData({
showMoreTip: false
});
}
}
});
},
// 点击了解更多会员优惠政策
gotoFavourableList() {
let url = util.http_build_query({
... ... @@ -90,7 +111,7 @@ Page({
sellerid: this.data.seller.sid,
oid: this.data.detail.id,
types: '1',
previousPage:'1',
previousPage: '1',
}, '/pages/pinglun/createOpinion')
wx.navigateTo({
url
... ... @@ -220,7 +241,7 @@ Page({
hasUpTime: reserev.type == 1 && reserev.hasRunning && reserev.status != 2,
tel: reserev.seller.seller_tel.split(',')[0],
soltName: reserev.soltName,
aa: util.unixtoTime(reserev.ddate, '星期WW HH:II'),
time: util.unixtoTime(reserev.ddate, '星期WW HH:II'),
lat: reserev.seller.lat,
long: reserev.seller.long,
}
... ... @@ -380,7 +401,7 @@ Page({
coupon_dataList,
swich_phone,
is_comments,
StyleType:res.data.type,
StyleType: res.data.type,
}
console.log('获取数据', {
...obj
... ... @@ -428,7 +449,7 @@ Page({
scoreInfo,
swich_phone,
is_comments,
StyleType:res.data.type,
StyleType: res.data.type,
})
if (home && home.red == '1' && home.green == '67' && home.blue == '163') {
this.setData({
... ...
{
"navigationBarBackgroundColor": "#ffffff",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "",
"usingComponents": {
... ...
<!--pages/customer/detail_owner_invitation_new2.wxml-->
<!--pages/customer/detail_owner_invitation4.wxml-->
<nav hasHome class="navhome" place="{{true}}"></nav>
<scroll-view class="last-book-bg" style="line-height: 1.4;height:{{height}}px;" scroll-y>
<scroll-view scroll-y>
<view class="titleImg" style="background: rgba({{homeColor}});">
<image src="{{theme=='green'?'https://qn.colorcun.com/1571679628800_.pic.jpg':theme=='blue'?'https://qn.colorcun.com/1561679628784_.pic.jpg':theme=='blackGold'?'https://qn.colorcun.com/1551679628682_.pic.jpg':''}}" class="titleIcon"></image>
<image src="https://qn.colorcun.com/bj.png" class="bjIcon"></image>
... ... @@ -9,8 +9,8 @@
<view class="title">{{seller.name}}</view>
<view class="leftLine"></view>
<view class="leftInfo font28r">{{seller.date}} {{seller.soltName}}</view>
<view class="leftInfo font28r">{{seller.aa}}</view>
<view class="leftInfo font28r">{{seller.tablesText}}</view>
<view class="leftInfo font28r">{{seller.time}}</view>
<view class="leftInfo font28r tables">{{seller.tablesText}}</view>
</view>
<view class="line"></view>
<view class="right">
... ... @@ -25,7 +25,7 @@
</view>
</view>
<view class="positioning">
<text>地址:{{seller.addr?seller.addr:reserev.seller.map_address}}</text>
<text class="font28r">地址:{{seller.addr?seller.addr:reserev.seller.map_address}}</text>
<view class="font24r orderingFood" bindtap="looklocation">
导航
</view>
... ... @@ -70,7 +70,7 @@
</view>
<navigator url="/pack-activity/pack/buyCoupon?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="font24r orderingFood">
去抢购
抢购
</view>
</navigator>
</view>
... ... @@ -118,7 +118,7 @@
</block>
<view class="specialServices" wx:if="{{detail && detail.seller.is_open_order==1 && marketing && marketing.is_order=='1'}}">
<view class="rubric">
特供服务
提前点餐
</view>
<view class="news">
本店特为贵宾提供提前点餐服务,您现在可以选菜下单,到店就餐时无需等待服务员点餐,可以直接享受就餐服务^_^
... ... @@ -153,7 +153,7 @@
</view>
<navigator url="/pack-activity/pack/vipRecharge?id={{recharge_data.id}}&name={{seller.name}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="font24r orderingFood">
去充值
充值
</view>
</navigator>
</view>
... ... @@ -163,6 +163,10 @@
点击了解更多会员优惠政策
</view>
</view>
<view class="more" wx:if="{{showMoreTip}}">
<view class="moreText">滑动查看更多</view>
<image src="https://qn.colorcun.com/jt1.png" mode="" />
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1'}}" class="{{between?'all-button flex-lr between':'all-button flex-lr sharewidth'}}">
<view wx:if="{{marketing.is_online_book=='1'}}" class="book-item-font second-book-button flex-cc font30r" bindtap="secondbook" style="position: relative;">再次预订
... ... @@ -171,4 +175,4 @@
<button wx:if="{{marketing.is_transpond=='1'}}" class="book-item-font flex-cc font30r shareItem" open-type="share">转发给客人
</button>
</block>
</view>
</view>
\ No newline at end of file
... ...
/* pages/customer/detail_owner_invitation_new2.wxss */
/* pages/customer/detail_owner_invitation4.wxss */
@import "../tpl/tpls.wxss";
.titleImg {
... ... @@ -31,9 +31,10 @@
.title {
text-align: center;
font-family: PingFang SC;
font-size: 40rpx;
color: #CFB53B;
font-family: PingFang SC;
color: #FFD200;
font-weight: 500;
}
.infoBox .left {
... ... @@ -56,7 +57,12 @@
flex-wrap: wrap;
justify-content: flex-end;
word-break: break-all;
line-height: 40rpx;
line-height: 50rpx;
}
.tables {
height: 120rpx;
overflow-y: scroll;
}
... ... @@ -110,10 +116,11 @@
.handlePhone {
height: 100rpx;
color: #515151;
}
.brownFont {
padding: 4rpx 16rpx;
padding: 10rpx 16rpx;
color: #0143A3;
border: 2rpx solid #0143A3;
border-radius: 22rpx;
... ... @@ -134,6 +141,12 @@
color: #999999;
}
.positioning image {
width: 32rpx;
height: 38rpx;
margin-right: 16rpx;
}
.introduce {
box-sizing: border-box;
}
... ... @@ -141,10 +154,13 @@
.imgMask {
position: relative;
margin: 0 40rpx 0 40rpx;
border-bottom: 2rpx solid #DBDBDB;
padding-bottom: 18rpx;
}
.imgMask .text {
color: #515151;
margin-bottom: 20rpx;
}
.IntroduceColor {
... ... @@ -205,6 +221,7 @@
justify-content: flex-end;
height: 60rpx;
margin: 20rpx 0;
padding: 16rpx 0;
}
... ... @@ -220,16 +237,17 @@
}
.preferential {
margin: 16rpx 40rpx 16rpx 40rpx;
margin: 16rpx 40rpx 20rpx 40rpx;
}
.preferentialItems {
border: 2rpx solid #DBDBDB;
border-radius: 16rpx;
padding: 16rpx 16rpx 16rpx 24rpx;
padding: 0 16rpx 0 24rpx;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
background: url('https://qn.colorcun.com/certificateBj.png') no-repeat;
background-size: 100% 100%;
}
.rubric1 {
... ... @@ -239,6 +257,7 @@
.left {
flex: 1;
margin-right: 20rpx;
padding: 16rpx 0;
}
.top {
... ... @@ -327,19 +346,15 @@
.favouredPolicy {
width: 45%;
color: #999999;
color: #5C95D7;
font-family: PingFang SC;
font-weight: 500;
border: 2rpx solid #0244a4;
border: 2rpx solid #5C95D7;
border-radius: 22rpx;
text-align: center;
padding: 10rpx;
}
.last-book-bg {
background: transparent;
}
.all-button {
background: #FAFAFA;
height: 160rpx;
... ... @@ -394,11 +409,12 @@
}
.cook {
height: 100% !important;
background: linear-gradient(104.24deg, rgba(76, 141, 173, 1) -57.47%, rgba(1, 67, 163, 1) 55.72%, rgba(66, 165, 255, 1) 148.72%);
color: #fff !important;
height: 94% !important;
background: #fff;
border: 2rpx solid #0143A3;
border-radius: 32rpx;
font-weight: normal;
width: 27% !important;
width: 23% !important;
}
.bold {
... ... @@ -471,4 +487,25 @@
white-space: nowrap;
width: auto;
overflow-x: scroll;
}
.more {
height: 80rpx;
width: 100%;
position: absolute;
top: 20.2%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
background: rgba(0, 0, 0, .4);
}
.moreText {
color: #fff;
}
.more image {
width: 30rpx;
height: 30rpx;
}
\ No newline at end of file
... ...
// pages/customer/detail_owner_invitation_new1.js
// pages/customer/detail_owner_invitation6.js
var mta = require('mta-wechat-analysis')
import util from '../../utils/util';
import App from '../../utils/api';
import TP from '../../utils/tpls';
import RS from '../../utils/reserveStatus'
Page({
/**
* 页面的初始数据
*/
data: {
options: {
tplid: ''
},
tableNum:0,
detail:{},
staffinfo:{},
between: false,
id: null,
msgTpl: '',
chef: {},
marketing: {},
home: {},
reserve: {},
signboard: {},
store: {},
recharge_data:{},
coupon_dataList:[],
homeColor: '',
stringifyUse:'',
current: 0,
theme: 'blackGold', //blue green blackGold
seller: {
name: '',
tablesText: '',
date: '',
addr: ''
},
priceInfo:'',
scoreInfo:'',
discount:'',
certificate:'',
dataStr:Date.now()*1/1000,
swich_phone:'0',
is_comments:'0',
is_user_comments:false,
StyleType:'',
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.id = options.id
let param = {
options: options,
hasOwner: options.hasSellerShare == 1, //是否为发起人
}
param.tpls = [TP.tpls(options.tplid)]
console.log(param);
console.log(options);
this.setData(param)
mta.Page.init({
"appID": "500667280",
"eventID": "500667287",
"statPullDownFresh": true,
"statShareApp": true,
"statReachBottom": true,
"lauchOpts": options, //渠道分析
});
},
/**
* 页面的初始数据
*/
data: {
options: {
tplid: ''
},
tableNum: 0,
detail: {},
staffinfo: {},
between: false,
id: null,
msgTpl: '',
chef: {},
marketing: {},
home: {},
reserve: {},
signboard: {},
store: {},
recharge_data: {},
coupon_dataList: [],
homeColor: '',
stringifyUse: '',
current: 0,
theme: 'blackGold', //blue green blackGold
seller: {
name: '',
tablesText: '',
date: '',
addr: ''
},
priceInfo: '',
scoreInfo: '',
discount: '',
certificate: '',
dataStr: Date.now() * 1 / 1000,
swich_phone: '0',
is_comments: '0',
is_user_comments: false,
StyleType: '',
showMoreTip: true,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.id = options.id
let param = {
options: options,
hasOwner: options.hasSellerShare == 1, //是否为发起人
}
param.tpls = [TP.tpls(options.tplid)]
console.log(param);
console.log(options);
this.setData(param)
mta.Page.init({
"appID": "500667280",
"eventID": "500667287",
"statPullDownFresh": true,
"statShareApp": true,
"statReachBottom": true,
"lauchOpts": options, //渠道分析
});
},
onPageScroll: function (event) {
let that = this;
// 获取滚动条的位置
var scrollTop = event.scrollTop;
// 获取屏幕的高度
wx.getSystemInfo({
success(res) {
var screenHeight = res.windowHeight;
if (scrollTop > screenHeight || scrollTop < 10) {
that.setData({
showMoreTip: true
});
} else {
that.setData({
showMoreTip: false
});
}
}
});
},
// 点击了解更多会员优惠政策
gotoFavourableList(){
let url=util.http_build_query({
sellerName:this.data.seller.name,
sellerid:this.data.seller.sid,
oid:this.data.detail.id,
types:'1'
},'/pack-cookbook/pages/favourableList')
gotoFavourableList() {
let url = util.http_build_query({
sellerName: this.data.seller.name,
sellerid: this.data.seller.sid,
oid: this.data.detail.id,
types: '1'
}, '/pack-cookbook/pages/favourableList')
wx.navigateTo({
url
url
})
},
// 去评价
evaluateFun(){
let url=util.http_build_query({
sellerName:this.data.seller.name,
sellerid:this.data.seller.sid,
oid:this.data.detail.id,
types:'1',
},'/pages/pinglun/createOpinion')
},
// 去评价
evaluateFun() {
let url = util.http_build_query({
sellerName: this.data.seller.name,
sellerid: this.data.seller.sid,
oid: this.data.detail.id,
types: '1',
}, '/pages/pinglun/createOpinion')
wx.navigateTo({
url
url
})
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
return this.sharesetting();
},
onShareTimeline() {
return this.sharesetting();
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getDetail()
},
cli() {
if(this.data.staffinfo.wechat){
wx.setClipboardData({
data: this.data.staffinfo.wechat,
success(res) {
wx.getClipboardData({
success(res) {
console.log(res.data) // data
}
})
}
})
}else{
console.log('无微信号')
}
},
call() {
wx.reportMonitor('1012', 1)
wx.makePhoneCall({
phoneNumber: this.data.staffinfo.phone
})
},
looklocation: function () {
wx.reportMonitor('1015', 1)
wx.openLocation({
latitude: Number(this.data.seller.lat),
longitude: Number(this.data.seller.long),
scale: 17,
address: this.data.seller.addr,
success: function (res) {
console.log(res)
}
})
},
getDetail() {
App.Reserve.Detail({
openid: getApp().openid,
rid: this.data.options.id
}).then(res => {
let tablesText = '', //桌子信息
tableNum =0;
res.data.tables.forEach((t,i) => {
tableNum+=t.table_pnum*1
tablesText+=t.rname+t.name+(i==(res.data.tables.length-1)?'':'、');
})
let reserev = RS.reserve(res.data)
let dateSmart
if (res.data.type == 1) {
dateSmart = util.unixtoTime(reserev.ddate, this.data.tpls[this.data.current].timeStrSmart[0])
if (res.data.is_set_ddate == 1) {
dateSmart += ' ' + util.unixtoTime(reserev.ddate, this.data.tpls[this.data.current].timeStrSmart[1])
} else {
dateSmart += ' ' + reserev.soltName
}
} else {
dateSmart = util.unixtoTime(reserev.ddate, this.data.tpls[this.data.current].timeStr)
}
this.setData({
detail: this.formatDatail(reserev, dateSmart),
tableNum,
is_user_comments:res.data.is_user_comments,
seller: {
name: reserev.seller.sellername,
sid:reserev.sid,
date: dateSmart,
tablesText,
addr: reserev.seller.real_address || reserev.seller.map_address,
image: reserev.image_url,
hasOwner: true,
type: reserev.type,
is_set_ddate: reserev.is_set_ddate,
hasUpTime: reserev.type == 1 && reserev.hasRunning && reserev.status != 2,
tel: reserev.seller.seller_tel.split(',')[0],
soltName: reserev.soltName,
lat:reserev.seller.lat,
long:reserev.seller.long,
}
})
console.log('reserev reserev',reserev);
console.log('seller seller',this.data.seller);
console.log('detail detail',this.data.detail);
setTimeout(() => {
this.getSellerTemplateConfFun(reserev.sid);
this.getstaffinfo(res.data.uid)
}, 0);
}).catch(res=>{
console.log(res,'详情请求失败');
})
},
getstaffinfo(uid){
console.log('sellerid',this.data.detail.seller.id);
App.Activity.GetCustomerActivityBaseinfo({
sellerid:this.data.detail.seller.id,
uid
}).then((json)=>{
if(json.ret==200) {
console.log('staffinfostaffinfostaffinfo', json.data)
this.setData({
staffinfo:json.data
})
}
})
},
cookbook() {
if (this.data.detail.order && this.data.detail.order.cookbooklist.length > 0) {
let data = {
rid: this.id,
oid: this.data.detail.order.id,
sellerName: this.data.seller.name,
sid: this.data.seller.sid,
identity: '1',
hasSuccess:'1',
}
wx.navigateTo({
url: `/pack-cookbook/pages/success_new?hasSuccess=${data.hasSuccess}&identity=${data.identity}&oid=${data.oid}&rid=${data.rid}&sellerName=${data.sellerName}&sid=${data.sid}`,
})
} else {
App.Advance.CreateOrder({
rid: this.id,
openid: getApp().openid,
}).then(res => {
if (res.ret != 200) {
return util.toast(res.msg, 'none')
}
wx.navigateTo({
url: util.http_build_query({
rid: this.id,
oid: res.data.id,
sid: res.data.sellerid,
sellerName: this.data.seller.name,
identity: '1',
}, '/pack-cookbook/pages/index_new')
});
})
}
},
sharesetting() {
wx.reportMonitor('1017', 1)
let parmdata = {
id: this.id,
fromid: getApp().openid,
hasInvitation: 1,
tplid: this.data.options.tplid
}
if (this.data.options.uid) {
parmdata.uid = this.data.options.uid;
}
console.log('seller_imageseller_imageseller_imageseller_imageseller_image',this.data.detail.seller.seller_image);
return {
title: '邀请您于'+this.data.seller.date+'一起共进'+this.data.seller.soltName+'。点击查看详情',
path: util.http_build_query(parmdata, '/pages/customer/index'),
imageUrl: this.data.detail.seller.seller_image,
}
},
formatDatail(detail, dateSmart) {
detail.rdateStr = dateSmart;
detail.tableFirst = detail.tables[0].name;
if (detail.tables.length > 1) {
detail.tableSubInfo = '等' + (detail.tables.length) + '个' +
(detail.tables[0].tid == 2 ? '包间' : '');
}
if (detail.rname && detail.sex != 3) {
detail.rnameStr = detail.rname.substr(0, 1) + (detail.sex == 1 ? '先生' : '女士')
} else {
detail.rnameStr = detail.rname
}
detail.eatStr = '邀请您共进晚餐';
let hi = util.unixtoTime(detail.ddate, 'HHII');
if (hi < '10:00') {
detail.eatStr = '邀请您共进早餐';
} else if (hi < '15:00') {
detail.eatStr = '邀请您共进午餐';
}
return detail;
},
getSellerTemplateConfFun(sid) {
console.log(sid,'sidsidsidsid');
App.Seller.GetSellerTemplateConf({
sid
}).then(res => {
let data=res.data
console.log('data',data);
let coupon_dataList=[]
let home,chef,marketing,coupon,reserve,swich_phone,is_comments,signboard,store,homeColor,priceInfo,certificate,scoreInfo,recharge_list,stringifyUse;
chef = util.determine(data.chef);
reserve = util.determine(data.reserve);
marketing = util.determine(data.marketing);
signboard = util.determine(data.signboard);
store = util.determine(data.store);
home = util.determine(data.home);
swich_phone = reserve && reserve.swich_phone?reserve.swich_phone:'';
if(marketing){
is_comments = marketing.is_comments?marketing.is_comments:'';
coupon=marketing.coupon_data?util.determine(marketing.coupon_data):'';
}
// is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示
if(coupon && util.getType(coupon)=='object'){
coupon.stringifyUse=JSON.stringify(coupon.use)
if(marketing.is_coupon=='1' && coupon && (!coupon.use.is_cash || coupon.use.is_cash=='1')){
let cash=coupon.use.cash*1;
let price=coupon.price*1;
console.log('cash',cash+'---'+'price',price+'---'+'discount',((price/cash)*10).toFixed(2));
coupon.discount=cash!=0?((price/cash)*10).toFixed(2):'';
}
coupon_dataList.push(coupon);
}
if(coupon && util.getType(coupon)=='array'){
if(coupon.length>0){
coupon.forEach(item=>{
item.stringifyUse=JSON.stringify(item.use)
if((!item.use.is_cash || item.use.is_cash=='1')){
let cash=item.use.cash*1;
let price=item.price*1;
console.log('cash',cash+'---'+'price',price+'---'+'discount',((price/cash)*10).toFixed(2));
item.discount=cash!=0?((price/cash)*10).toFixed(2):'';
}
})
}
coupon_dataList=coupon;
}
let obj={
chef,
reserve,
marketing,
signboard,
store,
home,
stringifyUse,
coupon,
coupon_dataList,
swich_phone,
is_comments,
StyleType:res.data.type,
}
console.log('获取数据', {...obj});
if(marketing && marketing.is_recharge=='1' && marketing.recharge_data){
let recharge_data=marketing.recharge_data
recharge_list=marketing.recharge_data.recharge_list
if(recharge_list.is_price=='1') priceInfo='会员充值满'+recharge_data.recharge_money+'元赠送'+recharge_list.price+'元余额';
if(recharge_list.is_score=='1') scoreInfo='会员充值满'+recharge_data.recharge_money+'元赠送'+recharge_list.score+'积分';
if(recharge_list.is_coupons=='1' && recharge_data.recharge_list.coupons_names.length>0) certificate=recharge_data.recharge_list.coupons_names.join('、');
console.log('scoreInfo',scoreInfo);
console.log('priceInfo',priceInfo);
this.setData({
recharge_data:marketing.recharge_data,
certificate
})
console.log('recharge_data',recharge_data);
}
this.setData({
coupon_dataList,
stringifyUse
})
if(store && store.images.length>0) store.images =util.determine(store.images);
if(signboard && signboard.images) signboard.images = util.determine(signboard.images);
if (marketing && marketing.is_online_book=='1' && marketing.is_transpond =='1') {
this.setData({
between: true
})
}
if(home && home.red && home.green && home.blue && home.alpha){
homeColor=home.red + ',' + home.green + ',' + home.blue + ',' + home.alpha
}else{
homeColor ='67,142,147,1'
}
console.log('homeColor',homeColor);
this.setData({
chef,
marketing,
home,
reserve,
signboard,
store,
homeColor, //home主题颜色
priceInfo,
scoreInfo,
swich_phone,
is_comments,
StyleType:res.data.type,
})
if (home && home.red == '1' && home.green == '67' && home.blue == '163') {
this.setData({
theme: 'blue'
})
}
if (home && home.red == '67' && home.green == '142' && home.blue == '147') {
this.setData({
theme: 'green'
})
}
if (home && home.red == '12' && home.green == '15' && home.blue == '14') {
this.setData({
theme: 'blackGold'
})
}
}).catch(res=>{
this.setData({
theme:'green',
homeColor:'67,142,147,1'
})
console.log(this.data.homeColor,'GetSellerTemplateConf请求失败');
})
},
// 再次预订
secondbook() {
wx.reportMonitor('1013', 1)
wx.redirectTo({
url: '../reserve/detail?id=' + this.data.detail.seller.id
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
return this.sharesetting();
},
onShareTimeline() {
return this.sharesetting();
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getDetail()
},
cli() {
if (this.data.staffinfo.wechat) {
wx.setClipboardData({
data: this.data.staffinfo.wechat,
success(res) {
wx.getClipboardData({
success(res) {
console.log(res.data) // data
}
})
}
})
} else {
console.log('无微信号')
}
},
call() {
wx.reportMonitor('1012', 1)
wx.makePhoneCall({
phoneNumber: this.data.staffinfo.phone
})
},
looklocation: function () {
wx.reportMonitor('1015', 1)
wx.openLocation({
latitude: Number(this.data.seller.lat),
longitude: Number(this.data.seller.long),
scale: 17,
address: this.data.seller.addr,
success: function (res) {
console.log(res)
}
})
},
getDetail() {
App.Reserve.Detail({
openid: getApp().openid,
rid: this.data.options.id
}).then(res => {
let tablesText = '', //桌子信息
tableNum = 0;
res.data.tables.forEach((t, i) => {
tableNum += t.table_pnum * 1
tablesText += t.rname + t.name + (i == (res.data.tables.length - 1) ? '' : '、');
})
let reserev = RS.reserve(res.data)
let dateSmart
if (res.data.type == 1) {
dateSmart = util.unixtoTime(reserev.ddate, this.data.tpls[this.data.current].timeStrSmart[0])
if (res.data.is_set_ddate == 1) {
dateSmart += ' ' + util.unixtoTime(reserev.ddate, this.data.tpls[this.data.current].timeStrSmart[1])
} else {
dateSmart += ' ' + reserev.soltName
}
} else {
dateSmart = util.unixtoTime(reserev.ddate, this.data.tpls[this.data.current].timeStr)
}
this.setData({
detail: this.formatDatail(reserev, dateSmart),
tableNum,
is_user_comments: res.data.is_user_comments,
seller: {
name: reserev.seller.sellername,
sid: reserev.sid,
date: dateSmart,
tablesText,
addr: reserev.seller.real_address || reserev.seller.map_address,
image: reserev.image_url,
hasOwner: true,
type: reserev.type,
is_set_ddate: reserev.is_set_ddate,
hasUpTime: reserev.type == 1 && reserev.hasRunning && reserev.status != 2,
tel: reserev.seller.seller_tel.split(',')[0],
soltName: reserev.soltName,
lat: reserev.seller.lat,
long: reserev.seller.long,
}
})
console.log('reserev reserev', reserev);
console.log('seller seller', this.data.seller);
console.log('detail detail', this.data.detail);
setTimeout(() => {
this.getSellerTemplateConfFun(reserev.sid);
this.getstaffinfo(res.data.uid)
}, 0);
}).catch(res => {
console.log(res, '详情请求失败');
})
},
getstaffinfo(uid) {
console.log('sellerid', this.data.detail.seller.id);
App.Activity.GetCustomerActivityBaseinfo({
sellerid: this.data.detail.seller.id,
uid
}).then((json) => {
if (json.ret == 200) {
console.log('staffinfostaffinfostaffinfo', json.data)
this.setData({
staffinfo: json.data
})
}
})
},
cookbook() {
if (this.data.detail.order && this.data.detail.order.cookbooklist.length > 0) {
let data = {
rid: this.id,
oid: this.data.detail.order.id,
sellerName: this.data.seller.name,
sid: this.data.seller.sid,
identity: '1',
hasSuccess: '1',
}
wx.navigateTo({
url: `/pack-cookbook/pages/success_new?hasSuccess=${data.hasSuccess}&identity=${data.identity}&oid=${data.oid}&rid=${data.rid}&sellerName=${data.sellerName}&sid=${data.sid}`,
})
} else {
App.Advance.CreateOrder({
rid: this.id,
openid: getApp().openid,
}).then(res => {
if (res.ret != 200) {
return util.toast(res.msg, 'none')
}
wx.navigateTo({
url: util.http_build_query({
rid: this.id,
oid: res.data.id,
sid: res.data.sellerid,
sellerName: this.data.seller.name,
identity: '1',
}, '/pack-cookbook/pages/index_new')
});
})
}
},
sharesetting() {
wx.reportMonitor('1017', 1)
let parmdata = {
id: this.id,
fromid: getApp().openid,
hasInvitation: 1,
tplid: this.data.options.tplid
}
if (this.data.options.uid) {
parmdata.uid = this.data.options.uid;
}
console.log('seller_imageseller_imageseller_imageseller_imageseller_image', this.data.detail.seller.seller_image);
return {
title: '邀请您于' + this.data.seller.date + '一起共进' + this.data.seller.soltName + '。点击查看详情',
path: util.http_build_query(parmdata, '/pages/customer/index'),
imageUrl: this.data.detail.seller.seller_image,
}
},
formatDatail(detail, dateSmart) {
detail.rdateStr = dateSmart;
detail.tableFirst = detail.tables[0].name;
if (detail.tables.length > 1) {
detail.tableSubInfo = '等' + (detail.tables.length) + '个' +
(detail.tables[0].tid == 2 ? '包间' : '');
}
if (detail.rname && detail.sex != 3) {
detail.rnameStr = detail.rname.substr(0, 1) + (detail.sex == 1 ? '先生' : '女士')
} else {
detail.rnameStr = detail.rname
}
detail.eatStr = '邀请您共进晚餐';
let hi = util.unixtoTime(detail.ddate, 'HHII');
if (hi < '10:00') {
detail.eatStr = '邀请您共进早餐';
} else if (hi < '15:00') {
detail.eatStr = '邀请您共进午餐';
}
return detail;
},
getSellerTemplateConfFun(sid) {
console.log(sid, 'sidsidsidsid');
App.Seller.GetSellerTemplateConf({
sid
}).then(res => {
let data = res.data
console.log('data', data);
let coupon_dataList = []
let home, chef, marketing, coupon, reserve, swich_phone, is_comments, signboard, store, homeColor, priceInfo, certificate, scoreInfo, recharge_list, stringifyUse;
chef = util.determine(data.chef);
reserve = util.determine(data.reserve);
marketing = util.determine(data.marketing);
signboard = util.determine(data.signboard);
store = util.determine(data.store);
home = util.determine(data.home);
swich_phone = reserve && reserve.swich_phone ? reserve.swich_phone : '';
if (marketing) {
is_comments = marketing.is_comments ? marketing.is_comments : '';
coupon = marketing.coupon_data ? util.determine(marketing.coupon_data) : '';
}
// is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示
if (coupon && util.getType(coupon) == 'object') {
coupon.stringifyUse = JSON.stringify(coupon.use)
if (marketing.is_coupon == '1' && coupon && (!coupon.use.is_cash || coupon.use.is_cash == '1')) {
let cash = coupon.use.cash * 1;
let price = coupon.price * 1;
console.log('cash', cash + '---' + 'price', price + '---' + 'discount', ((price / cash) * 10).toFixed(2));
coupon.discount = cash != 0 ? ((price / cash) * 10).toFixed(2) : '';
}
coupon_dataList.push(coupon);
}
if (coupon && util.getType(coupon) == 'array') {
if (coupon.length > 0) {
coupon.forEach(item => {
item.stringifyUse = JSON.stringify(item.use)
if ((!item.use.is_cash || item.use.is_cash == '1')) {
let cash = item.use.cash * 1;
let price = item.price * 1;
console.log('cash', cash + '---' + 'price', price + '---' + 'discount', ((price / cash) * 10).toFixed(2));
item.discount = cash != 0 ? ((price / cash) * 10).toFixed(2) : '';
}
})
}
coupon_dataList = coupon;
}
let obj = {
chef,
reserve,
marketing,
signboard,
store,
home,
stringifyUse,
coupon,
coupon_dataList,
swich_phone,
is_comments,
StyleType: res.data.type,
}
console.log('获取数据', {
...obj
});
if (marketing && marketing.is_recharge == '1' && marketing.recharge_data) {
let recharge_data = marketing.recharge_data
recharge_list = marketing.recharge_data.recharge_list
if (recharge_list.is_price == '1') priceInfo = '会员充值满' + recharge_data.recharge_money + '元赠送' + recharge_list.price + '元余额';
if (recharge_list.is_score == '1') scoreInfo = '会员充值满' + recharge_data.recharge_money + '元赠送' + recharge_list.score + '积分';
if (recharge_list.is_coupons == '1' && recharge_data.recharge_list.coupons_names.length > 0) certificate = recharge_data.recharge_list.coupons_names.join('、');
console.log('scoreInfo', scoreInfo);
console.log('priceInfo', priceInfo);
this.setData({
recharge_data: marketing.recharge_data,
certificate
})
console.log('recharge_data', recharge_data);
}
this.setData({
coupon_dataList,
stringifyUse
})
if (store && store.images.length > 0) store.images = util.determine(store.images);
if (signboard && signboard.images) signboard.images = util.determine(signboard.images);
if (marketing && marketing.is_online_book == '1' && marketing.is_transpond == '1') {
this.setData({
between: true
})
}
if (home && home.red && home.green && home.blue && home.alpha) {
homeColor = home.red + ',' + home.green + ',' + home.blue + ',' + home.alpha
} else {
homeColor = '67,142,147,1'
}
console.log('homeColor', homeColor);
this.setData({
chef,
marketing,
home,
reserve,
signboard,
store,
homeColor, //home主题颜色
priceInfo,
scoreInfo,
swich_phone,
is_comments,
StyleType: res.data.type,
})
if (home && home.red == '1' && home.green == '67' && home.blue == '163') {
this.setData({
theme: 'blue'
})
}
if (home && home.red == '67' && home.green == '142' && home.blue == '147') {
this.setData({
theme: 'green'
})
}
if (home && home.red == '12' && home.green == '15' && home.blue == '14') {
this.setData({
theme: 'blackGold'
})
}
}).catch(res => {
this.setData({
theme: 'green',
homeColor: '67,142,147,1'
})
console.log(this.data.homeColor, 'GetSellerTemplateConf请求失败');
})
},
// 再次预订
secondbook() {
wx.reportMonitor('1013', 1)
wx.redirectTo({
url: '../reserve/detail?id=' + this.data.detail.seller.id
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
},
})
\ No newline at end of file
... ...
... ... @@ -3,6 +3,6 @@
"navigationBarTextStyle": "white",
"navigationBarTitleText": "",
"usingComponents": {
"nav": "/components/nav/nav"
"nav": "/components/nav/nav"
}
}
\ No newline at end of file
}
\ No newline at end of file
... ...
<!--pages/customer/detail_owner_invitation_new1.wxml-->
<!--pages/customer/detail_owner_invitation6.wxml-->
<import src="../tpl/invitation"></import>
<nav hasHome class="navhome" place="{{true}}">
</nav>
<scroll-view class="last-book-bg" style="line-height: 1.4;height:{{height}}px;" scroll-y>
<scroll-view scroll-y>
<view class="titleImg" style="background: rgba({{homeColor}});">
<image src="{{theme=='green'?'https://qn.colorcun.com/1571679628800_.pic.jpg':theme=='blue'?'https://qn.colorcun.com/1561679628784_.pic.jpg':theme=='blackGold'?'https://qn.colorcun.com/1551679628682_.pic.jpg':''}}" class="titleIcon"></image>
<view class="title {{theme+'Title'}}">{{home?home.title:seller.name}}</view>
... ... @@ -17,7 +17,7 @@
<view class="infoRight">
<view class="begin">
<view>尊敬的贵宾,您好!</view>
<view>非常感谢您选择{{seller.name?seller.name:reserve.seller_name}}!</view>
<view>非常感谢您选择【{{seller.name?seller.name:reserve.seller_name}}】!</view>
</view>
<view class="flex-11" wx:if="{{seller.date}}">
<view class="label">【日期】</view>
... ... @@ -39,9 +39,9 @@
<view class="label">【停车】</view>
<view class="contentData">{{reserve.park_info}}</view>
</view>
<view class="flex-11" wx:if="{{ swich_phone!='0' && reserve && (reserve.seller_phone || detail.seller.phone)}}">
<view class="flex-11" wx:if="{{ swich_phone!='0' && detail.seller.phone}}">
<view class="label">【联系】</view>
<view class="contentData">{{reserve.seller_phone?reserve.seller_phone:detail.seller.phone}}</view>
<view class="contentData">{{detail.seller.phone}}</view>
</view>
<block wx:if="{{staffinfo && reserve.swich_manager=='1'}}">
<view class="handleInfo">
... ... @@ -56,13 +56,12 @@
</view>
</view>
</block>
<view class="welcome">
欢迎垂询,恭候光临!
<view class="welcome font32r">
{{home.slogan}}
</view>
<view class="positioning" bindtap="looklocation">
<image src="https://qn.colorcun.com/address.png" mode="" />
<view class="name">
<text>【{{seller.name?seller.name:reserve.seller_name}}】</text>
<text>{{seller.addr?seller.addr:reserev.seller.map_address}}</text>
</view>
</view>
... ... @@ -74,17 +73,19 @@
<view class="left">
<view class="top">
<text>{{item.aname}}</text>
<view class="price" wx:if="{{item.price}}"><view class="icons">¥</view>{{item.price}}</view>
<view class="price" wx:if="{{item.price}}">
<view class="icons">¥</view>{{item.price}}
</view>
<!-- is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示 -->
<text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discount">{{item.discount}}折</text>
</view>
<view wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom" >
<view wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom">
{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}
</view>
<view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom" >
<view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom">
无限制{{item.desc?','+item.desc+'。':'。'}}
</view>
<view wx:if="{{item.exp_date.is_birthday=='1' || item.exp_date.is_birthday===true}}" class="bottom" >
<view wx:if="{{item.exp_date.is_birthday=='1' || item.exp_date.is_birthday===true}}" class="bottom">
会员生日当天可用{{item.desc?','+item.desc+'。':'。'}}
</view>
</view>
... ... @@ -99,19 +100,8 @@
<view wx:if="{{is_comments=='1' && !is_user_comments}}" class="evaluateBox" bindtap="evaluateFun">
<text wx:if="{{is_comments=='1' && marketing.is_comments_coupon!='1'}}">想吐槽?戳这里填写意见!--></text>
<text wx:if="{{marketing.is_comments_coupon=='1'}}">想吐槽?戳这里填写意见反馈赢好礼!</text>
<image src="https://qn.colorcun.com/evaluate.png" mode=""/>
</view>
<!-- <view class="visitor">
确认赴约客人:{{keepAppointment.length}}位
<image src="https://qn.colorcun.com/evaluate.png" mode="" />
</view>
<view class="keepWrap">
<view class="keepItems" wx:for="{{keepAppointment}}" wx:key="keepAppointment.key">
<image src="{{item.photo}}" mode="" />
<view>
{{item.name}}
</view>
</view>
</view> -->
<!-- 品牌介绍类型store.style 0只有图 1图文合并 2图文分开 -->
<view class="introduce" wx:if="{{store && store.style=='0'}}">
<view class="IntroductionItems" wx:for="{{store.images}}" wx:key="arryIndex" wx:for-index="arryIndex">
... ... @@ -156,7 +146,7 @@
</text>
</view>
</view>
<image src="{{item}}" mode="aspectFill"/>
<image src="{{item}}" mode="aspectFill" />
</view>
</view>
</view>
... ... @@ -172,7 +162,7 @@
{{chef.chef_name}}
</view>
<view class="labelBox labelBox2">
<text class="label" >{{chef.introduce}}
<text class="label">{{chef.introduce}}
</text>
<view class="line line1">
</view>
... ... @@ -215,7 +205,7 @@
</view>
<view class="specialServices" wx:if="{{detail && detail.seller.is_open_order==1 && marketing && marketing.is_order=='1'}}">
<view class="rubric">
特供服务
提前点餐
</view>
<view class="news">
本店特为贵宾提供提前点餐服务,您现在可以选菜下单,到店就餐时无需等待服务员点餐,可以直接享受就餐服务^_^
... ... @@ -256,24 +246,25 @@
</view>
</view>
<view class="vips">
<view wx:if="{{marketing.is_link}}" class="font24r favouredPolicy" bindtap="gotoFavourableList">
点击了解更多会员优惠政策
</view>
<image wx:if="{{marketing && marketing.logo}}" src="{{marketing.logo?marketing.logo:''}}" mode="heightFix" />
<view class="news" wx:if="{{marketing && marketing.wecomle}}">
{{marketing?marketing.wecomle:''}}
</view>
<view wx:if="{{marketing.is_link}}" class="font24r favouredPolicy" bindtap="gotoFavourableList">
点击了解更多会员优惠政策
</view>
<text style="color: #999; font-size: 26rpx;font-family: PingFang SC;">
\n
周到安排提供技术支持 400 000 9690
</text>
</view>
<view class="more" wx:if="{{showMoreTip}}">
<view class="moreText">滑动查看更多</view>
<image src="https://qn.colorcun.com/jt1.png" mode="" />
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1'}}" class="{{between?'all-button flex-lr between':'all-button flex-lr sharewidth'}}">
<view wx:if="{{marketing.is_online_book=='1'}}" class="book-item-font second-book-button flex-cc font30r" bindtap="secondbook" style="position: relative;">再次预订
</view>
<!-- <view wx:if="{{marketing.is_arrival}}" class="book-item-font second-book-button flex-cc font30r centerBtn" bindtap="secondbook" style="position: relative;">确认赴约
</view> -->
<block>
<button wx:if="{{marketing.is_transpond=='1'}}" class="book-item-font flex-cc font30r shareItem" open-type="share">转发给客人
</button>
... ...
/* pages/customer/detail_owner_invitation_new1.wxss */
/* pages/customer/detail_owner_invitation6.wxss */
@import "../tpl/tpls.wxss";
.titleImg {
top: 160rpx;
left: 1rpx;
width: 750rpx;
height: 330rpx;
height: 268rpx;
}
.blueTitleImg {
... ... @@ -27,12 +27,12 @@
.title {
text-align: center;
font-family: FangSong;
font-family: PingFang SC;
font-size: 72rpx;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
position: relative;
top: -16rpx;
top: -70rpx;
background-image: -webkit-linear-gradient(bottom, #697d6e, #cfb53b);
}
... ... @@ -56,7 +56,7 @@
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
position: relative;
top: -16rpx;
top: -68rpx;
}
.blueInfo {
... ... @@ -101,7 +101,8 @@
font-family: PingFang SC;
font-size: 32rpx;
}
.begin view{
.begin view {
line-height: 50rpx;
}
... ... @@ -139,6 +140,7 @@
.welcome {
text-align: center;
margin: 40rpx 0 0 0;
color: #000;
}
.visitor {
... ... @@ -168,10 +170,11 @@
.handlePhone {
height: 100rpx;
color: #515151;
}
.brownFont {
padding: 4rpx 16rpx;
padding: 10rpx 16rpx;
color: #0143A3;
border: 2rpx solid #0143A3;
border-radius: 22rpx;
... ... @@ -203,7 +206,7 @@
.positioning image {
width: 32rpx;
height: 38rpx;
margin-right: 10rpx;
margin-right: 16rpx;
}
.positioning .name {
... ... @@ -214,10 +217,12 @@
font-family: PingFang SC;
font-size: 28rpx;
}
.positioning .name text{
.positioning .name text {
line-height: 50rpx;
}
.positioning .name text:nth-of-type(2){
.positioning .name text:nth-of-type(2) {
text-indent: 8rpx;
}
... ... @@ -251,11 +256,16 @@
.imgMask {
position: relative;
margin: 0 20rpx 18rpx 20rpx;
}
.famousChefBox .imgMask,
.vegetableBox .imgMask {
margin: 0 0 18rpx 0;
}
.imgMask image {
height: calc(100vw * 0.82) !important;
margin-bottom: 18rpx;
}
.introduce .chief {
... ... @@ -462,26 +472,29 @@
.orderingFood {
padding: 0 26rpx;
color: #fff;
color: #0143A3;
border-radius: 22rpx;
text-align: center;
background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%);
background: #fff;
border: 2rpx solid #0143A3;
border-radius: 32rpx;
margin: 20rpx 0;
line-height: 44rpx;
height: 44rpx;
}
.preferential {
margin: 16rpx 40rpx 16rpx 56rpx;
margin: 16rpx 40rpx 20rpx 56rpx;
}
.preferentialItems {
border: 2rpx solid #DBDBDB;
border-radius: 16rpx;
padding: 16rpx 16rpx 16rpx 24rpx;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
background: url('https://qn.colorcun.com/certificateBj.png') no-repeat;
background-size: 100% 100%;
}
.rubric1 {
... ... @@ -536,10 +549,10 @@
font-size: 30rpx;
}
.price{
.price {
display: flex;
align-items: center;
justify-content: center;
align-items: center;
justify-content: center;
}
.price .icons {
... ... @@ -549,7 +562,6 @@
}
.vips image {
margin: 36rpx 0;
height: 300rpx;
}
... ... @@ -579,18 +591,15 @@
.favouredPolicy {
width: 45%;
color: #999999;
color: #5C95D7;
font-family: PingFang SC;
font-weight: 500;
border: 2rpx solid #0244a4;
border: 2rpx solid #5C95D7;
border-radius: 22rpx;
text-align: center;
padding: 10rpx;
}
.last-book-bg {
background: transparent;
}
.all-button {
background: #FAFAFA;
... ... @@ -650,26 +659,52 @@
}
.cook {
height: 100% !important;
background: linear-gradient(104.24deg, rgba(76, 141, 173, 1) -57.47%, rgba(1, 67, 163, 1) 55.72%, rgba(66, 165, 255, 1) 148.72%);
color: #fff !important;
height: 94% !important;
background: #fff;
border: 2rpx solid #0143A3;
border-radius: 32rpx;
font-weight: normal;
width: 27% !important;
width: 23% !important;
}
.bold{
.bold {
font-weight: 500;
}
.evaluateBox{
.evaluateBox {
margin: 16rpx 84rpx 16rpx 56rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.evaluateBox image{
.evaluateBox image {
width: 60rpx;
height: 70rpx;
}
.evaluateBox text{
.evaluateBox text {
color: #000;
font-size: 28rpx;
}
.more {
height: 80rpx;
width: 100%;
position: absolute;
top: 15.5%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
background: rgba(0, 0, 0, .4);
}
.moreText {
color: #fff;
}
.more image {
width: 30rpx;
height: 30rpx;
}
\ No newline at end of file
... ...
... ... @@ -135,41 +135,25 @@ Page({
openid:opt.openid
})
}
//is_new_template为1 显示新邀请函detail_owner_invitation_new 0显示旧邀请函detail_owner_invitation
let is_new=res.data.seller.is_new_template;
console.log(res.data.seller.is_new_template,'is_new_templateis_new_template');
console.log(res.data.openid,'resdataopenidopenidopenidopenid');
console.log(opt.hasInvitation,'hasInvitation');
console.log(opt.openid,'optopenidoptopenidopt.openid');
console.log('type',res.data.seller.temp_config_type);
let configType=res.data.seller.temp_config_type
console.log('configType',configType);
if (!res.data.openid) {//无预订人
url = '/pages/customer/detail_owner';
if (opt.hasInvitation == 1 && is_new=='1' && configType=='1') {
url = '/pages/customer/detail_owner_invitation_new1';
}else if(opt.hasInvitation == 1 && is_new=='1' && configType=='2') {
url = '/pages/customer/detail_owner_invitation_new2';
}else{
url = '/pages/customer/detail_owner_invitation';
}
} else {
url = '/pages/customer/detail_customer';
if (opt.hasInvitation == 1 && is_new=='1' && configType=='1') {
url = '/pages/customer/detail_owner_invitation_new1';
}else if(opt.hasInvitation == 1 && is_new=='1' && configType=='2') {
url = '/pages/customer/detail_owner_invitation_new2';
}else{
url = '/pages/customer/detail_invitation';
if (opt.hasInvitation == 1 && configType) {
url = '/pages/customer/detail_owner_invitation' + configType;
} else {
url = '/pages/customer/detail_owner_invitation1';
}
if (res.data.openid == opt.openid) {
} else {
if (opt.hasInvitation == 1 && configType) {
url = '/pages/customer/detail_owner_invitation_new' + configType;
} else if (res.data.openid == opt.openid) {
url = '/pages/customer/detail_owner';
if (opt.hasInvitation == 1 && is_new=='1' && configType=='1') {
url = '/pages/customer/detail_owner_invitation_new1';
}else if(opt.hasInvitation == 1 && is_new=='1' && configType=='2') {
url = '/pages/customer/detail_owner_invitation_new2';
}else{
url = '/pages/customer/detail_owner_invitation';
}
} else {
url = '/pages/customer/detail_invitation';
}
}
}
... ...
... ... @@ -272,7 +272,7 @@
{
"id": -1,
"name": "pages/customer/index 1803 iphone动画",
"pathName": "pages/customer/detail_owner_invitation",
"pathName": "pages/customer/detail_owner_invitation1",
"query": "id=1803&fromid=1111&hasInvitation=1",
"scene": "1044",
"shareInfo": {
... ... @@ -298,7 +298,7 @@
{
"id": 40,
"name": "邀请Ren pages/customer/index ",
"pathName": "pages/customer/detail_owner_invitation",
"pathName": "pages/customer/detail_owner_invitation1",
"query": "id= 45539&fromid=test&hasInvitation=1&hasSellerShare=1&tplid=1",
"scene": null
},
... ... @@ -458,8 +458,8 @@
},
{
"id": -1,
"name": "pages/customer/detail_owner_invitation",
"pathName": "pages/customer/detail_owner_invitation",
"name": "pages/customer/detail_owner_invitation1",
"pathName": "pages/customer/detail_owner_invitation1",
"query": "id=43762&hasInvitation=1&hasSellerShare=1&tplid=1",
"scene": null
},
... ... @@ -628,8 +628,8 @@
"scene": null
},
{
"name": "pages/customer/detail_owner_invitation",
"pathName": "pages/customer/detail_owner_invitation",
"name": "pages/customer/detail_owner_invitation1",
"pathName": "pages/customer/detail_owner_invitation1",
"query": "id= 157347",
"scene": null
},
... ...
... ... @@ -350,7 +350,7 @@
{
"id": -1,
"name": "pages/customer/index 1803 iphone动画",
"pathName": "pages/customer/detail_owner_invitation",
"pathName": "pages/customer/detail_owner_invitation1",
"query": "id=1803&fromid=1111&hasInvitation=1",
"scene": "1044",
"shareInfo": {
... ... @@ -376,7 +376,7 @@
{
"id": 40,
"name": "邀请Ren pages/customer/index ",
"pathName": "pages/customer/detail_owner_invitation",
"pathName": "pages/customer/detail_owner_invitation1",
"query": "id= 45539&fromid=test&hasInvitation=1&hasSellerShare=1&tplid=1",
"scene": null
},
... ... @@ -536,8 +536,8 @@
},
{
"id": -1,
"name": "pages/customer/detail_owner_invitation",
"pathName": "pages/customer/detail_owner_invitation",
"name": "pages/customer/detail_owner_invitation1",
"pathName": "pages/customer/detail_owner_invitation1",
"query": "id=43762&hasInvitation=1&hasSellerShare=1&tplid=1",
"scene": null
},
... ... @@ -706,8 +706,8 @@
"scene": null
},
{
"name": "pages/customer/detail_owner_invitation",
"pathName": "pages/customer/detail_owner_invitation",
"name": "pages/customer/detail_owner_invitation1",
"pathName": "pages/customer/detail_owner_invitation1",
"query": "id= 157347",
"scene": null
},
... ...
... ... @@ -232,7 +232,7 @@
},
{
"name": "pages/customer/index 1803 iphone动画",
"pathName": "pages/customer/detail_owner_invitation",
"pathName": "pages/customer/detail_owner_invitation1",
"query": "id=1803&fromid=1111&hasInvitation=1",
"scene": "1044",
"shareInfo": {
... ... @@ -255,7 +255,7 @@
},
{
"name": "邀请Ren pages/customer/index ",
"pathName": "pages/customer/detail_owner_invitation",
"pathName": "pages/customer/detail_owner_invitation1",
"query": "id= 45539&fromid=test&hasInvitation=1&hasSellerShare=1&tplid=1",
"scene": null
},
... ... @@ -393,7 +393,7 @@
},
{
"name": "旧邀请函",
"pathName": "pages/customer/detail_owner_invitation",
"pathName": "pages/customer/detail_owner_invitation1",
"query": "id=364616&hasInvitation=1&hasSellerShare=1&tplid=1",
"launchMode": "default",
"scene": null
... ... @@ -543,8 +543,8 @@
"scene": null
},
{
"name": "pages/customer/detail_owner_invitation",
"pathName": "pages/customer/detail_owner_invitation",
"name": "pages/customer/detail_owner_invitation1",
"pathName": "pages/customer/detail_owner_invitation1",
"query": "id= 157347",
"scene": null
},
... ... @@ -591,16 +591,16 @@
"scene": null
},
{
"name": "充值",
"pathName": "pack-activity/pack/vipRecharge",
"query": "id=254&name=14号酒庄天幕山总部",
"name": "邀请函-----1",
"pathName": "pages/customer/detail_invitation",
"query": "id=400725&hasInvitation=1&hasSellerShare=1&tplid=1",
"launchMode": "default",
"scene": null
},
{
"name": "新邀请函",
"pathName": "pages/customer/detail_owner_invitation_new1",
"query": "id=329755&hasInvitation=1&hasSellerShare=1&tplid=1",
"name": "邀请函-----6",
"pathName": "pages/customer/detail_owner_invitation6",
"query": "id=400725&hasInvitation=1&hasSellerShare=1&tplid=1",
"launchMode": "default",
"scene": null
},
... ... @@ -619,9 +619,9 @@
"scene": null
},
{
"name": "新邀请函2",
"pathName": "pages/customer/detail_owner_invitation_new2",
"query": "id=392864&hasInvitation=1&hasSellerShare=1&tplid=1",
"name": "邀请函-----4",
"pathName": "pages/customer/detail_owner_invitation4",
"query": "id=400725&hasInvitation=1&hasSellerShare=1&tplid=1",
"launchMode": "default",
"scene": null
},
... ...