This commit is contained in:
lipenggao 2025-04-29 17:08:42 +08:00
parent dc22308178
commit 8522a10320
15 changed files with 823 additions and 280 deletions

View File

@ -13,7 +13,8 @@
"pages/videoByte/videoByte",
"pages/pay/pay",
"pages/history/history",
"pages/collection/collection"
"pages/collection/collection",
"pages/agreement/agreement"
],
"window": {
"backgroundTextStyle": "light",
@ -26,8 +27,7 @@
"selectedColor": "#5BBE04",
"backgroundColor": "#000000",
"custom": false,
"list": [
{
"list": [{
"pagePath": "pages/home/home",
"iconPath": "/static/tab/home.png",
"selectedIconPath": "/static/tab/home_selected.png",
@ -52,5 +52,6 @@
"text": "我的"
}
]
}
},
"usingProvide": true
}

1
app.ts
View File

@ -10,6 +10,7 @@ App({
statusBarHeight: 0,
canUsePlayletExtension: tt.canIUse('PlayletExtension'),
useVideoByte: true,//是否使用官方播放器
chapterCatalog: {}
},
onLaunch() {
const loginPromise: any = new Promise((resolve: any) => {

View File

@ -29,4 +29,12 @@ page {
.mt_36 {
margin-top: 36rpx;
}
.ft_36 {
font-size: 36rpx;
}
.ft_24 {
font-size: 24rpx;
}

View File

@ -2,7 +2,9 @@
// getVideoList
// } from "../../api/common"
import {httpRequest} from "../../utils/httpReques";
import {
httpRequest
} from "../../utils/httpReques";
const {
getPlayletManager
@ -20,7 +22,7 @@ Component({
egold: 0,
payList: [],
time: "",
action:0,
action: 0,
iosStatus: 0,
iosIm: '',
payLiClass: {
@ -28,11 +30,11 @@ Component({
2: "pay_li_class_2",
4: "pay_li_class_4",
},
useBytePayment: true,//是否使用抖音支付组件
useBytePayment: true, //是否使用抖音支付组件
canIUsePaymentChannel: tt.canIUse('payment-channel-select'),
showPaymentChannelSelect: false,
dySkuList:[], //从接口获取的skulist
skuList:[],//传给支付组件的skulist
dySkuList: [], //从接口获取的skulist
skuList: [], //传给支付组件的skulist
},
inject: ["chargeTap"],
observers: {
@ -52,7 +54,7 @@ Component({
})
}
})
console.log('payment-channel-select',this.data.canIUsePaymentChannel)
console.log('payment-channel-select', this.data.canIUsePaymentChannel)
const pm = getPlayletManager(this);
this.pm = pm;
pm.onPlay(() => {
@ -80,7 +82,7 @@ Component({
},
attached() {
this.getPayList()
const watchInfo = tt.getStorageSync('watchInfo')
const watchInfo = tt.getStorageSync('watchInfo')
this.setData({
videoResult: watchInfo
})
@ -88,17 +90,20 @@ Component({
},
methods: {
getPayList() {
httpRequest('/paysetting', 'post', {new_pay:1,is_unit:1}).then((res) => {
httpRequest('/paysetting', 'post', {
new_pay: 1,
is_unit: 1
}).then((res) => {
if (res.status == 1) {
this.setData({
egold: res?.data?.egold,
egold: res?.data?.egold,
payList: res?.data?.list,
dySkuList: [...res?.data?.dy_config?.sku_list]
})
}
this.setCurrentItem()
// //支持且需要官方支付组件时
if(tt.canIUse('payment-channel-select')&&this.data.useBytePayment){
if (tt.canIUse('payment-channel-select') && this.data.useBytePayment) {
//设置面板
this.setSkuList(this.setCurrentItem());
//显示面板
@ -129,7 +134,9 @@ Component({
}
//ios支付
httpRequest('/bs', 'post', {new_pay:1}).then((res) => {
httpRequest('/bs', 'post', {
new_pay: 1
}).then((res) => {
if (res.status == 1) {
this.setData({
iosStatus: res?.data?.status,
@ -147,12 +154,12 @@ Component({
});
},
//选中商品
setCurrentItem(inx){
setCurrentItem(inx) {
let cacheInx
//有下标时,直接设置
if(inx){
if (inx) {
cacheInx = inx
}else {
} else {
//没有下标时从数据def_select设置页面
for (let i = 0; i < this.data.payList.length; i++) {
if (this.data.payList[i].def_select) {
@ -167,29 +174,29 @@ Component({
return this.data.action;
},
//点击商品
payItem(item,index) {
payItem(item, index) {
// this.data.action = index
this.setData({
action: index
})
//调用抖音支付组件
if(tt.canIUse('payment-channel-select')&&this.data.useBytePayment&&this.data.showPaymentChannelSelect){
if (tt.canIUse('payment-channel-select') && this.data.useBytePayment && this.data.showPaymentChannelSelect) {
// console.log('item',item)
this.setSkuList(index)
}else{
} else {
//打开原tt支付
this.openTtPay(index)
}
},
//设置抖音支付面板数据
setSkuList(inx){
setSkuList(inx) {
const item = this.data.dySkuList[inx];
let skuList = [];
skuList.push(item);
this.setData({
skuList: skuList
})
console.log('skuList',this.data.skuList)
console.log('skuList', this.data.skuList)
},
//组件支付下单
async handleRequestOrderByte(event) {
@ -219,18 +226,23 @@ Component({
},
//组件支付状态
handleGetPaymentResult(event) {
const { status, result } = event.detail;
console.log('handleGetPaymentResult',event.detail)
const {
status,
result
} = event.detail;
console.log('handleGetPaymentResult', event.detail)
if (status === 'success') {
const { code } = result;
const {
code
} = result;
if (code === 0) {
tt.showToast({
icon: 'none',
title: '支付成功',
});
this.emitChargeInfoToParent('charge','success')
this.emitChargeInfoToParent('charge', 'success')
// uni.$emit('chargePaySuccess')
} else if( code === 9) {
} else if (code === 9) {
// code 为 9开发者自行查询订单状态
} else {
// 支付失败、超时、取消、关闭
@ -248,12 +260,15 @@ Component({
}
},
//组件支付报错
handleGetPaymentError(event){
handleGetPaymentError(event) {
// errNo错误码对应某种具体报错原因
// errMsg报错信息
const { errNo, errMsg } = event.detail
console.log('errMsg',errMsg)
console.log('errNo',errNo)
const {
errNo,
errMsg
} = event.detail
console.log('errMsg', errMsg)
console.log('errNo', errNo)
const componentInitError = [169007, 20000]
const payError = [169015, 169016, 169017, 169018, 169019, 169020, 20]
if (componentInitError.includes(errNo)) {
@ -262,7 +277,7 @@ Component({
showPaymentChannelSelect: false
})
// this.data.showPaymentChannelSelect = false;
} else if(payError.includes(errNo)) {
} else if (payError.includes(errNo)) {
// 支付流程错误
// 使用 tt.requestOrder + tt.getOrderPayment
// this.showPaymentChannelSelect = false;
@ -270,7 +285,7 @@ Component({
}
},
//打开原tt支付
openTtPay(index){
openTtPay(index) {
const that = this;
const item = this.data.payList[index];
tt.showLoading({
@ -278,7 +293,7 @@ Component({
});
const launchsite = tt.getStorageSync('launchsite') || 1;
if (this.data.platform === "ios" && this.data.iosStatus === 1) {
tt.hideLoading({});
tt.hideLoading({});
tt.showToast({
title: "暂不支持ios支付",
duration: 2000,
@ -314,7 +329,7 @@ Component({
title: "支付成功",
duration: 2000,
});
that.emitChargeInfoToParent('charge','success')
that.emitChargeInfoToParent('charge', 'success')
},
fail: (payError) => {
tt.hideLoading({});
@ -352,7 +367,7 @@ Component({
title: "支付成功",
duration: 2000,
});
that.emitChargeInfoToParent('charge','success')
that.emitChargeInfoToParent('charge', 'success')
// paysetting().then((res) => {
// this.egold = res.egold;
// uni.setStorageSync("isPopup", false);
@ -378,21 +393,21 @@ Component({
}
},
//接收页面点击
handlePayItem(e){
handlePayItem(e) {
const item = e.currentTarget.dataset.item
const index = e.currentTarget.dataset.index
// this.emitChargeInfoToParent('charge','success')
this.payItem(item,index)
this.payItem(item, index)
},
//向父组件传值
emitChargeInfoToParent(val,data) {
emitChargeInfoToParent(val, data) {
const instance = this.selectOwnerComponent();
instance.emitChargeInfoFromChildren(val,data);
instance.emitChargeInfoFromChildren(val, data);
this.close()
},
close(){
close() {
this.pm.toggleCustomDialog()
},
@ -423,5 +438,17 @@ Component({
})
this.ad.show();
},
toPathAgreement() {
tt.navigateTo({
url: '/pages/agreement/agreement',
success: (res) => {
},
fail: (res) => {
},
});
}
}
})

View File

@ -1,9 +1,9 @@
<view class="video-footer">
<view class="py-30" style="box-sizing: border-box">
<view style="justify-content: space-between" class="d-flex flex-row px-30">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="width: 48rpx;height: 48rpx;">
<image src="https://dycqjcweb.jiulingliu.cn/appletStatic/icon/dy_pay_hed_icon.png" mode="scaleToFill" style="width: 48rpx;height: 48rpx;"/>
<image src="https://dybxjcapi.jiulingliu.cn/appletStatic/icon/dy_pay_hed_icon.png" mode="scaleToFill" style="width: 48rpx;height: 48rpx;" />
</view>
<view class="fs-36 ml-20" style="color: #000; font-weight: bold">
抖音支付
@ -11,75 +11,74 @@
</view>
<view class="flex-center" bindtap="close">
<icon class="tt-icon" type="cancel"></icon>
<!-- <u-icon name="arrow-down" color="#000" size="48rpx"></u-icon>-->
</view>
</view>
<view class="flex-row px-30 mt-24" style="justify-content: space-between;width: 100%">
<view class="fs-26" style="color: #000">
我的K币{{ egold || 0 }}K币
<view class="flex-row px-30 mt-24" style="display: flex; justify-content: space-between;width: 100%">
<view class="ft_24" style="color: #000">
<text>我的K币{{ egold || 0 }}K币</text>
</view>
<view class="ft_24">
解锁每集需要:{{ videoResult.price || 0 }}K币
</view>
</view>
<view class="px-30 mt-22 dykefu_warp" style="width: 100%; display: flex; justify-content: space-between" tt:if="{{videoResult.chackpay === 2 || videoResult.chackpay == 3}}">
<view class="fs-26">
<view class="ft_24">
未解锁集数:{{ videoResult.unlock_data.num || 0 }}
</view>
<view class="fs-26 mr-20" style="color: #000">
<view class="ft_24 mr-20" style="color: #000">
解锁全集消耗:{{ videoResult.unlock_data.total_price || 0 }}K币
</view>
</view>
<view class="px-30 mt-22 dykefu_warp">
<block tt:if="{{platform == 'ios'}}">
<view class="fs-24"> 购买K币1钻=10K币</view>
<view class="ft_24"> 购买K币1钻=10K币</view>
</block>
<block tt:else>
<view class="fs-24"> 购买K币1元=100K币</view>
<view class="ft_24"> 购买K币1元=100K币</view>
</block>
<!-- <view @click="toPathAgreement">-->
<!-- <view class="fs-24" style="color: #fe650f ; text-decoration: underline">-->
<!-- 会员服务协议-->
<!-- </view>-->
<!-- </view>-->
<view bindtap="toPathAgreement">
<view class="ft_24" style="color: #fe650f ; text-decoration: underline">
会员服务协议
</view>
</view>
</view>
<view class="px-30 mt-22 dykefu_warp" tt:if="{{unlockAllFlag}}">
<view>
<block tt:if="{{platform == 'ios'}}">
<view class="fs-24" style="color: #000" tt:if="{{unlockAllFlag}}">
<view class="ft_24" style="color: #000" tt:if="{{unlockAllFlag}}">
解锁全集10钻 ≈ {{ unlockAllKb }} K币
</view>
</block>
<block tt:else>
<view class="fs-24 mr-20" style="color: #000" tt:if="{{unlockAllFlag}}">
<view class="ft_24 mr-20" style="color: #000" tt:if="{{unlockAllFlag}}">
解锁全集1元 ≈ {{ unlockAllKb }} K币
</view>
</block>
</view>
<!-- <view @click="getGouM">-->
<!-- <view class="fs-24" style="color: #fe650f ; text-decoration: underline">-->
<!-- 付费须知-->
<!-- </view>-->
<!-- </view>-->
<!-- <view @click="getGouM">
<view class="ft_24" style="color: #fe650f ; text-decoration: underline">
付费须知
</view>
</view> -->
<button tt:if="{{iosIm}}" open-type="im" data-im-id="{{iosIm}}" class="contact_customer_service">
<view class="contact_custo_ser_icon">
<image src="https://dybxjcapi.jiulingliu.cn/appletStatic/icon/service.png" class="__wa_img_no_radius"></image>
</view>
<view class="contact_custo_ser_txt">联系客服</view>
</button>
</view>
<view class="px-30 mb-18 dykefu_warp">
<!-- <view class="fs-26" tt:if="{{videoResult.chackpay === 2 || videoResult.chackpay == 3}}">-->
<view class="fs-26">
解锁每集需要:{{ videoResult.price || 0 }}K币
</view>
<button tt:if="{{iosIm}}" open-type="im" data-im-id="{{iosIm}}" class="contact_customer_service">
<!-- <view class="contact_custo_ser_icon">-->
<!-- <image src="/static/customer_service.png" class="__wa_img_no_radius"></image>-->
<!-- </view>-->
<view class="contact_custo_ser_txt">联系客服</view>
</button>
</view>
<scroll-view scroll-y class="content" style="height: {{(canIUsePaymentChannel && useBytePayment) ? 400 : 800 }}rpx">
<view class="flex-row d-flex px-30 pt-20 {{(canIUsePaymentChannel && useBytePayment) ? 'pb-20' : 'pb-60'}}" style="flex-wrap: wrap">
<block tt:for="{{payList}}">
<view class="pay_ul {{(index + 1) % 2 === 0 ? 'pl-10':'pr-10'}}" tt:key="{{item.id}}">
<view class="pay_li_class_default {{item.type==1?'pay_li_class_1':item.type==2?'pay_li_class_2':'pay_li_class_4'}}" data-item="{{item}}" data-index="{{index}}" bind:tap="handlePayItem" @click="payItem(item, index)">
<view class="pay_ul {{(index + 1) % 2 === 0 ? 'pl-10':'pr-10'}}" tt:key="{{item.id}}">
<view class="pay_li_class_default {{item.type==1?'pay_li_class_1':item.type==2?'pay_li_class_2':'pay_li_class_4'}}" data-item="{{item}}" data-index="{{index}}" bind:tap="handlePayItem" @click="payItem(item, index)">
<view class="pay_li_cl_one">
<view class="money__it_wa_ti_price">
<view tt:if="{{platform != 'ios'}}" class="money__it_wa_ti_pr_te_icon">
@ -110,14 +109,13 @@
</view>
<view class="pay_li_cl_desc_kb" tt:elif="{{item.type == 1}}">
<view class="pay_li_cl_desc_k_icon">
<image src="https://dyjyjcweb.hunanjj.cn/dy_images/images/coins.png"
mode="scaleToFill" class="k_icon" />
<image src="https://dybxjcapi.jiulingliu.cn/appletStatic/images/coins.png" mode="scaleToFill" class="k_icon" />
</view>
<text class="pay_li_cl_desc_k_num">{{ item.egold }}</text>
<text class="pay_li_cl_desc_k_num mx-4">+</text>
<text class="pay_li_cl_desc_k_num">{{ item.giveegold }}赠币</text>
</view>
<view class="pay_li_cl_description mt-20" tt:elif="{{item.type == 4}}">
<view class="pay_li_cl_description" tt:elif="{{item.type == 4}}">
<view class="pay_li_cl_desc_i">
<view class="pay_li_cl_de_i_text"> 永久解锁全集 </view>
</view>
@ -126,14 +124,14 @@
<view class="pay_li_cl_pos_text">{{ item.poster }}</view>
</view>
<view class="pay_li_cl_hand" tt:if="{{index == action}}">
<image src="https://dyjyjcweb.hunanjj.cn/dy_images/images/followClick.png" mode="scaleToFill" class="hand_icon" />
<image src="https://dybxjcapi.jiulingliu.cn/appletStatic/images/followClick.png" mode="scaleToFill" class="hand_icon" />
</view>
</view>
</view>
</block>
<view class="pay_rule_list">
<view class="pay_rule_li_item">
<block tt:if="{{platform == 'ios'}}">
<block tt:if="{{platform == 'ios'}}">
<text class="pay_rule_li_it_text">1、1钻=10K币k币和会员属于虚拟产品一经购买不可退换</text>
</block>
<block tt:else>
@ -153,14 +151,8 @@
</view>
</scroll-view>
<!--官方支付组件-->
<view tt:if="{{showPaymentChannelSelect}}" style="padding: 0 30rpx 100rpx 30rpx">
<payment-channel-select
sku-list="{{skuList}}"
bind:requestorder="handleRequestOrderByte"
bind:getpaymentresult="handleGetPaymentResult"
bind:error="handleGetPaymentError"
scene="{{platform=='ios' ? 'diamond': 'cash'}}"
>
<view tt:if="{{showPaymentChannelSelect}}" style="padding: 0 30rpx 100rpx 30rpx">
<payment-channel-select sku-list="{{skuList}}" bind:requestorder="handleRequestOrderByte" bind:getpaymentresult="handleGetPaymentResult" bind:error="handleGetPaymentError" scene="{{platform=='ios' ? 'diamond': 'cash'}}">
</payment-channel-select>
</view>
</view>

View File

@ -2,7 +2,10 @@
background-color: rgb(255, 255, 255);
height: 1100rpx;
width: 100%;
overflow: hidden;
border-radius: 12rpx 12rpx 0 0;
}
.content {
width: 750rpx;
/*height: 400rpx;*/
@ -59,58 +62,58 @@ button {
margin-bottom: 40rpx;
}
.pay_li_class_1 {
.money__it_wa_ti_pr_text {
color: #333;
}
.pay_li_class_1 .money__it_wa_ti_pr_text {
color: #333;
}
.money__it_wa_ti_pr_te_icon {
color: #333;
}
.pay_li_class_1 .money__it_wa_ti_pr_te_icon {
color: #333;
}
.pay_li_class_2 .money__it_wa_ti_pr_text {
color: #fff;
}
.pay_li_class_2 .money__it_wa_ti_pr_te_icon {
color: #fff;
}
.pay_li_class_2 .pay_li_cl_poster {
background: linear-gradient(90deg, #705648, #534435);
}
.pay_li_class_2 .pay_li_cl_pos_text {
color: #f1cda3;
}
.pay_li_class_2 {
.money__it_wa_ti_pr_text {
color: #fff;
}
.money__it_wa_ti_pr_te_icon {
color: #fff;
}
.pay_li_cl_poster {
background: linear-gradient(90deg, #705648, #534435);
}
.pay_li_cl_pos_text {
color: #f1cda3;
}
background: url("https://dyjyjcweb.hunanjj.cn/dy_images/images/template_vip.png");
background: url("https://dybxjcapi.jiulingliu.cn/appletStatic/images/template_vip.png");
background-size: 100% 100%;
}
.pay_li_class_4 .money__it_wa_ti_pr_text {
color: #333;
}
.pay_li_class_4 .money__it_wa_ti_pr_te_icon {
color: #333;
}
.pay_li_class_4 {
.money__it_wa_ti_pr_text {
color: #333;
}
.money__it_wa_ti_pr_te_icon {
color: #333;
}
background: url("https://dyjyjcweb.hunanjj.cn/dy_images/images/template_coins.png");
background: url("https://dybxjcapi.jiulingliu.cn/appletStatic/images/template_coins.png");
background-size: 100% 100%;
}
.pay_li_cl_one .pay_li_cl_de_i_text {
font-size: 16rpx;
}
.pay_li_cl_one {
display: flex;
flex-direction: row;
align-items: center;
.pay_li_cl_de_i_text {
font-size: 16rpx;
}
}
.money__it_wa_ti_price {
@ -136,6 +139,7 @@ button {
.pay_li_cl_description {
display: flex;
flex-direction: row;
margin-top: 20rpx;
}
.pay_li_cl_desc_i {
@ -175,16 +179,16 @@ button {
margin-top: 20rpx;
}
.pay_li_cl_desc_k_icon .k_icon {
display: block;
width: 100%;
height: 100%;
}
.pay_li_cl_desc_k_icon {
width: 32rpx;
height: 32rpx;
margin-right: 6rpx;
.k_icon {
display: block;
width: 100%;
height: 100%;
}
}
.pay_li_cl_desc_k_num {
@ -193,25 +197,24 @@ button {
color: #ff562a;
}
.pay_li_cl_hand .hand_icon {
display: block;
width: 100%;
height: 100%;
}
.pay_li_cl_hand {
position: absolute;
top: 66px;
right: -6px;
width: 40px;
height: 42px;
.hand_icon {
display: block;
width: 100%;
height: 100%;
}
}
.pay_rule_li_item {
margin-bottom: 10rpx;
}
.pay_rule_li_it_text {
line-height: 1.5;
font-size: 24rpx;
@ -222,57 +225,75 @@ button {
padding-top: 15px;
padding-bottom: 15px;
}
.px-30 {
padding-left: 15px;
padding-right: 15px;
}
.d-flex {
display: flex !important;
}
.fs-36 {
font-size: 18px !important;
}
.ml-20 {
margin-left: 10px !important;
}
.fs-26 {
font-size: 13px !important;
}
.mt-18 {
margin-top: 9px !important;
}
.mt-22 {
margin-top: 11px !important;
}
.fs-26 {
font-size: 13px !important;
}
.fs-24 {
font-size: 12px !important;
}
.mt-24 {
margin-top: 12px !important;
}
.pl-10{
.pl-10 {
padding-left: 10px !important;
}
.pr-10{
.pr-10 {
padding-right: 10px !important;
}
.pt-40{
.pt-40 {
padding-top: 40px !important;
}
.pt-20{
.pt-20 {
padding-top: 20px !important;
}
.pb-60{
.pb-60 {
padding-bottom: 60px !important;
}
.pb-20{
.pb-20 {
padding-bottom: 20px !important;
}
.contact_customer_service {
display: flex;
align-items: center;
padding: 0;
background: none;
/*background: #ff562a;*/
@ -285,8 +306,10 @@ button {
.contact_custo_ser_icon {
width: 50rpx;
height: 50rpx;
margin-right: 10rpx;
}
.contact_custo_ser_txt {
color: #ff562a;
font-size: 26rpx !important;
font-size: 26rpx !important;
}

View File

@ -1,10 +1,8 @@
import {httpRequest} from "../../utils/httpReques";
import { httpRequest } from "../../utils/httpReques";
const { getPlayletManager }: any = tt;
const {
getPlayletManager
} = tt;
Component({
pm: undefined,
data: {
adBanner: null,
videoAlbumId: null,
@ -12,52 +10,61 @@ Component({
lockStatus: false,
hasSetBackRecommend: false,
hasSetRecommend: false,
pm: null,
adCountdown: 0,
timerAd: null
},
inject: ["adCountdown", "adCountdownShowAd"],
observers: {
// 点击组件 A 的 button 后,触发该监听器的执行
adCountdown(val) {
console.log(val, "5555555adCountdownadCountdown")
this.setData({
adCountdown: val,
})
},
adCountdownShowAd(val) {
console.log(val, "adCountdownShowAd_adCountdownShowAd")
if (val) {
this.adOpen();
}
}
},
ready() {
const pm = getPlayletManager();
this.pm = pm;
pm.onPlay((e) => {
pm.onPlay(() => {
console.log("触发开始播放onPlay回调时间是:", new Date());
this.setData({
lockStatus: false
})
// this.setData({
// lockStatus: false
// })
});
pm.onPause((e) => {
pm.onPause((e: any) => {
console.log('触发暂停播放onPause回调', e)
})
pm.onEnded((e) => {
pm.onEnded((e: any) => {
console.log('触发播放到末尾onEnded回调', e)
})
pm.onError((e) => {
pm.onError((e: any) => {
console.log('触发onError回调', e)
})
// 播放进度变化时
pm.onTimeUpdate((e) => {
pm.onTimeUpdate((e: any) => {
this.playTimeListener(e);
// 播放进度变化时触发,返回当前播放时间点及视频总时长,单位:秒(s)。event.detail = { currentTime, duration }。
})
pm.onChangeEpisode((e) => {
pm.onChangeEpisode((e: any) => {
console.log('切换回调', e)
//当前切换到的集
tt.setStorageSync('currentvideo', {'album_id': e.albumId,episode_id:e.episodeId, seq:e.seq,status: e.status, scene: e.scene});
tt.setStorageSync('currentvideo', { 'album_id': e.albumId, episode_id: e.episodeId, seq: e.seq, status: e.status, scene: e.scene });
//当前切换到的解锁集,播放记录用
if(e.status=='free'){
tt.setStorageSync('lastfreevideo', {'album_id': e.albumId,episode_id:e.episodeId, seq:e.seq,status: e.status, scene: e.scene});
if (e.status == 'free') {
tt.setStorageSync('lastfreevideo', { 'album_id': e.albumId, episode_id: e.episodeId, seq: e.seq, status: e.status, scene: e.scene });
}
let lock = false;
// let watchInfo = tt.getStorageSync('watchInfo')
// if(e.scene =='first_play' && watchInfo?.album_id != e.albumId){
// watchInfo = tt.getStorageSync('watchInfo')
// console.log('1')
// }
// const checklock = watchInfo?.isvip != 0 && (watchInfo?.chackpay == 2 || watchInfo?.chackpay == 3)
// console.log(watchInfo)
// console.log(checklock)
// if(e.status =='lock' || (e.scene =='first_play' && checklock)){
if(e.status =='lock'){
if (e.status == 'lock') {
lock = true;
}
//更新剧集信息
@ -68,30 +75,32 @@ Component({
})
// 在切换到锁定的集 或者 切换了剧(官方完播推荐) 之后,需要刷新数据
const watchInfo = tt.getStorageSync('watchInfo')
if(e.status =='lock' || e.album_id != watchInfo.album_id){
this.emitInfoToParent('change',{album_id: this.data.videoAlbumId,episode_id:this.data.videoEpisodeId})
if (e.status == 'lock' || e.album_id != watchInfo.album_id) {
this.emitInfoToParent('change', { album_id: this.data.videoAlbumId, episode_id: this.data.videoEpisodeId })
}
})
pm.onShareSuccess((res) => {
pm.onShareSuccess((res: any) => {
console.log('shareSuccess-uuuu', res);
})
pm.onShareFail((res) => {
pm.onShareFail((err: any) => {
console.log('shareFail-uuuu', err);
})
pm.onClickUnlock((e) => {
pm.onClickUnlock(() => {
console.log('aaa')
this.adOpen()
})
this.setData({
pm: pm
})
this.adLoad()
},
methods: {
//向父组件传值
emitInfoToParent(val:string,data?:any) {
emitInfoToParent(val: string, data?: any) {
const instance = this.selectOwnerComponent();
instance.emitInfoFromChildren(val,data);
instance.emitInfoFromChildren(val, data);
},
adLoad() {
@ -111,7 +120,7 @@ Component({
// 无合适的广告
break;
default:
// 更多请参考错误码文档
// 更多请参考错误码文档
}
});
@ -119,7 +128,7 @@ Component({
adBanner.onClose((res: any) => {
console.log(res, "resres")
if (res.isEnded) {
this.emitInfoToParent('advunlock',{album_id: this.data.videoAlbumId,episode_id:this.data.videoEpisodeId})
this.emitInfoToParent('advunlock', { album_id: this.data.videoAlbumId, episode_id: this.data.videoEpisodeId })
this.setData({
lockStatus: false
})
@ -149,16 +158,23 @@ Component({
// res: any console.log("视频广告展示");
});
},
hadelAdOpen() {
this.emitInfoToParent('adCountdownChange')
this.adOpen();
},
openPay() {
this.pm.toggleCustomDialog()
const pm: any = this.data.pm;
this.emitInfoToParent('adCountdownChange')
pm.toggleCustomDialog()
},
//播放进度条监听
playTimeListener(e) {
playTimeListener(e: any) {
const pm: any = this.data.pm;
// console.log('eee',e);
// 返回推荐-触发
if (e.currentTime >= 10 && !this.data.hasSetBackRecommend && tt.canIUse('back-recommend')) {
console.log('backReCommend')
this.pm.setRecommendConfig({
pm.setRecommendConfig({
entryType: 2,
switchStatus: true,
});
@ -176,19 +192,19 @@ Component({
}
},
//完播推荐
async reCommend(){
async reCommend() {
const chapterList = tt.getStorageSync('chapterList');
const currentVideo = tt.getStorageSync('currentvideo');
if(!!chapterList && !!currentVideo) {
if (!!chapterList && !!currentVideo) {
const total = this.countChapterListTotal();
if (currentVideo.seq === total) {
let albumId = await this.setNextPart(currentVideo)
// albumId = "7446342228814856730"
let configItem = {
let configItem: any = {
entryType: 1,
switchStatus: true,
}
if(albumId){
if (albumId) {
configItem = {
...configItem,
data: {
@ -202,17 +218,17 @@ Component({
}
},
//原来的拼剧接口
setNextPart(currentVideo){
return new Promise(resolve=>{
setNextPart(currentVideo: any) {
return new Promise((resolve: any) => {
httpRequest('/getNextPart', 'post', {
album_id: currentVideo.album_id,
episode_id: currentVideo.episode_id
}).then((res) => {
}).then((res: any) => {
if (res.album_id) {
resolve(res.album_id)
}
resolve()
}).catch(e=>{
}).catch(() => {
resolve()
})
})
@ -221,15 +237,21 @@ Component({
countChapterListTotal() {
let total = 0;
const chapterList = tt.getStorageSync('chapterList');
if(!chapterList){
if (!chapterList) {
return total;
}
let dataList = [...chapterList.freeList,...chapterList.lockList]
dataList.sort((a, b) => {return +b.end_episode_no - +a.end_episode_no})
if(dataList.length>0){
let dataList = [...chapterList.freeList, ...chapterList.lockList]
dataList.sort((a, b) => { return +b.end_episode_no - +a.end_episode_no })
if (dataList.length > 0) {
total = dataList[0].end_episode_no
}
return total;
},
},
})
detached() {
const is_timerAd = this.data.timerAd;
if (is_timerAd) {
clearInterval(is_timerAd);
}
}
})

View File

@ -1,19 +1,19 @@
<view class="lock-container" tt:if="{{lockStatus}}">
<view style="width: 100%;height: 100%">
<view class="unlock_in_con_wa_operate">
<view class="unlock_in_con_wa_oper_left">
<view class="unlock_in_con_wa_i_vip" bindtap="openPay">
<view class="unlock_in_con_wa_operate">
<view class="unlock_in_con_wa_oper_left">
<view class="unlock_in_con_wa_i_vip" bindtap="openPay">
<text class="unlock_in_con_wa_i_vi_text">免广告解锁</text>
</view>
</view>
<view class="unlock_in_con_wa_oper_right">
<view class="unlock_in_con_wa_i_btn" bindtap="adOpen">
<text class="unlock_in_con_wa_i_tepp">
</view>
<view class="unlock_in_con_wa_oper_right">
<view class="unlock_in_con_wa_i_btn" bindtap="hadelAdOpen">
<block tt:if="{{adCountdown}}">
<text class="unlock_in_con_wa_i_vi_text">{{adCountdown}} 秒之后自动看广告解锁</text>
</block>
<block tt:else>
<text class="unlock_in_con_wa_i_vi_text">看广告解锁</text>
</text>
</view>
<text>{{lockStatuss}}</text>
</view>
</view>
</block>
</view>
</view>
</view>
</view>
</view>

View File

@ -2,62 +2,61 @@
z-index: 0;
/* background-color: yellow; */
bottom: 5rem;
width: 100%;
width: 82%;
position: fixed;
padding: 0 2rem;
display : flex;
flex-direction : row;
padding: 0 20rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.unlock_in_con_wa_oper_left {
width : 45%;
padding-right: 10rpx;
width: 40%;
padding-right: 16rpx;
}
.unlock_in_con_wa_oper_right {
width : 45%;
padding-left: 10rpx;
width: 60%;
padding-left: 16rpx;
}
.unlock_in_con_wa_i_vip {
display : flex;
display: flex;
justify-content: center;
align-items : center;
width : 100%;
height : 68rpx;
background : linear-gradient(87deg, #F7DD60 0%, #FC8704 100%);
border-radius : 34rpx 34rpx 34rpx 34rpx;
padding : 0 32rpx;
align-items: center;
width: 100%;
height: 68rpx;
background: linear-gradient(87deg, #F7DD60 0%, #FC8704 100%);
border-radius: 34rpx 34rpx 34rpx 34rpx;
/* padding: 0 16rpx 0 32rpx; */
}
.unlock_in_con_wa_i_vi_text {
line-height : 68rpx;
font-size : 28rpx;
color : #fff;
line-height: 68rpx;
font-size: 24rpx;
color: #fff;
}
.unlock_in_con_wa_i_btn {
display : flex;
display: flex;
justify-content: center;
align-items : center;
width : 100%;
height : 68rpx;
background : linear-gradient(90deg, #FC8197 0%, #FE830C 100%);
border-radius : 34rpx 34rpx 34rpx 34rpx;
align-items: center;
width: 100%;
height: 68rpx;
background: linear-gradient(90deg, #FC8197 0%, #FE830C 100%);
border-radius: 34rpx 34rpx 34rpx 34rpx;
/* padding : 0 32rpx; */
}
.unlock_in_con_wa_i_text {
display : inline-block;
width : 100%;
line-height : 1;
font-size : 28rpx;
color : #fff;
overflow : hidden;
display: inline-block;
width: 100%;
line-height: 1;
font-size: 28rpx;
color: #fff;
overflow: hidden;
text-overflow: ellipsis;
white-space : nowrap;
text-align: center;
}
white-space: nowrap;
text-align: center;
}

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,9 @@
// e:\project\dy_video_all\dy_iaa_new_project\pages\agreement\agreement.ts
Page({
data: {
},
onLoad: function (options) {
}
})

View File

@ -0,0 +1,337 @@
<view class="_agreement_content">
<!-- <view class="_agreement_title">
VIP会员服务协议
</view> -->
<view class="_agreement_name_t2">
1. 服务条款的接受与修改
</view>
<view class="_agreement_name_text">
1.1
本协议是指VIP会员使用本平台提供的VIP会员服务下称“本服务”所订立的协议下称“本协议”。本协议描述本平台与VIP会员之间关于本服务的使用以及相关方面的权利义务。“VIP会员”或“您”是指完成了成为本平台VIP会员的所有程序即支付VIP会员费用、同意本协议全部内容且在遵守本平台相关规则下使用本平台提供的VIP会员服务的自然人用户简称“您”
</view>
<view class="_agreement_name_text">
1.2
本协议构成您使用本平台所提供的本服务之先决条件,本平台已经以字体加粗或其他合理方式提示您重点阅读协议中相关免除或限制责任条款,双方确认前述条款不属于《民法典》规定的“免除其责任、加重对方责任、排除对方主要权利”条款,您和本平台均认可其合法性及有效性。除非您接受本协议条款,否则您无权使用本服务,您选择使用本服务行为将视为同意接受本协议各项条款及其后续修订条款的约束。
</view>
<view class="_agreement_name_text">
1.3 您的使用行为(包括点击同意、进行下一步操作、支付行为)将视为同意接受本协议内容、有关页面说明或规范流程的约束。
</view>
<view class="_agreement_name_text">
1.4
本平台有权随时对本服务条款进行修改一旦本服务条款发生变更和修改本平台将在相关页面上进行公告如果您不同意本协议的任一修改可以取消已经获取的VIP会员服务并停止使用如果您继续使用本平台提供的VIP会员服务则视为您已经接受本协议的全部修改。
</view>
<view class="_agreement_name_text">
1.5
请您仔细审阅本协议的全部内容并选择是否同意本协议。未成年人应在法定监护人陪同下审阅和履行,未成年人购买本服务、行使和履行本协议项下的权利和义务视为您已获得了法定监护人的认可。您在享受本服务时必须完全、严格遵守本服务协议条款。
</view>
<view class="_agreement_name_t2">
2. 服务说明
</view>
<view class="_agreement_name_text">
2.1
您理解并同意本平台赋予VIP会员一项个人的、非独家的、不可转让、可撤销的、有期限的使用许可即VIP会员仅享有以上产品/服务和软件的有限使用权。本服务将按照其服务条款和操作规则严格执行。VIP会员在享受本服务中任何单项服务时都应当受本协议、有关页面说明或规范流程的约束。
</view>
<view class="_agreement_name_text">
2.2
您应对自身在使用本平台所提供的服务时的一切行为无论是否故意负全部责任。本平台享有对VIP会员在本平台或/及其关联公司提供的服务平台上的一切活动的监督、提示、检查的权利VIP会员的行为违反有关法律法规或违反本协议条款的约定时本平台享有要求其纠正及追究其责任的权利。
</view>
<view class="_agreement_name_text">
2.3
本平台向VIP会员提供的全部服务均仅限于VIP会员在本平台使用任何以恶意破解或其他非法手段将本服务内容与本平台分离的行为均不属于本协议中约定的本平台提供的服务。由此引起的一切法律后果由行为人负责与本平台无关且本平台将依法追究行为人的法律责任。
</view>
<view class="_agreement_name_text">
2.4
您明确了解并同意本平台VIP会员的付费方式为通过第三方支付机构支付您通过此种付费方式付费可能存在一定的商业风险包括但不限于不法分子利用您账户或银行卡等有价卡等进行违法活动该等风险均会给您造成相应的经济损失。您应自行承担向侵权方追究侵权责任和追究责任不能的后果。
</view>
<view class="_agreement_name_text">
2.5 本平台不对您因第三方的行为或不作为造成的损失承担任何责任,包括但不限于支付服务和网络接入服务、任意第三方的侵权行为或其他违法违规行为。
</view>
<view class="_agreement_name_t2">
3. 成为VIP会员的程序
</view>
<view class="_agreement_name_text">
3.1
您可通过各种已有的和未来新增的渠道成为本平台VIP会员。您不得通过以下任何方式为自己或他人申请开通本平台VIP会员否则本平台有权不经通知拒绝申请或撤销相关用户的VIP会员资格并不退还VIP会员服务费或支付其他任何形式的任何赔偿同时本平台有权追究相关的法律责任
</view>
<view class="_agreement_name_text">
1未经过合法授权以营利、经营等非个人使用的目的为自己或他人申请开通本服务
</view>
<view class="_agreement_name_text">
1未经过合法授权以营利、经营等非个人使用的目的为自己或他人申请开通本服务
</view>
<view class="_agreement_name_text">
2通过任何机器人软件、蜘蛛软件、爬虫软件、刷屏软件等任何程序、软件方式非法申请开通本平台VIP会员
</view>
<view class="_agreement_name_text">
3通过非本平台指定的其他方式申请开通本平台VIP会员
</view>
<view class="_agreement_name_text">
4通过侵犯本平台或/及其关联公司或第三方合法权益,或其他不正当的,或违反诚实信用原则的方式,如侵入本平台服务器、通过计算机病毒等方式;
</view>
<view class="_agreement_name_text">
5通过其他违反相关法律、行政法规、国家政策等的方式。
</view>
<view class="_agreement_name_text">
3.2 本平台VIP会员账号所有权归本平台所有VIP会员仅拥有本平台账号的有限使用权。
</view>
<view class="_agreement_name_text">
3.3
本平台仅提供相关的网络服务除此之外与相关网络服务有关的设备如个人电脑、手机、及其他与接入互联网或移动网有关的装置及所需的费用如为接入互联网而支付的电话费及上网费、为使用移动网而支付的手机费均应由VIP会员自行负担。
</view>
<view class="_agreement_name_t2">
4. VIP会员资费
</view>
<view class="_agreement_name_text">
4.1 本平台VIP会员的收费标准主要依据VIP会员开通的期限而确定具体的收费标准以本平台相关服务页面标注的详细资费标价或以实际提供为准。
</view>
<view class="_agreement_name_text">
4.2 用户可通过各种已有和未来新增的支付渠道成为本平台VIP会员包括但不限于通过网银支付、手机支付或第三方支付等现有或今后本平台指定的方式成为VIP会员具体支付渠道仍以本平台实际接受或说明为准
</view>
<view class="_agreement_name_text">
4.3 一旦您成为本平台VIP会员即视为您认可该项服务标明之价格成为本平台VIP会员后该项服务即时生效。
</view>
<view class="_agreement_name_text">
4.4
您理解并同意,本平台有权根据自身运营政策的调整,单方对本服务相关收费依据、标准、方式等进行修改和变更,前述修改、变更,本平台将在相关页面进行展示。您若需要获取、使用本服务,请先提前了解关于本服务的收费依据、标准、方式、权限范围等信息。
</view>
<view class="_agreement_name_text">
4.5 您可以通过登录本平台“个人中心-账户余额-查看详情”页面免费查询您的账号信息详情,包括充值看点、赠送看点、充值订单记录、看点变更记录。
</view>
<view class="_agreement_name_text">
4.6 本平台VIP会员开通后如您在已开通的服务期内中途按本协议约定被终止VIP会员资格的将不获得为开通本服务而支付费用的退还或其他任何形式的补偿/赔偿。
</view>
<view class="_agreement_name_t2">
5. VIP会员权益
</view>
<view class="_agreement_name_text">
5.1 本平台VIP会员权益即本平台为VIP会员提供的专门服务在VIP会员有效期内除开屏广告外您可免费免广告畅享本平台内所有片源。
</view>
<view class="_agreement_name_text">
5.2
您理解并同意本平台有权根据市场情况对VIP会员权益进行全部或部分的变更、取消、增加。前述变更、取消、增加本平台将在相关页面进行展示。您也可通过本平台的相关服务页面查询最新的VIP会员权益内容。同时本平台也鼓励您定期查看本协议内容以更好地保障您的权益。
</view>
<view class="_agreement_name_text">
5.3 VIP会员服务的服务期限以VIP会员自行选择并支付相应VIP会员费用的期限为准。VIP会员服务的服务期限到期后本平台将停止继续向您提供VIP会员服务。
</view>
<view class="_agreement_name_t2">
6. VIP会员的权利与限制
</view>
<view class="_agreement_name_text">
6.1
VIP会员服务仅限于申请账号自行使用VIP会员服务期内不能在本平台账号之间转移禁止赠与、借用、租用、转让或售卖。否则本平台有权在未经通知的情况下取消转让账号、受让账号的VIP会员服务资格由此带来的损失由VIP会员自行承担。
</view>
<view class="_agreement_name_text">
6.2
您成为VIP会员后可能会由于您使用的软件版本、设备、操作系统等不同以及其他第三方原因等导致实际可使用的具体权益或服务有差别由此可能给您带来的不便您表示理解且不予追究或者豁免本平台的相关责任。本平台建议您可以通过升级应用程序或操作系统版本、更换使用设备等方式来尝试解决或者直接通过本协议文末的联系方式与本平台联系进行解决。
</view>
<view class="_agreement_name_text">
6.3
用户不得以盗窃、利用系统漏洞等非法途径以及在未获本平台授权的非法销售、转让本平台VIP会员的网站或其他渠道上获取或购买VIP会员服务资格否则本平台有权取消VIP会员的服务资格。由此引发的问题由用户自行承担本平台不负任何责任。同时本平台在此申明本平台从未授权任何第三方单位或个人销售、转让本平台VIP会员资格任何未经本平台明示授权而销售、转让本平台VIP会员资格的行为属于非法销售、非法转让本平台有权追究其法律责任。
</view>
<view class="_agreement_name_text">
6.4 VIP会员承诺在任何情况下均不得发表、行使任何不利于本平台或/及其关联公司的言论和行为,包括但不限于通过微信、微博、采访、稿件等任何渠道及方式对本平台或/及其关联公司品牌、声誉造成不利影响。
</view>
<view class="_agreement_name_text">
6.5 被取消VIP会员资格的VIP会员不能再参加由本平台针对VIP会员组织的活动并不可再享有由本平台提供的各项VIP会员优惠及增值服务即不再享有VIP会员权利。
</view>
<view class="_agreement_name_text">
6.6 本平台提供的VIP会员服务内容、VIP会员不得用于商业、盈利或者其他侵犯本平台或/及其关联公司合法权益(无论其是否是收费的)等用途,只可供私人观看。
</view>
<view class="_agreement_name_text">
6.7
除非本平台提前书面许可禁止复制、下载、上传、修改、编目排序、翻译、发行、开发、转让、销售、展示、传播VIP会员服务提供的作品禁止合成、嵌套、链接VIP会员服务提供的作品禁止利用VIP会员服务提供的作品及其片段进行创作衍生作品、进行教学或研究、进行商业开发或推广禁止以商业目的使用VIP会员服务提供的作品等包括下列情况
</view>
<view class="_agreement_name_text">
1通过非法手段对VIP会员账户的服务期限、消费金额、交易状态进行修改或用非法的方式或为了非法的目的使用已购买的VIP会员服务提供的作品
</view>
<view class="_agreement_name_text">
2将您的本平台VIP会员账户有偿或无偿提供给任何第三人并允许他人通过您的账户观看非他人付费购买的VIP会员服务提供的作品
</view>
<view class="_agreement_name_text">
3将VIP会员服务提供的作品复制、销售、出租或授权给任何第三方。
</view>
<view class="_agreement_name_text">
4主动对本平台用于保护VIP会员服务提供的作品的任何安全措施技术进行破解、更改、反操作、破坏或其他篡改或协助他人进行上述行为
</view>
<view class="_agreement_name_text">
5通过非本平台认可的方式获得VIP会员服务提供的作品或者删除VIP会员服务提供的作品上的任何所有权声明或标签
</view>
<view class="_agreement_name_text">
6不会采用收费或免费的方式全部或部分在任何公开场合展示VIP会员服务提供的作品除非您的上述行为不会构成侵权或者取得了合法授权
</view>
<view class="_agreement_name_text">
7损害第三方利益通过本平台收集第三方资料信息破坏或盗取第三方账号发送诈骗邮件和垃圾邮件等非法信息侵犯第三方合法权益包括但不限于隐私权、知识产权、财产权等
</view>
<view class="_agreement_name_text">
8其他未经本平台明示授权许可的行为。
</view>
<view class="_agreement_name_text">
6.8
如VIP会员出现任何违反国家法律法规或监管政策的、违反本协议或本平台相关使用规则的行为的或本平台认为VIP会员行为有损本平台或/及其关联公司的声誉、利益的,本平台有权独立决定单独或同时采取以下一项或多项措施进行处理:
</view>
<view class="_agreement_name_text">
1无需通知而中断或终止部分或全部VIP会员权益或服务以及取消本平台VIP会员账户和使用权限并不予任何赔偿或退还任何VIP会员服务费
</view>
<view class="_agreement_name_text">
2如VIP会员的违约行为使本平台或/及其关联公司遭受损失的包括但不限于直接经济损失、商誉损失及对外支付的赔偿金、和解费、律师费、诉讼费等间接经济损失VIP会员应当承担全部损失赔偿责任并在本平台要求的时限内支付费用完毕。
</view>
<view class="_agreement_name_text">
6.9 VIP会员在使用本平台所提供的服务时如遭受任何人身或财产的损失、损害或伤害除法律规定的责任外不论原因如何本平台或/及其关联公司均不负责任。
</view>
<view class="_agreement_name_text">
6.10 在您开通本平台VIP会员服务后您有权利选择不继续接受本VIP会员服务您可申请取消本VIP会员服务但您无法获得已经支付的费用的退还或任何补偿/赔偿,除非法律规定或者本平台与您另有约定。
</view>
<view class="_agreement_name_t2">
7. 协议的变更
</view>
<view class="_agreement_name_text">
7.1
本平台依据本协议的约定变更服务内容、服务方式以及本协议内容如果VIP会员不同意本平台的以上任何变更有权选择取消并停止使用已经获取的对应的全部或部分服务如果在本平台进行上述变更且变更生效后VIP会员仍继续使用本平台提供的上述服务则视为VIP会员已经接受本平台的上述调整的全部内容。
</view>
<view class="_agreement_name_text">
7.2 本平台对本协议一旦进行修改将在页面上或其他适当的位置公示修改的内容。一经公示即视为已成功通知各VIP会员。
</view>
<view class="_agreement_name_text">
7.3
VIP会员如果不同意条款的修改可主动向本平台提出终止VIP会员服务但本平台不退还自开通VIP会员服务至实际终止VIP会员服务所在月的已享受VIP会员服务的部分费用如果VIP会员继续享用VIP会员服务则视为VIP会员已经接受条款的修改。
</view>
<view class="_agreement_name_t2">
8. 服务的中断和终止
</view>
<view class="_agreement_name_text">
8.1
因发生本平台不可抗拒的事由如政府行为、不可抗力鉴于互联网之特殊性质不可抗力亦包括黑客攻击、电信部门技术调整导致之重大影响、因政府管制而造成之暂时关闭、病毒侵袭等影响互联网正常运行之情形导致VIP会员服务无法继续本平台会以最快的速度通知VIP会员。
</view>
<view class="_agreement_name_text">
8.2 VIP会员服务提供的服务期限中包含本平台解决故障、服务器维修、调整、升级等所需用的合理时间对上述情况所需用的时间或造成的任何损失如有本平台不予任何补偿但本平台会尽可能事先进行公告。
</view>
<view class="_agreement_name_text">
8.3 无论因何原因导致VIP会员服务的中断或终止本平台有权进行如下处理
</view>
<view class="_agreement_name_text">
1除法律法规另有规定或者本平台与您另有约定外本平台已收取的费用不予退还
</view>
<view class="_agreement_name_text">
2用户已经产生但未使用的VIP会员权益自动清除且不折现
</view>
<view class="_agreement_name_text">
3如因用户违约导致VIP会员服务中断或终止的本平台有权视情况要求用户承担相应的违约责任。
</view>
<view class="_agreement_name_t2">
9. 未成年人条款和隐私政策
</view>
<view class="_agreement_name_text">
9.1 本平台非常注重未成年人的保护。若用户未满18周岁则为未成年人应在监护人监护、指导下阅读本协议和使用本服务。
</view>
<view class="_agreement_name_text">
9.2
监护人应指导子女上网应该注意的安全问题防患于未然。若监护人同意未成年人使用本平台提供的本服务必须以监护人名义申请消费并对未成年人使用本VIP会员服务进行正确引导、监督。未成年人行使和履行本协议项下的权利和义务即视为已获得了监护人的认可。
</view>
<view class="_agreement_name_text">
9.3 本平台提醒未成年人用户在使用本VIP会员服务时要善于网上学习认清网络世界与现实世界的区别避免沉迷于网络影响日常的学习生活。
</view>
<view class="_agreement_name_text">
10. 通知
为便于您获知本平台相关信息,您同意本平台有权通过网页公示、页面提示、弹窗、消息通知、公众号通知、用户预留手机短信中的一种或多种进行通知,该通知自本平台发送之日视为已送达用户。如多种通知方式并存的,则送达时间以上述方式中最早发送之时为准。
</view>
<view class="_agreement_name_t2">
11. 法律的适用和管辖
</view>
<view class="_agreement_name_text">
11.1 本服务条款的生效、履行、解释及争议的解决均适用中华人民共和国法律,本服务条款因与中华人民共和国现行法律相抵触而导致部分无效,不影响其他部分的效力。
</view>
<view class="_agreement_name_text">
11.2 如就本协议内容或其执行发生任何争议,应尽量友好协商解决;协商不成时,任何一方均可向北京仲裁委委员会提起仲裁。
</view>
<view class="_agreement_name_t2">
12. 其他
</view>
<view class="_agreement_name_text">
12.1 如您对本《VIP会员服务协议》或使用本平台的VIP会员服务相关的事宜有任何问题包括问题咨询、投诉等请通过功能页面的帮助反馈入口或在线客服电话 400-118-0066
与本平台联系,本平台会在收到您的意见、建议后尽快向您回复。
</view>
<view class="_agreement_name_text">
12.2 本平台未行使或延迟行使其在本协议项下的权利并不构成对这些权利的放弃,而单一或部分行使其在本协议项下的任何权利并不排斥其任何其它权利的行使。本平台随时有权要求您继续履行义务并承担相应的违约责任。
</view>
<view class="_agreement_name_text">
12.3 本协议的标题仅为方便及阅读而设,并不影响正文其中任何规定的含义或解释。
</view>
<view class="_agreement_name_text">
本版更新时间2023年12月5日
</view>
</view>

View File

@ -0,0 +1,29 @@
._agreement_html {
padding: 40rpx 40rpx 0;
width: 100%;
height: 100vh;
box-sizing: border-box;
}
._agreement_content {
padding: 32rpx;
}
._agreement_title {
font-size: 36rpx;
color: #fff;
margin-top: 20rpx;
}
._agreement_name_t2 {
font-size: 30rpx;
color: #fff;
margin-top: 20rpx;
}
._agreement_name_text {
margin-top: 16rpx;
font-size: 24rpx;
color: #999;
line-height: 1.5;
}

View File

@ -1,9 +1,9 @@
import {httpRequest} from "../../utils/httpReques";
import { httpRequest } from "../../utils/httpReques";
const {
PlayletExtension,
getPlayletManager
} = tt;
}: any = tt;
// 可以使用tt.canIUse('PlayletExtension')判断是否可用不可用可调用tt.navigateTo等跳转离开
@ -11,29 +11,57 @@ PlayletExtension({
pm: undefined,
options: undefined,
data: {
watchInfo: null,
watchInfo: {},
nextbatchList: [],
adCountdown: 0,
adCountdownShowAd: false,
timerAd: null
},
provide() {
// 返回值就是要提供的数据, 初始化数据, 不会监听变动
return {
adCountdown: this.data.adCountdown,
adCountdownShowAd: this.data.adCountdownShowAd,
};
},
methods: {
//监听player的值
emitInfoFromChildren(val,data) {
emitInfoFromChildren(val, data) {
console.log('收到消息', val)
console.log('收到消息', data)
if(val=="advunlock"){
this.init('advunlock',data)
if (val == "advunlock") {
this.init('advunlock', data)
}
if(val=="change"){
this.init('change',data)
if (val == "change") {
this.init('change', data)
}
if (val == 'adCountdownChange') {
console.log(val, "adCountdownChange")
const is_timerAd = this.data.timerAd;
clearInterval(is_timerAd);
const chapterCatalog = getApp().globalData.chapterCatalog;
this.pm.setCatalog({
freeList: chapterCatalog.freeList,
lockList: chapterCatalog.lockList
})
this.setData({
adCountdown: 0,
adCountdownShowAd: false
})
this.setProvide({
adCountdown: 0,
adCountdownShowAd: false
});
}
},
//监听charge的值
emitChargeInfoFromChildren(val,data) {
emitChargeInfoFromChildren(val, data) {
console.log('收到消息', val)
console.log('收到消息', data)
console.log(val=="charge"&& data == "success")
if(val=="charge"&& data == "success"){
console.log(val == "charge" && data == "success")
if (val == "charge" && data == "success") {
const data = tt.getStorageSync('currentvideo')
this.init('charge',data)
this.init('charge', data)
}
},
onLoad(options) {
@ -76,11 +104,11 @@ PlayletExtension({
//播放器分享按钮
this.pm.onTapShare((e) => {
console.log(`/pages/videoByte/videoByte?is_continue=0&tt_album_id=${ this.data?.watchInfo?.album_id}&tt_episode_id=${ this.data?.watchInfo?.episode_id}&tid=${ this.options?.tid || ""}&launchsite=${ this.options?.launchsite || ""}`)
console.log(`/pages/videoByte/videoByte?is_continue=0&tt_album_id=${this.data?.watchInfo?.album_id}&tt_episode_id=${this.data?.watchInfo?.episode_id}&tid=${this.options?.tid || ""}&launchsite=${this.options?.launchsite || ""}`)
return { // 分享数据
title: "古言剧场",
desc: "精彩剧情,尽在古言剧场",
path: `/pages/videoByte/videoByte?is_continue=0&tt_album_id=${ this.data?.watchInfo?.album_id}&tt_episode_id=${ this.data?.watchInfo?.episode_id}&tid=${ this.options?.tid || ""}&launchsite=${ this.options?.launchsite || ""}`,
path: `/pages/videoByte/videoByte?is_continue=0&tt_album_id=${this.data?.watchInfo?.album_id}&tt_episode_id=${this.data?.watchInfo?.episode_id}&tid=${this.options?.tid || ""}&launchsite=${this.options?.launchsite || ""}`,
imageUrl: this.data?.watchInfo?.cover,
}
})
@ -97,7 +125,7 @@ PlayletExtension({
shareParam: { // 分享数据
title: "古言剧场",
desc: "精彩剧情,尽在古言剧场",
path: `/pages/videoByte/videoByte?is_continue=0&tt_album_id=${ this.data?.watchInfo?.album_id}&tt_episode_id=${ this.data?.watchInfo?.episode_id}&tid=${ this.options?.tid || ""}&launchsite=${ this.options?.launchsite || ""}`,
path: `/pages/videoByte/videoByte?is_continue=0&tt_album_id=${this.data?.watchInfo?.album_id}&tt_episode_id=${this.data?.watchInfo?.episode_id}&tid=${this.options?.tid || ""}&launchsite=${this.options?.launchsite || ""}`,
imageUrl: this.data?.watchInfo?.cover,
}
// title: this.watchInfo.title,
@ -109,8 +137,8 @@ PlayletExtension({
this.init();
},
async init(status?:string,data?:any) {
console.log("data",data)
async init(status?: string, data?: any) {
console.log("data", data)
let params = {
...this.options,
album_id: !!data ? data.album_id : this.options.tt_album_id,
@ -123,30 +151,89 @@ PlayletExtension({
}
console.log('params', params)
//初始化目录
const res = await httpRequest('/douyinNewRead', 'post', params);
const res: any = await httpRequest('/douyinNewRead', 'post', params);
//添加历史记录时,后面不用执行了
if(status == 'addhistory') {
if (status == 'addhistory') {
return
}
//设置剧集上锁状态
const _freeList = res.data.freelist != null ? res.data.freelist : []
const _lockList = res.data.locklist != null ? res.data.locklist : []
console.log('res',res);
this.pm.setCatalog({
freeList: _freeList,
lockList: _lockList
})
const _watchinfo = {
const _freeList = res.data.freelist != null ? res.data.freelist : [];
const _lockList = res.data.locklist != null ? res.data.locklist : [];
const _watchinfo: any = {
...res.data.library,
...res.data.video,
...res.data.read_data
}
this.setData({
watchInfo: _watchinfo
// const adCountdown = _watchinfo.adCountdown
let adCountdown = 0;
let localFreeList = _freeList;
let localLockList = _lockList;
let timerAd = null;
const is_timerAd_a = this.data.timerAd;
if (_watchinfo.adCountdown && (_watchinfo.chackpay == 2 || _watchinfo.isvip == 1)) {
adCountdown = _watchinfo.adCountdown;
// adCountdown = 20;
//本地设置本集免费,与免费试看相关
localFreeList = [..._freeList, { start_episode_no: _watchinfo.order, end_episode_no: _watchinfo.order }]
localLockList = _lockList.filter((ite: any) => ite.start_episode_no != _watchinfo.order)
if (is_timerAd_a) {
clearInterval(is_timerAd_a);
}
timerAd = setInterval(() => {
const adCountdown = this.data.adCountdown;
const is_timerAd = this.data.timerAd;
if (adCountdown <= 1) {
clearInterval(is_timerAd);
const chapterCatalog = getApp().globalData.chapterCatalog;
this.pm.setCatalog({
freeList: chapterCatalog.freeList,
lockList: chapterCatalog.lockList
})
this.setData({
adCountdown: 0,
adCountdownShowAd: true
})
this.setProvide({
adCountdown: 0,
adCountdownShowAd: true
});
} else {
this.setData({
adCountdown: adCountdown - 1,
})
this.setProvide({
adCountdown: adCountdown - 1,
});
}
}, 1000);
}
this.pm.setCatalog({
freeList: localFreeList,
lockList: localLockList
})
this.setData({
watchInfo: _watchinfo,
adCountdown: adCountdown,
timerAd: timerAd,
adCountdownShowAd: false
})
this.setProvide({
adCountdown: adCountdown,
adCountdownShowAd: false
});
tt.setStorageSync('watchInfo', _watchinfo);
const _chapterList = { freeList: _freeList, lockList: _lockList }
tt.setStorageSync('chapterList', _chapterList);
getApp().globalData.chapterCatalog = _chapterList;
},
},
@ -167,8 +254,13 @@ PlayletExtension({
detached() {
console.log('detached')
const lastfreevideo = tt.getStorageSync('lastfreevideo')
if(lastfreevideo.status == 'free'){
this.init('addhistory',lastfreevideo)
if (lastfreevideo.status == 'free') {
this.init('addhistory', lastfreevideo)
}
const is_timerAd = this.data.timerAd;
if (is_timerAd) {
clearInterval(is_timerAd);
}
},
},

View File

@ -21,7 +21,7 @@
},
"include": [
"./**/*.ts"
],
, "pages/videoByte/videoByte.ts" ],
"exclude": [
"node_modules"
]