|
...
|
...
|
@@ -5,14 +5,15 @@ import bcm from '../../utils/bookCommon'; |
|
|
|
const {regeneratorRuntime} = global
|
|
|
|
const tpls = {
|
|
|
|
SMS_154587043: '${guest},您好!${seller_name}已为您预订${date}的桌位:${region_room_name};地址:${seller_addr},电话:${seller_phone}\n客户经理${cusman},期待您的光临!',
|
|
|
|
SMS_162733710: '尊敬的贵宾,您好!${reserve_date}的用餐,为您安排在${seller_name_addr_room}房间,${cusman}期待您的光临,预祝就餐愉快!'
|
|
|
|
SMS_162733710: '尊敬的贵宾,您好!${reserve_date}的用餐,为您安排在${seller_name_addr_room}房间,${cusman}期待您的光临,预祝就餐愉快!',
|
|
|
|
SMS_163050401: '尊敬的贵宾,您好!\n ${seller_name}已为您安排${date}的用餐,房间:${region_room_name}; \n地址:${seller_addr}; \n电话:${seller_phone} \n预祝用餐愉快,${cusman}期待您的光临!',
|
|
|
|
};
|
|
|
|
Page({
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 页面的初始数据
|
|
|
|
*/
|
|
|
|
tplsIndex: 'SMS_154587043',
|
|
|
|
tplsIndex: 'SMS_163050401',
|
|
|
|
data: {
|
|
|
|
bookInfo: {},
|
|
|
|
tplMsg: ''
|
|
...
|
...
|
@@ -92,6 +93,13 @@ Page({ |
|
|
|
}
|
|
|
|
return str;
|
|
|
|
},
|
|
|
|
getTableNameOne(tables){
|
|
|
|
let bao = [];
|
|
|
|
tables.forEach(t => {
|
|
|
|
bao.push(t.name);
|
|
|
|
})
|
|
|
|
return bao.join('、');
|
|
|
|
},
|
|
|
|
getTableNameShort(tables){//短桌位
|
|
|
|
let str=tables[0].name;
|
|
|
|
if(tables.length>1){
|
|
...
|
...
|
@@ -102,12 +110,11 @@ Page({ |
|
|
|
smsData: {},
|
|
|
|
async getTplMsg(){
|
|
|
|
let smsData = {}
|
|
|
|
let txa=['早上','中午','晚上']
|
|
|
|
let tx=await bcm.getTimeSpaceIndexData(this.bookInfo.rdate);
|
|
|
|
switch (this.tplsIndex) {
|
|
|
|
//尊敬的贵宾,您好!(4月6日)(中午)的用餐,为您安排在(好又多复兴路店)(202)房间,(王丽娜)期待您的光临,预祝就餐愉快!
|
|
|
|
case 'SMS_162733710':
|
|
|
|
let txa=['早上','中午','晚上']
|
|
|
|
let tx=await bcm.getTimeSpaceIndexData(this.bookInfo.rdate);
|
|
|
|
console.log(tx);
|
|
|
|
smsData = {
|
|
|
|
reserve_date: util.unixtoTime(this.bookInfo.rdate,'MM月DD日')
|
|
|
|
.replace(/0(\d)/g,function($0,$1){
|
|
...
|
...
|
@@ -117,6 +124,16 @@ Page({ |
|
|
|
cusman: (this.bookInfo.cusman || this.bookInfo.seller.sellername).substr(0, 20),
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 'SMS_163050401':
|
|
|
|
smsData = {
|
|
|
|
seller_name: this.bookInfo.seller.sellername.substr(0, 20),
|
|
|
|
date: this.bookInfo.rdateStr.replace('日','日'+txa[tx.timeIndex]),
|
|
|
|
region_room_name: this.getTableNameOne(this.bookInfo.tables).substr(0, 20),
|
|
|
|
seller_addr: (this.bookInfo.seller.real_address || this.bookInfo.seller.map_address).substr(0, 20),
|
|
|
|
seller_phone: this.bookInfo.seller.phone.substr(0, 20),
|
|
|
|
cusman: (this.bookInfo.cusman||'').substr(0, 20),
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
let guest = '';
|
|
|
|
if (this.bookInfo.sex == 3) {
|
...
|
...
|
|