页面更改
This commit is contained in:
parent
81a9e78d6f
commit
efe13c777f
|
|
@ -2,18 +2,14 @@
|
||||||
<page-meta :page-font-size="fontValue+'px'" :root-font-size="fontValue+'px'"></page-meta>
|
<page-meta :page-font-size="fontValue+'px'" :root-font-size="fontValue+'px'"></page-meta>
|
||||||
<view>
|
<view>
|
||||||
<u-loading-page :loading="showLoading" loading-text="正在加载..."></u-loading-page>
|
<u-loading-page :loading="showLoading" loading-text="正在加载..."></u-loading-page>
|
||||||
<view class="top-wrap">
|
<scroll-view class="date-view" scroll-x="true">
|
||||||
<view class="top-cont flex justify-between align-center">
|
<view class="scroll-view-item" v-for="(item,index) in daysList" :key="index" :class="hIndex == index ? 'active' : ''" @click="changeDay(index)">
|
||||||
<view class="flex align-center">
|
<view class="flex align-center">
|
||||||
<u-icon name="../../static/images/time.png" size="16"></u-icon>
|
<u-icon name="../../static/images/time.png" size="16"></u-icon>
|
||||||
<span style="margin-left: 5px">{{ newDate }}</span>
|
<span style="margin-left: 5px">{{ item.showDate }}</span>
|
||||||
</view>
|
|
||||||
<!-- <view class="top-right-cont">
|
|
||||||
<span class="right-item" :class="{ active: active == 1 }" @click="active = 1">自取</span>
|
|
||||||
<span class="right-item" :class="{ active: active == 2 }" @click="active = 2">外卖</span>
|
|
||||||
</view> -->
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</scroll-view>
|
||||||
<view class="tab-navigation">
|
<view class="tab-navigation">
|
||||||
<Tabs :tabList="tabList" @changeTab="changeTab" />
|
<Tabs :tabList="tabList" @changeTab="changeTab" />
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -187,6 +183,8 @@ export default {
|
||||||
components: { Tabs },
|
components: { Tabs },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
daysList:[],//日期列表
|
||||||
|
hIndex:0,//日期选中index
|
||||||
fontValue:uni.getStorageSync('fontSize') || 8,
|
fontValue:uni.getStorageSync('fontSize') || 8,
|
||||||
showLoading:true,
|
showLoading:true,
|
||||||
newDate: '',
|
newDate: '',
|
||||||
|
|
@ -245,11 +243,25 @@ export default {
|
||||||
"stallId":this.stallId
|
"stallId":this.stallId
|
||||||
}
|
}
|
||||||
const res = await getlistReserveDateAPI(param)
|
const res = await getlistReserveDateAPI(param)
|
||||||
this.getNowFormatDate(res.data[0])
|
res.data.forEach(item=>{
|
||||||
this.getNowFormatDate2(res.data[0])
|
let obj = {
|
||||||
|
showDate:this.getNowFormatDate(item),
|
||||||
|
paramDate:this.getNowFormatDate2(item)
|
||||||
|
}
|
||||||
|
this.daysList.push(obj)
|
||||||
|
})
|
||||||
|
this.newDate = this.daysList[0].showDate
|
||||||
|
this.newDate2 = this.daysList[0].paramDate
|
||||||
//获取预定餐菜谱
|
//获取预定餐菜谱
|
||||||
this.getMenuListData()
|
this.getMenuListData()
|
||||||
},
|
},
|
||||||
|
//改变时间
|
||||||
|
changeDay(index){
|
||||||
|
this.hIndex=index;
|
||||||
|
this.newDate = this.daysList[index].showDate
|
||||||
|
this.newDate2 = this.daysList[index].paramDate
|
||||||
|
this.getMenuListData()
|
||||||
|
},
|
||||||
// 获取当前时间
|
// 获取当前时间
|
||||||
getNowFormatDate(data) {
|
getNowFormatDate(data) {
|
||||||
let date = new Date(data)
|
let date = new Date(data)
|
||||||
|
|
@ -258,7 +270,8 @@ export default {
|
||||||
let day = date.getDate().toString().padStart(2, '0')
|
let day = date.getDate().toString().padStart(2, '0')
|
||||||
let week = date.getDay()
|
let week = date.getDay()
|
||||||
let weeks = ['日', '一', '二', '三', '四', '五', '六']
|
let weeks = ['日', '一', '二', '三', '四', '五', '六']
|
||||||
this.newDate = `${month}-${day} 星期${weeks[week]}`
|
return `${month}-${day} 星期${weeks[week]}`
|
||||||
|
// this.newDate = `${month}-${day} 星期${weeks[week]}`
|
||||||
},
|
},
|
||||||
// 当前时间 2025-01-03
|
// 当前时间 2025-01-03
|
||||||
getNowFormatDate2(data) {
|
getNowFormatDate2(data) {
|
||||||
|
|
@ -266,7 +279,8 @@ export default {
|
||||||
let year = date.getFullYear()
|
let year = date.getFullYear()
|
||||||
let month = (date.getMonth() + 1).toString().padStart(2, '0')
|
let month = (date.getMonth() + 1).toString().padStart(2, '0')
|
||||||
let day = date.getDate().toString().padStart(2, '0')
|
let day = date.getDate().toString().padStart(2, '0')
|
||||||
this.newDate2 = `${year}-${month}-${day}`
|
return `${year}-${month}-${day}`
|
||||||
|
// this.newDate2 = `${year}-${month}-${day}`
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取菜谱
|
// 获取菜谱
|
||||||
|
|
@ -653,6 +667,21 @@ page {
|
||||||
background: #f9fbff;
|
background: #f9fbff;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
.date-view {
|
||||||
|
white-space: nowrap;
|
||||||
|
background-color: #FFF;
|
||||||
|
width: 100%;
|
||||||
|
.scroll-view-item {
|
||||||
|
display: inline-block;
|
||||||
|
width: 200rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin-left: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.scroll-view {
|
.scroll-view {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
||||||
|
|
@ -229,7 +229,6 @@ page {
|
||||||
.date-view {
|
.date-view {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
}
|
}
|
||||||
.scroll-view-item {
|
.scroll-view-item {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<view class="appraise">
|
<view class="appraise">
|
||||||
<view>您对本单满意吗?</view>
|
<view>您对本单满意吗?</view>
|
||||||
<view class="refund-btn" @click="refundOrder" v-if="detailData.orderState==1&&(detailData.canteenId=='378928463446282240'||detailData.canteenId=='378928314946949120')">
|
<view class="refund-btn" @click="refundOrder" v-if="detailData.orderState==1&&(detailData.canteenId=='378928463446282240')">
|
||||||
退单
|
退单
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="refund-btn" @click="refundOrder" v-if="detailData.payState==4&&detailData.orderState==4">
|
<!-- <view class="refund-btn" @click="refundOrder" v-if="detailData.payState==4&&detailData.orderState==4">
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
const mobile = uni.getStorageSync('mobile');
|
const mobile = uni.getStorageSync('mobile');
|
||||||
const origin = location.origin;
|
const origin = location.origin;
|
||||||
console.log(origin)
|
console.log(origin)
|
||||||
return `${origin}/SDT_ZHST_APP/index.html?token=${token}&mobile=${mobile}`;
|
return `${origin}/SDT_ZHST_APP/index.html?token=${token}`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
|
|
@ -83,27 +83,29 @@
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/pages/index'
|
path: '/pages/index'
|
||||||
})
|
})
|
||||||
} else if (event.data.data.arg.action == 'keyboard-blur') { // 跳转到sbd食堂
|
}
|
||||||
console.log('触发一次滚动,让页面回弹')
|
// else if (event.data.data.arg.action == 'keyboard-blur') { // 跳转到sbd食堂
|
||||||
|
// console.log('触发一次滚动,让页面回弹')
|
||||||
// 等键盘真正收起后,再触发回滚
|
// 等键盘真正收起后,再触发回滚
|
||||||
setTimeout(() => {
|
|
||||||
if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
|
|
||||||
// 触发一次滚动,让页面回弹
|
|
||||||
// window.scrollTo(0, 0);
|
|
||||||
console.log('触发一次滚动,让页面回弹2')
|
|
||||||
uni.pageScrollTo({
|
|
||||||
scrollTop: 0,
|
|
||||||
duration: 100
|
|
||||||
});
|
|
||||||
// 强制刷新 DOM
|
|
||||||
//document.body.style.display = 'none';
|
|
||||||
// setTimeout(() => {
|
// setTimeout(() => {
|
||||||
// console.log('强制刷新 DOM')
|
// if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
|
||||||
// document.body.style.display = '';
|
// // 触发一次滚动,让页面回弹
|
||||||
//}, 50);
|
// // window.scrollTo(0, 0);
|
||||||
}
|
// console.log('触发一次滚动,让页面回弹2')
|
||||||
}, 100);
|
// uni.pageScrollTo({
|
||||||
}
|
// scrollTop: 0,
|
||||||
|
// duration: 100
|
||||||
|
// });
|
||||||
|
//
|
||||||
|
// // 强制刷新 DOM
|
||||||
|
// //document.body.style.display = 'none';
|
||||||
|
// //setTimeout(() => {
|
||||||
|
// // console.log('强制刷新 DOM')
|
||||||
|
// // document.body.style.display = '';
|
||||||
|
// //}, 50);
|
||||||
|
// }
|
||||||
|
// }, 100);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
|
||||||
|
|
@ -46,9 +46,6 @@ export default {
|
||||||
if(word==null){
|
if(word==null){
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
// console.log(word)
|
|
||||||
// console.log(base64.decode(word))
|
|
||||||
|
|
||||||
var bytes = CryptoJS.AES.decrypt(word, getKey(), {
|
var bytes = CryptoJS.AES.decrypt(word, getKey(), {
|
||||||
iv: getIv(),
|
iv: getIv(),
|
||||||
mode: CryptoJS.mode.CBC,
|
mode: CryptoJS.mode.CBC,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue