增加激励视频广告
This commit is contained in:
@@ -104,6 +104,7 @@
|
||||
|
||||
<script>
|
||||
import { life, sign } from '@/apis/interfaces/life.js'
|
||||
import AD from '@/utils/ad.js'
|
||||
var account;
|
||||
export default {
|
||||
data() {
|
||||
@@ -201,19 +202,38 @@
|
||||
this.$Router.push({name: 'Capacity'})
|
||||
return
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '签到中..'
|
||||
})
|
||||
sign().then(res => {
|
||||
// 激励视频广告
|
||||
AD.show({
|
||||
adpid : 1428308887,
|
||||
adType : 'RewardedVideo',
|
||||
urlCallback : {
|
||||
userId: 'TMMM',
|
||||
}
|
||||
},(res) => {
|
||||
const detail = e.detail
|
||||
if (detail && detail.isEnded) {
|
||||
uni.showLoading({
|
||||
title: '签到中..'
|
||||
})
|
||||
sign().then(res => {
|
||||
uni.showToast({
|
||||
title: '签到成功',
|
||||
icon : 'none'
|
||||
})
|
||||
this.getLife()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
} else {
|
||||
console.log('用户主动关闭')
|
||||
console.log("onadclose " + detail.isEnded);
|
||||
}
|
||||
},(err) => {
|
||||
uni.showToast({
|
||||
title: '签到成功',
|
||||
icon : 'none'
|
||||
})
|
||||
this.getLife()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
title: e.detail
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user