Commit d55874d1 authored by 罗超's avatar 罗超

1

parent c93ff171
<template>
<view>
<van-toast id="van-toast" />
<van-empty description="暂无数据" v-if="dataList.length === 0" />
<scroll-view
:scroll-top="0"
......@@ -44,22 +45,22 @@
style="width: 100%; height: 100%"
mode="aspectFill"
v-if="item1.indexOf('mp4')===-1"
@click="previewImage(item.PhotoList, index1)"
@click="previewImage(item1, index1)"
/>
<video :id="'myVideo'+index1" :src="item1" style="width: 100%; height: 100%"
<video :id="'myVideo'+index1" :src="item1" style="width: 100%; height: 100%"
:controls='controls'
:show-center-play-btn='false'
:show-fullscreen-btn='false'
@fullscreenchange='videoControl'
v-if="item1.indexOf('mp4')!=-1"
></video>
<view @click="enlarge(index1)" v-if="item1.indexOf('mp4')!=-1"
></video>
<view @click="enlarge(index1)" v-if="item1.indexOf('mp4')!=-1"
style="position: absolute;left: 50%;top: 50%;margin-top: -49rpx;margin-left: -49rpx;width: 98rpx;height: 98rpx;border-radius: 20rpx;background-color: rgba(255,255,255,.4);display: flex;align-items: center;justify-content: center;">
<!-- 播放按钮 -->
<image
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616471847000_345.png"
style="width: 37rpx;height: 44rpx;" mode=""></image>
</view>
</view>
</view>
<view
......@@ -138,7 +139,8 @@ export default {
data.pageState = "none";
}
},
previewImage(arr, i) {
previewImage(item,i) {
let arr=[item]
uni.previewImage({
urls: arr,
current: i,
......
......@@ -167,11 +167,11 @@ export default {
let activeDay = ref(1);
//切换选中日期
let calendarActive = (item) => {
activeDay.value = item.$orig.day;
let day = item.$orig.day < 10 ? "0" + item.$orig.day : item.$orig.day;
let d = item.$orig?.day||item.day
activeDay.value = d ;
let day = d < 10 ? "0" + d : d;
data.msg.StartTime = currentDate.value + "-" + day;
data.msg.EndTime = currentDate.value + "-" + day;
console.log(172,item,item.$orig.day, day)
that.getData();
};
let emptyArr = []; //日历补空
......@@ -187,9 +187,16 @@ export default {
let isShowAllDay = ref(false);
let sliceWeekArr = ref([]);
let sliceWeek = (item) => {
let w =0
if(item.$orig){
w =item.$orig.week
}else{
w =item.week
}
let d = item.$orig?.day||item.day
let newArr = calendar.value.slice(emptyArr.length, calendar.value.length);
let s = item.day - (item.week + 1) < 0 ? 0 : item.day - (item.week + 1);
let e = item.day + (6 - item.week);
let s = d - (w + 1) <= 0 ? 0 : d - (w + 1);
let e = d + (6 - w);
sliceWeekArr.value = newArr.slice(s, e);
if (s === 0) {
sliceWeekArr.value.unshift(...emptyArr);
......
//请求教育接口
let host = ''
if (process.env.NODE_ENV === "development") {
// host = 'http://192.168.20.17:8017/api'
host = 'http://192.168.20.17:8017/api'
// host = 'http://192.168.20.24:8300/api'
host = 'https://eduapi.oytour.com/api'
// host = 'https://eduapi.oytour.com/api'
} else {
host = 'https://eduapi.oytour.com/api'
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment