123
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<view class="recharge" v-else>
|
||||
<view class="header_top">
|
||||
<text style="font-size: 32rpx;">解锁后可继续观看</text>
|
||||
<image @tap="close_pay_box" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/fanhui.png"
|
||||
<image @tap="close_pay_box" :src="config.webUrl + '/static/wechat/static/fanhui.png'"
|
||||
style="width: 36rpx;height: 36rpx;"></image>
|
||||
</view>
|
||||
<view class="vider_juji">
|
||||
@@ -38,9 +38,9 @@
|
||||
<text class="depict" v-if="item.pay_give_num && item.pay_type == 2">
|
||||
{{ item.pay_num }}金豆+{{ item.pay_give_num }}豆
|
||||
</text>
|
||||
<text class="depict" v-if="!item.pay_give_num && item.pay_type == 2">
|
||||
{{ item.pay_num }}金豆
|
||||
</text>
|
||||
<text class="depict" v-if="!item.pay_give_num && item.pay_type == 2">
|
||||
{{ item.pay_num }}金豆
|
||||
</text>
|
||||
<view class="explainText" v-if="item.pay_type != 2">
|
||||
<text v-if="item.pay_type == 1" style="color: #333333;">全部影片免费观看</text>
|
||||
<text v-if="item.pay_type == 3" style="color: #FF6900;">本剧订阅全集</text>
|
||||
@@ -68,10 +68,11 @@
|
||||
<view :class="['vipCarFooter',{'footerRedColor':item.is_red!=1}]">
|
||||
{{ item.remark ? item.remark : '' }}
|
||||
</view>
|
||||
<image v-if="item.is_finger" class="hands"
|
||||
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/hands.gif" mode=""></image>
|
||||
<image v-if="item.is_finger" class="hands" :src="config.webUrl + '/static/wechat/static/hands.gif'"
|
||||
mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="adBox" v-if="adLoaded" @click="showAd">看广告解锁</view>
|
||||
<view class="explainList">
|
||||
<text class="explainItem"> 充值代表接受
|
||||
<text class="explainText" @click="goAgreement(1)">《充值/退款协议》</text>
|
||||
@@ -81,23 +82,7 @@
|
||||
<text class="explainItem"> 本小程序共有{{ allVideoNum }}部剧正在热播</text>
|
||||
</view>
|
||||
|
||||
|
||||
<uni-popup ref="back_ref" type="center">
|
||||
<view class="teamPupCont">
|
||||
<view class="closeIcon" @click="closePup">
|
||||
<uni-icons type="closeempty" size="16" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="textBox">
|
||||
<view class="textLine">用户只能发起一次邀请</view>
|
||||
<view class="textLine">有效时间为24小时</view>
|
||||
<view class="textLine">分享好友拼团,拼成退差价</view>
|
||||
</view>
|
||||
<button open-type="share" class="inviteBtn">立即邀请</button>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -107,6 +92,8 @@
|
||||
} from '@/utils/request'
|
||||
import PAY from '@/utils/pay'
|
||||
const playletPlugin = requirePlugin('playlet-plugin')
|
||||
import config from "@/utils/config";
|
||||
import insertAd from '@/utils/insertAd'
|
||||
export default {
|
||||
name: "payDom",
|
||||
props: {
|
||||
@@ -145,7 +132,8 @@
|
||||
payItemData: {},
|
||||
g_order_id: "",
|
||||
is_check: false,
|
||||
allVideoNum: 0
|
||||
allVideoNum: 0,
|
||||
adLoaded: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -154,10 +142,10 @@
|
||||
this.is_check = uni.getStorageSync('config').is_check == 1 ? true : false;
|
||||
this.userInfo = uni.getStorageSync('userinfo');
|
||||
this.system = uni.getSystemInfoSync().osName;
|
||||
this.initChargeDialog();
|
||||
this.initChargeDialog();
|
||||
this.getVideoData();
|
||||
this.getAllVideoNum();
|
||||
this.getPayList();
|
||||
this.getPayList();
|
||||
this.initAd();
|
||||
},
|
||||
playerId(newValue, oldvalue) {
|
||||
console.log('this.initChargeDialog', newValue)
|
||||
@@ -165,6 +153,31 @@
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 初始化广告
|
||||
initAd() {
|
||||
let pms = this.getPlayerManager();
|
||||
// 监听加载成功 → 显示按钮
|
||||
insertAd.insertAdonLoad(() => {
|
||||
this.adLoaded = true;
|
||||
});
|
||||
// 监听加载失败 → 隐藏按钮
|
||||
insertAd.insertAdonError(() => {
|
||||
this.adLoaded = false;
|
||||
});
|
||||
// 监听关闭
|
||||
insertAd.insertAdonClose((isEnded) => {
|
||||
if (isEnded) {
|
||||
console.log('广告看完,发放奖励');
|
||||
// TODO: 调用你的解锁接口
|
||||
pms.emitCustomEvent('adEnd', this.im)
|
||||
}
|
||||
});
|
||||
// 开始加载广告
|
||||
insertAd.insertAdload();
|
||||
},
|
||||
showAd() {
|
||||
insertAd.insertAdshow();
|
||||
},
|
||||
goAgreement(num) {
|
||||
const pm = this.getPlayerManager()
|
||||
pm.navigateTo({
|
||||
@@ -200,16 +213,16 @@
|
||||
return playletPlugin.PlayletManager.getPageManager(this.playerId);
|
||||
},
|
||||
onShowChargeDialog() {
|
||||
console.log('onShowChargeDialog bbs')
|
||||
console.log('onShowChargeDialog bbs')
|
||||
this.getPayList();
|
||||
},
|
||||
onHideChargeDialog() {
|
||||
// this.$refs.back_ref.close();
|
||||
},
|
||||
close_pay_box(){
|
||||
const pm = this.getPlayerManager()
|
||||
pm.hideChargeDialog();
|
||||
},
|
||||
close_pay_box() {
|
||||
const pm = this.getPlayerManager()
|
||||
pm.hideChargeDialog();
|
||||
},
|
||||
getAllVideoNum() {
|
||||
httpRequest({
|
||||
url: "/api/video/videoCount",
|
||||
@@ -249,15 +262,15 @@
|
||||
video_list_id: this.vid
|
||||
}
|
||||
}).then(res => {
|
||||
if(res.code == 1){
|
||||
this.payListGroupId = uni.getStorageSync('config').pay_tpl;
|
||||
// this.payListGroupId = 2;
|
||||
this.list_pay = res.data
|
||||
}else if(res.code ==50){
|
||||
this.is_check = true;
|
||||
}
|
||||
if (res.code == 1) {
|
||||
this.payListGroupId = uni.getStorageSync('config').pay_tpl;
|
||||
// this.payListGroupId = 2;
|
||||
this.list_pay = res.data
|
||||
} else if (res.code == 50) {
|
||||
this.is_check = true;
|
||||
}
|
||||
|
||||
}).catch(err => {
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
},
|
||||
@@ -381,89 +394,20 @@
|
||||
})
|
||||
},
|
||||
|
||||
// wxxcx_xuni(data) {
|
||||
// console.log(data)
|
||||
// let that = this,
|
||||
// pms = that.getPlayerManager();
|
||||
// uni.requestVirtualPayment({
|
||||
// signData: JSON.stringify({
|
||||
// buyQuantity: data.signData.buyQuantity,
|
||||
// currencyType: data.signData.currencyType,
|
||||
// env: data.signData.env,
|
||||
// goodsPrice: data.signData.goodsPrice,
|
||||
// offerId: data.signData.offerId,
|
||||
// outTradeNo: data.signData.outTradeNo,
|
||||
// platform: data.signData.platform,
|
||||
// productId: data.signData.productId,
|
||||
// attach: data.signData.attach,
|
||||
// }),
|
||||
// paySig: data.paySig,
|
||||
// signature: data.signature,
|
||||
// mode: 'short_series_coin',
|
||||
// success(res) {
|
||||
// let payParam = {
|
||||
// status: 'paySuccess',
|
||||
// serialNo: that.serialNo,
|
||||
// gOrderId: "",
|
||||
// vid: that.vid,
|
||||
// oid: data.oid
|
||||
// }
|
||||
// if (that.payItemData.pay_type == 4) {
|
||||
// // that.$refs.back_ref.open('center');
|
||||
// that.payEnd(payParam)
|
||||
// } else {
|
||||
// pms.emitCustomEvent('chargeEnd', payParam)
|
||||
// }
|
||||
// },
|
||||
// fail({errMsg, errCode}) {
|
||||
// console.log(errMsg, errCode, data.signature)
|
||||
// },
|
||||
// })
|
||||
// },
|
||||
// wxxcx(data) {
|
||||
// let that = this,
|
||||
// pms = that.getPlayerManager();
|
||||
// uni.requestPayment({
|
||||
// "provider": 'wxpay',
|
||||
// "appId": data.appId,
|
||||
// "timeStamp": data.timeStamp + '',
|
||||
// "nonceStr": data.nonceStr,
|
||||
// "package": data.package,
|
||||
// "signType": 'MD5',
|
||||
// "paySign": data.sign,
|
||||
// success: function (res1) {
|
||||
// let payParam = {
|
||||
// status: 'paySuccess',
|
||||
// serialNo: that.serialNo,
|
||||
// gOrderId: "",
|
||||
// vid: that.vid,
|
||||
// oid: data.oid
|
||||
// }
|
||||
// if (that.payItemData.pay_type == 4) {
|
||||
// // that.$refs.back_ref.open('center');
|
||||
//
|
||||
// that.payEnd(payParam)
|
||||
// } else {
|
||||
// pms.emitCustomEvent('chargeEnd', payParam)
|
||||
// }
|
||||
// console.log('success:' + JSON.stringify(res1));
|
||||
// },
|
||||
// fail: function (err1) {
|
||||
// console.log('fail:' + JSON.stringify(err1));
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
|
||||
|
||||
closePup() {
|
||||
// this.$refs.back_ref.close();
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.adBox {
|
||||
width: 100%;
|
||||
height: 56rpx;
|
||||
background: linear-gradient(to right, #FF5205, #FF0591);
|
||||
color: #fff;
|
||||
border-radius: 48rpx;
|
||||
}
|
||||
|
||||
.noRecharge {
|
||||
font-size: 40rpx;
|
||||
line-height: 200rpx;
|
||||
|
||||
Reference in New Issue
Block a user