Browse Source

审核flag

master
jiazhipeng 5 months ago
parent
commit
fc4e750fcd
  1. 8
      App.vue
  2. 25
      pages/index/index.vue
  3. 4
      subPackages/order/orderCoupon.vue
  4. 4
      subPackages/user/coupon.vue

8
App.vue

@ -2,6 +2,14 @@
export default { export default {
onLaunch: function() { onLaunch: function() {
console.log('App Launch') console.log('App Launch')
this.Post({type: "SHFlag"},'/api/public_service/getKumgangHeadImgList').then(res => {
// let SHFlag = res.data[0].image === "1" ? true : false
try {
let SHFlag = res.data[0].title == 1 ? true : false
uni.setStorageSync('SHFlag', SHFlag)
} catch(e) {}
});
}, },
onShow: function() { onShow: function() {
console.log('App Show') console.log('App Show')

25
pages/index/index.vue

@ -32,12 +32,19 @@
</view> </view>
</view> </view>
<view style="position: relative;z-index: 2;"> <view style="position: relative;z-index: 2;" v-if="SHFlag">
<view class="nav-item" v-for="(item,index) in navList" :key="index" @click="gotoPath(item.path)"> <view class="nav-item" v-for="(item,index) in navList" :key="index" @click="gotoPath(item.path)">
<image :src="item.img" mode="" class="nav-img"></image> <image :src="item.img" mode="" class="nav-img"></image>
<view>{{item.text}}</view> <view>{{item.text}}</view>
</view> </view>
</view> </view>
<view style="position: relative;z-index: 2;" v-else>
<view class="nav-item" v-for="(item,index) in navList.filter(v=>!v.testHide)" :key="index" @click="gotoPath(item.path)">
<image :src="item.img" mode="" class="nav-img"></image>
<view>{{item.text}}</view>
</view>
</view>
</view> </view>
<!-- 背景icon --> <!-- 背景icon -->
@ -55,6 +62,7 @@
</view> </view>
</view> </view>
<template v-if="SHFlag">
<!-- 活动日历盐都美宿 --> <!-- 活动日历盐都美宿 -->
<view class="flex-between" style="padding: 0 27rpx;margin-top: 20rpx;" v-if="homeUi.hdrl && homeUi.ydms_hotel"> <view class="flex-between" style="padding: 0 27rpx;margin-top: 20rpx;" v-if="homeUi.hdrl && homeUi.ydms_hotel">
<view @click="gotoPath('/subPackages/eventCalendar/eventCalendar')" class="calendar-box" :style="{backgroundImage: 'url('+showImg(homeUi.hdrl)+')',backgroundSize: 'cover'}"> <view @click="gotoPath('/subPackages/eventCalendar/eventCalendar')" class="calendar-box" :style="{backgroundImage: 'url('+showImg(homeUi.hdrl)+')',backgroundSize: 'cover'}">
@ -71,7 +79,7 @@
<view class="calendar-subtitle">盐都美宿</view> <view class="calendar-subtitle">盐都美宿</view>
</view> </view>
</view> </view>
</template>
<!-- 线路推荐 --> <!-- 线路推荐 -->
<view v-if="lineList && lineList.length > 0"> <view v-if="lineList && lineList.length > 0">
<view class="title-box flex-between"> <view class="title-box flex-between">
@ -161,7 +169,8 @@
{ {
img: 'https://static.ticket.sz-trip.com/yandu/images/index/jdms.png', img: 'https://static.ticket.sz-trip.com/yandu/images/index/jdms.png',
text: '酒店民宿', text: '酒店民宿',
path: '/subPackages/hotelHomestay/hotelHomestay' path: '/subPackages/hotelHomestay/hotelHomestay',
testHide: true,
}, },
{ {
img: 'https://static.ticket.sz-trip.com/yandu/images/index/cyms.png', img: 'https://static.ticket.sz-trip.com/yandu/images/index/cyms.png',
@ -171,7 +180,8 @@
{ {
img: 'https://static.ticket.sz-trip.com/yandu/images/index/wctc.png', img: 'https://static.ticket.sz-trip.com/yandu/images/index/wctc.png',
text: '文创特产', text: '文创特产',
path: '/subPackages/techan/techanList' path: '/subPackages/techan/techanList',
testHide: true,
}, },
{ {
img: 'https://static.ticket.sz-trip.com/yandu/images/index/xltj.png', img: 'https://static.ticket.sz-trip.com/yandu/images/index/xltj.png',
@ -204,7 +214,9 @@
strategyList: [], strategyList: [],
showMore: true, showMore: true,
notice: '', notice: '',
eventCalendarNum: 0 eventCalendarNum: 0,
SHFlag: true, // true false
} }
}, },
onReady() { onReady() {
@ -223,6 +235,9 @@
this.getArticleByType() this.getArticleByType()
this.getLatest() this.getLatest()
this.getEventCalendarNum() this.getEventCalendarNum()
if (!uni.getStorageSync('SHFlag')) this.SHFlag = false
}, },
methods: { methods: {
// 线 // 线

4
subPackages/order/orderCoupon.vue

@ -95,9 +95,9 @@
getPecenet:function (percent) { getPecenet:function (percent) {
if(percent>=100 || percent<=0) return ""; if(percent>=100 || percent<=0) return "";
percent = 100 - percent; percent = 100 - percent;
if(percent%10==0){ // if(percent%10==0){
percent = percent/10; percent = percent/10;
} // }
return percent return percent
}, },
// //

4
subPackages/user/coupon.vue

@ -194,9 +194,9 @@
getPecenet:function (percent) { getPecenet:function (percent) {
if(percent>=100 || percent<=0) return ""; if(percent>=100 || percent<=0) return "";
percent = 100 - percent; percent = 100 - percent;
if(percent%10==0){ //if(percent%10==0){
percent = percent/10; percent = percent/10;
} //}
return percent return percent
}, },
use(item) { use(item) {

Loading…
Cancel
Save