|
@@ -1,5 +1,7 @@
|
|
|
// pages/videoDetail/index.js
|
|
|
-import { httpCloud } from "../../utils/httpFunc";
|
|
|
+import {
|
|
|
+ httpCloud
|
|
|
+} from "../../utils/httpFunc";
|
|
|
const app = getApp()
|
|
|
Page({
|
|
|
|
|
@@ -14,14 +16,17 @@ Page({
|
|
|
},
|
|
|
|
|
|
toNext(e) {
|
|
|
- const item =this.data.media.child[e.currentTarget.dataset.index];
|
|
|
+ const item = this.data.media.child[e.currentTarget.dataset.index];
|
|
|
wx.redirectTo({
|
|
|
- url: "/pages/videoDetail/index?id=" + item.id + '&group=' + this.data.media.location
|
|
|
+ url: "/pages/videoDetail/index?id=" + item.id + '&group=' + this.data.media.location
|
|
|
})
|
|
|
},
|
|
|
|
|
|
loadedmetadata(e) {
|
|
|
- const { width, height } = e.detail || {};
|
|
|
+ const {
|
|
|
+ width,
|
|
|
+ height
|
|
|
+ } = e.detail || {};
|
|
|
this.setData({
|
|
|
videoWidth: app.globalData.client.windowWidth,
|
|
|
videoHeight: app.globalData.client.windowWidth / width * height
|
|
@@ -37,12 +42,14 @@ Page({
|
|
|
name: "server",
|
|
|
type: "getMediaOnceController",
|
|
|
data: {
|
|
|
- typeMedia: 'video',
|
|
|
+ typeMedia: options.type,
|
|
|
id: options.id,
|
|
|
group: options.group
|
|
|
},
|
|
|
call(res) {
|
|
|
- const ori = res[0] || { child: [] };
|
|
|
+ const ori = res[0] || {
|
|
|
+ child: []
|
|
|
+ };
|
|
|
let indexItem = {};
|
|
|
for (let i = 0; i < ori.child.length; i++) {
|
|
|
const v = ori.child[i];
|