新增直播轮播组件
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
// pages/index/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {
|
||||
|
||||
}
|
||||
})
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
<!--pages/index/index.wxml-->
|
||||
<text>pages/index/index.wxml</text>
|
||||
@@ -1 +0,0 @@
|
||||
/* pages/index/index.wxss */
|
||||
22
pages/videos/videos.js
Normal file
22
pages/videos/videos.js
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
videoList: [] //获取短视频列表
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
wx.$api.video.videos().then(res=>{
|
||||
console.log(res)
|
||||
this.setData({
|
||||
videoList: res
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
6
pages/videos/videos.json
Normal file
6
pages/videos/videos.json
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
{
|
||||
"usingComponents": {
|
||||
"mp-video-swiper": "/components/videoSwiper/videoSwiper"
|
||||
}
|
||||
}
|
||||
6
pages/videos/videos.wxml
Normal file
6
pages/videos/videos.wxml
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
<mp-video-swiper
|
||||
video-list="{{videoList}}"
|
||||
class="videoSwiper"
|
||||
>
|
||||
</mp-video-swiper>
|
||||
6
pages/videos/videos.wxss
Normal file
6
pages/videos/videos.wxss
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
.videoSwiper{
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
position: relative;
|
||||
}
|
||||
Reference in New Issue
Block a user