Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0d3c31ea5 | ||
|
|
54f26055cc | ||
|
|
a62e47fe25 | ||
| 940740ce6d | |||
|
|
940cf8c2e7 | ||
|
|
8622676ebf | ||
| 3b776a3beb | |||
| 9651c9cb6f | |||
|
|
a299b8e846 | ||
|
|
2058c4af58 | ||
| 35909ae42c | |||
| 6c4a6ea804 | |||
| 48154cf82f | |||
|
|
575caba06d | ||
|
|
64d7d9a317 | ||
|
|
503f1d4594 | ||
|
|
ae33f415b0 | ||
| 169b3ca31e | |||
| 8553c5f2b7 | |||
|
|
cd1bfa9ec1 | ||
|
|
e8cb4f83ed | ||
| 699061f506 | |||
| be4bf820b4 |
@@ -2,11 +2,11 @@
|
||||
"version" : "1.0",
|
||||
"configurations" : [
|
||||
{
|
||||
"playground" : "custom",
|
||||
"playground" : "standard",
|
||||
"type" : "uni-app:app-android"
|
||||
},
|
||||
{
|
||||
"playground" : "standard",
|
||||
"playground" : "custom",
|
||||
"type" : "uni-app:app-ios"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -56,6 +56,7 @@ export const discSpinningdraw = (data) => {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export const selectUserMoney = (data) => {
|
||||
return http.request({
|
||||
url: '/moneyDetails/selectUserMoney',
|
||||
|
||||
@@ -58,6 +58,7 @@ export const realNameAuth = (data) => {
|
||||
export const canCash = (data) => {
|
||||
return http.request({
|
||||
url: '/cash/canCash',
|
||||
showLoading: false,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -4,13 +4,29 @@ import http from '@/http/http.js'
|
||||
export const selectTaskCenter = (data) => {
|
||||
return http.request({
|
||||
url: '/taskCenter/selectTaskCenter',
|
||||
data
|
||||
data,
|
||||
showLoading:false
|
||||
})
|
||||
}
|
||||
// 兑换列表
|
||||
export const selectTaskCenterUserReward = (data) => {
|
||||
return http.request({
|
||||
url: '/taskCenterReward/selectTaskCenterUserReward',
|
||||
data,
|
||||
isreturm:true
|
||||
})
|
||||
}
|
||||
// 获取签到
|
||||
export const getUserSignData = (data) => {
|
||||
return http.request({
|
||||
url: 'userSignRecord/getUserSignData',
|
||||
data,
|
||||
showLoading:false
|
||||
})
|
||||
}
|
||||
export const receiveGoods = (data) => {
|
||||
return http.request({
|
||||
url: 'taskCenter/receiveGoods',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,17 +3,24 @@ import http from '@/http/http.js'
|
||||
//获取短剧视频详情
|
||||
export function getVideoDetail(data) {
|
||||
return http.request({
|
||||
url: 'course/courseSets?courseId='+data.courseId,
|
||||
data
|
||||
url: 'course/courseSets',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//追剧
|
||||
export function zhuiju(data) {
|
||||
return http.request({
|
||||
url: 'courseCollect/insertCourseCollect',
|
||||
method:'POST',
|
||||
data:{
|
||||
classify:1,
|
||||
method: 'POST',
|
||||
data: {
|
||||
classify: 1,
|
||||
...data
|
||||
}
|
||||
})
|
||||
@@ -23,9 +30,9 @@ export function zhuiju(data) {
|
||||
export function dianzan(data) {
|
||||
return http.request({
|
||||
url: 'courseCollect/insertCourseCollect',
|
||||
method:'POST',
|
||||
data:{
|
||||
classify:2,
|
||||
method: 'POST',
|
||||
data: {
|
||||
classify: 2,
|
||||
...data
|
||||
}
|
||||
})
|
||||
@@ -33,13 +40,13 @@ export function dianzan(data) {
|
||||
|
||||
//插入播放历史记录
|
||||
|
||||
export function insertHistory(data){
|
||||
export function insertHistory(data) {
|
||||
return http.request({
|
||||
url: 'courseCollect/insertCourseCollect',
|
||||
method:'POST',
|
||||
data:{
|
||||
classify:3,
|
||||
type:1,
|
||||
method: 'POST',
|
||||
data: {
|
||||
classify: 3,
|
||||
type: 1,
|
||||
...data
|
||||
}
|
||||
})
|
||||
@@ -54,12 +61,12 @@ export function getJinbiBili(data) {
|
||||
}
|
||||
|
||||
//获取推荐视频
|
||||
export function tuijianVideo(data){
|
||||
const randomNum=10+ Math.ceil(Math.random()*20)
|
||||
export function tuijianVideo(data) {
|
||||
const randomNum = 10 + Math.ceil(Math.random() * 20)
|
||||
return http.request({
|
||||
url: 'course/selectCourseDetailsList',
|
||||
method:'GET',
|
||||
data:{
|
||||
method: 'GET',
|
||||
data: {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
randomNum: randomNum
|
||||
@@ -67,64 +74,67 @@ export function tuijianVideo(data){
|
||||
})
|
||||
}
|
||||
//解锁10集视频
|
||||
export function buyTenVideo(data){
|
||||
export function buyTenVideo(data) {
|
||||
return http.request({
|
||||
url: 'order/insertCourseOrders/limit10',
|
||||
method:'GET',
|
||||
data:data
|
||||
method: 'GET',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
//解锁单集或者全部视频
|
||||
export function buyVideo(data){
|
||||
export function buyVideo(data) {
|
||||
return http.request({
|
||||
url: 'order/insertCourseOrders',
|
||||
method:'GET',
|
||||
data:data
|
||||
method: 'GET',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
//订单支付
|
||||
export function payOrder(data){
|
||||
let payType='h5'
|
||||
export function payOrder(data) {
|
||||
let payType = 'h5'
|
||||
// #ifdef APP
|
||||
payType='app'
|
||||
payType = 'app'
|
||||
// #endif
|
||||
return http.request({
|
||||
url: 'wuyou/payOrder/'+data.orderId+'?payType='+payType,
|
||||
method:'GET'
|
||||
url: 'wuyou/payOrder/' + data.orderId + '?payType=' + payType,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
//获取订单支付状态
|
||||
export function getOrderInfo(data){
|
||||
export function getOrderInfo(data) {
|
||||
return http.request({
|
||||
url: 'wuyou/queryOrder/'+data.orderId,
|
||||
method:'GET'
|
||||
url: 'wuyou/queryOrder/' + data.orderId,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
//金币解锁
|
||||
export function goldPay(data){
|
||||
export function goldPay(data) {
|
||||
return http.request({
|
||||
url: 'order/payOrders',
|
||||
method:'POST',
|
||||
data:{...data,header:{
|
||||
'content-type':'application/x-www-form-urlencoded'
|
||||
}}
|
||||
method: 'POST',
|
||||
data: {
|
||||
...data,
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//获取转盘抽奖次数
|
||||
export function getDrawCount(data){
|
||||
export function getDrawCount(data) {
|
||||
return http.request({
|
||||
url: 'discSpinning/drawCount',
|
||||
method:'GET',
|
||||
method: 'GET',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//播放开始或者结束
|
||||
export function playStatus(data){
|
||||
export function playStatus(data) {
|
||||
return http.request({
|
||||
url: 'course/viewCourse',
|
||||
method:'GET',
|
||||
method: 'GET',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -132,9 +132,12 @@
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// #ifdef H5
|
||||
getElRect('myCanvas').then(res => {
|
||||
Object.assign(posterData, res)
|
||||
})
|
||||
// #endif
|
||||
|
||||
})
|
||||
|
||||
function hide() {
|
||||
|
||||
@@ -411,7 +411,7 @@
|
||||
color: #ffffff;
|
||||
font-size: 15px;
|
||||
z-index: 9999;
|
||||
transition: all .3s ease-in-out;
|
||||
transition: transform .3s ease-in-out;
|
||||
}
|
||||
|
||||
.u-flex-y-center {
|
||||
@@ -426,7 +426,7 @@
|
||||
}
|
||||
|
||||
.right {
|
||||
transition: all .3s ease-in-out;
|
||||
transition: transform .3s ease-in-out;
|
||||
position: absolute !important;
|
||||
right: 20rpx;
|
||||
/* #ifdef H5 */
|
||||
|
||||
@@ -67,6 +67,10 @@ let loop=ref(false)
|
||||
loop.value=true
|
||||
// #endif
|
||||
const props = defineProps({
|
||||
height:{
|
||||
type:Number,
|
||||
default:0
|
||||
},
|
||||
item: {
|
||||
type: Object,
|
||||
defaulr: () => {
|
||||
@@ -435,7 +439,7 @@ let loop=ref(false)
|
||||
color: #ffffff;
|
||||
font-size: 15px;
|
||||
z-index: 9999;
|
||||
transition: all .3s ease-in-out;
|
||||
transition: transform .3s ease-in-out;
|
||||
}
|
||||
|
||||
.u-flex-y-center {
|
||||
@@ -450,7 +454,7 @@ let loop=ref(false)
|
||||
}
|
||||
|
||||
.right {
|
||||
transition: all .3s ease-in-out;
|
||||
transition: transform .3s ease-in-out;
|
||||
position: absolute !important;
|
||||
right: 20rpx;
|
||||
/* #ifdef H5 */
|
||||
|
||||
@@ -1,22 +1,31 @@
|
||||
<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"
|
||||
|
||||
@timeupdate="timeupdate" @waiting="waiting()" object-fit="cover" @pause="onpause" @click="videoClick()"
|
||||
play-btn-position="center"
|
||||
:show-center-play-btn="false"
|
||||
:show-play-btn="false"
|
||||
:controls="true"
|
||||
@click.stop="videoClick()"
|
||||
@loadedmetadata="loadedmetadata"
|
||||
@timeupdate="timeupdate" @waiting="waiting()" object-fit="cover" @pause="onpause"
|
||||
@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" :poster="item.titleImg" :ref="'myVideo'+item.courseDetailsId"
|
||||
:autoplay="autoplay" @ended="ended" :id="'myVideo'+item.courseDetailsId" :src="item.videoUrl"></video>
|
||||
|
||||
<image class="poster" v-else @click="!item.videoUrl?popupShow('pay',item):''" :src="item.titleImg"
|
||||
<image class="poster" v-else @click.stop="posterClick" :src="item.titleImg"
|
||||
mode="aspectFill">
|
||||
</image>
|
||||
|
||||
|
||||
<view class="play-icon" v-if="videoIsLoadedmetadata&&showVideo&&!isPlying" @click.stop="videoClick()" :style="playStyle">
|
||||
<image class="icon" src="@/static/images/play.png" mode=""></image>
|
||||
</view>
|
||||
|
||||
<view class="info" v-if="!isCommand" :style="infoStyle">
|
||||
<text class="color-fff" v-if="item.courseDetailsName">{{item.courseDetailsName}}</text>
|
||||
<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">
|
||||
{{item.courseDetailsName}}(共{{total}}集)选集 >
|
||||
</text>
|
||||
@@ -26,7 +35,7 @@
|
||||
<view class="info" v-if="isCommand" :style="infoStyle">
|
||||
<text class="color-fff" v-if="item.courseDetailsName">{{item.courseDetailsName}}</text>
|
||||
<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>
|
||||
@@ -70,6 +79,10 @@
|
||||
// #endif
|
||||
|
||||
const props = defineProps({
|
||||
isAndriod:{
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
height:{
|
||||
type:Number,
|
||||
default:0
|
||||
@@ -98,6 +111,10 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
isTabbar:{
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isCommand: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
@@ -146,7 +163,11 @@
|
||||
const emits = defineEmits(['controlstoggles', 'disappear', 'appear', 'waiting', 'videoPlay', 'ended', 'dianzanClick',
|
||||
'share', 'zhuijuClick', 'popupShow', 'itemMounted', 'toDetail', 'showInfo', 'playStatusChange'
|
||||
])
|
||||
|
||||
function posterClick(){
|
||||
if(!props.item.videoUrl){
|
||||
popupShow('pay',props.item)
|
||||
}
|
||||
}
|
||||
function controlstoggles(e) {
|
||||
emits('controlstoggles', e)
|
||||
}
|
||||
@@ -161,6 +182,11 @@
|
||||
function waiting() {
|
||||
|
||||
}
|
||||
|
||||
let videoIsLoadedmetadata=ref(false)
|
||||
function loadedmetadata(){
|
||||
videoIsLoadedmetadata.value=true
|
||||
}
|
||||
|
||||
|
||||
let isPlying = ref(false)
|
||||
@@ -191,9 +217,7 @@
|
||||
|
||||
function timeupdate(e) {
|
||||
//隐藏loding
|
||||
// #ifdef H5
|
||||
uni.hideLoading()
|
||||
// #endif
|
||||
if (isPlayFinish) {
|
||||
return
|
||||
}
|
||||
@@ -280,19 +304,20 @@
|
||||
|
||||
let video = null
|
||||
|
||||
function disappear() {
|
||||
function disappear(e) {
|
||||
emits('disappear',e)
|
||||
if (video) {
|
||||
video.pause()
|
||||
}
|
||||
emits('disappear')
|
||||
}
|
||||
const showVideo = computed(() => {
|
||||
// #ifdef H5
|
||||
return props.current === props.index && props.item.videoUrl
|
||||
// #endif
|
||||
// #ifdef APP
|
||||
return props.nowIndex === props.index && props.item.videoUrl
|
||||
// #endif
|
||||
if(props.isAndriod){
|
||||
console.log('props.nowIndex === props.index ');
|
||||
console.log(props.nowIndex,props.index );
|
||||
return (props.nowIndex === props.index && props.item.videoUrl) ?true :false
|
||||
}else{
|
||||
return props.current === props.index && props.item.videoUrl
|
||||
}
|
||||
})
|
||||
onMounted(() => {
|
||||
init()
|
||||
@@ -330,11 +355,30 @@
|
||||
video = null
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
const customStyle = computed(() => {
|
||||
// #ifdef H5
|
||||
return {
|
||||
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(() => {
|
||||
return {
|
||||
transform: `translateX(${(!isPlying.value||!props.item.videoUrl)?0:'-110%'})`
|
||||
transform: `translateX(${(!isPlying.value||!props.item.videoUrl)?0:'-750rpx'})`
|
||||
}
|
||||
})
|
||||
|
||||
@@ -411,7 +455,7 @@
|
||||
color: #ffffff;
|
||||
font-size: 15px;
|
||||
z-index: 9999;
|
||||
transition: all .3s ease-in-out;
|
||||
transition: transform .3s ease-in-out;
|
||||
}
|
||||
|
||||
.u-flex-y-center {
|
||||
@@ -426,7 +470,7 @@
|
||||
}
|
||||
|
||||
.right {
|
||||
transition: all .3s ease-in-out;
|
||||
transition: transform .3s ease-in-out;
|
||||
position: absolute !important;
|
||||
right: 20rpx;
|
||||
/* #ifdef H5 */
|
||||
@@ -434,7 +478,7 @@
|
||||
transform: translateY(-50%);
|
||||
/* #endif */
|
||||
/* #ifdef APP */
|
||||
top: 500px;
|
||||
bottom: 100px;
|
||||
/* #endif */
|
||||
z-index: 999;
|
||||
color: #fff;
|
||||
@@ -465,45 +509,20 @@
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.ji-list {
|
||||
.ji-item {
|
||||
width: 210rpx;
|
||||
margin-bottom: 20rpx;
|
||||
margin-right: 30rpx;
|
||||
height: 88rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
border-radius: 12rpx;
|
||||
background-color: #F5F7FF;
|
||||
position: relative;
|
||||
|
||||
&.active {
|
||||
background-color: $my-main-color;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
.play-icon{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
$icon-size:80rpx;
|
||||
.icon{
|
||||
width: $icon-size;
|
||||
height: $icon-size;
|
||||
}
|
||||
}
|
||||
|
||||
.ji-item:nth-of-type(3n) {
|
||||
margin-right: 0;
|
||||
|
||||
}
|
||||
|
||||
.hot {
|
||||
|
||||
@@ -1,13 +1,26 @@
|
||||
<template>
|
||||
<!-- #ifdef H5 -->
|
||||
<view class=" w-full box" style="width: 100vw;">
|
||||
<list v-if="showAndriod" :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"
|
||||
:isAndriod="isAndriod" :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)"
|
||||
@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"
|
||||
@transition="transition" :indicator-dots="false" :autoplay="false" :interval="0" :duration="200">
|
||||
<swiper-item v-for="(item,index) in videoList" :key="index">
|
||||
<list-item-vue :total="list.length" :item="item" :isCommand="isCommand"
|
||||
:height="wHeight"
|
||||
@playStatusChange="playStatusChange"
|
||||
<list-item-vue :total="list.length" :item="item" :isCommand="isCommand" :height="wHeight"
|
||||
:isAndriod="isAndriod" :isTabbar="isTabbar" @playStatusChange="playStatusChange"
|
||||
:showControls="control.showControls" :current="current" :isCollect="isCollect"
|
||||
@toDetail="toDetail(item,index)" @controlstoggles="controlstoggles" :playSpeeds="playSpeeds"
|
||||
:index="index" :nowIndex="nowIndex" @dianzanClick="dianzanClick(item,index)" @share="share(item)"
|
||||
@@ -15,34 +28,82 @@
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</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">
|
||||
<u-icon name="arrow-left" color="#fff" :size="28" @click="back"></u-icon>
|
||||
</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-flex u-flex-row u-row-between">
|
||||
<view class="u-flex u-flex-row" style="align-items: baseline;">
|
||||
@@ -51,25 +112,30 @@
|
||||
</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" ref="refXuanjiList"
|
||||
:style="{height:xuanjiData.height+'px'}" @scroll="xuanjiScroll" :scroll-top="xuanjiData.scrollTop"
|
||||
scroll-with-animation :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 :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>
|
||||
<!-- <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>
|
||||
<image v-if="nowIndex==index" class="playing" src="@/static/images/playIng.png" mode="">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</up-popup>
|
||||
|
||||
|
||||
<!-- 支付 -->
|
||||
<up-popup :show="popup.pay" :round="10" @close="popupClose('pay')" :customStyle="customStyle">
|
||||
<view class="u-p-30">
|
||||
@@ -102,6 +168,8 @@
|
||||
</view>
|
||||
</view>
|
||||
</up-popup>
|
||||
|
||||
|
||||
<!-- 支付确认 -->
|
||||
<up-popup :show="popup.payTips" :round="10" @close="popupClose('payTips')" :customStyle="customStyle">
|
||||
<view class="u-p-30">
|
||||
@@ -155,7 +223,9 @@
|
||||
</view>
|
||||
</up-popup>
|
||||
|
||||
<!-- #ifdef H5 -->
|
||||
<my-poster ref="refPoster"></my-poster>
|
||||
<!-- #endif -->
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -166,7 +236,6 @@
|
||||
getElRect
|
||||
} from '@/utils/util.js'
|
||||
const $common = useCommonStore()
|
||||
|
||||
// #ifdef APP
|
||||
const domModule = uni.requireNativePlugin('dom')
|
||||
// #endif
|
||||
@@ -188,8 +257,18 @@
|
||||
watch,
|
||||
nextTick,
|
||||
onMounted,
|
||||
getCurrentInstance
|
||||
getCurrentInstance,
|
||||
onUnmounted
|
||||
} from 'vue';
|
||||
|
||||
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
|
||||
const refPoster = ref(null)
|
||||
|
||||
@@ -237,7 +316,6 @@
|
||||
// #ifdef APP
|
||||
control.showControls = false
|
||||
// #endif
|
||||
|
||||
const customStyle = computed(() => {
|
||||
// #ifdef H5
|
||||
return {
|
||||
@@ -322,7 +400,7 @@
|
||||
scrollTop: 0,
|
||||
items: [],
|
||||
scrollHeight: 0,
|
||||
height: 400
|
||||
height: 300
|
||||
})
|
||||
const refXuanjiList = ref(null)
|
||||
|
||||
@@ -330,15 +408,19 @@
|
||||
console.log(e);
|
||||
}
|
||||
async function xuanjiInit() {
|
||||
// #ifdef APP
|
||||
|
||||
const height = 44
|
||||
const marginBottom = 10
|
||||
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
|
||||
return
|
||||
// #endif
|
||||
if (props.list.length <= 15) {
|
||||
xuanjiData.scrollTop = 0
|
||||
return
|
||||
}
|
||||
xuanjiData.scrollTop = scrollTop * 1 < 0 ? 0 : scrollTop
|
||||
|
||||
// #ifdef H5
|
||||
if (!xuanjiData.items[props.list.length - 1]) {
|
||||
const res = await getElRect('ji-list', instance, {
|
||||
rect: true
|
||||
@@ -361,6 +443,9 @@
|
||||
xuanjiData.scrollTop = xuanjiData.items[nowIndex.value].top - (xuanjiData.height) / 2 + (xuanjiData.items[
|
||||
nowIndex.value].height) / 2
|
||||
console.log(xuanjiData);
|
||||
// #endif
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -374,14 +459,15 @@
|
||||
if (isFirst) {
|
||||
$mountedComponents[index] = true
|
||||
}
|
||||
console.log('appear:' + index);
|
||||
if (!initing) {
|
||||
cacheIndex = index
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function disappear(item, index) {
|
||||
|
||||
if (index == nowIndex.value && cacheIndex != null && !initing) {
|
||||
function disappear(e, item, index) {
|
||||
if (index == nowIndex.value && cacheIndex !== null && !initing) {
|
||||
console.log('disappear' + index);
|
||||
console.log('disappear nowIndex' + nowIndex.value);
|
||||
console.log('cacheIndex' + cacheIndex);
|
||||
@@ -488,9 +574,9 @@
|
||||
videoList.value[newCurrent] = item;
|
||||
current.value = newCurrent;
|
||||
popupClose('show')
|
||||
// #ifdef APP
|
||||
goListPosition(index)
|
||||
// #endif
|
||||
if (showAndriod) {
|
||||
goListPosition(index)
|
||||
}
|
||||
}
|
||||
|
||||
let refList = ref([])
|
||||
@@ -533,17 +619,25 @@
|
||||
|
||||
|
||||
function popupClose(key) {
|
||||
console.log('popupClose:' + key);
|
||||
if (key == 'show') {
|
||||
// xuanjiData.scrollTop = 0
|
||||
}
|
||||
if (key) {
|
||||
popup[key] = false
|
||||
return
|
||||
}
|
||||
for (let i in popup) {
|
||||
popup[i] = false
|
||||
if (!i.includes(['data', 'payType'])) {
|
||||
popup[i] = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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') {
|
||||
// #ifdef H5
|
||||
nextTick(() => {
|
||||
@@ -553,13 +647,14 @@
|
||||
// #ifdef APP
|
||||
xuanjiInit()
|
||||
// #endif
|
||||
|
||||
}
|
||||
popup[key] = true
|
||||
if (item) {
|
||||
popup.data = item
|
||||
popup.index = index
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -602,15 +697,14 @@
|
||||
let item = props.list.find(v => props.options.courseDetailsId == v.courseDetailsId)
|
||||
item = item ? item : props.info.current;
|
||||
if (JSON.stringify(item) !== '{}') {
|
||||
// #ifdef H5
|
||||
setVideoList(item)
|
||||
// #endif
|
||||
// #ifdef APP
|
||||
nextTick(() => {
|
||||
const index = props.list.findIndex(v => v.courseDetailsId == item.courseDetailsId)
|
||||
goListPosition(index)
|
||||
})
|
||||
// #endif
|
||||
if (showAndriod) {
|
||||
nextTick(() => {
|
||||
const index = props.list.findIndex(v => v.courseDetailsId == item.courseDetailsId)
|
||||
goListPosition(index)
|
||||
})
|
||||
} else {
|
||||
setVideoList(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -707,11 +801,13 @@
|
||||
|
||||
|
||||
const insertHistory = debounce(() => {
|
||||
const item = videoList.value[current.value]
|
||||
Api.insertHistory({
|
||||
courseId: item.courseId,
|
||||
courseDetailsId: item.courseDetailsId
|
||||
})
|
||||
if (uni.getStorageSync("token")) {
|
||||
const item = videoList.value[current.value]
|
||||
Api.insertHistory({
|
||||
courseId: item.courseId,
|
||||
courseDetailsId: item.courseDetailsId
|
||||
})
|
||||
}
|
||||
}, 1000)
|
||||
|
||||
function swiperChange(e) {
|
||||
@@ -723,8 +819,10 @@
|
||||
setVideoList(item)
|
||||
}
|
||||
|
||||
|
||||
const refPopup=ref(null)
|
||||
function setVideoList(item) {
|
||||
|
||||
|
||||
const listLen = props.list.length
|
||||
const lastIndex = listLen - 1
|
||||
const index = props.list.findIndex(v => v.courseDetailsId == item.courseDetailsId)
|
||||
@@ -764,9 +862,13 @@
|
||||
videoList.value = [props.list[index + 1], props.list[index - 1], item]
|
||||
}
|
||||
}
|
||||
console.log(videoList.value);
|
||||
console.log(videoList.value, 'debug');
|
||||
if (!item.videoUrl) {
|
||||
popupShow('pay', item, index)
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
popupShow('pay', item, index)
|
||||
}, 100)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -789,9 +891,9 @@
|
||||
})
|
||||
watch(() => props.list.length, (newval) => {
|
||||
console.log('props.list.length change' + newval);
|
||||
// #ifdef H5
|
||||
init()
|
||||
// #endif
|
||||
if (!showAndriod) {
|
||||
init()
|
||||
}
|
||||
})
|
||||
watch(() => nowIndex.value, (newval) => {})
|
||||
const nowDanjiPrice = computed(() => {
|
||||
@@ -822,10 +924,10 @@
|
||||
* @param {type} = [start,end]
|
||||
*/
|
||||
const playStatusChange = debounce((data) => {
|
||||
Api.playStatus(data)
|
||||
Api.playStatus(data)
|
||||
}, 2000)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
videoListUpdata
|
||||
@@ -941,7 +1043,7 @@
|
||||
|
||||
.ji-list {
|
||||
.ji-item {
|
||||
width: 210rpx;
|
||||
width: 208rpx;
|
||||
margin-bottom: 20rpx;
|
||||
margin-right: 30rpx;
|
||||
height: 88rpx;
|
||||
@@ -967,6 +1069,11 @@
|
||||
padding: 2rpx 4rpx;
|
||||
top: 0;
|
||||
right: 0;
|
||||
|
||||
.lock-icon {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.playing {
|
||||
@@ -978,7 +1085,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.ji-item:nth-of-type(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
@@ -1041,9 +1149,48 @@
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
|
||||
.playing {}
|
||||
|
||||
&.active {
|
||||
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>
|
||||
@@ -58,7 +58,7 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
|
||||
// 避免混淆重新命名
|
||||
let bodyData = data;
|
||||
if (isreturm) {
|
||||
return Promise.resolve(bodyData.data || bodyData.page || bodyData);
|
||||
return Promise.resolve(bodyData);
|
||||
}
|
||||
if (statusCode == 500) {
|
||||
isShowErrorToast = true;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"name" : "duanju-app-v3",
|
||||
"appid" : "__UNI__E0B05B1",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : 100,
|
||||
"versionName" : "2.3.4",
|
||||
"versionCode" : 234,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
@@ -64,7 +64,7 @@
|
||||
"unipush" : {}
|
||||
},
|
||||
"ad" : {
|
||||
"gdt" : {}
|
||||
"ks" : {}
|
||||
}
|
||||
},
|
||||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
|
||||
|
||||
12
pages.json
12
pages.json
@@ -254,5 +254,15 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"uniIdRouter": {}
|
||||
"uniIdRouter": {},
|
||||
"condition" : { //模式配置,仅开发期间生效
|
||||
"current": 0, //当前激活的模式(list 的索引项)
|
||||
"list": [
|
||||
{
|
||||
"name": "", //模式名称
|
||||
"path": "", //启动页面,必选
|
||||
"query": "" //启动参数,在页面的onLoad函数里面得到
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<template v-if="$common.isIosExamine()">
|
||||
<template v-if="datas.setindexdata">
|
||||
<view class="gongao">
|
||||
<view class="gongaoicon">
|
||||
公告
|
||||
@@ -42,7 +42,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<contentlist :list='datas.list'></contentlist>
|
||||
<image v-if="$common.isIosExamine()" @click="goMsg()" src="@/static/index/red-pack-new.gif"
|
||||
<image v-if="datas.setindexdata" @click="goMsg()" src="@/static/index/red-pack-new.gif"
|
||||
style="width: 200rpx;height: 200rpx;position: fixed;right: 10rpx;bottom: 180rpx;" mode=""></image>
|
||||
<up-modal :show="datas.version.show" :confirm-text="datas.version.confirmText"
|
||||
:showCancelButton="datas.version.cancelText!=''" @confirm='confirmUpdateVersion' :title="datas.version.title"
|
||||
@@ -53,7 +53,7 @@
|
||||
</scroll-view>
|
||||
</view>
|
||||
</up-modal>
|
||||
<up-modal :show="datas.ruleShow" v-if="$common.isIosExamine()&&!datas.version.show" confirm-text="知道了" title="规则说明"
|
||||
<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"
|
||||
confirm-color="rgb(255, 117, 129)">
|
||||
<view class="u-p-30 u-text-left">
|
||||
@@ -93,9 +93,15 @@
|
||||
useCommonStore
|
||||
} from '@/store/common.js'
|
||||
const $common = useCommonStore()
|
||||
onShow(()=>{
|
||||
onShow(() => {
|
||||
console.log('cash:' + uni.getStorageSync('userInfo').userId + "" + new Date().getTime(), 'debug')
|
||||
// 判断ios是否审核
|
||||
$common.init()
|
||||
let sysInfo = uni.getSystemInfoSync()
|
||||
let isIos = sysInfo.platform == 'ios'
|
||||
if (isIos) {
|
||||
datas.setindexdata = $common.isIosExamine
|
||||
}
|
||||
})
|
||||
let datas = reactive({
|
||||
noticeList: [], //公告列表
|
||||
@@ -110,23 +116,24 @@
|
||||
rule_content: '', // 首页弹窗内容
|
||||
ruleIndex: 0,
|
||||
ruleList: [],
|
||||
|
||||
|
||||
version: {
|
||||
show: false,
|
||||
title: "",
|
||||
content: "",
|
||||
confirmText: "",
|
||||
cancelText: "",
|
||||
}
|
||||
},
|
||||
setindexdata :"false"
|
||||
})
|
||||
onLoad(() => {
|
||||
versionUpdate()
|
||||
getMsg()
|
||||
getrecomVideo()
|
||||
datas.isExamine = $common.isExamine || 0
|
||||
datas.isExamine = $common.isIosExamine || 0
|
||||
})
|
||||
onReady(() => {
|
||||
if(!uni.getStorageSync('ruleShow')){
|
||||
if (!uni.getStorageSync('ruleShow')) {
|
||||
announcement({
|
||||
type: 0
|
||||
}).then(res => {
|
||||
@@ -137,7 +144,7 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
onReachBottom(() => {
|
||||
++datas.page
|
||||
@@ -158,8 +165,8 @@
|
||||
}
|
||||
if (uni.getSystemInfoSync().platform == 'ios') {
|
||||
version = res.iosVersion
|
||||
$common.setversion(widgetInfo.version, version)
|
||||
}
|
||||
console.log(widgetInfo.version + '---' + version)
|
||||
version = res.version
|
||||
// && uni.getSystemInfoSync().platform == 'android'
|
||||
if (widgetInfo.version < version) {
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="nav" style="width: 100%;height: 96rpx;"></view>
|
||||
<view class="bg" >
|
||||
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
|
||||
</view>
|
||||
<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 style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">重置密码</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">手机号</view>
|
||||
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
|
||||
@input="inputChange" />
|
||||
<view class="input" style="padding-left: 20rpx;">
|
||||
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
|
||||
@input="inputChange" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<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="inputChange" @confirm="reset" />
|
||||
<button class="send-msg" @click="sendMsg" :disabled="data.sending">{{ data.sendTime }}</button>
|
||||
@@ -23,8 +26,11 @@
|
||||
|
||||
<view class="cu-form-group">
|
||||
<text class="title">设置密码</text>
|
||||
<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 class="input" style="padding-left: 20rpx;">
|
||||
<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>
|
||||
<button class="confirm-btn" @click="reset">立即重置</button>
|
||||
</view>
|
||||
@@ -188,10 +194,10 @@
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 78rpx;
|
||||
// position: absolute;
|
||||
// left: 0;
|
||||
// right: 0;
|
||||
// bottom: 78rpx;
|
||||
|
||||
}
|
||||
.cuIcon::before{
|
||||
@@ -254,14 +260,20 @@
|
||||
}
|
||||
.input{
|
||||
width: 100%;
|
||||
height: 84rpx;
|
||||
line-height: 84rpx;
|
||||
// height: 84rpx;
|
||||
// line-height: 84rpx;
|
||||
background-color: #fff;
|
||||
align-items: center;
|
||||
padding: 22rpx 32rpx 22rpx 24rpx;
|
||||
// padding: 22rpx 32rpx 22rpx 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
input{
|
||||
height: 84rpx!important;
|
||||
}
|
||||
v-deep .uni-input-input{
|
||||
height: 84rpx!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="nav" style="width: 100%;height: 96rpx;"></view>
|
||||
<view class="bg" >
|
||||
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="wrapper">
|
||||
<view class="nav" style="width: 100%;height: 96rpx;"></view>
|
||||
<view class="input-content">
|
||||
<view style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">登录</view>
|
||||
|
||||
<view class="cu-form-group">
|
||||
<view class="title">手机号</view>
|
||||
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
|
||||
@input="inputChange" />
|
||||
<view class="input" style="padding-left: 20rpx;">
|
||||
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
|
||||
@input="inputChange" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group">
|
||||
<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"
|
||||
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>
|
||||
@@ -222,11 +224,17 @@
|
||||
}
|
||||
.cu-form-group .input{
|
||||
width: 100%!important;
|
||||
height: 84rpx;
|
||||
line-height: 84rpx;
|
||||
// height: 84rpx;
|
||||
// line-height: 84rpx;
|
||||
background-color: #fff;
|
||||
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{
|
||||
display: flex;
|
||||
|
||||
@@ -1,21 +1,24 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="nav" style="width: 100%;height: 96rpx;"></view>
|
||||
<view class="bg" >
|
||||
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
|
||||
</view>
|
||||
<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 style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">注册</view>
|
||||
|
||||
<view class="cu-form-group">
|
||||
<view class="title">手机号</view>
|
||||
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
|
||||
@input="inputChange" />
|
||||
<view class="input" style="padding-left: 20rpx;">
|
||||
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
|
||||
@input="inputChange" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<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="inputChange" @confirm="toRegister" />
|
||||
<button class="send-msg" @click="sendMsg" :disabled="data.sending">{{ data.sendTime }}</button>
|
||||
@@ -24,8 +27,11 @@
|
||||
|
||||
<view class="cu-form-group">
|
||||
<text class="title">设置密码</text>
|
||||
<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 class="input" style="padding-left: 20rpx;">
|
||||
<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>
|
||||
<button class="confirm-btn" @click="toRegister">注册</button>
|
||||
<button class="confirm-btn" @click="toLogin">登录</button>
|
||||
@@ -270,7 +276,7 @@
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" >
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background: #ffffff;
|
||||
}
|
||||
@@ -299,10 +305,7 @@
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 178rpx;
|
||||
margin-top: 50rpx;
|
||||
|
||||
}
|
||||
.cuIcon::before{
|
||||
@@ -324,12 +327,15 @@
|
||||
color: #EC6F48;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.send-msg::after{
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
|
||||
.container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
@@ -363,14 +369,20 @@
|
||||
}
|
||||
.input{
|
||||
width: 100%;
|
||||
height: 84rpx;
|
||||
line-height: 84rpx;
|
||||
// height: 84rpx;
|
||||
// line-height: 84rpx;
|
||||
background-color: #fff;
|
||||
align-items: center;
|
||||
padding: 22rpx 32rpx 22rpx 24rpx;
|
||||
// padding: 22rpx 32rpx 22rpx 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
input{
|
||||
height: 84rpx!important;
|
||||
}
|
||||
v-deep .uni-input-input{
|
||||
height: 84rpx!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -311,10 +311,10 @@
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 178rpx;
|
||||
// position: absolute;
|
||||
// left: 0;
|
||||
// right: 0;
|
||||
// bottom: 178rpx;
|
||||
.cuIcon::before{
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
|
||||
@@ -9,14 +9,12 @@
|
||||
<image class="img" src="/static/logo.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<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>
|
||||
<navigator hover-class="none" url="/pages/me/contact">
|
||||
<image class="icon" src="/static/me/logo_btn3.png" mode="aspectFit"></image>
|
||||
</navigator>
|
||||
<image class="icon" src="/static/me/logo_btn3.png" mode="aspectFit" @click="linkTo('/pages/me/contact', true)"></image>
|
||||
</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>
|
||||
<view class="info-wrap">
|
||||
<view class="name">{{ userInfo.phone || '请登录' }}</view>
|
||||
@@ -31,7 +29,7 @@
|
||||
<view class="title">我的追剧</view>
|
||||
<view class="num">{{ likeData.collectCount }}</view>
|
||||
</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="num">{{ amount || 0 }}</view>
|
||||
</view>
|
||||
@@ -43,16 +41,18 @@
|
||||
<image class="icon" src="/static/me/gold_icon.png" mode="aspectFit"></image>
|
||||
<view class="num">{{ gold }}</view>
|
||||
</view>
|
||||
<navigator hover-class="none" url="/pages/me/gold_record">
|
||||
<div @click="linkTo('/pages/me/gold_record', true)">
|
||||
<view class="btn">金币明细</view>
|
||||
</navigator>
|
||||
</div>
|
||||
|
||||
</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="t">观看历史</view>
|
||||
<up-icon name="arrow-right"></up-icon>
|
||||
</view>
|
||||
</navigator>
|
||||
</div>
|
||||
|
||||
<view class="history-list">
|
||||
<view
|
||||
class="item"
|
||||
@@ -180,10 +180,13 @@ onPullDownRefresh(async () => {
|
||||
});
|
||||
|
||||
onLoad(() => {
|
||||
selectByUserIdAjax();
|
||||
collectVideoSummaryAjax();
|
||||
selectUserMoneyAjax();
|
||||
userInfo.value = uni.getStorageSync('userInfo');
|
||||
if(uni.getStorageSync('token')){
|
||||
selectByUserIdAjax();
|
||||
collectVideoSummaryAjax();
|
||||
selectUserMoneyAjax();
|
||||
userInfo.value = uni.getStorageSync('userInfo');
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="list">
|
||||
<view class="item" @click="linkTo('/pages/login/bind')">
|
||||
<view class="item" @click="linkTo('/pages/login/bind',true)">
|
||||
<view class="title">修改手机号</view>
|
||||
<up-icon name="arrow-right" />
|
||||
</view>
|
||||
@@ -9,7 +9,7 @@
|
||||
<view class="title">帮助中心</view>
|
||||
<up-icon name="arrow-right" />
|
||||
</view>
|
||||
<view class="item" @click="linkTo('/pages/me/feedback')">
|
||||
<view class="item" @click="linkTo('/pages/me/feedback',true)">
|
||||
<view class="title">意见反馈</view>
|
||||
<up-icon name="arrow-right" />
|
||||
</view>
|
||||
@@ -21,7 +21,7 @@
|
||||
<view class="title">隐私协议</view>
|
||||
<up-icon name="arrow-right" />
|
||||
</view>
|
||||
<view class="item" @click="logout">
|
||||
<view class="item" @click="logout" v-if="token">
|
||||
<view class="title">退出登录</view>
|
||||
<up-icon name="arrow-right" />
|
||||
</view>
|
||||
@@ -36,6 +36,7 @@ import { linkTo } from '@/utils/app.js';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
|
||||
const version = ref('');
|
||||
const token = ref('');
|
||||
|
||||
// 退出登录
|
||||
function logout() {
|
||||
@@ -54,6 +55,7 @@ function logout() {
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
token.value = uni.getStorageSync('token');
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
//#ifdef APP-PLUS
|
||||
version.value = systemInfo.appWgtVersion;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<view class="input" style="">
|
||||
<view style="display: flex;align-items: center;">
|
||||
<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 class="allbtn" @click="setAllMoney">
|
||||
全部
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
<script setup>
|
||||
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 { selectUserById } from '@/api/user/user.js';
|
||||
import { announcement } from '@/api/index/index.js';
|
||||
@@ -133,23 +133,24 @@
|
||||
getExtractFei();
|
||||
getMoneyDetail();
|
||||
getCanCash()
|
||||
|
||||
announcement({type: 1}).then(res=>{
|
||||
data.ruleList = res
|
||||
ruleInit()
|
||||
|
||||
})
|
||||
})
|
||||
onShow(() => {
|
||||
getcashMoney()
|
||||
getUserInfo();
|
||||
announcement({type: 1}).then(res=>{
|
||||
data.ruleList = res
|
||||
ruleInit()
|
||||
data.ruleShow = true
|
||||
})
|
||||
})
|
||||
onReady(() => {
|
||||
nextTick(()=>{
|
||||
data.adRewardedVideoloadNum = 0
|
||||
adRewardedw.value.load();
|
||||
data.ruleShow = true
|
||||
})
|
||||
})
|
||||
|
||||
onReachBottom(() => {
|
||||
if (data.page * data.limit < data.totalCount) {
|
||||
data.page = data.page + 1;
|
||||
|
||||
@@ -98,7 +98,6 @@
|
||||
import config from '@/commons/config.js';
|
||||
let data = reactive({
|
||||
loading:false,
|
||||
qrcode: false,
|
||||
earning: {
|
||||
inviteMoney: 0,
|
||||
inviteGoldMoney: 0,
|
||||
@@ -122,8 +121,6 @@
|
||||
bgImg: '',
|
||||
tuiguang: '',
|
||||
invitationCode: uni.getStorageSync('userInfo').invitationCode,
|
||||
h5SaveImg: '',
|
||||
haibaoImgH5: '',
|
||||
inviteSignCount:0,
|
||||
canvasW: 350,
|
||||
canvasH: 667,
|
||||
@@ -133,7 +130,7 @@
|
||||
getInviter()
|
||||
queryInviter()
|
||||
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)
|
||||
})
|
||||
|
||||
|
||||
@@ -42,19 +42,17 @@
|
||||
<view class="subhead ">{{ item.detail }}</view>
|
||||
</view>
|
||||
<view class="cell_right ">
|
||||
<view v-if="item.disabled" class="btn "
|
||||
:style="{ backgroundColor: item.buttonBgColor, color: item.buttonFontColor }"
|
||||
@tap="goNav(item)">
|
||||
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` : (
|
||||
item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }}
|
||||
<view v-if=" item.disabled " class="btn u-font-24 text-bold"
|
||||
:style="{backgroundColor: item.buttonBgColor,color: item.buttonFontColor }"
|
||||
@click="goNav(item)">
|
||||
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` : ( item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }}
|
||||
</view>
|
||||
<view v-else class="btn disabled">
|
||||
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}`
|
||||
: (item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }}
|
||||
<view v-if="item.buttonUnderContent && item.buttonUnderUrl" class=" tip"
|
||||
@tap="goNav(item, item.buttonUnderUrl)">
|
||||
{{ item.buttonUnderContent }}
|
||||
</view>
|
||||
<view v-else class="btn u-font-24 text-bold disabled">
|
||||
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` : ( item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }}
|
||||
</view>
|
||||
<view v-if=" item.buttonUnderContent && item.buttonUnderUrl " class="u-font-22 tip" style="text-align: center;"
|
||||
@click="goNav({id: item.id,buttonUrl: item.buttonUnderUrl, jumpType: 1,title: item.title, disabled: item.disabled, discNumber: item.discNumber})">
|
||||
{{ item.buttonUnderContent}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -110,7 +108,7 @@
|
||||
})
|
||||
const adRewarded = ref(null);
|
||||
onShow(() => {
|
||||
$common.init()
|
||||
// $common.init()
|
||||
// if ( uni.getSystemInfoSync().platform == 'android' ) {
|
||||
// datas.adpid = 1531580352
|
||||
// }
|
||||
@@ -276,6 +274,10 @@
|
||||
let res = await state({
|
||||
extraKey: datas.urlCallback.extra
|
||||
})
|
||||
uni.showToast({
|
||||
title: '获得' + $common.freeDuration + '分钟免费时长',
|
||||
icon: 'none'
|
||||
})
|
||||
} else {
|
||||
// 播放中途退出
|
||||
}
|
||||
@@ -414,7 +416,7 @@
|
||||
async function getTaskdata() {
|
||||
let res = await selectTaskCenter()
|
||||
let arrData = []
|
||||
if (!$common.isIosExamine()) {
|
||||
if (!$common.isIosExamine) {
|
||||
res.forEach(ele => {
|
||||
if (ele.title.indexOf('分享奖励') == -1 && ele.title.indexOf('新人福利') == -1 &&
|
||||
ele.title.indexOf('观看视频奖励') == -1) {
|
||||
|
||||
@@ -12,11 +12,35 @@
|
||||
</view>
|
||||
<view class="cell " v-for="(item, index) in datas.list" :key="index">
|
||||
<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=" title">{{ item.name }}</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>
|
||||
@@ -25,169 +49,267 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref, onMounted, onUnmounted, getCurrentInstance } from 'vue'
|
||||
import {
|
||||
onLoad
|
||||
} from '@dcloudio/uni-app'
|
||||
import { selectDiscSpinning } from '@/api/task/index.js'
|
||||
let datas = reactive({
|
||||
list: [],
|
||||
source: null
|
||||
import {
|
||||
reactive,
|
||||
ref,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
getCurrentInstance
|
||||
} from 'vue'
|
||||
import {
|
||||
onLoad
|
||||
} from '@dcloudio/uni-app'
|
||||
import {
|
||||
selectTaskCenterUserReward
|
||||
} from '@/api/task/index.js'
|
||||
let datas = reactive({
|
||||
list: [],
|
||||
source: null,
|
||||
standard: true,
|
||||
receive: null,
|
||||
record: null,
|
||||
taskId: "",
|
||||
|
||||
})
|
||||
onLoad(options => {
|
||||
datas.source = options.source
|
||||
getList()
|
||||
})
|
||||
})
|
||||
onLoad(options => {
|
||||
console.log(options, '调试1')
|
||||
if (options.source) {
|
||||
datas.source = options.source
|
||||
}
|
||||
if (options.standard) {
|
||||
datas.standard = options.standard
|
||||
}
|
||||
if (options.taskId) {
|
||||
datas.taskId = options.taskId
|
||||
}
|
||||
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>
|
||||
|
||||
<style lang="scss">
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
|
||||
// display: flex;
|
||||
// flex-direction: column;
|
||||
.task_bg {
|
||||
width: 100% !important;
|
||||
height: 470rpx !important;
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
position: relative;
|
||||
|
||||
.title {
|
||||
width: 314rpx;
|
||||
height: 72rpx;
|
||||
line-height: 72rpx;
|
||||
text-align: center;
|
||||
border-radius: 108rpx 108rpx 108rpx 108rpx;
|
||||
border: 6rpx solid #3D6DC6;
|
||||
font-weight: bold;
|
||||
font-size: 34rpx;
|
||||
color: #3D6DC6;
|
||||
position: absolute;
|
||||
top: 210rpx;
|
||||
left: 26rpx;
|
||||
}
|
||||
}
|
||||
// display: flex;
|
||||
// flex-direction: column;
|
||||
.task_bg {
|
||||
width: 100% !important;
|
||||
height: 470rpx !important;
|
||||
position: relative;
|
||||
|
||||
.content {
|
||||
color: #666666;
|
||||
height: calc(100% - 410rpx);
|
||||
border-radius: 16rpx;
|
||||
top: -60rpx;
|
||||
z-index: 9;
|
||||
padding: 64rpx 28rpx;
|
||||
background: linear-gradient(-45deg, #DDEAFC 0%, #FFFFFF 100%);
|
||||
border-radius: 32rpx 32rpx 0rpx 0rpx;
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
|
||||
>.title {
|
||||
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;
|
||||
.title {
|
||||
width: 314rpx;
|
||||
height: 72rpx;
|
||||
line-height: 72rpx;
|
||||
text-align: center;
|
||||
border-radius: 108rpx 108rpx 108rpx 108rpx;
|
||||
border: 6rpx solid #3D6DC6;
|
||||
font-weight: bold;
|
||||
font-size: 34rpx;
|
||||
color: #3D6DC6;
|
||||
position: absolute;
|
||||
top: 210rpx;
|
||||
left: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
.content {
|
||||
color: #666666;
|
||||
height: calc(100% - 410rpx);
|
||||
border-radius: 16rpx;
|
||||
top: -60rpx;
|
||||
z-index: 9;
|
||||
padding: 64rpx 28rpx;
|
||||
background: linear-gradient(-45deg, #DDEAFC 0%, #FFFFFF 100%);
|
||||
border-radius: 32rpx 32rpx 0rpx 0rpx;
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
|
||||
.cell_left {
|
||||
display: flex;
|
||||
|
||||
flex-direction: row;
|
||||
>.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
margin-bottom: 22rpx;
|
||||
|
||||
.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;
|
||||
.tip {
|
||||
font-weight: 400;
|
||||
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;
|
||||
color: #666666;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.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>
|
||||
@@ -1,17 +1,24 @@
|
||||
<template>
|
||||
<view class="min-page">
|
||||
<my-video-list ref="refVideoList" v-if="state.list.length" @swiperChange="swiperChange" :list="state.list"
|
||||
:options="options"
|
||||
@update="update" :info="state"></my-video-list>
|
||||
:options="options" @update="update" :info="state"></my-video-list>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
onLoad,onHide,
|
||||
onLoad,
|
||||
onHide,
|
||||
onShow
|
||||
} from '@dcloudio/uni-app'
|
||||
import {
|
||||
login
|
||||
} from '@/api/login/login.js';
|
||||
import * as Api from '@/api/video/index.js'
|
||||
import {
|
||||
useCommonStore
|
||||
} from '@/store/common.js';
|
||||
const $common = useCommonStore();
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
@@ -23,7 +30,7 @@
|
||||
const sysInfo = uni.getSystemInfoSync()
|
||||
let isFirstLoad = true
|
||||
let options = {
|
||||
courseDetailsId:''
|
||||
courseDetailsId: ''
|
||||
}
|
||||
const state = reactive({
|
||||
collect: 0,
|
||||
@@ -34,11 +41,40 @@
|
||||
})
|
||||
const refVideoList = ref(null)
|
||||
async function init() {
|
||||
try {
|
||||
/**
|
||||
* 如果是安卓則不做操作,如果是ios判斷是否審核,不審核不套裝
|
||||
*/
|
||||
// 是否审核,是否ios
|
||||
if ($common.isIosExamine) {
|
||||
const res = await Api.getVideoDetail(options)
|
||||
isFirstLoad = false
|
||||
Object.assign(state, res)
|
||||
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) {
|
||||
// if(getCurrentPages().length>=2){
|
||||
// uni.navigateBack()
|
||||
@@ -81,7 +117,7 @@
|
||||
const nobuyCourseId = uni.getStorageSync('nobuyCourseId')
|
||||
const item = state.list.find(v => v.courseId == nobuyCourseId)
|
||||
uni.removeStorageSync('nobuyCourseId')
|
||||
if(item){
|
||||
if (item) {
|
||||
if (drawRes.count * 1 > 0 && nobuyCourseId !== null && nobuyCourseId !== undefined && item
|
||||
.videoUrl) {
|
||||
uni.navigateTo({
|
||||
@@ -89,7 +125,7 @@
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</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',
|
||||
500: 'payTips',
|
||||
914: 'goldBili', // 金币比例
|
||||
919: 'isExamine' //是否ios审核中
|
||||
921: 'freeDuration' //看广告免费分钟时长
|
||||
}
|
||||
|
||||
export const useCommonStore = defineStore("common", {
|
||||
@@ -46,15 +46,15 @@ export const useCommonStore = defineStore("common", {
|
||||
return {
|
||||
payTips: '付款完成后不要忘记抽红包哦',
|
||||
goldBili: 0,
|
||||
sysInfo:{},
|
||||
isIos:false,
|
||||
isExamine:1
|
||||
sysInfo: {},
|
||||
isIos: false,
|
||||
isExamines: 0
|
||||
};
|
||||
},
|
||||
actions: {
|
||||
async init() {
|
||||
this.sysInfo=uni.getSystemInfoSync()
|
||||
this.isIos=this.sysInfo.platform == 'ios'
|
||||
this.sysInfo = uni.getSystemInfoSync()
|
||||
this.isIos = this.sysInfo.platform == 'ios'
|
||||
const res = await getCommonConfig()
|
||||
if (res) {
|
||||
for (let i in $map) {
|
||||
@@ -63,19 +63,31 @@ export const useCommonStore = defineStore("common", {
|
||||
this[key] = res[i]
|
||||
uni.setStorageSync(key, res[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
isIosExamine() {
|
||||
setversion(a, b) {
|
||||
// a是當前應用的版本號 b是接口拿的
|
||||
let appversion = (a.split('.').join('')) * 1
|
||||
let resversion = (b.split('.').join('')) * 1
|
||||
console.log('當前版本-' + appversion, '接口版本-' + resversion, '返回-' + this.isIosExamine,'判斷值-'+this.isExamines)
|
||||
if (appversion > resversion) {
|
||||
// 再審核
|
||||
this.isExamines = 1
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
getters: {
|
||||
isIosExamine: function() {
|
||||
if (!this.isIos) {
|
||||
return true
|
||||
}
|
||||
if (this.isExamine == 1) {
|
||||
}
|
||||
if (this.isExamines == 1) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
},
|
||||
|
||||
unistorage: true, // 开启后对 state 的数据读写都将持久化
|
||||
});
|
||||
Reference in New Issue
Block a user