Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/new_app into test
This commit is contained in:
commit
1281fd5513
|
|
@ -2,7 +2,7 @@
|
|||
"version" : "1.0",
|
||||
"configurations" : [
|
||||
{
|
||||
"playground" : "standard",
|
||||
"playground" : "custom",
|
||||
"type" : "uni-app:app-android"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,4 +19,10 @@ export const commonType = (num) => {
|
|||
return http.request({
|
||||
url: `/common/type/${num}`,
|
||||
})
|
||||
}
|
||||
|
||||
export function getCommonConfig(){
|
||||
return http.request({
|
||||
url:'common/getAppUseKv'
|
||||
})
|
||||
}
|
||||
|
|
@ -109,4 +109,13 @@ export function goldPay(data){
|
|||
'content-type':'application/x-www-form-urlencoded'
|
||||
}}
|
||||
})
|
||||
}
|
||||
|
||||
//获取转盘抽奖次数
|
||||
export function getDrawCount(data){
|
||||
return http.request({
|
||||
url: 'discSpinning/drawCount',
|
||||
method:'GET',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
@ -5,11 +5,11 @@
|
|||
@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" :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"
|
||||
: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>
|
||||
|
|
@ -21,12 +21,11 @@
|
|||
<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"
|
||||
: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>
|
||||
: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>
|
||||
|
|
@ -120,7 +119,7 @@
|
|||
</view>
|
||||
<view class="u-m-t-10">
|
||||
<text class="font-bold u-font-26 color-333">温馨提示</text>
|
||||
<text class="u-m-t-10 u-font-24 color-999">一经购买不予退款,未满18岁需在监护人的指导、同意下进行付费操作</text>
|
||||
<text class="u-m-t-10 u-font-24 color-999">{{$common.payTips}}</text>
|
||||
</view>
|
||||
<view class="u-flex u-flex-row u-m-t-30 u-flex-y-center u-font-28">
|
||||
<view class="u-flex-y-center">
|
||||
|
|
@ -155,6 +154,10 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
useCommonStore
|
||||
} from '@/store/common.js'
|
||||
const $common=useCommonStore()
|
||||
// #ifdef APP
|
||||
const domModule = uni.requireNativePlugin('dom')
|
||||
// #endif
|
||||
|
|
@ -317,7 +320,7 @@
|
|||
console.log('disappear nowIndex' + nowIndex.value);
|
||||
console.log('cacheIndex' + cacheIndex);
|
||||
nowIndex.value = cacheIndex
|
||||
const item=props.list[nowIndex.value]
|
||||
const item = props.list[nowIndex.value]
|
||||
if (!item.videoUrl) {
|
||||
popupShow('pay', item, nowIndex.value)
|
||||
}
|
||||
|
|
@ -331,6 +334,7 @@
|
|||
async function payOrder(data) {
|
||||
const res = await Api.payOrder(data)
|
||||
if (res) {
|
||||
uni.setStorageSync('nobuyCourseId',popup.data.courseId)
|
||||
// #ifdef APP
|
||||
uni.navigateTo({
|
||||
url: '/pages/pays/pays?orderId=' + data.orderId + '&url=' + res.h5Url
|
||||
|
|
@ -339,6 +343,7 @@
|
|||
// #ifdef H5
|
||||
window.location.href = res.h5Url
|
||||
// #endif
|
||||
popupClose()
|
||||
}
|
||||
}
|
||||
//金币支付
|
||||
|
|
@ -400,6 +405,7 @@
|
|||
|
||||
|
||||
function jiClick(item, index) {
|
||||
initing=false
|
||||
let newCurrent = (current.value + 1) % 3;
|
||||
videoList.value[newCurrent] = item;
|
||||
current.value = newCurrent;
|
||||
|
|
@ -426,24 +432,27 @@
|
|||
clearTimeout(positonmer)
|
||||
console.log('goListPosition:' + index)
|
||||
const el = refList.value[index]
|
||||
if ($mountedComponents[props.list.length - 1] && $mountedComponents[index]) {
|
||||
domModule.scrollToElement(el, {
|
||||
animated: false
|
||||
})
|
||||
initing = false;
|
||||
const item = props.list[index]
|
||||
setVideoList(item)
|
||||
insertHistory()
|
||||
} else {
|
||||
// 延迟设置元素位置,(可能视频位置比较靠后数据未渲染完毕)
|
||||
positonmer = setTimeout(() => {
|
||||
goListPosition(index)
|
||||
}, 200)
|
||||
if (initing) {
|
||||
if (!$mountedComponents[props.list.length - 1]) {
|
||||
positonmer = setTimeout(() => {
|
||||
goListPosition(index)
|
||||
}, 200)
|
||||
return
|
||||
}
|
||||
}
|
||||
domModule.scrollToElement(el, {
|
||||
animated: false
|
||||
})
|
||||
initing = false;
|
||||
const item = props.list[index]
|
||||
setVideoList(item)
|
||||
insertHistory()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function popupClose(key) {
|
||||
if (key) {
|
||||
popup[key] = false
|
||||
|
|
@ -698,11 +707,11 @@
|
|||
'width': '750rpx',
|
||||
}
|
||||
})
|
||||
|
||||
function videoListUpdata(){
|
||||
videoList.value=videoList.value.map(v=>{
|
||||
const item=props.list.find(listItem=>listItem.courseDetailsId==v.courseDetailsId)
|
||||
return item?item:v
|
||||
|
||||
function videoListUpdata() {
|
||||
videoList.value = videoList.value.map(v => {
|
||||
const item = props.list.find(listItem => listItem.courseDetailsId == v.courseDetailsId)
|
||||
return item ? item : v
|
||||
})
|
||||
}
|
||||
defineExpose({
|
||||
|
|
|
|||
17
main.js
17
main.js
|
|
@ -1,6 +1,12 @@
|
|||
import App from './App'
|
||||
import uviewPlus from 'uview-plus'
|
||||
|
||||
import * as Pinia from "pinia";
|
||||
import {
|
||||
createUnistorage
|
||||
} from "pinia-plugin-unistorage";
|
||||
import {
|
||||
useCommonStore
|
||||
} from '@/store/common.js'
|
||||
// #ifndef VUE3
|
||||
import Vue from 'vue'
|
||||
import './uni.promisify.adaptor'
|
||||
|
|
@ -18,9 +24,16 @@ import {
|
|||
} from 'vue'
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
const store = Pinia.createPinia();
|
||||
store.use(createUnistorage());
|
||||
app.use(uviewPlus)
|
||||
app.use(store)
|
||||
|
||||
const $common = useCommonStore()
|
||||
$common.init()
|
||||
return {
|
||||
app
|
||||
app,
|
||||
Pinia
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
|
|
@ -8,5 +8,8 @@
|
|||
"pre-commit": "^1.2.2",
|
||||
"to-arraybuffer": "^1.0.1",
|
||||
"uview-plus": "^3.3.61"
|
||||
},
|
||||
"devDependencies": {
|
||||
"pinia-plugin-unistorage": "^0.1.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
33
pages.json
33
pages.json
|
|
@ -50,7 +50,8 @@
|
|||
"path": "pages/me/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
}, {
|
||||
"path": "pages/me/contact",
|
||||
|
|
@ -171,33 +172,29 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/task/prizeList",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "任务"
|
||||
|
||||
"path": "pages/task/prizeList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "任务"
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/task/receiveMember",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "",
|
||||
"path": "pages/task/receiveMember",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/me/prizeDraw",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "抽奖"
|
||||
"path": "pages/me/prizeDraw",
|
||||
"style": {
|
||||
"navigationBarTitleText": "抽奖"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/pays/pays",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
"path": "pages/pays/pays",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -45,15 +45,6 @@
|
|||
<image v-if="datas.isExamine == 0" @click="goMsg('/me/VjgyqAzklr/VjgyqAzklr')" src="@/static/index/red-pack-new.gif"
|
||||
style="width: 200rpx;height: 200rpx;position: fixed;right: 10rpx;bottom: 180rpx;" mode=""></image>
|
||||
|
||||
<u-modal :show="datas.ruleShow" v-if="datas.isExamine == 0" confirm-text="知道了" @confirm='datas.ruleShow = false'
|
||||
:title="datas.rule_title" :title-style="{ fontWeight: '700' }" confirm-color="rgb(255, 117, 129)">
|
||||
<view class="" style="padding-top: 30rpx;text-align: left;">
|
||||
<scroll-view scroll-y="true" style="max-height: 50vh;">
|
||||
<rich-text style="color:#666" :nodes="datas.rule_content"></rich-text>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</u-modal>
|
||||
|
||||
<u-modal :show="datas.version.show" :confirm-text="datas.version.confirmText" :showCancelButton="datas.version.cancelText" @confirm='confirmUpdateVersion'
|
||||
:title="datas.version.title" :title-style="{ fontWeight: '700' }" confirm-color="rgb(255, 117, 129)" @cancel="datas.version.show = false">
|
||||
<view class="" style="padding-top: 30rpx;text-align: left;">
|
||||
|
|
@ -62,6 +53,13 @@
|
|||
</scroll-view>
|
||||
</view>
|
||||
</u-modal>
|
||||
<up-modal :show="datas.ruleShow" v-if="datas.isExamine == 0" 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">
|
||||
<scroll-view scroll-y="true" style="max-height: 50vh;" >
|
||||
<rich-text style="text-align: justify;font-size: 18px;color: #666;" :nodes="datas.rule_content"></rich-text>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</up-modal>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
|
@ -71,6 +69,7 @@ import {
|
|||
import { announcement, messageselectMessage, courseselectCourse } from '@/api/index/index.js'
|
||||
import {
|
||||
onLoad,
|
||||
onReady,
|
||||
onReachBottom
|
||||
} from '@dcloudio/uni-app'
|
||||
import contentlist from './components/contentlist.vue'
|
||||
|
|
@ -88,7 +87,9 @@ let datas = reactive({
|
|||
ruleShow: false,
|
||||
rule_title: '', // 首页弹窗标题
|
||||
rule_content: '', // 首页弹窗内容
|
||||
|
||||
ruleIndex: 0,
|
||||
ruleList: [],
|
||||
|
||||
//ios是否在审核 1是审核
|
||||
isExamine: uni.getStorageSync('isExamine'),
|
||||
|
||||
|
|
@ -104,9 +105,14 @@ onLoad(() => {
|
|||
versionUpdate()
|
||||
getMsg()
|
||||
getrecomVideo()
|
||||
getPop()
|
||||
})
|
||||
|
||||
onReady(() => {
|
||||
announcement({type: 0}).then(res=>{
|
||||
datas.ruleList = res
|
||||
ruleInit()
|
||||
datas.ruleShow = true
|
||||
})
|
||||
})
|
||||
onReachBottom(() => {
|
||||
++datas.page
|
||||
getrecomVideo()
|
||||
|
|
@ -184,6 +190,27 @@ function confirmUpdateVersion(){
|
|||
plus.runtime.openURL(iosLink, function(res) {});
|
||||
}
|
||||
}
|
||||
function ruleInit(){
|
||||
datas.rule_title = datas.ruleList[datas.ruleIndex].title
|
||||
datas.rule_content = datas.ruleList[datas.ruleIndex].content
|
||||
}
|
||||
/**
|
||||
* 规则确认
|
||||
*/
|
||||
function ruleConfirm() {
|
||||
datas.ruleShow = false
|
||||
datas.ruleIndex++
|
||||
console.log(datas.ruleIndex >= datas.ruleList.length)
|
||||
if( datas.ruleIndex >= datas.ruleList.length) {
|
||||
datas.ruleIndex = 0
|
||||
return
|
||||
}
|
||||
setTimeout(res=>{
|
||||
ruleInit()
|
||||
datas.ruleShow = true
|
||||
},300)
|
||||
}
|
||||
|
||||
// 跳转公告链接
|
||||
function goMsg(url) {
|
||||
// if (url.indexOf('/pages/') !== -1 || url.indexOf('/me/') !== -1) {
|
||||
|
|
@ -201,15 +228,7 @@ function goMsg(url) {
|
|||
//#endif
|
||||
// }
|
||||
}
|
||||
// 获取弹窗信息
|
||||
async function getPop() {
|
||||
let res = await announcement()
|
||||
if (res.state == 1) {
|
||||
datas.ruleShow = true
|
||||
datas.rule_title = res.title
|
||||
datas.rule_content = res.content
|
||||
}
|
||||
}
|
||||
|
||||
// 搜索跳转
|
||||
function moreVideo() {
|
||||
uni.navigateTo({
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@
|
|||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import { onLoad, onPullDownRefresh } from '@dcloudio/uni-app';
|
||||
import { selectByUserId, collectVideoSummary, selectUserMoney } from '@/api/me/me.js';
|
||||
import { linkTo } from '@/utils/app.js';
|
||||
|
||||
|
|
@ -162,8 +162,17 @@ function toTask() {
|
|||
});
|
||||
}
|
||||
|
||||
onLoad(() => {});
|
||||
onShow(() => {
|
||||
onPullDownRefresh(async () => {
|
||||
await selectByUserIdAjax();
|
||||
await collectVideoSummaryAjax();
|
||||
await selectUserMoneyAjax();
|
||||
userInfo.value = uni.getStorageSync('userInfo');
|
||||
setTimeout(() => {
|
||||
uni.stopPullDownRefresh();
|
||||
}, 500);
|
||||
});
|
||||
|
||||
onLoad(() => {
|
||||
selectByUserIdAjax();
|
||||
collectVideoSummaryAjax();
|
||||
selectUserMoneyAjax();
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
<template>
|
||||
<view class="container">
|
||||
<up-navbar title="申请提现"
|
||||
@rightClick="data.ruleShow = true"
|
||||
bgColor="rgb(255, 117, 129)"
|
||||
leftIconColor="#FFF"
|
||||
:titleStyle ="{color:'#FFF'}" >
|
||||
<template #right>
|
||||
<view class="u-p-r-30 u-flex u-col-center" style="color: #fff;">
|
||||
<text class="rule-btn" @click="data.ruleShow = true">规则</text>
|
||||
<text class="rule-btn" @click="showRule">规则</text>
|
||||
</view>
|
||||
</template>
|
||||
</up-navbar>
|
||||
|
|
@ -72,13 +71,13 @@
|
|||
|
||||
</view>
|
||||
|
||||
<up-modal :show="data.ruleShow" confirm-text="知道了" title="规则说明" :title-style="{fontWeight:'700'}" @confirm="data.ruleShow=false" confirm-color="rgb(255, 117, 129)">
|
||||
|
||||
<up-modal :show="data.ruleShow" confirm-text="知道了" title="规则说明" :title="data.rule_title" :title-style="{fontWeight:'700'}" @confirm="ruleConfirm" confirm-color="rgb(255, 117, 129)">
|
||||
<view class="u-p-30 u-text-left">
|
||||
<scroll-view scroll-y="true" style="max-height: 50vh;" >
|
||||
<rich-text style="text-align: justify;font-size: 18px;color: #666;" :nodes="data.ruleInfo"></rich-text>
|
||||
<rich-text style="text-align: justify;font-size: 18px;color: #666;" :nodes="data.rule_content"></rich-text>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
</up-modal>
|
||||
|
||||
<view style="width: 0;height: 0;overflow: hidden;">
|
||||
|
|
@ -96,27 +95,14 @@
|
|||
import { onReady,onLoad,onShow,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';
|
||||
import { commonType } from '@/api/init.js';
|
||||
import { linkTo } from '@/utils/app.js';
|
||||
|
||||
let data = reactive({
|
||||
ruleShow: true,
|
||||
ruleInfo: `
|
||||
用户在平台中对奖励提现的,适用以下规则:
|
||||
<br/>
|
||||
<br/>
|
||||
1,用户的收益达到最低提现金额要求后,可以申请提现,每日只可以提现一笔。
|
||||
<br/>
|
||||
2,用户需要通过支付宝提现,需按照要求绑定支付宝账号并填写提现金额或其他提现所需信息,请确保提供的信息准确无误,以免提现失败。
|
||||
<br/>
|
||||
3,如果用户发现显示「提现失败」,需确认当前填写或绑定的支付宝账号或银行卡账号是否正确,以及支付宝账号是否可用。如果用户发现显示「提现成功」但没到账
|
||||
<br/>
|
||||
(1)如果用户有多个支付宝账号,请检查用户是否提现到了其他支付宝账号。
|
||||
<br/>
|
||||
(2)高峰期提现人数多会导致网络拥堵,显示提现成功之后72小时内属于正常现象,请耐心等候。
|
||||
<br/>
|
||||
4,每日08:00至次日18:00为提现时间,活动的对应奖励可能延迟到账。提现通常会在72小时内到账,如遇双休日、节假日,提现到账时间可能会延长。活动高峰期间,由于网络拥堵,用户可能存在短时间内无法提现的情况。平台将尽最大努力及时恢复提现功能,但无需因此承担任何责任。
|
||||
<br/>`,
|
||||
rule_title: "",
|
||||
rule_content: "",
|
||||
money: '',
|
||||
mayMoney: '0',
|
||||
list: [],
|
||||
|
|
@ -129,16 +115,24 @@
|
|||
adRewardedVideoloadNum: 0,
|
||||
isWithdraw: false,
|
||||
userInfo: null,
|
||||
ruleIndex: 0,
|
||||
ruleList: []
|
||||
})
|
||||
|
||||
const adRewarded = ref(null);
|
||||
onLoad(() => {
|
||||
getExtractFei();
|
||||
getMoneyDetail();
|
||||
|
||||
})
|
||||
onShow(() => {
|
||||
getcashMoney()
|
||||
getUserInfo();
|
||||
announcement({type: 1}).then(res=>{
|
||||
data.ruleList = res
|
||||
ruleInit()
|
||||
data.ruleShow = true
|
||||
})
|
||||
})
|
||||
onReady(() => {
|
||||
nextTick(()=>{
|
||||
|
|
@ -150,14 +144,49 @@
|
|||
onReachBottom(() => {
|
||||
if (data.page * data.limit < data.totalCount) {
|
||||
data.page = data.page + 1;
|
||||
data.getMoneyDetail();
|
||||
getMoneyDetail();
|
||||
}
|
||||
})
|
||||
onPullDownRefresh(() => {
|
||||
data.page = 1;
|
||||
data.list = []
|
||||
data.getMoneyDetail();
|
||||
getMoneyDetail();
|
||||
})
|
||||
function ruleInit(){
|
||||
data.rule_title = data.ruleList[data.ruleIndex].title
|
||||
data.rule_content = data.ruleList[data.ruleIndex].content
|
||||
}
|
||||
/**
|
||||
* 规则弹窗打开
|
||||
*/
|
||||
function showRule() {
|
||||
if( data.ruleList.length <= 0) {
|
||||
uni.showToast({
|
||||
title: "暂未配置规则",
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
ruleInit()
|
||||
data.ruleShow = true
|
||||
}
|
||||
/**
|
||||
* 规则确认
|
||||
*/
|
||||
function ruleConfirm() {
|
||||
data.ruleShow = false
|
||||
data.ruleIndex++
|
||||
console.log(data.ruleIndex >= data.ruleList.length)
|
||||
if( data.ruleIndex >= data.ruleList.length) {
|
||||
data.ruleIndex = 0
|
||||
return
|
||||
}
|
||||
setTimeout(res=>{
|
||||
ruleInit()
|
||||
data.ruleShow = true
|
||||
},300)
|
||||
}
|
||||
|
||||
function getUserInfo() {
|
||||
selectUserById().then(res=>{
|
||||
data.userInfo = res;
|
||||
|
|
|
|||
|
|
@ -31,8 +31,7 @@
|
|||
getOrderInfo({
|
||||
orderId: state.orderId
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
if (res.data == 1) {
|
||||
if (res == 1) {
|
||||
uni.hideLoading()
|
||||
const sysInfo = uni.getSystemInfoSync();
|
||||
let isIos = sysInfo.platform == 'ios'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<template>
|
||||
<view class="min-page">
|
||||
<my-video-list ref="refVideoList" v-if="state.list.length" @swiperChange="swiperChange" :list="state.list" @update="update"
|
||||
:info="state"></my-video-list>
|
||||
<my-video-list ref="refVideoList" v-if="state.list.length" @swiperChange="swiperChange" :list="state.list"
|
||||
|
||||
@update="update" :info="state"></my-video-list>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -12,14 +13,15 @@
|
|||
} from '@dcloudio/uni-app'
|
||||
import * as Api from '@/api/video/index.js'
|
||||
import {
|
||||
reactive, ref
|
||||
reactive,
|
||||
ref
|
||||
} from 'vue'
|
||||
import {
|
||||
slice
|
||||
} from 'lodash'
|
||||
const boxStyle = {
|
||||
height: '835px'
|
||||
}
|
||||
|
||||
const sysInfo = uni.getSystemInfoSync()
|
||||
let isFirstLoad = true
|
||||
let options = {}
|
||||
const state = reactive({
|
||||
collect: 0,
|
||||
|
|
@ -28,10 +30,11 @@
|
|||
price: 0,
|
||||
title: ''
|
||||
})
|
||||
const refVideoList=ref(null)
|
||||
const refVideoList = ref(null)
|
||||
async function init() {
|
||||
try {
|
||||
const res = await Api.getVideoDetail(options)
|
||||
isFirstLoad = false
|
||||
Object.assign(state, res)
|
||||
state.list = res.list
|
||||
} catch (error) {
|
||||
|
|
@ -49,11 +52,10 @@
|
|||
index,
|
||||
item
|
||||
}) {
|
||||
if(item){
|
||||
if (item) {
|
||||
state.list[index] = item
|
||||
}else{
|
||||
} else {
|
||||
await init()
|
||||
refVideoList.value.videoListUpdata()
|
||||
}
|
||||
}
|
||||
onLoad((opt) => {
|
||||
|
|
@ -67,8 +69,22 @@
|
|||
data
|
||||
}) {}
|
||||
|
||||
onShow(() => {
|
||||
init()
|
||||
onShow(async () => {
|
||||
if (!isFirstLoad) {
|
||||
await init()
|
||||
refVideoList.value.videoListUpdata()
|
||||
const drawRes = await Api.getDrawCount()
|
||||
console.log(drawRes);
|
||||
const nobuyCourseId = uni.getStorageSync('nobuyCourseId')
|
||||
const item = state.list.find(v => v.courseId == nobuyCourseId)
|
||||
uni.clearStorageSync('nobuyCourseId')
|
||||
if (drawRes.count * 1 > 0 && nobuyCourseId !== null && nobuyCourseId !== undefined && item
|
||||
.videoUrl) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/me/prizeDraw'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,61 @@
|
|||
import {
|
||||
defineStore
|
||||
} from "pinia";
|
||||
import {getCommonConfig} from '@/api/init.js'
|
||||
const $map = {
|
||||
882: 'isWxIosPay',
|
||||
833: 'checkIosLogin',
|
||||
834: 'checkIosPay',
|
||||
835: 'checkWxLogin',
|
||||
836: 'checkPhoneLogin',
|
||||
108: 'isOpenWxWebAutoLogin',
|
||||
817: 'zhengbu',
|
||||
818: 'danbu',
|
||||
252: 'adUnitId',
|
||||
821: 'playType',
|
||||
251: 'isGuanggao',
|
||||
254: 'isGuanggaody',
|
||||
202: 'kefu',
|
||||
206: 'kefuPhone',
|
||||
204: 'kefuUrl',
|
||||
203: 'kefuAppId',
|
||||
248: 'isVips',
|
||||
249: 'moreSearch',
|
||||
49: 'AppUrl',
|
||||
823: 'OfferID',
|
||||
824: 'payEnv',
|
||||
825: 'moneyTips',
|
||||
855: 'kmPaySel',
|
||||
849: 'homeTypeSel',
|
||||
856: 'syPaySel',
|
||||
857: 'imId',
|
||||
858: 'isAccountPay',
|
||||
860: 'dyadUnitId',
|
||||
881: '',
|
||||
109: '',
|
||||
922: 'withdrawNum',
|
||||
500:'payTips'
|
||||
}
|
||||
|
||||
export const useCommonStore = defineStore("common", {
|
||||
state() {
|
||||
return {
|
||||
payTips:'付款完成后不要忘记抽红包哦'
|
||||
};
|
||||
},
|
||||
actions:{
|
||||
async init(){
|
||||
const res=await getCommonConfig()
|
||||
if(res){
|
||||
for (let i in $map) {
|
||||
const key = $map[i]
|
||||
if (key) {
|
||||
this[key]=res[i]
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(res);
|
||||
}
|
||||
},
|
||||
unistorage: true, // 开启后对 state 的数据读写都将持久化
|
||||
});
|
||||
Loading…
Reference in New Issue