修改
This commit is contained in:
parent
f402dbfd8a
commit
e7c729b713
3
app.json
3
app.json
@ -10,7 +10,6 @@
|
|||||||
"pages/give/give",
|
"pages/give/give",
|
||||||
"pages/purchaseNotes/purchaseNotes",
|
"pages/purchaseNotes/purchaseNotes",
|
||||||
"pages/video/video",
|
"pages/video/video",
|
||||||
"pages/recharge/recharge",
|
|
||||||
"pages/videoAndroid/videoAndroid"
|
"pages/videoAndroid/videoAndroid"
|
||||||
],
|
],
|
||||||
"plugins": {
|
"plugins": {
|
||||||
@ -41,7 +40,7 @@
|
|||||||
"activeIcon": "/static/tabbar/playlet_on.png"
|
"activeIcon": "/static/tabbar/playlet_on.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "壁纸",
|
"name": "发现",
|
||||||
"pagePath": "pages/discover/discover",
|
"pagePath": "pages/discover/discover",
|
||||||
"icon": "/static/tabbar/discover_off.png",
|
"icon": "/static/tabbar/discover_off.png",
|
||||||
"activeIcon": "/static/tabbar/discover_on.png"
|
"activeIcon": "/static/tabbar/discover_on.png"
|
||||||
|
@ -1,16 +1,148 @@
|
|||||||
|
|
||||||
|
|
||||||
|
page {
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
}
|
||||||
|
|
||||||
._discover_list {
|
._discover_list {
|
||||||
width: 100%;
|
padding: 30rpx 30rpx;
|
||||||
padding: 30rpx;
|
background-color: #f5f5f5;
|
||||||
}
|
}
|
||||||
|
|
||||||
._discover_li_item {
|
._discover_list_item {
|
||||||
width: 100%;
|
position: relative;
|
||||||
height: 800rpx;
|
width: 100%;
|
||||||
margin-bottom: 30rpx;
|
height: 958rpx;
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
._discover_li_item ._it_img{
|
._discover_list_item:last-child {
|
||||||
display: block;
|
margin-bottom: 0;
|
||||||
width: 100%;
|
}
|
||||||
height: 100%;
|
|
||||||
|
._discover_li_it_cover {
|
||||||
|
position: absolute;
|
||||||
|
top:0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 720rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
._discover_li_it_cover ._li_it_cover_img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 10rpx 10rpx 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
._discover_li_it_play {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
background-color: rgba(0, 0, 0, 0.45);
|
||||||
|
border-radius: 50%;
|
||||||
|
transform: translate(-50%,-50%);
|
||||||
|
border: 1rpx solid #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
._li_it_play_icon {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
margin-left: 4rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
._li_it_play_icon .v_s_img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
._discover_li_it_info {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
/* height: 258rpx; */
|
||||||
|
height: 332rpx;
|
||||||
|
padding: 120rpx 20rpx 40rpx;
|
||||||
|
/* background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #ffffff 22%); */
|
||||||
|
background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 30%);
|
||||||
|
/* box-shadow: 0 -80rpx 20rpx 0 rgba(255, 255, 255, 0.3); */
|
||||||
|
/* margin-top: 60rpx; */
|
||||||
|
border-radius: 0 0 10rpx 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
._li_it_info_header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
._info_header_title {
|
||||||
|
width: 60%;
|
||||||
|
line-height: 1;
|
||||||
|
font-size: 44rpx;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #1a1a1a;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
._info_header_num {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
._info_header_num_icon {
|
||||||
|
width: 36rpx;
|
||||||
|
height: 36rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.__num_icon_img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
._info__num_text {
|
||||||
|
margin-left: 8rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
._li_it_info_description {
|
||||||
|
font-size: 26rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #999999;
|
||||||
|
line-height: 56rpx;
|
||||||
|
margin-top: 16rpx;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
word-break: break-all;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
._discover_footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
._discover_footer_loading {
|
||||||
|
margin-left: 16rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #999;
|
||||||
|
margin-top: -4rpx;
|
||||||
}
|
}
|
@ -1,11 +1,54 @@
|
|||||||
<view class="_discover_page_html">
|
<view class="_discover_html">
|
||||||
<view class="_discover_page_body">
|
<view class="_discover_body">
|
||||||
<view class="_discover_list">
|
<view class="_discover_list">
|
||||||
<block a:for="{{disvoverList}}">
|
|
||||||
<view class="_discover_li_item" a:key="{{item.id}}">
|
<block a:for={{discoverList}}>
|
||||||
<image mode="scaleToFill" src="{{item.url}}" lazy-load="{{true}}" class="_it_img" />
|
<view class="_discover_list_item">
|
||||||
|
<view class="_discover_li_it_cover">
|
||||||
|
<image class="_li_it_cover_img" lazy-load={{true}} mode="aspectFill" src={{item.cover}} />
|
||||||
|
<view class="_discover_li_it_play" catchTap="toPathVideo" data-item={{item}}>
|
||||||
|
<view class="_li_it_play_icon">
|
||||||
|
<image mode="scaleToFill" class="v_s_img" src="{{imageBasUrl}}/iamge/android_play_icon.png" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="_discover_li_it_info">
|
||||||
|
<view class="_li_it_info_header">
|
||||||
|
<view class="_info_header_title">{{item.name}}</view>
|
||||||
|
<view class="_info_header_num">
|
||||||
|
<view class="_info_header_num_icon" onTap="chaseCollection" data-item={{item}} data-idx={{index}}>
|
||||||
|
<block a:if={{item.collection === 0}}>
|
||||||
|
<image class="__num_icon_img" mode="scaleToFill" src="https://diyyhdapi.qinjiu8.com/webimg/icon/attention.png" />
|
||||||
|
</block>
|
||||||
|
<block a:else>
|
||||||
|
<image class="__num_icon_img" mode="scaleToFill" src="https://diyyhdapi.qinjiu8.com/webimg/icon/attention-on.png" />
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
<view class="_info__num_text">{{item.num}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="_li_it_info_description">
|
||||||
|
{{ item.description || '' }}
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
|
<block a:if={{!noDataFlag}}>
|
||||||
|
<view class="_discover_footer">
|
||||||
|
<icon type="loading" />
|
||||||
|
<view class="_discover_footer_loading">加载中...</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
<block a:else>
|
||||||
|
<view class="_discover_footer">
|
||||||
|
<view class="_discover_footer_loading">我是有底线的哦~</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
@ -1,45 +1,124 @@
|
|||||||
|
|
||||||
const { httpRequest } = getApp();
|
const { httpRequest } = getApp();
|
||||||
|
import { imageBasUrl } from '../../utils/config'
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
disvoverList: [],
|
discoverList: [],
|
||||||
page: 1
|
noDataFlag: false,
|
||||||
|
page: 1,
|
||||||
|
imageBasUrl,
|
||||||
},
|
},
|
||||||
onShow() {
|
|
||||||
const page = this.data.page;
|
getFindIndex(page, show, refresh) {
|
||||||
this.isWallpaper(page);
|
|
||||||
},
|
const discoverList = this.data.discoverList;
|
||||||
isWallpaper(page) {
|
|
||||||
const disvoverList = this.data.disvoverList;
|
if (!show) {
|
||||||
|
my.showLoading({
|
||||||
|
content: '加载中...',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const paramenter = {
|
const paramenter = {
|
||||||
path: '/wallpaper',
|
path: '/findindex',
|
||||||
method: 'GET',
|
method: 'POST',
|
||||||
params: {
|
body: {
|
||||||
page: page
|
page
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
httpRequest(paramenter).then(res => {
|
httpRequest(paramenter).then(res => {
|
||||||
console.log(res, "wallpaper")
|
my.hideLoading();
|
||||||
if (res.status == 1) {
|
if (refresh) {
|
||||||
if (page == 1) {
|
my.stopPullDownRefresh();
|
||||||
this.setData({
|
}
|
||||||
disvoverList: res.list,
|
|
||||||
})
|
if (res.status == 1 && Array.isArray(res.data.module1)) {
|
||||||
} else {
|
const module1 = res.data.module1;
|
||||||
this.setData({
|
let ls = [];
|
||||||
disvoverList: [...disvoverList, ...res.list],
|
let noDataFlag = false;
|
||||||
})
|
if (module1.length == 0) {
|
||||||
|
noDataFlag = true;
|
||||||
}
|
}
|
||||||
|
if (page == 1) {
|
||||||
|
ls = module1;
|
||||||
|
} else {
|
||||||
|
ls = [...discoverList, ...module1];
|
||||||
|
}
|
||||||
|
this.setData({
|
||||||
|
discoverList: ls,
|
||||||
|
page,
|
||||||
|
noDataFlag,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
|
||||||
// 页面被拉到底部
|
onShow() {
|
||||||
console.log("========")
|
this.getFindIndex(1)
|
||||||
const page = this.data.page;
|
|
||||||
this.isWallpaper(page);
|
|
||||||
this.setData({
|
|
||||||
page: page + 1
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onReachBottom() {
|
||||||
|
const page = this.data.page;
|
||||||
|
const noDataFlag = this.data.noDataFlag;
|
||||||
|
if (!noDataFlag) {
|
||||||
|
this.getFindIndex(page + 1)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.getFindIndex(1, false, true)
|
||||||
|
},
|
||||||
|
|
||||||
|
chaseCollection(ev) {
|
||||||
|
let params = {};
|
||||||
|
const item = ev.currentTarget.dataset.item;
|
||||||
|
const idx = ev.currentTarget.dataset.idx;
|
||||||
|
const discoverList = this.data.discoverList;
|
||||||
|
if (item.collection === 0) {
|
||||||
|
params = {
|
||||||
|
path: '/addkeep',
|
||||||
|
method: 'POST',
|
||||||
|
body: {
|
||||||
|
sid: item.id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
params = {
|
||||||
|
path: '/chasingdramadel',
|
||||||
|
method: 'POST',
|
||||||
|
body: {
|
||||||
|
ids: item.id,
|
||||||
|
sid: item.id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
discoverList[idx].collection = item.collection === 0 ? 1 : 0;
|
||||||
|
discoverList[idx].num = item.collection === 0 ? item.num + 1 : item.num - 1;
|
||||||
|
|
||||||
|
httpRequest(params).then((res) => {
|
||||||
|
this.setData({
|
||||||
|
discoverList
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
toPathVideo(event) {
|
||||||
|
const data = event.target.dataset.item;
|
||||||
|
const systemInfo = getApp().globalData.systemInfo;
|
||||||
|
if (systemInfo.platform == 'android' || systemInfo.platform == 'Android') {
|
||||||
|
my.navigateTo({
|
||||||
|
url: `/pages/videoAndroid/videoAndroid?sid=${data.id}`,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
my.navigateTo({
|
||||||
|
url: `/pages/video/video?sid=${data.id}`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"defaultTitle": "壁纸"
|
"pullRefresh": true
|
||||||
}
|
}
|
@ -1,126 +0,0 @@
|
|||||||
._recharge_html {
|
|
||||||
flex: 1;
|
|
||||||
padding: 40rpx;
|
|
||||||
/* background-color: #fff; */
|
|
||||||
padding-bottom: calc(140rpx + constant(safe-area-inset-bottom));
|
|
||||||
padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
|
|
||||||
}
|
|
||||||
|
|
||||||
._recharge_step_one {
|
|
||||||
padding: 20rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 16rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
._recharge_describe {
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
._recharge_balance {
|
|
||||||
display: flex;
|
|
||||||
margin-top: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
._recharge_balance_name {
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
._recharge_balance_num {
|
|
||||||
font-size: 28rpx;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
._recharge_step_two {
|
|
||||||
padding: 20rpx 0 20rpx 20rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 16rpx;
|
|
||||||
margin-top: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
._recharge_template_header {
|
|
||||||
padding-right: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
._recharge_te_he_name {
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
._recharge_template_list {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
._recharge_te_li_item {
|
|
||||||
width: 50%;
|
|
||||||
padding-right: 20rpx;
|
|
||||||
margin-top: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
._recharge_te_li_it_warp {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
width: 100%;
|
|
||||||
height: 200rpx;
|
|
||||||
background-color: #f9f9f9;
|
|
||||||
border-radius: 16rpx;
|
|
||||||
border: 2rpx solid transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
._recharge_te_li_it_warp.active {
|
|
||||||
border-color: #EA6A4E;
|
|
||||||
background-color:rgba(245, 107, 95, 0.2) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
._re_amount_text {
|
|
||||||
font-size: 36rpx;
|
|
||||||
line-height: 1;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
._re_amount_coin {
|
|
||||||
margin-top: 16rpx;
|
|
||||||
font-size: 26rpx;
|
|
||||||
color: #999;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
._re_amount_give {
|
|
||||||
margin-top: 16rpx;
|
|
||||||
font-size: 26rpx;
|
|
||||||
color: #999;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
._recharge_notice_text {
|
|
||||||
font-size: 26rpx;
|
|
||||||
color: #333;
|
|
||||||
line-height: 1.6;
|
|
||||||
margin-top: 16rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
._recharge_btn_warp {
|
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
padding-bottom: constant(safe-area-inset-bottom);
|
|
||||||
padding-bottom: env(safe-area-inset-bottom);
|
|
||||||
background-color:#E94E41 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
._recharge_btn {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
width: 100%;
|
|
||||||
height: 100rpx;
|
|
||||||
background-color:#E94E41 ;
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
@ -1,54 +0,0 @@
|
|||||||
<view class="_recharge_html">
|
|
||||||
<view class="_recharge_step_one">
|
|
||||||
<view class="_recharge_describe">
|
|
||||||
创作不易,支持作者
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="_recharge_balance">
|
|
||||||
<view class="_recharge_balance_name">我的K币:</view>
|
|
||||||
<view class="_recharge_balance_num">
|
|
||||||
{{coinNum}} K币
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="_recharge_step_two">
|
|
||||||
<view class="_recharge_template_header">
|
|
||||||
<view class="_recharge_te_he_name">
|
|
||||||
请选择充值金额
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="_recharge_template_list">
|
|
||||||
<block a:for={{5}}>
|
|
||||||
<view class="_recharge_te_li_item" key={{index}}>
|
|
||||||
<view class="_recharge_te_li_it_warp {{tempIndex == index ? 'active':''}}" onTap="selectPayTem" data-idx={{index}}>
|
|
||||||
<view class="_re_amount_text">199元</view>
|
|
||||||
<view class="_re_amount_coin">37621K币</view>
|
|
||||||
<view class="_re_amount_give">多增送20元K币</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</block>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="_recharge_step_two">
|
|
||||||
<view class="_recharge_template_header">
|
|
||||||
<view class="_recharge_te_he_name">
|
|
||||||
购买须知
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="_recharge_notice_text"> 1、k币和会员属于虚拟产品,一经购买不可退换</view>
|
|
||||||
<view class="_recharge_notice_text"> 2、未满18岁的未成年人需要在监护人主导、同意下进行相关付费操作。</view>
|
|
||||||
<view class="_recharge_notice_text"> 3、{{userInfo.giftTime}}</view>
|
|
||||||
<view class="_recharge_notice_text"> 4、充值K币一般在10分钟内到账,如未到账请在“我的”页面联系客服</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="_recharge_btn_warp">
|
|
||||||
<view class="_recharge_btn">
|
|
||||||
立即充值
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
@ -1,17 +0,0 @@
|
|||||||
Page({
|
|
||||||
data: {
|
|
||||||
coinNum: 0,
|
|
||||||
tempIndex: 0,
|
|
||||||
userInfo: {}
|
|
||||||
},
|
|
||||||
onLoad(query) {
|
|
||||||
console.log('page onLoad', query)
|
|
||||||
},
|
|
||||||
onShow() { },
|
|
||||||
selectPayTem(ev) {
|
|
||||||
const idx = ev.target.dataset.idx;
|
|
||||||
this.setData({
|
|
||||||
tempIndex: idx
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
@ -1 +0,0 @@
|
|||||||
{}
|
|
@ -32,8 +32,9 @@
|
|||||||
</view>
|
</view>
|
||||||
<!--<cover-view class="swiper_pay_modal" onTap="toPathPlayPage"><cover-view class="sw_pay_mo_order">第 {{videoInfoObj.order}} 集</cover-view><cover-view class="sw_pay_isAutoplay_tips">此剧为付费内容,您的K币不足</cover-view><cover-view class="sw_pay_isAutoplay_tips_support">支持创作作者,解锁后继续观看</cover-view><cover-view class="sw_pay_isAutoplay_btn" onTap="toPathPlayPage">立即充值</cover-view></cover-view> -->
|
<!--<cover-view class="swiper_pay_modal" onTap="toPathPlayPage"><cover-view class="sw_pay_mo_order">第 {{videoInfoObj.order}} 集</cover-view><cover-view class="sw_pay_isAutoplay_tips">此剧为付费内容,您的K币不足</cover-view><cover-view class="sw_pay_isAutoplay_tips_support">支持创作作者,解锁后继续观看</cover-view><cover-view class="sw_pay_isAutoplay_btn" onTap="toPathPlayPage">立即充值</cover-view></cover-view> -->
|
||||||
<view class="swiper_pay_modal">
|
<view class="swiper_pay_modal">
|
||||||
<view class="sw_pay_mo_order">第 {{videoInfoObj.order}} 集</view>
|
<view class="sw_pay_mo_order">第 {{videoInfoObj.order}} 集,为付费内容</view>
|
||||||
<view class="sw_pay_isAutoplay_tips">此剧为付费内容,您的K币不足</view>
|
<!-- <view class="sw_pay_isAutoplay_tips"></view> -->
|
||||||
|
<view class="sw_pay_isAutoplay_tips">解锁需要{{item.price}}K币,您的K币不足</view>
|
||||||
<view class="sw_pay_isAutoplay_tips_support">支持创作作者,解锁后继续观看</view>
|
<view class="sw_pay_isAutoplay_tips_support">支持创作作者,解锁后继续观看</view>
|
||||||
<view class="sw_pay_isAutoplay_btn" onTap="toPathPlayPage">立即充值</view>
|
<view class="sw_pay_isAutoplay_btn" onTap="toPathPlayPage">立即充值</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -175,11 +175,7 @@ Page({
|
|||||||
id: videoInfoObj.id,
|
id: videoInfoObj.id,
|
||||||
allprice: videoInfoObj.allprice
|
allprice: videoInfoObj.allprice
|
||||||
},
|
},
|
||||||
errObj: {
|
errShowT: true
|
||||||
2: {
|
|
||||||
showToastFlag: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
httpRequest(paramVideo).then(res => {
|
httpRequest(paramVideo).then(res => {
|
||||||
@ -371,9 +367,6 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
toPathPlayPage() {
|
toPathPlayPage() {
|
||||||
// my.navigateTo({
|
|
||||||
// url: '/pages/recharge/recharge'
|
|
||||||
// });
|
|
||||||
this.setData({
|
this.setData({
|
||||||
popupShow: true,
|
popupShow: true,
|
||||||
})
|
})
|
||||||
|
@ -6,15 +6,16 @@
|
|||||||
<swiper-item key="swiper_item_{{index}}" class="swiper_item">
|
<swiper-item key="swiper_item_{{index}}" class="swiper_item">
|
||||||
<view class="swiper_item_warp">
|
<view class="swiper_item_warp">
|
||||||
<!-- 播放 catchTouchEnd="videoPlayTouchEnd"-->
|
<!-- 播放 catchTouchEnd="videoPlayTouchEnd"-->
|
||||||
<view class="_video_pay_warp" catchTap="videoPlayControl" >
|
<view class="_video_pay_warp" catchTap="videoPlayControl">
|
||||||
<!--<view class="swiper_item" style="background:pink"></view> -->
|
<!--<view class="swiper_item" style="background:pink"></view> -->
|
||||||
<!--<block a:if={{videoInfoObj.chackpay == 1 && swiperOrder == item.order}}> -->
|
<!--<block a:if={{videoInfoObj.chackpay == 1 && swiperOrder == item.order}}> -->
|
||||||
<block a:if={{videoInfoObj.chackpay == 1}}>
|
<block a:if={{videoInfoObj.chackpay == 1}}>
|
||||||
<block a:if={{videoInfoObj.order == item.order}}>
|
<block a:if={{videoInfoObj.order == item.order}}>
|
||||||
<!-- poster={{posterCover}} -->
|
<!-- -->
|
||||||
<video class="swiper_video_box_android" id="myVideo_{{item.order}}" src={{videoInfoObj.video_url}} autoplay={{(videoInfoObj.chackpay == 1 && videoInfoObj.order == item.order && pageHideFlag) ? true: false }}
|
<video class="swiper_video_box_android" poster={{posterCover}} id="myVideo_{{item.order}}" src={{videoInfoObj.video_url}}
|
||||||
onError="videoErrorFn" objectFit="contain" show-mute-btn={{false}} onEnded="videoEndedFn"
|
autoplay={{(videoInfoObj.chackpay == 1 && videoInfoObj.order == item.order && pageHideFlag) ? true: false }}
|
||||||
onTimeUpdate="onTimeUpdate" data-item={{item}} controls={{false}} />
|
onError="videoErrorFn" objectFit="contain" show-mute-btn={{false}} onEnded="videoEndedFn" onTimeUpdate="onTimeUpdate"
|
||||||
|
data-item={{item}} controls={{false}} />
|
||||||
|
|
||||||
<block a:if={{videoStatus == 2 || videoStatus == 3}}>
|
<block a:if={{videoStatus == 2 || videoStatus == 3}}>
|
||||||
|
|
||||||
@ -34,12 +35,14 @@
|
|||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<!-- catchTouchStart="onTouchStartControls" -->
|
<!-- catchTouchStart="onTouchStartControls" -->
|
||||||
<view class="_video_controls_warp" catchTouchStart="onTouchStartControls" catchTouchEnd="onTouchEndControls">
|
<!-- catchTouchStart="onTouchStartControls" catchTouchEnd="onTouchEndControls" -->
|
||||||
|
<view class="_video_controls_warp" >
|
||||||
<view class="_video_controls_currentTime">
|
<view class="_video_controls_currentTime">
|
||||||
<text>{{currentTime}}</text>
|
<text>{{currentTime}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="_video_controls_slider">
|
<view class="_video_controls_slider">
|
||||||
<slider value={{sliderValue}} min="0" max={{sliderMax}} handle-size={{16}} onChange="videoSliderChange" data-item={{item}} />
|
<slider value={{sliderValue}} min="0" max={{sliderMax}} handle-size={{16}} onChange="videoSliderChange"
|
||||||
|
data-item={{item}} onChanging="videoSliderChanging" />
|
||||||
</view>
|
</view>
|
||||||
<view class="_video_controls_videoDuration">
|
<view class="_video_controls_videoDuration">
|
||||||
<text>{{videoDuration}}</text>
|
<text>{{videoDuration}}</text>
|
||||||
|
@ -180,11 +180,7 @@ Page({
|
|||||||
id: videoInfoObj.id,
|
id: videoInfoObj.id,
|
||||||
allprice: videoInfoObj.allprice
|
allprice: videoInfoObj.allprice
|
||||||
},
|
},
|
||||||
errObj: {
|
errShowT: true
|
||||||
2: {
|
|
||||||
showToastFlag: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
httpRequest(paramVideo).then(res => {
|
httpRequest(paramVideo).then(res => {
|
||||||
@ -299,7 +295,32 @@ Page({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onTouchEndControls() {
|
// onTouchEndControls() {
|
||||||
|
// const videoControlTimer = setTimeout(() => {
|
||||||
|
// const videoStatus = this.data.videoStatus;
|
||||||
|
// if (videoStatus == 2) {
|
||||||
|
// this.setData({
|
||||||
|
// videoStatus: 1
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// }, 3000);
|
||||||
|
|
||||||
|
// this.setData({
|
||||||
|
// videoControlTimer
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
|
||||||
|
// onTouchStartControls() {
|
||||||
|
// const videoControlTimer = this.data.videoControlTimer;
|
||||||
|
// clearTimeout(videoControlTimer);
|
||||||
|
// },
|
||||||
|
|
||||||
|
videoSliderChange(ev) {
|
||||||
|
const sliderValue = ev.detail.value;
|
||||||
|
const item = ev.currentTarget.dataset.item;
|
||||||
|
const videoContext = my.createVideoContext(`myVideo_${item.order}`);
|
||||||
|
videoContext.seek(sliderValue);
|
||||||
|
|
||||||
const videoControlTimer = setTimeout(() => {
|
const videoControlTimer = setTimeout(() => {
|
||||||
const videoStatus = this.data.videoStatus;
|
const videoStatus = this.data.videoStatus;
|
||||||
if (videoStatus == 2) {
|
if (videoStatus == 2) {
|
||||||
@ -310,25 +331,16 @@ Page({
|
|||||||
}, 3000);
|
}, 3000);
|
||||||
|
|
||||||
this.setData({
|
this.setData({
|
||||||
|
sliderValue,
|
||||||
videoControlTimer
|
videoControlTimer
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onTouchStartControls() {
|
videoSliderChanging() {
|
||||||
const videoControlTimer = this.data.videoControlTimer;
|
const videoControlTimer = this.data.videoControlTimer;
|
||||||
clearTimeout(videoControlTimer);
|
clearTimeout(videoControlTimer);
|
||||||
},
|
},
|
||||||
|
|
||||||
videoSliderChange(ev) {
|
|
||||||
const sliderValue = ev.detail.value;
|
|
||||||
const item = ev.currentTarget.dataset.item;
|
|
||||||
const videoContext = my.createVideoContext(`myVideo_${item.order}`);
|
|
||||||
videoContext.seek(sliderValue);
|
|
||||||
this.setData({
|
|
||||||
sliderValue
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
videoPlayPause(ev) {
|
videoPlayPause(ev) {
|
||||||
const item = ev.currentTarget.dataset.item;
|
const item = ev.currentTarget.dataset.item;
|
||||||
const videoControlTimer = this.data.videoControlTimer;
|
const videoControlTimer = this.data.videoControlTimer;
|
||||||
@ -492,9 +504,6 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
toPathPlayPage() {
|
toPathPlayPage() {
|
||||||
// my.navigateTo({
|
|
||||||
// url: '/pages/recharge/recharge'
|
|
||||||
// });
|
|
||||||
this.setData({
|
this.setData({
|
||||||
popupShow: true,
|
popupShow: true,
|
||||||
})
|
})
|
||||||
|
@ -6,7 +6,7 @@ cloud.init({
|
|||||||
env: 'test'
|
env: 'test'
|
||||||
});
|
});
|
||||||
|
|
||||||
const httpRequest = async ({ path, method = 'GET', params = {}, body = {}, exts = {}, errObj = {} }) => {
|
const httpRequest = async ({ path, method = 'GET', params = {}, body = {}, exts = {}, errShowT = false }) => {
|
||||||
|
|
||||||
const dataUid = my.getStorageSync({ key: 'uid' }).data;
|
const dataUid = my.getStorageSync({ key: 'uid' }).data;
|
||||||
let isBody = {};
|
let isBody = {};
|
||||||
@ -58,7 +58,7 @@ const httpRequest = async ({ path, method = 'GET', params = {}, body = {}, exts
|
|||||||
return isResult;
|
return isResult;
|
||||||
}
|
}
|
||||||
if (isResult.status == 2) {
|
if (isResult.status == 2) {
|
||||||
if (!errObj[isResult.status].showToastFlag) {
|
if (!errShowT) {
|
||||||
my.showToast({
|
my.showToast({
|
||||||
content: isResult.msg,
|
content: isResult.msg,
|
||||||
duration: 3000,
|
duration: 3000,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user