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",
|
"version" : "1.0",
|
||||||
"configurations" : [
|
"configurations" : [
|
||||||
{
|
{
|
||||||
"playground" : "standard",
|
"playground" : "custom",
|
||||||
"type" : "uni-app:app-android"
|
"type" : "uni-app:app-android"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -19,4 +19,10 @@ export const commonType = (num) => {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: `/common/type/${num}`,
|
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'
|
'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"
|
@change="swiperChange" :current="current" :circular="true" vertical class="u-flex-1"
|
||||||
@transition="transition" :indicator-dots="false" :autoplay="false" :interval="0" :duration="200">
|
@transition="transition" :indicator-dots="false" :autoplay="false" :interval="0" :duration="200">
|
||||||
<swiper-item v-for="(item,index) in videoList" :key="index">
|
<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"
|
<list-item-vue :total="list.length" :item="item" :isCommand="isCommand"
|
||||||
:isCollect="isCollect" @toDetail="toDetail(item,index)" @controlstoggles="controlstoggles"
|
:showControls="control.showControls" :current="current" :isCollect="isCollect"
|
||||||
:playSpeeds="playSpeeds" :index="index" :nowIndex="nowIndex"
|
@toDetail="toDetail(item,index)" @controlstoggles="controlstoggles" :playSpeeds="playSpeeds"
|
||||||
@dianzanClick="dianzanClick(item,index)" @share="share(item)" @zhuijuClick="zhuijuClick(item)"
|
:index="index" :nowIndex="nowIndex" @dianzanClick="dianzanClick(item,index)" @share="share(item)"
|
||||||
@popupShow="popupShow($event,item,index)"></list-item-vue>
|
@zhuijuClick="zhuijuClick(item)" @popupShow="popupShow($event,item,index)"></list-item-vue>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -21,12 +21,11 @@
|
||||||
<cell v-for="(item,index) in list" :key="item.courseDetailsId" :ref="setRefList(index)">
|
<cell v-for="(item,index) in list" :key="item.courseDetailsId" :ref="setRefList(index)">
|
||||||
<view class="swipers-items" :style="boxStyle" @longpress="popupShow('speed')">
|
<view class="swipers-items" :style="boxStyle" @longpress="popupShow('speed')">
|
||||||
<list-item-vue :total="list.length" :item="item" :current="current" :isCollect="isCollect"
|
<list-item-vue :total="list.length" :item="item" :current="current" :isCollect="isCollect"
|
||||||
:isCommand="isCommand"
|
:isCommand="isCommand" :showControls="control.showControls" @toDetail="toDetail(item,index)"
|
||||||
:showControls="control.showControls" @toDetail="toDetail(item,index)" @itemMounted="itemMounted"
|
@itemMounted="itemMounted" @controlstoggles="controlstoggles" :index="index" :instance="instance"
|
||||||
@controlstoggles="controlstoggles" :index="index" :instance="instance" :nowIndex="nowIndex"
|
:nowIndex="nowIndex" @appear="appear($event,item,index)" :playSpeeds="playSpeeds"
|
||||||
@appear="appear($event,item,index)" :playSpeeds="playSpeeds" @disappear="disappear(item,index)"
|
@disappear="disappear(item,index)" @dianzanClick="dianzanClick(item,index)" @share="share(item)"
|
||||||
@dianzanClick="dianzanClick(item,index)" @share="share(item)" @zhuijuClick="zhuijuClick(item)"
|
@zhuijuClick="zhuijuClick(item)" @popupShow="popupShow($event,item,index)"></list-item-vue>
|
||||||
@popupShow="popupShow($event,item,index)"></list-item-vue>
|
|
||||||
</view>
|
</view>
|
||||||
</cell>
|
</cell>
|
||||||
</list>
|
</list>
|
||||||
|
|
@ -120,7 +119,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="u-m-t-10">
|
<view class="u-m-t-10">
|
||||||
<text class="font-bold u-font-26 color-333">温馨提示</text>
|
<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>
|
||||||
<view class="u-flex u-flex-row u-m-t-30 u-flex-y-center u-font-28">
|
<view class="u-flex u-flex-row u-m-t-30 u-flex-y-center u-font-28">
|
||||||
<view class="u-flex-y-center">
|
<view class="u-flex-y-center">
|
||||||
|
|
@ -155,6 +154,10 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import {
|
||||||
|
useCommonStore
|
||||||
|
} from '@/store/common.js'
|
||||||
|
const $common=useCommonStore()
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
const domModule = uni.requireNativePlugin('dom')
|
const domModule = uni.requireNativePlugin('dom')
|
||||||
// #endif
|
// #endif
|
||||||
|
|
@ -317,7 +320,7 @@
|
||||||
console.log('disappear nowIndex' + nowIndex.value);
|
console.log('disappear nowIndex' + nowIndex.value);
|
||||||
console.log('cacheIndex' + cacheIndex);
|
console.log('cacheIndex' + cacheIndex);
|
||||||
nowIndex.value = cacheIndex
|
nowIndex.value = cacheIndex
|
||||||
const item=props.list[nowIndex.value]
|
const item = props.list[nowIndex.value]
|
||||||
if (!item.videoUrl) {
|
if (!item.videoUrl) {
|
||||||
popupShow('pay', item, nowIndex.value)
|
popupShow('pay', item, nowIndex.value)
|
||||||
}
|
}
|
||||||
|
|
@ -331,6 +334,7 @@
|
||||||
async function payOrder(data) {
|
async function payOrder(data) {
|
||||||
const res = await Api.payOrder(data)
|
const res = await Api.payOrder(data)
|
||||||
if (res) {
|
if (res) {
|
||||||
|
uni.setStorageSync('nobuyCourseId',popup.data.courseId)
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/pays/pays?orderId=' + data.orderId + '&url=' + res.h5Url
|
url: '/pages/pays/pays?orderId=' + data.orderId + '&url=' + res.h5Url
|
||||||
|
|
@ -339,6 +343,7 @@
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
window.location.href = res.h5Url
|
window.location.href = res.h5Url
|
||||||
// #endif
|
// #endif
|
||||||
|
popupClose()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//金币支付
|
//金币支付
|
||||||
|
|
@ -400,6 +405,7 @@
|
||||||
|
|
||||||
|
|
||||||
function jiClick(item, index) {
|
function jiClick(item, index) {
|
||||||
|
initing=false
|
||||||
let newCurrent = (current.value + 1) % 3;
|
let newCurrent = (current.value + 1) % 3;
|
||||||
videoList.value[newCurrent] = item;
|
videoList.value[newCurrent] = item;
|
||||||
current.value = newCurrent;
|
current.value = newCurrent;
|
||||||
|
|
@ -426,24 +432,27 @@
|
||||||
clearTimeout(positonmer)
|
clearTimeout(positonmer)
|
||||||
console.log('goListPosition:' + index)
|
console.log('goListPosition:' + index)
|
||||||
const el = refList.value[index]
|
const el = refList.value[index]
|
||||||
if ($mountedComponents[props.list.length - 1] && $mountedComponents[index]) {
|
if (initing) {
|
||||||
domModule.scrollToElement(el, {
|
if (!$mountedComponents[props.list.length - 1]) {
|
||||||
animated: false
|
positonmer = setTimeout(() => {
|
||||||
})
|
goListPosition(index)
|
||||||
initing = false;
|
}, 200)
|
||||||
const item = props.list[index]
|
return
|
||||||
setVideoList(item)
|
}
|
||||||
insertHistory()
|
|
||||||
} else {
|
|
||||||
// 延迟设置元素位置,(可能视频位置比较靠后数据未渲染完毕)
|
|
||||||
positonmer = setTimeout(() => {
|
|
||||||
goListPosition(index)
|
|
||||||
}, 200)
|
|
||||||
}
|
}
|
||||||
|
domModule.scrollToElement(el, {
|
||||||
|
animated: false
|
||||||
|
})
|
||||||
|
initing = false;
|
||||||
|
const item = props.list[index]
|
||||||
|
setVideoList(item)
|
||||||
|
insertHistory()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function popupClose(key) {
|
function popupClose(key) {
|
||||||
if (key) {
|
if (key) {
|
||||||
popup[key] = false
|
popup[key] = false
|
||||||
|
|
@ -698,11 +707,11 @@
|
||||||
'width': '750rpx',
|
'width': '750rpx',
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
function videoListUpdata(){
|
function videoListUpdata() {
|
||||||
videoList.value=videoList.value.map(v=>{
|
videoList.value = videoList.value.map(v => {
|
||||||
const item=props.list.find(listItem=>listItem.courseDetailsId==v.courseDetailsId)
|
const item = props.list.find(listItem => listItem.courseDetailsId == v.courseDetailsId)
|
||||||
return item?item:v
|
return item ? item : v
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
defineExpose({
|
defineExpose({
|
||||||
|
|
|
||||||
17
main.js
17
main.js
|
|
@ -1,6 +1,12 @@
|
||||||
import App from './App'
|
import App from './App'
|
||||||
import uviewPlus from 'uview-plus'
|
import uviewPlus from 'uview-plus'
|
||||||
|
import * as Pinia from "pinia";
|
||||||
|
import {
|
||||||
|
createUnistorage
|
||||||
|
} from "pinia-plugin-unistorage";
|
||||||
|
import {
|
||||||
|
useCommonStore
|
||||||
|
} from '@/store/common.js'
|
||||||
// #ifndef VUE3
|
// #ifndef VUE3
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import './uni.promisify.adaptor'
|
import './uni.promisify.adaptor'
|
||||||
|
|
@ -18,9 +24,16 @@ import {
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
export function createApp() {
|
export function createApp() {
|
||||||
const app = createSSRApp(App)
|
const app = createSSRApp(App)
|
||||||
|
const store = Pinia.createPinia();
|
||||||
|
store.use(createUnistorage());
|
||||||
app.use(uviewPlus)
|
app.use(uviewPlus)
|
||||||
|
app.use(store)
|
||||||
|
|
||||||
|
const $common = useCommonStore()
|
||||||
|
$common.init()
|
||||||
return {
|
return {
|
||||||
app
|
app,
|
||||||
|
Pinia
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
|
|
@ -8,5 +8,8 @@
|
||||||
"pre-commit": "^1.2.2",
|
"pre-commit": "^1.2.2",
|
||||||
"to-arraybuffer": "^1.0.1",
|
"to-arraybuffer": "^1.0.1",
|
||||||
"uview-plus": "^3.3.61"
|
"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",
|
"path": "pages/me/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom",
|
||||||
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/me/contact",
|
"path": "pages/me/contact",
|
||||||
|
|
@ -171,33 +172,29 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "pages/task/prizeList",
|
"path": "pages/task/prizeList",
|
||||||
"style" :
|
"style": {
|
||||||
{
|
"navigationBarTitleText": "任务"
|
||||||
"navigationBarTitleText" : "任务"
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "pages/task/receiveMember",
|
"path": "pages/task/receiveMember",
|
||||||
"style" :
|
"style": {
|
||||||
{
|
"navigationBarTitleText": "",
|
||||||
"navigationBarTitleText" : "",
|
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "pages/me/prizeDraw",
|
"path": "pages/me/prizeDraw",
|
||||||
"style" :
|
"style": {
|
||||||
{
|
"navigationBarTitleText": "抽奖"
|
||||||
"navigationBarTitleText" : "抽奖"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "pages/pays/pays",
|
"path": "pages/pays/pays",
|
||||||
"style" :
|
"style": {
|
||||||
{
|
"navigationBarTitleText": ""
|
||||||
"navigationBarTitleText" : ""
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -45,15 +45,6 @@
|
||||||
<image v-if="datas.isExamine == 0" @click="goMsg('/me/VjgyqAzklr/VjgyqAzklr')" src="@/static/index/red-pack-new.gif"
|
<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>
|
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'
|
<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">
|
: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;">
|
<view class="" style="padding-top: 30rpx;text-align: left;">
|
||||||
|
|
@ -62,6 +53,13 @@
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</u-modal>
|
</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>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
@ -71,6 +69,7 @@ import {
|
||||||
import { announcement, messageselectMessage, courseselectCourse } from '@/api/index/index.js'
|
import { announcement, messageselectMessage, courseselectCourse } from '@/api/index/index.js'
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
|
onReady,
|
||||||
onReachBottom
|
onReachBottom
|
||||||
} from '@dcloudio/uni-app'
|
} from '@dcloudio/uni-app'
|
||||||
import contentlist from './components/contentlist.vue'
|
import contentlist from './components/contentlist.vue'
|
||||||
|
|
@ -88,7 +87,9 @@ let datas = reactive({
|
||||||
ruleShow: false,
|
ruleShow: false,
|
||||||
rule_title: '', // 首页弹窗标题
|
rule_title: '', // 首页弹窗标题
|
||||||
rule_content: '', // 首页弹窗内容
|
rule_content: '', // 首页弹窗内容
|
||||||
|
ruleIndex: 0,
|
||||||
|
ruleList: [],
|
||||||
|
|
||||||
//ios是否在审核 1是审核
|
//ios是否在审核 1是审核
|
||||||
isExamine: uni.getStorageSync('isExamine'),
|
isExamine: uni.getStorageSync('isExamine'),
|
||||||
|
|
||||||
|
|
@ -104,9 +105,14 @@ onLoad(() => {
|
||||||
versionUpdate()
|
versionUpdate()
|
||||||
getMsg()
|
getMsg()
|
||||||
getrecomVideo()
|
getrecomVideo()
|
||||||
getPop()
|
|
||||||
})
|
})
|
||||||
|
onReady(() => {
|
||||||
|
announcement({type: 0}).then(res=>{
|
||||||
|
datas.ruleList = res
|
||||||
|
ruleInit()
|
||||||
|
datas.ruleShow = true
|
||||||
|
})
|
||||||
|
})
|
||||||
onReachBottom(() => {
|
onReachBottom(() => {
|
||||||
++datas.page
|
++datas.page
|
||||||
getrecomVideo()
|
getrecomVideo()
|
||||||
|
|
@ -184,6 +190,27 @@ function confirmUpdateVersion(){
|
||||||
plus.runtime.openURL(iosLink, function(res) {});
|
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) {
|
function goMsg(url) {
|
||||||
// if (url.indexOf('/pages/') !== -1 || url.indexOf('/me/') !== -1) {
|
// if (url.indexOf('/pages/') !== -1 || url.indexOf('/me/') !== -1) {
|
||||||
|
|
@ -201,15 +228,7 @@ function goMsg(url) {
|
||||||
//#endif
|
//#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() {
|
function moreVideo() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive } from 'vue';
|
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 { selectByUserId, collectVideoSummary, selectUserMoney } from '@/api/me/me.js';
|
||||||
import { linkTo } from '@/utils/app.js';
|
import { linkTo } from '@/utils/app.js';
|
||||||
|
|
||||||
|
|
@ -162,8 +162,17 @@ function toTask() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onLoad(() => {});
|
onPullDownRefresh(async () => {
|
||||||
onShow(() => {
|
await selectByUserIdAjax();
|
||||||
|
await collectVideoSummaryAjax();
|
||||||
|
await selectUserMoneyAjax();
|
||||||
|
userInfo.value = uni.getStorageSync('userInfo');
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 500);
|
||||||
|
});
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
selectByUserIdAjax();
|
selectByUserIdAjax();
|
||||||
collectVideoSummaryAjax();
|
collectVideoSummaryAjax();
|
||||||
selectUserMoneyAjax();
|
selectUserMoneyAjax();
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<up-navbar title="申请提现"
|
<up-navbar title="申请提现"
|
||||||
@rightClick="data.ruleShow = true"
|
|
||||||
bgColor="rgb(255, 117, 129)"
|
bgColor="rgb(255, 117, 129)"
|
||||||
leftIconColor="#FFF"
|
leftIconColor="#FFF"
|
||||||
:titleStyle ="{color:'#FFF'}" >
|
:titleStyle ="{color:'#FFF'}" >
|
||||||
<template #right>
|
<template #right>
|
||||||
<view class="u-p-r-30 u-flex u-col-center" style="color: #fff;">
|
<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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</up-navbar>
|
</up-navbar>
|
||||||
|
|
@ -72,13 +71,13 @@
|
||||||
|
|
||||||
</view>
|
</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">
|
<view class="u-p-30 u-text-left">
|
||||||
<scroll-view scroll-y="true" style="max-height: 50vh;" >
|
<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>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</up-modal>
|
</up-modal>
|
||||||
|
|
||||||
<view style="width: 0;height: 0;overflow: hidden;">
|
<view style="width: 0;height: 0;overflow: hidden;">
|
||||||
|
|
@ -96,27 +95,14 @@
|
||||||
import { onReady,onLoad,onShow,onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
|
import { onReady,onLoad,onShow,onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
|
||||||
import { selectUserMoney, selectPayDetails, canCash, state, withdraw } from '@/api/me/withdraw.js';
|
import { selectUserMoney, selectPayDetails, canCash, state, withdraw } from '@/api/me/withdraw.js';
|
||||||
import { selectUserById } from '@/api/user/user.js';
|
import { selectUserById } from '@/api/user/user.js';
|
||||||
|
import { announcement } from '@/api/index/index.js';
|
||||||
import { commonType } from '@/api/init.js';
|
import { commonType } from '@/api/init.js';
|
||||||
import { linkTo } from '@/utils/app.js';
|
import { linkTo } from '@/utils/app.js';
|
||||||
|
|
||||||
let data = reactive({
|
let data = reactive({
|
||||||
ruleShow: true,
|
ruleShow: true,
|
||||||
ruleInfo: `
|
rule_title: "",
|
||||||
用户在平台中对奖励提现的,适用以下规则:
|
rule_content: "",
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
1,用户的收益达到最低提现金额要求后,可以申请提现,每日只可以提现一笔。
|
|
||||||
<br/>
|
|
||||||
2,用户需要通过支付宝提现,需按照要求绑定支付宝账号并填写提现金额或其他提现所需信息,请确保提供的信息准确无误,以免提现失败。
|
|
||||||
<br/>
|
|
||||||
3,如果用户发现显示「提现失败」,需确认当前填写或绑定的支付宝账号或银行卡账号是否正确,以及支付宝账号是否可用。如果用户发现显示「提现成功」但没到账
|
|
||||||
<br/>
|
|
||||||
(1)如果用户有多个支付宝账号,请检查用户是否提现到了其他支付宝账号。
|
|
||||||
<br/>
|
|
||||||
(2)高峰期提现人数多会导致网络拥堵,显示提现成功之后72小时内属于正常现象,请耐心等候。
|
|
||||||
<br/>
|
|
||||||
4,每日08:00至次日18:00为提现时间,活动的对应奖励可能延迟到账。提现通常会在72小时内到账,如遇双休日、节假日,提现到账时间可能会延长。活动高峰期间,由于网络拥堵,用户可能存在短时间内无法提现的情况。平台将尽最大努力及时恢复提现功能,但无需因此承担任何责任。
|
|
||||||
<br/>`,
|
|
||||||
money: '',
|
money: '',
|
||||||
mayMoney: '0',
|
mayMoney: '0',
|
||||||
list: [],
|
list: [],
|
||||||
|
|
@ -129,16 +115,24 @@
|
||||||
adRewardedVideoloadNum: 0,
|
adRewardedVideoloadNum: 0,
|
||||||
isWithdraw: false,
|
isWithdraw: false,
|
||||||
userInfo: null,
|
userInfo: null,
|
||||||
|
ruleIndex: 0,
|
||||||
|
ruleList: []
|
||||||
})
|
})
|
||||||
|
|
||||||
const adRewarded = ref(null);
|
const adRewarded = ref(null);
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
getExtractFei();
|
getExtractFei();
|
||||||
getMoneyDetail();
|
getMoneyDetail();
|
||||||
|
|
||||||
})
|
})
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
getcashMoney()
|
getcashMoney()
|
||||||
getUserInfo();
|
getUserInfo();
|
||||||
|
announcement({type: 1}).then(res=>{
|
||||||
|
data.ruleList = res
|
||||||
|
ruleInit()
|
||||||
|
data.ruleShow = true
|
||||||
|
})
|
||||||
})
|
})
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
nextTick(()=>{
|
nextTick(()=>{
|
||||||
|
|
@ -150,14 +144,49 @@
|
||||||
onReachBottom(() => {
|
onReachBottom(() => {
|
||||||
if (data.page * data.limit < data.totalCount) {
|
if (data.page * data.limit < data.totalCount) {
|
||||||
data.page = data.page + 1;
|
data.page = data.page + 1;
|
||||||
data.getMoneyDetail();
|
getMoneyDetail();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
onPullDownRefresh(() => {
|
onPullDownRefresh(() => {
|
||||||
data.page = 1;
|
data.page = 1;
|
||||||
data.list = []
|
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() {
|
function getUserInfo() {
|
||||||
selectUserById().then(res=>{
|
selectUserById().then(res=>{
|
||||||
data.userInfo = res;
|
data.userInfo = res;
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,7 @@
|
||||||
getOrderInfo({
|
getOrderInfo({
|
||||||
orderId: state.orderId
|
orderId: state.orderId
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res);
|
if (res == 1) {
|
||||||
if (res.data == 1) {
|
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
const sysInfo = uni.getSystemInfoSync();
|
const sysInfo = uni.getSystemInfoSync();
|
||||||
let isIos = sysInfo.platform == 'ios'
|
let isIos = sysInfo.platform == 'ios'
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="min-page">
|
<view class="min-page">
|
||||||
<my-video-list ref="refVideoList" v-if="state.list.length" @swiperChange="swiperChange" :list="state.list" @update="update"
|
<my-video-list ref="refVideoList" v-if="state.list.length" @swiperChange="swiperChange" :list="state.list"
|
||||||
:info="state"></my-video-list>
|
|
||||||
|
@update="update" :info="state"></my-video-list>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -12,14 +13,15 @@
|
||||||
} from '@dcloudio/uni-app'
|
} from '@dcloudio/uni-app'
|
||||||
import * as Api from '@/api/video/index.js'
|
import * as Api from '@/api/video/index.js'
|
||||||
import {
|
import {
|
||||||
reactive, ref
|
reactive,
|
||||||
|
ref
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
import {
|
import {
|
||||||
slice
|
slice
|
||||||
} from 'lodash'
|
} from 'lodash'
|
||||||
const boxStyle = {
|
|
||||||
height: '835px'
|
const sysInfo = uni.getSystemInfoSync()
|
||||||
}
|
let isFirstLoad = true
|
||||||
let options = {}
|
let options = {}
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
collect: 0,
|
collect: 0,
|
||||||
|
|
@ -28,10 +30,11 @@
|
||||||
price: 0,
|
price: 0,
|
||||||
title: ''
|
title: ''
|
||||||
})
|
})
|
||||||
const refVideoList=ref(null)
|
const refVideoList = ref(null)
|
||||||
async function init() {
|
async function init() {
|
||||||
try {
|
try {
|
||||||
const res = await Api.getVideoDetail(options)
|
const res = await Api.getVideoDetail(options)
|
||||||
|
isFirstLoad = false
|
||||||
Object.assign(state, res)
|
Object.assign(state, res)
|
||||||
state.list = res.list
|
state.list = res.list
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
@ -49,11 +52,10 @@
|
||||||
index,
|
index,
|
||||||
item
|
item
|
||||||
}) {
|
}) {
|
||||||
if(item){
|
if (item) {
|
||||||
state.list[index] = item
|
state.list[index] = item
|
||||||
}else{
|
} else {
|
||||||
await init()
|
await init()
|
||||||
refVideoList.value.videoListUpdata()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onLoad((opt) => {
|
onLoad((opt) => {
|
||||||
|
|
@ -67,8 +69,22 @@
|
||||||
data
|
data
|
||||||
}) {}
|
}) {}
|
||||||
|
|
||||||
onShow(() => {
|
onShow(async () => {
|
||||||
init()
|
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>
|
</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