页面更改
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>
|
||||
<view>
|
||||
<u-loading-page :loading="showLoading" loading-text="正在加载..."></u-loading-page>
|
||||
<view class="top-wrap">
|
||||
<view class="top-cont flex justify-between align-center">
|
||||
<view class="flex align-center">
|
||||
<u-icon name="../../static/images/time.png" size="16"></u-icon>
|
||||
<span style="margin-left: 5px">{{ newDate }}</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>
|
||||
<scroll-view class="date-view" scroll-x="true">
|
||||
<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">
|
||||
<u-icon name="../../static/images/time.png" size="16"></u-icon>
|
||||
<span style="margin-left: 5px">{{ item.showDate }}</span>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="tab-navigation">
|
||||
<Tabs :tabList="tabList" @changeTab="changeTab" />
|
||||
</view>
|
||||
|
|
@ -187,6 +183,8 @@ export default {
|
|||
components: { Tabs },
|
||||
data() {
|
||||
return {
|
||||
daysList:[],//日期列表
|
||||
hIndex:0,//日期选中index
|
||||
fontValue:uni.getStorageSync('fontSize') || 8,
|
||||
showLoading:true,
|
||||
newDate: '',
|
||||
|
|
@ -238,18 +236,32 @@ export default {
|
|||
},200)
|
||||
},
|
||||
methods: {
|
||||
//获取预定日期
|
||||
//获取预定日期
|
||||
async getReserveDate(){
|
||||
let param = {
|
||||
"canteenId":this.canteenId,
|
||||
"stallId":this.stallId
|
||||
}
|
||||
const res = await getlistReserveDateAPI(param)
|
||||
this.getNowFormatDate(res.data[0])
|
||||
this.getNowFormatDate2(res.data[0])
|
||||
const res = await getlistReserveDateAPI(param)
|
||||
res.data.forEach(item=>{
|
||||
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()
|
||||
},
|
||||
//改变时间
|
||||
changeDay(index){
|
||||
this.hIndex=index;
|
||||
this.newDate = this.daysList[index].showDate
|
||||
this.newDate2 = this.daysList[index].paramDate
|
||||
this.getMenuListData()
|
||||
},
|
||||
// 获取当前时间
|
||||
getNowFormatDate(data) {
|
||||
let date = new Date(data)
|
||||
|
|
@ -258,7 +270,8 @@ export default {
|
|||
let day = date.getDate().toString().padStart(2, '0')
|
||||
let week = date.getDay()
|
||||
let weeks = ['日', '一', '二', '三', '四', '五', '六']
|
||||
this.newDate = `${month}-${day} 星期${weeks[week]}`
|
||||
return `${month}-${day} 星期${weeks[week]}`
|
||||
// this.newDate = `${month}-${day} 星期${weeks[week]}`
|
||||
},
|
||||
// 当前时间 2025-01-03
|
||||
getNowFormatDate2(data) {
|
||||
|
|
@ -266,7 +279,8 @@ export default {
|
|||
let year = date.getFullYear()
|
||||
let month = (date.getMonth() + 1).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;
|
||||
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 {
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
|
|
|
|||
|
|
@ -228,8 +228,7 @@ page {
|
|||
}
|
||||
.date-view {
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
|
||||
width: 100%;
|
||||
}
|
||||
.scroll-view-item {
|
||||
display: inline-block;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<view class="appraise">
|
||||
<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 class="refund-btn" @click="refundOrder" v-if="detailData.payState==4&&detailData.orderState==4">
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
const mobile = uni.getStorageSync('mobile');
|
||||
const origin = location.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() {
|
||||
|
|
@ -83,27 +83,29 @@
|
|||
this.$router.push({
|
||||
path: '/pages/index'
|
||||
})
|
||||
} 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(() => {
|
||||
// console.log('强制刷新 DOM')
|
||||
// document.body.style.display = '';
|
||||
//}, 50);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
// 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(() => {
|
||||
// // console.log('强制刷新 DOM')
|
||||
// // document.body.style.display = '';
|
||||
// //}, 50);
|
||||
// }
|
||||
// }, 100);
|
||||
// }
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
|
|||
|
|
@ -45,10 +45,7 @@ export default {
|
|||
}
|
||||
if(word==null){
|
||||
return "";
|
||||
}
|
||||
// console.log(word)
|
||||
// console.log(base64.decode(word))
|
||||
|
||||
}
|
||||
var bytes = CryptoJS.AES.decrypt(word, getKey(), {
|
||||
iv: getIv(),
|
||||
mode: CryptoJS.mode.CBC,
|
||||
|
|
|
|||
Loading…
Reference in New Issue