Commit 1e113557 authored by jyx's avatar jyx

代码优化

parent f5b08422
......@@ -286,10 +286,10 @@
this.post({
url: '/vTask/common/reportCompleteMsg/beginSeeTime',
showLoading: false,
success: ({
data
}) => {
success: ({
data
}) => {
}
});
},
......@@ -299,10 +299,10 @@
this.post({
url: '/vTask/common/reportCompleteMsg/endSeeTime',
showLoading: false,
success: ({
data
}) => {
success: ({
data
}) => {
}
});
},
......@@ -328,10 +328,10 @@
this.post({
url: '/vTask/vedioPageClose',
showLoading: false,
success: ({
data
}) => {
success: ({
data
}) => {
}
});
},
......@@ -571,7 +571,8 @@
});
let that = this
this.ad.closeHandler = function(res) {
this.ad.onClose((res) => {
uni.hideLoading();
if (res && res.isEnded || res === undefined) {
if (that.isMoreAd) {
......@@ -592,8 +593,8 @@
} else {
message.notify("未观看完整视频")
}
});
};
// 监听错误
this.ad.onError((err) => {
......@@ -615,7 +616,7 @@
});
// 监听视频播放完成
this.ad.onClose(this.ad.closeHandler);
// this.ad.onClose(this.ad.closeHandler);
// 预加载资源
this.ad.load();
......@@ -672,6 +673,9 @@
success: ({
data
}) => {
console.log('BBBBBBBBBB')
message.notify(data.msg)
if (data.code == 200) {
......
......@@ -337,6 +337,9 @@ export function getSubList(length, list) {
}
export function formateTime(dateTime, fmt) {
if (!dateTime) {
return ''
}
let date = new Date(dateTime)
if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
......
Markdown is supported
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