新增禁用弹窗

This commit is contained in:
gyq
2025-05-24 18:16:56 +08:00
parent 64f8618802
commit 85d0f092c0
10 changed files with 1615 additions and 1484 deletions

View File

@@ -2,7 +2,7 @@
"version" : "1.0", "version" : "1.0",
"configurations" : [ "configurations" : [
{ {
"playground" : "custom", "playground" : "standard",
"type" : "uni-app:app-android" "type" : "uni-app:app-android"
}, },
{ {

View File

@@ -1,5 +1,5 @@
//打包时修改env的值即可 //打包时修改env的值即可
const env = 'production' //test , production,local const env = 'test' //test,production,local
export const encryptKey = '1234567890123456' // http数据加解密的key export const encryptKey = '1234567890123456' // http数据加解密的key
@@ -7,7 +7,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.41:8100' local: 'http://192.168.1.21:8100'
} }
export const AppConfig = { export const AppConfig = {

View File

@@ -0,0 +1,69 @@
<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>

View File

@@ -61,6 +61,7 @@ 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函数
@@ -82,6 +83,9 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
isShowErrorToast = true; isShowErrorToast = true;
return Promise.reject(bodyData); // 跳转到catch函数 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;
@@ -100,7 +104,7 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
//未绑定微信 //未绑定微信
if (bodyData.code == 407) { if (bodyData.code == 407) {
return Promise.resolve(result); return Promise.resolve(result);
} }

View File

@@ -1,156 +1,156 @@
{ {
"name" : "斯耀短剧", "name": "斯耀短剧",
"appid" : "__UNI__E0B05B1", "appid": "__UNI__E0B05B1",
"description" : "", "description": "",
"versionName" : "1.3.0", "versionName": "1.3.0",
"versionCode" : 130, "versionCode": 130,
"transformPx" : false, "transformPx": false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus": {
"app" : { "app": {
"name" : "斯耀短剧1", "name": "斯耀短剧1",
"pkgName" : "com.hnsiyao.duanju" // 安卓包名 "pkgName": "com.hnsiyao.duanju" // 安卓包名
}, },
"ios" : { "ios": {
"name" : "顺享短剧2", "name": "顺享短剧2",
"app-category" : "public.app-category.utilities", "app-category": "public.app-category.utilities",
"bundleID" : "com.hnsiyao.duanju" // iOS bundle ID "bundleID": "com.hnsiyao.duanju" // iOS bundle ID
}, },
"usingComponents" : true, "usingComponents": true,
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler": "uni-app",
"compilerVersion" : 3, "compilerVersion": 3,
"splashscreen" : { "splashscreen": {
"alwaysShowBeforeRender" : true, "alwaysShowBeforeRender": true,
"waiting" : true, "waiting": true,
"autoclose" : true, "autoclose": true,
"delay" : 0 "delay": 0
}, },
/* */ /* */
"modules" : { "modules": {
"Camera" : {}, "Camera": {},
"Push" : {}, "Push": {},
"VideoPlayer" : {}, "VideoPlayer": {},
"Canvas" : "nvue canvas", //使用Canvas模块 "Canvas": "nvue canvas", //使用Canvas模块
"OAuth" : {} "OAuth": {}
}, },
/* */ /* */
"distribute" : { "distribute": {
/* android */ /* android */
"android" : { "android": {
"permissions" : [ "permissions": [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>", "<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
], ],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ], "abiFilters": ["armeabi-v7a", "arm64-v8a", "x86"],
"schemes" : "com.hnsiyao.duanju", "schemes": "com.hnsiyao.duanju",
"minSdkVersion" : 28, "minSdkVersion": 28,
"targetSdkVersion" : 33 "targetSdkVersion": 33
}, },
/* ios */ /* ios */
"ios" : { "ios": {
"privacyDescription" : { "privacyDescription": {
"NSPhotoLibraryUsageDescription" : "获取您的相册读取权限,目的是为了在我的资料页面使用相册读取功能,修改上传头像", "NSPhotoLibraryUsageDescription": "获取您的相册读取权限,目的是为了在我的资料页面使用相册读取功能,修改上传头像",
"NSCameraUsageDescription" : "获取您的摄像头权限,目的是为了在我的资料页面使用摄像头功能,修改上传头像" "NSCameraUsageDescription": "获取您的摄像头权限,目的是为了在我的资料页面使用摄像头功能,修改上传头像"
}, },
"urltypes" : "com.hnsiyao.duanju", "urltypes": "com.hnsiyao.duanju",
"dSYMs" : false "dSYMs": false
}, },
/* SDK */ /* SDK */
"sdkConfigs" : { "sdkConfigs": {
"push" : { "push": {
"unipush" : {} "unipush": {}
}, },
"ad" : { "ad": {
"ks" : {} "ks": {}
}, },
"oauth" : { "oauth": {
"weixin" : { "weixin": {
"appid" : "wx5001ff1af6c4781f", "appid": "wx5001ff1af6c4781f",
"UniversalLinks" : "" "UniversalLinks": ""
} }
} }
}, },
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ], "abiFilters": ["armeabi-v7a", "arm64-v8a", "x86"],
"minSdkVersion" : 28, "minSdkVersion": 28,
"targetSdkVersion" : 33, "targetSdkVersion": 33,
"schemes" : "com.hnsiyao.duanju", "schemes": "com.hnsiyao.duanju",
"icons" : { "icons": {
"android" : { "android": {
"hdpi" : "unpackage/res/icons/72x72.png", "hdpi": "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png", "xhdpi": "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png", "xxhdpi": "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png" "xxxhdpi": "unpackage/res/icons/192x192.png"
}, },
"ios" : { "ios": {
"appstore" : "unpackage/res/icons/1024x1024.png", "appstore": "unpackage/res/icons/1024x1024.png",
"ipad" : { "ipad": {
"app" : "unpackage/res/icons/76x76.png", "app": "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png", "app@2x": "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png", "notification": "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png", "notification@2x": "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png", "proapp@2x": "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png", "settings": "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png", "settings@2x": "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png", "spotlight": "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png" "spotlight@2x": "unpackage/res/icons/80x80.png"
}, },
"iphone" : { "iphone": {
"app@2x" : "unpackage/res/icons/120x120.png", "app@2x": "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png", "app@3x": "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png", "notification@2x": "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png", "notification@3x": "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png", "settings@2x": "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png", "settings@3x": "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png", "spotlight@2x": "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png" "spotlight@3x": "unpackage/res/icons/120x120.png"
} }
} }
} }
} }
}, },
/* */ /* */
"quickapp" : {}, "quickapp": {},
/* */ /* */
"mp-weixin" : { "mp-weixin": {
"appid" : "", "appid": "",
"setting" : { "setting": {
"urlCheck" : false "urlCheck": false
}, },
"usingComponents" : true, "usingComponents": true,
"mergeVirtualHostAttributes" : true "mergeVirtualHostAttributes": true
}, },
"mp-alipay" : { "mp-alipay": {
"usingComponents" : true "usingComponents": true
}, },
"mp-baidu" : { "mp-baidu": {
"usingComponents" : true "usingComponents": true
}, },
"mp-toutiao" : { "mp-toutiao": {
"usingComponents" : true, "usingComponents": true,
"mergeVirtualHostAttributes" : true "mergeVirtualHostAttributes": true
}, },
"uniStatistics" : { "uniStatistics": {
"enable" : false "enable": false
}, },
"vueVersion" : "3", "vueVersion": "3",
"h5" : { "h5": {
"title" : "斯耀短剧", "title": "斯耀短剧",
"template" : "template.html", "template": "template.html",
"router" : { "router": {
"mode" : "history" "mode": "history"
} }
} }
} }

View File

@@ -52,14 +52,17 @@
<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 } from 'vue'; import { reactive, ref } 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 {
@@ -69,6 +72,11 @@ 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,7 +1,6 @@
<template> <template>
<view class="indexStyle"> <view class="indexStyle">
<image src="@/static/index/indexbh.png" mode=""> <image src="@/static/index/indexbh.png" mode=""></image>
</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">
@@ -12,54 +11,62 @@
<template v-if="datas.isExamine"> <template v-if="datas.isExamine">
<view class="gongao"> <view class="gongao">
<view class="gongaoicon"> <view class="gongaoicon">公告</view>
公告 <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; font-size: 14px">{{ 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 :class="datas.active == 1 ? 'navTop-active' : ''" @tap="getrecomVideo('', 1)">最新</view>
最新 <view :class="datas.active == 2 ? 'navTop-active' : ''" @tap="getrecomVideo('1', 2)">排行</view>
</view> <view :class="datas.active == 3 ? 'navTop-active' : ''" @tap="getrecomVideo('2', 3)">最热</view>
<view :class="datas.active == 2 ? 'navTop-active' : ''" @tap="getrecomVideo('1', 2)"> <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 :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> <contentlist :list="datas.list"></contentlist>
<image v-if="datas.isExamine" @click="goMsg()" src="@/static/index/red-pack-new.gif" <image
style="width: 200rpx;height: 200rpx;position: fixed;right: 10rpx;bottom: 180rpx;" mode=""></image> v-if="datas.isExamine"
<up-modal :show="datas.version.show" :confirm-text="datas.version.confirmText" @click="goMsg()"
:showCancelButton="datas.version.cancelText!=''" @cancel="cancelUpdateVersion" @confirm='confirmUpdateVersion' src="@/static/index/red-pack-new.gif"
:title="datas.version.title" :title-style="{ fontWeight: '700' }" confirm-color="rgb(255, 117, 129)"> style="width: 200rpx; height: 200rpx; position: fixed; right: 10rpx; bottom: 180rpx"
<view class="" style="padding-top: 30rpx;text-align: left;"> mode=""
<scroll-view scroll-y="true" style="max-height: 50vh;"> ></image>
<up-modal
:show="datas.version.show"
:confirm-text="datas.version.confirmText"
:showCancelButton="datas.version.cancelText != ''"
@cancel="cancelUpdateVersion"
@confirm="confirmUpdateVersion"
:title="datas.version.title"
:title-style="{ fontWeight: '700' }"
confirm-color="rgb(255, 117, 129)"
>
<view class="" style="padding-top: 30rpx; text-align: left">
<scroll-view scroll-y="true" style="max-height: 50vh">
<!-- <rich-text style="color:#666" :nodes="datas.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 :show="datas.stopShow" cancel-text="知道了" show-cancel-button confirm-text="去下载" title="重要通知" <up-modal
@cancel="stopCancel" :title="datas.rule_title" :title-style="{fontWeight:'700'}" @confirm="stopConfirm" :show="datas.stopShow"
confirm-color="rgb(255, 117, 129)"> cancel-text="知道了"
show-cancel-button
confirm-text="去下载"
title="重要通知"
@cancel="stopCancel"
:title="datas.rule_title"
:title-style="{ fontWeight: '700' }"
@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>
@@ -67,373 +74,365 @@
<!-- #endif --> <!-- #endif -->
<!-- 公告弹窗 --> <!-- 公告弹窗 -->
<up-modal :show="datas.stopShows&&datas.isExamine" :showConfirmButton="true" title="公告" @confirm="confirmEvent "> <up-modal :show="datas.stopShows && datas.isExamine" :showConfirmButton="true" title="公告" @confirm="confirmEvent">
<view class="color-red u-text-left"> <view class="color-red u-text-left">
<view style="text-align: justify;font-size: 18px;color: #666;" <view style="text-align: justify; font-size: 18px; color: #666" v-html="datas.noticeList[datas.cloneNum].title"></view>
v-html="datas.noticeList[datas.cloneNum].title"></view>
</view> </view>
</up-modal> </up-modal>
<!-- #ifdef APP --> <!-- #ifdef APP -->
<!-- #endif --> <!-- #endif -->
<disable-mask v-if="disableMaskVisable"></disable-mask>
</template> </template>
<script setup> <script setup>
import { import { reactive, nextTick, ref } from 'vue';
reactive, import { announcement, messageselectMessage, courseselectCourse } from '@/api/index/index.js';
nextTick import { onLoad, onReady, onReachBottom, onShow } from '@dcloudio/uni-app';
} from 'vue'; import contentlist from './components/contentlist.vue';
import { import { selectNewApp } from '@/api/user/user.js';
announcement, import config from '@/commons/config.js';
messageselectMessage, import { linkTo } from '@/utils/app.js';
courseselectCourse import { useCommonStore } from '@/store/common.js';
} from '@/api/index/index.js' const $common = useCommonStore();
import { onShow(() => {
onLoad, // console.log('cash:' + uni.getStorageSync('userInfo').userId + "" + new Date().getTime(), 'debug')
onReady, // 判断ios是否审核
onReachBottom, $common.init();
onShow // #ifdef H5
} from '@dcloudio/uni-app' datas.isExamine = $common.isIosExamine;
import contentlist from './components/contentlist.vue' // #endif
import { // let sysInfo = uni.getSystemInfoSync()
selectNewApp // let isIos = sysInfo.platform == 'ios'
} from '@/api/user/user.js'; // if (isIos) {
import config from '@/commons/config.js'; // datas.setindexdata = $common.setversion
import { // console.log(datas.setindexdata,'seaeasdas')
linkTo // }
} from '@/utils/app.js'; });
import {
useCommonStore
} from '@/store/common.js'
const $common = useCommonStore()
onShow(() => {
// console.log('cash:' + uni.getStorageSync('userInfo').userId + "" + new Date().getTime(), 'debug')
// 判断ios是否审核
$common.init()
// #ifdef H5
datas.isExamine = $common.isIosExamine
// #endif
// let sysInfo = uni.getSystemInfoSync()
// let isIos = sysInfo.platform == 'ios'
// if (isIos) {
// datas.setindexdata = $common.setversion
// console.log(datas.setindexdata,'seaeasdas')
// }
})
let datas = reactive({
noticeList: [], //公告列表
active: 1, // 最新、最热。。。切换顶部导航栏 const disableMaskVisable = ref(false);
list: [], // 底部短剧内容 let datas = reactive({
page: 1, // 首页推荐分页 noticeList: [], //公告列表
stopShow: true, //h5关闭弹窗
ruleShow: false, active: 1, // 最新、最热。。。切换顶部导航栏
rule_title: '', // 首页弹窗标题
rule_content: '', // 首页弹窗内容 list: [], // 底部短剧内容
ruleIndex: 0, page: 1, // 首页推荐分页
ruleList: [], stopShow: true, //h5关闭弹窗
stopShows: false, ruleShow: false,
version: { rule_title: '', // 首页弹窗标题
show: false, rule_content: '', // 首页弹窗内容
title: "", ruleIndex: 0,
content: "", ruleList: [],
confirmText: "", stopShows: false,
cancelText: "", version: {
downloadLink: "" show: false,
}, title: '',
setindexdata: false, content: '',
cloneNum: 0 confirmText: '',
}) cancelText: '',
onLoad(() => { downloadLink: ''
versionUpdate() },
getMsg() setindexdata: false,
getrecomVideo() cloneNum: 0
}) });
onReady(() => { onLoad(() => {
if (!uni.getStorageSync('ruleShow')) { versionUpdate();
announcement({ getMsg();
type: 0 getrecomVideo();
}).then(res => { });
onReady(() => {
if (!uni.getStorageSync('ruleShow')) {
announcement({
type: 0
})
.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() { onReachBottom(() => {
datas.stopShows = false ++datas.page;
if (datas.cloneNum < datas.noticeList.length - 1) { getrecomVideo();
++datas.cloneNum });
// 公告
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]); uni.setStorageSync('ids', [...uni.getStorageSync('ids'), datas.noticeList[datas.cloneNum].id]);
datas.stopShows = true
} }
datas.stopShows = true;
} }
}
function stopConfirm() { function confirmEvent() {
datas.stopShow = false datas.stopShows = false;
uni.navigateTo({ if (datas.cloneNum < datas.noticeList.length - 1) {
url: '/pages/login/download' ++datas.cloneNum;
}) uni.setStorageSync('ids', [...uni.getStorageSync('ids'), datas.noticeList[datas.cloneNum].id]);
datas.stopShows = true;
} }
}
function stopCancel() { function stopConfirm() {
datas.stopShow = false datas.stopShow = false;
} uni.navigateTo({
url: '/pages/login/download'
});
}
function versionUpdate() { function stopCancel() {
//#ifdef APP-PLUS datas.stopShow = false;
plus.screen.lockOrientation('portrait-primary'); //竖屏正方向锁定 }
//获取当前系统版本信息
plus.runtime.getProperty(plus.runtime.appid, widgetInfo => {
//请求后台接口 解析数据 对比版本
selectNewApp().then(async res => {
res = res[0];
console.log(uni.getSystemInfoSync().platform == 'ios', 1101)
let version;
if (uni.getSystemInfoSync().platform == 'android') {
version = res.version
}
if (uni.getSystemInfoSync().platform == 'ios') {
version = res.iosVersion
}
let isVersion = await $common.setversion(widgetInfo.version, version)
datas.isExamine = $common.isIosExamine
console.log(isVersion, '')
if (isVersion == 1) {
datas.version.downloadLink = res.androidWgtUrl;
datas.version.show = true;
datas.version.title = "发现新版本";
datas.version.content = res.des;
uni.hideTabBar()
if (res.method == "true") {
datas.version.confirmText = "立即更新"
} else {
datas.version.confirmText = "立即更新"
datas.version.cancelText = "下次更新"
} function versionUpdate() {
//#ifdef APP-PLUS
plus.screen.lockOrientation('portrait-primary'); //竖屏正方向锁定
//获取当前系统版本信息
plus.runtime.getProperty(plus.runtime.appid, (widgetInfo) => {
//请求后台接口 解析数据 对比版本
selectNewApp().then(async (res) => {
res = res[0];
console.log(uni.getSystemInfoSync().platform == 'ios', 1101);
let version;
if (uni.getSystemInfoSync().platform == 'android') {
version = res.version;
}
if (uni.getSystemInfoSync().platform == 'ios') {
version = res.iosVersion;
}
let isVersion = await $common.setversion(widgetInfo.version, version);
datas.isExamine = $common.isIosExamine;
console.log(isVersion, '');
if (isVersion == 1) {
datas.version.downloadLink = res.androidWgtUrl;
datas.version.show = true;
datas.version.title = '发现新版本';
datas.version.content = res.des;
uni.hideTabBar();
if (res.method == 'true') {
datas.version.confirmText = '立即更新';
} else {
datas.version.confirmText = '立即更新';
datas.version.cancelText = '下次更新';
} }
}); }
}); });
//#endif });
} //#endif
}
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
}); });
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 => { },
console.log('install success...'); (d) => {
plus.runtime console.log('install success...');
.restart(); plus.runtime.restart();
}, },
e => { (e) => {
console.log(e) console.log(e);
console.error('install fail...'); console.error('install fail...');
} }
); );
}
} }
}); }
}
if (uni.getSystemInfoSync().platform == 'ios') {
plus.runtime.openURL(datas.version.downloadLink, function(res) {});
}
}
function ruleInit() {
datas.rule_title = datas.ruleList[datas.ruleIndex].title
datas.rule_content = datas.ruleList[datas.ruleIndex].content
}
/**
* 规则确认
*/
function ruleConfirm() {
datas.ruleShow = false
datas.ruleIndex++
if (datas.ruleIndex >= datas.ruleList.length) {
datas.ruleIndex = 0
uni.setStorageSync('ruleShow', true)
return
}
setTimeout(res => {
ruleInit()
datas.ruleShow = true
}, 300)
}
// 跳转公告链接
function goMsg(url) {
uni.navigateTo({
url: '/pages/index/prizeDraw/kevy-luckydraw'
}); });
} }
if (uni.getSystemInfoSync().platform == 'ios') {
// 搜索跳转 plus.runtime.openURL(datas.version.downloadLink, function (res) {});
function moreVideo() {
uni.navigateTo({
url: '/pages/index/search/index'
});
} }
}
function ruleInit() {
datas.rule_title = datas.ruleList[datas.ruleIndex].title;
datas.rule_content = datas.ruleList[datas.ruleIndex].content;
}
/**
* 规则确认
*/
function ruleConfirm() {
datas.ruleShow = false;
datas.ruleIndex++;
if (datas.ruleIndex >= datas.ruleList.length) {
datas.ruleIndex = 0;
uni.setStorageSync('ruleShow', true);
return;
}
setTimeout((res) => {
ruleInit();
datas.ruleShow = true;
}, 300);
}
//获取推荐视频 // 跳转公告链接
async function getrecomVideo(sort, active = 1) { function goMsg(url) {
datas.active = active uni.navigateTo({
url: '/pages/index/prizeDraw/kevy-luckydraw'
});
}
// 搜索跳转
function moreVideo() {
uni.navigateTo({
url: '/pages/index/search/index'
});
}
//获取推荐视频
async function getrecomVideo(sort, active = 1) {
try {
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: 350rpx;
position: relative; position: relative;
>image {
width: 100%;
height: 100%;
position: absolute;
}
.indexStyleTwo {
display: flex;
align-items: center;
justify-content: space-between;
padding: 88rpx 25rpx;
>image {
width: 187rpx;
height: 50rpx;
}
>view {
z-index: 50;
width: 236rpx;
line-height: 43rpx;
background: rgba(255, 255, 255, 0.29);
border-radius: 7rpx 7rpx 7rpx 7rpx;
font-weight: 400;
font-size: 21rpx;
color: rgba(255, 255, 255, 0.85);
display: flex;
align-items: center;
}
}
.gongao {
position: absolute;
bottom: 85rpx;
left: 70rpx;
border-radius: 12rpx 12rpx 12rpx 12rpx;
width: 611rpx;
height: 60rpx;
background-color: rgba(255, 255, 255, .65);
display: flex;
align-items: center;
padding: 12rpx;
box-sizing: border-box;
.gongaoicon {
color: #ffffff;
width: 98rpx;
height: 40rpx;
line-height: 40rpx;
text-align: center;
font-size: 20rpx;
background-image: url('../../static/index/gonggaobg.png');
background-size: 98rpx 50rpx;
}
.swiperstyle {
height: 78rpx;
width: 80%;
}
}
> image {
width: 100%;
height: 100%;
position: absolute;
} }
.navTop-active { .indexStyleTwo {
color: #cb5d68;
}
.navTop {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 0 20rpx; padding: 88rpx 25rpx;
>view { > image {
background-color: #f0f0f0; width: 187rpx;
margin-left: 20rpx; height: 50rpx;
padding: 6rpx 20rpx }
> view {
z-index: 50;
width: 236rpx;
line-height: 43rpx;
background: rgba(255, 255, 255, 0.29);
border-radius: 7rpx 7rpx 7rpx 7rpx;
font-weight: 400;
font-size: 21rpx;
color: rgba(255, 255, 255, 0.85);
display: flex;
align-items: center;
} }
} }
</style>
.gongao {
position: absolute;
bottom: 85rpx;
left: 70rpx;
border-radius: 12rpx 12rpx 12rpx 12rpx;
width: 611rpx;
height: 60rpx;
background-color: rgba(255, 255, 255, 0.65);
display: flex;
align-items: center;
padding: 12rpx;
box-sizing: border-box;
.gongaoicon {
color: #ffffff;
width: 98rpx;
height: 40rpx;
line-height: 40rpx;
text-align: center;
font-size: 20rpx;
background-image: url('../../static/index/gonggaobg.png');
background-size: 98rpx 50rpx;
}
.swiperstyle {
height: 78rpx;
width: 80%;
}
}
}
.navTop-active {
color: #cb5d68;
}
.navTop {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20rpx;
> view {
background-color: #f0f0f0;
margin-left: 20rpx;
padding: 6rpx 20rpx;
}
}
</style>

View File

@@ -9,17 +9,13 @@
<image class="img" src="/static/logo.png" mode="widthFix"></image> <image class="img" src="/static/logo.png" mode="widthFix"></image>
</view> </view>
<view class="quick-menu"> <view class="quick-menu">
<image class="icon" src="/static/me/logo_btn1.png" mode="aspectFit" <image class="icon" src="/static/me/logo_btn1.png" mode="aspectFit" @click="linkTo('/pages/share/index', true)"></image>
@click="linkTo('/pages/share/index', true)"></image> <image class="icon" src="/static/me/logo_btn2.png" mode="aspectFit" @click="linkTo('/pages/me/message', true)"></image>
<image class="icon" src="/static/me/logo_btn2.png" mode="aspectFit" <image class="icon" src="/static/me/logo_btn3.png" mode="aspectFit" @click="linkTo('/pages/me/contact', true)"></image>
@click="linkTo('/pages/me/message', true)"></image>
<image class="icon" src="/static/me/logo_btn3.png" mode="aspectFit"
@click="linkTo('/pages/me/contact', true)"></image>
</view> </view>
</view> </view>
<view class="top" @click="linkTo(userInfo.phone?'/pages/me/userInfo':'/pages/login/login')"> <view class="top" @click="linkTo(userInfo.phone ? '/pages/me/userInfo' : '/pages/login/login')">
<image class="avatar" :src="userInfo.avatar || '/static/default_avatar.png'" mode="aspectFill"> <image class="avatar" :src="userInfo.avatar || '/static/default_avatar.png'" mode="aspectFill"></image>
</image>
<view class="info-wrap"> <view class="info-wrap">
<view class="name">{{ userInfo.phone || '请登录' }}</view> <view class="name">{{ userInfo.phone || '请登录' }}</view>
</view> </view>
@@ -33,7 +29,7 @@
<view class="title">我的追剧</view> <view class="title">我的追剧</view>
<view class="num">{{ likeData.collectCount }}</view> <view class="num">{{ likeData.collectCount }}</view>
</navigator> </navigator>
<view class="item" v-if="$common.isIosExamine" @click="linkTo('/pages/me/withdraw/index',true)"> <view class="item" v-if="$common.isIosExamine" @click="linkTo('/pages/me/withdraw/index', true)">
<view class="title">我的红包</view> <view class="title">我的红包</view>
<view class="num">{{ amount || 0 }}</view> <view class="num">{{ amount || 0 }}</view>
</view> </view>
@@ -48,7 +44,6 @@
<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">
@@ -58,8 +53,12 @@
</div> </div>
<view class="history-list"> <view class="history-list">
<view class="item" v-for="item in recordThree" :key="item.id" <view
@click="linkTo(`/pages/video/detail?courseId=${item.courseId}&courseDetailsId=${item.courseDetailsId}`)"> class="item"
v-for="item in recordThree"
:key="item.id"
@click="linkTo(`/pages/video/detail?courseId=${item.courseId}&courseDetailsId=${item.courseDetailsId}`)"
>
<image class="cover" :src="item.titleImg" mode="aspectFill"></image> <image class="cover" :src="item.titleImg" mode="aspectFill"></image>
<view class="name">{{ item.title }}</view> <view class="name">{{ item.title }}</view>
<view class="t">看到{{ item.courseDetailsName }}</view> <view class="t">看到{{ item.courseDetailsName }}</view>
@@ -105,7 +104,7 @@
<view class="name">绑定微信</view> <view class="name">绑定微信</view>
</view> </view>
<!-- #endif --> <!-- #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>
@@ -114,362 +113,354 @@
</view> </view>
</view> </view>
</view> </view>
<disable-mask v-if="disableShow"></disable-mask>
</template> </template>
<script setup> <script setup>
import { import { ref, reactive } from 'vue';
ref, import { onLoad, onShow, onPullDownRefresh } from '@dcloudio/uni-app';
reactive import { selectByUserId, collectVideoSummary, selectUserMoney } from '@/api/me/me.js';
} from 'vue'; import { linkTo } from '@/utils/app.js';
import { import { useCommonStore } from '@/store/common.js';
onLoad, import { toBindWx, bindStatus } from '@/utils/wx.js';
onShow,
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'
import {toBindWx,bindStatus} from '@/utils/wx.js'
const $common = useCommonStore()
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 disableShow = ref(false);
const recordThree = ref([]);
onShow(() => { const $common = useCommonStore();
// 判断ios是否审核 const userInfo = ref({});
$common.init()
}) let isBindWx = ref(false);
async function selectByUserIdAjax() { async function bindwx() {
try { if (isBindWx.value) {
const res = await selectByUserId({ uni.showToast({
page: 1, title: '已绑定微信,请勿重复绑定',
limit: 3, icon: 'none'
classify: 3 });
}); return;
recordThree.value = res.records; }
} catch (error) { isBindWx.value = await bindStatus();
console.log(error); console.log(isBindWx.value);
if (isBindWx.value) {
uni.showToast({
title: '已绑定微信,请勿重复绑定',
icon: 'none'
});
return;
} else {
toBindWx();
}
}
// 获取最近的三条观看历史
const recordThree = ref([]);
onShow(() => {
// 判断ios是否审核
$common.init();
});
async function selectByUserIdAjax() {
try {
const res = await selectByUserId({
page: 1,
limit: 3,
classify: 3
});
recordThree.value = res.records;
} catch (error) {
if (error.code == 702) {
disableShow.value = true;
} else {
disableShow.value = false;
} }
console.log(error);
} }
// 我的喜欢 我的追剧 }
const likeData = reactive({ // 我的喜欢 我的追剧
likeCount: 0, const likeData = reactive({
collectCount: 0 likeCount: 0,
}); collectCount: 0
async function collectVideoSummaryAjax() { });
try { async function collectVideoSummaryAjax() {
const res = await collectVideoSummary(); try {
likeData.likeCount = res.likeCount; const res = await collectVideoSummary();
likeData.collectCount = res.collectCount; likeData.likeCount = res.likeCount;
} catch (error) { likeData.collectCount = res.collectCount;
console.log(error); } catch (error) {
} console.log(error);
} }
}
// 金币 // 金币
const gold = ref(0); const gold = ref(0);
const amount = ref(0); const amount = ref(0);
async function selectUserMoneyAjax() { async function selectUserMoneyAjax() {
try { try {
const res = await selectUserMoney(); const res = await selectUserMoney();
gold.value = res.money; gold.value = res.money;
amount.value = res.amount; amount.value = res.amount;
} catch (error) { } catch (error) {
console.log(error); console.log(error);
}
} }
}
// 跳转任务中心 // 跳转任务中心
function toTask() { function toTask() {
linkTo('/pages/share/index'); linkTo('/pages/share/index');
} }
onPullDownRefresh(async () => {
await selectByUserIdAjax();
await collectVideoSummaryAjax();
await selectUserMoneyAjax();
userInfo.value = uni.getStorageSync('userInfo');
setTimeout(() => {
uni.stopPullDownRefresh();
}, 500);
});
onPullDownRefresh(async () => { onShow(() => {
await selectByUserIdAjax(); if (uni.getStorageSync('token')) {
await collectVideoSummaryAjax(); selectByUserIdAjax();
await selectUserMoneyAjax(); collectVideoSummaryAjax();
selectUserMoneyAjax();
userInfo.value = uni.getStorageSync('userInfo'); userInfo.value = uni.getStorageSync('userInfo');
setTimeout(() => { }
uni.stopPullDownRefresh(); });
}, 500);
});
onShow(() => {
if (uni.getStorageSync('token')) {
selectByUserIdAjax();
collectVideoSummaryAjax();
selectUserMoneyAjax();
userInfo.value = uni.getStorageSync('userInfo');
}
});
</script> </script>
<style> <style>
page { page {
background: #f5f7ff; background: #f5f7ff;
} }
</style> </style>
<style scoped lang="scss"> <style scoped lang="scss">
$bgColor: #f5f7ff; $bgColor: #f5f7ff;
.container { .container {
font-size: 28upx; font-size: 28upx;
color: #333; color: #333;
} }
.top-bg { .top-bg {
width: 100%; width: 100%;
height: 50%;
position: fixed;
top: 0;
left: 0;
background: linear-gradient(90deg, #ffe5ea 0, #e4f5fb 49%, #fff0ee);
&::after {
content: '';
height: 50%; height: 50%;
position: fixed; width: 100%;
top: 0; background: linear-gradient(to bottom, transparent, $bgColor);
position: absolute;
bottom: 0;
left: 0; left: 0;
background: linear-gradient(90deg, #ffe5ea 0, #e4f5fb 49%, #fff0ee);
&::after {
content: '';
height: 50%;
width: 100%;
background: linear-gradient(to bottom, transparent, $bgColor);
position: absolute;
bottom: 0;
left: 0;
}
} }
}
.content { .content {
padding: 28upx; padding: 28upx;
position: relative; position: relative;
.user-info { .user-info {
.logo-wrap { .logo-wrap {
display: flex;
align-items: center;
justify-content: space-between;
.logo {
width: 160upx;
.img {
width: 100%;
display: block;
}
}
.quick-menu {
display: flex;
gap: 20upx;
.icon {
$size: 60upx;
width: $size;
height: $size;
}
}
}
.top {
display: flex;
align-items: center;
padding-top: 40upx;
.avatar {
$size: 94upx;
width: $size;
height: $size;
border-radius: 50%;
margin-right: 12upx;
}
.info-wrap {
flex: 1;
display: flex;
flex-direction: column;
font-size: 32upx;
}
}
.btm {
display: flex;
padding: 40upx 0;
.item {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.title {
font-size: 28upx;
}
.num {
font-weight: bold;
display: flex;
justify-content: center;
}
}
}
}
}
.card-wrap {
background: #fff;
border-radius: 16upx;
overflow: hidden;
margin-bottom: 28upx;
.gold-wrap {
background: #f2b5b5;
display: flex; display: flex;
align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 20upx 28upx;
position: relative;
// &::after { .logo {
// $size: 40upx; width: 160upx;
// content: '';
// width: $size; .img {
// height: $size; width: 100%;
// border-radius: 8upx; display: block;
// transform: rotate(45deg); }
// position: absolute; }
// left: 50%;
// margin-left: $size * 0.5 * -1; .quick-menu {
// bottom: $size * 0.3 * -1;
// background: inherit;
// }
.left {
display: flex; display: flex;
align-items: center; gap: 20upx;
.icon { .icon {
$size: 52upx; $size: 60upx;
width: $size; width: $size;
height: $size; height: $size;
margin-right: 20upx; }
}
}
.top {
display: flex;
align-items: center;
padding-top: 40upx;
.avatar {
$size: 94upx;
width: $size;
height: $size;
border-radius: 50%;
margin-right: 12upx;
}
.info-wrap {
flex: 1;
display: flex;
flex-direction: column;
font-size: 32upx;
}
}
.btm {
display: flex;
padding: 40upx 0;
.item {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.title {
font-size: 28upx;
} }
.num { .num {
color: #fff; font-weight: bold;
font-size: 32upx; display: flex;
} justify-content: center;
}
.btn {
color: #977641;
background: linear-gradient(90deg, #fee7bc 0%, #fdcc89 100%);
width: 144upx;
height: 56upx;
border-radius: 56upx;
display: flex;
align-items: center;
justify-content: center;
font-size: 24upx;
}
}
.title-wrap {
padding: 28upx;
.a {
display: flex;
align-items: center;
justify-content: space-between;
.t {
font-size: 28upx;
}
}
}
.history-list {
padding: 0 28upx 28upx;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: 1fr;
grid-column-gap: 28upx;
grid-row-gap: 28upx;
.item {
.cover {
width: 100%;
height: 280upx;
border-radius: 20upx;
}
.name {
font-size: 28upx;
width: 160upx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.t {
color: #999;
font-size: 24upx;
}
}
}
.menu-list {
display: flex;
flex-wrap: wrap;
padding: 28upx 0 0;
.item {
flex: 0 0 25%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-bottom: 32upx;
.icon {
$size: 56upx;
width: $size;
height: $size;
}
.name {
font-size: 24upx;
margin-top: 8upx;
color: #333;
} }
} }
} }
} }
</style> }
.card-wrap {
background: #fff;
border-radius: 16upx;
overflow: hidden;
margin-bottom: 28upx;
.gold-wrap {
background: #f2b5b5;
display: flex;
justify-content: space-between;
padding: 20upx 28upx;
position: relative;
// &::after {
// $size: 40upx;
// content: '';
// width: $size;
// height: $size;
// border-radius: 8upx;
// transform: rotate(45deg);
// position: absolute;
// left: 50%;
// margin-left: $size * 0.5 * -1;
// bottom: $size * 0.3 * -1;
// background: inherit;
// }
.left {
display: flex;
align-items: center;
.icon {
$size: 52upx;
width: $size;
height: $size;
margin-right: 20upx;
}
.num {
color: #fff;
font-size: 32upx;
}
}
.btn {
color: #977641;
background: linear-gradient(90deg, #fee7bc 0%, #fdcc89 100%);
width: 144upx;
height: 56upx;
border-radius: 56upx;
display: flex;
align-items: center;
justify-content: center;
font-size: 24upx;
}
}
.title-wrap {
padding: 28upx;
.a {
display: flex;
align-items: center;
justify-content: space-between;
.t {
font-size: 28upx;
}
}
}
.history-list {
padding: 0 28upx 28upx;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: 1fr;
grid-column-gap: 28upx;
grid-row-gap: 28upx;
.item {
.cover {
width: 100%;
height: 280upx;
border-radius: 20upx;
}
.name {
font-size: 28upx;
width: 160upx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.t {
color: #999;
font-size: 24upx;
}
}
}
.menu-list {
display: flex;
flex-wrap: wrap;
padding: 28upx 0 0;
.item {
flex: 0 0 25%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-bottom: 32upx;
.icon {
$size: 56upx;
width: $size;
height: $size;
}
.name {
font-size: 24upx;
margin-top: 8upx;
color: #333;
}
}
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -1,93 +1,148 @@
<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 isCommand isTabbar v-if="state.list.length" @swiperChange="swiperChange" :list="state.list" @update="update" <my-video-list isCommand isTabbar v-if="state.list.length" @swiperChange="swiperChange" :list="state.list" @update="update" :info="state"></my-video-list>
:info="state" </view>
></my-video-list> <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 { import { onLoad, onShow } from '@dcloudio/uni-app';
onLoad, import * as Api from '@/api/video/index.js';
onShow import { computed, reactive, ref } from 'vue';
} from '@dcloudio/uni-app' import { slice } from 'lodash';
import * as Api from '@/api/video/index.js'
import {
computed,
reactive,
ref
} from 'vue'
import {
slice
} from 'lodash'
const maskShow = ref(false);
function toDetail() { function toContact() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/video/detail?courseId=1208' url: '/pages/me/contact'
}) });
} }
let options = {}
const state = reactive({ function toDetail() {
collect: 0, uni.navigateTo({
current: {}, url: '/pages/video/detail?courseId=1208'
list: [], });
price: 0, }
title: '' let options = {};
}) const state = reactive({
async function init() { collect: 0,
const res = await Api.tuijianVideo(options) current: {},
state.current = res.list[0] list: [],
Object.assign(state, res) price: 0,
state.list = res.list title: ''
});
async function init() {
try {
const res = await Api.tuijianVideo(options);
state.current = res.list[0];
Object.assign(state, res);
state.list = res.list;
} catch (error) {
console.log(error);
if (error.code == 702) {
maskShow.value = true;
} else {
maskShow.value = false;
}
} }
}
function update({ function update({ index, item }) {
index, state.list[index] = item;
item }
}) { onLoad((opt) => {
state.list[index] = item Object.assign(options, opt);
} init();
onLoad((opt) => { });
Object.assign(options, opt)
init()
})
function swiperChange({ function swiperChange({ current, direction, data }) {}
current,
direction,
data
}) {}
onShow(() => { onShow(() => {});
})
</script> </script>
<style> <style>
page{ page {
height: calc(100vh - 50px); height: calc(100vh - 50px);
overflow: hidden; overflow: hidden;
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.min-page { .min-page {
/* #ifdef H5 */ /* #ifdef H5 */
height: calc(100vh - 50px); height: calc(100vh - 50px);
/* #endif */ /* #endif */
/* #ifdef APP */ /* #ifdef APP */
height: 100vh; height: 100vh;
/* #endif */ /* #endif */
background-color: #000; background-color: #000;
overflow: hidden; overflow: hidden;
flex: 1; flex: 1;
} }
.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>