修改ios審核時候的視頻播放
This commit is contained in:
parent
503f1d4594
commit
940cf8c2e7
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
})
|
||||
}
|
||||
|
|
@ -5,13 +5,12 @@
|
|||
@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"
|
||||
: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)"
|
||||
@zhuijuClick="zhuijuClick(item)" @popupShow="popupShow($event,item,index)"></list-item-vue>
|
||||
<list-item-vue :total="list.length" :item="item" :isCommand="isCommand" :height="wHeight"
|
||||
@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)" @zhuijuClick="zhuijuClick(item)"
|
||||
@popupShow="popupShow($event,item,index)"></list-item-vue>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
|
|
@ -23,13 +22,12 @@
|
|||
<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>
|
||||
@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>
|
||||
|
|
@ -102,6 +100,8 @@
|
|||
</view>
|
||||
</view>
|
||||
</up-popup>
|
||||
|
||||
|
||||
<!-- 支付确认 -->
|
||||
<up-popup :show="popup.payTips" :round="10" @close="popupClose('payTips')" :customStyle="customStyle">
|
||||
<view class="u-p-30">
|
||||
|
|
@ -166,7 +166,6 @@
|
|||
getElRect
|
||||
} from '@/utils/util.js'
|
||||
const $common = useCommonStore()
|
||||
|
||||
// #ifdef APP
|
||||
const domModule = uni.requireNativePlugin('dom')
|
||||
// #endif
|
||||
|
|
@ -190,6 +189,9 @@
|
|||
onMounted,
|
||||
getCurrentInstance
|
||||
} from 'vue';
|
||||
import {
|
||||
onShow
|
||||
} from '@dcloudio/uni-app'
|
||||
let initing = true
|
||||
const refPoster = ref(null)
|
||||
|
||||
|
|
@ -237,7 +239,10 @@
|
|||
// #ifdef APP
|
||||
control.showControls = false
|
||||
// #endif
|
||||
|
||||
let isExamine = ref()
|
||||
onShow(() => {
|
||||
$common.init()
|
||||
})
|
||||
const customStyle = computed(() => {
|
||||
// #ifdef H5
|
||||
return {
|
||||
|
|
@ -543,7 +548,7 @@
|
|||
}
|
||||
|
||||
function popupShow(key = 'show', item, index) {
|
||||
console.log(item);
|
||||
console.log(key, item, 'debug');
|
||||
if (key == 'show') {
|
||||
// #ifdef H5
|
||||
nextTick(() => {
|
||||
|
|
@ -560,6 +565,8 @@
|
|||
popup.data = item
|
||||
popup.index = index
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -707,11 +714,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 +732,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 +775,10 @@
|
|||
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)
|
||||
popupShow('pay', item, index)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -822,10 +834,10 @@
|
|||
* @param {type} = [start,end]
|
||||
*/
|
||||
const playStatusChange = debounce((data) => {
|
||||
Api.playStatus(data)
|
||||
Api.playStatus(data)
|
||||
}, 2000)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
videoListUpdata
|
||||
|
|
|
|||
|
|
@ -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" : {
|
||||
|
|
|
|||
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="$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) {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ const $map = {
|
|||
922: 'withdrawNum',
|
||||
500: 'payTips',
|
||||
914: 'goldBili', // 金币比例
|
||||
919: 'isExamine' //是否ios审核中
|
||||
}
|
||||
|
||||
export const useCommonStore = defineStore("common", {
|
||||
|
|
@ -46,15 +45,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 +62,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 的数据读写都将持久化
|
||||
});
|
||||
Loading…
Reference in New Issue