gree_leran/unpackage/dist/dev/mp-weixin/pages/video/video.js

107 lines
2.4 KiB
JavaScript
Raw Normal View History

2024-06-16 15:32:15 +00:00
"use strict";
const common_vendor = require("../../common/vendor.js");
2024-06-16 23:47:03 +00:00
const cardVideo = () => "../../components/cardVideo.js";
const potoInfo = () => "../../components/photosInfo.js";
2024-06-16 15:32:15 +00:00
const _sfc_main = {
2024-06-16 23:47:03 +00:00
components: {
cardVideo,
potoInfo
},
2024-06-16 15:32:15 +00:00
data() {
return {
2024-06-16 23:47:03 +00:00
status: "loadmore",
list: [{
name: "视频"
}, {
name: "图片"
}],
current: 0,
imageList: [],
swpper: {
index: 0
},
page: {
pageNum: 1,
pageSize: 10,
total: 0
},
videoList: [{
src: "",
avatar: "dsfs",
username: "sdsd",
titleName: "asdsdas",
tagName: "sdasd"
}],
videoContext: null
2024-06-16 15:32:15 +00:00
};
},
onLoad() {
},
methods: {
2024-06-16 23:47:03 +00:00
getVideo(e) {
console.log(e);
if (this.videoContext) {
console.log("test");
this.videoContext.pause();
}
this.videoContext = e.videoContext;
2024-06-16 15:32:15 +00:00
},
2024-06-16 23:47:03 +00:00
ISstatusInit() {
switch (this.swpper.index) {
case 0: {
this.getVideoList();
break;
2024-06-16 15:32:15 +00:00
}
2024-06-16 23:47:03 +00:00
case 1: {
this.getImageList();
2024-06-16 15:32:15 +00:00
}
}
},
2024-06-16 23:47:03 +00:00
onReachLoad() {
this.status = "loading";
this.page.pageSize += 10;
this.ISstatusInit();
console.log(this.swpper.index);
if (this.list.length >= this.page.total) {
console.log(this.list.length);
this.status = "nomore";
} else {
this.status = "loadmore";
}
},
async getVideoList() {
},
change(e) {
console.log(e);
this.swpper.index = e.index;
this.page = {
pageNum: 1,
pageSize: 10,
total: 0
};
this.ISstatusInit();
2024-06-16 15:32:15 +00:00
}
}
};
2024-06-16 23:47:03 +00:00
if (!Array) {
const _component_card_video = common_vendor.resolveComponent("card-video");
_component_card_video();
}
2024-06-16 15:32:15 +00:00
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
2024-06-16 23:47:03 +00:00
a: common_vendor.f($data.videoList, (item, index, i0) => {
return {
a: common_vendor.o($options.getVideo, index),
b: index,
c: "71f14456-0-" + i0,
d: common_vendor.p({
VideoId: index,
Videos: item
})
};
})
2024-06-16 15:32:15 +00:00
};
}
2024-06-16 23:47:03 +00:00
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/pages/video/video.vue"]]);
2024-06-16 15:32:15 +00:00
wx.createPage(MiniProgramPage);