|
...
|
...
|
@@ -5,6 +5,7 @@ import App from '../../utils/api'; |
|
|
|
import TP from '../../utils/tpls';
|
|
|
|
import RS from '../../utils/reserveStatus'
|
|
|
|
var plugin = requirePlugin("WechatSI");
|
|
|
|
import canvas from "./canvas"
|
|
|
|
Page({
|
|
|
|
/**
|
|
|
|
* 页面的初始数据
|
|
...
|
...
|
@@ -56,6 +57,8 @@ Page({ |
|
|
|
toastBool: false, //支付定金提示框
|
|
|
|
toastText: '', //支付定金提示文字
|
|
|
|
paymentId: '', //定金id
|
|
|
|
wxml: null,
|
|
|
|
imgSrc:'',//canvas图片地址
|
|
|
|
},
|
|
|
|
screenHeight: '',
|
|
|
|
attentionAnim: {},
|
|
...
|
...
|
@@ -234,6 +237,7 @@ Page({ |
|
|
|
setTimeout(() => {
|
|
|
|
this.getstaffinfo(res.data.uid, reserev.sid);
|
|
|
|
this.getSellerVersionFun(reserev.sid);
|
|
|
|
this.painterBtn(reserev.seller.seller_image,reserev.seller.sellername,util.unixtoTime(reserev.ddate, 'MM月DD日'),util.unixtoTime(reserev.ddate, '周WW HH:II'));
|
|
|
|
}, 0);
|
|
|
|
}).catch(res => {
|
|
|
|
console.log(res, '详情请求失败');
|
|
...
|
...
|
@@ -407,6 +411,24 @@ Page({ |
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
// 生成海报
|
|
|
|
painterBtn(img,sellerName,date,time) {
|
|
|
|
img = img.replace(/^http:/, "https:");
|
|
|
|
this.setData({
|
|
|
|
wxml: canvas({
|
|
|
|
imgUrl: img || 'https://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png',
|
|
|
|
sellerName,
|
|
|
|
date,
|
|
|
|
time,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
onImgOK(e) {
|
|
|
|
this.setData({
|
|
|
|
imgSrc: e.detail.path
|
|
|
|
})
|
|
|
|
console.log('海报生成成功',this.data.imgSrc);
|
|
|
|
},
|
|
|
|
sharesetting() {
|
|
|
|
wx.reportMonitor('1017', 1)
|
|
|
|
let parmdata = {
|
|
...
|
...
|
@@ -418,11 +440,10 @@ Page({ |
|
|
|
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.name + ',点击可查看详情并导航到店',
|
|
|
|
path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'),
|
|
|
|
imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png',
|
|
|
|
imageUrl: this.data.imgSrc || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png',
|
|
|
|
}
|
|
|
|
},
|
|
|
|
formatDatail(detail, dateSmart) {
|
...
|
...
|
|