|
@@ -11,6 +11,7 @@ Page({ |
|
@@ -11,6 +11,7 @@ Page({ |
|
11
|
* 页面的初始数据
|
11
|
* 页面的初始数据
|
|
12
|
*/
|
12
|
*/
|
|
13
|
data: {
|
13
|
data: {
|
|
|
|
14
|
+ show_white:false,
|
|
14
|
options: {
|
15
|
options: {
|
|
15
|
tplid: ''
|
16
|
tplid: ''
|
|
16
|
},
|
17
|
},
|
|
@@ -65,6 +66,7 @@ Page({ |
|
@@ -65,6 +66,7 @@ Page({ |
|
65
|
paymentId: '', //定金id
|
66
|
paymentId: '', //定金id
|
|
66
|
wxml: null,
|
67
|
wxml: null,
|
|
67
|
imgSrc: '', //canvas图片地址
|
68
|
imgSrc: '', //canvas图片地址
|
|
|
|
69
|
+ colors:'',//导航栏颜色
|
|
68
|
},
|
70
|
},
|
|
69
|
tablestr: '',
|
71
|
tablestr: '',
|
|
70
|
urlsValue: [],
|
72
|
urlsValue: [],
|
|
@@ -99,6 +101,15 @@ Page({ |
|
@@ -99,6 +101,15 @@ Page({ |
|
99
|
},
|
101
|
},
|
|
100
|
// 页面滚动事件
|
102
|
// 页面滚动事件
|
|
101
|
onPageScroll: function (event) {
|
103
|
onPageScroll: function (event) {
|
|
|
|
104
|
+ if(event.scrollTop>150){ //当页面滚动到某个位置时(这里设置为50),将导航栏背景颜色设置为白色
|
|
|
|
105
|
+ this.setData({
|
|
|
|
106
|
+ show_white:true
|
|
|
|
107
|
+ })
|
|
|
|
108
|
+ }else{
|
|
|
|
109
|
+ this.setData({
|
|
|
|
110
|
+ show_white:false
|
|
|
|
111
|
+ })
|
|
|
|
112
|
+ }
|
|
102
|
const scrollTop = event.scrollTop * 1 + this.screenHeight - 80; // 获取滚动的距离
|
113
|
const scrollTop = event.scrollTop * 1 + this.screenHeight - 80; // 获取滚动的距离
|
|
103
|
if (scrollTop < this.screenHeight) {
|
114
|
if (scrollTop < this.screenHeight) {
|
|
104
|
this.setData({
|
115
|
this.setData({
|
|
@@ -536,7 +547,7 @@ Page({ |
|
@@ -536,7 +547,7 @@ Page({ |
|
536
|
let data = res.data
|
547
|
let data = res.data
|
|
537
|
console.log('data', data);
|
548
|
console.log('data', data);
|
|
538
|
let couponList = []
|
549
|
let couponList = []
|
|
539
|
- let settingUrl, inviteImgUrl, themeColor, StyleType, titleType, home, chef, marketing, coupon, reserve, swich_phone, is_comments, signboard, store;
|
550
|
+ let colors, settingUrl, inviteImgUrl, themeColor, StyleType, titleType, home, chef, marketing, coupon, reserve, swich_phone, is_comments, signboard, store;
|
|
540
|
chef = util.determine(data.chef);
|
551
|
chef = util.determine(data.chef);
|
|
541
|
reserve = util.determine(data.reserve);
|
552
|
reserve = util.determine(data.reserve);
|
|
542
|
marketing = util.determine(data.marketing);
|
553
|
marketing = util.determine(data.marketing);
|
|
@@ -551,6 +562,11 @@ Page({ |
|
@@ -551,6 +562,11 @@ Page({ |
|
551
|
inviteImgUrl = 'https://nosqn.colorcun.com/inviteText1.png';
|
562
|
inviteImgUrl = 'https://nosqn.colorcun.com/inviteText1.png';
|
|
552
|
}
|
563
|
}
|
|
553
|
settingUrl = StyleType == '12' ? 'https://nosqn.colorcun.com/template12.jpg' : 'https://nosqn.colorcun.com/template' + StyleType + '.png';
|
564
|
settingUrl = StyleType == '12' ? 'https://nosqn.colorcun.com/template12.jpg' : 'https://nosqn.colorcun.com/template' + StyleType + '.png';
|
|
|
|
565
|
+ if (StyleType == '9') colors = "#0B0805";
|
|
|
|
566
|
+ if (StyleType == '10' || StyleType == '17') colors = "#750100";
|
|
|
|
567
|
+ if (StyleType == '11' || StyleType == '12') colors = "#0B1A67";
|
|
|
|
568
|
+ if (StyleType == '13' || StyleType == '15') colors = "#0B3133";
|
|
|
|
569
|
+ if (StyleType == '14' || StyleType == '16') colors = "#1B1A23";
|
|
554
|
titleType = data.title_class;
|
570
|
titleType = data.title_class;
|
|
555
|
swich_phone = reserve && reserve.swich_phone ? reserve.swich_phone : '';
|
571
|
swich_phone = reserve && reserve.swich_phone ? reserve.swich_phone : '';
|
|
556
|
if (marketing) {
|
572
|
if (marketing) {
|
|
@@ -588,6 +604,7 @@ Page({ |
|
@@ -588,6 +604,7 @@ Page({ |
|
588
|
themeColor,
|
604
|
themeColor,
|
|
589
|
settingUrl,
|
605
|
settingUrl,
|
|
590
|
inviteImgUrl,
|
606
|
inviteImgUrl,
|
|
|
|
607
|
+ colors,
|
|
591
|
}
|
608
|
}
|
|
592
|
console.log('获取数据', {
|
609
|
console.log('获取数据', {
|
|
593
|
...obj
|
610
|
...obj
|
|
@@ -615,6 +632,7 @@ Page({ |
|
@@ -615,6 +632,7 @@ Page({ |
|
615
|
themeColor,
|
632
|
themeColor,
|
|
616
|
settingUrl,
|
633
|
settingUrl,
|
|
617
|
inviteImgUrl,
|
634
|
inviteImgUrl,
|
|
|
|
635
|
+ colors,
|
|
618
|
})
|
636
|
})
|
|
619
|
// 开启语音播报
|
637
|
// 开启语音播报
|
|
620
|
if (reserve && reserve.swich_voice == '1') {
|
638
|
if (reserve && reserve.swich_voice == '1') {
|