修改ios審核時候的視頻播放

This commit is contained in:
duan
2025-01-18 09:51:56 +08:00
parent 503f1d4594
commit 940cf8c2e7
10 changed files with 189 additions and 110 deletions

View File

@@ -10,7 +10,7 @@
</view> -->
</view>
<template v-if="$common.isIosExamine()">
<template v-if="$common.isIosExamine">
<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="$common.isIosExamine" @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">
@@ -94,8 +94,10 @@
} from '@/store/common.js'
const $common = useCommonStore()
onShow(()=>{
console.log('cash:'+uni.getStorageSync('userInfo').userId + "" + new Date().getTime(),'debug')
// 判断ios是否审核
$common.init()
$common.setversion()
})
let datas = reactive({
noticeList: [], //公告列表
@@ -123,7 +125,7 @@
versionUpdate()
getMsg()
getrecomVideo()
datas.isExamine = $common.isExamine || 0
datas.isExamine = $common.isIosExamine || 0
})
onReady(() => {
if(!uni.getStorageSync('ruleShow')){
@@ -158,8 +160,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) {

View File

@@ -31,7 +31,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')">
<view class="title">我的红包</view>
<view class="num">{{ amount || 0 }}</view>
</view>

View File

@@ -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>
@@ -414,7 +412,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) {

View File

@@ -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>