Compare commits
76 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
14486e14d1 | ||
|
|
3b1c7ea31f | ||
|
|
be21975449 | ||
|
|
19f6cadae7 | ||
| 9dbf88174e | |||
| 93f4aca944 | |||
|
|
9a33f5ebb1 | ||
|
|
65a6cb04e9 | ||
| d522437135 | |||
|
|
ab588d4123 | ||
|
|
a1c95f7f1b | ||
|
|
0c5e5798ea | ||
| 6f1149fae2 | |||
|
|
b4a7890f8a | ||
|
|
08b63c3a88 | ||
| 8f0729606e | |||
| 91e8d66941 | |||
| 1550bcd19c | |||
|
|
f8bd53596b | ||
| fa809e7b0b | |||
| 896287e5cf | |||
|
|
ef55dc901e | ||
| 1be09bf67a | |||
|
|
d1153659cb | ||
|
|
fffcdf483b | ||
|
|
f0e2797e8e | ||
|
|
46ac9db29d | ||
|
|
3fbca65f86 | ||
|
|
3b472eac65 | ||
|
|
d7a8578b0a | ||
|
|
2ba92103f9 | ||
|
|
a60986d0ca | ||
|
|
88cdceb780 | ||
|
|
6422392967 | ||
|
|
fe79e54917 | ||
|
|
ec8e849bf5 | ||
|
|
d7626a24b8 | ||
|
|
6cc92c111f | ||
|
|
2d5c5d2ba9 | ||
|
|
f67ff84af3 | ||
|
|
c72c0e9baf | ||
|
|
0a25834082 | ||
|
|
ec35f4bfb1 | ||
|
|
949403dd0d | ||
|
|
c05ee20821 | ||
|
|
b5d902a99d | ||
|
|
ccf9625f41 | ||
|
|
bb197f1236 | ||
|
|
8674f1974d | ||
|
|
1674a62fec | ||
|
|
18549d562f | ||
|
|
45316112b4 | ||
|
|
a0d3c31ea5 | ||
| f29542844a | |||
|
|
54f26055cc | ||
|
|
a62e47fe25 | ||
| 940740ce6d | |||
|
|
940cf8c2e7 | ||
|
|
8622676ebf | ||
| 3b776a3beb | |||
| 9651c9cb6f | |||
|
|
a299b8e846 | ||
|
|
2058c4af58 | ||
| 35909ae42c | |||
| 6c4a6ea804 | |||
| 48154cf82f | |||
|
|
575caba06d | ||
|
|
64d7d9a317 | ||
|
|
503f1d4594 | ||
|
|
ae33f415b0 | ||
| 169b3ca31e | |||
| 8553c5f2b7 | |||
|
|
cd1bfa9ec1 | ||
|
|
e8cb4f83ed | ||
| 699061f506 | |||
| be4bf820b4 |
@@ -6,7 +6,7 @@
|
|||||||
"type" : "uni-app:app-android"
|
"type" : "uni-app:app-android"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"playground" : "standard",
|
"playground" : "custom",
|
||||||
"type" : "uni-app:app-ios"
|
"type" : "uni-app:app-ios"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
4
App.vue
4
App.vue
@@ -1,9 +1,9 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
console.log('App Launch');
|
console.log('App Launch ');
|
||||||
uni.setStorageSync('adRewardedNum',0)
|
uni.setStorageSync('adRewardedNum',0)
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ export const discSpinningdraw = (data) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export const selectUserMoney = (data) => {
|
export const selectUserMoney = (data) => {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: '/moneyDetails/selectUserMoney',
|
url: '/moneyDetails/selectUserMoney',
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ export const realNameAuth = (data) => {
|
|||||||
export const canCash = (data) => {
|
export const canCash = (data) => {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: '/cash/canCash',
|
url: '/cash/canCash',
|
||||||
|
showLoading: false,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,14 +4,31 @@ import http from '@/http/http.js'
|
|||||||
export const selectTaskCenter = (data) => {
|
export const selectTaskCenter = (data) => {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: '/taskCenter/selectTaskCenter',
|
url: '/taskCenter/selectTaskCenter',
|
||||||
data
|
data,
|
||||||
|
showLoading:false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 兑换列表
|
||||||
|
export const selectTaskCenterUserReward = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: '/taskCenterReward/selectTaskCenterUserReward',
|
||||||
|
data,
|
||||||
|
isreturm:true
|
||||||
|
})
|
||||||
|
}
|
||||||
// 获取签到
|
// 获取签到
|
||||||
export const getUserSignData = (data) => {
|
export const getUserSignData = (data) => {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: 'userSignRecord/getUserSignData',
|
url: 'userSignRecord/getUserSignData',
|
||||||
data
|
data,
|
||||||
|
showLoading:false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export const receiveGoods = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: 'taskCenter/receiveGoods',
|
||||||
|
data,
|
||||||
|
method: 'POST',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 任务-签到
|
// 任务-签到
|
||||||
|
|||||||
@@ -3,17 +3,24 @@ import http from '@/http/http.js'
|
|||||||
//获取短剧视频详情
|
//获取短剧视频详情
|
||||||
export function getVideoDetail(data) {
|
export function getVideoDetail(data) {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: 'course/courseSets?courseId='+data.courseId,
|
url: 'course/courseSets',
|
||||||
data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//追剧
|
//追剧
|
||||||
export function zhuiju(data) {
|
export function zhuiju(data) {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: 'courseCollect/insertCourseCollect',
|
url: 'courseCollect/insertCourseCollect',
|
||||||
method:'POST',
|
method: 'POST',
|
||||||
data:{
|
data: {
|
||||||
classify:1,
|
classify: 1,
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -23,9 +30,9 @@ export function zhuiju(data) {
|
|||||||
export function dianzan(data) {
|
export function dianzan(data) {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: 'courseCollect/insertCourseCollect',
|
url: 'courseCollect/insertCourseCollect',
|
||||||
method:'POST',
|
method: 'POST',
|
||||||
data:{
|
data: {
|
||||||
classify:2,
|
classify: 2,
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -33,13 +40,13 @@ export function dianzan(data) {
|
|||||||
|
|
||||||
//插入播放历史记录
|
//插入播放历史记录
|
||||||
|
|
||||||
export function insertHistory(data){
|
export function insertHistory(data) {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: 'courseCollect/insertCourseCollect',
|
url: 'courseCollect/insertCourseCollect',
|
||||||
method:'POST',
|
method: 'POST',
|
||||||
data:{
|
data: {
|
||||||
classify:3,
|
classify: 3,
|
||||||
type:1,
|
type: 1,
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -54,12 +61,12 @@ export function getJinbiBili(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//获取推荐视频
|
//获取推荐视频
|
||||||
export function tuijianVideo(data){
|
export function tuijianVideo(data) {
|
||||||
const randomNum=10+ Math.ceil(Math.random()*20)
|
const randomNum = 10 + Math.ceil(Math.random() * 20)
|
||||||
return http.request({
|
return http.request({
|
||||||
url: 'course/selectCourseDetailsList',
|
url: 'course/selectCourseDetailsList',
|
||||||
method:'GET',
|
method: 'GET',
|
||||||
data:{
|
data: {
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
randomNum: randomNum
|
randomNum: randomNum
|
||||||
@@ -67,64 +74,77 @@ export function tuijianVideo(data){
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
//解锁10集视频
|
//解锁10集视频
|
||||||
export function buyTenVideo(data){
|
export function buyTenVideo(data) {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: 'order/insertCourseOrders/limit10',
|
url: 'order/insertCourseOrders/limit10',
|
||||||
method:'GET',
|
method: 'GET',
|
||||||
data:data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//解锁单集或者全部视频
|
//解锁单集或者全部视频
|
||||||
export function buyVideo(data){
|
export function buyVideo(data) {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: 'order/insertCourseOrders',
|
url: 'order/insertCourseOrders',
|
||||||
method:'GET',
|
method: 'GET',
|
||||||
data:data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//订单支付
|
//订单支付
|
||||||
export function payOrder(data){
|
export function payOrder(data) {
|
||||||
let payType='h5'
|
let payType = 'h5'
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
payType='app'
|
payType = 'app'
|
||||||
// #endif
|
// #endif
|
||||||
return http.request({
|
return http.request({
|
||||||
url: 'wuyou/payOrder/'+data.orderId+'?payType='+payType,
|
url: 'wuyou/payOrder/' + data.orderId + '?payType=' + payType,
|
||||||
method:'GET'
|
method: 'GET'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//获取订单支付状态
|
//获取订单支付状态
|
||||||
export function getOrderInfo(data){
|
export function getOrderInfo(data) {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: 'wuyou/queryOrder/'+data.orderId,
|
url: 'wuyou/queryOrder/' + data.orderId,
|
||||||
method:'GET'
|
method: 'GET'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//金币解锁
|
//金币解锁
|
||||||
export function goldPay(data){
|
export function goldPay(data) {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: 'order/payOrders',
|
url: 'order/payOrders',
|
||||||
method:'POST',
|
method: 'POST',
|
||||||
data:{...data,header:{
|
data: {
|
||||||
'content-type':'application/x-www-form-urlencoded'
|
...data,
|
||||||
}}
|
header: {
|
||||||
|
'content-type': 'application/x-www-form-urlencoded'
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取转盘抽奖次数
|
//获取转盘抽奖次数
|
||||||
export function getDrawCount(data){
|
export function getDrawCount(data) {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: 'discSpinning/drawCount',
|
url: 'discSpinning/drawCount',
|
||||||
method:'GET',
|
method: 'GET',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//播放开始或者结束
|
//播放开始或者结束
|
||||||
export function playStatus(data){
|
export function playStatus(data) {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: 'course/viewCourse',
|
url: 'course/viewCourse',
|
||||||
method:'GET',
|
method: 'GET',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取支付次数提示
|
||||||
|
export function getPayTips(data){
|
||||||
|
return http.request({
|
||||||
|
url: 'course/getRedEnvelopeTips',
|
||||||
|
method: 'GET',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
//打包时修改env的值即可
|
//打包时修改env的值即可
|
||||||
const env='test' //test , production,local
|
const env='production' //test , production,local
|
||||||
|
|
||||||
export const encryptKey='1234567890123456' // http数据加解密的key
|
export const encryptKey='1234567890123456' // http数据加解密的key
|
||||||
|
|
||||||
export const apiUrl='/czg/'
|
export const apiUrl='/czg/'
|
||||||
export const h5Config = {
|
export const h5Config = {
|
||||||
production: 'https://dj-h5.hnsiyao.cn',
|
production: 'https://web.hnsiyao.cn',
|
||||||
test: 'https://web-api.hnsiyao.cn',
|
test: 'https://web-api.hnsiyao.cn',
|
||||||
local: 'http://192.168.1.41:8100'
|
local: 'http://192.168.1.41:8100'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,9 +132,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
// #ifdef H5
|
||||||
getElRect('myCanvas').then(res => {
|
getElRect('myCanvas').then(res => {
|
||||||
Object.assign(posterData, res)
|
Object.assign(posterData, res)
|
||||||
})
|
})
|
||||||
|
// #endif
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
function hide() {
|
function hide() {
|
||||||
|
|||||||
@@ -411,7 +411,7 @@
|
|||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
transition: all .3s ease-in-out;
|
transition: transform .3s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.u-flex-y-center {
|
.u-flex-y-center {
|
||||||
@@ -426,7 +426,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
transition: all .3s ease-in-out;
|
transition: transform .3s ease-in-out;
|
||||||
position: absolute !important;
|
position: absolute !important;
|
||||||
right: 20rpx;
|
right: 20rpx;
|
||||||
/* #ifdef H5 */
|
/* #ifdef H5 */
|
||||||
|
|||||||
@@ -67,6 +67,10 @@ let loop=ref(false)
|
|||||||
loop.value=true
|
loop.value=true
|
||||||
// #endif
|
// #endif
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
height:{
|
||||||
|
type:Number,
|
||||||
|
default:0
|
||||||
|
},
|
||||||
item: {
|
item: {
|
||||||
type: Object,
|
type: Object,
|
||||||
defaulr: () => {
|
defaulr: () => {
|
||||||
@@ -435,7 +439,7 @@ let loop=ref(false)
|
|||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
transition: all .3s ease-in-out;
|
transition: transform .3s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.u-flex-y-center {
|
.u-flex-y-center {
|
||||||
@@ -450,7 +454,7 @@ let loop=ref(false)
|
|||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
transition: all .3s ease-in-out;
|
transition: transform .3s ease-in-out;
|
||||||
position: absolute !important;
|
position: absolute !important;
|
||||||
right: 20rpx;
|
right: 20rpx;
|
||||||
/* #ifdef H5 */
|
/* #ifdef H5 */
|
||||||
|
|||||||
@@ -1,22 +1,36 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="item" @appear="appear" @disappear="disappear" @click.stop :style="{height:height+'px'}">
|
<view class="item" @appear="appear" @disappear="disappear" @click.stop :style="{height:height+'px'}" :key="index">
|
||||||
|
|
||||||
<video class="u-flex-1 video" :show-fullscreen-btn="false" @controlstoggle="controlstoggles" v-if="showVideo"
|
<!-- :controls="showControls" -->
|
||||||
|
<video class=" video" :show-fullscreen-btn="false" @controlstoggle="controlstoggles" v-if="showVideo"
|
||||||
@timeupdate="timeupdate" @waiting="waiting()" object-fit="cover" @pause="onpause" @click="videoClick()"
|
play-btn-position="bottom" :show-center-play-btn="true" :show-play-btn="true" @click.stop="videoClick()"
|
||||||
|
@loadedmetadata="loadedmetadata" @timeupdate="timeupdate" @waiting="waiting()" object-fit="cover"
|
||||||
|
@loadeddata="waiting()" @pause="onpause"
|
||||||
@play="videoPlay('myVideo'+item.courseDetailsId,item.courseDetailsId)" :play-strategy="2"
|
@play="videoPlay('myVideo'+item.courseDetailsId,item.courseDetailsId)" :play-strategy="2"
|
||||||
:show-loading="true" codec="software" :muted="false" :show-center-play-btn="true" :loop="loop"
|
:show-loading="true" codec="software" :muted="false" :loop="loop" :enable-progress-gesture="false"
|
||||||
:enable-progress-gesture="false" :poster="item.titleImg" :ref="'myVideo'+item.courseDetailsId"
|
:poster="item.titleImg" :ref="'myVideo'+item.courseDetailsId" :autoplay="autoplay" @ended="ended"
|
||||||
:autoplay="autoplay" @ended="ended" :id="'myVideo'+item.courseDetailsId" :src="item.videoUrl"></video>
|
:id="'myVideo'+item.courseDetailsId" :src="item.videoUrl"></video>
|
||||||
|
|
||||||
<image class="poster" v-else @click="!item.videoUrl?popupShow('pay',item):''" :src="item.titleImg"
|
|
||||||
mode="aspectFill">
|
<image class="poster" v-else @click.stop="posterClick" :src="item.titleImg" mode="aspectFill">
|
||||||
</image>
|
</image>
|
||||||
|
<!-- #ifdef APP -->
|
||||||
|
<view class="control-play-cover" v-if="showControls&&isIos" @click="playCoverClick()">
|
||||||
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
|
|
||||||
|
<!-- <view class="progress" v-if="showVideo&&!isPlying" @click.stop>
|
||||||
|
<progress-vue @touchstart="progressScroll" @touchend="progressScrollEnd"></progress-vue>
|
||||||
|
</view> -->
|
||||||
|
|
||||||
|
<!-- <view class="play-icon" v-if="showVideo&&!isPlying" @click.stop="playIconClick()" :style="playStyle">
|
||||||
|
<image class="icon" src="@/static/images/play.png" mode=""></image>
|
||||||
|
</view> -->
|
||||||
|
|
||||||
<view class="info" v-if="!isCommand" :style="infoStyle">
|
<view class="info" v-if="!isCommand" :style="infoStyle">
|
||||||
<text class="color-fff" v-if="item.courseDetailsName">{{item.courseDetailsName}}</text>
|
<text class="color-fff" v-if="item.courseDetailsName">{{item.courseDetailsName}}</text>
|
||||||
<view v-if="item.content" v-html="item.content"></view>
|
<view v-if="item.content" v-html="item.content"></view>
|
||||||
<view class="u-m-t-20 color-fff" @click="popupShow('show')">
|
<view class="u-m-t-20 color-fff" @click.stop="popupShow('show')">
|
||||||
<text class="color-fff">
|
<text class="color-fff">
|
||||||
{{item.courseDetailsName}}(共{{total}}集)选集 >
|
{{item.courseDetailsName}}(共{{total}}集)选集 >
|
||||||
</text>
|
</text>
|
||||||
@@ -26,7 +40,7 @@
|
|||||||
<view class="info" v-if="isCommand" :style="infoStyle">
|
<view class="info" v-if="isCommand" :style="infoStyle">
|
||||||
<text class="color-fff" v-if="item.courseDetailsName">{{item.courseDetailsName}}</text>
|
<text class="color-fff" v-if="item.courseDetailsName">{{item.courseDetailsName}}</text>
|
||||||
<view v-if="item.content" v-html="item.content"></view>
|
<view v-if="item.content" v-html="item.content"></view>
|
||||||
<view class="u-m-t-20 color-fff" @click="toDetail">
|
<view class="u-m-t-20 color-fff" @click.stop="toDetail">
|
||||||
<text class="color-fff">
|
<text class="color-fff">
|
||||||
查看更多续集 >
|
查看更多续集 >
|
||||||
</text>
|
</text>
|
||||||
@@ -55,6 +69,10 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import * as Api from '@/api/video/index.js'
|
import * as Api from '@/api/video/index.js'
|
||||||
|
// #ifdef APP
|
||||||
|
const domModule = uni.requireNativePlugin('dom')
|
||||||
|
// #endif
|
||||||
|
import progressVue from './progress.vue'
|
||||||
import {
|
import {
|
||||||
computed,
|
computed,
|
||||||
nextTick,
|
nextTick,
|
||||||
@@ -70,9 +88,17 @@
|
|||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
height:{
|
isIos:{
|
||||||
type:Number,
|
type: Boolean,
|
||||||
default:0
|
default: false
|
||||||
|
},
|
||||||
|
isAndriod: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
height: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
},
|
},
|
||||||
item: {
|
item: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@@ -98,6 +124,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
isTabbar: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
isCommand: {
|
isCommand: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
@@ -136,18 +166,47 @@
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: 1
|
default: 1
|
||||||
},
|
},
|
||||||
showControls: {
|
showAndriod: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let isWaiting = ref(true)
|
||||||
|
|
||||||
|
function waiting() {
|
||||||
|
console.log('waiting');
|
||||||
|
isWaiting.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
let showControls = ref(props.showAndriod?false:true)
|
||||||
|
|
||||||
|
let playPercent = ref(0)
|
||||||
|
|
||||||
|
|
||||||
let autoplay = ref(props.item.videoUrl ? true : false)
|
let autoplay = ref(props.item.videoUrl ? true : false)
|
||||||
|
|
||||||
const emits = defineEmits(['controlstoggles', 'disappear', 'appear', 'waiting', 'videoPlay', 'ended', 'dianzanClick',
|
const emits = defineEmits(['controlstoggles', 'disappear', 'appear', 'waiting', 'videoPlay', 'ended', 'dianzanClick',
|
||||||
'share', 'zhuijuClick', 'popupShow', 'itemMounted', 'toDetail', 'showInfo', 'playStatusChange'
|
'share', 'zhuijuClick', 'popupShow', 'itemMounted', 'toDetail', 'playStatusChange', 'progressScroll',
|
||||||
|
'progressScrollEnd'
|
||||||
])
|
])
|
||||||
|
|
||||||
|
function progressScroll(e) {
|
||||||
|
emits('progressScroll')
|
||||||
|
}
|
||||||
|
|
||||||
|
function progressScrollEnd(e) {
|
||||||
|
emits('progressScrollEnd')
|
||||||
|
}
|
||||||
|
|
||||||
|
function posterClick() {
|
||||||
|
if (!props.item.videoUrl) {
|
||||||
|
popupShow('pay', props.item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function controlstoggles(e) {
|
function controlstoggles(e) {
|
||||||
|
showControls.value = e.detail.show
|
||||||
emits('controlstoggles', e)
|
emits('controlstoggles', e)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,16 +217,16 @@
|
|||||||
emits('toDetail')
|
emits('toDetail')
|
||||||
}
|
}
|
||||||
|
|
||||||
function waiting() {
|
|
||||||
|
|
||||||
|
let videoIsLoadedmetadata = ref(false)
|
||||||
|
|
||||||
|
function loadedmetadata() {
|
||||||
|
console.log('loadedmetadata');
|
||||||
|
videoIsLoadedmetadata.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let isPlying = ref(false)
|
let isPlying = ref(false)
|
||||||
watch(() => isPlying.value, (newval) => {
|
|
||||||
console.log(newval);
|
|
||||||
emits('showInfo', newval)
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
//是否是第一次加载时的播放,不是暂停再播放
|
//是否是第一次加载时的播放,不是暂停再播放
|
||||||
@@ -190,10 +249,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function timeupdate(e) {
|
function timeupdate(e) {
|
||||||
|
playPercent.value = e.detail.currentTime * 100 / e.detail.duration
|
||||||
//隐藏loding
|
//隐藏loding
|
||||||
// #ifdef H5
|
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
// #endif
|
|
||||||
if (isPlayFinish) {
|
if (isPlayFinish) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -205,31 +263,45 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
let videoBar = null
|
||||||
|
|
||||||
|
|
||||||
|
let watingTimer = null
|
||||||
|
|
||||||
function videoPlay() {
|
function videoPlay() {
|
||||||
if (isFirstPlay && !isPlayFinish) {
|
if (isFirstPlay && !isPlayFinish) {
|
||||||
sendPlayStatus('start')
|
sendPlayStatus('start')
|
||||||
}
|
}
|
||||||
|
|
||||||
isFirstPlay = false
|
isFirstPlay = false
|
||||||
isPlying.value = true
|
isPlying.value = true
|
||||||
|
clearTimeout(watingTimer)
|
||||||
|
watingTimer = setTimeout(() => {
|
||||||
|
isWaiting.value = false
|
||||||
|
}, 1000)
|
||||||
|
// showControls.value = false
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
emits('controlstoggles', {
|
videoBar = videoBar ? videoBar : document.querySelector('.uni-video-bar');
|
||||||
detail: {
|
videoBar.style.cssText = 'display:none;';
|
||||||
show: false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
// #ifdef APP
|
||||||
|
if (!props.showAndriod) {}
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onpause() {
|
function onpause() {
|
||||||
isPlying.value = false
|
isPlying.value = false
|
||||||
|
// showControls.value = true
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
emits('controlstoggles', {
|
videoBar = videoBar ? videoBar : document.querySelector('.uni-video-bar');
|
||||||
detail: {
|
videoBar.style.cssText = '';
|
||||||
show: true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -254,8 +326,36 @@
|
|||||||
emits('popupShow', key)
|
emits('popupShow', key)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function playCoverClick() {
|
||||||
|
console.log('playCoverClick');
|
||||||
|
if (video) {
|
||||||
|
if (isPlying.value) {
|
||||||
|
video.pause()
|
||||||
|
} else {
|
||||||
|
video.play()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function playIconClick(){
|
||||||
|
if (video) {
|
||||||
|
if (isPlying.value) {
|
||||||
|
video.pause()
|
||||||
|
} else {
|
||||||
|
video.play()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function videoClick() {
|
function videoClick() {
|
||||||
console.log('videoClick');
|
console.log('videoClick');
|
||||||
|
// #ifdef APP
|
||||||
|
// 兼容ios控制条和信息展示不同步
|
||||||
|
if (isPlying.value&&showControls.value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
|
||||||
if (video) {
|
if (video) {
|
||||||
if (isPlying.value) {
|
if (isPlying.value) {
|
||||||
video.pause()
|
video.pause()
|
||||||
@@ -280,19 +380,18 @@
|
|||||||
|
|
||||||
let video = null
|
let video = null
|
||||||
|
|
||||||
function disappear() {
|
function disappear(e) {
|
||||||
|
emits('disappear', e)
|
||||||
if (video) {
|
if (video) {
|
||||||
video.pause()
|
video.pause()
|
||||||
}
|
}
|
||||||
emits('disappear')
|
|
||||||
}
|
}
|
||||||
const showVideo = computed(() => {
|
const showVideo = computed(() => {
|
||||||
// #ifdef H5
|
if (props.isAndriod) {
|
||||||
return props.current === props.index && props.item.videoUrl
|
return (props.nowIndex === props.index && props.item.videoUrl) ? true : false
|
||||||
// #endif
|
} else {
|
||||||
// #ifdef APP
|
return props.current === props.index && props.item.videoUrl
|
||||||
return props.nowIndex === props.index && props.item.videoUrl
|
}
|
||||||
// #endif
|
|
||||||
})
|
})
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
init()
|
init()
|
||||||
@@ -305,7 +404,6 @@
|
|||||||
video = uni.createVideoContext('myVideo' + props.item.courseDetailsId)
|
video = uni.createVideoContext('myVideo' + props.item.courseDetailsId)
|
||||||
video.playbackRate(props.playSpeeds)
|
video.playbackRate(props.playSpeeds)
|
||||||
video.play()
|
video.play()
|
||||||
console.log('init play');
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('------')
|
console.error('------')
|
||||||
@@ -319,7 +417,6 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
watch(() => showVideo.value, (newval) => {
|
watch(() => showVideo.value, (newval) => {
|
||||||
console.log('showVideo change:' + newval);
|
|
||||||
if (newval) {
|
if (newval) {
|
||||||
isFirstPlay = true
|
isFirstPlay = true
|
||||||
isPlayFinish = false
|
isPlayFinish = false
|
||||||
@@ -331,17 +428,50 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const customStyle = computed(() => {
|
||||||
const infoStyle = computed(() => {
|
// #ifdef H5
|
||||||
return {
|
return {
|
||||||
transform: `translateX(${(!isPlying.value||!props.item.videoUrl)?0:'-110%'})`
|
bottom: props.isTabbar ? '50px' : '0'
|
||||||
}
|
}
|
||||||
|
// #endif
|
||||||
|
// #ifndef H5
|
||||||
|
return {}
|
||||||
|
// #endif
|
||||||
|
})
|
||||||
|
const playStyle = computed(() => {
|
||||||
|
if (isPlying.value) {
|
||||||
|
return {
|
||||||
|
bottom: '0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
bottom: props.isTabbar ? (50 + 44 + 'px') : '44px'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const infoStyle = computed(() => {
|
||||||
|
// #ifdef H5
|
||||||
|
return {
|
||||||
|
transform: `translateX(${(!isPlying.value||!props.item.videoUrl)?0:'-750rpx'})`
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
return {
|
||||||
|
transform: `translateX(${(showControls.value||!props.item.videoUrl)?0:'-750rpx'})`
|
||||||
|
}
|
||||||
|
// return {
|
||||||
|
// transform: `translateX(${(!isPlying.value||!props.item.videoUrl)?0:'-750rpx'})`
|
||||||
|
// }
|
||||||
})
|
})
|
||||||
|
|
||||||
const rightStyle = computed(() => {
|
const rightStyle = computed(() => {
|
||||||
|
// #ifdef H5
|
||||||
return {
|
return {
|
||||||
transform: `translateX(${(!isPlying.value||!props.item.videoUrl)?'0':60}px)`
|
transform: `translateX(${(!isPlying.value||!props.item.videoUrl)?'0':60}px)`
|
||||||
}
|
}
|
||||||
|
// #endif
|
||||||
|
return {
|
||||||
|
transform: `translateX(${(showControls.value||!props.item.videoUrl)?'0':60}px)`
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -352,6 +482,12 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 假设控制条的类名为 uni-video-controls */
|
||||||
|
.uni-video-controls {
|
||||||
|
transition: none !important;
|
||||||
|
-webkit-transition: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
.box {
|
.box {
|
||||||
/* #ifdef H5 */
|
/* #ifdef H5 */
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -411,7 +547,7 @@
|
|||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
transition: all .3s ease-in-out;
|
transition: transform .3s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.u-flex-y-center {
|
.u-flex-y-center {
|
||||||
@@ -426,7 +562,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
transition: all .3s ease-in-out;
|
transition: transform .3s ease-in-out;
|
||||||
position: absolute !important;
|
position: absolute !important;
|
||||||
right: 20rpx;
|
right: 20rpx;
|
||||||
/* #ifdef H5 */
|
/* #ifdef H5 */
|
||||||
@@ -434,7 +570,7 @@
|
|||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
/* #endif */
|
/* #endif */
|
||||||
/* #ifdef APP */
|
/* #ifdef APP */
|
||||||
top: 500px;
|
bottom: 100px;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@@ -466,44 +602,21 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ji-list {
|
.play-icon {
|
||||||
.ji-item {
|
position: absolute;
|
||||||
width: 210rpx;
|
left: 0;
|
||||||
margin-bottom: 20rpx;
|
right: 0;
|
||||||
margin-right: 30rpx;
|
top: 0;
|
||||||
height: 88rpx;
|
bottom: 0;
|
||||||
font-size: 28rpx;
|
justify-content: center;
|
||||||
color: #333;
|
align-items: center;
|
||||||
border-radius: 12rpx;
|
$icon-size: 80rpx;
|
||||||
background-color: #F5F7FF;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
&.active {
|
.icon {
|
||||||
background-color: $my-main-color;
|
width: $icon-size;
|
||||||
color: #fff;
|
height: $icon-size;
|
||||||
}
|
|
||||||
|
|
||||||
.lock {
|
|
||||||
position: absolute;
|
|
||||||
border-radius: 0px 6px 0px 6px;
|
|
||||||
background-color: #ccc;
|
|
||||||
padding: 2rpx 4rpx;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.playing {
|
|
||||||
position: absolute;
|
|
||||||
width: 32rpx;
|
|
||||||
height: 24rpx;
|
|
||||||
bottom: 5px;
|
|
||||||
right: 7px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.ji-item:nth-of-type(3n) {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot {
|
.hot {
|
||||||
@@ -522,8 +635,28 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.progress {
|
||||||
|
padding: 20rpx;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 20rpx;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
.zhifubao {
|
.zhifubao {
|
||||||
width: 56rpx;
|
width: 56rpx;
|
||||||
height: 56rpx;
|
height: 56rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.control-play-cover {
|
||||||
|
position: absolute;
|
||||||
|
left: 10px;
|
||||||
|
bottom: 0;
|
||||||
|
width: 38px;
|
||||||
|
height: 44px;
|
||||||
|
// background-color: red;
|
||||||
|
background-color: transparent;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,13 +1,38 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- #ifdef H5 -->
|
<list v-if="showAndriod" :bounce="false" :loadmoreoffset="wHeight*3" :show-scrollbar="false" ref="listBox"
|
||||||
<view class=" w-full box" style="width: 100vw;">
|
:pagingEnabled="true" @loadmore="loadmore" :scrollable="scrollable">
|
||||||
<swiper @longpress="popupShow('speed')" :style="{height:wHeight+'px'}" v-if="videoList.length"
|
<cell v-for="(item,index) in list" :key="item.courseDetailsId" :ref="setRefList(index)">
|
||||||
|
<view class="swipers-items" :style="boxStyle" @longpress="popupShow('speed')">
|
||||||
|
<list-item-vue :total="list.length" :item="item" :current="current" :isCollect="isCollect"
|
||||||
|
:isAndriod="isAndriod"
|
||||||
|
:showAndriod="showAndriod"
|
||||||
|
:isIos="isIos"
|
||||||
|
:isH5="isH5"
|
||||||
|
:isTabbar="isTabbar" @playStatusChange="playStatusChange" :height="wHeight"
|
||||||
|
:isCommand="isCommand" :showControls="control.showControls" @toDetail="toDetail(item,index)"
|
||||||
|
@itemMounted="itemMounted" @controlstoggles="controlstoggles" :index="index" :instance="instance"
|
||||||
|
:nowIndex="nowIndex" @appear="appear($event,item,index)" :playSpeeds="playSpeeds"
|
||||||
|
@disappear="disappear($event, item,index)" @dianzanClick="dianzanClick(item,index)"
|
||||||
|
@share="share(item)" @zhuijuClick="zhuijuClick(item)"
|
||||||
|
@progressScroll="progressScroll"
|
||||||
|
@progressScrollEnd="progressScrollEnd"
|
||||||
|
@popupShow="popupShow($event,item,index)"></list-item-vue>
|
||||||
|
</view>
|
||||||
|
</cell>
|
||||||
|
</list>
|
||||||
|
<view v-if="isH5||isIos" class=" w-full box" style="width: 100vw;">
|
||||||
|
<swiper
|
||||||
|
@longpress="popupShow('speed')"
|
||||||
|
:style="{height:wHeight+'px'}" v-if="videoList.length"
|
||||||
@change="swiperChange" :current="current" :circular="true" vertical class="u-flex-1"
|
@change="swiperChange" :current="current" :circular="true" vertical class="u-flex-1"
|
||||||
@transition="transition" :indicator-dots="false" :autoplay="false" :interval="0" :duration="200">
|
@transition="transition" :indicator-dots="false" :autoplay="false" :interval="0" :duration="200">
|
||||||
<swiper-item v-for="(item,index) in videoList" :key="index">
|
<swiper-item v-for="(item,index) in videoList" :key="index">
|
||||||
<list-item-vue :total="list.length" :item="item" :isCommand="isCommand"
|
<list-item-vue :total="list.length" :item="item" :isCommand="isCommand" :height="wHeight"
|
||||||
:height="wHeight"
|
:isAndriod="isAndriod"
|
||||||
@playStatusChange="playStatusChange"
|
:showAndriod="showAndriod"
|
||||||
|
:isIos="isIos"
|
||||||
|
:isH5="isH5"
|
||||||
|
:isTabbar="isTabbar" @playStatusChange="playStatusChange"
|
||||||
:showControls="control.showControls" :current="current" :isCollect="isCollect"
|
:showControls="control.showControls" :current="current" :isCollect="isCollect"
|
||||||
@toDetail="toDetail(item,index)" @controlstoggles="controlstoggles" :playSpeeds="playSpeeds"
|
@toDetail="toDetail(item,index)" @controlstoggles="controlstoggles" :playSpeeds="playSpeeds"
|
||||||
:index="index" :nowIndex="nowIndex" @dianzanClick="dianzanClick(item,index)" @share="share(item)"
|
:index="index" :nowIndex="nowIndex" @dianzanClick="dianzanClick(item,index)" @share="share(item)"
|
||||||
@@ -15,34 +40,82 @@
|
|||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
<!-- #endif -->
|
|
||||||
|
|
||||||
<!-- #ifdef APP -->
|
|
||||||
<list :bounce="false" :loadmoreoffset="wHeight*3" :show-scrollbar="false" ref="listBox" :pagingEnabled="true"
|
|
||||||
@loadmore="loadmore" :scrollable="true">
|
|
||||||
<cell v-for="(item,index) in list" :key="item.courseDetailsId" :ref="setRefList(index)">
|
|
||||||
<view class="swipers-items" :style="boxStyle" @longpress="popupShow('speed')">
|
|
||||||
<list-item-vue :total="list.length" :item="item" :current="current" :isCollect="isCollect"
|
|
||||||
@playStatusChange="playStatusChange"
|
|
||||||
:height="wHeight"
|
|
||||||
:isCommand="isCommand" :showControls="control.showControls" @toDetail="toDetail(item,index)"
|
|
||||||
@itemMounted="itemMounted" @controlstoggles="controlstoggles" :index="index" :instance="instance"
|
|
||||||
:nowIndex="nowIndex" @appear="appear($event,item,index)" :playSpeeds="playSpeeds"
|
|
||||||
@disappear="disappear(item,index)" @dianzanClick="dianzanClick(item,index)" @share="share(item)"
|
|
||||||
@zhuijuClick="zhuijuClick(item)" @popupShow="popupShow($event,item,index)"></list-item-vue>
|
|
||||||
</view>
|
|
||||||
</cell>
|
|
||||||
</list>
|
|
||||||
|
|
||||||
<!-- #endif -->
|
|
||||||
|
|
||||||
<!-- 返回按钮 -->
|
<!-- 返回按钮 -->
|
||||||
<view class="back-icon" v-if="!isTabbar&&control.showBack">
|
<view class="back-icon" v-if="!isTabbar&&control.showBack">
|
||||||
<u-icon name="arrow-left" color="#fff" :size="28" @click="back"></u-icon>
|
<u-icon name="arrow-left" color="#fff" :size="28" @click="back"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<!-- 选集 -->
|
<!-- 选集 -->
|
||||||
<up-popup :show="popup.show" :round="10" @close="popupClose('show')" :customStyle="customStyle">
|
<up-overlay :show="popup.show" @click="popupClose('show')">
|
||||||
|
<view class="u-p-30 bg-fff xuanji-box">
|
||||||
|
<view class="u-flex u-flex-row u-row-between">
|
||||||
|
<view class="u-flex u-flex-row" style="align-items: baseline;">
|
||||||
|
<text class="color-333 u-font-32 ">{{info.title}}</text>
|
||||||
|
<text class="u-font-28 color-666 u-m-l-20">共{{list.length}}集</text>
|
||||||
|
</view>
|
||||||
|
<up-icon name="close" :size="16" color="#333" bold @click="popupClose('show')"></up-icon>
|
||||||
|
</view>
|
||||||
|
<scroll-view scroll-y="true" class="u-m-t-30 xuanji-scroll" :style="{height:xuanjiData.height+'px'}"
|
||||||
|
:scroll-top="xuanjiData.scrollTop" :show-scrollbar="false">
|
||||||
|
<view class="ji-list u-flex u-flex-row u-flex-wrap">
|
||||||
|
<view class="ji-item u-flex-xy-center u-text-center" @click="jiClick(item,index)"
|
||||||
|
:class="[nowIndex==index?'active':'',(index+1)%3==0?'mr-0':'','ji-item'+index]"
|
||||||
|
v-for="(item,index) in list" :key="index">
|
||||||
|
<text class="u-font-28" :class="{'color-fff':nowIndex==index}">第{{index+1}}集</text>
|
||||||
|
<view class="lock u-flex-xy-center" v-if="!item.videoUrl">
|
||||||
|
<up-icon name="lock" :size="14" color="#fff"></up-icon>
|
||||||
|
<!-- <image class="lock-icon" src="@/static/images/lock.png" mode=""></image> -->
|
||||||
|
</view>
|
||||||
|
<image v-if="nowIndex==index" class="playing" src="@/static/images/playIng.png" mode="">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</scroll-view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</up-overlay>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 暂时舍弃,因为在ios上会有奇怪问题导致经常不出现 -->
|
||||||
|
<!-- 选集-->
|
||||||
|
<!-- <view class="mask" :class="{'mask-show':popup.show}">
|
||||||
|
<view class="u-p-30 bg-fff box">
|
||||||
|
<view class="u-flex u-flex-row u-row-between">
|
||||||
|
<view class="u-flex u-flex-row" style="align-items: baseline;">
|
||||||
|
<text class="color-333 u-font-32 ">{{info.title}}</text>
|
||||||
|
<text class="u-font-28 color-666 u-m-l-20">共{{list.length}}集</text>
|
||||||
|
</view>
|
||||||
|
<up-icon name="close" :size="16" color="#333" bold @click="popupClose('show')"></up-icon>
|
||||||
|
</view>
|
||||||
|
<view :style="{height:xuanjiData.height+'px',overflow:'hidden'}">
|
||||||
|
<scroll-view scroll-y="true" class="u-m-t-30 xuanji-scroll" :style="{height:xuanjiData.height+'px'}"
|
||||||
|
:scroll-top="xuanjiData.scrollTop" :show-scrollbar="false">
|
||||||
|
<view class="ji-list u-flex u-flex-row u-flex-wrap">
|
||||||
|
<view class="ji-item u-flex-xy-center u-text-center" @click="jiClick(item,index)"
|
||||||
|
:class="[nowIndex==index?'active':'',(index+1)%3==0?'mr-0':'','ji-item'+index]"
|
||||||
|
v-for="(item,index) in list" :key="index">
|
||||||
|
<text class="u-font-28" :class="{'color-fff':nowIndex==index}">第{{index+1}}集</text>
|
||||||
|
<view class="lock u-flex-xy-center" v-if="!item.videoUrl">
|
||||||
|
<up-icon name="lock" :size="14" color="#fff"></up-icon>
|
||||||
|
</view>
|
||||||
|
<image v-if="nowIndex==index" class="playing" src="@/static/images/playIng.png" mode="">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
<up-popup :show="popup.show1" :round="10" @close="popupClose('show')" :customStyle="customStyle">
|
||||||
<view class="u-p-30">
|
<view class="u-p-30">
|
||||||
<view class="u-flex u-flex-row u-row-between">
|
<view class="u-flex u-flex-row u-row-between">
|
||||||
<view class="u-flex u-flex-row" style="align-items: baseline;">
|
<view class="u-flex u-flex-row" style="align-items: baseline;">
|
||||||
@@ -51,25 +124,30 @@
|
|||||||
</view>
|
</view>
|
||||||
<up-icon name="close" :size="16" color="#333" bold @click="popupClose('show')"></up-icon>
|
<up-icon name="close" :size="16" color="#333" bold @click="popupClose('show')"></up-icon>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view scroll-y="true" class="u-m-t-30 xuanji-scroll" ref="refXuanjiList"
|
<view :style="{height:xuanjiData.height+'px',overflow:'hidden'}">
|
||||||
:style="{height:xuanjiData.height+'px'}" @scroll="xuanjiScroll" :scroll-top="xuanjiData.scrollTop"
|
<scroll-view scroll-y="true" class="u-m-t-30 xuanji-scroll" :style="{height:xuanjiData.height+'px'}"
|
||||||
scroll-with-animation :show-scrollbar="false">
|
:scroll-top="xuanjiData.scrollTop" :show-scrollbar="false">
|
||||||
<view class="ji-list u-flex u-flex-row u-flex-wrap">
|
<view class="ji-list u-flex u-flex-row u-flex-wrap">
|
||||||
<view class="ji-item u-flex-xy-center u-text-center" @click="jiClick(item,index)"
|
<view class="ji-item u-flex-xy-center u-text-center" @click="jiClick(item,index)"
|
||||||
:class="[nowIndex==index?'active':'',(index+1)%3==0?'mr-0':'','ji-item'+index]"
|
:class="[nowIndex==index?'active':'',(index+1)%3==0?'mr-0':'','ji-item'+index]"
|
||||||
v-for="(item,index) in list" :key="index">
|
v-for="(item,index) in list" :key="index">
|
||||||
<text class="u-font-28" :class="{'color-fff':nowIndex==index}">第{{index+1}}集</text>
|
<text class="u-font-28" :class="{'color-fff':nowIndex==index}">第{{index+1}}集</text>
|
||||||
<view class="lock u-flex-xy-center" v-if="!item.videoUrl">
|
<view class="lock u-flex-xy-center" v-if="!item.videoUrl">
|
||||||
<up-icon name="lock" :size="14" color="#fff"></up-icon>
|
<up-icon name="lock" :size="14" color="#fff"></up-icon>
|
||||||
|
<!-- <image class="lock-icon" src="@/static/images/lock.png" mode=""></image> -->
|
||||||
|
</view>
|
||||||
|
<image v-if="nowIndex==index" class="playing" src="@/static/images/playIng.png" mode="">
|
||||||
|
</image>
|
||||||
</view>
|
</view>
|
||||||
<image v-if="nowIndex==index" class="playing" src="@/static/images/playIng.png" mode="">
|
|
||||||
</image>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
|
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</up-popup>
|
</up-popup>
|
||||||
|
|
||||||
|
|
||||||
<!-- 支付 -->
|
<!-- 支付 -->
|
||||||
<up-popup :show="popup.pay" :round="10" @close="popupClose('pay')" :customStyle="customStyle">
|
<up-popup :show="popup.pay" :round="10" @close="popupClose('pay')" :customStyle="customStyle">
|
||||||
<view class="u-p-30">
|
<view class="u-p-30">
|
||||||
@@ -80,7 +158,7 @@
|
|||||||
<up-icon name="close" :size="16" color="#333" bold @click="popupClose('pay')"></up-icon>
|
<up-icon name="close" :size="16" color="#333" bold @click="popupClose('pay')"></up-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-m-t-30">
|
<view class="u-m-t-30">
|
||||||
<text class=" color-999 u-font-24">每日前10次付款均可获取抽奖机会,抽奖保底抽中付款金额等额红包,红包可直接提现。当前为第1次付款</text>
|
<text class=" color-999 u-font-24">{{paytips}} </text>
|
||||||
</view>
|
</view>
|
||||||
<view class="colo-333 pay-list font-bold u-font-28 u-m-t-20">
|
<view class="colo-333 pay-list font-bold u-font-28 u-m-t-20">
|
||||||
<view class="pay-list-item" v-if="info&&info.price" @click="payBtnClick('money','all')">
|
<view class="pay-list-item" v-if="info&&info.price" @click="payBtnClick('money','all')">
|
||||||
@@ -102,6 +180,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</up-popup>
|
</up-popup>
|
||||||
|
|
||||||
|
|
||||||
<!-- 支付确认 -->
|
<!-- 支付确认 -->
|
||||||
<up-popup :show="popup.payTips" :round="10" @close="popupClose('payTips')" :customStyle="customStyle">
|
<up-popup :show="popup.payTips" :round="10" @close="popupClose('payTips')" :customStyle="customStyle">
|
||||||
<view class="u-p-30">
|
<view class="u-p-30">
|
||||||
@@ -155,7 +235,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</up-popup>
|
</up-popup>
|
||||||
|
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
<my-poster ref="refPoster"></my-poster>
|
<my-poster ref="refPoster"></my-poster>
|
||||||
|
<!-- #endif -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@@ -166,7 +248,6 @@
|
|||||||
getElRect
|
getElRect
|
||||||
} from '@/utils/util.js'
|
} from '@/utils/util.js'
|
||||||
const $common = useCommonStore()
|
const $common = useCommonStore()
|
||||||
|
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
const domModule = uni.requireNativePlugin('dom')
|
const domModule = uni.requireNativePlugin('dom')
|
||||||
// #endif
|
// #endif
|
||||||
@@ -188,12 +269,34 @@
|
|||||||
watch,
|
watch,
|
||||||
nextTick,
|
nextTick,
|
||||||
onMounted,
|
onMounted,
|
||||||
getCurrentInstance
|
getCurrentInstance,
|
||||||
|
onUnmounted
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
|
||||||
|
|
||||||
|
let scrollable=ref(true)
|
||||||
|
|
||||||
|
function progressScroll(){
|
||||||
|
scrollable.value=false
|
||||||
|
}
|
||||||
|
function progressScrollEnd(){
|
||||||
|
scrollable.value=true
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
let isH5 = false
|
||||||
|
// #ifdef H5
|
||||||
|
isH5 = true
|
||||||
|
// #endif
|
||||||
|
const sysinfo = uni.getSystemInfoSync()
|
||||||
|
const isIos = sysinfo.platform == 'ios' ? true : false
|
||||||
|
const isAndriod = sysinfo.platform == 'android' ? true : false
|
||||||
|
const showAndriod = !isH5 && isAndriod ? true : false
|
||||||
let initing = true
|
let initing = true
|
||||||
const refPoster = ref(null)
|
const refPoster = ref(null)
|
||||||
|
|
||||||
|
|
||||||
|
let paytips=ref('')
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
list: {
|
list: {
|
||||||
type: Array,
|
type: Array,
|
||||||
@@ -230,6 +333,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
const control = reactive({
|
const control = reactive({
|
||||||
showBack: true,
|
showBack: true,
|
||||||
showControls: true
|
showControls: true
|
||||||
@@ -237,7 +342,6 @@
|
|||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
control.showControls = false
|
control.showControls = false
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
const customStyle = computed(() => {
|
const customStyle = computed(() => {
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
return {
|
return {
|
||||||
@@ -250,7 +354,6 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
function controlstoggles(e) {
|
function controlstoggles(e) {
|
||||||
console.log(e);
|
|
||||||
control.showControls = e.detail.show
|
control.showControls = e.detail.show
|
||||||
control.showBack = control.showControls
|
control.showBack = control.showControls
|
||||||
}
|
}
|
||||||
@@ -322,7 +425,7 @@
|
|||||||
scrollTop: 0,
|
scrollTop: 0,
|
||||||
items: [],
|
items: [],
|
||||||
scrollHeight: 0,
|
scrollHeight: 0,
|
||||||
height: 400
|
height: 300
|
||||||
})
|
})
|
||||||
const refXuanjiList = ref(null)
|
const refXuanjiList = ref(null)
|
||||||
|
|
||||||
@@ -330,15 +433,19 @@
|
|||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
async function xuanjiInit() {
|
async function xuanjiInit() {
|
||||||
// #ifdef APP
|
|
||||||
const height = 44
|
const height = 44
|
||||||
const marginBottom = 10
|
const marginBottom = 10
|
||||||
const oneItemHeight = height + marginBottom
|
const oneItemHeight = height + marginBottom
|
||||||
xuanjiData.scrollTop = Math.ceil((nowIndex.value + 1) / 3) * oneItemHeight - (xuanjiData.height) / 2 +
|
const scrollTop = Math.ceil((nowIndex.value + 1) / 3) * oneItemHeight - (xuanjiData.height) / 2 +
|
||||||
oneItemHeight / 2
|
oneItemHeight / 2
|
||||||
return
|
if (props.list.length <= 15) {
|
||||||
// #endif
|
xuanjiData.scrollTop = 0
|
||||||
|
return
|
||||||
|
}
|
||||||
|
xuanjiData.scrollTop = scrollTop * 1 < 0 ? 0 : scrollTop
|
||||||
|
|
||||||
|
// #ifdef H5
|
||||||
if (!xuanjiData.items[props.list.length - 1]) {
|
if (!xuanjiData.items[props.list.length - 1]) {
|
||||||
const res = await getElRect('ji-list', instance, {
|
const res = await getElRect('ji-list', instance, {
|
||||||
rect: true
|
rect: true
|
||||||
@@ -361,6 +468,9 @@
|
|||||||
xuanjiData.scrollTop = xuanjiData.items[nowIndex.value].top - (xuanjiData.height) / 2 + (xuanjiData.items[
|
xuanjiData.scrollTop = xuanjiData.items[nowIndex.value].top - (xuanjiData.height) / 2 + (xuanjiData.items[
|
||||||
nowIndex.value].height) / 2
|
nowIndex.value].height) / 2
|
||||||
console.log(xuanjiData);
|
console.log(xuanjiData);
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -377,11 +487,11 @@
|
|||||||
if (!initing) {
|
if (!initing) {
|
||||||
cacheIndex = index
|
cacheIndex = index
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function disappear(item, index) {
|
function disappear(e, item, index) {
|
||||||
|
if (index == nowIndex.value && cacheIndex !== null && !initing) {
|
||||||
if (index == nowIndex.value && cacheIndex != null && !initing) {
|
|
||||||
console.log('disappear' + index);
|
console.log('disappear' + index);
|
||||||
console.log('disappear nowIndex' + nowIndex.value);
|
console.log('disappear nowIndex' + nowIndex.value);
|
||||||
console.log('cacheIndex' + cacheIndex);
|
console.log('cacheIndex' + cacheIndex);
|
||||||
@@ -488,9 +598,9 @@
|
|||||||
videoList.value[newCurrent] = item;
|
videoList.value[newCurrent] = item;
|
||||||
current.value = newCurrent;
|
current.value = newCurrent;
|
||||||
popupClose('show')
|
popupClose('show')
|
||||||
// #ifdef APP
|
if (showAndriod) {
|
||||||
goListPosition(index)
|
goListPosition(index)
|
||||||
// #endif
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let refList = ref([])
|
let refList = ref([])
|
||||||
@@ -508,10 +618,8 @@
|
|||||||
|
|
||||||
function goListPosition(index) {
|
function goListPosition(index) {
|
||||||
clearTimeout(positonmer)
|
clearTimeout(positonmer)
|
||||||
console.log('goListPosition:' + index)
|
|
||||||
const el = refList.value[index]
|
const el = refList.value[index]
|
||||||
if (initing) {
|
if (initing) {
|
||||||
console.log($mountedComponents);
|
|
||||||
if (!$mountedComponents[index]) {
|
if (!$mountedComponents[index]) {
|
||||||
positonmer = setTimeout(() => {
|
positonmer = setTimeout(() => {
|
||||||
goListPosition(index)
|
goListPosition(index)
|
||||||
@@ -533,17 +641,25 @@
|
|||||||
|
|
||||||
|
|
||||||
function popupClose(key) {
|
function popupClose(key) {
|
||||||
|
console.log('popupClose:' + key);
|
||||||
|
if (key == 'show') {
|
||||||
|
// xuanjiData.scrollTop = 0
|
||||||
|
}
|
||||||
if (key) {
|
if (key) {
|
||||||
popup[key] = false
|
popup[key] = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for (let i in popup) {
|
for (let i in popup) {
|
||||||
popup[i] = false
|
if (!i.includes(['data', 'payType'])) {
|
||||||
|
popup[i] = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function popupShow(key = 'show', item, index) {
|
async function popupShow(key = 'show', item, index) {
|
||||||
console.log(item);
|
console.log(key, item, 'debug');
|
||||||
|
console.log('key' + popup[key]);
|
||||||
|
console.log('popupShow');
|
||||||
if (key == 'show') {
|
if (key == 'show') {
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
@@ -553,13 +669,19 @@
|
|||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
xuanjiInit()
|
xuanjiInit()
|
||||||
// #endif
|
// #endif
|
||||||
|
}
|
||||||
|
if(key=='pay'){
|
||||||
|
const res=await Api.getPayTips()
|
||||||
|
console.log(res);
|
||||||
|
paytips.value=res
|
||||||
}
|
}
|
||||||
popup[key] = true
|
popup[key] = true
|
||||||
if (item) {
|
if (item) {
|
||||||
popup.data = item
|
popup.data = item
|
||||||
popup.index = index
|
popup.index = index
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -602,15 +724,14 @@
|
|||||||
let item = props.list.find(v => props.options.courseDetailsId == v.courseDetailsId)
|
let item = props.list.find(v => props.options.courseDetailsId == v.courseDetailsId)
|
||||||
item = item ? item : props.info.current;
|
item = item ? item : props.info.current;
|
||||||
if (JSON.stringify(item) !== '{}') {
|
if (JSON.stringify(item) !== '{}') {
|
||||||
// #ifdef H5
|
if (showAndriod) {
|
||||||
setVideoList(item)
|
nextTick(() => {
|
||||||
// #endif
|
const index = props.list.findIndex(v => v.courseDetailsId == item.courseDetailsId)
|
||||||
// #ifdef APP
|
goListPosition(index)
|
||||||
nextTick(() => {
|
})
|
||||||
const index = props.list.findIndex(v => v.courseDetailsId == item.courseDetailsId)
|
} else {
|
||||||
goListPosition(index)
|
setVideoList(item)
|
||||||
})
|
}
|
||||||
// #endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -707,11 +828,13 @@
|
|||||||
|
|
||||||
|
|
||||||
const insertHistory = debounce(() => {
|
const insertHistory = debounce(() => {
|
||||||
const item = videoList.value[current.value]
|
if (uni.getStorageSync("token")) {
|
||||||
Api.insertHistory({
|
const item = videoList.value[current.value]
|
||||||
courseId: item.courseId,
|
Api.insertHistory({
|
||||||
courseDetailsId: item.courseDetailsId
|
courseId: item.courseId,
|
||||||
})
|
courseDetailsId: item.courseDetailsId
|
||||||
|
})
|
||||||
|
}
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
|
||||||
function swiperChange(e) {
|
function swiperChange(e) {
|
||||||
@@ -723,13 +846,14 @@
|
|||||||
setVideoList(item)
|
setVideoList(item)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const refPopup=ref(null)
|
||||||
function setVideoList(item) {
|
function setVideoList(item) {
|
||||||
|
|
||||||
|
|
||||||
const listLen = props.list.length
|
const listLen = props.list.length
|
||||||
const lastIndex = listLen - 1
|
const lastIndex = listLen - 1
|
||||||
const index = props.list.findIndex(v => v.courseDetailsId == item.courseDetailsId)
|
const index = props.list.findIndex(v => v.courseDetailsId == item.courseDetailsId)
|
||||||
nowIndex.value = index
|
nowIndex.value = index
|
||||||
console.log('setVideoList nowIndex' + index);
|
|
||||||
let position = ''
|
let position = ''
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
position = 'start'
|
position = 'start'
|
||||||
@@ -764,9 +888,12 @@
|
|||||||
videoList.value = [props.list[index + 1], props.list[index - 1], item]
|
videoList.value = [props.list[index + 1], props.list[index - 1], item]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(videoList.value);
|
|
||||||
if (!item.videoUrl) {
|
if (!item.videoUrl) {
|
||||||
popupShow('pay', item, index)
|
nextTick(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
popupShow('pay', item, index)
|
||||||
|
}, 100)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -789,9 +916,9 @@
|
|||||||
})
|
})
|
||||||
watch(() => props.list.length, (newval) => {
|
watch(() => props.list.length, (newval) => {
|
||||||
console.log('props.list.length change' + newval);
|
console.log('props.list.length change' + newval);
|
||||||
// #ifdef H5
|
if (!showAndriod) {
|
||||||
init()
|
init()
|
||||||
// #endif
|
}
|
||||||
})
|
})
|
||||||
watch(() => nowIndex.value, (newval) => {})
|
watch(() => nowIndex.value, (newval) => {})
|
||||||
const nowDanjiPrice = computed(() => {
|
const nowDanjiPrice = computed(() => {
|
||||||
@@ -822,10 +949,10 @@
|
|||||||
* @param {type} = [start,end]
|
* @param {type} = [start,end]
|
||||||
*/
|
*/
|
||||||
const playStatusChange = debounce((data) => {
|
const playStatusChange = debounce((data) => {
|
||||||
Api.playStatus(data)
|
Api.playStatus(data)
|
||||||
}, 2000)
|
}, 2000)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
videoListUpdata
|
videoListUpdata
|
||||||
@@ -941,7 +1068,7 @@
|
|||||||
|
|
||||||
.ji-list {
|
.ji-list {
|
||||||
.ji-item {
|
.ji-item {
|
||||||
width: 210rpx;
|
width: 208rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
margin-right: 30rpx;
|
margin-right: 30rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
@@ -967,6 +1094,11 @@
|
|||||||
padding: 2rpx 4rpx;
|
padding: 2rpx 4rpx;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
||||||
|
.lock-icon {
|
||||||
|
width: 24rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.playing {
|
.playing {
|
||||||
@@ -978,7 +1110,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.ji-item:nth-of-type(3n) {
|
.ji-item:nth-of-type(3n) {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
@@ -1041,9 +1174,48 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
.playing {}
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
|
|
||||||
|
.playing {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mask {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 2000;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: rgba(0, 0, 0, .5);
|
||||||
|
justify-content: end;
|
||||||
|
transition: transform .3s ease-in-out;
|
||||||
|
transform: translateY(100vh);
|
||||||
|
|
||||||
|
&.mask-show {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.box {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
border-radius: 10px 10px 0 0;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.xuanji-box {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
border-radius: 10px 10px 0 0;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
68
components/my-video-list/progress.vue
Normal file
68
components/my-video-list/progress.vue
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
<template>
|
||||||
|
<view class="progress-box">
|
||||||
|
<view class="line" :style="{width:percent+'px'}">
|
||||||
|
</view>
|
||||||
|
<view class="block" @touchstart="progressTouchStart" @touchmove="progressTouchMove"
|
||||||
|
:style="{transform:'translateX('+percent+'px)'}"
|
||||||
|
@touchend="progressTouchEnd"></view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {
|
||||||
|
ref
|
||||||
|
} from 'vue';
|
||||||
|
const props=defineProps({
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
let percent=ref(50)
|
||||||
|
//进度条
|
||||||
|
let progressIsTouch = false
|
||||||
|
let start = 0
|
||||||
|
function progressTouchStart(e) {
|
||||||
|
console.log(e);
|
||||||
|
start = e.touches[0].clientX
|
||||||
|
progressIsTouch = true
|
||||||
|
}
|
||||||
|
|
||||||
|
function progressTouchMove(e) {
|
||||||
|
console.log(e);
|
||||||
|
const step = 1;
|
||||||
|
playPercent.value += step
|
||||||
|
}
|
||||||
|
|
||||||
|
function progressTouchEnd(e) {
|
||||||
|
console.log(e);
|
||||||
|
progressIsTouch = false
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.progress-box {
|
||||||
|
border-radius: 20px;
|
||||||
|
height: 5px;
|
||||||
|
margin: 4px 0;
|
||||||
|
background-color: rgba(255, 255, 255, .6);
|
||||||
|
box-shadow: 0 0 1px #eee;
|
||||||
|
flex-direction: row;
|
||||||
|
overflow: visible;
|
||||||
|
.line {
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 20px;
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
$block-size: 8px;
|
||||||
|
.block {
|
||||||
|
top: -1px;
|
||||||
|
left: 0;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 2;
|
||||||
|
width: $block-size;
|
||||||
|
height: $block-size;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 50%;
|
||||||
|
box-shadow: 0 0 1px #eee;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
14
http/http.js
14
http/http.js
@@ -58,7 +58,7 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
|
|||||||
// 避免混淆重新命名
|
// 避免混淆重新命名
|
||||||
let bodyData = data;
|
let bodyData = data;
|
||||||
if (isreturm) {
|
if (isreturm) {
|
||||||
return Promise.resolve(bodyData.data || bodyData.page || bodyData);
|
return Promise.resolve(bodyData);
|
||||||
}
|
}
|
||||||
if (statusCode == 500) {
|
if (statusCode == 500) {
|
||||||
isShowErrorToast = true;
|
isShowErrorToast = true;
|
||||||
@@ -73,8 +73,6 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
|
|||||||
// http响应码不正确
|
// http响应码不正确
|
||||||
if (statusCode != 200 && statusCode != 204 && statusCode != 201) {
|
if (statusCode != 200 && statusCode != 204 && statusCode != 201) {
|
||||||
isShowErrorToast = true;
|
isShowErrorToast = true;
|
||||||
data.message =
|
|
||||||
data.message == "Bad credentials" ? "用户名或密码错误" : data.message;
|
|
||||||
infoBox.showToast(data.message || "服务器异常");
|
infoBox.showToast(data.message || "服务器异常");
|
||||||
return Promise.reject(bodyData); // 跳转到catch函数
|
return Promise.reject(bodyData); // 跳转到catch函数
|
||||||
}
|
}
|
||||||
@@ -122,14 +120,12 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (res.code == 401) {
|
if (res.code == 401) {
|
||||||
infoBox.showToast(res.message || "请登录").then(() => {
|
uni.redirectTo({
|
||||||
uni.redirectTo({
|
url: "/pages/login/login",
|
||||||
url: "/pages/login/login",
|
|
||||||
});
|
|
||||||
reject();
|
|
||||||
});
|
});
|
||||||
|
reject();
|
||||||
}
|
}
|
||||||
if (res.code != 0) {
|
if (res.code != 0&&res.code != 401) {
|
||||||
infoBox.showToast(res.msg).then(() => {});
|
infoBox.showToast(res.msg).then(() => {});
|
||||||
reject();
|
reject();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name" : "duanju-app-v3",
|
"name" : "斯耀短剧",
|
||||||
"appid" : "__UNI__E0B05B1",
|
"appid" : "__UNI__E0B05B1",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.0",
|
"versionName" : "1.2.5",
|
||||||
"versionCode" : 100,
|
"versionCode" : 125,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
"unipush" : {}
|
"unipush" : {}
|
||||||
},
|
},
|
||||||
"ad" : {
|
"ad" : {
|
||||||
"gdt" : {}
|
"ks" : {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
|
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
|
||||||
|
|||||||
15
pages.json
15
pages.json
@@ -32,7 +32,8 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/task/index",
|
"path": "pages/task/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "任务大厅"
|
"navigationBarTitleText": "任务大厅",
|
||||||
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/chasingDrama/index",
|
"path": "pages/chasingDrama/index",
|
||||||
@@ -254,5 +255,15 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"uniIdRouter": {}
|
"uniIdRouter": {},
|
||||||
|
"condition" : { //模式配置,仅开发期间生效
|
||||||
|
"current": 0, //当前激活的模式(list 的索引项)
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"name": "", //模式名称
|
||||||
|
"path": "", //启动页面,必选
|
||||||
|
"query": "" //启动参数,在页面的onLoad函数里面得到
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
function seVideo(item) {
|
function seVideo(item) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:"/pages/video/detail?courseId="+item.courseId+"&courseDetailsId="+item.courseDetailsId
|
url: "/pages/video/detail?courseId=" + item.courseId + "&courseDetailsId=" + item.courseDetailsId
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
.contentlist {
|
.contentlist {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-around;
|
justify-content: space-between;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
padding: 0 26rpx;
|
padding: 0 26rpx;
|
||||||
@@ -44,17 +44,19 @@
|
|||||||
border-radius: 21rpx 21rpx 21rpx 21rpx;
|
border-radius: 21rpx 21rpx 21rpx 21rpx;
|
||||||
width: 30%;
|
width: 30%;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
>view {
|
>view {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 25rpx;
|
font-size: 25rpx;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
margin-left: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.liststyle:last-child {
|
// .liststyle:last-child {
|
||||||
// margin-right: auto;
|
// margin-right: auto;
|
||||||
// margin-left: 6rpx;
|
// margin-left: 6rpx;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<template v-if="$common.isIosExamine()">
|
<template v-if="datas.isExamine">
|
||||||
<view class="gongao">
|
<view class="gongao">
|
||||||
<view class="gongaoicon">
|
<view class="gongaoicon">
|
||||||
公告
|
公告
|
||||||
@@ -42,27 +42,37 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<contentlist :list='datas.list'></contentlist>
|
<contentlist :list='datas.list'></contentlist>
|
||||||
<image v-if="$common.isIosExamine()" @click="goMsg()" src="@/static/index/red-pack-new.gif"
|
<image v-if="datas.isExamine" @click="goMsg()" src="@/static/index/red-pack-new.gif"
|
||||||
style="width: 200rpx;height: 200rpx;position: fixed;right: 10rpx;bottom: 180rpx;" mode=""></image>
|
style="width: 200rpx;height: 200rpx;position: fixed;right: 10rpx;bottom: 180rpx;" mode=""></image>
|
||||||
<up-modal :show="datas.version.show" :confirm-text="datas.version.confirmText"
|
<up-modal :show="datas.version.show" :confirm-text="datas.version.confirmText"
|
||||||
:showCancelButton="datas.version.cancelText!=''" @confirm='confirmUpdateVersion' :title="datas.version.title"
|
:showCancelButton="datas.version.cancelText!=''" @cancel="cancelUpdateVersion" @confirm='confirmUpdateVersion'
|
||||||
:title-style="{ fontWeight: '700' }" confirm-color="rgb(255, 117, 129)" @cancel="datas.version.show = false">
|
:title="datas.version.title" :title-style="{ fontWeight: '700' }" confirm-color="rgb(255, 117, 129)">
|
||||||
<view class="" style="padding-top: 30rpx;text-align: left;">
|
<view class="" style="padding-top: 30rpx;text-align: left;">
|
||||||
<scroll-view scroll-y="true" style="max-height: 50vh;">
|
<scroll-view scroll-y="true" style="max-height: 50vh;">
|
||||||
<rich-text style="color:#666" :nodes="datas.version.content"></rich-text>
|
<!-- <rich-text style="color:#666" :nodes="datas.version.content"></rich-text> -->
|
||||||
|
<view style="text-align: justify;font-size: 18px;color: #666;" v-html="datas.version.content"></view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</up-modal>
|
</up-modal>
|
||||||
<up-modal :show="datas.ruleShow" v-if="$common.isIosExamine()&&!datas.version.show" confirm-text="知道了" title="规则说明"
|
|
||||||
:title="datas.rule_title" :title-style="{fontWeight:'700'}" @confirm="ruleConfirm"
|
<!-- h5关闭通知 -->
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<up-modal :show="datas.stopShow"
|
||||||
|
cancel-text="知道了"
|
||||||
|
show-cancel-button
|
||||||
|
confirm-text="去下载" title="重要通知"
|
||||||
|
@cancel="stopCancel"
|
||||||
|
:title="datas.rule_title" :title-style="{fontWeight:'700'}" @confirm="stopConfirm"
|
||||||
confirm-color="rgb(255, 117, 129)">
|
confirm-color="rgb(255, 117, 129)">
|
||||||
<view class="u-p-30 u-text-left">
|
<view class="color-red u-text-left">
|
||||||
<scroll-view scroll-y="true" style="max-height: 50vh;">
|
<text>2025年2月8日将关闭网页访问,请及时下载最新APP</text>
|
||||||
<rich-text style="text-align: justify;font-size: 18px;color: #666;"
|
|
||||||
:nodes="datas.rule_content"></rich-text>
|
|
||||||
</scroll-view>
|
|
||||||
</view>
|
</view>
|
||||||
</up-modal>
|
</up-modal>
|
||||||
|
<!-- #endif -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@@ -93,9 +103,19 @@
|
|||||||
useCommonStore
|
useCommonStore
|
||||||
} from '@/store/common.js'
|
} from '@/store/common.js'
|
||||||
const $common = useCommonStore()
|
const $common = useCommonStore()
|
||||||
onShow(()=>{
|
onShow(() => {
|
||||||
|
// console.log('cash:' + uni.getStorageSync('userInfo').userId + "" + new Date().getTime(), 'debug')
|
||||||
// 判断ios是否审核
|
// 判断ios是否审核
|
||||||
$common.init()
|
$common.init()
|
||||||
|
// #ifdef H5
|
||||||
|
datas.isExamine = $common.isIosExamine
|
||||||
|
// #endif
|
||||||
|
// let sysInfo = uni.getSystemInfoSync()
|
||||||
|
// let isIos = sysInfo.platform == 'ios'
|
||||||
|
// if (isIos) {
|
||||||
|
// datas.setindexdata = $common.setversion
|
||||||
|
// console.log(datas.setindexdata,'seaeasdas')
|
||||||
|
// }
|
||||||
})
|
})
|
||||||
let datas = reactive({
|
let datas = reactive({
|
||||||
noticeList: [], //公告列表
|
noticeList: [], //公告列表
|
||||||
@@ -104,29 +124,30 @@
|
|||||||
|
|
||||||
list: [], // 底部短剧内容
|
list: [], // 底部短剧内容
|
||||||
page: 1, // 首页推荐分页
|
page: 1, // 首页推荐分页
|
||||||
|
stopShow:true,//h5关闭弹窗
|
||||||
ruleShow: false,
|
ruleShow: false,
|
||||||
rule_title: '', // 首页弹窗标题
|
rule_title: '', // 首页弹窗标题
|
||||||
rule_content: '', // 首页弹窗内容
|
rule_content: '', // 首页弹窗内容
|
||||||
ruleIndex: 0,
|
ruleIndex: 0,
|
||||||
ruleList: [],
|
ruleList: [],
|
||||||
|
|
||||||
version: {
|
version: {
|
||||||
show: false,
|
show: false,
|
||||||
title: "",
|
title: "",
|
||||||
content: "",
|
content: "",
|
||||||
confirmText: "",
|
confirmText: "",
|
||||||
cancelText: "",
|
cancelText: "",
|
||||||
}
|
downloadLink: ""
|
||||||
|
},
|
||||||
|
setindexdata: false
|
||||||
})
|
})
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
versionUpdate()
|
versionUpdate()
|
||||||
getMsg()
|
getMsg()
|
||||||
getrecomVideo()
|
getrecomVideo()
|
||||||
datas.isExamine = $common.isExamine || 0
|
|
||||||
})
|
})
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
if(!uni.getStorageSync('ruleShow')){
|
if (!uni.getStorageSync('ruleShow')) {
|
||||||
announcement({
|
announcement({
|
||||||
type: 0
|
type: 0
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
@@ -137,21 +158,31 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
onReachBottom(() => {
|
onReachBottom(() => {
|
||||||
++datas.page
|
++datas.page
|
||||||
getrecomVideo()
|
getrecomVideo()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function stopConfirm(){
|
||||||
|
datas.stopShow=false
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/login/download'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
function stopCancel(){
|
||||||
|
datas.stopShow=false
|
||||||
|
}
|
||||||
function versionUpdate() {
|
function versionUpdate() {
|
||||||
//#ifdef APP-PLUS
|
//#ifdef APP-PLUS
|
||||||
plus.screen.lockOrientation('portrait-primary'); //竖屏正方向锁定
|
plus.screen.lockOrientation('portrait-primary'); //竖屏正方向锁定
|
||||||
//获取当前系统版本信息
|
//获取当前系统版本信息
|
||||||
plus.runtime.getProperty(plus.runtime.appid, widgetInfo => {
|
plus.runtime.getProperty(plus.runtime.appid, widgetInfo => {
|
||||||
//请求后台接口 解析数据 对比版本
|
//请求后台接口 解析数据 对比版本
|
||||||
selectNewApp().then(res => {
|
selectNewApp().then(async res => {
|
||||||
res = res[0];
|
res = res[0];
|
||||||
|
console.log(uni.getSystemInfoSync().platform == 'ios', 1101)
|
||||||
let version;
|
let version;
|
||||||
if (uni.getSystemInfoSync().platform == 'android') {
|
if (uni.getSystemInfoSync().platform == 'android') {
|
||||||
version = res.version
|
version = res.version
|
||||||
@@ -159,16 +190,15 @@
|
|||||||
if (uni.getSystemInfoSync().platform == 'ios') {
|
if (uni.getSystemInfoSync().platform == 'ios') {
|
||||||
version = res.iosVersion
|
version = res.iosVersion
|
||||||
}
|
}
|
||||||
console.log(widgetInfo.version + '---' + version)
|
let isVersion = await $common.setversion(widgetInfo.version, version)
|
||||||
version = res.version
|
datas.isExamine = $common.isIosExamine
|
||||||
// && uni.getSystemInfoSync().platform == 'android'
|
console.log(isVersion, '')
|
||||||
if (widgetInfo.version < version) {
|
if (isVersion == 1) {
|
||||||
let downloadLink = '';
|
datas.version.downloadLink = res.androidWgtUrl;
|
||||||
let androidLink = res.androidWgtUrl;
|
|
||||||
let iosLink = res.iosWgtUrl;
|
|
||||||
datas.version.show = true;
|
datas.version.show = true;
|
||||||
datas.version.title = "发现新版本";
|
datas.version.title = "发现新版本";
|
||||||
datas.version.content = res.des;
|
datas.version.content = res.des;
|
||||||
|
uni.hideTabBar()
|
||||||
if (res.method == "true") {
|
if (res.method == "true") {
|
||||||
datas.version.confirmText = "立即更新"
|
datas.version.confirmText = "立即更新"
|
||||||
} else {
|
} else {
|
||||||
@@ -182,6 +212,11 @@
|
|||||||
//#endif
|
//#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function cancelUpdateVersion() {
|
||||||
|
uni.showTabBar()
|
||||||
|
datas.version.show = false
|
||||||
|
}
|
||||||
|
|
||||||
function confirmUpdateVersion() {
|
function confirmUpdateVersion() {
|
||||||
// plus.runtime.openURL(config.baseUrl + '/pages/login/appEq')
|
// plus.runtime.openURL(config.baseUrl + '/pages/login/appEq')
|
||||||
linkTo('/pages/login/download')
|
linkTo('/pages/login/download')
|
||||||
@@ -192,7 +227,7 @@
|
|||||||
});
|
});
|
||||||
if (uni.getSystemInfoSync().platform == 'android') {
|
if (uni.getSystemInfoSync().platform == 'android') {
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
url: androidLink,
|
url: datas.version.downloadLink,
|
||||||
success: downloadResult => {
|
success: downloadResult => {
|
||||||
console.log(downloadResult)
|
console.log(downloadResult)
|
||||||
if (downloadResult.statusCode === 200) {
|
if (downloadResult.statusCode === 200) {
|
||||||
@@ -215,7 +250,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (uni.getSystemInfoSync().platform == 'ios') {
|
if (uni.getSystemInfoSync().platform == 'ios') {
|
||||||
plus.runtime.openURL(iosLink, function(res) {});
|
plus.runtime.openURL(datas.version.downloadLink, function(res) {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
|
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<image class="logo" src="/static/download/appLogo.png"></image>
|
<image class="logo" src="/static/download/appLogo.png"></image>
|
||||||
<view style="font-size: 40rpx;margin-top: 22rpx;color: #FFFFFF;font-weight: bold;">斯耀短剧APP</view>
|
<view style="font-size: 40rpx;margin-top: 22rpx;color: #FFFFFF;font-weight: bold;">{{data.confirmBtn}}</view>
|
||||||
<view style="font-size: 28rpx;margin-top: 16rpx;color: #FFFFFF;font-weight: bold;">海量电子榨菜 免费又过瘾</view>
|
<view style="font-size: 28rpx;margin-top: 16rpx;color: #FFFFFF;font-weight: bold;">海量电子榨菜 免费又过瘾</view>
|
||||||
<button class="confirm-btn" @click="download">{{data.confirmBtn}}</button>
|
<button class="confirm-btn" @click="download">点击下载{{data.confirmBtn}}</button>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
let u = window.navigator.userAgent;
|
let u = window.navigator.userAgent;
|
||||||
if ( uni.getSystemInfoSync().platform == 'ios') {
|
if ( uni.getSystemInfoSync().platform == 'ios') {
|
||||||
data.confirmBtn = "跳转网页版首页"
|
data.confirmBtn = "顺享短剧APP"
|
||||||
}
|
}
|
||||||
if ( u.toLowerCase().indexOf('micromessenger') !== -1) {
|
if ( u.toLowerCase().indexOf('micromessenger') !== -1) {
|
||||||
data.isWeixin = true
|
data.isWeixin = true
|
||||||
@@ -45,54 +45,22 @@
|
|||||||
console.log(uni.getSystemInfoSync().platform == 'android')
|
console.log(uni.getSystemInfoSync().platform == 'android')
|
||||||
if (uni.getSystemInfoSync().platform == 'android') {
|
if (uni.getSystemInfoSync().platform == 'android') {
|
||||||
commonType(49).then(res => {
|
commonType(49).then(res => {
|
||||||
console.log(res)
|
|
||||||
if (res && res.value) {
|
if (res && res.value) {
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
plus.runtime.openURL(res.value, function(res) {
|
plus.runtime.openURL(res.value, function(res) {});
|
||||||
|
|
||||||
});
|
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
uni.setClipboardData({
|
|
||||||
data: res.value,
|
|
||||||
success: r => {
|
|
||||||
// this.$queue.showToast('邀请码复制成功');
|
|
||||||
uni.showToast({
|
|
||||||
title: '邀请码复制成功',
|
|
||||||
icon: 'none',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
window.location.href = res.value;
|
window.location.href = res.value;
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
commonType(50).then(res => {
|
// #ifndef H5
|
||||||
if (res && res.value) {
|
plus.runtime.openURL('https://apps.apple.com/cn/app/%E9%A1%BA%E4%BA%AB%E7%9F%AD%E5%89%A7/id6740074541', function(res) {});
|
||||||
// #ifndef H5
|
// #endif
|
||||||
plus.runtime.openURL(res.value, function(res) {
|
// #ifdef H5
|
||||||
|
window.location.href = 'https://apps.apple.com/cn/app/%E9%A1%BA%E4%BA%AB%E7%9F%AD%E5%89%A7/id6740074541';
|
||||||
});
|
// #endif
|
||||||
// #endif
|
|
||||||
// #ifdef H5
|
|
||||||
uni.setClipboardData({
|
|
||||||
data: res.value,
|
|
||||||
success: r => {
|
|
||||||
uni.showToast({
|
|
||||||
title: '邀请码复制成功',
|
|
||||||
icon: 'none',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/index/index'
|
|
||||||
})
|
|
||||||
// window.location.href = res.data.value;
|
|
||||||
// #endif
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,20 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="nav" style="width: 100%;height: 96rpx;"></view>
|
|
||||||
<view class="bg" >
|
<view class="bg" >
|
||||||
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
|
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="wrapper u-relative" style="padding-top: 48rpx;box-sizing: border-box;">
|
<view class="wrapper u-relative" style="padding-top: 48rpx;box-sizing: border-box;">
|
||||||
|
<view class="nav" style="width: 100%;height: 96rpx;"></view>
|
||||||
<view class="input-content">
|
<view class="input-content">
|
||||||
<view style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">重置密码</view>
|
<view style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">重置密码</view>
|
||||||
<view class="cu-form-group">
|
<view class="cu-form-group">
|
||||||
<view class="title">手机号</view>
|
<view class="title">手机号</view>
|
||||||
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
|
<view class="input" style="padding-left: 20rpx;">
|
||||||
@input="inputChange" />
|
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
|
||||||
|
@input="inputChange" />
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-form-group">
|
<view class="cu-form-group">
|
||||||
<text class="title">验证码</text>
|
<text class="title">验证码</text>
|
||||||
<view class="input flex">
|
<view class="input flex" style="padding-left: 20rpx;padding-right: 20rpx;">
|
||||||
<input type="number" :value="data.code" placeholder="请输入验证码" maxlength="6" data-key="code"
|
<input type="number" :value="data.code" placeholder="请输入验证码" maxlength="6" data-key="code"
|
||||||
@input="inputChange" @confirm="reset" />
|
@input="inputChange" @confirm="reset" />
|
||||||
<button class="send-msg" @click="sendMsg" :disabled="data.sending">{{ data.sendTime }}</button>
|
<button class="send-msg" @click="sendMsg" :disabled="data.sending">{{ data.sendTime }}</button>
|
||||||
@@ -23,8 +26,11 @@
|
|||||||
|
|
||||||
<view class="cu-form-group">
|
<view class="cu-form-group">
|
||||||
<text class="title">设置密码</text>
|
<text class="title">设置密码</text>
|
||||||
<input class="input" type="password" :value="data.password" placeholder="请设置新密码" placeholder-class="input-empty"
|
<view class="input" style="padding-left: 20rpx;">
|
||||||
maxlength="20" minlength="6" data-key="password" @input="inputChange" @confirm="reset" />
|
<input class="input" type="password" :value="data.password" placeholder="请设置新密码" placeholder-class="input-empty"
|
||||||
|
maxlength="20" minlength="6" data-key="password" @input="inputChange" @confirm="reset" />
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<button class="confirm-btn" @click="reset">立即重置</button>
|
<button class="confirm-btn" @click="reset">立即重置</button>
|
||||||
</view>
|
</view>
|
||||||
@@ -188,10 +194,10 @@
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
position: absolute;
|
// position: absolute;
|
||||||
left: 0;
|
// left: 0;
|
||||||
right: 0;
|
// right: 0;
|
||||||
bottom: 78rpx;
|
// bottom: 78rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
.cuIcon::before{
|
.cuIcon::before{
|
||||||
@@ -254,14 +260,20 @@
|
|||||||
}
|
}
|
||||||
.input{
|
.input{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 84rpx;
|
// height: 84rpx;
|
||||||
line-height: 84rpx;
|
// line-height: 84rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 22rpx 32rpx 22rpx 24rpx;
|
// padding: 22rpx 32rpx 22rpx 24rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
input{
|
||||||
|
height: 84rpx!important;
|
||||||
|
}
|
||||||
|
v-deep .uni-input-input{
|
||||||
|
height: 84rpx!important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="nav" style="width: 100%;height: 96rpx;"></view>
|
|
||||||
<view class="bg" >
|
<view class="bg" >
|
||||||
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
|
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="wrapper">
|
<view class="wrapper">
|
||||||
|
<view class="nav" style="width: 100%;height: 96rpx;"></view>
|
||||||
<view class="input-content">
|
<view class="input-content">
|
||||||
<view style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">登录</view>
|
<view style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">登录</view>
|
||||||
|
|
||||||
<view class="cu-form-group">
|
<view class="cu-form-group">
|
||||||
<view class="title">手机号</view>
|
<view class="title">手机号</view>
|
||||||
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
|
<view class="input" style="padding-left: 20rpx;">
|
||||||
@input="inputChange" />
|
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
|
||||||
|
@input="inputChange" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="cu-form-group">
|
<view class="cu-form-group">
|
||||||
<text class="title">密码</text>
|
<text class="title">密码</text>
|
||||||
<view class="input flex" style="padding-left: 0;">
|
<view class="input flex" style="padding-left: 20rpx;padding-right: 20rpx;">
|
||||||
<input class="input" type="password" :value="data.password" placeholder="请输入密码" placeholder-class="input-empty"
|
<input class="input" type="password" :value="data.password" placeholder="请输入密码" placeholder-class="input-empty"
|
||||||
maxlength="20" minlength="6" data-key="password" @input="inputChange" @confirm="toLogin" />
|
maxlength="20" minlength="6" data-key="password" @input="inputChange" @confirm="toLogin" />
|
||||||
<text class="send-msg" @click="linkTo('/pages/login/forgetPwd')" style="flex-shrink: 0;">忘记密码</text>
|
<text class="send-msg" @click="linkTo('/pages/login/forgetPwd')" style="flex-shrink: 0;">忘记密码</text>
|
||||||
@@ -222,11 +224,17 @@
|
|||||||
}
|
}
|
||||||
.cu-form-group .input{
|
.cu-form-group .input{
|
||||||
width: 100%!important;
|
width: 100%!important;
|
||||||
height: 84rpx;
|
// height: 84rpx;
|
||||||
line-height: 84rpx;
|
// line-height: 84rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 22rpx 32rpx 22rpx 24rpx;
|
// padding: 22rpx 32rpx 22rpx 24rpx!important;
|
||||||
|
input{
|
||||||
|
height: 84rpx!important;
|
||||||
|
}
|
||||||
|
v-deep .uni-input-input{
|
||||||
|
height: 84rpx!important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.flex{
|
.flex{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -1,21 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="nav" style="width: 100%;height: 96rpx;"></view>
|
|
||||||
<view class="bg" >
|
<view class="bg" >
|
||||||
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
|
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="wrapper u-relative" style="padding-top: 48rpx;box-sizing: border-box;">
|
<view class="wrapper u-relative" style="padding-top: 48rpx;box-sizing: border-box;">
|
||||||
|
<view class="nav" style="width: 100%;height: 96rpx;"></view>
|
||||||
<view class="input-content">
|
<view class="input-content">
|
||||||
<view style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">注册</view>
|
<view style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">注册</view>
|
||||||
|
|
||||||
<view class="cu-form-group">
|
<view class="cu-form-group">
|
||||||
<view class="title">手机号</view>
|
<view class="title">手机号</view>
|
||||||
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
|
<view class="input" style="padding-left: 20rpx;">
|
||||||
@input="inputChange" />
|
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
|
||||||
|
@input="inputChange" />
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-form-group">
|
<view class="cu-form-group">
|
||||||
<text class="title">验证码</text>
|
<text class="title">验证码</text>
|
||||||
<view class="input flex">
|
<view class="input flex" style="padding-left: 20rpx;padding-right: 20rpx;">
|
||||||
<input type="number" :value="data.code" placeholder="请输入验证码" maxlength="6" data-key="code"
|
<input type="number" :value="data.code" placeholder="请输入验证码" maxlength="6" data-key="code"
|
||||||
@input="inputChange" @confirm="toRegister" />
|
@input="inputChange" @confirm="toRegister" />
|
||||||
<button class="send-msg" @click="sendMsg" :disabled="data.sending">{{ data.sendTime }}</button>
|
<button class="send-msg" @click="sendMsg" :disabled="data.sending">{{ data.sendTime }}</button>
|
||||||
@@ -24,8 +27,11 @@
|
|||||||
|
|
||||||
<view class="cu-form-group">
|
<view class="cu-form-group">
|
||||||
<text class="title">设置密码</text>
|
<text class="title">设置密码</text>
|
||||||
<input class="input" type="password" :value="data.password" placeholder="请设置新密码" placeholder-class="input-empty"
|
<view class="input" style="padding-left: 20rpx;">
|
||||||
maxlength="20" minlength="6" data-key="password" @input="inputChange" @confirm="toRegister" />
|
<input class="input" type="password" :value="data.password" placeholder="请设置新密码" placeholder-class="input-empty"
|
||||||
|
maxlength="20" minlength="6" data-key="password" @input="inputChange" @confirm="toRegister" />
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<button class="confirm-btn" @click="toRegister">注册</button>
|
<button class="confirm-btn" @click="toRegister">注册</button>
|
||||||
<button class="confirm-btn" @click="toLogin">登录</button>
|
<button class="confirm-btn" @click="toLogin">登录</button>
|
||||||
@@ -270,7 +276,7 @@
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" >
|
<style lang="scss" scoped>
|
||||||
page {
|
page {
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
}
|
}
|
||||||
@@ -299,10 +305,7 @@
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
position: absolute;
|
margin-top: 50rpx;
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 178rpx;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.cuIcon::before{
|
.cuIcon::before{
|
||||||
@@ -324,12 +327,15 @@
|
|||||||
color: #EC6F48;
|
color: #EC6F48;
|
||||||
border: none;
|
border: none;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
.send-msg::after{
|
.send-msg::after{
|
||||||
border: none;
|
border: none;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -363,14 +369,20 @@
|
|||||||
}
|
}
|
||||||
.input{
|
.input{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 84rpx;
|
// height: 84rpx;
|
||||||
line-height: 84rpx;
|
// line-height: 84rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 22rpx 32rpx 22rpx 24rpx;
|
// padding: 22rpx 32rpx 22rpx 24rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
input{
|
||||||
|
height: 84rpx!important;
|
||||||
|
}
|
||||||
|
v-deep .uni-input-input{
|
||||||
|
height: 84rpx!important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -311,10 +311,10 @@
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
position: absolute;
|
// position: absolute;
|
||||||
left: 0;
|
// left: 0;
|
||||||
right: 0;
|
// right: 0;
|
||||||
bottom: 178rpx;
|
// bottom: 178rpx;
|
||||||
.cuIcon::before{
|
.cuIcon::before{
|
||||||
width: 30rpx;
|
width: 30rpx;
|
||||||
height: 30rpx;
|
height: 30rpx;
|
||||||
|
|||||||
@@ -9,14 +9,12 @@
|
|||||||
<image class="img" src="/static/logo.png" mode="widthFix"></image>
|
<image class="img" src="/static/logo.png" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="quick-menu">
|
<view class="quick-menu">
|
||||||
<image class="icon" src="/static/me/logo_btn1.png" mode="aspectFit" @click="linkTo('/pages/share/index')"></image>
|
<image class="icon" src="/static/me/logo_btn1.png" mode="aspectFit" @click="linkTo('/pages/share/index', true)"></image>
|
||||||
<image class="icon" src="/static/me/logo_btn2.png" mode="aspectFit" @click="linkTo('/pages/me/message', true)"></image>
|
<image class="icon" src="/static/me/logo_btn2.png" mode="aspectFit" @click="linkTo('/pages/me/message', true)"></image>
|
||||||
<navigator hover-class="none" url="/pages/me/contact">
|
<image class="icon" src="/static/me/logo_btn3.png" mode="aspectFit" @click="linkTo('/pages/me/contact', true)"></image>
|
||||||
<image class="icon" src="/static/me/logo_btn3.png" mode="aspectFit"></image>
|
|
||||||
</navigator>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="top" @click="linkTo('/pages/me/userInfo')">
|
<view class="top" @click="linkTo(userInfo.phone?'/pages/me/userInfo':'/pages/login/login')">
|
||||||
<image class="avatar" :src="userInfo.avatar || '/static/default_avatar.png'" mode="aspectFill"></image>
|
<image class="avatar" :src="userInfo.avatar || '/static/default_avatar.png'" mode="aspectFill"></image>
|
||||||
<view class="info-wrap">
|
<view class="info-wrap">
|
||||||
<view class="name">{{ userInfo.phone || '请登录' }}</view>
|
<view class="name">{{ userInfo.phone || '请登录' }}</view>
|
||||||
@@ -31,7 +29,7 @@
|
|||||||
<view class="title">我的追剧</view>
|
<view class="title">我的追剧</view>
|
||||||
<view class="num">{{ likeData.collectCount }}</view>
|
<view class="num">{{ likeData.collectCount }}</view>
|
||||||
</navigator>
|
</navigator>
|
||||||
<view class="item" v-if="$common.isIosExamine()" @click="linkTo('/pages/me/withdraw/index')">
|
<view class="item" v-if="$common.isIosExamine" @click="linkTo('/pages/me/withdraw/index',true)">
|
||||||
<view class="title">我的红包</view>
|
<view class="title">我的红包</view>
|
||||||
<view class="num">{{ amount || 0 }}</view>
|
<view class="num">{{ amount || 0 }}</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -43,16 +41,18 @@
|
|||||||
<image class="icon" src="/static/me/gold_icon.png" mode="aspectFit"></image>
|
<image class="icon" src="/static/me/gold_icon.png" mode="aspectFit"></image>
|
||||||
<view class="num">{{ gold }}</view>
|
<view class="num">{{ gold }}</view>
|
||||||
</view>
|
</view>
|
||||||
<navigator hover-class="none" url="/pages/me/gold_record">
|
<div @click="linkTo('/pages/me/gold_record', true)">
|
||||||
<view class="btn">金币明细</view>
|
<view class="btn">金币明细</view>
|
||||||
</navigator>
|
</div>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<navigator class="title-wrap" hover-class="none" url="/pages/watching_history/watching_history?type=3">
|
<div class="title-wrap" @click="linkTo('/pages/watching_history/watching_history?type=3', true)">
|
||||||
<view class="a">
|
<view class="a">
|
||||||
<view class="t">观看历史</view>
|
<view class="t">观看历史</view>
|
||||||
<up-icon name="arrow-right"></up-icon>
|
<up-icon name="arrow-right"></up-icon>
|
||||||
</view>
|
</view>
|
||||||
</navigator>
|
</div>
|
||||||
|
|
||||||
<view class="history-list">
|
<view class="history-list">
|
||||||
<view
|
<view
|
||||||
class="item"
|
class="item"
|
||||||
@@ -179,11 +179,14 @@ onPullDownRefresh(async () => {
|
|||||||
}, 500);
|
}, 500);
|
||||||
});
|
});
|
||||||
|
|
||||||
onLoad(() => {
|
onShow(() => {
|
||||||
selectByUserIdAjax();
|
if(uni.getStorageSync('token')){
|
||||||
collectVideoSummaryAjax();
|
selectByUserIdAjax();
|
||||||
selectUserMoneyAjax();
|
collectVideoSummaryAjax();
|
||||||
userInfo.value = uni.getStorageSync('userInfo');
|
selectUserMoneyAjax();
|
||||||
|
userInfo.value = uni.getStorageSync('userInfo');
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="item" @click="linkTo('/pages/login/bind')">
|
<view class="item" @click="linkTo('/pages/login/bind',true)">
|
||||||
<view class="title">修改手机号</view>
|
<view class="title">修改手机号</view>
|
||||||
<up-icon name="arrow-right" />
|
<up-icon name="arrow-right" />
|
||||||
</view>
|
</view>
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
<view class="title">帮助中心</view>
|
<view class="title">帮助中心</view>
|
||||||
<up-icon name="arrow-right" />
|
<up-icon name="arrow-right" />
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="linkTo('/pages/me/feedback')">
|
<view class="item" @click="linkTo('/pages/me/feedback',true)">
|
||||||
<view class="title">意见反馈</view>
|
<view class="title">意见反馈</view>
|
||||||
<up-icon name="arrow-right" />
|
<up-icon name="arrow-right" />
|
||||||
</view>
|
</view>
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
<view class="title">隐私协议</view>
|
<view class="title">隐私协议</view>
|
||||||
<up-icon name="arrow-right" />
|
<up-icon name="arrow-right" />
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="logout">
|
<view class="item" @click="logout" v-if="token">
|
||||||
<view class="title">退出登录</view>
|
<view class="title">退出登录</view>
|
||||||
<up-icon name="arrow-right" />
|
<up-icon name="arrow-right" />
|
||||||
</view>
|
</view>
|
||||||
@@ -36,6 +36,7 @@ import { linkTo } from '@/utils/app.js';
|
|||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
|
|
||||||
const version = ref('');
|
const version = ref('');
|
||||||
|
const token = ref('');
|
||||||
|
|
||||||
// 退出登录
|
// 退出登录
|
||||||
function logout() {
|
function logout() {
|
||||||
@@ -54,6 +55,7 @@ function logout() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
|
token.value = uni.getStorageSync('token');
|
||||||
const systemInfo = uni.getSystemInfoSync();
|
const systemInfo = uni.getSystemInfoSync();
|
||||||
//#ifdef APP-PLUS
|
//#ifdef APP-PLUS
|
||||||
version.value = systemInfo.appWgtVersion;
|
version.value = systemInfo.appWgtVersion;
|
||||||
|
|||||||
@@ -12,11 +12,11 @@
|
|||||||
<input v-model="data.userInfo.userName" align="right" placeholder="请输入用户名" />
|
<input v-model="data.userInfo.userName" align="right" placeholder="请输入用户名" />
|
||||||
</template>
|
</template>
|
||||||
</up-cell>
|
</up-cell>
|
||||||
<up-cell title="手机">
|
<!-- <up-cell title="手机">
|
||||||
<template #value>
|
<template #value>
|
||||||
<input :disabled="data.userInfo.phone?true:false" v-model="data.userInfo.phone" align="right" placeholder="请输入联系电话" />
|
<input v-model="data.userInfo.phone" align="right" placeholder="请输入联系电话" />
|
||||||
</template>
|
</template>
|
||||||
</up-cell>
|
</up-cell> -->
|
||||||
</up-cell-group>
|
</up-cell-group>
|
||||||
<view class="save" @click="save">保存</view>
|
<view class="save" @click="save">保存</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -62,7 +62,8 @@
|
|||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
// 用户点击了预览当前图片
|
// 用户点击了预览当前图片
|
||||||
// 可以自己实现当前头像链接的读取
|
// 可以自己实现当前头像链接的读取
|
||||||
let url = data.userInfo.avatar;
|
console.log()
|
||||||
|
let url = data.userInfo.avatar||'../../static/default/avatar.png';
|
||||||
let arr = []
|
let arr = []
|
||||||
arr.push(url)
|
arr.push(url)
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
@@ -108,20 +109,20 @@
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!data.userInfo.phone) {
|
// if (!data.userInfo.phone) {
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: "手机号不能空",
|
// title: "手机号不能空",
|
||||||
icon: "none"
|
// icon: "none"
|
||||||
})
|
// })
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
if (checkPhone(data.userInfo.phone) == false) {
|
// if (checkPhone(data.userInfo.phone) == false) {
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: "手机号格式不正确",
|
// title: "手机号格式不正确",
|
||||||
icon: "none"
|
// icon: "none"
|
||||||
})
|
// })
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '温馨提示',
|
title: '温馨提示',
|
||||||
@@ -132,7 +133,7 @@
|
|||||||
let res = await updateUsers({
|
let res = await updateUsers({
|
||||||
userName: data.userInfo.userName,
|
userName: data.userInfo.userName,
|
||||||
avatar: data.userInfo.avatar,
|
avatar: data.userInfo.avatar,
|
||||||
phone: data.userInfo.phone,
|
// phone: data.userInfo.phone,
|
||||||
})
|
})
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '保存成功',
|
title: '保存成功',
|
||||||
@@ -141,7 +142,7 @@
|
|||||||
let userInfo = uni.getStorageSync('userInfo');
|
let userInfo = uni.getStorageSync('userInfo');
|
||||||
userInfo.userName = data.userInfo.userName
|
userInfo.userName = data.userInfo.userName
|
||||||
userInfo.avatar = data.userInfo.avatar
|
userInfo.avatar = data.userInfo.avatar
|
||||||
userInfo.phone = data.userInfo.phone
|
// userInfo.phone = data.userInfo.phone
|
||||||
uni.setStorageSync('userInfo', userInfo);
|
uni.setStorageSync('userInfo', userInfo);
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<view class="input" style="">
|
<view class="input" style="">
|
||||||
<view style="display: flex;align-items: center;">
|
<view style="display: flex;align-items: center;">
|
||||||
<view style="font-size: 40upx;color: #333333;">¥</view>
|
<view style="font-size: 40upx;color: #333333;">¥</view>
|
||||||
<input type="number" v-model="data.money" placeholder="请输入金额" @input="moneyInput" style="font-size: 32rpx;color: #333333;text-align: left;margin-left: 10rpx;width: 80%;" />
|
<input type="digit" v-model="data.money" placeholder="请输入金额" @input="moneyInput" style="font-size: 32rpx;color: #333333;text-align: left;margin-left: 10rpx;width: 80%;" />
|
||||||
</view>
|
</view>
|
||||||
<view class="allbtn" @click="setAllMoney">
|
<view class="allbtn" @click="setAllMoney">
|
||||||
全部
|
全部
|
||||||
@@ -76,7 +76,8 @@
|
|||||||
<up-modal :show="data.ruleShow" confirm-text="知道了" title="规则说明" :title="data.rule_title" :title-style="{fontWeight:'700'}" @confirm="ruleConfirm" confirm-color="rgb(255, 117, 129)">
|
<up-modal :show="data.ruleShow" confirm-text="知道了" title="规则说明" :title="data.rule_title" :title-style="{fontWeight:'700'}" @confirm="ruleConfirm" confirm-color="rgb(255, 117, 129)">
|
||||||
<view class="u-p-30 u-text-left">
|
<view class="u-p-30 u-text-left">
|
||||||
<scroll-view scroll-y="true" style="max-height: 50vh;" >
|
<scroll-view scroll-y="true" style="max-height: 50vh;" >
|
||||||
<rich-text style="text-align: justify;font-size: 18px;color: #666;" :nodes="data.rule_content"></rich-text>
|
<!-- <rich-text style="text-align: justify;font-size: 18px;color: #666;" :nodes="data.rule_content"></rich-text> -->
|
||||||
|
<view style="text-align: justify;font-size: 18px;color: #666;" v-html="data.rule_content"></view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</up-modal>
|
</up-modal>
|
||||||
@@ -93,14 +94,14 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, nextTick, ref } from 'vue';
|
import { reactive, nextTick, ref } from 'vue';
|
||||||
import { onReady,onLoad,onShow,onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
|
import { onReady,onLoad,onShow,onLaunch,onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
|
||||||
import { selectUserMoney, selectPayDetails, canCash, state, withdraw } from '@/api/me/withdraw.js';
|
import { selectUserMoney, selectPayDetails, canCash, state, withdraw } from '@/api/me/withdraw.js';
|
||||||
import { selectUserById } from '@/api/user/user.js';
|
import { selectUserById } from '@/api/user/user.js';
|
||||||
import { announcement } from '@/api/index/index.js';
|
import { announcement } from '@/api/index/index.js';
|
||||||
import { commonType } from '@/api/init.js';
|
import { commonType } from '@/api/init.js';
|
||||||
import { linkTo } from '@/utils/app.js';
|
import { linkTo } from '@/utils/app.js';
|
||||||
|
|
||||||
let data = reactive({
|
const data = reactive({
|
||||||
ruleShow: false,
|
ruleShow: false,
|
||||||
rule_title: "",
|
rule_title: "",
|
||||||
rule_content: "",
|
rule_content: "",
|
||||||
@@ -133,23 +134,25 @@
|
|||||||
getExtractFei();
|
getExtractFei();
|
||||||
getMoneyDetail();
|
getMoneyDetail();
|
||||||
getCanCash()
|
getCanCash()
|
||||||
|
announcement({type: 1}).then(res=>{
|
||||||
|
data.ruleList = res
|
||||||
|
|
||||||
|
ruleInit()
|
||||||
|
|
||||||
|
})
|
||||||
})
|
})
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
getcashMoney()
|
getcashMoney()
|
||||||
getUserInfo();
|
getUserInfo();
|
||||||
announcement({type: 1}).then(res=>{
|
|
||||||
data.ruleList = res
|
|
||||||
ruleInit()
|
|
||||||
data.ruleShow = true
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
nextTick(()=>{
|
nextTick(()=>{
|
||||||
data.adRewardedVideoloadNum = 0
|
data.adRewardedVideoloadNum = 0
|
||||||
adRewardedw.value.load();
|
adRewardedw.value.load();
|
||||||
|
data.ruleShow = true
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
onReachBottom(() => {
|
onReachBottom(() => {
|
||||||
if (data.page * data.limit < data.totalCount) {
|
if (data.page * data.limit < data.totalCount) {
|
||||||
data.page = data.page + 1;
|
data.page = data.page + 1;
|
||||||
@@ -162,6 +165,7 @@
|
|||||||
getMoneyDetail();
|
getMoneyDetail();
|
||||||
})
|
})
|
||||||
function ruleInit(){
|
function ruleInit(){
|
||||||
|
data.rule_content = ""
|
||||||
data.rule_title = data.ruleList[data.ruleIndex].title
|
data.rule_title = data.ruleList[data.ruleIndex].title
|
||||||
data.rule_content = data.ruleList[data.ruleIndex].content
|
data.rule_content = data.ruleList[data.ruleIndex].content
|
||||||
}
|
}
|
||||||
@@ -174,7 +178,7 @@
|
|||||||
title: "暂未配置规则",
|
title: "暂未配置规则",
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
return
|
return false;
|
||||||
}
|
}
|
||||||
ruleInit()
|
ruleInit()
|
||||||
data.ruleShow = true
|
data.ruleShow = true
|
||||||
@@ -183,6 +187,7 @@
|
|||||||
* 规则确认
|
* 规则确认
|
||||||
*/
|
*/
|
||||||
function ruleConfirm() {
|
function ruleConfirm() {
|
||||||
|
console.log(1)
|
||||||
data.ruleShow = false
|
data.ruleShow = false
|
||||||
data.ruleIndex++
|
data.ruleIndex++
|
||||||
if( data.ruleIndex >= data.ruleList.length) {
|
if( data.ruleIndex >= data.ruleList.length) {
|
||||||
@@ -300,9 +305,39 @@
|
|||||||
* 全部提现赋值
|
* 全部提现赋值
|
||||||
*/
|
*/
|
||||||
function setAllMoney() {
|
function setAllMoney() {
|
||||||
data.money = data.mayMoney.toFixed(2)
|
data.money = getMoneys(data.mayMoney)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 金额格式化
|
||||||
|
* money:金额
|
||||||
|
* 保留两位小数&不四舍五入
|
||||||
|
*/
|
||||||
|
function getMoneys (money) {
|
||||||
|
if (!money || isNaN(money)) return "0.00";
|
||||||
|
let num = parseFloat(money + '') + '';
|
||||||
|
num = parseInt(money * 100 + '') / 100 + ''
|
||||||
|
|
||||||
|
let reg = /(-?\d+)(\d{4})/;
|
||||||
|
while (reg.test(num)) {
|
||||||
|
num = num.replace(reg, "$1,$2");
|
||||||
|
}
|
||||||
|
|
||||||
|
let idx = num.indexOf('.')
|
||||||
|
if (idx === -1) {
|
||||||
|
num = num + '.00'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (idx > 0) {
|
||||||
|
let num_per = num.substring(0, idx) + '.'
|
||||||
|
let num_next = num.substring(idx + 1).padEnd(2, '0')
|
||||||
|
num = num_per + num_next
|
||||||
|
}
|
||||||
|
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取提现记录
|
* 获取提现记录
|
||||||
*/
|
*/
|
||||||
@@ -337,7 +372,7 @@
|
|||||||
*/
|
*/
|
||||||
function getcashMoney() {
|
function getcashMoney() {
|
||||||
selectUserMoney().then(res => {
|
selectUserMoney().then(res => {
|
||||||
data.mayMoney = res.amount || 0
|
data.mayMoney = getMoneys(res.amount) || 0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
moneyType : data.moneyType,
|
moneyType : data.moneyType,
|
||||||
viewType: data.viewType,
|
viewType: data.viewType,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
data.totalCount = res.total;
|
data.totalCount = res.totalCount;
|
||||||
if ( res.records.length > 0) {
|
if ( res.records.length > 0) {
|
||||||
data.list = [...data.list,...res.records];
|
data.list = [...data.list,...res.records];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="containerView">
|
<view class="containerView">
|
||||||
<up-cell-group label-width="80" :border="false">
|
<up-cell-group label-width="80" :border="false">
|
||||||
<up-cell :label-style="{ width: '100rpx' }" title="姓名">
|
<up-cell>
|
||||||
|
<template #title> <view style="width: 90px;">姓名</view></template>
|
||||||
<template #right-icon> <up-input border="none" v-model="data.certName" placeholder="请输入姓名"></up-input> </template>
|
<template #right-icon> <up-input border="none" v-model="data.certName" placeholder="请输入姓名"></up-input> </template>
|
||||||
</up-cell>
|
</up-cell>
|
||||||
<up-cell title="身份证号码">
|
<up-cell>
|
||||||
|
<template #title> <view style="width: 90px;">身份证号码</view></template>
|
||||||
<template #right-icon> <up-input border="none" v-model="data.certNum" placeholder="请输入身份证号码"></up-input> </template>
|
<template #right-icon> <up-input border="none" v-model="data.certNum" placeholder="请输入身份证号码"></up-input> </template>
|
||||||
</up-cell>
|
</up-cell>
|
||||||
<up-cell title="银行卡号码">
|
<up-cell>
|
||||||
|
<template #title> <view style="width: 90px;">银行卡号码</view></template>
|
||||||
<template #right-icon> <up-input border="none" v-model="data.accountNo" placeholder="请输入银行卡号码"></up-input> </template>
|
<template #right-icon> <up-input border="none" v-model="data.accountNo" placeholder="请输入银行卡号码"></up-input> </template>
|
||||||
</up-cell>
|
</up-cell>
|
||||||
<up-cell title="手机号">
|
<up-cell>
|
||||||
|
<template #title> <view style="width: 90px;">手机号</view></template>
|
||||||
<template #right-icon> <up-input border="none" v-model="data.mobile" placeholder="请输入银行预留号码"></up-input> </template>
|
<template #right-icon> <up-input border="none" v-model="data.mobile" placeholder="请输入银行预留号码"></up-input> </template>
|
||||||
</up-cell>
|
</up-cell>
|
||||||
</up-cell-group>
|
</up-cell-group>
|
||||||
@@ -125,7 +129,9 @@
|
|||||||
page {
|
page {
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
.u-cell__body__content{
|
||||||
|
flex: 0!important;
|
||||||
|
}
|
||||||
.containerView {
|
.containerView {
|
||||||
padding:30rpx;
|
padding:30rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@@ -98,7 +98,6 @@
|
|||||||
import config from '@/commons/config.js';
|
import config from '@/commons/config.js';
|
||||||
let data = reactive({
|
let data = reactive({
|
||||||
loading:false,
|
loading:false,
|
||||||
qrcode: false,
|
|
||||||
earning: {
|
earning: {
|
||||||
inviteMoney: 0,
|
inviteMoney: 0,
|
||||||
inviteGoldMoney: 0,
|
inviteGoldMoney: 0,
|
||||||
@@ -122,8 +121,6 @@
|
|||||||
bgImg: '',
|
bgImg: '',
|
||||||
tuiguang: '',
|
tuiguang: '',
|
||||||
invitationCode: uni.getStorageSync('userInfo').invitationCode,
|
invitationCode: uni.getStorageSync('userInfo').invitationCode,
|
||||||
h5SaveImg: '',
|
|
||||||
haibaoImgH5: '',
|
|
||||||
inviteSignCount:0,
|
inviteSignCount:0,
|
||||||
canvasW: 350,
|
canvasW: 350,
|
||||||
canvasH: 667,
|
canvasH: 667,
|
||||||
@@ -133,7 +130,7 @@
|
|||||||
getInviter()
|
getInviter()
|
||||||
queryInviter()
|
queryInviter()
|
||||||
getBgImg()
|
getBgImg()
|
||||||
data.erweima = config.baseUrl + `/pages/login/register/?invitation=${data.invitationCode}&qdCode=${uni.getStorageSync('userInfo').qdCode}`
|
data.erweima = config.shareUrl + `/pages/login/register/?invitation=${data.invitationCode}&qdCode=${uni.getStorageSync('userInfo').qdCode}`
|
||||||
console.log(data.erweima)
|
console.log(data.erweima)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view style="background-color: #F3F4F8;">
|
<view class="container">
|
||||||
|
|
||||||
<view class="task_bg u-absolute">
|
<view class="task_bg u-absolute">
|
||||||
<image class="task_bg" src="@/static/task/task_bg.png"></image>
|
<image class="task_bg" src="@/static/task/task_bg.png"></image>
|
||||||
</view>
|
</view>
|
||||||
@@ -42,19 +41,18 @@
|
|||||||
<view class="subhead ">{{ item.detail }}</view>
|
<view class="subhead ">{{ item.detail }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cell_right ">
|
<view class="cell_right ">
|
||||||
<view v-if="item.disabled" class="btn "
|
<view v-if=" item.disabled " class="btn u-font-24 text-bold"
|
||||||
:style="{ backgroundColor: item.buttonBgColor, color: item.buttonFontColor }"
|
:style="{backgroundColor: item.buttonBgColor,color: item.buttonFontColor }"
|
||||||
@tap="goNav(item)">
|
@click="goNav(item)">
|
||||||
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` : (
|
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` : ( item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }}
|
||||||
item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }}
|
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="btn disabled">
|
<view v-else class="btn u-font-24 text-bold disabled">
|
||||||
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}`
|
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` : ( item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }}
|
||||||
: (item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }}
|
</view>
|
||||||
<view v-if="item.buttonUnderContent && item.buttonUnderUrl" class=" tip"
|
<view v-if=" item.buttonUnderContent && item.buttonUnderUrl " class="u-font-22 tip"
|
||||||
@tap="goNav(item, item.buttonUnderUrl)">
|
style="text-align: center;"
|
||||||
{{ item.buttonUnderContent }}
|
@click="goNav({id: item.id,buttonUrl: item.buttonUnderUrl, jumpType: 1,title: item.title, disabled: item.disabled, discNumber: item.discNumber})">
|
||||||
</view>
|
{{ item.buttonUnderContent}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -110,7 +108,7 @@
|
|||||||
})
|
})
|
||||||
const adRewarded = ref(null);
|
const adRewarded = ref(null);
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
$common.init()
|
// $common.init()
|
||||||
// if ( uni.getSystemInfoSync().platform == 'android' ) {
|
// if ( uni.getSystemInfoSync().platform == 'android' ) {
|
||||||
// datas.adpid = 1531580352
|
// datas.adpid = 1531580352
|
||||||
// }
|
// }
|
||||||
@@ -228,7 +226,12 @@
|
|||||||
})
|
})
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
datas.urlCallback = {
|
||||||
|
userId: uni.getStorageSync('userInfo').userId,
|
||||||
|
extra: uni.getStorageSync('userInfo').userId + "" + new Date().getTime(),
|
||||||
|
}
|
||||||
datas.adRewardedVideoloadNum = 0
|
datas.adRewardedVideoloadNum = 0
|
||||||
|
|
||||||
adRewarded.value.load();
|
adRewarded.value.load();
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -252,6 +255,10 @@
|
|||||||
}
|
}
|
||||||
datas.adRewardedVideoloadNum++
|
datas.adRewardedVideoloadNum++
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
datas.urlCallback = {
|
||||||
|
userId: uni.getStorageSync('userInfo').userId,
|
||||||
|
extra: uni.getStorageSync('userInfo').userId + "" + new Date().getTime(),
|
||||||
|
}
|
||||||
adRewarded.value.load();
|
adRewarded.value.load();
|
||||||
}, 1000); // 10
|
}, 1000); // 10
|
||||||
console.log("广告加载失败")
|
console.log("广告加载失败")
|
||||||
@@ -276,11 +283,20 @@
|
|||||||
let res = await state({
|
let res = await state({
|
||||||
extraKey: datas.urlCallback.extra
|
extraKey: datas.urlCallback.extra
|
||||||
})
|
})
|
||||||
|
datas.urlCallback = {
|
||||||
|
userId: uni.getStorageSync('userInfo').userId,
|
||||||
|
extra: uni.getStorageSync('userInfo').userId + "" + new Date().getTime(),
|
||||||
|
}
|
||||||
|
uni.showToast({
|
||||||
|
title: '获得' + $common.freeDuration + '分钟免费时长',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
// 播放中途退出
|
// 播放中途退出
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function goNav(item, url) {
|
async function goNav(item, url) {
|
||||||
|
console.log(item, url, '调试111')
|
||||||
// jumpType (integer, optional): 跳转类型 1 内部路径 2 外部路径 ,
|
// jumpType (integer, optional): 跳转类型 1 内部路径 2 外部路径 ,
|
||||||
// type (integer, optional): 任务类型 1 普通任务 2 打卡任务 9 其它 ,
|
// type (integer, optional): 任务类型 1 普通任务 2 打卡任务 9 其它 ,
|
||||||
if (url) {
|
if (url) {
|
||||||
@@ -343,10 +359,8 @@
|
|||||||
});
|
});
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
datas.urlCallback = {
|
|
||||||
userId: uni.getStorageSync('userId'),
|
console.log(datas.urlCallback)
|
||||||
extra: uni.getStorageSync('userId') + "" + new Date().getTime(),
|
|
||||||
}
|
|
||||||
adRewarded.value.show();
|
adRewarded.value.show();
|
||||||
} else {
|
} else {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
@@ -358,42 +372,38 @@
|
|||||||
if (item.title && item.title.indexOf('每周打卡奖励') != -1) {
|
if (item.title && item.title.indexOf('每周打卡奖励') != -1) {
|
||||||
buttonUrl = item.buttonUrl + '?source=2'
|
buttonUrl = item.buttonUrl + '?source=2'
|
||||||
|
|
||||||
uni.navigateTo({
|
|
||||||
url: buttonUrl
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
if (item.title && item.title.indexOf('每月打卡奖励1') != -1) {
|
if (item.title && item.title.indexOf('每月打卡奖励1') != -1) {
|
||||||
buttonUrl = item.buttonUrl + '?source=3'
|
buttonUrl = item.buttonUrl + '?source=3'
|
||||||
|
|
||||||
uni.navigateTo({
|
|
||||||
url: buttonUrl
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
if (item.title && item.title.indexOf('每月打卡奖励2') != -1) {
|
if (item.title && item.title.indexOf('每月打卡奖励2') != -1) {
|
||||||
|
|
||||||
let res = await taskReceive({
|
// let res = await taskReceive({
|
||||||
id: item.id
|
// id: item.id
|
||||||
})
|
// })
|
||||||
if (res.code == 0) {
|
// if (res.code == 0) {
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: res.id == 15 ? '签到成功' : '领取成功',
|
// title: res.id == 15 ? '签到成功' : '领取成功',
|
||||||
icon: 'none'
|
// icon: 'none'
|
||||||
})
|
// })
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
getTaskdata()
|
// getTaskdata()
|
||||||
getsignIn()
|
// getsignIn()
|
||||||
}, 1000)
|
// }, 1000)
|
||||||
} else {
|
// } else {
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: res.msg,
|
// title: res.msg,
|
||||||
icon: 'none'
|
// icon: 'none'
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
// buttonUrl =
|
buttonUrl =
|
||||||
// `${item.buttonUrl}?standard=${item.discNumber == null ? true : false}&taskId=${item.id}`
|
`${item.buttonUrl}?standard=${item.discNumber == null ? true : false}&taskId=${item.id}`
|
||||||
}
|
}
|
||||||
|
uni.navigateTo({
|
||||||
|
url: buttonUrl
|
||||||
|
})
|
||||||
|
|
||||||
} else if (item.jumpType == 3) {
|
} else if (item.jumpType == 3) {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
@@ -414,7 +424,7 @@
|
|||||||
async function getTaskdata() {
|
async function getTaskdata() {
|
||||||
let res = await selectTaskCenter()
|
let res = await selectTaskCenter()
|
||||||
let arrData = []
|
let arrData = []
|
||||||
if (!$common.isIosExamine()) {
|
if (!$common.isIosExamine) {
|
||||||
res.forEach(ele => {
|
res.forEach(ele => {
|
||||||
if (ele.title.indexOf('分享奖励') == -1 && ele.title.indexOf('新人福利') == -1 &&
|
if (ele.title.indexOf('分享奖励') == -1 && ele.title.indexOf('新人福利') == -1 &&
|
||||||
ele.title.indexOf('观看视频奖励') == -1) {
|
ele.title.indexOf('观看视频奖励') == -1) {
|
||||||
@@ -434,6 +444,19 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
page{
|
||||||
|
// min-height: 100vh;
|
||||||
|
}
|
||||||
|
.container{
|
||||||
|
/* #ifdef H5 */
|
||||||
|
min-height: calc(100vh - 96rpx);
|
||||||
|
/* #endif */
|
||||||
|
/* #ifndef H5 */
|
||||||
|
min-height: 100vh;
|
||||||
|
/* #endif */
|
||||||
|
background-color: #F3F4F8;
|
||||||
|
padding-top: 2rpx;
|
||||||
|
}
|
||||||
.u-absolute {
|
.u-absolute {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
@@ -444,9 +467,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
position: relative;
|
position: absolute;
|
||||||
padding: 32rpx;
|
padding: 122rpx 32rpx 32rpx 32rpx;
|
||||||
|
|
||||||
.icon_title {
|
.icon_title {
|
||||||
color: #000000;
|
color: #000000;
|
||||||
margin-left: 28rpx;
|
margin-left: 28rpx;
|
||||||
@@ -473,13 +496,13 @@
|
|||||||
|
|
||||||
.contentTop {
|
.contentTop {
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
top: -115rpx;
|
// top: -115rpx;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
margin-bottom: 32rpx;
|
margin-bottom: 32rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
margin: 32rpx;
|
margin: 282rpx 32rpx 32rpx 32rpx;
|
||||||
|
|
||||||
>view:first-child {
|
>view:first-child {
|
||||||
>image {
|
>image {
|
||||||
@@ -536,7 +559,7 @@
|
|||||||
|
|
||||||
.content {
|
.content {
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
top: -115rpx;
|
// top: -115rpx;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
@@ -544,9 +567,8 @@
|
|||||||
margin-right: 32rpx;
|
margin-right: 32rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
top: -115rpx;
|
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
|
margin-bottom: 32rpx;
|
||||||
.cell {
|
.cell {
|
||||||
padding: 32rpx 0;
|
padding: 32rpx 0;
|
||||||
border-bottom: 2rpx solid #EBEBEB;
|
border-bottom: 2rpx solid #EBEBEB;
|
||||||
|
|||||||
@@ -12,11 +12,35 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="cell " v-for="(item, index) in datas.list" :key="index">
|
<view class="cell " v-for="(item, index) in datas.list" :key="index">
|
||||||
<view class="cell_left ">
|
<view class="cell_left ">
|
||||||
<image class="cell_icon" :src="item.url"></image>
|
<image class="cell_icon" :src="item.img"></image>
|
||||||
<view class="cell_title ">
|
<view class="cell_title ">
|
||||||
<view class=" title">{{ item.name }}</view>
|
<view class=" title">{{ item.name }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="cell_right" v-if="datas.standard=='true'">
|
||||||
|
<viwe v-if="!datas.receive">
|
||||||
|
<view class="btn" @click="taskReceive(item)">领取</view>
|
||||||
|
</viwe>
|
||||||
|
<view v-else>
|
||||||
|
<view v-if="item.disabled">
|
||||||
|
<view class="btn disabled">领取</view>
|
||||||
|
</view>
|
||||||
|
<view v-else>
|
||||||
|
<view v-if="!item.targetId" class="btn" @click="toDuiHuan(item)">去兑换</view>
|
||||||
|
<view v-else class="btn receive">已兑换</view>
|
||||||
|
<u-image v-if="!item.targetId" class="icon"
|
||||||
|
style=" width: 32rpx!important;height: 36rpx!important;position: absolute; right: 0;bottom: 0;"
|
||||||
|
src="@/static/task/receive2.png"></u-image>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<image v-else src="@/static/task/receive1.png"
|
||||||
|
style="width: 130rpx!important;height: 130rpx!important;position: absolute; right: 0;bottom: 0;"
|
||||||
|
mode=""></image>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@@ -25,169 +49,270 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, ref, onMounted, onUnmounted, getCurrentInstance } from 'vue'
|
import {
|
||||||
import {
|
reactive,
|
||||||
onLoad
|
ref,
|
||||||
} from '@dcloudio/uni-app'
|
onMounted,
|
||||||
import { selectDiscSpinning } from '@/api/task/index.js'
|
onUnmounted,
|
||||||
let datas = reactive({
|
getCurrentInstance
|
||||||
list: [],
|
} from 'vue'
|
||||||
source: null
|
import {
|
||||||
|
onLoad,onShow
|
||||||
|
} from '@dcloudio/uni-app'
|
||||||
|
import {
|
||||||
|
selectTaskCenterUserReward,
|
||||||
|
receiveGoods
|
||||||
|
} from '@/api/task/index.js'
|
||||||
|
let datas = reactive({
|
||||||
|
list: [],
|
||||||
|
source: null,
|
||||||
|
standard: true,
|
||||||
|
receive: null,
|
||||||
|
record: null,
|
||||||
|
taskId: "",
|
||||||
|
|
||||||
})
|
})
|
||||||
onLoad(options => {
|
onLoad(options => {
|
||||||
datas.source = options.source
|
console.log(options, '调试1')
|
||||||
getList()
|
if (options.source) {
|
||||||
})
|
datas.source = options.source
|
||||||
|
}
|
||||||
|
if (options.standard) {
|
||||||
|
datas.standard = options.standard
|
||||||
|
}
|
||||||
|
if (options.taskId) {
|
||||||
|
datas.taskId = options.taskId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
onShow(()=>{
|
||||||
|
getList()
|
||||||
|
})
|
||||||
|
// 去兑换
|
||||||
|
function toDuiHuan(item) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/index/prizeDraw/duihuan?id=${datas.record}&foreignType=task`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 领取
|
||||||
|
*/
|
||||||
|
async function taskReceive(item) {
|
||||||
|
let res = await receiveGoods({
|
||||||
|
taskId: datas.taskId,
|
||||||
|
sourceId: item.id
|
||||||
|
})
|
||||||
|
uni.showToast({
|
||||||
|
title: '领取成功',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
async function getList() {
|
||||||
|
let res = await selectTaskCenterUserReward({
|
||||||
|
taskId: datas.taskId
|
||||||
|
})
|
||||||
|
if (res.code == 0) {
|
||||||
|
datas.list = res.data
|
||||||
|
datas.list.map(item => {
|
||||||
|
item.disabled = true
|
||||||
|
})
|
||||||
|
datas.receive = res.receive
|
||||||
|
datas.record = res.record
|
||||||
|
if (datas.receive) {
|
||||||
|
datas.list.map(item => {
|
||||||
|
if (item.id == datas.receive) {
|
||||||
|
item.disabled = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
async function getList() {
|
}
|
||||||
let res = await selectDiscSpinning({ source: datas.source })
|
}
|
||||||
datas.list = res.records
|
|
||||||
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.container {
|
.container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
|
||||||
// display: flex;
|
|
||||||
// flex-direction: column;
|
|
||||||
.task_bg {
|
|
||||||
width: 100% !important;
|
|
||||||
height: 470rpx !important;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.title {
|
// display: flex;
|
||||||
width: 314rpx;
|
// flex-direction: column;
|
||||||
height: 72rpx;
|
.task_bg {
|
||||||
line-height: 72rpx;
|
width: 100% !important;
|
||||||
text-align: center;
|
height: 470rpx !important;
|
||||||
border-radius: 108rpx 108rpx 108rpx 108rpx;
|
position: relative;
|
||||||
border: 6rpx solid #3D6DC6;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 34rpx;
|
|
||||||
color: #3D6DC6;
|
|
||||||
position: absolute;
|
|
||||||
top: 210rpx;
|
|
||||||
left: 26rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
.title {
|
||||||
color: #666666;
|
width: 314rpx;
|
||||||
height: calc(100% - 410rpx);
|
height: 72rpx;
|
||||||
border-radius: 16rpx;
|
line-height: 72rpx;
|
||||||
top: -60rpx;
|
text-align: center;
|
||||||
z-index: 9;
|
border-radius: 108rpx 108rpx 108rpx 108rpx;
|
||||||
padding: 64rpx 28rpx;
|
border: 6rpx solid #3D6DC6;
|
||||||
background: linear-gradient(-45deg, #DDEAFC 0%, #FFFFFF 100%);
|
font-weight: bold;
|
||||||
border-radius: 32rpx 32rpx 0rpx 0rpx;
|
font-size: 34rpx;
|
||||||
overflow-y: auto;
|
color: #3D6DC6;
|
||||||
position: relative;
|
position: absolute;
|
||||||
|
top: 210rpx;
|
||||||
>.title {
|
left: 26rpx;
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #333333;
|
|
||||||
margin-bottom: 22rpx;
|
|
||||||
|
|
||||||
.tip {
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #666666;
|
|
||||||
margin-left: 10rpx;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cell {
|
.content {
|
||||||
display: flex;
|
color: #666666;
|
||||||
align-items: center;
|
height: calc(100% - 410rpx);
|
||||||
justify-content: space-between;
|
border-radius: 16rpx;
|
||||||
background: linear-gradient(90deg, #FFF4E0 0%, #FFFBF5 100%);
|
top: -60rpx;
|
||||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
z-index: 9;
|
||||||
margin-bottom: 32rpx;
|
padding: 64rpx 28rpx;
|
||||||
padding: 32rpx 28rpx;
|
background: linear-gradient(-45deg, #DDEAFC 0%, #FFFFFF 100%);
|
||||||
|
border-radius: 32rpx 32rpx 0rpx 0rpx;
|
||||||
|
overflow-y: auto;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
.cell_left {
|
>.title {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
margin-bottom: 22rpx;
|
||||||
|
|
||||||
.cell_icon {
|
.tip {
|
||||||
width: 84rpx !important;
|
font-weight: 400;
|
||||||
height: 84rpx !important;
|
|
||||||
margin-right: 30rpx;
|
|
||||||
border-radius: 4rpx !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell_title {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
color: #333;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #333333;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.tip {
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #999999;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell_right {
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
flex-shrink: 0;
|
|
||||||
margin-left: 20rpx;
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
width: 148rpx;
|
|
||||||
height: 56rpx;
|
|
||||||
line-height: 56rpx;
|
|
||||||
text-align: center;
|
|
||||||
background: #6DA9F7;
|
|
||||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #FFFFFF;
|
color: #666666;
|
||||||
border: 2rpx solid transparent;
|
margin-left: 10rpx;
|
||||||
}
|
|
||||||
|
|
||||||
.opt {
|
|
||||||
color: #D39B7E;
|
|
||||||
background-color: #FBF3EB;
|
|
||||||
}
|
|
||||||
|
|
||||||
.disabled {
|
|
||||||
color: #999999;
|
|
||||||
background-color: #E2E2E2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.receive {
|
|
||||||
background: rgba(178, 223, 255, 0.62);
|
|
||||||
border: 2rpx solid #6DA9F7;
|
|
||||||
color: #6DA9F7;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cell {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
background: linear-gradient(90deg, #FFF4E0 0%, #FFFBF5 100%);
|
||||||
|
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||||
|
margin-bottom: 32rpx;
|
||||||
|
padding: 32rpx 28rpx;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.cell_left {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.cell_icon {
|
||||||
|
width: 84rpx !important;
|
||||||
|
height: 84rpx !important;
|
||||||
|
margin-right: 30rpx;
|
||||||
|
border-radius: 4rpx !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell_title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: #333;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.tip {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell_right {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
width: 148rpx;
|
||||||
|
height: 56rpx;
|
||||||
|
line-height: 56rpx;
|
||||||
|
text-align: center;
|
||||||
|
background: #6DA9F7;
|
||||||
|
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
border: 2rpx solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.opt {
|
||||||
|
color: #D39B7E;
|
||||||
|
background-color: #FBF3EB;
|
||||||
|
}
|
||||||
|
|
||||||
|
.disabled {
|
||||||
|
color: #999999;
|
||||||
|
background-color: #E2E2E2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.receive {
|
||||||
|
background: rgba(178, 223, 255, 0.62);
|
||||||
|
border: 2rpx solid #6DA9F7;
|
||||||
|
color: #6DA9F7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cell:last-child {
|
|
||||||
border-bottom: none;
|
.cell_right {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
width: 148rpx;
|
||||||
|
height: 56rpx;
|
||||||
|
line-height: 56rpx;
|
||||||
|
text-align: center;
|
||||||
|
background: #6DA9F7;
|
||||||
|
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
border: 2rpx solid transparent;
|
||||||
|
position: relative;
|
||||||
|
z-index: 99;
|
||||||
|
}
|
||||||
|
|
||||||
|
.opt {
|
||||||
|
color: #D39B7E;
|
||||||
|
background-color: #FBF3EB;
|
||||||
|
}
|
||||||
|
|
||||||
|
.disabled {
|
||||||
|
color: #999999;
|
||||||
|
background-color: #E2E2E2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.receive {
|
||||||
|
background: rgba(178, 223, 255, 0.62);
|
||||||
|
border: 2rpx solid #6DA9F7;
|
||||||
|
color: #6DA9F7;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
@@ -1,17 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="min-page">
|
<view class="min-page">
|
||||||
<my-video-list ref="refVideoList" v-if="state.list.length" @swiperChange="swiperChange" :list="state.list"
|
<my-video-list ref="refVideoList" v-if="state.list.length" @swiperChange="swiperChange" :list="state.list"
|
||||||
:options="options"
|
:options="options" @update="update" :info="state"></my-video-list>
|
||||||
@update="update" :info="state"></my-video-list>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
import {
|
||||||
onLoad,onHide,
|
onLoad,
|
||||||
|
onHide,
|
||||||
onShow
|
onShow
|
||||||
} from '@dcloudio/uni-app'
|
} from '@dcloudio/uni-app'
|
||||||
|
import {
|
||||||
|
login
|
||||||
|
} from '@/api/login/login.js';
|
||||||
import * as Api from '@/api/video/index.js'
|
import * as Api from '@/api/video/index.js'
|
||||||
|
import {
|
||||||
|
useCommonStore
|
||||||
|
} from '@/store/common.js';
|
||||||
|
const $common = useCommonStore();
|
||||||
import {
|
import {
|
||||||
reactive,
|
reactive,
|
||||||
ref
|
ref
|
||||||
@@ -23,7 +30,7 @@
|
|||||||
const sysInfo = uni.getSystemInfoSync()
|
const sysInfo = uni.getSystemInfoSync()
|
||||||
let isFirstLoad = true
|
let isFirstLoad = true
|
||||||
let options = {
|
let options = {
|
||||||
courseDetailsId:''
|
courseDetailsId: ''
|
||||||
}
|
}
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
collect: 0,
|
collect: 0,
|
||||||
@@ -34,11 +41,40 @@
|
|||||||
})
|
})
|
||||||
const refVideoList = ref(null)
|
const refVideoList = ref(null)
|
||||||
async function init() {
|
async function init() {
|
||||||
try {
|
/**
|
||||||
|
* 如果是安卓則不做操作,如果是ios判斷是否審核,不審核不套裝
|
||||||
|
*/
|
||||||
|
// 是否审核,是否ios
|
||||||
|
if ($common.isIosExamine) {
|
||||||
const res = await Api.getVideoDetail(options)
|
const res = await Api.getVideoDetail(options)
|
||||||
isFirstLoad = false
|
isFirstLoad = false
|
||||||
Object.assign(state, res)
|
Object.assign(state, res)
|
||||||
state.list = res.list
|
state.list = res.list
|
||||||
|
} else {
|
||||||
|
// ios是否登錄 ?
|
||||||
|
console.log(uni.getStorageSync('tokenTwo'),'提送hi')
|
||||||
|
if (uni.getStorageSync('tokenTwo')) {
|
||||||
|
const res = await Api.getVideoDetail({...options,token:uni.getStorageSync('tokenTwo')})
|
||||||
|
isFirstLoad = false
|
||||||
|
Object.assign(state, res)
|
||||||
|
state.list = res.list
|
||||||
|
} else {
|
||||||
|
let res = await login({
|
||||||
|
password: '123456',
|
||||||
|
phone: '18681817128'
|
||||||
|
})
|
||||||
|
uni.setStorageSync('tokenTwo', res.token)
|
||||||
|
init()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
// 是否审核,是否ios 保存本地
|
||||||
|
// 18681817128 123456 测试环境和正式环境都是这个账号 等会给添加上会员就可以了
|
||||||
|
|
||||||
|
// return res.token
|
||||||
|
try {
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// if(getCurrentPages().length>=2){
|
// if(getCurrentPages().length>=2){
|
||||||
// uni.navigateBack()
|
// uni.navigateBack()
|
||||||
@@ -62,7 +98,6 @@
|
|||||||
}
|
}
|
||||||
onLoad((opt) => {
|
onLoad((opt) => {
|
||||||
Object.assign(options, opt)
|
Object.assign(options, opt)
|
||||||
console.log(options);
|
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -81,7 +116,7 @@
|
|||||||
const nobuyCourseId = uni.getStorageSync('nobuyCourseId')
|
const nobuyCourseId = uni.getStorageSync('nobuyCourseId')
|
||||||
const item = state.list.find(v => v.courseId == nobuyCourseId)
|
const item = state.list.find(v => v.courseId == nobuyCourseId)
|
||||||
uni.removeStorageSync('nobuyCourseId')
|
uni.removeStorageSync('nobuyCourseId')
|
||||||
if(item){
|
if (item) {
|
||||||
if (drawRes.count * 1 > 0 && nobuyCourseId !== null && nobuyCourseId !== undefined && item
|
if (drawRes.count * 1 > 0 && nobuyCourseId !== null && nobuyCourseId !== undefined && item
|
||||||
.videoUrl) {
|
.videoUrl) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@@ -89,7 +124,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
BIN
static/images/lock.png
Normal file
BIN
static/images/lock.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
BIN
static/images/pause.png
Normal file
BIN
static/images/pause.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
BIN
static/images/play.png
Normal file
BIN
static/images/play.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
BIN
static/task/receive1.png
Normal file
BIN
static/task/receive1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
BIN
static/task/receive2.png
Normal file
BIN
static/task/receive2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
@@ -38,7 +38,7 @@ const $map = {
|
|||||||
922: 'withdrawNum',
|
922: 'withdrawNum',
|
||||||
500: 'payTips',
|
500: 'payTips',
|
||||||
914: 'goldBili', // 金币比例
|
914: 'goldBili', // 金币比例
|
||||||
919: 'isExamine' //是否ios审核中
|
921: 'freeDuration' //看广告免费分钟时长
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useCommonStore = defineStore("common", {
|
export const useCommonStore = defineStore("common", {
|
||||||
@@ -46,15 +46,15 @@ export const useCommonStore = defineStore("common", {
|
|||||||
return {
|
return {
|
||||||
payTips: '付款完成后不要忘记抽红包哦',
|
payTips: '付款完成后不要忘记抽红包哦',
|
||||||
goldBili: 0,
|
goldBili: 0,
|
||||||
sysInfo:{},
|
sysInfo: {},
|
||||||
isIos:false,
|
isIos: false,
|
||||||
isExamine:1
|
isExamines: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
async init() {
|
async init() {
|
||||||
this.sysInfo=uni.getSystemInfoSync()
|
this.sysInfo = uni.getSystemInfoSync()
|
||||||
this.isIos=this.sysInfo.platform == 'ios'
|
this.isIos = this.sysInfo.platform == 'ios'
|
||||||
const res = await getCommonConfig()
|
const res = await getCommonConfig()
|
||||||
if (res) {
|
if (res) {
|
||||||
for (let i in $map) {
|
for (let i in $map) {
|
||||||
@@ -63,19 +63,47 @@ export const useCommonStore = defineStore("common", {
|
|||||||
this[key] = res[i]
|
this[key] = res[i]
|
||||||
uni.setStorageSync(key, res[i])
|
uni.setStorageSync(key, res[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isIosExamine() {
|
setversion(a, b) {
|
||||||
|
return new Promise(async (resolve, reject) => {
|
||||||
|
this.isExamines = await this.compare(a, b)
|
||||||
|
console.log('判斷值-' + this.isExamines)
|
||||||
|
resolve(this.isExamines)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 判断版本号
|
||||||
|
compare(version1, version2) {
|
||||||
|
let arr1 = version1.split(".");
|
||||||
|
let arr2 = version2.split(".");
|
||||||
|
let length = Math.max(arr1.length, arr2.length);
|
||||||
|
for (let i = 0; i < length; i++) {
|
||||||
|
const n1 = Number(arr1[i] || 0)
|
||||||
|
const n2 = Number(arr2[i] || 0)
|
||||||
|
// version1 > version2 返回1,如果 version1 < version2 返回-1,不然返回0
|
||||||
|
// 当前版 n1 接口版本是 n2
|
||||||
|
// 1小于2 更新弹窗、抽奖等显示
|
||||||
|
if (n1 < n2) return 1
|
||||||
|
// 1大于2 更新弹窗、抽奖不显示
|
||||||
|
if (n1 > n2) return -1
|
||||||
|
}
|
||||||
|
// APP等于2 更新弹窗不显示‘抽奖显示
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
getters: {
|
||||||
|
isIosExamine: function() {
|
||||||
|
console.log(this.isExamines)
|
||||||
if (!this.isIos) {
|
if (!this.isIos) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if (this.isExamine == 1) {
|
if (this.isExamines == -1) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
unistorage: true, // 开启后对 state 的数据读写都将持久化
|
unistorage: true, // 开启后对 state 的数据读写都将持久化
|
||||||
});
|
});
|
||||||
11
vue.config.js
Normal file
11
vue.config.js
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
module.exports = {
|
||||||
|
productionSourceMap: false, // 生产打包时不输出map文件,增加打包速度
|
||||||
|
configureWebpack: config => {
|
||||||
|
if (process.env.NODE_ENV === 'production') {
|
||||||
|
config.optimization.minimizer[0].options.terserOptions.compress.warnings = false
|
||||||
|
config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true
|
||||||
|
config.optimization.minimizer[0].options.terserOptions.compress.drop_debugger = true
|
||||||
|
config.optimization.minimizer[0].options.terserOptions.compress.pure_funcs = ['console.log']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user