Commit 02fbe11f authored by Tannin Rachel's avatar Tannin Rachel
Browse files

feat video

parent ca53b1cc
This diff is collapsed.
...@@ -92,20 +92,4 @@ function getTimestamp() { ...@@ -92,20 +92,4 @@ function getTimestamp() {
timeStamp = new Date().getTime(); timeStamp = new Date().getTime();
console.log(timeStamp); console.log(timeStamp);
return timeStamp; return timeStamp;
} }
\ No newline at end of file
const list =
[
{
"name": "帕金森患者如何进行居家康复训练",
"publishTime": "2023年3月11日",
"cover": "https://p2.music.126.net/LBnYDAUED2mD1veBvBnC8g==/5859297464524710.jpg?param=130y130",
"url": "http://znjqr.zj.moocollege.com/datacenter/news/detail?id=4764"
},
{
"name": "帕金森患者如何进行居家康复训练",
"publishTime": "2023年3月11日",
"cover": "https://i0.hdslb.com/bfs/live/cc8522721479a23a03967adb48ef2fbf1c7cac31.jpg@412w_232h_1c.avif",
"url": "https://www.overleaf.com/project/646e2bde71cd2e2659eb7ab84"
}
]
\ No newline at end of file
// pages/video/video.js // pages/video/video.js
import { videotable } from '../../json/videolib.js'
Page({ Page({
/** /**
...@@ -30,6 +32,7 @@ Page({ ...@@ -30,6 +32,7 @@ Page({
'2014', '2014',
'2013' '2013'
], ],
displayList : videotable.data,
typeIsSelected : [ typeIsSelected : [
true, false, false, false true, false, false, false
], ],
...@@ -95,5 +98,51 @@ Page({ ...@@ -95,5 +98,51 @@ Page({
*/ */
onShareAppMessage() { onShareAppMessage() {
} },
changeTypeSelect: function(e) {
var a = [];
for (var i=0;i<4;i++) {
a.push(false);
}
a[e.currentTarget.dataset.info] = true;
this.setData({
typeIsSelected: a
});
this.selectList(this.data.typeIsSelected.indexOf(true), this.data.durIsSelected.indexOf(true), this.data.yearIsSelected.indexOf(true));
},
changeDurSelect: function(e) {
var a = [];
for (var i=0;i<3;i++) {
a.push(false);
}
a[e.currentTarget.dataset.info] = true;
this.setData({
durIsSelected: a
});
this.selectList(this.data.typeIsSelected.indexOf(true), this.data.durIsSelected.indexOf(true), this.data.yearIsSelected.indexOf(true));
},
changeYearSelect: function(e) {
var a = [];
for (var i=0;i<12;i++) {
a.push(false);
}
a[e.currentTarget.dataset.info] = true;
this.setData({
yearIsSelected: a
});
this.selectList(this.data.typeIsSelected.indexOf(true), this.data.durIsSelected.indexOf(true), this.data.yearIsSelected.indexOf(true));
},
goBilibili: function () {
const aid = '607824247'
const timestamp = new Date().getTime()
const path = `pages/video/video?__preload_=${timestamp * 10 + 3}&__key_=${timestamp * 10 + 4}&avid=${aid}`
wx.navigateToMiniProgram({
appId: 'wx7564fd5313d24844',
path,
success: res => {
console.log('跳转成功')
}
})
},
}) })
\ No newline at end of file
...@@ -17,4 +17,15 @@ ...@@ -17,4 +17,15 @@
<text class="view-item" style="--bgColor:{{ yearIsSelected[index] ? '#dad4e6' : '#ffffff'}};--txColor:{{ yearIsSelected[index] ? '#b4a1ce' : '#000000'}}">{{ item }}</text> <text class="view-item" style="--bgColor:{{ yearIsSelected[index] ? '#dad4e6' : '#ffffff'}};--txColor:{{ yearIsSelected[index] ? '#b4a1ce' : '#000000'}}">{{ item }}</text>
</view> </view>
</scroll-view> </scroll-view>
<scroll-view scroll-y="true" class="display" style="width: 730rpx">
<view wx:for="{{ displayList }}" wx:key="unique" class="display-item">
<view wx:if="{{ index % 2 }}" class="display-left" bindtap="goBilibili" data-info="{{ index }}">
<text class="display-text"> {{ item.video }} </text>
</view>
<view wx:if="{{ index % 2 == 0 }}" class="display-right" bindtap="goBilibili" data-info="{{ index }}">
<text class="display-text"> {{ item.video }} </text>
</view>
</view>
</scroll-view>
</view> </view>
\ No newline at end of file
/* pages/video/video.wxss */ /* pages/video/video.wxss */
\ No newline at end of file .scroll-x-list{
height:60rpx;
white-space: nowrap;
margin-left: 20rpx;
}
#first {
margin-top: 20rpx;
}
.view-parent{
display:inline-block;
margin-right: var(--right);
background-color: var(--bgColor);
color: var(--txColor);
}
.view-item {
padding-left: 10rpx;
padding-right: 10rpx;
padding-top: 5rpx;
padding-bottom: 5rpx;
background-color: var(--bgColor);
color: var(--txColor);
border-radius: 15rpx;
}
.display {
white-space: nowrap;
margin-left: 20rpx;
height: 974rpx;
}
.display-item {
position: relative;
}
.display-left {
width: 40%;
height: 300rpx;
position: relative;
background-color: #b4a1ce;
left: 5%;
border-radius: 5%;
}
.display-right {
width: 40%;
height: 300rpx;
position: relative;
background-color: #b4a1ce;
right: 5%;
border-radius: 5%;
}
.display-text {
}
.display-item-name {
font-size: 40rpx;
color: #b4a1ce;
width: 100%;
}
.display-item-info {
font-size: 25rpx;
}
.display-item-type {
margin-left: 20rpx;
}
.display-item-time {
margin-left: 20rpx;
}
.display-item-more {
position: absolute;
right: 30rpx;
top: 30rpx;
height: 48rpx;
width: 48rpx;
}
.more-info {
position: relative;
background-color: #ffffff;
top: 60rpx;
height: 700rpx;
width: 100%;
left: 10rpx;
z-index: 999;
border-radius: 5%;
}
.info-close {
position: absolute;
width: 48rpx;
height: 48rpx;
top: 20rpx;
right: 20rpx;
}
.info-main-cover {
position: absolute;
left: 20rpx;
width: 130rpx;
height: 130rpx;
top: 20rpx;
}
.info-main-name {
position: absolute;
left: 170rpx;
top: 25rpx;
font-size: 40rpx;
}
.info-main-platform {
position: absolute;
left: 170rpx;
top: 90rpx;
font-size: 25rpx;
}
.info-content {
position: absolute;
left: 20rpx;
top: 190rpx;
}
.playmenu {
position: fixed;
width: 100%;
height: 100rpx;
background-color: #b4a1ce;
bottom: 0rpx;
z-index: 9999;
}
.play-cover {
position: absolute;
left: 20rpx;
top: 10rpx;
width: 80rpx;
height: 80rpx;
border-radius: 50%;
}
.play-name {
position: absolute;
left: 120rpx;
font-size: 30rpx;
top: 30rpx;
color: #ffffff;
}
.play-order {
position: absolute;
right: 120rpx;
top: 20rpx;
width: 60rpx;
height: 60rpx;
}
.play-list {
position: absolute;
right: 30rpx;
top: 20rpx;
width: 60rpx;
height: 60rpx;
}
.popup-box {
position: absolute;
z-index: 99;
top: 0;
background-color: rgba(0, 0, 0, 0.5);
width: 100%;
height: 100%;
}
.list {
position: sticky;
width: 96%;
height: 600rpx;
background-color: #dad4e9;
bottom: 100rpx;
left: 2%;
border-radius: 5%;
z-index: 999;
}
.list-curplay {
position: absolute;
left: 20rpx;
top: 10rpx;
}
.list-table {
position: absolute;
height: 550rpx;
top: 50rpx;
}
.list-name {
font-size: 32rpx;
position: absolute;
left: 20rpx;
color: var(--color);
}
.list-album {
font-size: 25rpx;
margin-left: 50%;
color: var(--color);
}
.list-item {
margin-top: 25rpx;
}
.list-delete {
position: absolute;
right: 20rpx;
width: 40rpx;
height: 40rpx;
margin-top: 5rpx;
}
.list-deleteall {
position: absolute;
right: 60rpx;
top: 10rpx;
}
.info-next-img {
position: absolute;
width: 32rpx;
height: 32rpx;
left: 20rpx;
bottom: 80rpx;
}
.info-next {
position: absolute;
bottom: 80rpx;
left: 52rpx;
}
.info-end {
position: absolute;
right: 52rpx;
bottom: 80rpx;
}
.info-end-img {
position: absolute;
right: 20rpx;
width: 32rpx;
height: 32rpx;
bottom: 80rpx;
}
\ No newline at end of file
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
"ignore": [], "ignore": [],
"disablePlugins": [], "disablePlugins": [],
"outputPath": "" "outputPath": ""
} },
"condition": false
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.19.4", "libVersion": "2.19.4",
......
{ {
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "R_Wiki_Mini", "projectname": "r_wiki_mini",
"setting": { "setting": {
"compileHotReLoad": true, "compileHotReLoad": true,
"urlCheck": true "urlCheck": true
......
Supports Markdown
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