This commit is contained in:
2025-01-14 11:43:53 +08:00
16 changed files with 455 additions and 427 deletions

View File

@@ -10,7 +10,7 @@
</view>
</view>
<template v-if="datas.noticeList.length > 0">
<template v-if="datas.isExamine == 0">
<view class="gongao">
<view class="gongaoicon">
公告
@@ -42,18 +42,18 @@
</view>
</view>
<contentlist :list='datas.list'></contentlist>
<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()" src="@/static/index/red-pack-new.gif"
style="width: 200rpx;height: 200rpx;position: fixed;right: 10rpx;bottom: 180rpx;" mode=""></image>
<u-modal :show="datas.version.show" :confirm-text="datas.version.confirmText" :showCancelButton="datas.version.cancelText" @confirm='confirmUpdateVersion'
<up-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;">
<scroll-view scroll-y="true" style="max-height: 50vh;">
<rich-text style="color:#666" :nodes="datas.version.content"></rich-text>
</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)">
</up-modal>
<up-modal :show="datas.ruleShow" v-if="datas.isExamine == 0&&!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">
<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>
@@ -76,6 +76,10 @@ import contentlist from './components/contentlist.vue'
import { selectNewApp } from '@/api/user/user.js';
import config from '@/commons/config.js';
import { linkTo } from '@/utils/app.js';
import {
useCommonStore
} from '@/store/common.js'
const $common = useCommonStore()
let datas = reactive({
noticeList: [], //公告列表
@@ -91,7 +95,7 @@ let datas = reactive({
ruleList: [],
//ios是否在审核 1是审核
isExamine: uni.getStorageSync('isExamine'),
isExamine: $common.isExamine,
version: {
show: false,
@@ -200,7 +204,6 @@ function ruleInit(){
function ruleConfirm() {
datas.ruleShow = false
datas.ruleIndex++
console.log(datas.ruleIndex >= datas.ruleList.length)
if( datas.ruleIndex >= datas.ruleList.length) {
datas.ruleIndex = 0
return
@@ -213,20 +216,9 @@ function ruleConfirm() {
// 跳转公告链接
function goMsg(url) {
// if (url.indexOf('/pages/') !== -1 || url.indexOf('/me/') !== -1) {
uni.navigateTo({
url: '/pages/me/prizeDraw'
});
// } else {
//#ifndef H5
// uni.navigateTo({
// url: '/pages/index/webView?url=' + url
// });
//#endif
//#ifdef H5
// window.location.href = url;
//#endif
// }
}
// 搜索跳转

View File

@@ -28,139 +28,147 @@
</view>
</view>
<view style="display: flex;flex-direction: column;align-items: center;" v-if="!datas.isSearch&&datas.keywordList.length==0">
<image src="/static/index/none.png" style="width: 341rpx;height: 341rpx;" mode=""></image>
<text style=";">暂无数据</text>
</view>
</template>
<script setup>
import { selectCourseTitles } from '@/api/index/index.js'
import videoList from './videoList.vue'
import {
reactive
} from 'vue';
import {
onShow, onReachBottom
} from '@dcloudio/uni-app'
let datas = reactive({
hotKeywordList: [], //热搜
keywordList: [],// 搜索列表
keyword: "",// 搜索关键字
page: 1,
isSearch: true,
})
onShow(() => {
getList()
})
function posterSuccess() {
}
function getList() {
if (uni.getStorageSync('moreSearch')) {
datas.hotKeywordList = (uni.getStorageSync('moreSearch')).split(',')
} else {
datas.hotKeywordList = []
}
}
onReachBottom(() => {
++datas.page
doSearch()
})
function doSearchs(keyWord) {
datas.keyword = keyWord
doSearch()
}
// 搜索
async function doSearch() {
datas.isSearch = false
let res = await selectCourseTitles({
title: datas.keyword,
limit: 20,
page: datas.page,
import {
selectCourseTitles
} from '@/api/index/index.js'
import videoList from './videoList.vue'
import {
reactive
} from 'vue';
import {
onShow,
onReachBottom
} from '@dcloudio/uni-app'
let datas = reactive({
hotKeywordList: [], //热搜
keywordList: [], // 搜索列表
keyword: "", // 搜索关键字
page: 1,
isSearch: true,
})
if (datas.page == 1) {
datas.keywordList = res.list
} else {
datas.keywordList = [...datas.keywordList, ...res.list]
onShow(() => {
getList()
})
function posterSuccess() {
}
}
function getList() {
if (uni.getStorageSync('moreSearch')) {
datas.hotKeywordList = (uni.getStorageSync('moreSearch')).split(',')
} else {
datas.hotKeywordList = []
}
}
onReachBottom(() => {
++datas.page
doSearch()
})
// 取消返回首页
function goBack() {
uni.navigateBack()
}
function doSearchs(keyWord) {
datas.keyword = keyWord
doSearch()
}
// 搜索
async function doSearch() {
datas.isSearch = false
let res = await selectCourseTitles({
title: datas.keyword,
limit: 20,
page: datas.page,
})
if (datas.page == 1) {
datas.keywordList = res.list
} else {
datas.keywordList = [...datas.keywordList, ...res.list]
}
}
// 取消返回首页
function goBack() {
uni.navigateBack()
}
</script>
<style scoped lang="scss">
.search-box {
width: 100%;
/* background-color: rgb(242, 242, 242); */
padding: 15upx 2.5%;
display: flex;
justify-content: space-between;
// position: sticky;
// top: 0;
background-color: #ffffff;
}
.search-keyword {
width: 100%;
}
.keyword-block {
padding: 10rpx 0;
}
.keyword {
width: 94%;
padding: 3px 3%;
display: flex;
flex-flow: wrap;
justify-content: flex-start;
>view {
.search-box {
width: 100%;
/* background-color: rgb(242, 242, 242); */
padding: 15upx 2.5%;
display: flex;
justify-content: center;
align-items: center;
border-radius: 60upx;
padding: 0 20upx;
margin: 10upx 20upx 10upx 0;
height: 60upx;
font-size: 28upx;
// background-color: rgb(242, 242, 242);
background: #E6EBFF;
color: #6b6b6b;
}
}
.keyword-block .keyword-list-header {
width: 94%;
padding: 10rpx 3%;
font-size: 27rpx;
color: #333;
display: flex;
justify-content: space-between;
}
.keyword-block .keyword-list-header image {
width: 40rpx;
height: 40rpx;
}
.search-list {
width: 100%;
margin-top: 20rpx;
display: flex;
align-items: center;
justify-content: center;
.search-list-box {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
width: 686rpx;
height: 100%;
// position: sticky;
// top: 0;
background-color: #ffffff;
}
.search-keyword {
width: 100%;
}
.keyword-block {
padding: 10rpx 0;
}
.keyword {
width: 94%;
padding: 3px 3%;
display: flex;
flex-flow: wrap;
justify-content: flex-start;
>view {
display: flex;
justify-content: center;
align-items: center;
border-radius: 60upx;
padding: 0 20upx;
margin: 10upx 20upx 10upx 0;
height: 60upx;
font-size: 28upx;
// background-color: rgb(242, 242, 242);
background: #E6EBFF;
color: #6b6b6b;
}
}
.keyword-block .keyword-list-header {
width: 94%;
padding: 10rpx 3%;
font-size: 27rpx;
color: #333;
display: flex;
justify-content: space-between;
}
.keyword-block .keyword-list-header image {
width: 40rpx;
height: 40rpx;
}
.search-list {
width: 100%;
margin-top: 20rpx;
display: flex;
align-items: center;
justify-content: center;
.search-list-box {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
width: 686rpx;
height: 100%;
}
}
}
</style>

View File

@@ -20,6 +20,7 @@
import { reactive } from 'vue';
import { onLoad} from '@dcloudio/uni-app'
import { setSendMsg, bind} from '@/api/login/login.js';
import { updatePhone } from '@/api/user/user.js';
let data = reactive({
mobile: '',
@@ -100,7 +101,7 @@
} else {
uni.showLoading({ title: '正在绑定中...' })
let res = await bind({
let res = await updatePhone({
phone: mobile,
// wxId: openId,
// userId: userId,

View File

@@ -96,9 +96,9 @@
data.sending = false;
data.sendTime = '获取验证码';
} else {
data.count = count - 1;
data.count = data.count - 1;
data.sending = true;
data.sendTime = count - 1 + '秒后重新获取';
data.sendTime = data.count - 1 + '秒后重新获取';
setTimeout(countDown.bind(this), 1000);
}
}

View File

@@ -48,7 +48,7 @@
<script setup>
import { reactive } from 'vue';
import { onLoad} from '@dcloudio/uni-app'
import {setSendMsg,registerCode} from '@/api/login/login.js';
import {setSendMsg,register} from '@/api/login/login.js';
import {commonType} from '@/api/init.js';
import { linkTo } from '@/utils/app.js';
@@ -122,14 +122,15 @@
* 验证码倒计时
*/
function countDown() {
console.log(data.count)
if (data.count === 1) {
data.count = 60;
data.sending = false;
data.sendTime = '获取验证码';
} else {
data.count = count - 1;
data.count = data.count - 1;
data.sending = true;
data.sendTime = count - 1 + '秒后重新获取';
data.sendTime = data.count - 1 + '秒后重新获取';
setTimeout(countDown.bind(this), 1000);
}
}
@@ -235,7 +236,7 @@
// #endif
let res = await registerCode({
let res = await register({
password: password,
phone: mobile,
msg: code,

View File

@@ -31,7 +31,7 @@
<view class="title">我的追剧</view>
<view class="num">{{ likeData.collectCount }}</view>
</navigator>
<view class="item" @click="linkTo('/pages/me/withdraw/index')">
<view class="item" v-if="$common.isExamine==0" @click="linkTo('/pages/me/withdraw/index')">
<view class="title">我的红包</view>
<view class="num">{{ amount || 0 }}</view>
</view>
@@ -114,7 +114,10 @@ import { ref, reactive } from 'vue';
import { onLoad, onPullDownRefresh } from '@dcloudio/uni-app';
import { selectByUserId, collectVideoSummary, selectUserMoney } from '@/api/me/me.js';
import { linkTo } from '@/utils/app.js';
import {
useCommonStore
} from '@/store/common.js'
const $common = useCommonStore()
const userInfo = ref({});
// 获取最近的三条观看历史

View File

@@ -243,6 +243,7 @@ export default {
// 大哥,这里只是模拟,别告诉我你不会对接自己的接口
async requestApiGetPrizeList() {
const res = await selectDiscSpinning({ source: this.source });
console.log(res,'debug')
return {
ok: true,
data: res.records.map((v) => {

View File

@@ -60,15 +60,21 @@
</view>
</view>
<!-- 激励视频广告 -->
<!-- <ad-rewarded-video v-if="adRewardedVideo" ref="adRewardedVideo" adpid="1531580352" :loadnext="true"
v-slot:default="{ loading, error }" :url-callback="datas.urlCallback" @load="onadload" @close="onadclose"
@error="onaderror">
<view class="ad-error" v-if="error">{{ error }}</view>
</ad-rewarded-video> -->
<view style="width: 0;height: 0;overflow: hidden;">
<!-- 激励视频广告 -->
<ad-rewarded-video v-if="datas.adRewardedShow" ref="adRewarded" adpid="1507000689" :loadnext="true"
:url-callback="datas.urlCallback" @load="onadload" @close="onadclose" @error="onaderror">
</ad-rewarded-video>
</view>
</view>
</template>
<script setup>
import {
useCommonStore
} from '@/store/common.js'
const $common = useCommonStore()
import { selectUserMoney, selectPayDetails, canCash, state, withdraw } from '@/api/me/withdraw.js';
import {
reactive,
getCurrentInstance,
@@ -76,6 +82,7 @@
} from "vue";
import {
onShow,
onReady,
onReachBottom
} from '@dcloudio/uni-app'
import {
@@ -89,37 +96,76 @@
signInList: [],
list: [],
// ios审核
isExamine: uni.getStorageSync('isExamine'),
isExamine: $common.isExamine,
urlCallback: {},
adRewardedVideo: true,
adRewardedShow: true,
adRewardedVideoloadNum: 0,
})
const adRewarded = ref(null);
onShow(() => {
getTaskdata()
getsignIn()
const sysInfo = uni.getSystemInfoSync();
let isIos = sysInfo.platform == 'ios'
console.log("is ios ", isIos);
// nextTick(() => {
// currentInstance.ctx.$refs.adRewardedVideo.load();
// })
})
//广告播放成功回调
onReady(() => {
nextTick(()=>{
data.adRewardedVideoloadNum = 0
adRewarded.value.load();
})
getCanCash()
})
/**
* 获取看广告状态
*/
async function getCanCash() {
canCash().then(res => {
data.isWithdraw = !res;
})
}
/**
* 广告加载失败回调
* @param {Object} e
*/
function onaderror(e) {
if ( data.adRewardedVideoloadNum >=3 ) {
data.adRewardedShow = false;
return
}
data.adRewardedVideoloadNum++
setTimeout(() => {
adRewarded.value.load();
}, 1000); // 10
console.log("广告加载失败")
}
/**
* 广告数据加载成功回调
* @param {Object} e
*/
function onadload(e) {
data.adRewardedShow = true;
console.log('广告数据加载成功');
}
/**
* 广告播放成功回调
* @param {Object} e
*/
async function onadclose(e) {
const detail = e.detail
if (detail && detail.isEnded) {
// 正常播放结束
// /sqx_fast/app/ad/state
let res = await this.$Request.getT('app/ad/state', {
extraKey: this.urlCallback.extra
})
this.$Request.getT('/app/common/type/921').then(res => {
if (res.code == 0) {
console.log(res)
uni.showToast({
title: '获得' + res.data.value + '分钟免费时长',
icon: 'none'
})
}
let res = await state({
extraKey: data.urlCallback.extra
})
getCanCash()
} else {
// 播放中途退出
}
@@ -165,7 +211,7 @@
userId: uni.getStorageSync('userId'),
extra: uni.getStorageSync('userId') + "" + new Date().getTime(),
}
currentInstance.ctx.$refs.adRewardedVideo.show();
adRewarded.value.show();
} else {
uni.switchTab({
url: "/pages/index/index"
@@ -198,9 +244,6 @@
}
function onadload(e) {
datas.adRewardedVideo = true;
}
// 获得签到
async function getsignIn() {
let res = await getUserSignData()