This commit is contained in:
Mr.jiang 2024-08-05 10:51:40 +08:00
parent 7b081d4475
commit 4aa84b7a66
4 changed files with 41 additions and 16 deletions

View File

@ -9,10 +9,10 @@
</view>
</view>
<view scroll-y class="calendar_time">
<view class="time_x" :class="host_index == item.timeStamp ? 'time_x_sty' : '' "
<view class="time_x" :class="{ time_x_sty: host_index.includes(item.timeStamp) }"
v-for="(item, index) in hostArr[day_index]" :key="index"
@click.stop="(nowTimes < item.timeStamp) || (msformatArr.indexOf(item.hours) == -1) ? hosts(item) : ''"
:style="[{'color':((nowTimes > item.timeStamp) || (msformatArr.indexOf(item.hours) !== -1 ) ? '#999999' : '')},{'fontSize':((nowTimes < item.timeStamp) && (msformatArr.indexOf(item.hours) !== -1 )) || (msformatArr.indexOf(item.hours) !== -1 ) ? '32rpx' : '30rpx'},
:style="[{'color':((nowTimes > item.timeStamp) || (msformatArr.indexOf(item.hours) !== -1 ) ? '#999999' : '')},{'background':((nowTimes > item.timeStamp) || (msformatArr.indexOf(item.hours) !== -1 ) ? '#fff' : '')},{'fontSize':((nowTimes < item.timeStamp) && (msformatArr.indexOf(item.hours) !== -1 )) || (msformatArr.indexOf(item.hours) !== -1 ) ? '32rpx' : '30rpx'},
{'letter-spacing':((nowTimes < item.timeStamp) && (msformatArr.indexOf(item.hours) !== -1 )) || (msformatArr.indexOf(item.hours) !== -1 ) ? '4rpx' : '0rpx'}]">
{{ ((nowTimes < item.timeStamp) && (msformatArr.indexOf(item.hours) !== -1)) || (msformatArr.indexOf(item.hours) !== -1) ? '约满' : item.hours }}
</view>
@ -46,7 +46,7 @@
dayArr: [],
hostArr: [],
day_index: 0,
host_index: '',
host_index: [],
host_All: [],
nowTimes: '',
isShow: true,
@ -161,21 +161,28 @@
},
//
hosts(e) {
if ( (this.nowTimes < e.timeStamp) && (this.msformatArr.indexOf(e.hours) == -1)) {
this.host_All = e
this.host_index = e.timeStamp
var aa=[];
if ( (this.nowTimes < e.timeStamp) && ( this.msformatArr.indexOf(e.hours)=== -1)) {
// this.host_All.push(e);
// this.host_index.push(e.timeStamp);
var index=this.host_index.indexOf(e.timeStamp)
if (index === -1) {
this.host_All.push(e);
this.host_index.push(e.timeStamp);
} else {
this.host_All.splice(index, 1);
this.host_index.splice(index, 1);
}
}
},
//
sub() {
console.log(this.host_All);
delete this.host_All.timeStamp;
if (this.host_index == '') {
if (this.host_index == []) {
this.$queue.showToast('请选择时间')
} else {
let day = this.dayArr[this.day_index]
@ -183,10 +190,11 @@
let comTime = {
days: day.days,
weeks: day.weeks,
hours: this.host_All.hours,
timeStamp: this.host_All.timeStamp,
hours: this.host_All,
timeStamp: this.host_All,
time: time
}
console.log("点击立即预约",comTime);
this.$emit('getTime', comTime);
}
},
@ -281,11 +289,12 @@
margin: 10rpx 0;
font-size: 30rpx;
color: #333333;
// background-color: #E8FAE1;
}
.time_x_sty {
background-color: #E8FAE1;
color: #096f4b !important;
color: #096f4b;
}
}

View File

@ -140,6 +140,7 @@
],
//
onlineEmoji:{"100.gif":"AbNQgA.gif","101.gif":"AbN3ut.gif","102.gif":"AbNM3d.gif","103.gif":"AbN8DP.gif","104.gif":"AbNljI.gif","105.gif":"AbNtUS.gif","106.gif":"AbNGHf.gif","107.gif":"AbNYE8.gif","108.gif":"AbNaCQ.gif","109.gif":"AbNN4g.gif","110.gif":"AbN0vn.gif","111.gif":"AbNd3j.gif","112.gif":"AbNsbV.gif","113.gif":"AbNwgs.gif","114.gif":"AbNrD0.gif","115.gif":"AbNDuq.gif","116.gif":"AbNg5F.gif","117.gif":"AbN6ET.gif","118.gif":"AbNcUU.gif","119.gif":"AbNRC4.gif","120.gif":"AbNhvR.gif","121.gif":"AbNf29.gif","122.gif":"AbNW8J.gif","123.gif":"AbNob6.gif","124.gif":"AbN5K1.gif","125.gif":"AbNHUO.gif","126.gif":"AbNIDx.gif","127.gif":"AbN7VK.gif","128.gif":"AbNb5D.gif","129.gif":"AbNX2d.gif","130.gif":"AbNLPe.gif","131.gif":"AbNjxA.gif","132.gif":"AbNO8H.gif","133.gif":"AbNxKI.gif","134.gif":"AbNzrt.gif","135.gif":"AbU9Vf.gif","136.gif":"AbUSqP.gif","137.gif":"AbUCa8.gif","138.gif":"AbUkGQ.gif","139.gif":"AbUFPg.gif","140.gif":"AbUPIS.gif","141.gif":"AbUZMn.gif","142.gif":"AbUExs.gif","143.gif":"AbUA2j.gif","144.gif":"AbUMIU.gif","145.gif":"AbUerq.gif","146.gif":"AbUKaT.gif","147.gif":"AbUmq0.gif","148.gif":"AbUuZV.gif","149.gif":"AbUliF.gif","150.gif":"AbU1G4.gif","151.gif":"AbU8z9.gif","152.gif":"AbU3RJ.gif","153.gif":"AbUYs1.gif","154.gif":"AbUJMR.gif","155.gif":"AbUadK.gif","156.gif":"AbUtqx.gif","157.gif":"AbUUZ6.gif","158.gif":"AbUBJe.gif","159.gif":"AbUdIO.gif","160.gif":"AbU0iD.gif","161.gif":"AbUrzd.gif","162.gif":"AbUDRH.gif","163.gif":"AbUyQA.gif","164.gif":"AbUWo8.gif","165.gif":"AbU6sI.gif","166.gif":"AbU2eP.gif","167.gif":"AbUcLt.gif","168.gif":"AbU4Jg.gif","169.gif":"AbURdf.gif","170.gif":"AbUhFS.gif","171.gif":"AbU5WQ.gif","172.gif":"AbULwV.gif","173.gif":"AbUIzj.gif","174.gif":"AbUTQs.gif","175.gif":"AbU7yn.gif","176.gif":"AbUqe0.gif","177.gif":"AbUHLq.gif","178.gif":"AbUOoT.gif","179.gif":"AbUvYF.gif","180.gif":"AbUjFU.gif","181.gif":"AbaSSJ.gif","182.gif":"AbUxW4.gif","183.gif":"AbaCO1.gif","184.gif":"Abapl9.gif","185.gif":"Aba9yR.gif","186.gif":"AbaFw6.gif","187.gif":"Abaiex.gif","188.gif":"AbakTK.gif","189.gif":"AbaZfe.png","190.gif":"AbaEFO.gif","191.gif":"AbaVYD.gif","192.gif":"AbamSH.gif","193.gif":"AbaKOI.gif","194.gif":"Abanld.gif","195.gif":"Abau6A.gif","196.gif":"AbaQmt.gif","197.gif":"Abal0P.gif","198.gif":"AbatpQ.gif","199.gif":"Aba1Tf.gif","200.png":"Aba8k8.png","201.png":"AbaGtS.png","202.png":"AbaJfg.png","203.png":"AbaNlj.png","204.png":"Abawmq.png","205.png":"AbaU6s.png","206.png":"AbaaXn.png","207.png":"Aba000.png","208.png":"AbarkT.png","209.png":"AbastU.png","210.png":"AbaB7V.png","211.png":"Abafn1.png","212.png":"Abacp4.png","213.png":"AbayhF.png","214.png":"Abag1J.png","215.png":"Aba2c9.png","216.png":"AbaRXR.png","217.png":"Aba476.png","218.png":"Abah0x.png","219.png":"Abdg58.png"},
timer:null,
};
},
onLoad(d) {
@ -161,9 +162,21 @@
}
}
},
mounted() {
this.timer = setInterval(() => {
this.getTimeOrListItem1()
}, 3000);
},
onUnload() {
uni.closeSocket({
success: () => {
console.info("退出成功")
},
})
// uni.closeSocket()
uni.hideLoading()
uni.hideLoading();
clearInterval(this.timer);
this.timer = null;
},
methods:{
guanbi(){

View File

@ -124,10 +124,13 @@
this.startTime = year + '-' + e.days + ' ' + e.hours
this.yearsDate = year + '-' + e.days
console.log(this.yearsDate)
if (!this.msList.includes(e.hours)) {
this.msList.push(e.hours);
var hours=e.hours;
for(var i=0;i<hours.length;i++){
if (!this.msList.includes(hours[i].hours)) {
this.msList.push(hours[i].hours);
}
}
console.log('忙时list' + JSON.stringify(this.msList) );