Commit 248a517aa63863129bc5ce9df701add8d2ce48f6

Authored by pengye
1 parent f9f85abd

邀请函新模板页面和样式处理

... ... @@ -60,6 +60,8 @@
"pages/pinglun/createOpinion",
"pages/pinglun/opinionSuccess",
"pages/customer/detail_owner_invitation1",
"pages/customer/detail_owner_invitation2",
"pages/customer/detail_owner_invitation3",
"pages/customer/detail_owner_invitation4",
"pages/customer/detail_owner_invitation6"
],
... ...
// pages/customer/detail_owner_invitation2.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,
chef: {},
marketing: {},
home: {},
reserve: {},
signboard: {},
store: {},
recharge_data: {},
coupon_dataList: [],
stringifyUse: '',
current: 0,
seller: {
name: '',
tablesText: '',
date: '',
addr: ''
},
priceInfo: '',
scoreInfo: '',
discount: '',
certificate: '',
dataStr: Date.now() * 1 / 1000,
swich_phone: '0',
is_comments: '0',
is_user_comments: false,
tableinfo: [],
StyleType: '',
showMoreTip: true,
themeColor: 'lanCaiHe',
screenHeight: '',
},
tablestr: '',
urlsValue: [],
screenHeight: '',
/**
* 生命周期函数--监听页面加载
*/
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, //渠道分析
});
const systemInfo = wx.getSystemInfoSync();
this.screenHeight = systemInfo.windowHeight; // 获取屏幕高度
},
// 页面滚动事件
onPageScroll: function (event) {
const scrollTop = event.scrollTop * 1 + this.screenHeight - 80; // 获取滚动的距离
if (scrollTop < this.screenHeight) {
this.setData({
showMoreTip: true
});
} else {
this.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')
wx.navigateTo({
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',
previousPage: '1',
}, '/pages/pinglun/createOpinion')
wx.navigateTo({
url
})
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
return this.sharesetting();
},
/**
* 监听用户点击分享到朋友圈按钮的操作
*/
onShareTimeline() {
return this.sharesetting();
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getDetail()
},
// 复制微信号
copyWeChat() {
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)
}
})
},
// 获取包间图片列表
getroomimage(sellerid) {
App.Tables.GetTablesPhoto({
sellerid,
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', urlsArr)
console.log('roomimage', json.data)
}
})
},
// 预览包间图片
lookroom(e) {
const item = e.currentTarget.dataset['item'];
wx.previewImage({
current: item.url, // 当前显示图片的http链接
urls: this.urlsValue, // 需要预览的图片http链接列表
})
},
// 获取店铺详情
getDetail() {
App.Reserve.Detail({
openid: getApp().openid,
rid: this.data.options.id
}).then(res => {
let tablesText = '', //桌子信息
tableNum = 0;
let tableinfo = util.determine(res.data.tableinfo);
console.log('tableinfo', tableinfo);
res.data.tables.forEach((t, i) => {
tableNum += t.table_pnum * 1
tablesText += t.rname + t.name + (i == (res.data.tables.length - 1) ? '' : '、');
})
let tabaleids = [];
res.data.tables.forEach(t => {
tabaleids.push(t.id);
})
this.tablestr = tabaleids.toString();
let reserev = RS.reserve(res.data)
let dateSmart
if (res.data.type == 1) {
dateSmart = util.unixtoTime(reserev.ddate, 'YYYY年MM月DD日 星期WW')
if (res.data.is_set_ddate == 1) {
dateSmart += ' ' + util.unixtoTime(reserev.ddate, 'YYYY年MM月DD日 星期WW')
} else {
dateSmart += ' ' + reserev.soltName
}
} else {
dateSmart = util.unixtoTime(reserev.ddate, 'YYYY年MM月DD日 星期WW')
}
console.log('dateSmart', dateSmart);
this.setData({
detail: this.formatDatail(reserev, dateSmart),
tableNum,
tableinfo,
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,
time: util.unixtoTime(reserev.ddate, '星期WW HH:II'),
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)
this.getroomimage(reserev.sid)
}, 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,
}
},
// 修改detail数据
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 themeColor, themeSixteen, home, chef, marketing, coupon, reserve, swich_phone, is_comments, signboard, store, 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(1));
coupon.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : '';
}
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(1));
item.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : '';
}
})
}
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
})
}
// themeColor = 'crimson' // 深中国红
// themeSixteen = '#86201B'
themeColor = 'chinaRed' // 中国红
themeSixteen = '#AF231C'
// themeColor = 'lanCaiHe' // 蓝采和
// themeSixteen = '#06436F'
// themeColor = 'stoneGreen' // 石绿
// themeSixteen = '#206864'
// themeColor = 'turmeric' // 姜黄
// themeSixteen = '#B39437'
// themeColor = 'greenishYellow' // 苍黄
// themeSixteen = '#C85306'
// themeColor = 'golden' // 金黄
// themeSixteen = '#C67B3A'
// themeColor = 'ultramarine' // 群青
// themeSixteen = '#0143A3'
// themeColor = 'moroccanBlue' // 摩洛哥蓝
// themeSixteen = '#19516A'
this.setData({
chef,
marketing,
home,
reserve,
signboard,
store,
priceInfo,
scoreInfo,
swich_phone,
is_comments,
StyleType: res.data.type,
themeColor,
themeSixteen,
})
}).catch(res => {
console.log('GetSellerTemplateConf请求失败');
})
},
// 再次预订
secondbook() {
wx.reportMonitor('1013', 1)
wx.redirectTo({
url: '../reserve/detail?id=' + this.data.detail.seller.id
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
})
\ No newline at end of file
... ...
{
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "",
"usingComponents": {
"nav": "/components/nav/nav"
}
}
\ No newline at end of file
... ...
<!--pages/customer/detail_owner_invitation2.wxml-->
<import src="../tpl/invitation"></import>
<nav hasHome backgroundColor="{{themeSixteen}}" class="navhome" place="{{true}}">
</nav>
<scroll-view scroll-y class="{{themeColor}}">
<view class="positioningBox">
<view class="positioning" bindtap="looklocation">
<text class="font48r">{{seller.name || reserve.seller_name}}</text>
<view class="name">
<image src="https://qn.colorcun.com/mapIcon.png" mode="" />
<text class="font28r">{{seller.addr|| reserev.seller.map_address}}</text>
</view>
</view>
</view>
<view class="reservationInfo">
<view class="flex-11" wx:if="{{seller.date}}">
<view class="label">【就餐日期】</view>
<view class="contentData">{{seller.date}}</view>
</view>
<view class="flex-11" wx:if="{{seller.soltName}}">
<view class="label">【就餐时间】</view>
<view class="contentData">{{seller.soltName}}</view>
</view>
<view class="flex-11" wx:if="{{detail.actual_pum || tableNum}}">
<view class="label">【就餐人数】</view>
<view class="contentData">{{detail.actual_pum?detail.actual_pum:tableNum}}位</view>
</view>
<view class="flex-11" wx:if="{{seller.tablesText}}">
<view class="label">【就餐位置】</view>
<view class="contentData bold">{{seller.tablesText}}</view>
</view>
<view class="flex-11" wx:if="{{reserve && reserve.swich_park=='1' && reserve.park_info}}">
<view class="label">【停车信息】</view>
<view class="contentData">{{reserve.park_info}}</view>
</view>
<view class="flex-11" wx:if="{{ swich_phone!='0' && detail.seller.phone}}">
<view class="label">【联系电话】</view>
<view class="contentData">{{detail.seller.phone}}</view>
</view>
<view wx:if="{{roomimage && roomimage.length>0}}" class="page-section-spacing">
<view wx:for="{{roomimage}}" class="imgs" wx:key="index" bindtap="lookroom" data-item="{{item}}">
<image class="imageStyle" mode="aspectFill" src="{{item.url}}"></image>
<text>{{item.name}}</text>
</view>
</view>
</view>
<block wx:if="{{staffinfo && reserve.swich_manager=='1'}}">
<view class="handleInfo">
<image wx:if="{{staffinfo && staffinfo.photo}}" src="{{staffinfo.photo}}" class="headerimg" mode="aspectFill"></image>
<view class="handle handlePhone">
<view>专属服务:{{staffinfo.name}}</view>
<view>服务电话:{{staffinfo.phone}}</view>
</view>
<view class="handle">
<view wx:if="{{staffinfo.phone}}" class="font22r brownFont" bindtap="call">拨打电话</view>
<view wx:if="{{staffinfo.wechat}}" class="font22r brownFont" bindtap="copyWeChat">复制微信号</view>
</view>
</view>
</block>
<view class="welcome font36r">
{{home.slogan}}
</view>
<view class="preferential" wx:if="{{marketing && marketing.is_coupon=='1' && coupon_dataList.length>0}}">
<block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index">
<view class="preferentialItems" wx:if="{{dataStr<(item.etime*1)}}">
<view class="itemLeft">
<view class="itemTop">
<text>{{item.aname}}</text>
<view class="priceText" 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="discountText">{{item.discount}}折</text>
</view>
<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">
无限制{{item.desc?','+item.desc+'。':'。'}}
</view>
<view wx:if="{{item.exp_date.is_birthday=='1' || item.exp_date.is_birthday===true}}" class="bottom">
会员生日当天可用{{item.desc?','+item.desc+'。':'。'}}
</view>
</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>
</block>
</view>
<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="introduce" wx:if="{{store}}">
<view class="imgMask">
<view class="IntroduceColor">
<view class="chefText font36r">餐厅介绍</view>
<view class="labelBox">
<text class="texts">{{store.introduce}}
</text>
</view>
</view>
<view class="chefText font36r">餐厅环境</view>
<block wx:for="{{store.images}}" wx:key="arryIndex" wx:for-index="arryIndex">
<image src="{{item}}" mode="aspectFill" />
</block>
</view>
</view>
<view class="introduce famousChefBox" wx:if="{{chef}}">
<view class="imgMask">
<view class="IntroduceColor">
<view class="chefText font36r">主厨介绍</view>
<view class="labelBox">
<text class="texts">{{chef.introduce}}
</text>
</view>
</view>
<image src="{{chef.image}}" mode="aspectFill" />
</view>
</view>
<!-- 菜品展示 swich为1展示 -->
<view class="introduce vegetableBox" wx:if="{{signboard && signboard.swich=='1'}}">
<view class="imgMask">
<view class="IntroduceColor Introducepublic">
<view class="chefText font36r">特色菜品</view>
</view>
<block wx:for="{{signboard.images}}" wx:key="arryIndex" wx:for-index="arryIndex">
<image src="{{item}}" mode="aspectFill" />
</block>
</view>
</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">
本店特为贵宾提供提前点餐服务,您现在可以选菜下单,到店就餐时无需等待服务员点餐,可以直接享受就餐服务^_^
</view>
<view class="endStyle">
<view class="book-item-font second-book-button flex-cc font30r cook" style="position: relative;">
<view wx:if="{{detail && detail.seller.is_open_order==1 && marketing && marketing.is_order=='1'}}" class="menu-item menu-seller-item flex-ll" bindtap="cookbook">
去点餐
</view>
</view>
</view>
</view>
<view class="preferential" wx:if="{{marketing && (marketing.is_coupon=='1' || marketing.is_recharge=='1')}}">
<view class="rubric rubric1">
特别优惠
</view>
<!-- 当前日期要大于限制结束日期 -->
<view class="preferentialItems" wx:if="{{marketing && marketing.is_recharge=='1' && recharge_data && (is_fix!='1' || (is_fix=='1' && dataStr<(recharge_data.exp_date.fix_edate*1)))}}">
<view class="itemLeft">
<view class="itemTop">
<text>{{recharge_data.rname}}</text>
</view>
<view class="itemBottom" wx:if="{{priceInfo}}">
{{priceInfo}}{{(recharge_data.recharge_list.is_coupons=='0' && recharge_data.recharge_list.is_score=='0')?'。':';'}}
</view>
<view class="bottom" wx:if="{{scoreInfo}}">
{{scoreInfo}}{{recharge_data.recharge_list.is_coupons=='0'?'。':';'}}
</view>
<view class="bottom" wx:if="{{recharge_data.recharge_list.is_coupons=='1'}}">
{{recharge_data.recharge_list.is_coupons=='1'?'会员充值满'+marketing.recharge_data.recharge_money+'元赠送'+certificate:''}}。
</view>
</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>
</view>
<view class="vips">
<view wx:if="{{marketing.is_link}}" class="font24r favouredPolicy" bindtap="gotoFavourableList">
点击了解更多会员优惠政策
</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;">再次预订
</view>
<button wx:if="{{marketing.is_transpond=='1'}}" class="book-item-font flex-cc font30r shareItem" open-type="share">转发给客人
</button>
</view>
\ No newline at end of file
... ...
/* pages/customer/detail_owner_invitation2.wxss */
@import "../tpl/tpls.wxss";
.info {
text-align: center;
font-family: FangSong;
font-size: 40rpx;
background-image: -webkit-linear-gradient(bottom, #eeae74, #EEAE74);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
position: relative;
top: -68rpx;
}
.reservationInfo {
min-height: 200rpx;
margin: 0 30rpx;
padding: 30rpx 0;
position: relative;
color: #fff;
border-bottom-left-radius: 10rpx;
border-bottom-right-radius: 10rpx;
}
.reservationInfo .flex-11 {
margin-left: 30rpx;
display: flex;
line-height: 64rpx;
font-family: PingFang SC;
font-size: 32rpx;
}
.label {
flex-shrink: 0;
font-family: PingFang SC;
font-size: 32rpx;
}
.contentData {
flex: 1;
line-height: 60rpx;
font-family: PingFang SC;
font-size: 32rpx;
}
.handleInfo {
margin: 50rpx 40rpx 42rpx 40rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.welcome {
text-align: right;
margin: 42rpx 40rpx 40rpx 40rpx;
padding-bottom: 24rpx;
border-bottom: 2rpx solid #DBDBDB;
font-weight: 500;
letter-spacing: 2rpx;
}
.headerimg {
width: 140rpx;
height: 140rpx;
border-radius: 71rpx;
}
.handle {
display: flex;
flex-direction: column;
color: #999999;
font-family: PingFang SC;
font-weight: 500;
font-size: 26rpx;
height: 110rpx;
justify-content: space-between;
}
.handlePhone {
height: 100rpx;
color: #515151;
}
.brownFont {
padding: 8rpx 16rpx;
color: #0143A3;
border: 2rpx solid #0143A3;
border-radius: 22rpx;
text-align: center;
}
.brownFont:nth-of-type(1) {
margin-bottom: 10rpx;
}
.handle text {
margin-bottom: 20rpx;
}
.handle text:nth-of-type(2) {
margin-bottom: 0;
}
.positioningBox {
display: flex;
justify-content: center;
height: 232rpx;
}
.positioning {
margin: 50rpx 30rpx 0 30rpx;
display: flex;
box-sizing: border-box;
flex-direction: column;
background: #fff;
padding: 30rpx 0 34rpx 30rpx;
border-radius: 10rpx 10rpx 0 0;
flex: 1;
color: #000;
}
.positioning image {
width: 32rpx;
height: 38rpx;
margin-right: 20rpx;
}
.positioning .name {
width: 80%;
display: flex;
align-items: center;
font-family: PingFang SC;
font-size: 28rpx;
margin-top: 10rpx;
}
.positioning .name text {
line-height: 50rpx;
}
.positioning .name text:nth-of-type(2) {
text-indent: 8rpx;
}
.introduce {
box-sizing: border-box;
}
.imgMask {
margin: 20rpx 40rpx;
padding-bottom: 18rpx;
border-bottom: 2rpx solid #DBDBDB;
}
.famousChefBox .labelBox {
border-bottom: none;
}
.imgMask image {
margin: 0 15rpx;
}
.labelBox {
width: 100%;
display: flex;
margin-bottom: 20rpx;
position: relative;
padding-bottom: 20rpx;
border-bottom: 2rpx solid #DBDBDB;
}
.labelBox .texts {
width: 90%;
line-height: 40rpx;
margin-left: 20rpx;
color: #515151;
font-family: PingFang SC;
font-size: 20rpx;
max-height: 400rpx;
overflow: hidden;
white-space: pre-line;
word-wrap: break-word;
overflow: hidden;
word-break: break-all;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 10;
font-weight: 500;
}
.labelBox .line1 {
margin: 0 0 0 16rpx;
}
.imgMask image {
width: 95%;
display: block;
}
.famousChefBox {
position: relative;
}
.Introducepublic {
display: flex;
flex-direction: column;
font-size: 28rpx;
line-height: 50rpx;
box-sizing: border-box;
}
.chefText {
font-family: PingFang SC;
margin-bottom: 20rpx;
font-weight: 500;
}
.specialServices {
margin: 16rpx 40rpx;
border-bottom: 2rpx solid #DBDBDB;
}
.rubric {
font-family: PingFang SC;
font-weight: 500;
font-size: 36rpx;
margin-bottom: 10rpx;
}
.specialServices .news {
color: #515151;
font-family: PingFang SC;
font-weight: 500;
font-size: 24rpx;
line-height: 40rpx;
margin-left: 20rpx;
}
.endStyle {
display: flex;
justify-content: flex-end;
height: 60rpx;
margin: 20rpx 0;
}
.orderingFood {
padding: 0 26rpx;
border-radius: 22rpx;
text-align: center;
color: #fff;
border-radius: 32rpx;
margin: 20rpx 0;
line-height: 44rpx;
height: 44rpx;
background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%);
}
.preferential {
margin: 16rpx 40rpx 20rpx 40rpx;
}
.rubric1 {
margin-bottom: 20rpx;
}
.preferentialItems {
padding: 20rpx 30rpx 20rpx 20rpx;
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%;
}
.itemLeft {
width: 75%;
}
.itemTop {
display: flex;
width: 100%;
align-items: center;
margin-bottom: 20rpx;
}
.itemBottom {
margin-top: 20rpx;
color: #515151;
font-family: PingFang SC;
font-weight: 500;
font-size: 20rpx;
display: -webkit-box;
word-break: break-all;
word-wrap: break-word;
overflow: hidden;
text-align: left;
}
.itemTop text:nth-of-type(1) {
font-size: 28rpx;
font-weight: 600;
color: #515151;
}
.itemTop .discountText {
padding: 0 6rpx;
color: #E34D59;
border: 2rpx solid #E34D59;
border-radius: 6rpx;
margin: 0 10rpx 0 20rpx;
font-family: PingFang SC;
font-size: 24rpx;
height: 30rpx;
line-height: 30rpx;
}
.itemTop .priceText {
color: #E34D59;
font-weight: 500;
font-size: 30rpx;
}
.priceText {
display: flex;
align-items: center;
justify-content: center;
}
.priceText .icons {
margin-left: 18rpx;
color: #E34D59;
font-size: 20rpx;
}
.vips image {
height: 300rpx;
}
.vips {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding-bottom: 180rpx;
}
.favouredPolicy {
width: 45%;
color: #5C95D7;
font-family: PingFang SC;
font-weight: 500;
border: 2rpx solid #5C95D7;
border-radius: 22rpx;
text-align: center;
padding: 10rpx;
}
.all-button {
background: #FAFAFA;
height: 160rpx;
padding: 0 40rpx;
box-sizing: border-box;
z-index: 100;
justify-content: flex-end;
}
.between {
justify-content: space-between;
}
.centerBtn {
margin: 0 20rpx;
}
.second-book-button {
margin-right: 20rpx;
}
.book-item-font {
width: 25%;
border: 2rpx solid #0143A3;
color: #0143A3;
height: 46%;
border-radius: 42rpx;
font-weight: 600;
}
.shareItem {
width: 100%;
margin: 0;
background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%);
color: #fff;
}
.sharewidth .shareItem {
width: 100% !important;
}
.between .shareItem {
width: 65% !important;
}
.book-item-font {
width: 40% !important;
}
.menu-item {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.cook {
height: 94% !important;
background: #fff;
border: 2rpx solid #0143A3;
border-radius: 32rpx;
font-weight: normal;
width: 23% !important;
}
.bold {
font-weight: 500;
}
.evaluateBox {
margin: 16rpx 84rpx 16rpx 40rpx;
display: flex;
align-items: center;
justify-content: space-between;
color: #000;
}
.evaluateBox image {
width: 60rpx;
height: 70rpx;
}
.evaluateBox text {
color: #000;
font-size: 28rpx;
}
.more {
height: 80rpx;
width: 100%;
position: fixed;
bottom: 160rpx;
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;
}
.page-section-spacing {
margin-top: 20rpx;
position: relative;
display: flex;
white-space: nowrap;
width: auto;
overflow-x: scroll;
border-bottom-left-radius: 10rpx;
border-bottom-right-radius: 10rpx;
}
.imgs:nth-of-type(1) {
margin-left: 48rpx;
}
.scroll-view {
white-space: nowrap;
width: 100%;
height: 100%;
}
.imgs {
position: relative;
display: flex;
white-space: nowrap;
width: 282rpx;
height: 196rpx;
}
.imgs text {
background: #515151;
color: #fff;
position: absolute;
left: 0;
bottom: 0;
height: 38rpx;
line-height: 38rpx;
width: 262rpx;
text-align: center;
border-bottom-left-radius: 16rpx;
border-bottom-right-radius: 16rpx;
}
.imageStyle {
display: inline-block;
width: 282rpx;
height: 196rpx;
margin-right: 20rpx;
border-radius: 16rpx;
}
/* 深中国红 */
.crimson .reservationInfo,
.crimson .positioningBox {
background: #86201B;
}
.crimson .chefText,
.crimson .welcome,
.crimson .rubric {
color: #86201B;
}
/* 中国红 */
.chinaRed .reservationInfo,
.chinaRed .positioningBox {
background: #AF231C;
}
.chinaRed .chefText,
.chinaRed .welcome,
.chinaRed .rubric {
color: #AF231C;
}
/* 蓝采和 */
.lanCaiHe .reservationInfo,
.lanCaiHe .positioningBox {
background: #06436F;
}
.lanCaiHe .chefText,
.lanCaiHe .welcome,
.lanCaiHe .rubric {
color: #06436F;
}
/* 石绿 */
.stoneGreen .reservationInfo,
.stoneGreen .positioningBox {
background: #206864;
}
.stoneGreen .chefText,
.stoneGreen .welcome,
.stoneGreen .rubric {
color: #206864;
}
/* 姜黄 */
.turmeric .reservationInfo,
.turmeric .positioningBox {
background: #B39437;
}
.turmeric .chefText,
.turmeric .welcome,
.turmeric .rubric {
color: #B39437;
}
/* 苍黄 */
.greenishYellow .reservationInfo,
.greenishYellow .positioningBox {
background: #C85306;
}
.greenishYellow .chefText,
.greenishYellow .welcome,
.greenishYellow .rubric {
color: #C85306;
}
/* 金黄 */
.golden .reservationInfo,
.golden .positioningBox {
background: #C67B3A;
}
.golden .chefText,
.golden .welcome,
.golden .rubric {
color: #C67B3A;
}
/* 群青 */
.ultramarine .reservationInfo,
.ultramarine .positioningBox {
background: #0143A3;
}
.ultramarine .chefText,
.ultramarine .welcome,
.ultramarine .rubric {
color: #0143A3;
}
/* 摩洛哥蓝 */
.moroccanBlue .reservationInfo,
.moroccanBlue .positioningBox {
background: #19516A;
}
.moroccanBlue .chefText,
.moroccanBlue .welcome,
.moroccanBlue .rubric {
color: #19516A;
}
\ No newline at end of file
... ...
// pages/customer/detail_owner_invitation3.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,
chef: {},
marketing: {},
home: {},
reserve: {},
signboard: {},
store: {},
recharge_data: {},
coupon_dataList: [],
stringifyUse: '',
current: 0,
seller: {
name: '',
tablesText: '',
date: '',
addr: ''
},
priceInfo: '',
scoreInfo: '',
discount: '',
certificate: '',
dataStr: Date.now() * 1 / 1000,
swich_phone: '0',
is_comments: '0',
is_user_comments: false,
tableinfo: [],
StyleType: '',
showMoreTip: true,
themeColor: 'lanCaiHe',
screenHeight: '',
whiteBj: false,
},
tablestr: '',
urlsValue: [],
screenHeight: '',
/**
* 生命周期函数--监听页面加载
*/
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, //渠道分析
});
const systemInfo = wx.getSystemInfoSync();
this.screenHeight = systemInfo.windowHeight; // 获取屏幕高度
},
// 页面滚动事件
onPageScroll: function (event) {
const scrollTop = event.scrollTop * 1 + this.screenHeight - 80; // 获取滚动的距离
if (scrollTop < this.screenHeight) {
this.setData({
showMoreTip: true
});
} else {
this.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')
wx.navigateTo({
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',
previousPage: '1',
}, '/pages/pinglun/createOpinion')
wx.navigateTo({
url
})
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
return this.sharesetting();
},
/**
* 监听用户点击分享到朋友圈按钮的操作
*/
onShareTimeline() {
return this.sharesetting();
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getDetail()
},
// 复制微信号
copyWeChat() {
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)
}
})
},
// 获取包间图片列表
getroomimage(sellerid) {
App.Tables.GetTablesPhoto({
sellerid,
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', urlsArr)
console.log('roomimage', json.data)
}
})
},
// 预览包间图片
lookroom(e) {
const item = e.currentTarget.dataset['item'];
wx.previewImage({
current: item.url, // 当前显示图片的http链接
urls: this.urlsValue, // 需要预览的图片http链接列表
})
},
// 获取店铺详情
getDetail() {
App.Reserve.Detail({
openid: getApp().openid,
rid: this.data.options.id
}).then(res => {
let tablesText = '', //桌子信息
tableNum = 0;
let tableinfo = util.determine(res.data.tableinfo);
console.log('tableinfo', tableinfo);
res.data.tables.forEach((t, i) => {
tableNum += t.table_pnum * 1
tablesText += t.rname + t.name + (i == (res.data.tables.length - 1) ? '' : '、');
})
let tabaleids = [];
res.data.tables.forEach(t => {
tabaleids.push(t.id);
})
this.tablestr = tabaleids.toString();
let reserev = RS.reserve(res.data)
let dateSmart
if (res.data.type == 1) {
dateSmart = util.unixtoTime(reserev.ddate, 'YYYY年MM月DD日 星期WW')
if (res.data.is_set_ddate == 1) {
dateSmart += ' ' + util.unixtoTime(reserev.ddate, 'YYYY年MM月DD日 星期WW')
} else {
dateSmart += ' ' + reserev.soltName
}
} else {
dateSmart = util.unixtoTime(reserev.ddate, 'YYYY年MM月DD日 星期WW')
}
console.log('dateSmart', dateSmart);
this.setData({
detail: this.formatDatail(reserev, dateSmart),
tableNum,
tableinfo,
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,
time: util.unixtoTime(reserev.ddate, '星期WW HH:II'),
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)
this.getroomimage(reserev.sid)
}, 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,
}
},
// 修改detail数据
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 themeColor, whiteBj, home, chef, marketing, coupon, reserve, swich_phone, is_comments, signboard, store, 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(1));
coupon.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : '';
}
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(1));
item.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : '';
}
})
}
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
})
}
// themeColor = 'blackBlueGradient' // 黑蓝过渡
// themeColor = 'stoneGreenGradient' // 石绿过渡
// themeColor = 'chinaRedGradient' // 中国红过渡
// themeColor = 'ultramarineGradient' // 群青过渡
// themeColor = 'crimson' // 深中国红
// themeColor = 'chinaRed' // 中国红
// themeColor = 'lanCaiHe' // 蓝采和
// themeColor = 'stoneGreen' // 石绿
// themeColor = 'turmeric' // 姜黄
// themeColor = 'greenishYellow' // 苍黄
themeColor = 'golden' // 金黄
// themeColor = 'ultramarine' // 群青
// themeColor = 'moroccanBlue' // 摩洛哥蓝
if (themeColor == 'turmeric' || themeColor == 'golden') {
whiteBj = true
} else {
whiteBj = false
}
this.setData({
chef,
marketing,
home,
reserve,
signboard,
store,
priceInfo,
scoreInfo,
swich_phone,
is_comments,
StyleType: res.data.type,
themeColor,
whiteBj,
})
}).catch(res => {
console.log('GetSellerTemplateConf请求失败');
})
},
// 再次预订
secondbook() {
wx.reportMonitor('1013', 1)
wx.redirectTo({
url: '../reserve/detail?id=' + this.data.detail.seller.id
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
})
\ No newline at end of file
... ...
{
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "",
"usingComponents": {
"nav": "/components/nav/nav"
}
}
\ No newline at end of file
... ...
<!--pages/customer/detail_owner_invitation3.wxml-->
<import src="../tpl/invitation"></import>
<nav hasHome class="navhome" place="{{true}}"></nav>
<scroll-view scroll-y class="{{themeColor}}">
<view class="reservationInfo">
<view class="titleImg">
<image src="{{whiteBj?'https://qn.colorcun.com/whiteBj1.png':'http://nosqn.colorcun.com/book-flower.png'}}" class="titleIcon"></image>
<view class="title">{{home?home.title:seller.name}}</view>
<view class="info">
{{home.slogan}}
</view>
</view>
<view wx:if="{{roomimage && roomimage.length>0}}" class="page-section-spacing {{roomimage.length=='1'?'centerBox':''}}">
<view wx:for="{{roomimage}}" class="imgs" wx:key="index" bindtap="lookroom" data-item="{{item}}">
<image class="imageStyle" mode="aspectFill" src="{{item.url}}"></image>
<text>{{item.name}}</text>
</view>
</view>
<view class="begin font40r">
<view>尊敬的贵宾,您好!</view>
<view>非常感谢您选择【{{seller.name?seller.name:reserve.seller_name}}】!</view>
</view>
<view class="flex-11" wx:if="{{seller.date}}">
<view class="label">【日期】</view>
<view class="contentData">{{seller.date}}</view>
</view>
<view class="flex-11" wx:if="{{seller.soltName}}">
<view class="label">【餐段】</view>
<view class="contentData">{{seller.soltName}}</view>
</view>
<view class="flex-11" wx:if="{{seller.tablesText}}">
<view class="label">【餐位】</view>
<view class="contentData bold">{{seller.tablesText}}</view>
</view>
<view class="flex-11" wx:if="{{detail.actual_pum || tableNum}}">
<view class="label">【人数】</view>
<view class="contentData">{{detail.actual_pum?detail.actual_pum:tableNum}}位</view>
</view>
<view class="flex-11" wx:if="{{reserve && reserve.swich_park=='1' && reserve.park_info}}">
<view class="label">【停车】</view>
<view class="contentData">{{reserve.park_info}}</view>
</view>
<view class="flex-11" wx:if="{{ swich_phone!='0' && detail.seller.phone}}">
<view class="label">【联系】</view>
<view class="contentData">{{detail.seller.phone}}</view>
</view>
<block wx:if="{{staffinfo && reserve.swich_manager=='1'}}">
<view class="handleInfo">
<image wx:if="{{staffinfo && staffinfo.photo}}" src="{{staffinfo.photo}}" class="headerimg" mode="aspectFill"></image>
<view class="handle handlePhone">
<view>专属服务:{{staffinfo.name}}</view>
<view>服务电话:{{staffinfo.phone}}</view>
</view>
<view class="handle">
<view wx:if="{{staffinfo.phone}}" class="font22r brownFont" bindtap="call">拨打电话</view>
<view wx:if="{{staffinfo.wechat}}" class="font22r brownFont" bindtap="copyWeChat">复制微信号</view>
</view>
</view>
</block>
<view class="welcome font32r">
{{home.slogan}}
</view>
<view class="positioning" bindtap="looklocation">
<view class="name">
<image src="https://qn.colorcun.com/mapIcon.png" mode="" />
<text class="font36r">{{seller.addr|| reserev.seller.map_address}}</text>
</view>
</view>
</view>
<view class="preferential" wx:if="{{marketing && marketing.is_coupon=='1' && coupon_dataList.length>0}}">
<block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index">
<view class="preferentialItems" wx:if="{{dataStr<(item.etime*1)}}">
<view class="itemLeft">
<view class="itemTop">
<text>{{item.aname}}</text>
<view class="priceText" 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="discountText">{{item.discount}}折</text>
</view>
<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">
无限制{{item.desc?','+item.desc+'。':'。'}}
</view>
<view wx:if="{{item.exp_date.is_birthday=='1' || item.exp_date.is_birthday===true}}" class="bottom">
会员生日当天可用{{item.desc?','+item.desc+'。':'。'}}
</view>
</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>
</block>
</view>
<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="introduce" wx:if="{{store}}">
<view class="imgMask">
<view class="IntroduceColor">
<view class="chefText font36r">餐厅介绍</view>
<view class="labelBox">
<text class="texts">{{store.introduce}}
</text>
</view>
</view>
<view class="chefText font36r">餐厅环境</view>
<block wx:for="{{store.images}}" wx:key="arryIndex" wx:for-index="arryIndex">
<image src="{{item}}" mode="aspectFill" />
</block>
</view>
</view>
<view class="introduce famousChefBox" wx:if="{{chef}}">
<view class="imgMask">
<view class="IntroduceColor">
<view class="chefText font36r">主厨介绍</view>
<view class="labelBox">
<text class="texts">{{chef.introduce}}
</text>
</view>
</view>
<image src="{{chef.image}}" mode="aspectFill" />
</view>
</view>
<!-- 菜品展示 swich为1展示 -->
<view class="introduce vegetableBox" wx:if="{{signboard && signboard.swich=='1'}}">
<view class="imgMask">
<view class="IntroduceColor Introducepublic">
<view class="chefText font36r">特色菜品</view>
</view>
<block wx:for="{{signboard.images}}" wx:key="arryIndex" wx:for-index="arryIndex">
<image src="{{item}}" mode="aspectFill" />
</block>
</view>
</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">
本店特为贵宾提供提前点餐服务,您现在可以选菜下单,到店就餐时无需等待服务员点餐,可以直接享受就餐服务^_^
</view>
<view class="endStyle">
<view class="book-item-font second-book-button flex-cc font30r cook" style="position: relative;">
<view wx:if="{{detail && detail.seller.is_open_order==1 && marketing && marketing.is_order=='1'}}" class="menu-item menu-seller-item flex-ll" bindtap="cookbook">
去点餐
</view>
</view>
</view>
</view>
<view class="preferential" wx:if="{{marketing && (marketing.is_coupon=='1' || marketing.is_recharge=='1')}}">
<view class="rubric rubric1">
特别优惠
</view>
<!-- 当前日期要大于限制结束日期 -->
<view class="preferentialItems" wx:if="{{marketing && marketing.is_recharge=='1' && recharge_data && (is_fix!='1' || (is_fix=='1' && dataStr<(recharge_data.exp_date.fix_edate*1)))}}">
<view class="itemLeft">
<view class="itemTop">
<text>{{recharge_data.rname}}</text>
</view>
<view class="itemBottom" wx:if="{{priceInfo}}">
{{priceInfo}}{{(recharge_data.recharge_list.is_coupons=='0' && recharge_data.recharge_list.is_score=='0')?'。':';'}}
</view>
<view class="bottom" wx:if="{{scoreInfo}}">
{{scoreInfo}}{{recharge_data.recharge_list.is_coupons=='0'?'。':';'}}
</view>
<view class="bottom" wx:if="{{recharge_data.recharge_list.is_coupons=='1'}}">
{{recharge_data.recharge_list.is_coupons=='1'?'会员充值满'+marketing.recharge_data.recharge_money+'元赠送'+certificate:''}}。
</view>
</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>
</view>
<view class="vips">
<view wx:if="{{marketing.is_link}}" class="font24r favouredPolicy" bindtap="gotoFavourableList">
点击了解更多会员优惠政策
</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;">再次预订
</view>
<button wx:if="{{marketing.is_transpond=='1'}}" class="book-item-font flex-cc font30r shareItem" open-type="share">转发给客人
</button>
</view>
\ No newline at end of file
... ...
/* pages/customer/detail_owner_invitation3.wxss */
@import "../tpl/tpls.wxss";
.titleImg {
top: 160rpx;
left: 1rpx;
width: 750rpx;
height: 300rpx;
}
.titleIcon {
width: 312rpx;
height: 166rpx;
position: relative;
left: -10rpx;
}
.info {
text-align: center;
font-size: 40rpx;
position: relative;
top: -68rpx;
color: #d8c46b;
font-family: FangSong;
margin: 18rpx 0 36rpx 0;
}
.title {
text-align: center;
font-family: PingFang SC;
font-size: 72rpx;
position: relative;
top: -70rpx;
color: #FFD200;
}
.begin {
margin: 20rpx 0 30rpx 30rpx;
color: #FBF6F1;
font-family: PingFang SC;
}
.begin view {
line-height: 64rpx;
}
.info {
text-align: center;
font-family: FangSong;
font-size: 40rpx;
background-image: -webkit-linear-gradient(bottom, #eeae74, #EEAE74);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
position: relative;
top: -68rpx;
}
.reservationInfo {
min-height: 200rpx;
padding: 20rpx 0;
position: relative;
color: #FBF6F1;
border-bottom-left-radius: 10rpx;
border-bottom-right-radius: 10rpx;
}
.reservationInfo .flex-11 {
margin-left: 30rpx;
width: 100%;
display: flex;
line-height: 60rpx;
font-family: PingFang SC;
font-size: 32rpx;
}
.label {
flex-shrink: 0;
font-family: PingFang SC;
font-size: 32rpx;
}
.contentData {
flex: 1;
line-height: 60rpx;
font-family: PingFang SC;
font-size: 32rpx;
}
.handleInfo {
margin: 50rpx 40rpx 42rpx 40rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.welcome {
text-align: center;
margin: 42rpx 40rpx 8rpx 40rpx;
font-weight: 500;
letter-spacing: 2rpx;
color: #FBF6F1;
}
.headerimg {
width: 140rpx;
height: 140rpx;
border-radius: 71rpx;
}
.handle {
display: flex;
flex-direction: column;
color: #FBF6F1;
font-family: PingFang SC;
font-weight: 500;
font-size: 26rpx;
height: 110rpx;
justify-content: space-between;
}
.handlePhone {
height: 100rpx;
}
.brownFont {
padding: 8rpx 16rpx;
color: #FBF6F1;
border: 2rpx solid #FBF6F1;
border-radius: 22rpx;
text-align: center;
}
.brownFont:nth-of-type(1) {
margin-bottom: 10rpx;
}
.handle text {
margin-bottom: 20rpx;
}
.handle text:nth-of-type(2) {
margin-bottom: 0;
}
.positioning {
display: flex;
justify-content: center;
margin: 8rpx 30rpx 0 30rpx;
display: flex;
box-sizing: border-box;
flex-direction: column;
background: #FBF6F1;
padding: 20rpx;
border-radius: 16rpx;
flex: 1;
color: #515151;
}
.positioning image {
width: 32rpx;
height: 38rpx;
margin-right: 20rpx;
}
.positioning .name {
width: 80%;
display: flex;
align-items: center;
font-family: PingFang SC;
font-size: 28rpx;
margin-top: 10rpx;
}
.positioning .name text {
line-height: 50rpx;
}
.positioning .name text:nth-of-type(2) {
text-indent: 8rpx;
}
.introduce {
box-sizing: border-box;
}
.imgMask {
margin: 20rpx 40rpx;
padding-bottom: 18rpx;
border-bottom: 2rpx solid #DBDBDB;
}
.famousChefBox .labelBox {
border-bottom: none;
}
.imgMask image {
margin: 0 15rpx;
}
.labelBox {
width: 100%;
display: flex;
margin-bottom: 20rpx;
position: relative;
padding-bottom: 20rpx;
border-bottom: 2rpx solid #DBDBDB;
}
.labelBox .texts {
width: 90%;
line-height: 40rpx;
margin-left: 20rpx;
color: #515151;
font-family: PingFang SC;
font-size: 20rpx;
max-height: 400rpx;
overflow: hidden;
white-space: pre-line;
word-wrap: break-word;
overflow: hidden;
word-break: break-all;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 10;
font-weight: 500;
}
.labelBox .line1 {
margin: 0 0 0 16rpx;
}
.imgMask image {
width: 95%;
display: block;
}
.famousChefBox {
position: relative;
}
.Introducepublic {
display: flex;
flex-direction: column;
font-size: 28rpx;
line-height: 50rpx;
box-sizing: border-box;
}
.chefText {
font-family: PingFang SC;
margin-bottom: 20rpx;
font-weight: 500;
}
.specialServices {
margin: 16rpx 40rpx;
border-bottom: 2rpx solid #DBDBDB;
}
.rubric {
font-family: PingFang SC;
font-weight: 500;
font-size: 36rpx;
margin-bottom: 10rpx;
}
.specialServices .news {
color: #515151;
font-family: PingFang SC;
font-weight: 500;
font-size: 24rpx;
line-height: 40rpx;
margin-left: 20rpx;
}
.endStyle {
display: flex;
justify-content: flex-end;
height: 54rpx;
margin: 20rpx 0;
}
.orderingFood {
padding: 0 26rpx;
border-radius: 22rpx;
text-align: center;
color: #fff;
border-radius: 32rpx;
margin: 20rpx 0;
line-height: 44rpx;
height: 44rpx;
background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%);
}
.preferential {
margin: 16rpx 40rpx 20rpx 40rpx;
}
.rubric1 {
margin-bottom: 20rpx;
}
.preferentialItems {
padding: 20rpx 30rpx 20rpx 20rpx;
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%;
}
.itemLeft {
width: 75%;
}
.itemTop {
display: flex;
width: 100%;
align-items: center;
margin-bottom: 20rpx;
}
.itemBottom {
margin-top: 20rpx;
color: #515151;
font-family: PingFang SC;
font-weight: 500;
font-size: 20rpx;
display: -webkit-box;
word-break: break-all;
word-wrap: break-word;
overflow: hidden;
text-align: left;
}
.itemTop text:nth-of-type(1) {
font-size: 28rpx;
font-weight: 600;
color: #515151;
}
.itemTop .discountText {
padding: 0 6rpx;
color: #E34D59;
border: 2rpx solid #E34D59;
border-radius: 6rpx;
margin: 0 10rpx 0 20rpx;
font-family: PingFang SC;
font-size: 24rpx;
height: 30rpx;
line-height: 30rpx;
}
.itemTop .priceText {
color: #E34D59;
font-weight: 500;
font-size: 30rpx;
}
.priceText {
display: flex;
align-items: center;
justify-content: center;
}
.priceText .icons {
margin-left: 18rpx;
color: #E34D59;
font-size: 20rpx;
}
.vips image {
height: 300rpx;
}
.vips {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding-bottom: 180rpx;
}
.favouredPolicy {
width: 45%;
color: #5C95D7;
font-family: PingFang SC;
font-weight: 500;
border: 2rpx solid #5C95D7;
border-radius: 22rpx;
text-align: center;
padding: 10rpx;
}
.all-button {
background: #FAFAFA;
height: 160rpx;
padding: 0 40rpx;
box-sizing: border-box;
z-index: 100;
justify-content: flex-end;
}
.between {
justify-content: space-between;
}
.centerBtn {
margin: 0 20rpx;
}
.second-book-button {
margin-right: 20rpx;
}
.book-item-font {
width: 25%;
border: 2rpx solid #0143A3;
color: #0143A3;
height: 46%;
border-radius: 42rpx;
font-weight: 600;
}
.shareItem {
width: 100%;
margin: 0;
background: #fafafa;
color: #0143A3;
border: 2rpx solid #0143A3;
}
.between .shareItem {
width: 100%;
margin: 0;
background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%);
color: #fff;
}
.sharewidth .shareItem {
width: 100% !important;
}
.between .shareItem {
width: 65% !important;
}
.book-item-font {
width: 40% !important;
}
.menu-item {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.cook {
height: 94% !important;
background: #fff;
border: 2rpx solid #0143A3;
border-radius: 32rpx;
font-weight: normal;
width: 23% !important;
}
.bold {
font-weight: 500;
}
.evaluateBox {
margin: 16rpx 84rpx 16rpx 40rpx;
display: flex;
align-items: center;
justify-content: space-between;
color: #000;
}
.evaluateBox image {
width: 60rpx;
height: 70rpx;
}
.evaluateBox text {
color: #000;
font-size: 28rpx;
}
.more {
height: 80rpx;
width: 100%;
position: fixed;
bottom: 160rpx;
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;
}
.page-section-spacing {
position: relative;
display: flex;
white-space: nowrap;
width: auto;
overflow-x: scroll;
border-bottom-left-radius: 10rpx;
border-bottom-right-radius: 10rpx;
}
.imgs:nth-of-type(1) {
margin-left: 100rpx;
}
.scroll-view {
white-space: nowrap;
width: 100%;
height: 100%;
}
.imgs {
position: relative;
display: flex;
white-space: nowrap;
width: 470rpx;
height: 348rpx;
margin-right: 30rpx;
}
.imgs text {
background: #515151;
color: #fff;
position: absolute;
left: 0;
bottom: 0;
height: 64rpx;
line-height: 64rpx;
width: 470rpx;
text-align: center;
border-bottom-left-radius: 16rpx;
border-bottom-right-radius: 16rpx;
}
.imageStyle {
display: inline-block;
width: 500rpx;
height: 348rpx;
border-radius: 16rpx;
}
.centerBox {
justify-content: center;
}
/* 黑蓝过渡 */
.blackBlueGradient .reservationInfo {
background: linear-gradient(104.24deg, #42a5ff -57.47%, #000000 55.72%, #42a5ff 182.69%);
}
.blackBlueGradient .chefText,
.blackBlueGradient .rubric {
color: #0143A3;
}
/* 石绿过渡 */
.stoneGreenGradient .reservationInfo {
background: linear-gradient(121.52deg, #438e93 1.76%, #206864 42.99%, #206864 75.66%, #42a5ff 120.1%);
}
.stoneGreenGradient .chefText,
.stoneGreenGradient .rubric {
color: #206864;
}
/* 中国红过渡 */
.chinaRedGradient .reservationInfo {
background: linear-gradient(309.04deg, #af231c -2.27%, #86201b 44.37%, #af231c 91.74%);
}
.chinaRedGradient .chefText,
.chinaRedGradient .rubric {
color: #86201B;
}
/* 群青过渡 */
.ultramarineGradient .reservationInfo {
background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%);
}
.ultramarineGradient .chefText,
.ultramarineGradient .rubric {
color: #0143A3;
}
/* 深中国红 */
.crimson .reservationInfo {
background: #86201B;
}
.crimson .chefText,
.crimson .rubric {
color: #86201B;
}
/* 中国红 */
.chinaRed .reservationInfo {
background: #AF231C;
}
.chinaRed .chefText,
.chinaRed .rubric {
color: #AF231C;
}
/* 蓝采和 */
.lanCaiHe .reservationInfo {
background: #06436F;
}
.lanCaiHe .chefText,
.lanCaiHe .rubric {
color: #06436F;
}
/* 石绿 */
.stoneGreen .reservationInfo {
background: #206864;
}
.stoneGreen .chefText,
.stoneGreen .rubric {
color: #206864;
}
/* 姜黄 */
.turmeric .reservationInfo {
background: #B39437;
}
.turmeric .chefText,
.turmeric .rubric {
color: #B39437;
}
.turmeric .info {
-webkit-text-fill-color: #fff;
}
.turmeric .title {
color: #fff;
}
/* 苍黄 */
.greenishYellow .reservationInfo {
background: #C85306;
}
.greenishYellow .chefText,
.greenishYellow .rubric {
color: #C85306;
}
/* 金黄 */
.golden .reservationInfo {
background: #C67B3A;
}
.golden .chefText,
.golden .rubric {
color: #C67B3A;
}
.golden .info {
-webkit-text-fill-color: #fff;
}
.golden .title {
color: #fff;
}
/* 群青 */
.ultramarine .reservationInfo {
background: #0143A3;
}
.ultramarine .chefText,
.ultramarine .rubric {
color: #0143A3;
}
/* 摩洛哥蓝 */
.moroccanBlue .reservationInfo {
background: #19516A;
}
.moroccanBlue .chefText,
.moroccanBlue .rubric {
color: #19516A;
}
\ No newline at end of file
... ...
// pages/customer/detail_owner_invitation6.js
// pages/customer/detail_owner_invitation4.js
var mta = require('mta-wechat-analysis')
import util from '../../utils/util';
import App from '../../utils/api';
... ... @@ -16,8 +16,6 @@ Page({
detail: {},
staffinfo: {},
between: false,
id: null,
msgTpl: '',
chef: {},
marketing: {},
home: {},
... ... @@ -26,10 +24,8 @@ Page({
store: {},
recharge_data: {},
coupon_dataList: [],
homeColor: '',
stringifyUse: '',
current: 0,
theme: 'blackGold', //blue green blackGold
seller: {
name: '',
tablesText: '',
... ... @@ -47,9 +43,13 @@ Page({
tableinfo: [],
StyleType: '',
showMoreTip: true,
themeColor: 'lanCaiHe',
screenHeight: '',
whiteBj: false,
},
tablestr: '',
urlsValue: [],
screenHeight: '',
/**
* 生命周期函数--监听页面加载
*/
... ... @@ -71,26 +71,21 @@ Page({
"statReachBottom": true,
"lauchOpts": options, //渠道分析
});
const systemInfo = wx.getSystemInfoSync();
this.screenHeight = systemInfo.windowHeight; // 获取屏幕高度
},
// 页面滚动事件
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
});
}
}
});
const scrollTop = event.scrollTop * 1 + this.screenHeight - 80; // 获取滚动的距离
if (scrollTop < this.screenHeight) {
this.setData({
showMoreTip: true
});
} else {
this.setData({
showMoreTip: false
});
}
},
// 点击了解更多会员优惠政策
gotoFavourableList() {
... ... @@ -123,6 +118,9 @@ Page({
onShareAppMessage: function () {
return this.sharesetting();
},
/**
* 监听用户点击分享到朋友圈按钮的操作
*/
onShareTimeline() {
return this.sharesetting();
},
... ... @@ -132,7 +130,8 @@ Page({
onShow: function () {
this.getDetail()
},
cli() {
// 复制微信号
copyWeChat() {
if (this.data.staffinfo.wechat) {
wx.setClipboardData({
data: this.data.staffinfo.wechat,
... ... @@ -148,12 +147,14 @@ Page({
console.log('无微信号')
}
},
// 拨打电话
call() {
wx.reportMonitor('1012', 1)
wx.makePhoneCall({
phoneNumber: this.data.staffinfo.phone
})
},
// 导航
looklocation: function () {
wx.reportMonitor('1015', 1)
wx.openLocation({
... ... @@ -166,6 +167,7 @@ Page({
}
})
},
// 获取包间图片列表
getroomimage(sellerid) {
App.Tables.GetTablesPhoto({
sellerid,
... ... @@ -185,6 +187,7 @@ Page({
}
})
},
// 预览包间图片
lookroom(e) {
const item = e.currentTarget.dataset['item'];
wx.previewImage({
... ... @@ -192,6 +195,7 @@ Page({
urls: this.urlsValue, // 需要预览的图片http链接列表
})
},
// 获取店铺详情
getDetail() {
App.Reserve.Detail({
openid: getApp().openid,
... ... @@ -213,14 +217,14 @@ Page({
let reserev = RS.reserve(res.data)
let dateSmart
if (res.data.type == 1) {
dateSmart = util.unixtoTime(reserev.ddate, 'YYYY年MM月DD日 DAY')
dateSmart = util.unixtoTime(reserev.ddate, 'YYYY年MM月DD日 星期WW')
if (res.data.is_set_ddate == 1) {
dateSmart += ' ' + util.unixtoTime(reserev.ddate, 'YYYY年MM月DD日 DAY')
dateSmart += ' ' + util.unixtoTime(reserev.ddate, 'YYYY年MM月DD日 星期WW')
} else {
dateSmart += ' ' + reserev.soltName
}
} else {
dateSmart = util.unixtoTime(reserev.ddate, 'YYYY年MM月DD日 DAY')
dateSmart = util.unixtoTime(reserev.ddate, 'YYYY年MM月DD日 星期WW')
}
console.log('dateSmart', dateSmart);
this.setData({
... ... @@ -258,6 +262,7 @@ Page({
console.log(res, '详情请求失败');
})
},
// 客户经理获取基本信息
getstaffinfo(uid) {
console.log('sellerid', this.data.detail.seller.id);
App.Activity.GetCustomerActivityBaseinfo({
... ... @@ -272,6 +277,7 @@ Page({
}
})
},
// 提前点餐
cookbook() {
if (this.data.detail.order && this.data.detail.order.cookbooklist.length > 0) {
let data = {
... ... @@ -305,6 +311,7 @@ Page({
})
}
},
// 分享
sharesetting() {
wx.reportMonitor('1017', 1)
let parmdata = {
... ... @@ -323,6 +330,7 @@ Page({
imageUrl: this.data.detail.seller.seller_image,
}
},
// 修改detail数据
formatDatail(detail, dateSmart) {
detail.rdateStr = dateSmart;
detail.tableFirst = detail.tables[0].name;
... ... @@ -344,6 +352,7 @@ Page({
}
return detail;
},
// 获取商家设置营销信息
getSellerTemplateConfFun(sid) {
console.log(sid, 'sidsidsidsid');
App.Seller.GetSellerTemplateConf({
... ... @@ -352,7 +361,7 @@ Page({
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;
let themeColor, whiteBj, home, chef, marketing, coupon, reserve, swich_phone, is_comments, signboard, store, priceInfo, certificate, scoreInfo, recharge_list, stringifyUse;
chef = util.determine(data.chef);
reserve = util.determine(data.reserve);
marketing = util.determine(data.marketing);
... ... @@ -370,8 +379,8 @@ Page({
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) : '';
console.log('cash', cash + '---' + 'price', price + '---' + 'discount', ((price / cash) * 10).toFixed(1));
coupon.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : '';
}
coupon_dataList.push(coupon);
}
... ... @@ -382,8 +391,8 @@ Page({
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) : '';
console.log('cash', cash + '---' + 'price', price + '---' + 'discount', ((price / cash) * 10).toFixed(1));
item.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : '';
}
})
}
... ... @@ -431,12 +440,24 @@ Page({
between: true
})
}
if (home && home.red && home.green && home.blue && home.alpha) {
homeColor = home.red + ',' + home.green + ',' + home.blue + ',' + home.alpha
// themeColor = 'blackBlueGradient' // 黑蓝过渡
// themeColor = 'stoneGreenGradient' // 石绿过渡
// themeColor = 'chinaRedGradient' // 中国红过渡
// themeColor = 'ultramarineGradient' // 群青过渡
// themeColor = 'crimson' // 深中国红
// themeColor = 'chinaRed' // 中国红
// themeColor = 'lanCaiHe' // 蓝采和
// themeColor = 'stoneGreen' // 石绿
// themeColor = 'turmeric' // 姜黄
// themeColor = 'greenishYellow' // 苍黄
// themeColor = 'golden' // 金黄
// themeColor = 'ultramarine' // 群青
themeColor = 'moroccanBlue' // 摩洛哥蓝
if (themeColor == 'turmeric' || themeColor == 'golden') {
whiteBj = true
} else {
homeColor = '67,142,147,1'
whiteBj = false
}
console.log('homeColor', homeColor);
this.setData({
chef,
marketing,
... ... @@ -444,34 +465,16 @@ Page({
reserve,
signboard,
store,
homeColor, //home主题颜色
priceInfo,
scoreInfo,
swich_phone,
is_comments,
StyleType: res.data.type,
themeColor,
whiteBj,
})
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请求失败');
console.log('GetSellerTemplateConf请求失败');
})
},
// 再次预订
... ...
<!--pages/customer/detail_owner_invitation4.wxml-->
<nav hasHome class="navhome" place="{{true}}"></nav>
<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>
<scroll-view scroll-y class="{{themeColor}}">
<view class="reservationInfo">
<image src="{{whiteBj?'https://qn.colorcun.com/whiteBj1.png':'http://nosqn.colorcun.com/book-flower.png'}}" class="titleIcon"></image>
<image src="{{whiteBj?'https://qn.colorcun.com/whiteBj2.png':'https://qn.colorcun.com/bj.png'}}" class="bjIcon"></image>
<view class="infoBox">
<view class="left">
<view class="title">{{seller.name}}</view>
<view class="leftLine"></view>
<view class="leftInfo font28r">{{seller.date}} {{seller.soltName}}</view>
<view class="leftInfo font28r">{{seller.time}}</view>
<view class="leftInfo font28r tables">{{seller.tablesText}}</view>
<view class="leftInfo font36r">{{seller.date}} {{seller.soltName}}</view>
<view class="leftInfo font36r">{{seller.time}}</view>
<view class="leftInfo font36r">{{seller.tablesText}}</view>
<view class="leftInfo font36r tables" wx:if="{{detail.seller.phone}}">预订台 {{detail.seller.phone}}</view>
</view>
<view class="line"></view>
<view class="right">
... ... @@ -43,8 +44,8 @@
</view>
</view>
</block>
<view class="botomBor font36r">
恭候您的光临!
<view class="chefText font36r">
{{home.slogan}}
</view>
<view class="preferential" wx:if="{{marketing && marketing.is_coupon=='1' && coupon_dataList.length>0}}">
<block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index">
... ... @@ -84,12 +85,12 @@
<block wx:if="{{store}}">
<view class="imgMask">
<view class="IntroduceColor">
<view class="text font36r">餐厅介绍</view>
<view class="text font36r rubric">餐厅介绍</view>
<view class="labelBox font24r">
{{store.introduce}}
</view>
</view>
<view class="text font36r">餐厅环境</view>
<view class="text font36r rubric">餐厅环境</view>
<block wx:for="{{store.images}}" wx:key="arryIndex" wx:for-index="arryIndex">
<image src="{{item}}" mode="aspectFill" />
</block>
... ... @@ -98,7 +99,7 @@
<block wx:if="{{chef}}">
<view class="imgMask">
<view class="IntroduceColor noneBor">
<view class="text font36r">主厨介绍</view>
<view class="text font36r rubric">主厨介绍</view>
<view class="labelBox font24r">
{{chef.introduce}}
</view>
... ... @@ -109,7 +110,7 @@
<block wx:if="{{signboard && signboard.swich=='1'}}">
<view class="imgMask">
<view class="IntroduceColor noneBor">
<view class="text font36r">特色菜品</view>
<view class="text font36r rubric">特色菜品</view>
</view>
<block wx:for="{{signboard.images}}" wx:key="arryIndex" wx:for-index="arryIndex">
<image src="{{item}}" mode="aspectFill" />
... ... @@ -153,7 +154,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>
... ... @@ -171,8 +172,6 @@
<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>
<block>
<button wx:if="{{marketing.is_transpond=='1'}}" class="book-item-font flex-cc font30r shareItem" open-type="share">转发给客人
</button>
</block>
<button wx:if="{{marketing.is_transpond=='1'}}" class="book-item-font flex-cc font30r shareItem" open-type="share">转发给客人
</button>
</view>
\ No newline at end of file
... ...
/* pages/customer/detail_owner_invitation4.wxss */
@import "../tpl/tpls.wxss";
.titleImg {
.reservationInfo {
top: 0;
left: 0;
width: 750rpx;
height: 716rpx;
height: 850rpx;
position: relative;
}
.line {
width: 2rpx;
height: 338rpx;
background: #CFB53B;
margin: 0 30rpx 0 60rpx;
height: 364rpx;
background: #FFD200;
margin: 0 20rpx 0 20rpx;
}
.titleIcon {
width: 250rpx;
height: 132rpx;
width: 312rpx;
height: 166rpx;
position: relative;
left: -10rpx;
}
.bjIcon {
... ... @@ -26,12 +28,12 @@
height: 166rpx;
position: absolute !important;
right: 0;
bottom: 1rpx;
bottom: 12%;
}
.title {
text-align: center;
font-size: 40rpx;
font-size: 48rpx;
font-family: PingFang SC;
color: #FFD200;
font-weight: 500;
... ... @@ -45,19 +47,19 @@
}
.leftLine {
width: 432rpx;
width: 95%;
height: 2rpx;
background: #CFB53B;
background: #FFD200;
margin: 20rpx 0;
}
.leftInfo {
color: #CFB53B;
color: #fff;
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
word-break: break-all;
line-height: 50rpx;
line-height: 60rpx;
}
.tables {
... ... @@ -68,16 +70,18 @@
.infoBox {
display: flex;
position: relative;
top: -6%;
}
.infoBox .right {
color: #cfb53b;
color: #FFD200;
font-family: PingFang SC;
font-weight: 500;
font-size: 80rpx;
width: 92rpx;
height: 372rpx;
margin-right: 86rpx;
margin: 20rpx 86rpx 0 0;
}
... ... @@ -88,13 +92,13 @@
align-items: center;
}
.botomBor {
margin: 0 40rpx 20rpx 40rpx;
.chefText {
margin: 58rpx 40rpx 40rpx 40rpx;
text-align: right;
padding: 20rpx 0;
color: #515151;
font-weight: 500;
padding-bottom: 24rpx;
border-bottom: 2rpx solid #DBDBDB;
font-family: PingFang SC;
}
.headerimg {
... ... @@ -120,7 +124,7 @@
}
.brownFont {
padding: 10rpx 16rpx;
padding: 8rpx 16rpx;
color: #0143A3;
border: 2rpx solid #0143A3;
border-radius: 22rpx;
... ... @@ -128,7 +132,7 @@
}
.brownFont:nth-of-type(1) {
margin-bottom: 22rpx;
margin-bottom: 10rpx;
}
... ... @@ -153,22 +157,24 @@
.imgMask {
position: relative;
margin: 0 40rpx 0 40rpx;
margin: 0 40rpx 20rpx 40rpx;
border-bottom: 2rpx solid #DBDBDB;
padding-bottom: 18rpx;
}
.imgMask .text {
color: #515151;
margin-bottom: 20rpx;
.imgMask .IntroduceColor {
border-bottom: 2rpx solid #DBDBDB;
}
.IntroduceColor {
border-bottom: 2rpx solid #DBDBDB;
margin-bottom: 20rpx;
}
.noneBor {
.imgMask .text {
margin-bottom: 20rpx;
}
.imgMask .noneBor {
border: none;
margin-top: 20rpx;
}
... ... @@ -177,6 +183,8 @@
display: block !important;
margin-bottom: 4rpx;
width: 100%;
display: block;
vertical-align: top;
}
.shopName {
... ... @@ -200,7 +208,6 @@
}
.rubric {
color: #515151;
font-family: PingFang SC;
font-weight: 500;
font-size: 36rpx;
... ... @@ -219,7 +226,7 @@
.endStyle {
display: flex;
justify-content: flex-end;
height: 60rpx;
height: 54rpx;
margin: 20rpx 0;
padding: 16rpx 0;
}
... ... @@ -353,6 +360,7 @@
border-radius: 22rpx;
text-align: center;
padding: 10rpx;
margin: 20rpx 0 44rpx 0;
}
.all-button {
... ... @@ -445,8 +453,8 @@
.imageStyle {
display: inline-block;
width: 330rpx;
height: 158rpx;
margin-right: 40rpx;
height: 196rpx;
margin-right: 20rpx;
border-radius: 16rpx;
}
... ... @@ -465,7 +473,7 @@
display: flex;
white-space: nowrap;
width: 282rpx;
height: 158rpx;
height: 196rpx;
}
.imgs text {
... ... @@ -475,7 +483,8 @@
left: 0;
bottom: 0;
height: 38rpx;
width: 242rpx;
line-height: 38rpx;
width: 262rpx;
text-align: center;
border-bottom-left-radius: 16rpx;
border-bottom-right-radius: 16rpx;
... ... @@ -492,8 +501,8 @@
.more {
height: 80rpx;
width: 100%;
position: absolute;
top: 20.2%;
position: fixed;
bottom: 160rpx;
display: flex;
align-items: center;
justify-content: center;
... ... @@ -508,4 +517,154 @@
.more image {
width: 30rpx;
height: 30rpx;
}
/* 黑蓝过渡 */
.blackBlueGradient .reservationInfo {
background: linear-gradient(104.24deg, #42a5ff -57.47%, #000000 55.72%, #42a5ff 182.69%);
}
.blackBlueGradient .chefText,
.blackBlueGradient .rubric {
color: #000000;
}
/* 石绿过渡 */
.stoneGreenGradient .reservationInfo {
background: linear-gradient(121.52deg, #438e93 1.76%, #206864 42.99%, #206864 75.66%, #42a5ff 120.1%);
}
.stoneGreenGradient .chefText,
.stoneGreenGradient .rubric {
color: #206864;
}
/* 中国红过渡 */
.chinaRedGradient .reservationInfo {
background: linear-gradient(309.04deg, #af231c -2.27%, #86201b 44.37%, #af231c 91.74%);
}
.chinaRedGradient .chefText,
.chinaRedGradient .rubric {
color: #86201B;
}
/* 群青过渡 */
.ultramarineGradient .reservationInfo {
background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%);
}
.ultramarineGradient .chefText,
.ultramarineGradient .rubric {
color: #0143A3;
}
/* 深中国红 */
.crimson .reservationInfo {
background: #86201B;
}
.crimson .chefText,
.crimson .rubric {
color: #86201B;
}
/* 中国红 */
.chinaRed .reservationInfo {
background: #AF231C;
}
.chinaRed .chefText,
.chinaRed .rubric {
color: #AF231C;
}
/* 蓝采和 */
.lanCaiHe .reservationInfo {
background: #06436F;
}
.lanCaiHe .chefText,
.lanCaiHe .rubric {
color: #06436F;
}
/* 石绿 */
.stoneGreen .reservationInfo {
background: #206864;
}
.stoneGreen .chefText,
.stoneGreen .rubric {
color: #206864;
}
/* 姜黄 */
.turmeric .reservationInfo {
background: #B39437;
}
.turmeric .chefText,
.turmeric .rubric {
color: #B39437;
}
.turmeric .title,
.turmeric .right {
color: #fff;
}
.turmeric .line,
.turmeric .leftLine {
background: #fff;
}
/* 苍黄 */
.greenishYellow .reservationInfo {
background: #C85306;
}
.greenishYellow .chefText,
.greenishYellow .rubric {
color: #C85306;
}
/* 金黄 */
.golden .reservationInfo {
background: #C67B3A;
}
.golden .chefText,
.golden .rubric {
color: #C67B3A;
}
.golden .title,
.golden .right {
color: #fff;
}
.golden .line,
.golden .leftLine {
background: #fff;
}
/* 群青 */
.ultramarine .reservationInfo {
background: #0143A3;
}
.ultramarine .chefText,
.ultramarine .rubric {
color: #0143A3;
}
/* 摩洛哥蓝 */
.moroccanBlue .reservationInfo {
background: #19516A;
}
.moroccanBlue .chefText,
.moroccanBlue .rubric {
color: #19516A;
}
\ No newline at end of file
... ...
... ... @@ -47,6 +47,7 @@ Page({
StyleType: '',
showMoreTip: true,
},
screenHeight: '',
/**
* 生命周期函数--监听页面加载
*/
... ... @@ -68,26 +69,21 @@ Page({
"statReachBottom": true,
"lauchOpts": options, //渠道分析
});
const systemInfo = wx.getSystemInfoSync();
this.screenHeight = systemInfo.windowHeight; // 获取屏幕高度
},
// 页面滚动事件
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
});
}
}
});
const scrollTop = event.scrollTop * 1 + this.screenHeight - 80; // 获取滚动的距离
if (scrollTop < this.screenHeight) {
this.setData({
showMoreTip: true
});
} else {
this.setData({
showMoreTip: false
});
}
},
// 点击了解更多会员优惠政策
gotoFavourableList() {
... ... @@ -329,8 +325,8 @@ Page({
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) : '';
console.log('cash', cash + '---' + 'price', price + '---' + 'discount', ((price / cash) * 10).toFixed(1));
coupon.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : '';
}
coupon_dataList.push(coupon);
}
... ... @@ -341,8 +337,8 @@ Page({
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) : '';
console.log('cash', cash + '---' + 'price', price + '---' + 'discount', ((price / cash) * 10).toFixed(1));
item.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : '';
}
})
}
... ...
... ... @@ -265,8 +265,6 @@
<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>
<block>
<button wx:if="{{marketing.is_transpond=='1'}}" class="book-item-font flex-cc font30r shareItem" open-type="share">转发给客人
</button>
</block>
<button wx:if="{{marketing.is_transpond=='1'}}" class="book-item-font flex-cc font30r shareItem" open-type="share">转发给客人
</button>
</view>
\ No newline at end of file
... ...
... ... @@ -174,7 +174,7 @@
}
.brownFont {
padding: 10rpx 16rpx;
padding: 8rpx 16rpx;
color: #0143A3;
border: 2rpx solid #0143A3;
border-radius: 22rpx;
... ... @@ -691,8 +691,8 @@
.more {
height: 80rpx;
width: 100%;
position: absolute;
top: 15.5%;
position: fixed;
bottom: 160rpx;
display: flex;
align-items: center;
justify-content: center;
... ...
... ... @@ -598,6 +598,27 @@
"scene": null
},
{
"name": "邀请函-----2",
"pathName": "pages/customer/detail_owner_invitation2",
"query": "id=401339&hasInvitation=1&hasSellerShare=1&tplid=1",
"launchMode": "default",
"scene": null
},
{
"name": "邀请函-----3",
"pathName": "pages/customer/detail_owner_invitation3",
"query": "id=401339&hasInvitation=1&hasSellerShare=1&tplid=1",
"launchMode": "default",
"scene": null
},
{
"name": "邀请函-----4",
"pathName": "pages/customer/detail_owner_invitation4",
"query": "id=401339&hasInvitation=1&hasSellerShare=1&tplid=1",
"launchMode": "default",
"scene": null
},
{
"name": "邀请函-----6",
"pathName": "pages/customer/detail_owner_invitation6",
"query": "id=400725&hasInvitation=1&hasSellerShare=1&tplid=1",
... ... @@ -619,13 +640,6 @@
"scene": null
},
{
"name": "邀请函-----4",
"pathName": "pages/customer/detail_owner_invitation4",
"query": "id=400725&hasInvitation=1&hasSellerShare=1&tplid=1",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pack-activity/pack/buyCoupon",
"query": "id=394&name=14&sid=4352&oid=&types=3",
... ...