修复支付不跳转转盘抽奖问题
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
"version" : "1.0",
|
"version" : "1.0",
|
||||||
"configurations" : [
|
"configurations" : [
|
||||||
{
|
{
|
||||||
"playground" : "standard",
|
"playground" : "custom",
|
||||||
"type" : "uni-app:app-android"
|
"type" : "uni-app:app-android"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
//打包时修改env的值即可
|
//打包时修改env的值即可
|
||||||
const env='test' //test , production,local
|
const env='production' //test , production,local
|
||||||
|
|
||||||
export const encryptKey='1234567890123456' // http数据加解密的key
|
export const encryptKey='1234567890123456' // http数据加解密的key
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
"name" : "斯耀短剧",
|
"name" : "斯耀短剧",
|
||||||
"appid" : "__UNI__E0B05B1",
|
"appid" : "__UNI__E0B05B1",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.2.5",
|
"versionName" : "1.2.6",
|
||||||
"versionCode" : 125,
|
"versionCode" : 126,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
|||||||
@@ -40,20 +40,25 @@
|
|||||||
title: ''
|
title: ''
|
||||||
})
|
})
|
||||||
const refVideoList = ref(null)
|
const refVideoList = ref(null)
|
||||||
|
async function getDetail(){
|
||||||
|
const res = await Api.getVideoDetail(options)
|
||||||
|
isFirstLoad = false
|
||||||
|
Object.assign(state, res)
|
||||||
|
state.list = res.list
|
||||||
|
}
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
/**
|
/**
|
||||||
* 如果是安卓則不做操作,如果是ios判斷是否審核,不審核不套裝
|
* 如果是安卓則不做操作,如果是ios判斷是否審核,不審核不套裝
|
||||||
*/
|
*/
|
||||||
// 是否审核,是否ios
|
// 是否审核,是否ios
|
||||||
if ($common.isIosExamine) {
|
if ($common.isIosExamine) {
|
||||||
const res = await Api.getVideoDetail(options)
|
getDetail()
|
||||||
isFirstLoad = false
|
|
||||||
Object.assign(state, res)
|
|
||||||
state.list = res.list
|
|
||||||
} else {
|
} else {
|
||||||
// ios是否登錄 ?
|
// ios是否登錄 ?
|
||||||
console.log(uni.getStorageSync('tokenTwo'),'提送hi')
|
console.log(uni.getStorageSync('tokenTwo'),'提送hi')
|
||||||
if (uni.getStorageSync('tokenTwo')) {
|
if (uni.getStorageSync('tokenTwo')) {
|
||||||
|
console.log('--------')
|
||||||
const res = await Api.getVideoDetail({...options,token:uni.getStorageSync('tokenTwo')})
|
const res = await Api.getVideoDetail({...options,token:uni.getStorageSync('tokenTwo')})
|
||||||
isFirstLoad = false
|
isFirstLoad = false
|
||||||
Object.assign(state, res)
|
Object.assign(state, res)
|
||||||
@@ -64,7 +69,7 @@
|
|||||||
phone: '18681817128'
|
phone: '18681817128'
|
||||||
})
|
})
|
||||||
uni.setStorageSync('tokenTwo', res.token)
|
uni.setStorageSync('tokenTwo', res.token)
|
||||||
init()
|
getDetail()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -108,19 +113,22 @@
|
|||||||
}) {}
|
}) {}
|
||||||
|
|
||||||
onShow(async () => {
|
onShow(async () => {
|
||||||
|
console.log(isFirstLoad)
|
||||||
if (!isFirstLoad) {
|
if (!isFirstLoad) {
|
||||||
await init()
|
await getDetail()
|
||||||
refVideoList.value.videoListUpdata()
|
refVideoList.value.videoListUpdata()
|
||||||
const drawRes = await Api.getDrawCount()
|
const drawRes = await Api.getDrawCount()
|
||||||
console.log(drawRes);
|
console.log(drawRes);
|
||||||
const nobuyCourseId = uni.getStorageSync('nobuyCourseId')
|
const nobuyCourseId = uni.getStorageSync('nobuyCourseId')
|
||||||
const item = state.list.find(v => v.courseId == nobuyCourseId)
|
const item = state.list.find(v => v.courseDetailsId == nobuyCourseId)
|
||||||
|
console.log(item)
|
||||||
uni.removeStorageSync('nobuyCourseId')
|
uni.removeStorageSync('nobuyCourseId')
|
||||||
if (item) {
|
if (item) {
|
||||||
if (drawRes.count * 1 > 0 && nobuyCourseId !== null && nobuyCourseId !== undefined && item
|
if (drawRes.count * 1 > 0 && nobuyCourseId !== null && nobuyCourseId !== undefined && item
|
||||||
.videoUrl) {
|
.videoUrl) {
|
||||||
|
console.log('跳转抽奖')
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/me/prizeDraw'
|
url: '/pages/index/prizeDraw/kevy-luckydraw'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user