Commit 8e41f4927136c03b8a48a5a3f67d8e42e8405d66

Authored by pengye
1 parent c142d3a1

邀请函模板9-17加导航栏

@@ -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') {
1 { 1 {
2 - "navigationBarBackgroundColor": "#ffffff", 2 + "navigationStyle": "custom",
3 "navigationBarTextStyle": "white", 3 "navigationBarTextStyle": "white",
4 - "navigationBarTitleText": "",  
5 "usingComponents": { 4 "usingComponents": {
  5 + "nav": "/components/nav/nav",
6 "painter":"/components/painter/painter", 6 "painter":"/components/painter/painter",
7 "titleStyle":"/components/titleStyle/titleStyle" 7 "titleStyle":"/components/titleStyle/titleStyle"
8 } 8 }
1 <!--pages/customer/detail_owner_invitation9.wxml--> 1 <!--pages/customer/detail_owner_invitation9.wxml-->
2 <import src="../tpl/invitation"></import> 2 <import src="../tpl/invitation"></import>
  3 +<nav hasHome id='nav' backgroundColor="{{show_white ? colors : 'transparent'}}" place="{{false}}"></nav>
3 <scroll-view scroll-y class="viewBox viewBox{{StyleType}}"> 4 <scroll-view scroll-y class="viewBox viewBox{{StyleType}}">
4 <image wx:if="{{hasValueBroadcast && reserve && reserve.swich_voice && reserve.swich_voice=='1'}}" class="musicImg" src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" bindtap="stopMusic" animation="{{attentionAnim}}" /> 5 <image wx:if="{{hasValueBroadcast && reserve && reserve.swich_voice && reserve.swich_voice=='1'}}" class="musicImg" src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" bindtap="stopMusic" animation="{{attentionAnim}}" />
5 <view class="reservationInfo" style="background: url('{{settingUrl}}') no-repeat;background-size:cover;"> 6 <view class="reservationInfo" style="background: url('{{settingUrl}}') no-repeat;background-size:cover;">