|
@@ -8,8 +8,16 @@ Page({
|
|
|
* 页面的初始数据
|
|
|
*/
|
|
|
data: {
|
|
|
+ videoSrc: "",
|
|
|
+ paragraphName: "马拉松简介",
|
|
|
+ showImage: true
|
|
|
+ },
|
|
|
+ autoplay() {
|
|
|
+ if (!this.data.showImage) return;
|
|
|
+ this.setData({
|
|
|
+ showImage: false,
|
|
|
+ })
|
|
|
},
|
|
|
-
|
|
|
toDownload() {
|
|
|
if (t) t = clearTimeout(t);
|
|
|
t = setTimeout(() => {
|
|
@@ -23,10 +31,8 @@ Page({
|
|
|
})
|
|
|
res.PAY ? this.downloadVideo() : this.toPAY();
|
|
|
},
|
|
|
-
|
|
|
})
|
|
|
}, 200);
|
|
|
-
|
|
|
},
|
|
|
|
|
|
downloadVideo() {
|
|
@@ -101,6 +107,34 @@ Page({
|
|
|
*/
|
|
|
onLoad() {
|
|
|
wx.hideHomeButton({});
|
|
|
+
|
|
|
+ app.getdownloadPage({
|
|
|
+ success: (res: any) => {
|
|
|
+ app.getUser({
|
|
|
+ data: {},
|
|
|
+ success: (rule: any) => {
|
|
|
+ if (!rule.PAY || !rule.RESULT) {
|
|
|
+ this.setData({
|
|
|
+ videoSrc: res.videoSrc || "",
|
|
|
+ paragraph: res.paragraph || [],
|
|
|
+ paragraphName: res.paragraphName
|
|
|
+ })
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ app.getVideo({
|
|
|
+ success: (r: any) => {
|
|
|
+ console.log(r);
|
|
|
+ this.setData({
|
|
|
+ videoSrc: r.url,
|
|
|
+ paragraph: res.paragraph || [],
|
|
|
+ paragraphName: res.paragraphName
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
/**
|