1 Commits
test ... gaohao

Author SHA1 Message Date
GaoHao
14486e14d1 配置更新 2025-02-06 11:11:23 +08:00
32 changed files with 2230 additions and 3055 deletions

View File

@@ -54,22 +54,3 @@ export const bind = (data) => {
} }
/**
* 绑定微信
*/
export const $bindWx = (data) => {
return http.request({
url: 'Login/bindWx',
method: 'POST',
data: data
})
}
// 绑定微信状态
export const $bindStatus = (data) => {
return http.request({
url: 'Login/bindStatus',
method: 'GET',
data: data
})
}

View File

@@ -42,12 +42,7 @@ export const sendMessage = (data) => {
data: data data: data
}) })
} }
export const deleteUserByUserId = (data) => {
return http.request({
url: '/user/deleteUser',
method: 'post',
})
}
/** /**
* 帮助中心 * 帮助中心
*/ */
@@ -68,7 +63,6 @@ export const collectVideoSummary = () => {
method: 'GET' method: 'GET'
}) })
} }
// 注销账号
/** /**
* 金币 * 金币

View File

@@ -35,8 +35,7 @@ export const queryUserMoneyDetails = (data) => {
*/ */
export const updateUser = (data) => { export const updateUser = (data) => {
return http.request({ return http.request({
url: '/user/bindAlipay', url: '/user/updateUser',
method: 'POST',
params: data params: data
}) })
} }

View File

@@ -1,3 +1,4 @@
//打包时修改env的值即可 //打包时修改env的值即可
const env='production' //test , production,local const env='production' //test , production,local
@@ -7,7 +8,7 @@ export const apiUrl = '/czg/'
export const h5Config = { export const h5Config = {
production: 'https://web.hnsiyao.cn', production: 'https://web.hnsiyao.cn',
test: 'https://web-api.hnsiyao.cn', test: 'https://web-api.hnsiyao.cn',
local: 'http://192.168.1.21:8100' local: 'http://192.168.1.41:8100'
} }
export const AppConfig = { export const AppConfig = {

View File

@@ -1,69 +0,0 @@
<template>
<view class="container">
<view class="dialog">
<view class="title">
<text class="t">风险提示</text>
</view>
<view class="content">
<text class="t">您的账号暂不可用详情请联系客服</text>
</view>
<view class="footer">
<navigator class="btn" url="/pages/me/contact" style="height: 40px">
<text class="t">去联系客服</text>
</navigator>
</view>
</view>
</view>
</template>
<script></script>
<style scoped lang="scss">
.container {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 99999999;
background-color: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(3px);
display: flex;
align-items: center;
justify-content: center;
.dialog {
width: 90%;
background-color: #fff;
border-radius: 20upx;
.title {
height: 100upx;
display: flex;
align-items: center;
justify-content: center;
.t {
font-size: 32upx;
font-weight: bold;
}
}
.content {
padding: 0 50upx;
}
.footer {
padding: 80upx 28upx 28upx;
display: flex;
.btn {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
background-color: #dd8591;
color: #fff;
border-radius: 12upx;
.t {
font-size: 28upx;
}
}
}
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -7,7 +7,6 @@ import {
reject reject
} from "lodash"; } from "lodash";
import config from "@/commons/config.js"; import config from "@/commons/config.js";
// 测试服 // 测试服
let baseUrl = config.baseApiUrl + "app"; let baseUrl = config.baseApiUrl + "app";
const loadingShowTime = 200; const loadingShowTime = 200;
@@ -61,7 +60,6 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
if (isreturm) { if (isreturm) {
return Promise.resolve(bodyData); return Promise.resolve(bodyData);
} }
if (statusCode == 500) { if (statusCode == 500) {
isShowErrorToast = true; isShowErrorToast = true;
return Promise.reject(bodyData); // 跳转到catch函数 return Promise.reject(bodyData); // 跳转到catch函数
@@ -83,39 +81,11 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
isShowErrorToast = true; isShowErrorToast = true;
return Promise.reject(bodyData); // 跳转到catch函数 return Promise.reject(bodyData); // 跳转到catch函数
} }
if (bodyData.code == 701) {
uni.clearStorageSync()
uni.reLaunch({
url: '/pages/login/login'
})
return Promise.reject(bodyData); // 跳转到catch函数
}
if (bodyData.code == 702) {
return Promise.reject(bodyData); // 跳转到catch函数
}
if (bodyData.code == 500) { if (bodyData.code == 500) {
// 提示信息 // 提示信息
isShowErrorToast = true; isShowErrorToast = true;
return Promise.reject(bodyData); // 跳转到catch函数 return Promise.reject(bodyData); // 跳转到catch函数
} }
let result = null;
if (bodyData.hasOwnProperty('data')) {
result = bodyData.data
} else if (bodyData.hasOwnProperty('page')) {
result = bodyData.page
} else {
result = bodyData
}
//未绑定微信
if (bodyData.code == 407) {
return Promise.resolve(result);
}
if (bodyData.code != 0) { if (bodyData.code != 0) {
infoBox.showToast(data.message); infoBox.showToast(data.message);
return; return;
@@ -128,8 +98,16 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
code: bodyData.code, code: bodyData.code,
}); });
} }
let result=null;
if(bodyData.hasOwnProperty('data')){
result=bodyData.data
}
else if(bodyData.hasOwnProperty('page')){
result=bodyData.page
}
else{
result=bodyData
}
// 构造请求成功的响应数据 // 构造请求成功的响应数据
return Promise.resolve(result); return Promise.resolve(result);
}) })

View File

@@ -2,20 +2,11 @@
"name" : "斯耀短剧", "name" : "斯耀短剧",
"appid" : "__UNI__E0B05B1", "appid" : "__UNI__E0B05B1",
"description" : "", "description" : "",
"versionName" : "1.3.2", "versionName" : "1.2.5",
"versionCode" : 132, "versionCode" : 125,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {
"app" : {
"name" : "斯耀短剧1",
"pkgName" : "com.hnsiyao.duanju" // 安卓包名
},
"ios" : {
"name" : "顺享短剧2",
"app-category" : "public.app-category.utilities",
"bundleID" : "com.hnsiyao.duanju" // iOS bundle ID
},
"usingComponents" : true, "usingComponents" : true,
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3, "compilerVersion" : 3,
@@ -30,8 +21,7 @@
"Camera" : {}, "Camera" : {},
"Push" : {}, "Push" : {},
"VideoPlayer" : {}, "VideoPlayer" : {},
"Canvas" : "nvue canvas", //使用Canvas模块 "Canvas" : "nvue canvas" //使用Canvas模块
"OAuth" : {}
}, },
/* */ /* */
"distribute" : { "distribute" : {
@@ -75,12 +65,6 @@
}, },
"ad" : { "ad" : {
"ks" : {} "ks" : {}
},
"oauth" : {
"weixin" : {
"appid" : "wx5001ff1af6c4781f",
"UniversalLinks" : ""
}
} }
}, },
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ], "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],

View File

@@ -210,13 +210,6 @@
{ {
"navigationBarTitleText" : "兑换" "navigationBarTitleText" : "兑换"
} }
},
{
"path" : "pages/login/bindWx",
"style" :
{
"navigationBarTitleText" : "绑定微信"
}
} }
], ],
"globalStyle": { "globalStyle": {

View File

@@ -52,17 +52,14 @@
<emprty-card v-if="!data.list2.length" /> <emprty-card v-if="!data.list2.length" />
</view> </view>
</view> </view>
<disable-mask v-if="disableShow"></disable-mask>
</template> </template>
<script setup> <script setup>
import { reactive, ref } from 'vue'; import { reactive } from 'vue';
import { selectByUserId } from '@/api/me/me.js'; import { selectByUserId } from '@/api/me/me.js';
import { onLoad, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'; import { onLoad, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app';
import { linkTo } from '@/utils/app.js'; import { linkTo } from '@/utils/app.js';
const disableShow = ref(false);
// 获取数据 // 获取数据
async function selectByUserIdAjax() { async function selectByUserIdAjax() {
try { try {
@@ -72,11 +69,6 @@ async function selectByUserIdAjax() {
data.list2 = res2.records; data.list2 = res2.records;
} catch (error) { } catch (error) {
console.log(error); console.log(error);
if (error.code == 702) {
disableShow.value = true;
} else {
disableShow.value = false;
}
} }
setTimeout(() => { setTimeout(() => {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();

View File

@@ -1,6 +1,7 @@
<template> <template>
<view class="indexStyle"> <view class="indexStyle">
<image src="@/static/index/indexbh.png" mode=""></image> <image src="@/static/index/indexbh.png" mode="">
</image>
<view class="indexStyleTwo"> <view class="indexStyleTwo">
<image src="@/static/logo.png" mode=""></image> <image src="@/static/logo.png" mode=""></image>
<!-- <view @tap="moreVideo"> <!-- <view @tap="moreVideo">
@@ -11,95 +12,103 @@
<template v-if="datas.isExamine"> <template v-if="datas.isExamine">
<view class="gongao"> <view class="gongao">
<view class="gongaoicon">公告</view> <view class="gongaoicon">
<swiper :autoplay="true" :vertical="true" :interval="4000" :circular="true" :indicator-dots="false" class="swiperstyle"> 公告
</view>
<swiper :autoplay="true" :vertical="true" :interval="4000" :circular="true" :indicator-dots="false"
class="swiperstyle">
<swiper-item v-for="(item, index) in datas.noticeList" :key="index"> <swiper-item v-for="(item, index) in datas.noticeList" :key="index">
<view style="height: 80rpx; line-height: 80rpx; font-size: 14px">{{ item.title }}</view> <view style="height: 80rpx;line-height: 80rpx;">{{ item.title }}</view>
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
</template> </template>
</view> </view>
<view class="navTop"> <view class="navTop">
<view :class="datas.active == 1 ? 'navTop-active' : ''" @tap="getrecomVideo('', 1)">最新</view> <view :class="datas.active == 1 ? 'navTop-active' : ''" @tap="getrecomVideo('', 1)">
<view :class="datas.active == 2 ? 'navTop-active' : ''" @tap="getrecomVideo('1', 2)">排行</view> 最新
<view :class="datas.active == 3 ? 'navTop-active' : ''" @tap="getrecomVideo('2', 3)">最热</view>
<view :class="datas.active == 4 ? 'navTop-active' : ''" @tap="getrecomVideo('1', 4)">剧情</view>
<view :class="datas.active == 5 ? 'navTop-active' : ''" @tap="getrecomVideo('2', 5)">飙升</view>
</view> </view>
<contentlist :list="datas.list"></contentlist> <view :class="datas.active == 2 ? 'navTop-active' : ''" @tap="getrecomVideo('1', 2)">
<image 排行
v-if="datas.isExamine" </view>
@click="goMsg()" <view :class="datas.active == 3 ? 'navTop-active' : ''" @tap="getrecomVideo('2', 3)">
src="@/static/index/red-pack-new.gif" 最热
style="width: 200rpx; height: 200rpx; position: fixed; right: 10rpx; bottom: 180rpx" </view>
mode="" <view :class="datas.active == 4 ? 'navTop-active' : ''" @tap="getrecomVideo('1', 4)">
></image> 剧情
<up-modal </view>
:show="datas.version.show" <view :class="datas.active == 5 ? 'navTop-active' : ''" @tap="getrecomVideo('2', 5)">
:confirm-text="datas.version.confirmText" 飙升
:showCancelButton="datas.version.cancelText != ''" </view>
@cancel="cancelUpdateVersion" </view>
@confirm="confirmUpdateVersion" <contentlist :list='datas.list'></contentlist>
:title="datas.version.title" <image v-if="datas.isExamine" @click="goMsg()" src="@/static/index/red-pack-new.gif"
:title-style="{ fontWeight: '700' }" style="width: 200rpx;height: 200rpx;position: fixed;right: 10rpx;bottom: 180rpx;" mode=""></image>
confirm-color="rgb(255, 117, 129)" <up-modal :show="datas.version.show" :confirm-text="datas.version.confirmText"
> :showCancelButton="datas.version.cancelText!=''" @cancel="cancelUpdateVersion" @confirm='confirmUpdateVersion'
<view class="" style="padding-top: 30rpx; text-align: left"> :title="datas.version.title" :title-style="{ fontWeight: '700' }" confirm-color="rgb(255, 117, 129)">
<scroll-view scroll-y="true" style="max-height: 50vh"> <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> --> <!-- <rich-text style="color:#666" :nodes="datas.version.content"></rich-text> -->
<view style="text-align: justify; font-size: 18px; color: #666" v-html="datas.version.content"></view> <view style="text-align: justify;font-size: 18px;color: #666;" v-html="datas.version.content"></view>
</scroll-view> </scroll-view>
</view> </view>
</up-modal> </up-modal>
<!-- h5关闭通知 --> <!-- h5关闭通知 -->
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
<up-modal <up-modal :show="datas.stopShow"
:show="datas.stopShow"
cancel-text="知道了" cancel-text="知道了"
show-cancel-button show-cancel-button
confirm-text="去下载" confirm-text="去下载" title="重要通知"
title="重要通知"
@cancel="stopCancel" @cancel="stopCancel"
:title="datas.rule_title" :title="datas.rule_title" :title-style="{fontWeight:'700'}" @confirm="stopConfirm"
:title-style="{ fontWeight: '700' }" confirm-color="rgb(255, 117, 129)">
@confirm="stopConfirm"
confirm-color="rgb(255, 117, 129)"
>
<view class="color-red u-text-left"> <view class="color-red u-text-left">
<text>2025年2月8日将关闭网页访问请及时下载最新APP</text> <text>2025年2月8日将关闭网页访问请及时下载最新APP</text>
</view> </view>
</up-modal> </up-modal>
<!-- #endif --> <!-- #endif -->
<!-- 公告弹窗 -->
<up-modal :show="datas.stopShows && datas.isExamine" :showConfirmButton="true" title="公告" @confirm="confirmEvent">
<view class="color-red u-text-left">
<view style="text-align: justify; font-size: 18px; color: #666" v-html="datas.noticeList[datas.cloneNum].title"></view>
</view>
</up-modal>
<!-- #ifdef APP -->
<!-- #endif -->
<disable-mask v-if="disableMaskVisable"></disable-mask>
</template> </template>
<script setup> <script setup>
import { reactive, nextTick, ref } from 'vue'; import {
import { announcement, messageselectMessage, courseselectCourse } from '@/api/index/index.js'; reactive,
import { onLoad, onReady, onReachBottom, onShow } from '@dcloudio/uni-app'; nextTick
import contentlist from './components/contentlist.vue'; } from 'vue';
import { selectNewApp } from '@/api/user/user.js'; import {
announcement,
messageselectMessage,
courseselectCourse
} from '@/api/index/index.js'
import {
onLoad,
onReady,
onReachBottom,
onShow
} from '@dcloudio/uni-app'
import contentlist from './components/contentlist.vue'
import {
selectNewApp
} from '@/api/user/user.js';
import config from '@/commons/config.js'; import config from '@/commons/config.js';
import { linkTo } from '@/utils/app.js'; import {
import { useCommonStore } from '@/store/common.js'; linkTo
const $common = useCommonStore(); } from '@/utils/app.js';
import {
useCommonStore
} from '@/store/common.js'
const $common = useCommonStore()
onShow(() => { onShow(() => {
// console.log('cash:' + uni.getStorageSync('userInfo').userId + "" + new Date().getTime(), 'debug') // console.log('cash:' + uni.getStorageSync('userInfo').userId + "" + new Date().getTime(), 'debug')
// 判断ios是否审核 // 判断ios是否审核
$common.init(); $common.init()
// #ifdef H5 // #ifdef H5
datas.isExamine = $common.isIosExamine; datas.isExamine = $common.isIosExamine
// #endif // #endif
// let sysInfo = uni.getSystemInfoSync() // let sysInfo = uni.getSystemInfoSync()
// let isIos = sysInfo.platform == 'ios' // let isIos = sysInfo.platform == 'ios'
@@ -107,11 +116,7 @@ onShow(() => {
// datas.setindexdata = $common.setversion // datas.setindexdata = $common.setversion
// console.log(datas.setindexdata,'seaeasdas') // console.log(datas.setindexdata,'seaeasdas')
// } // }
getrecomVideo(); })
});
const disableMaskVisable = ref(false);
let datas = reactive({ let datas = reactive({
noticeList: [], //公告列表 noticeList: [], //公告列表
@@ -125,117 +130,81 @@ let datas = reactive({
rule_content: '', // 首页弹窗内容 rule_content: '', // 首页弹窗内容
ruleIndex: 0, ruleIndex: 0,
ruleList: [], ruleList: [],
stopShows: false,
version: { version: {
show: false, show: false,
title: '', title: "",
content: '', content: "",
confirmText: '', confirmText: "",
cancelText: '', cancelText: "",
downloadLink: '' downloadLink: ""
}, },
setindexdata: false, setindexdata: false
cloneNum: 0 })
});
onLoad(() => { onLoad(() => {
versionUpdate(); versionUpdate()
getMsg(); getMsg()
}); getrecomVideo()
})
onReady(() => { onReady(() => {
if (!uni.getStorageSync('ruleShow')) { if (!uni.getStorageSync('ruleShow')) {
announcement({ announcement({
type: 0 type: 0
}) }).then(res => {
.then((res) => {
if (res) { if (res) {
datas.ruleShow = true; datas.ruleShow = true
datas.ruleList = res; datas.ruleList = res
ruleInit(); ruleInit()
} }
}) })
.catch((err) => {
console.log(err);
});
}
});
onReachBottom(() => {
++datas.page;
getrecomVideo();
});
// 公告
async function getMsg() {
let res = await messageselectMessage();
let arr = [];
let ids = uni.getStorageSync('ids');
res.list.forEach((ele) => {
if (ids.length) {
if (ids.indexOf(ele.id) == -1) {
arr.push(ele);
}
} else {
uni.setStorageSync('ids', [res.list[0].id]);
arr.push(ele);
}
});
datas.noticeList = arr;
if (arr.length) {
if (ids.length) {
uni.setStorageSync('ids', [...uni.getStorageSync('ids'), datas.noticeList[datas.cloneNum].id]);
}
datas.stopShows = true;
}
} }
function confirmEvent() { })
datas.stopShows = false; onReachBottom(() => {
if (datas.cloneNum < datas.noticeList.length - 1) { ++datas.page
++datas.cloneNum; getrecomVideo()
uni.setStorageSync('ids', [...uni.getStorageSync('ids'), datas.noticeList[datas.cloneNum].id]); })
datas.stopShows = true;
}
}
function stopConfirm(){ function stopConfirm(){
datas.stopShow = false; datas.stopShow=false
uni.navigateTo({ uni.navigateTo({
url:'/pages/login/download' url:'/pages/login/download'
}); })
} }
function stopCancel(){ function stopCancel(){
datas.stopShow = false; datas.stopShow=false
} }
function versionUpdate() { function versionUpdate() {
//#ifdef APP-PLUS //#ifdef APP-PLUS
plus.screen.lockOrientation('portrait-primary'); //竖屏正方向锁定 plus.screen.lockOrientation('portrait-primary'); //竖屏正方向锁定
//获取当前系统版本信息 //获取当前系统版本信息
plus.runtime.getProperty(plus.runtime.appid, (widgetInfo) => { plus.runtime.getProperty(plus.runtime.appid, widgetInfo => {
//请求后台接口 解析数据 对比版本 //请求后台接口 解析数据 对比版本
selectNewApp().then(async (res) => { selectNewApp().then(async res => {
res = res[0]; res = res[0];
console.log(uni.getSystemInfoSync().platform == 'ios', 1101); console.log(uni.getSystemInfoSync().platform == 'ios', 1101)
let version; let version;
if (uni.getSystemInfoSync().platform == 'android') { if (uni.getSystemInfoSync().platform == 'android') {
version = res.version; version = res.version
} }
if (uni.getSystemInfoSync().platform == 'ios') { if (uni.getSystemInfoSync().platform == 'ios') {
version = res.iosVersion; version = res.iosVersion
} }
let isVersion = await $common.setversion(widgetInfo.version, version); let isVersion = await $common.setversion(widgetInfo.version, version)
datas.isExamine = $common.isIosExamine; datas.isExamine = $common.isIosExamine
console.log(isVersion, ''); console.log(isVersion, '')
if (isVersion == 1) { if (isVersion == 1) {
datas.version.downloadLink = res.androidWgtUrl; datas.version.downloadLink = res.androidWgtUrl;
datas.version.show = true; datas.version.show = true;
datas.version.title = '发现新版本'; datas.version.title = "发现新版本";
datas.version.content = res.des; datas.version.content = res.des;
uni.hideTabBar(); uni.hideTabBar()
if (res.method == 'true') { if (res.method == "true") {
datas.version.confirmText = '立即更新'; datas.version.confirmText = "立即更新"
} else { } else {
datas.version.confirmText = '立即更新'; datas.version.confirmText = "立即更新"
datas.version.cancelText = '下次更新'; datas.version.cancelText = "下次更新"
} }
} }
}); });
@@ -244,14 +213,14 @@ function versionUpdate() {
} }
function cancelUpdateVersion() { function cancelUpdateVersion() {
uni.showTabBar(); uni.showTabBar()
datas.version.show = false; datas.version.show = false
} }
function confirmUpdateVersion() { function confirmUpdateVersion() {
// plus.runtime.openURL(config.baseUrl + '/pages/login/appEq') // plus.runtime.openURL(config.baseUrl + '/pages/login/appEq')
linkTo('/pages/login/download'); linkTo('/pages/login/download')
return; return
uni.showLoading({ uni.showLoading({
title: '下载中...', title: '下载中...',
mask: true mask: true
@@ -259,20 +228,20 @@ function confirmUpdateVersion() {
if (uni.getSystemInfoSync().platform == 'android') { if (uni.getSystemInfoSync().platform == 'android') {
uni.downloadFile({ uni.downloadFile({
url: datas.version.downloadLink, url: datas.version.downloadLink,
success: (downloadResult) => { success: downloadResult => {
console.log(downloadResult); console.log(downloadResult)
if (downloadResult.statusCode === 200) { if (downloadResult.statusCode === 200) {
plus.runtime.install( plus.runtime.install(
downloadResult.tempFilePath, downloadResult.tempFilePath, {
{
force: false force: false
}, },
(d) => { d => {
console.log('install success...'); console.log('install success...');
plus.runtime.restart(); plus.runtime
.restart();
}, },
(e) => { e => {
console.log(e); console.log(e)
console.error('install fail...'); console.error('install fail...');
} }
); );
@@ -286,24 +255,24 @@ function confirmUpdateVersion() {
} }
function ruleInit() { function ruleInit() {
datas.rule_title = datas.ruleList[datas.ruleIndex].title; datas.rule_title = datas.ruleList[datas.ruleIndex].title
datas.rule_content = datas.ruleList[datas.ruleIndex].content; datas.rule_content = datas.ruleList[datas.ruleIndex].content
} }
/** /**
* 规则确认 * 规则确认
*/ */
function ruleConfirm() { function ruleConfirm() {
datas.ruleShow = false; datas.ruleShow = false
datas.ruleIndex++; datas.ruleIndex++
if (datas.ruleIndex >= datas.ruleList.length) { if (datas.ruleIndex >= datas.ruleList.length) {
datas.ruleIndex = 0; datas.ruleIndex = 0
uni.setStorageSync('ruleShow', true); uni.setStorageSync('ruleShow', true)
return; return
} }
setTimeout((res) => { setTimeout(res => {
ruleInit(); ruleInit()
datas.ruleShow = true; datas.ruleShow = true
}, 300); }, 300)
} }
// 跳转公告链接 // 跳转公告链接
@@ -319,48 +288,42 @@ function moreVideo() {
url: '/pages/index/search/index' url: '/pages/index/search/index'
}); });
} }
// 公告
async function getMsg() {
let res = await messageselectMessage()
datas.noticeList = res.list
}
//获取推荐视频 //获取推荐视频
async function getrecomVideo(sort, active = 1) { async function getrecomVideo(sort, active = 1) {
try { datas.active = active
datas.active = active;
if (sort) { if (sort) {
datas.page = 1; datas.page = 1
} }
let res = await courseselectCourse({ let res = await courseselectCourse({
page: datas.page, page: datas.page,
limit: 12, limit: 12,
sort: sort, sort: sort,
classifyId: '' classifyId: ''
}); })
console.log('getrecomVideo===', res);
if (datas.page == 1) { if (datas.page == 1) {
datas.list = res.list; datas.list = res.list
} else { } else {
datas.list = [...datas.list, ...res.list]; datas.list = [...datas.list, ...res.list]
}
} catch (error) {
console.log('getrecomVideo.error===', error);
if (error.code == 702) {
disableMaskVisable.value = true;
} else {
disableMaskVisable.value = false;
}
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.indexStyle { .indexStyle {
height: 350rpx; height: 555rpx;
position: relative; position: relative;
>image { >image {
width: 100%; width: 100%;
height: 100%; height: 555rpx;
position: absolute; position: absolute;
} }
.indexStyleTwo { .indexStyleTwo {
@@ -390,12 +353,12 @@ async function getrecomVideo(sort, active = 1) {
.gongao { .gongao {
position: absolute; position: absolute;
bottom: 85rpx; bottom: 75rpx;
left: 70rpx; left: 70rpx;
border-radius: 12rpx 12rpx 12rpx 12rpx; border-radius: 21rpx 21rpx 21rpx 21rpx;
width: 611rpx; width: 611rpx;
height: 60rpx; height: 78rpx;
background-color: rgba(255, 255, 255, 0.65); background-color: rgba(255, 255, 255, .65);
display: flex; display: flex;
align-items: center; align-items: center;
padding: 12rpx; padding: 12rpx;
@@ -404,10 +367,10 @@ async function getrecomVideo(sort, active = 1) {
.gongaoicon { .gongaoicon {
color: #ffffff; color: #ffffff;
width: 98rpx; width: 98rpx;
height: 40rpx; height: 50rpx;
line-height: 40rpx; line-height: 50rpx;
text-align: center; text-align: center;
font-size: 20rpx; font-size: 25rpx;
background-image: url('../../static/index/gonggaobg.png'); background-image: url('../../static/index/gonggaobg.png');
background-size: 98rpx 50rpx; background-size: 98rpx 50rpx;
} }
@@ -417,6 +380,7 @@ async function getrecomVideo(sort, active = 1) {
width: 80%; width: 80%;
} }
} }
} }
.navTop-active { .navTop-active {
@@ -432,7 +396,7 @@ async function getrecomVideo(sort, active = 1) {
>view { >view {
background-color: #f0f0f0; background-color: #f0f0f0;
margin-left: 20rpx; margin-left: 20rpx;
padding: 6rpx 20rpx; padding: 6rpx 20rpx
} }
} }
</style> </style>

View File

@@ -79,22 +79,18 @@
} }
if (datas.tabIndex == 1) { if (datas.tabIndex == 1) {
if (datas.page == 1) { if (datas.page == 1) {
datas.list = []
datas.list = res.records; datas.list = res.records;
} else { } else {
if (res.records.length) { if (res.records.length) {
let arr = datas.list.concat(res.records) datas.list.push(...datas.list, res.records)
datas.list = arr
} }
} }
} else { } else {
if (datas.page == 1) { if (datas.page == 1) {
datas.list = []
datas.list = res.list; datas.list = res.list;
} else { } else {
if (res.records.length) { if (res.records.length) {
let arr = datas.list.concat(res.records) datas.list.push(...datas.list, res.list)
datas.list = arr
} }
} }
// datas.total = res.page.totalCount; // datas.total = res.page.totalCount;

View File

@@ -24,8 +24,7 @@
<view class="t-r-title t-flex-row">活动规则</view> <view class="t-r-title t-flex-row">活动规则</view>
<view class="t-rule"> <view class="t-rule">
<text>1.抽奖细则每日前{{ freeNumDay }}次付款均可获得抽奖机会</text> <text>1.抽奖细则每日前{{ freeNumDay }}次付款均可获得抽奖机会</text>
<text>2.抽奖机会仅当日可用次日作废凌晨24点自动清零</text> <text>2.奖励说明红包奖励将自动发放到红包余额已绑定银行卡账号将会自动发起提现其余奖品则需联系客服领取</text>
<text>3.奖励说明红包奖励将自动发放到红包余额已绑定银行卡账号将会自动发起提现其余奖品则需联系客服领取</text>
</view> </view>
</view> </view>
</view> </view>

View File

@@ -1,86 +0,0 @@
<template>
<view class="u-p-30 min-page u-flex u-flex-col u-row-center u-col-center">
<view class="u-relative w-full">
<view class="u-absolute u-flex u-row-center wx-box" >
<image src="@/static/images/wx.png" class="img" mode=""></image>
</view>
<up-button type="" class="" :custom-style="customStyl" @click="bindwx">绑定微信</up-button>
<up-button type="" @click="navback">取消</up-button>
</view>
</view>
</template>
<script setup>
import {
onShow,onHide,onUnload,onLoad
} from '@dcloudio/uni-app'
import {
$bindWx
} from '@/api/login/login.js'
import {
bindWx
} from '@/utils/wx.js'
import color from '@/commons/color.js'
import {
reactive
} from 'vue';
const customStyl = reactive({
backgroundColor: color.main,
color: '#fff'
})
function navback() {
uni.navigateBack()
}
function clear(){
clearTimeout(timer)
}
let timer=null
async function bindwx() {
const code =await bindWx()
const res = await $bindWx({
code
})
console.log(res);
if (res) {
uni.showToast({
title: '绑定微信成功',
icon: 'none'
})
clear()
timer=setTimeout(()=>{
uni.navigateBack()
},1500)
}else{
uni.showToast({
title: '绑定微失败',
icon: 'none'
})
}
}
onUnload(() => {
clear()
})
</script>
<style lang="scss" scoped>
.wx-box{
position: absolute;
left: 0;
right: 0;
bottom: 100%;
display: flex;
justify-content: center;
transform: translateY(-100rpx);
.img{
width: 200rpx;
height: 200rpx;
}
}
</style>

View File

@@ -44,6 +44,7 @@
<div @click="linkTo('/pages/me/gold_record', true)"> <div @click="linkTo('/pages/me/gold_record', true)">
<view class="btn">金币明细</view> <view class="btn">金币明细</view>
</div> </div>
</view> </view>
<div class="title-wrap" @click="linkTo('/pages/watching_history/watching_history?type=3', true)"> <div class="title-wrap" @click="linkTo('/pages/watching_history/watching_history?type=3', true)">
<view class="a"> <view class="a">
@@ -71,8 +72,8 @@
<view class="card-wrap"> <view class="card-wrap">
<view class="menu-list"> <view class="menu-list">
<view class="item" @click="toTask"> <view class="item" @click="toTask">
<image class="icon" src="/static/me/Frame.png" mode="aspectFit"></image> <image class="icon" src="/static/me/menu_icon1.png" mode="aspectFit"></image>
<view class="name">邀请好友</view> <view class="name">任务中心</view>
</view> </view>
<view class="item" @click="linkTo('/pages/me/setting')"> <view class="item" @click="linkTo('/pages/me/setting')">
<image class="icon" src="/static/me/menu_icon2.png" mode="aspectFit"></image> <image class="icon" src="/static/me/menu_icon2.png" mode="aspectFit"></image>
@@ -98,13 +99,6 @@
<image class="icon" src="/static/me/menu_icon7.png" mode="aspectFit"></image> <image class="icon" src="/static/me/menu_icon7.png" mode="aspectFit"></image>
<view class="name">关于我们</view> <view class="name">关于我们</view>
</view> --> </view> -->
<!-- #ifndef H5 -->
<view class="item" @click="bindwx" v-if="!isBindWx">
<image class="icon" src="/static/me/bind_wx.png" mode="aspectFit"></image>
<view class="name">绑定微信</view>
</view>
<!-- #endif -->
<view class="item" @click="linkTo('/pages/me/privacy')"> <view class="item" @click="linkTo('/pages/me/privacy')">
<image class="icon" src="/static/me/menu_icon8.png" mode="aspectFit"></image> <image class="icon" src="/static/me/menu_icon8.png" mode="aspectFit"></image>
<view class="name">隐私政策</view> <view class="name">隐私政策</view>
@@ -113,7 +107,6 @@
</view> </view>
</view> </view>
</view> </view>
<disable-mask v-if="disableShow"></disable-mask>
</template> </template>
<script setup> <script setup>
@@ -121,56 +114,23 @@ import { ref, reactive } from 'vue';
import { onLoad,onShow, onPullDownRefresh } from '@dcloudio/uni-app'; import { onLoad,onShow, 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';
import { useCommonStore } from '@/store/common.js'; import {
import { toBindWx, bindStatus } from '@/utils/wx.js'; useCommonStore
} from '@/store/common.js'
const disableShow = ref(false); const $common = useCommonStore()
const $common = useCommonStore();
const userInfo = ref({}); const userInfo = ref({});
let isBindWx = ref(false);
async function bindwx() {
if (isBindWx.value) {
uni.showToast({
title: '已绑定微信,请勿重复绑定',
icon: 'none'
});
return;
}
isBindWx.value = await bindStatus();
console.log(isBindWx.value);
if (isBindWx.value) {
uni.showToast({
title: '已绑定微信,请勿重复绑定',
icon: 'none'
});
return;
} else {
toBindWx();
}
}
// 获取最近的三条观看历史 // 获取最近的三条观看历史
const recordThree = ref([]); const recordThree = ref([]);
onShow(()=>{ onShow(()=>{
// 判断ios是否审核 // 判断ios是否审核
$common.init(); $common.init()
}); })
async function selectByUserIdAjax() { async function selectByUserIdAjax() {
try { try {
const res = await selectByUserId({ const res = await selectByUserId({ page: 1, limit: 3, classify: 3 });
page: 1,
limit: 3,
classify: 3
});
recordThree.value = res.records; recordThree.value = res.records;
} catch (error) { } catch (error) {
if (error.code == 702) {
disableShow.value = true;
} else {
disableShow.value = false;
}
console.log(error); console.log(error);
} }
} }
@@ -204,7 +164,9 @@ async function selectUserMoneyAjax() {
// 跳转任务中心 // 跳转任务中心
function toTask() { function toTask() {
linkTo('/pages/share/index'); uni.switchTab({
url: '/pages/task/index'
});
} }
onPullDownRefresh(async () => { onPullDownRefresh(async () => {
@@ -224,6 +186,7 @@ onShow(() => {
selectUserMoneyAjax(); selectUserMoneyAjax();
userInfo.value = uni.getStorageSync('userInfo'); userInfo.value = uni.getStorageSync('userInfo');
} }
}); });
</script> </script>
@@ -239,7 +202,6 @@ $bgColor: #f5f7ff;
font-size: 28upx; font-size: 28upx;
color: #333; color: #333;
} }
.top-bg { .top-bg {
width: 100%; width: 100%;
height: 50%; height: 50%;
@@ -247,7 +209,6 @@ $bgColor: #f5f7ff;
top: 0; top: 0;
left: 0; left: 0;
background: linear-gradient(90deg, #ffe5ea 0, #e4f5fb 49%, #fff0ee); background: linear-gradient(90deg, #ffe5ea 0, #e4f5fb 49%, #fff0ee);
&::after { &::after {
content: ''; content: '';
height: 50%; height: 50%;
@@ -258,30 +219,24 @@ $bgColor: #f5f7ff;
left: 0; left: 0;
} }
} }
.content { .content {
padding: 28upx; padding: 28upx;
position: relative; position: relative;
.user-info { .user-info {
.logo-wrap { .logo-wrap {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.logo { .logo {
width: 160upx; width: 160upx;
.img { .img {
width: 100%; width: 100%;
display: block; display: block;
} }
} }
.quick-menu { .quick-menu {
display: flex; display: flex;
gap: 20upx; gap: 20upx;
.icon { .icon {
$size: 60upx; $size: 60upx;
width: $size; width: $size;
@@ -289,12 +244,10 @@ $bgColor: #f5f7ff;
} }
} }
} }
.top { .top {
display: flex; display: flex;
align-items: center; align-items: center;
padding-top: 40upx; padding-top: 40upx;
.avatar { .avatar {
$size: 94upx; $size: 94upx;
width: $size; width: $size;
@@ -302,7 +255,6 @@ $bgColor: #f5f7ff;
border-radius: 50%; border-radius: 50%;
margin-right: 12upx; margin-right: 12upx;
} }
.info-wrap { .info-wrap {
flex: 1; flex: 1;
display: flex; display: flex;
@@ -310,22 +262,18 @@ $bgColor: #f5f7ff;
font-size: 32upx; font-size: 32upx;
} }
} }
.btm { .btm {
display: flex; display: flex;
padding: 40upx 0; padding: 40upx 0;
.item { .item {
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
.title { .title {
font-size: 28upx; font-size: 28upx;
} }
.num { .num {
font-weight: bold; font-weight: bold;
display: flex; display: flex;
@@ -335,20 +283,17 @@ $bgColor: #f5f7ff;
} }
} }
} }
.card-wrap { .card-wrap {
background: #fff; background: #fff;
border-radius: 16upx; border-radius: 16upx;
overflow: hidden; overflow: hidden;
margin-bottom: 28upx; margin-bottom: 28upx;
.gold-wrap { .gold-wrap {
background: #f2b5b5; background: #f2b5b5;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 20upx 28upx; padding: 20upx 28upx;
position: relative; position: relative;
// &::after { // &::after {
// $size: 40upx; // $size: 40upx;
// content: ''; // content: '';
@@ -365,20 +310,17 @@ $bgColor: #f5f7ff;
.left { .left {
display: flex; display: flex;
align-items: center; align-items: center;
.icon { .icon {
$size: 52upx; $size: 52upx;
width: $size; width: $size;
height: $size; height: $size;
margin-right: 20upx; margin-right: 20upx;
} }
.num { .num {
color: #fff; color: #fff;
font-size: 32upx; font-size: 32upx;
} }
} }
.btn { .btn {
color: #977641; color: #977641;
background: linear-gradient(90deg, #fee7bc 0%, #fdcc89 100%); background: linear-gradient(90deg, #fee7bc 0%, #fdcc89 100%);
@@ -391,21 +333,17 @@ $bgColor: #f5f7ff;
font-size: 24upx; font-size: 24upx;
} }
} }
.title-wrap { .title-wrap {
padding: 28upx; padding: 28upx;
.a { .a {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.t { .t {
font-size: 28upx; font-size: 28upx;
} }
} }
} }
.history-list { .history-list {
padding: 0 28upx 28upx; padding: 0 28upx 28upx;
display: grid; display: grid;
@@ -413,14 +351,12 @@ $bgColor: #f5f7ff;
grid-template-rows: 1fr; grid-template-rows: 1fr;
grid-column-gap: 28upx; grid-column-gap: 28upx;
grid-row-gap: 28upx; grid-row-gap: 28upx;
.item { .item {
.cover { .cover {
width: 100%; width: 100%;
height: 280upx; height: 280upx;
border-radius: 20upx; border-radius: 20upx;
} }
.name { .name {
font-size: 28upx; font-size: 28upx;
width: 160upx; width: 160upx;
@@ -428,19 +364,16 @@ $bgColor: #f5f7ff;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.t { .t {
color: #999; color: #999;
font-size: 24upx; font-size: 24upx;
} }
} }
} }
.menu-list { .menu-list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
padding: 28upx 0 0; padding: 28upx 0 0;
.item { .item {
flex: 0 0 25%; flex: 0 0 25%;
display: flex; display: flex;
@@ -448,13 +381,11 @@ $bgColor: #f5f7ff;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin-bottom: 32upx; margin-bottom: 32upx;
.icon { .icon {
$size: 56upx; $size: 56upx;
width: $size; width: $size;
height: $size; height: $size;
} }
.name { .name {
font-size: 24upx; font-size: 24upx;
margin-top: 8upx; margin-top: 8upx;

View File

@@ -21,10 +21,6 @@
<view class="title">隐私协议</view> <view class="title">隐私协议</view>
<up-icon name="arrow-right" /> <up-icon name="arrow-right" />
</view> </view>
<view class="item" @click="outuser" v-if="token&&!isExamine">
<view class="title">注销账号</view>
<up-icon name="arrow-right" />
</view>
<view class="item" @click="logout" v-if="token"> <view class="item" @click="logout" v-if="token">
<view class="title">退出登录</view> <view class="title">退出登录</view>
<up-icon name="arrow-right" /> <up-icon name="arrow-right" />
@@ -35,42 +31,13 @@
</template> </template>
<script setup> <script setup>
import { import { ref } from 'vue';
ref import { linkTo } from '@/utils/app.js';
} from 'vue'; import { onLoad } from '@dcloudio/uni-app';
import {
linkTo
} from '@/utils/app.js';
import {
onLoad
} from '@dcloudio/uni-app';
import {
deleteUserByUserId
} from '@/api/me/me.js'
import {
useCommonStore
} from '@/store/common.js'
const version = ref(''); const version = ref('');
const token = ref(''); const token = ref('');
let isExamine = ref(false)
// 注销账号
function outuser() {
uni.showModal({
title: '注意',
content: '确定要注销账号吗?',
success: async (res) => {
if (res.confirm) {
let userInfo = uni.getStorageSync('userInfo')
let res = await deleteUserByUserId(userInfo.userId)
if (res.code == 0) {
uni.reLaunch({
url: '/pages/login/login'
});
}
}
}
});
}
// 退出登录 // 退出登录
function logout() { function logout() {
uni.showModal({ uni.showModal({
@@ -86,7 +53,7 @@
} }
}); });
} }
const $common = useCommonStore()
onLoad(() => { onLoad(() => {
token.value = uni.getStorageSync('token'); token.value = uni.getStorageSync('token');
const systemInfo = uni.getSystemInfoSync(); const systemInfo = uni.getSystemInfoSync();
@@ -96,8 +63,6 @@
// #ifdef H5 // #ifdef H5
version.value = systemInfo.appVersion; version.value = systemInfo.appVersion;
// #endif // #endif
$common.init()
isExamine.value = $common.isIosExamine
}); });
</script> </script>
@@ -106,10 +71,8 @@
font-size: 28upx; font-size: 28upx;
color: #555; color: #555;
} }
.list { .list {
padding-bottom: 120upx; padding-bottom: 120upx;
.item { .item {
padding: 32upx 28upx; padding: 32upx 28upx;
border-bottom: 1upx solid #efefef; border-bottom: 1upx solid #efefef;
@@ -118,7 +81,6 @@
justify-content: space-between; justify-content: space-between;
} }
} }
.version { .version {
width: 100%; width: 100%;
height: 120upx; height: 120upx;

View File

@@ -8,13 +8,10 @@
<template #right-icon> <up-input border="none" v-model="data.zhiFuBao" placeholder="请输入要绑定的支付宝手机号"></up-input> </template> <template #right-icon> <up-input border="none" v-model="data.zhiFuBao" placeholder="请输入要绑定的支付宝手机号"></up-input> </template>
</up-cell> </up-cell>
</up-cell-group> </up-cell-group>
<view class="u-flex u-row-center">
<button class="confirm-btn" @click="toLogin" <button class="confirm-btn" @click="toLogin"
:disabled="data.logining">绑定账户</button> :disabled="data.logining">绑定账户</button>
</view> <view style="font-size: 24upx;color: #999999;padding: 0 15rpx;margin-top: 32rpx;margin-bottom: 10rpx;">请正确填写收款人的支付宝账户和真实的收款人姓名</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx">否则将无法正常收款请须知</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;margin-top: 32rpx;margin-bottom: 10rpx;text-align: center;">请正确填写收款人的支付宝账户和真实的收款人姓名</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;text-align: center;">否则将无法正常收款请须知</view>
</view> </view>
</template> </template>
@@ -55,37 +52,6 @@
}) })
} else { } else {
data.logining = true data.logining = true
// this.$u.post('app/user/updateUser?zhiFuBao=' + zhiFuBao + '&certName=' + zhiFuBaoName + '&certNum=' + certNum).then(
// res => {
// console.log(res);
// if (res.code === 0) {
// uni.setStorageSync('zhiFuBao', zhiFuBao)
// uni.setStorageSync('zhiFuBaoName', zhiFuBaoName)
// uni.setStorageSync('certNum', certNum)
// uni.showToast({
// title: '修改成功',
// icon: 'none',
// complete() {
// setTimeout(function () {
// uni.navigateBack();
// }, 1000)
// }
// })
// } else {
// uni.showToast({
// title: res.msg || '修改失败',
// icon: 'none'
// })
// }
// });
let res = await updateUser({ let res = await updateUser({
zhiFuBao: data.zhiFuBao, zhiFuBao: data.zhiFuBao,
certName: data.zhiFuBaoName, certName: data.zhiFuBaoName,

View File

@@ -1,6 +1,9 @@
<template> <template>
<view class="container"> <view class="container">
<up-navbar title="申请提现" :autoBack="true" bgColor="rgb(255, 117, 129)" leftIconColor="#FFF" <up-navbar title="申请提现"
:autoBack="true"
bgColor="rgb(255, 117, 129)"
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;">
@@ -19,8 +22,7 @@
<view class="input" style=""> <view class="input" style="">
<view style="display: flex;align-items: center;"> <view style="display: flex;align-items: center;">
<view style="font-size: 40upx;color: #333333;">¥</view> <view style="font-size: 40upx;color: #333333;">¥</view>
<input type="digit" v-model="data.money" placeholder="请输入金额" @input="moneyInput" <input type="digit" v-model="data.money" placeholder="请输入金额" @input="moneyInput" style="font-size: 32rpx;color: #333333;text-align: left;margin-left: 10rpx;width: 80%;" />
style="font-size: 32rpx;color: #333333;text-align: left;margin-left: 10rpx;width: 80%;" />
</view> </view>
<view class="allbtn" @click="setAllMoney"> <view class="allbtn" @click="setAllMoney">
全部 全部
@@ -30,9 +32,7 @@
</view> </view>
<view class="witBtn" @click="goWithdraw"> {{data.isWithdraw?'立即提现':'观看广告提现'}} </view> <view class="witBtn" @click="goWithdraw"> {{data.isWithdraw?'立即提现':'观看广告提现'}} </view>
<view style="color: #666;" @click="WithdrawalAlipay">
提现到支付宝
</view>
<view class="tab" style=""> <view class="tab" style="">
<view @click="linkTo('/pages/me/withdraw/realName')">实名认证</view> <view @click="linkTo('/pages/me/withdraw/realName')">实名认证</view>
<!-- <view @click="linkTo('/pages/me/withdraw/alipay')">提现账号</view> --> <!-- <view @click="linkTo('/pages/me/withdraw/alipay')">提现账号</view> -->
@@ -73,20 +73,19 @@
</view> </view>
<up-modal :show="data.ruleShow" confirm-text="知道了" title="规则说明" :title="data.rule_title" <up-modal :show="data.ruleShow" confirm-text="知道了" title="规则说明" :title="data.rule_title" :title-style="{fontWeight:'700'}" @confirm="ruleConfirm" confirm-color="rgb(255, 117, 129)">
: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;" <!-- <rich-text style="text-align: justify;font-size: 18px;color: #666;" :nodes="data.rule_content"></rich-text> -->
:nodes="data.rule_content"></rich-text> <view style="text-align: justify;font-size: 18px;color: #666;" v-html="data.rule_content"></view>
</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;">
<!-- 激励视频广告 --> <!-- 激励视频广告 -->
<ad-rewarded-video ref="adRewardedw" :adpid="data.adpid" :loadnext="true" :url-callback="data.urlCallback" <ad-rewarded-video ref="adRewardedw" :adpid="data.adpid" :loadnext="true"
@load="onadload" @close="onadclose" @error="onaderror"> :url-callback="data.urlCallback" @load="onadload" @close="onadclose" @error="onaderror">
</ad-rewarded-video> </ad-rewarded-video>
</view> </view>
@@ -135,9 +134,7 @@
getExtractFei(); getExtractFei();
getMoneyDetail(); getMoneyDetail();
getCanCash() getCanCash()
announcement({ announcement({type: 1}).then(res=>{
type: 1
}).then(res => {
data.ruleList = res data.ruleList = res
ruleInit() ruleInit()
@@ -208,42 +205,6 @@
data.userInfo = res; data.userInfo = res;
}) })
} }
function WithdrawalAlipay() {
if (data.userInfo.zhiFuBao) {
if (data.money) {
withdraw({
amount: data.money,
isAlipay: 1
}).then(res => {
data.money = ''
uni.setStorageSync('adRewardedNum', 0)
setTimeout(function() {
getcashMoney()
}, 1500)
uni.showToast({
title: res.msg,
icon: 'none'
})
})
}else{
uni.showToast({
title: "请输入金额",
icon: 'none',
})
}
} else {
uni.showToast({
title: "请绑定支付宝",
icon: 'none',
})
setTimeout(() => {
// 未绑定信息
linkTo('/pages/me/withdraw/alipay')
}, 1500)
}
}
function back() { function back() {
uni.navigateBack() uni.navigateBack()
} }
@@ -467,10 +428,7 @@
return; return;
} }
if (!data.userInfo.accountNo) { if (!data.userInfo.accountNo) {
uni.showToast({ uni.showToast({ icon: 'none', title: "请先实名认证" });
icon: 'none',
title: "请先实名认证"
});
setTimeout(()=>{ setTimeout(()=>{
linkTo('/pages/me/withdraw/realName') linkTo('/pages/me/withdraw/realName')
},1500) },1500)
@@ -487,8 +445,7 @@
setTimeout(()=>{ setTimeout(()=>{
uni.showModal({ uni.showModal({
title: "提现申请提示", title: "提现申请提示",
content: '请仔细确认收款人信息\n\n收款人姓名:' + data.userInfo.certName + content: '请仔细确认收款人信息\n\n收款人姓名:' + data.userInfo.certName + '\n\n提现金额:' + data
'\n\n提现金额:' + data
.money + '元\n\n收款人账号' + data.userInfo.accountNo + '', .money + '元\n\n收款人账号' + data.userInfo.accountNo + '',
success: (e) => { success: (e) => {
@@ -518,6 +475,7 @@
}); });
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@@ -526,7 +484,6 @@
background: white; background: white;
position: absolute; position: absolute;
width: 100%; width: 100%;
.nav{ .nav{
width: 100%; width: 100%;
@@ -538,53 +495,45 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 100rpx 30rpx 15rpx 30rpx; padding: 100rpx 30rpx 15rpx 30rpx;
.navTitle{ .navTitle{
color: #fff; color: #fff;
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
} }
.ruleBtn{ .ruleBtn{
font-size: 30rpx; font-size: 30rpx;
color: #fff; color: #fff;
} }
} }
.content{ .content{
background-color: #ff7581; background-color: #ff7581;
height: 500rpx; height: 500rpx;
border-bottom-right-radius: 40rpx; border-bottom-right-radius: 40rpx;
border-bottom-left-radius: 40rpx; border-bottom-left-radius: 40rpx;
.title{ .title{
font-size: 32rpx; font-size: 32rpx;
color: #FFFFFF; color: #FFFFFF;
padding-top: 230rpx; padding-top: 230rpx;
} }
.mayMoney{ .mayMoney{
font-size: 40rpx; font-size: 40rpx;
color: #FFFFFF; color: #FFFFFF;
padding-top: 20rpx; padding-top: 20rpx;
} }
.val{ .val{
width: 90%; width: 90%;
height: max-content; height: max-content
margin-left: 40rpx; ;margin-left: 40rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
box-shadow: rgba(183, 183, 183, 0.3) 0px 1px 10px; box-shadow: rgba(183, 183, 183, 0.3) 0px 1px 10px;
margin-top: 50rpx; margin-top: 50rpx;
border-radius: 20rpx; border-radius: 20rpx;
.input{ .input{
display: flex; display: flex;
padding: 20rpx; padding: 20rpx;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.allbtn{ .allbtn{
font-size: 28rpx; font-size: 28rpx;
color: #333333; color: #333333;
@@ -595,7 +544,6 @@
flex-shrink: 0; flex-shrink: 0;
} }
} }
.witBtn{ .witBtn{
margin: 32rpx; margin: 32rpx;
font-size: 36rpx; font-size: 36rpx;
@@ -605,13 +553,11 @@
height: 80rpx; height: 80rpx;
line-height: 80rpx; line-height: 80rpx;
} }
.tab{ .tab{
width: 100%; width: 100%;
display: flex; display: flex;
width: 100%; width: 100%;
justify-content: space-around; justify-content: space-around;
>view{ >view{
font-size: 28rpx; font-size: 28rpx;
color: #666; color: #666;
@@ -619,7 +565,6 @@
padding-top: 20rpx; padding-top: 20rpx;
} }
} }
.moneyList{ .moneyList{
text-align: left text-align: left
} }

View File

@@ -65,7 +65,6 @@
}) })
} }
onReachBottom(() => { onReachBottom(() => {
console.log(1)
if (data.page*data.limit < data.totalCount) { if (data.page*data.limit < data.totalCount) {
data.page = data.page + 1; data.page = data.page + 1;
getMoney(); getMoney();

View File

@@ -2,128 +2,62 @@
<view class="containerView"> <view class="containerView">
<up-cell-group label-width="80" :border="false"> <up-cell-group label-width="80" :border="false">
<up-cell> <up-cell>
<template #title> <template #title> <view style="width: 90px;">姓名</view></template>
<view style="width: 90px;">姓名</view> <template #right-icon> <up-input border="none" v-model="data.certName" placeholder="请输入姓名"></up-input> </template>
</template>
<template #right-icon> <up-input border="none" :disabled="setinput()" v-model="data.certName"
placeholder="请输入姓名"></up-input>
</template>
</up-cell> </up-cell>
<up-cell> <up-cell>
<template #title> <template #title> <view style="width: 90px;">身份证号码</view></template>
<view style="width: 90px;">身份证号码</view> <template #right-icon> <up-input border="none" v-model="data.certNum" placeholder="请输入身份证号码"></up-input> </template>
</template>
<template #right-icon> <up-input border="none" v-model="data.certNum" :disabled="setinput()"
placeholder="请输入身份证号码"></up-input>
</template>
</up-cell> </up-cell>
<up-cell> <up-cell>
<template #title> <template #title> <view style="width: 90px;">银行卡号码</view></template>
<view style="width: 90px;">银行卡号码</view> <template #right-icon> <up-input border="none" v-model="data.accountNo" placeholder="请输入银行卡号码"></up-input> </template>
</template>
<template #right-icon> <up-input border="none" :disabled="setinput()" v-model="data.accountNo"
placeholder="请输入银行卡号码"></up-input> </template>
</up-cell> </up-cell>
<up-cell> <up-cell>
<template #title> <template #title> <view style="width: 90px;">手机号</view></template>
<view style="width: 90px;">手机号</view> <template #right-icon> <up-input border="none" v-model="data.mobile" placeholder="请输入银行预留号码"></up-input> </template>
</template>
<template #right-icon> <up-input border="none" :disabled="setinput()" v-model="data.mobile"
placeholder="请输入银行预留号码"></up-input> </template>
</up-cell>
<up-cell>
<template #title>
<view style="width: 90px;">开户省份</view>
</template>
<template #right-icon> <up-input border="none" v-model="data.province"
placeholder="请输入银行开户省份"></up-input> </template>
</up-cell>
<up-cell>
<template #title>
<view style="width: 90px;">开户市区</view>
</template>
<template #right-icon> <up-input border="none" v-model="data.city" placeholder="请输入银行开户市区"></up-input>
</template>
</up-cell>
<up-cell>
<template #title>
<view style="width: 90px;">开户行</view>
</template>
<template #right-icon> <up-input border="none" v-model="data.bankBranch"
placeholder="请输入银行开户行"></up-input> </template>
</up-cell> </up-cell>
</up-cell-group> </up-cell-group>
<button v-if="data.isAccountNo" class="confirm-btn" @click="toLogin" :disabled="data.logining">认证</button> <button v-if="!data.isAccountNo" class="confirm-btn" @click="toLogin" :disabled="data.logining">认证</button>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;margin-top: 32rpx;margin-bottom: 10rpx;"> <view style="font-size: 24upx;color: #999999;padding: 0 15rpx;margin-top: 32rpx;margin-bottom: 10rpx;">请正确填写收款人的银行卡号和真实的收款人姓名</view>
请正确填写收款人的银行卡号和真实的收款人姓名</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;;margin-bottom: 10rpx;">手机号需是银行卡银行卡预留手机号</view> <view style="font-size: 24upx;color: #999999;padding: 0 15rpx;;margin-bottom: 10rpx;">手机号需是银行卡银行卡预留手机号</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;;margin-bottom: 10rpx;">银行卡号需与收款人姓名一致</view> <view style="font-size: 24upx;color: #999999;padding: 0 15rpx;;margin-bottom: 10rpx;">银行卡号需与收款人姓名一致</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;;margin-bottom: 10rpx;">身份证信息仅可使用一次</view> <view style="font-size: 24upx;color: #999999;padding: 0 15rpx;;margin-bottom: 10rpx;">身份证信息仅可使用一次</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx">否则将无法正常收款请须知</view> <view style="font-size: 24upx;color: #999999;padding: 0 15rpx">否则将无法正常收款请须知</view>
</view> </view>
</template> </template>
<script setup> <script setup>
import { import { reactive, nextTick, ref } from 'vue';
reactive, import { onReady,onLoad,onShow } from '@dcloudio/uni-app'
nextTick, import { realNameAuth } from '@/api/me/withdraw.js';
ref import { selectUserById } from '@/api/user/user.js';
} from 'vue'; import { commonType } from '@/api/init.js';
import {
onReady,
onLoad,
onShow
} from '@dcloudio/uni-app'
import {
realNameAuth
} from '@/api/me/withdraw.js';
import {
selectUserById
} from '@/api/user/user.js';
import {
commonType
} from '@/api/init.js';
let data = reactive({ let data = reactive({
certName: null, certName: null,
mobile: null, mobile: null,
certNum: null, certNum: null,
accountNo: null, accountNo: null,
isAccountNo: true, isAccountNo: null,
logining: false, logining: false
province: null,
city: null,
bankBranch: null
}) })
let inputdata = ref()
onLoad(() => { onLoad(() => {
getUserInfo() getUserInfo()
}) })
function setinput() {
if (data.accountNo) {
return data.accountNo.indexOf('****') != -1
} else {
return false
}
}
function getUserInfo () { function getUserInfo () {
selectUserById().then(res=>{ selectUserById().then(res=>{
if(res){ if(res){
data.certName = res.certName; data.certName = res.certName;
data.mobile = res.mobile; data.mobile = res.mobile;
if ( res.accountNo ) { if ( res.accountNo ) {
inputdata.value = res
data.accountNo = res.accountNo; data.accountNo = res.accountNo;
data.certNum = res.certNo; data.certNum = res.certNo;
} }
if (res.accountNo && res.province && res.city && res.bankBranch) { data.isAccountNo = res.accountNo;
data.province = res.province;
data.city = res.city;
data.bankBranch = res.bankBranch;
data.isAccountNo = false
}
} }
}) })
@@ -163,9 +97,6 @@
mobile: data.mobile, mobile: data.mobile,
certNum: data.certNum, certNum: data.certNum,
accountNo: data.accountNo.replace(/\s+/g, ''), accountNo: data.accountNo.replace(/\s+/g, ''),
province: data.province,
city: data.city,
bankBranch: data.bankBranch
}) })
if( res) { if( res) {
data.logining = false data.logining = false
@@ -198,11 +129,9 @@
page { page {
background: #FFFFFF; background: #FFFFFF;
} }
.u-cell__body__content{ .u-cell__body__content{
flex: 0!important; flex: 0!important;
} }
.containerView { .containerView {
padding:30rpx; padding:30rpx;
position: relative; position: relative;
@@ -240,7 +169,6 @@
color: #ffffff; color: #ffffff;
font-size: 32rpx; font-size: 32rpx;
border: none; border: none;
&:after { &:after {
border: none; border: none;
} }

View File

@@ -9,10 +9,7 @@
reactive reactive
} from 'vue' } from 'vue'
import { import {
onShow, onShow,onHide,onUnload,onLoad
onHide,
onUnload,
onLoad
} from '@dcloudio/uni-app' } from '@dcloudio/uni-app'
import { import {
getOrderInfo getOrderInfo
@@ -21,6 +18,7 @@
orderId: '', orderId: '',
timer: null, timer: null,
timer1: null, timer1: null,
maxAjaxNum: 5,
ajaxNum: 0, ajaxNum: 0,
url: null, //要打开的外部链接 url: null, //要打开的外部链接
viewerUrl: '/hybrid/html/web/viewer.html', viewerUrl: '/hybrid/html/web/viewer.html',
@@ -34,30 +32,37 @@
getOrderInfo({ getOrderInfo({
orderId: state.orderId orderId: state.orderId
}).then(res => { }).then(res => {
state.ajaxNum+=1
console.log(res); console.log(res);
if (res == 1) { if (res == 1) {
uni.hideLoading() uni.hideLoading()
const sysInfo = uni.getSystemInfoSync(); const sysInfo = uni.getSystemInfoSync();
let isIos = sysInfo.platform == 'ios' let isIos = sysInfo.platform == 'ios'
if (isIos) {
uni.navigateBack()
uni.showToast({ uni.showToast({
title: '支付成功', title: '支付成功',
icon: 'none' icon: 'none'
}) })
if (isIos) {
uni.navigateBack()
setTimeout(() => { setTimeout(() => {
uni.navigateBack() uni.navigateBack()
}, 1500) }, 1500)
} else { } else {
uni.showToast({
title: '支付成功',
icon: 'none'
})
state.timer1 = setTimeout(() => { state.timer1 = setTimeout(() => {
cleartimer()
uni.navigateBack() uni.navigateBack()
}, 500) }, 500)
} }
} else { } else {
} }
if (executionCount >= maxExecutions) {
console.log(`已达到最大执行次数(${maxExecutions}),定时器停止`); if(state.ajaxNum>=state.maxAjaxNum){
uni.navigateBack() uni.navigateBack()
cleartimer() cleartimer()
} }
@@ -67,59 +72,24 @@
function cleartimer(){ function cleartimer(){
console.log('cleartimer'); console.log('cleartimer');
uni.hideLoading() uni.hideLoading()
clearTimeout(state.timer) clearInterval(state.timer)
clearTimeout(state.timer1) clearTimeout(state.timer1)
state.timer=null state.timer=null
state.timer1=null state.timer1=null
state.ajaxNum=0
} }
let runOnetime = 2000; // 初始间隔2秒
let executionCount = 0; // 执行计数
const maxExecutions = 5; // 最大执行次数
function startDynamicTimer() {
let lastExecutionTime = Date.now();
function executeAndReschedule() {
// 检查是否达到最大执行次数
if (executionCount >= maxExecutions) {
console.log(`已达到最大执行次数(${maxExecutions}),定时器停止`);
uni.navigateBack()
cleartimer()
return;
}
const currentTime = Date.now();
const elapsed = currentTime - lastExecutionTime;
lastExecutionTime = currentTime;
getOrder();
// 增加计数
executionCount++;
console.log('executionCount',executionCount);
// 计算新的间隔在上一次间隔基础上增加2秒
runOnetime += 2000;
// 如果未达到最大次数,安排下一次执行
console.log('executionCount < maxExecutions',executionCount < maxExecutions);
console.log(executionCount , maxExecutions);
if (executionCount < maxExecutions) {
state.timer = setTimeout(executeAndReschedule, runOnetime);
}
}
// 启动第一个定时器
state.timer = setTimeout(executeAndReschedule, runOnetime);
}
onShow(() => { onShow(() => {
executionCount=0;
// #ifdef APP // #ifdef APP
uni.showLoading({ uni.showLoading({
title: '支付中' title: '支付中'
}) })
// #endif // #endif
runOnetime = 2000; state.ajaxNum=0;
getOrder() getOrder()
clearTimeout(state.timer) clearInterval(state.timer)
// 启动动态定时器 state.timer=setInterval(()=>{
startDynamicTimer(); getOrder()
},2000)
}) })
onHide(() => { onHide(() => {
console.log('onHide'); console.log('onHide');

View File

@@ -12,15 +12,12 @@
<view class="contentTop "> <view class="contentTop ">
<view> <view>
<image src="@/static/task/renwubg.png" mode=""></image> <image src="@/static/task/renwubg.png" mode=""></image>
<view> <view>已连续签到 <text class="num">{{ datas.signDays }}</text> </view>
已连续签到
<text class="num">{{ datas.signDays }}</text>
</view>
</view> </view>
<view class="contentTopTwo"> <view class="contentTopTwo">
<view v-for="item in datas.signInList" :key="item.id" :style="item.status == 1 ? 'color:#EFA765' : 'color:#999'"> <view v-for="item in datas.signInList" :key="item.id"
<text class="" style="font-size: 28rpx"> :style="item.status == 1 ? 'color:#EFA765' : 'color:#999'">
<text class="" style="font-size: 28rpx;">
{{ item.status == 1 ? '已签到' : '待签到' }} {{ item.status == 1 ? '已签到' : '待签到' }}
</text> </text>
<view :style="item.status == 1 ? 'color:#999' : 'color:#EFA765'"> <view :style="item.status == 1 ? 'color:#999' : 'color:#EFA765'">
@@ -35,74 +32,70 @@
<view class="cell " v-for="(item, index) in datas.list" :key="index"> <view class="cell " v-for="(item, index) in datas.list" :key="index">
<view class="cell_left "> <view class="cell_left ">
<view class="cell_title "> <view class="cell_title ">
<view class="title" :style="{ alignSelf: item.rewardImg ? 'center' : 'flex-start' }">{{ item.title }}</view> <view class=" title" :style="{ alignSelf: item.rewardImg ? 'center' : 'flex-start' }">{{
item.title
}}</view>
<image v-if="item.rewardImg" class="cell_icon" :src="item.rewardImg" mode=""></image> <image v-if="item.rewardImg" class="cell_icon" :src="item.rewardImg" mode=""></image>
<view class="tip">{{ item.rewardDetail }}</view> <view class="tip">{{ item.rewardDetail }}</view>
</view> </view>
<view class="subhead ">{{ item.detail }}</view> <view class="subhead ">{{ item.detail }}</view>
</view> </view>
<view class="cell_right "> <view class="cell_right ">
<view v-if="item.disabled" class="btn u-font-24 text-bold" :style="{ backgroundColor: item.buttonBgColor, color: item.buttonFontColor }" @click="goNav(item)"> <view v-if=" item.disabled " class="btn u-font-24 text-bold"
{{ :style="{backgroundColor: item.buttonBgColor,color: item.buttonFontColor }"
item.type == 1 @click="goNav(item)">
? item.buttonTitle {{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` : ( item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}`) }}
: item.number
? `${item.discNumber}/${item.number}`
: item.discNumber <= 0
? item.buttonTitle
: `剩余${item.discNumber}`
}}
</view> </view>
<view v-else class="btn u-font-24 text-bold disabled"> <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}`) }}
item.type == 1
? item.buttonTitle
: item.number
? `${item.discNumber}/${item.number}`
: item.discNumber <= 0
? item.buttonTitle
: `剩余${item.discNumber}`
}}
</view> </view>
<view <view v-if=" item.buttonUnderContent && item.buttonUnderUrl " class="u-font-22 tip"
v-if="item.buttonUnderContent && item.buttonUnderUrl" style="text-align: center;"
class="u-font-22 tip" @click="goNav({id: item.id,buttonUrl: item.buttonUnderUrl, jumpType: 1,title: item.title, disabled: item.disabled, discNumber: item.discNumber})">
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}} {{ item.buttonUnderContent}}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- 激励视频广告 --> <!-- 激励视频广告 -->
<view style="width: 0; height: 0; overflow: hidden"> <view style="width: 0;height: 0;overflow: hidden;">
<!-- 激励视频广告 --> <!-- 激励视频广告 -->
<ad-rewarded-video <ad-rewarded-video ref="adRewarded" :adpid="datas.adpid" :loadnext="true" :url-callback="datas.urlCallback"
ref="adRewarded" @load="onadload" @close="onadclose" @error="onaderror">
:adpid="datas.adpid" </ad-rewarded-video>
:loadnext="true"
:url-callback="datas.urlCallback"
@load="onadload"
@close="onadclose"
@error="onaderror"
></ad-rewarded-video>
</view> </view>
</view> </view>
<disable-mask v-if="disableShow"></disable-mask>
</template> </template>
<script setup> <script setup>
import { useCommonStore } from '@/store/common.js'; import {
const $common = useCommonStore(); useCommonStore
import { selectUserMoney, selectPayDetails, canCash, state, withdraw } from '@/api/me/withdraw.js'; } from '@/store/common.js'
import { reactive, ref, getCurrentInstance, nextTick } from 'vue'; const $common = useCommonStore()
import { onShow, onReady, onReachBottom } from '@dcloudio/uni-app'; import {
import { getUserSignData, selectTaskCenter, taskReceive } from '@/api/task/index.js'; selectUserMoney,
selectPayDetails,
const disableShow = ref(false); canCash,
state,
const currentInstance = getCurrentInstance(); withdraw
} from '@/api/me/withdraw.js';
import {
reactive,
ref,
getCurrentInstance,
nextTick
} from "vue";
import {
onShow,
onReady,
onReachBottom
} from '@dcloudio/uni-app'
import {
getUserSignData,
selectTaskCenter,
taskReceive
} from '@/api/task/index.js'
const currentInstance = getCurrentInstance()
let datas = reactive({ let datas = reactive({
signDays: 0, signDays: 0,
signInList: [], signInList: [],
@@ -110,8 +103,9 @@ let datas = reactive({
urlCallback: {}, urlCallback: {},
adpid: null, adpid: null,
adRewardedShow: false, adRewardedShow: false,
adRewardedVideoloadNum: 0 adRewardedVideoloadNum: 0,
});
})
const adRewarded = ref(null); const adRewarded = ref(null);
onShow(() => { onShow(() => {
// $common.init() // $common.init()
@@ -119,135 +113,136 @@ onShow(() => {
// datas.adpid = 1531580352 // datas.adpid = 1531580352
// } // }
// if ( uni.getSystemInfoSync().platform == 'ios' ) { // if ( uni.getSystemInfoSync().platform == 'ios' ) {
datas.adpid = 1373604770; datas.adpid = 1373604770
// } // }
if (uni.getStorageSync('token')) { if (uni.getStorageSync("token")) {
getTaskdata(); getTaskdata()
getsignIn(); getsignIn()
getCanCash(); getCanCash()
} else { } else {
datas.signDays = 0; datas.signDays = 0
const dateArray = []; const dateArray = [];
datas.signInList = []; datas.signInList = []
for (let i = 0; i < 7; i++) { for (let i = 0; i < 7; i++) {
const date = new Date(Date.now() + i * 24 * 60 * 60 * 1000); const date = new Date(Date.now() + i * 24 * 60 * 60 * 1000);
const year = date.getFullYear(); const year = date.getFullYear();
const month = date.getMonth() + 1 < 10 ? `0${date.getMonth() + 1}` : date.getMonth() + 1; const month = date.getMonth() + 1 < 10 ? `0${date.getMonth() + 1}` : date.getMonth() +
1;
const day = date.getDate() < 10 ? `0${date.getDate()}` : date.getDate(); const day = date.getDate() < 10 ? `0${date.getDate()}` : date.getDate();
dateArray.push(`${year}-${month}-${day}`); dateArray.push(`${year}-${month}-${day}`);
} }
dateArray.forEach((ele) => { dateArray.forEach(ele => {
datas.signInList.push({ datas.signInList.push({
signDay: ele, "signDay": ele,
status: '0' "status": "0",
}); })
}); })
datas.list = [ datas.list = [{
{ "id": 1,
id: 1, "title": "每日打卡奖励",
title: '每日打卡奖励', "type": 2,
type: 2, "detail": "解锁3集视频即可领取",
detail: '解锁3集视频即可领取', "rewardDetail": "奖励666金币",
rewardDetail: '奖励666金币', "number": 3,
number: 3, "buttonTitle": "",
buttonTitle: '', "jumpType": 1,
jumpType: 1, "buttonUrl": "",
buttonUrl: '', "buttonUnderContent": "",
buttonUnderContent: '', "buttonUnderUrl": "",
buttonUnderUrl: '', "updateTime": "2025-01-06 18:08:49",
updateTime: '2025-01-06 18:08:49', "sort": 0,
sort: 0, "shows": 1,
shows: 1, "discNumber": 0,
discNumber: 0, "disabled": false
disabled: false
}, },
{ {
id: 17, "id": 17,
title: '每周打卡奖励', "title": "每周打卡奖励",
type: 2, "type": 2,
detail: '当月签到满7天即可免费领取', "detail": "当月签到满7天即可免费领取",
rewardImg: 'https://short-video.hnsiyao.cn/20241210/8aca569a9d544e819f542ce8aa7e7ce5.png', "rewardImg": "https://short-video.hnsiyao.cn/20241210/8aca569a9d544e819f542ce8aa7e7ce5.png",
rewardDetail: '', "rewardDetail": "",
number: 7, "number": 7,
buttonTitle: '立即领取', "buttonTitle": "立即领取",
buttonBgColor: '#EC6F48', "buttonBgColor": "#EC6F48",
buttonFontColor: '#fff', "buttonFontColor": "#fff",
jumpType: 1, "jumpType": 1,
buttonUrl: '/pages/task/receiveMember', "buttonUrl": "/pages/task/receiveMember",
buttonUnderContent: '', "buttonUnderContent": "",
buttonUnderUrl: '/pages/task/receiveMember', "buttonUnderUrl": "/pages/task/receiveMember",
createTime: '2024-12-10 17:43:42', "createTime": "2024-12-10 17:43:42",
updateTime: '2024-12-25 09:52:09', "updateTime": "2024-12-25 09:52:09",
sort: 5, "sort": 5,
shows: 1, "shows": 1,
discNumber: 0, "discNumber": 0,
disabled: false "disabled": false
}, },
{ {
id: 17, "id": 17,
title: '每月打卡奖励1', "title": "每月打卡奖励1",
type: 2, "type": 2,
detail: '当月签到满25天即可免费领取', "detail": "当月签到满25天即可免费领取",
rewardImg: 'https://short-video.hnsiyao.cn/20241210/8aca569a9d544e819f542ce8aa7e7ce5.png', "rewardImg": "https://short-video.hnsiyao.cn/20241210/8aca569a9d544e819f542ce8aa7e7ce5.png",
rewardDetail: '会员免费领', "rewardDetail": "会员免费领",
number: 25, "number": 25,
buttonTitle: '立即领取', "buttonTitle": "立即领取",
buttonBgColor: '#EC6F48', "buttonBgColor": "#EC6F48",
buttonFontColor: '#fff', "buttonFontColor": "#fff",
jumpType: 1, "jumpType": 1,
buttonUrl: '/pages/task/receiveMember', "buttonUrl": "/pages/task/receiveMember",
buttonUnderContent: '', "buttonUnderContent": "",
buttonUnderUrl: '/pages/task/receiveMember', "buttonUnderUrl": "/pages/task/receiveMember",
createTime: '2024-12-10 17:43:42', "createTime": "2024-12-10 17:43:42",
updateTime: '2024-12-25 09:52:09', "updateTime": "2024-12-25 09:52:09",
sort: 5, "sort": 5,
shows: 1, "shows": 1,
discNumber: 0, "discNumber": 0,
disabled: false "disabled": false
}, },
{ {
id: 17, "id": 17,
title: '每月打卡奖励2', "title": "每月打卡奖励2",
type: 2, "type": 2,
detail: '当月签到满25天即可免费领取', "detail": "当月签到满25天即可免费领取",
rewardImg: 'https://short-video.hnsiyao.cn/20241210/8aca569a9d544e819f542ce8aa7e7ce5.png', "rewardImg": "https://short-video.hnsiyao.cn/20241210/8aca569a9d544e819f542ce8aa7e7ce5.png",
rewardDetail: '', "rewardDetail": "",
number: 25, "number": 25,
buttonTitle: '立即领取', "buttonTitle": "立即领取",
buttonBgColor: '#EC6F48', "buttonBgColor": "#EC6F48",
buttonFontColor: '#fff', "buttonFontColor": "#fff",
jumpType: 1, "jumpType": 1,
buttonUrl: '/pages/task/receiveMember', "buttonUrl": "/pages/task/receiveMember",
buttonUnderContent: '', "buttonUnderContent": "",
buttonUnderUrl: '/pages/task/receiveMember', "buttonUnderUrl": "/pages/task/receiveMember",
createTime: '2024-12-10 17:43:42', "createTime": "2024-12-10 17:43:42",
updateTime: '2024-12-25 09:52:09', "updateTime": "2024-12-25 09:52:09",
sort: 5, "sort": 5,
shows: 1, "shows": 1,
discNumber: 0, "discNumber": 0,
disabled: false "disabled": false
} }
]; ]
} }
}); })
onReady(() => { onReady(() => {
nextTick(() => { nextTick(() => {
datas.urlCallback = { datas.urlCallback = {
userId: uni.getStorageSync('userInfo').userId, userId: uni.getStorageSync('userInfo').userId,
extra: uni.getStorageSync('userInfo').userId + '' + new Date().getTime() extra: uni.getStorageSync('userInfo').userId + "" + new Date().getTime(),
}; }
datas.adRewardedVideoloadNum = 0; datas.adRewardedVideoloadNum = 0
adRewarded.value.load(); adRewarded.value.load();
}); })
}); })
/** /**
* 获取看广告状态 * 获取看广告状态
*/ */
async function getCanCash() { async function getCanCash() {
canCash().then((res) => { canCash().then(res => {
datas.isWithdraw = !res; datas.isWithdraw = !res;
}); })
} }
/** /**
@@ -256,17 +251,17 @@ async function getCanCash() {
*/ */
function onaderror(e) { function onaderror(e) {
if (datas.adRewardedVideoloadNum >= 3) { if (datas.adRewardedVideoloadNum >= 3) {
return; return
} }
datas.adRewardedVideoloadNum++; datas.adRewardedVideoloadNum++
setTimeout(() => { setTimeout(() => {
datas.urlCallback = { datas.urlCallback = {
userId: uni.getStorageSync('userInfo').userId, userId: uni.getStorageSync('userInfo').userId,
extra: uni.getStorageSync('userInfo').userId + '' + new Date().getTime() extra: uni.getStorageSync('userInfo').userId + "" + new Date().getTime(),
}; }
adRewarded.value.load(); adRewarded.value.load();
}, 1000); // 10 }, 1000); // 10
console.log('广告加载失败'); console.log("广告加载失败")
} }
/** /**
@@ -282,106 +277,108 @@ function onadload(e) {
* @param {Object} e * @param {Object} e
*/ */
async function onadclose(e) { async function onadclose(e) {
const detail = e.detail; const detail = e.detail
if (detail && detail.isEnded) { if (detail && detail.isEnded) {
// 正常播放结束 // 正常播放结束
let res = await state({ let res = await state({
extraKey: datas.urlCallback.extra extraKey: datas.urlCallback.extra
}); })
datas.urlCallback = { datas.urlCallback = {
userId: uni.getStorageSync('userInfo').userId, userId: uni.getStorageSync('userInfo').userId,
extra: uni.getStorageSync('userInfo').userId + '' + new Date().getTime() extra: uni.getStorageSync('userInfo').userId + "" + new Date().getTime(),
}; }
uni.showToast({ uni.showToast({
title: '获得' + $common.freeDuration + '分钟免费时长', title: '获得' + $common.freeDuration + '分钟免费时长',
icon: 'none' icon: 'none'
}); })
} else { } else {
// 播放中途退出 // 播放中途退出
} }
} }
async function goNav(item) { async function goNav(item, url) {
console.log(item, '请求参数'); console.log(item, url, '调试111')
// jumpType (integer, optional): 跳转类型 1 内部路径 2 外部路径 , // jumpType (integer, optional): 跳转类型 1 内部路径 2 外部路径 ,
// type (integer, optional): 任务类型 1 普通任务 2 打卡任务 9 其它 , // type (integer, optional): 任务类型 1 普通任务 2 打卡任务 9 其它 ,
// if (url) { if (url) {
// let urls = '' let urls = ''
// if (url == '/pages/task/prizeList') { if (url == '/pages/task/prizeList') {
// urls = url + '?source=2' urls = url + '?source=2'
// } }
// if (url == '/pages/task/receiveMember') { if (url == '/pages/task/receiveMember') {
// urls = url + `?standard=${item.discNumber == null ? true : false}&taskId=${item.id}` urls = url + `?standard=${item.discNumber == null ? true : false}&taskId=${item.id}`
// } }
// uni.navigateTo({ uni.navigateTo({
// url: urls url: urls
// }) })
// } else { } else {
console.log(item, '林区')
// }
if (item.jumpType == 0) { if (item.jumpType == 0) {
if (item.buttonTitle.indexOf('领取') != -1) { if (item.buttonTitle.indexOf("领取") != -1) {
let res = await taskReceive({ let res = await taskReceive({
id: item.id id: item.id
}); })
if (res.code == 0) { if (res.code == 0) {
uni.showToast({ uni.showToast({
title: res.id == 15 ? '签到成功' : '领取成功', title: res.id == 15 ? '签到成功' : '领取成功',
icon: 'none' icon: 'none'
}); })
setTimeout(() => { setTimeout(() => {
getTaskdata(); getTaskdata()
getsignIn(); getsignIn()
}, 1000); }, 1000)
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none' icon: 'none'
}); })
} }
} else if (item.title.indexOf('新人福利') != -1) { } else if (item.title.indexOf("新人福利") != -1) {
let res = await taskReceive({ let res = await taskReceive({
id: item.id id: item.id
}); })
if (res.code == 0) { if (res.code == 0) {
uni.showToast({ uni.showToast({
title: res.id == 15 ? '签到成功' : '领取成功', title: res.id == 15 ? '签到成功' : '领取成功',
icon: 'none' icon: 'none'
}); })
setTimeout(() => { setTimeout(() => {
getTaskdata(); getTaskdata()
getsignIn(); getsignIn()
}, 1000); }, 1000)
} else { } else {
uni.switchTab({ uni.switchTab({
url: '/pages/index/index' url: '/pages/index/index'
}); })
} }
} else if (item.buttonTitle.indexOf('观看视频') != -1) { } else if (item.buttonTitle.indexOf("观看视频") != -1) {
// 首次加载广告 // 首次加载广告
if (!datas.adRewardedShow) { if (!datas.adRewardedShow) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '广告加载失败,请稍后重试' title: '广告加载失败,请稍后重试'
}); });
return; return
} }
console.log(datas.urlCallback); console.log(datas.urlCallback)
adRewarded.value.show(); adRewarded.value.show();
} else { } else {
uni.switchTab({ uni.switchTab({
url: '/pages/index/index' url: "/pages/index/index"
}); })
} }
} else if (item.jumpType == 1) { } else if (item.jumpType == 1) {
let buttonUrl = item.buttonUrl; let buttonUrl = item.buttonUrl
if (item.title && item.title.indexOf('每周打卡奖励') != -1) { if (item.title && item.title.indexOf('每周打卡奖励') != -1) {
buttonUrl = item.buttonUrl + '?source=2'; buttonUrl = item.buttonUrl + '?source=2'
} }
if (item.title && item.title.indexOf('每月打卡奖励1') != -1) { if (item.title && item.title.indexOf('每月打卡奖励1') != -1) {
buttonUrl = item.buttonUrl + '?source=3'; buttonUrl = item.buttonUrl + '?source=3'
} }
if (item.title && item.title.indexOf('每月打卡奖励2') != -1) { if (item.title && item.title.indexOf('每月打卡奖励2') != -1) {
// let res = await taskReceive({ // let res = await taskReceive({
// id: item.id // id: item.id
// }) // })
@@ -401,50 +398,47 @@ async function goNav(item) {
// }) // })
// } // }
buttonUrl = `${item.buttonUrl}?standard=${item.discNumber == null ? true : false}&taskId=${item.id}`; buttonUrl =
`${item.buttonUrl}?standard=${item.discNumber == null ? true : false}&taskId=${item.id}`
} }
uni.navigateTo({ uni.navigateTo({
url: buttonUrl url: buttonUrl
}); })
} else if (item.jumpType == 3) { } else if (item.jumpType == 3) {
uni.switchTab({ uni.switchTab({
url: item.buttonUrl url: item.buttonUrl
}); })
} }
} }
}
// 获得签到 // 获得签到
async function getsignIn() { async function getsignIn() {
try { let res = await getUserSignData()
let res = await getUserSignData(); datas.signInList = res.recordList
datas.signInList = res.recordList; datas.signDays = res.signDays
datas.signDays = res.signDays;
} catch (error) {
if (error.code == 702) {
disableShow.value = true;
} else {
disableShow.value = false;
}
}
} }
// 获取任务列表 // 获取任务列表
async function getTaskdata() { async function getTaskdata() {
let res = await selectTaskCenter(); let res = await selectTaskCenter()
let arrData = []; let arrData = []
if (!$common.isIosExamine) { if (!$common.isIosExamine) {
res.forEach((ele) => { res.forEach(ele => {
if (ele.title.indexOf('分享奖励') == -1 && ele.title.indexOf('新人福利') == -1 && ele.title.indexOf('观看视频奖励') == -1) { if (ele.title.indexOf('分享奖励') == -1 && ele.title.indexOf('新人福利') == -1 &&
arrData.push(ele); ele.title.indexOf('观看视频奖励') == -1) {
arrData.push(ele)
} }
}); })
datas.list = arrData; datas.list = arrData
} else { } else {
// res.forEach(ele => { // res.forEach(ele => {
// if (ele.title.indexOf('观看视频奖励') == -1) { // if (ele.title.indexOf('观看视频奖励') == -1) {
// arrData.push(ele) // arrData.push(ele)
// } // }
// }) // })
datas.list = res; datas.list = res
} }
} }
</script> </script>
@@ -453,7 +447,6 @@ async function getTaskdata() {
page{ page{
// min-height: 100vh; // min-height: 100vh;
} }
.container{ .container{
/* #ifdef H5 */ /* #ifdef H5 */
min-height: calc(100vh - 96rpx); min-height: calc(100vh - 96rpx);
@@ -461,10 +454,9 @@ page {
/* #ifndef H5 */ /* #ifndef H5 */
min-height: 100vh; min-height: 100vh;
/* #endif */ /* #endif */
background-color: #f3f4f8; background-color: #F3F4F8;
padding-top: 2rpx; padding-top: 2rpx;
} }
.u-absolute { .u-absolute {
position: absolute; position: absolute;
} }
@@ -519,7 +511,7 @@ page {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
z-index: 1; z-index: 1
} }
>view { >view {
@@ -529,7 +521,7 @@ page {
width: 98%; width: 98%;
.num { .num {
color: #ec6f48; color: #EC6F48;
margin: 0 10rpx; margin: 0 10rpx;
} }
} }
@@ -549,7 +541,7 @@ page {
margin-top: 20rpx; margin-top: 20rpx;
width: 100%; width: 100%;
height: 94rpx; height: 94rpx;
background: linear-gradient(180deg, #fff7e3 0%, #ffffff 100%); background: linear-gradient(180deg, #FFF7E3 0%, #FFFFFF 100%);
border-radius: 14rpx 14rpx 0rpx 0rpx; border-radius: 14rpx 14rpx 0rpx 0rpx;
} }
@@ -562,6 +554,7 @@ page {
} }
} }
} }
} }
.content { .content {
@@ -576,10 +569,9 @@ page {
border-radius: 16rpx; border-radius: 16rpx;
padding: 28rpx; padding: 28rpx;
margin-bottom: 32rpx; margin-bottom: 32rpx;
.cell { .cell {
padding: 32rpx 0; padding: 32rpx 0;
border-bottom: 2rpx solid #ebebeb; border-bottom: 2rpx solid #EBEBEB;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@@ -607,7 +599,7 @@ page {
.tip { .tip {
margin-left: 22rpx; margin-left: 22rpx;
color: #fc5b67; color: #FC5B67;
font-size: 24rpx; font-size: 24rpx;
} }
} }
@@ -629,15 +621,15 @@ page {
height: 56rpx; height: 56rpx;
line-height: 56rpx; line-height: 56rpx;
text-align: center; text-align: center;
background-color: #ec6f48; background-color: #EC6F48;
color: #ffffff; color: #FFFFFF;
border-radius: 12rpx 12rpx 12rpx 12rpx; border-radius: 12rpx 12rpx 12rpx 12rpx;
font-size: 24rpx; font-size: 24rpx;
font-weight: bold; font-weight: bold;
} }
.tip { .tip {
color: #ec6f48; color: #EC6F48;
height: 44rpx; height: 44rpx;
line-height: 44rpx; line-height: 44rpx;
margin-top: 5rpx; margin-top: 5rpx;
@@ -645,15 +637,16 @@ page {
} }
.opt { .opt {
color: #d39b7e; color: #D39B7E;
background-color: #fbf3eb; background-color: #FBF3EB;
} }
.disabled { .disabled {
color: #999999; color: #999999;
background-color: #e2e2e2; background-color: #E2E2E2;
} }
} }
} }
.cell:last-child { .cell:last-child {

View File

@@ -40,25 +40,20 @@
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) {
getDetail() const res = await Api.getVideoDetail(options)
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)
@@ -69,7 +64,7 @@
phone: '18681817128' phone: '18681817128'
}) })
uni.setStorageSync('tokenTwo', res.token) uni.setStorageSync('tokenTwo', res.token)
getDetail() init()
} }
@@ -113,22 +108,19 @@
}) {} }) {}
onShow(async () => { onShow(async () => {
console.log(isFirstLoad)
if (!isFirstLoad) { if (!isFirstLoad) {
await getDetail() await init()
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.courseDetailsId == nobuyCourseId) const item = state.list.find(v => v.courseId == 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/index/prizeDraw/kevy-luckydraw' url: '/pages/me/prizeDraw'
}) })
} }
} }

View File

@@ -1,97 +1,71 @@
<template> <template>
<view class="min-page " > <view class="min-page " >
<!-- <up-button @click="toDetail">toDetail</up-button> --> <!-- <up-button @click="toDetail">toDetail</up-button> -->
<my-video-list <my-video-list isCommand isTabbar v-if="state.list.length" @swiperChange="swiperChange" :list="state.list" @update="update"
isCommand
isTabbar
v-if="state.list.length"
@swiperChange="swiperChange"
:list="state.list"
@update="update"
:info="state" :info="state"
@errorHandle="errorHandle"
></my-video-list> ></my-video-list>
</view>
<view class="mask" v-if="maskShow">
<view class="content">
<view class="title">
<text class="t">风险提示</text>
</view>
<view class="text">
<text>您的账号暂不可用,详情请联系客服</text>
</view>
<div class="btn-wrap">
<text class="btn" @click="toContact">去联系客服</text>
</div>
</view>
</view> </view>
</template> </template>
<script setup> <script setup>
import { onLoad, onShow } from '@dcloudio/uni-app'; import {
import * as Api from '@/api/video/index.js'; onLoad,
import { computed, reactive, ref } from 'vue'; onShow
import { slice } from 'lodash'; } from '@dcloudio/uni-app'
import * as Api from '@/api/video/index.js'
import {
computed,
reactive,
ref
} from 'vue'
import {
slice
} from 'lodash'
const maskShow = ref(false);
function toContact() {
uni.navigateTo({
url: '/pages/me/contact'
});
}
function toDetail() { function toDetail() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/video/detail?courseId=1208' url: '/pages/video/detail?courseId=1208'
}); })
} }
let options = {}; let options = {}
const state = reactive({ const state = reactive({
collect: 0, collect: 0,
current: {}, current: {},
list: [], list: [],
price: 0, price: 0,
title: '' title: ''
}); })
// 接收错误信息
const errorHandle = (error) => {
console.log('errorHandle.60===', error);
if (error.code == 702) {
maskShow.value = true;
} else {
maskShow.value = false;
}
};
async function init() { async function init() {
try { const res = await Api.tuijianVideo(options)
const res = await Api.tuijianVideo(options); state.current = res.list[0]
state.current = res.list[0]; Object.assign(state, res)
Object.assign(state, res); state.list = res.list
state.list = res.list;
} catch (error) {
console.log(error);
if (error.code == 702) {
maskShow.value = true;
} else {
maskShow.value = false;
}
}
} }
function update({ index, item }) { function update({
state.list[index] = item; index,
item
}) {
state.list[index] = item
} }
onLoad((opt) => { onLoad((opt) => {
Object.assign(options, opt); Object.assign(options, opt)
init(); init()
}); })
function swiperChange({ current, direction, data }) {} function swiperChange({
current,
direction,
data
}) {}
onShow(() => {}); onShow(() => {
})
</script> </script>
<style> <style>
@@ -116,53 +90,4 @@ page {
.u-popup { .u-popup {
position: fixed; position: fixed;
} }
.mask {
width: 750upx;
height: 1700upx;
background-color: rgba(0, 0, 0, 0.6);
position: fixed;
top: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
z-index: 99999;
.content {
width: 680upx;
height: 420upx;
background-color: #fff;
border-radius: 20upx;
.title {
display: flex;
align-items: center;
justify-content: center;
height: 100upx;
.t {
font-size: 32upx;
font-weight: bold;
}
}
.text {
padding: 50upx 28upx;
display: flex;
align-items: center;
}
.btn-wrap {
display: flex;
padding: 50upx 28upx 28upx;
.btn {
flex: 1;
height: 80upx;
display: flex;
align-items: center;
justify-content: center;
background-color: #dd8591;
color: #fff;
border-radius: 12upx;
text-align: center;
line-height: 80upx;
}
}
}
}
</style> </style>

View File

@@ -1 +0,0 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1745978289560" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7345" xmlns:xlink="http://www.w3.org/1999/xlink" width="256" height="256"><path d="M510.864642 313.983087c-62.33879 0-112.889093 50.54928-112.889093 112.887047 0 62.340837 50.54928 112.89114 112.889093 112.89114 62.339814 0 112.890117-50.550303 112.890117-112.89114C623.755782 364.532367 573.204455 313.983087 510.864642 313.983087z" fill="#FF723B" p-id="7346"></path><path d="M511.999488 64.021106c-247.27171 0-447.724091 200.452381-447.724091 447.724091s200.452381 447.724091 447.724091 447.724091 447.724091-200.453405 447.724091-447.724091S759.271198 64.021106 511.999488 64.021106zM510.864642 798.860357c0 0-217.552851-168.727843-217.552851-379.73972 0-113.02724 97.376795-196.535165 217.552851-196.535165 120.175033 0 217.553874 83.507926 217.553874 196.535165C728.418516 630.132514 510.864642 798.860357 510.864642 798.860357z" fill="#FF723B" p-id="7347"></path></svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -1,45 +0,0 @@
import {
$bindWx,
$bindStatus
} from '@/api/login/login.js'
// 绑定状态
export async function bindStatus() {
const res = await $bindStatus()
return res.wxBind ? true : false;
}
export function toBindWx() {
uni.navigateTo({
url: '/pages/login/bindWx'
})
}
//绑定微信
export async function bindWx() {
console.log('bindWx');
const isBind = await bindStatus()
if (isBind) {
uni.showToast({
title: '已绑定微信,请勿重复绑定',
icon: 'none'
})
return
}
return new Promise((reslove, reject) => {
uni.login({
"provider": "weixin",
"onlyAuthorize": true, // 微信登录仅请求授权认证
success: function(loginRes) {
console.log(loginRes);
reslove(loginRes.code)
},
fail: function(err) {
// 登录授权失败
// err.code是错误码
console.log(err);
reject()
}
});
})
}