新增禁用弹窗
This commit is contained in:
parent
64f8618802
commit
85d0f092c0
|
|
@ -2,7 +2,7 @@
|
|||
"version" : "1.0",
|
||||
"configurations" : [
|
||||
{
|
||||
"playground" : "custom",
|
||||
"playground" : "standard",
|
||||
"type" : "uni-app:app-android"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//打包时修改env的值即可
|
||||
const env = 'production' //test , production,local
|
||||
const env = 'test' //test,production,local
|
||||
|
||||
export const encryptKey = '1234567890123456' // http数据加解密的key
|
||||
|
||||
|
|
@ -7,7 +7,7 @@ export const apiUrl = '/czg/'
|
|||
export const h5Config = {
|
||||
production: 'https://web.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 = {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -61,6 +61,7 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
|
|||
if (isreturm) {
|
||||
return Promise.resolve(bodyData);
|
||||
}
|
||||
|
||||
if (statusCode == 500) {
|
||||
isShowErrorToast = true;
|
||||
return Promise.reject(bodyData); // 跳转到catch函数
|
||||
|
|
@ -82,6 +83,9 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
|
|||
isShowErrorToast = true;
|
||||
return Promise.reject(bodyData); // 跳转到catch函数
|
||||
}
|
||||
if (bodyData.code == 702) {
|
||||
return Promise.reject(bodyData); // 跳转到catch函数
|
||||
}
|
||||
if (bodyData.code == 500) {
|
||||
// 提示信息
|
||||
isShowErrorToast = true;
|
||||
|
|
@ -100,7 +104,7 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
|
|||
|
||||
//未绑定微信
|
||||
if (bodyData.code == 407) {
|
||||
return Promise.resolve(result);
|
||||
return Promise.resolve(result);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
310
manifest.json
310
manifest.json
|
|
@ -1,156 +1,156 @@
|
|||
{
|
||||
"name" : "斯耀短剧",
|
||||
"appid" : "__UNI__E0B05B1",
|
||||
"description" : "",
|
||||
"versionName" : "1.3.0",
|
||||
"versionCode" : 130,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"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,
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules" : {
|
||||
"Camera" : {},
|
||||
"Push" : {},
|
||||
"VideoPlayer" : {},
|
||||
"Canvas" : "nvue canvas", //使用Canvas模块
|
||||
"OAuth" : {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
],
|
||||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
|
||||
"schemes" : "com.hnsiyao.duanju",
|
||||
"minSdkVersion" : 28,
|
||||
"targetSdkVersion" : 33
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {
|
||||
"privacyDescription" : {
|
||||
"NSPhotoLibraryUsageDescription" : "获取您的相册读取权限,目的是为了在我的资料页面使用相册读取功能,修改上传头像",
|
||||
"NSCameraUsageDescription" : "获取您的摄像头权限,目的是为了在我的资料页面使用摄像头功能,修改上传头像"
|
||||
},
|
||||
"urltypes" : "com.hnsiyao.duanju",
|
||||
"dSYMs" : false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {
|
||||
"push" : {
|
||||
"unipush" : {}
|
||||
},
|
||||
"ad" : {
|
||||
"ks" : {}
|
||||
},
|
||||
"oauth" : {
|
||||
"weixin" : {
|
||||
"appid" : "wx5001ff1af6c4781f",
|
||||
"UniversalLinks" : ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
|
||||
"minSdkVersion" : 28,
|
||||
"targetSdkVersion" : 33,
|
||||
"schemes" : "com.hnsiyao.duanju",
|
||||
"icons" : {
|
||||
"android" : {
|
||||
"hdpi" : "unpackage/res/icons/72x72.png",
|
||||
"xhdpi" : "unpackage/res/icons/96x96.png",
|
||||
"xxhdpi" : "unpackage/res/icons/144x144.png",
|
||||
"xxxhdpi" : "unpackage/res/icons/192x192.png"
|
||||
},
|
||||
"ios" : {
|
||||
"appstore" : "unpackage/res/icons/1024x1024.png",
|
||||
"ipad" : {
|
||||
"app" : "unpackage/res/icons/76x76.png",
|
||||
"app@2x" : "unpackage/res/icons/152x152.png",
|
||||
"notification" : "unpackage/res/icons/20x20.png",
|
||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||
"proapp@2x" : "unpackage/res/icons/167x167.png",
|
||||
"settings" : "unpackage/res/icons/29x29.png",
|
||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||
"spotlight" : "unpackage/res/icons/40x40.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/80x80.png"
|
||||
},
|
||||
"iphone" : {
|
||||
"app@2x" : "unpackage/res/icons/120x120.png",
|
||||
"app@3x" : "unpackage/res/icons/180x180.png",
|
||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||
"notification@3x" : "unpackage/res/icons/60x60.png",
|
||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||
"settings@3x" : "unpackage/res/icons/87x87.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
||||
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
"usingComponents" : true,
|
||||
"mergeVirtualHostAttributes" : true
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true,
|
||||
"mergeVirtualHostAttributes" : true
|
||||
},
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"vueVersion" : "3",
|
||||
"h5" : {
|
||||
"title" : "斯耀短剧",
|
||||
"template" : "template.html",
|
||||
"router" : {
|
||||
"mode" : "history"
|
||||
}
|
||||
}
|
||||
}
|
||||
"name": "斯耀短剧",
|
||||
"appid": "__UNI__E0B05B1",
|
||||
"description": "",
|
||||
"versionName": "1.3.0",
|
||||
"versionCode": 130,
|
||||
"transformPx": false,
|
||||
/* 5+App特有相关 */
|
||||
"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,
|
||||
"nvueStyleCompiler": "uni-app",
|
||||
"compilerVersion": 3,
|
||||
"splashscreen": {
|
||||
"alwaysShowBeforeRender": true,
|
||||
"waiting": true,
|
||||
"autoclose": true,
|
||||
"delay": 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules": {
|
||||
"Camera": {},
|
||||
"Push": {},
|
||||
"VideoPlayer": {},
|
||||
"Canvas": "nvue canvas", //使用Canvas模块
|
||||
"OAuth": {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute": {
|
||||
/* android打包配置 */
|
||||
"android": {
|
||||
"permissions": [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
],
|
||||
"abiFilters": ["armeabi-v7a", "arm64-v8a", "x86"],
|
||||
"schemes": "com.hnsiyao.duanju",
|
||||
"minSdkVersion": 28,
|
||||
"targetSdkVersion": 33
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios": {
|
||||
"privacyDescription": {
|
||||
"NSPhotoLibraryUsageDescription": "获取您的相册读取权限,目的是为了在我的资料页面使用相册读取功能,修改上传头像",
|
||||
"NSCameraUsageDescription": "获取您的摄像头权限,目的是为了在我的资料页面使用摄像头功能,修改上传头像"
|
||||
},
|
||||
"urltypes": "com.hnsiyao.duanju",
|
||||
"dSYMs": false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs": {
|
||||
"push": {
|
||||
"unipush": {}
|
||||
},
|
||||
"ad": {
|
||||
"ks": {}
|
||||
},
|
||||
"oauth": {
|
||||
"weixin": {
|
||||
"appid": "wx5001ff1af6c4781f",
|
||||
"UniversalLinks": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"abiFilters": ["armeabi-v7a", "arm64-v8a", "x86"],
|
||||
"minSdkVersion": 28,
|
||||
"targetSdkVersion": 33,
|
||||
"schemes": "com.hnsiyao.duanju",
|
||||
"icons": {
|
||||
"android": {
|
||||
"hdpi": "unpackage/res/icons/72x72.png",
|
||||
"xhdpi": "unpackage/res/icons/96x96.png",
|
||||
"xxhdpi": "unpackage/res/icons/144x144.png",
|
||||
"xxxhdpi": "unpackage/res/icons/192x192.png"
|
||||
},
|
||||
"ios": {
|
||||
"appstore": "unpackage/res/icons/1024x1024.png",
|
||||
"ipad": {
|
||||
"app": "unpackage/res/icons/76x76.png",
|
||||
"app@2x": "unpackage/res/icons/152x152.png",
|
||||
"notification": "unpackage/res/icons/20x20.png",
|
||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||
"proapp@2x": "unpackage/res/icons/167x167.png",
|
||||
"settings": "unpackage/res/icons/29x29.png",
|
||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||
"spotlight": "unpackage/res/icons/40x40.png",
|
||||
"spotlight@2x": "unpackage/res/icons/80x80.png"
|
||||
},
|
||||
"iphone": {
|
||||
"app@2x": "unpackage/res/icons/120x120.png",
|
||||
"app@3x": "unpackage/res/icons/180x180.png",
|
||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||
"notification@3x": "unpackage/res/icons/60x60.png",
|
||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||
"settings@3x": "unpackage/res/icons/87x87.png",
|
||||
"spotlight@2x": "unpackage/res/icons/80x80.png",
|
||||
"spotlight@3x": "unpackage/res/icons/120x120.png"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp": {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin": {
|
||||
"appid": "",
|
||||
"setting": {
|
||||
"urlCheck": false
|
||||
},
|
||||
"usingComponents": true,
|
||||
"mergeVirtualHostAttributes": true
|
||||
},
|
||||
"mp-alipay": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"mp-baidu": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"mp-toutiao": {
|
||||
"usingComponents": true,
|
||||
"mergeVirtualHostAttributes": true
|
||||
},
|
||||
"uniStatistics": {
|
||||
"enable": false
|
||||
},
|
||||
"vueVersion": "3",
|
||||
"h5": {
|
||||
"title": "斯耀短剧",
|
||||
"template": "template.html",
|
||||
"router": {
|
||||
"mode": "history"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -52,14 +52,17 @@
|
|||
<emprty-card v-if="!data.list2.length" />
|
||||
</view>
|
||||
</view>
|
||||
<disable-mask v-if="disableShow"></disable-mask>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive } from 'vue';
|
||||
import { reactive, ref } from 'vue';
|
||||
import { selectByUserId } from '@/api/me/me.js';
|
||||
import { onLoad, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app';
|
||||
import { linkTo } from '@/utils/app.js';
|
||||
|
||||
const disableShow = ref(false);
|
||||
|
||||
// 获取数据
|
||||
async function selectByUserIdAjax() {
|
||||
try {
|
||||
|
|
@ -69,6 +72,11 @@ async function selectByUserIdAjax() {
|
|||
data.list2 = res2.records;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
if (error.code == 702) {
|
||||
disableShow.value = true;
|
||||
} else {
|
||||
disableShow.value = false;
|
||||
}
|
||||
}
|
||||
setTimeout(() => {
|
||||
uni.stopPullDownRefresh();
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<template>
|
||||
<view class="indexStyle">
|
||||
<image src="@/static/index/indexbh.png" mode="">
|
||||
</image>
|
||||
<image src="@/static/index/indexbh.png" mode=""></image>
|
||||
<view class="indexStyleTwo">
|
||||
<image src="@/static/logo.png" mode=""></image>
|
||||
<!-- <view @tap="moreVideo">
|
||||
|
|
@ -12,54 +11,62 @@
|
|||
|
||||
<template v-if="datas.isExamine">
|
||||
<view class="gongao">
|
||||
<view class="gongaoicon">
|
||||
公告
|
||||
</view>
|
||||
<swiper :autoplay="true" :vertical="true" :interval="4000" :circular="true" :indicator-dots="false"
|
||||
class="swiperstyle">
|
||||
<view class="gongaoicon">公告</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">
|
||||
<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>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
<view class="navTop">
|
||||
<view :class="datas.active == 1 ? 'navTop-active' : ''" @tap="getrecomVideo('', 1)">
|
||||
最新
|
||||
</view>
|
||||
<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 :class="datas.active == 1 ? 'navTop-active' : ''" @tap="getrecomVideo('', 1)">最新</view>
|
||||
<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>
|
||||
<contentlist :list='datas.list'></contentlist>
|
||||
<image v-if="datas.isExamine" @click="goMsg()" src="@/static/index/red-pack-new.gif"
|
||||
style="width: 200rpx;height: 200rpx;position: fixed;right: 10rpx;bottom: 180rpx;" mode=""></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;">
|
||||
<contentlist :list="datas.list"></contentlist>
|
||||
<image
|
||||
v-if="datas.isExamine"
|
||||
@click="goMsg()"
|
||||
src="@/static/index/red-pack-new.gif"
|
||||
style="width: 200rpx; height: 200rpx; position: fixed; right: 10rpx; bottom: 180rpx"
|
||||
mode=""
|
||||
></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> -->
|
||||
<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>
|
||||
</view>
|
||||
</up-modal>
|
||||
|
||||
<!-- h5关闭通知 -->
|
||||
<!-- #ifdef H5 -->
|
||||
<up-modal :show="datas.stopShow" 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)">
|
||||
<up-modal
|
||||
:show="datas.stopShow"
|
||||
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">
|
||||
<text>2025年2月8日将关闭网页访问,请及时下载最新APP</text>
|
||||
</view>
|
||||
|
|
@ -67,373 +74,365 @@
|
|||
<!-- #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 style="text-align: justify;font-size: 18px;color: #666;"
|
||||
v-html="datas.noticeList[datas.cloneNum].title"></view>
|
||||
<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>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive,
|
||||
nextTick
|
||||
} from 'vue';
|
||||
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 {
|
||||
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: [], //公告列表
|
||||
import { reactive, nextTick, ref } from 'vue';
|
||||
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 { 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')
|
||||
// }
|
||||
});
|
||||
|
||||
active: 1, // 最新、最热。。。切换顶部导航栏
|
||||
const disableMaskVisable = ref(false);
|
||||
|
||||
list: [], // 底部短剧内容
|
||||
page: 1, // 首页推荐分页
|
||||
stopShow: true, //h5关闭弹窗
|
||||
ruleShow: false,
|
||||
rule_title: '', // 首页弹窗标题
|
||||
rule_content: '', // 首页弹窗内容
|
||||
ruleIndex: 0,
|
||||
ruleList: [],
|
||||
stopShows: false,
|
||||
version: {
|
||||
show: false,
|
||||
title: "",
|
||||
content: "",
|
||||
confirmText: "",
|
||||
cancelText: "",
|
||||
downloadLink: ""
|
||||
},
|
||||
setindexdata: false,
|
||||
cloneNum: 0
|
||||
})
|
||||
onLoad(() => {
|
||||
versionUpdate()
|
||||
getMsg()
|
||||
getrecomVideo()
|
||||
})
|
||||
onReady(() => {
|
||||
if (!uni.getStorageSync('ruleShow')) {
|
||||
announcement({
|
||||
type: 0
|
||||
}).then(res => {
|
||||
let datas = reactive({
|
||||
noticeList: [], //公告列表
|
||||
|
||||
active: 1, // 最新、最热。。。切换顶部导航栏
|
||||
|
||||
list: [], // 底部短剧内容
|
||||
page: 1, // 首页推荐分页
|
||||
stopShow: true, //h5关闭弹窗
|
||||
ruleShow: false,
|
||||
rule_title: '', // 首页弹窗标题
|
||||
rule_content: '', // 首页弹窗内容
|
||||
ruleIndex: 0,
|
||||
ruleList: [],
|
||||
stopShows: false,
|
||||
version: {
|
||||
show: false,
|
||||
title: '',
|
||||
content: '',
|
||||
confirmText: '',
|
||||
cancelText: '',
|
||||
downloadLink: ''
|
||||
},
|
||||
setindexdata: false,
|
||||
cloneNum: 0
|
||||
});
|
||||
onLoad(() => {
|
||||
versionUpdate();
|
||||
getMsg();
|
||||
getrecomVideo();
|
||||
});
|
||||
onReady(() => {
|
||||
if (!uni.getStorageSync('ruleShow')) {
|
||||
announcement({
|
||||
type: 0
|
||||
})
|
||||
.then((res) => {
|
||||
if (res) {
|
||||
datas.ruleShow = true
|
||||
datas.ruleList = res
|
||||
ruleInit()
|
||||
datas.ruleShow = true;
|
||||
datas.ruleList = res;
|
||||
ruleInit();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
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
|
||||
}
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
|
||||
function confirmEvent() {
|
||||
datas.stopShows = false
|
||||
if (datas.cloneNum < datas.noticeList.length - 1) {
|
||||
++datas.cloneNum
|
||||
});
|
||||
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
|
||||
}
|
||||
datas.stopShows = true;
|
||||
}
|
||||
}
|
||||
|
||||
function stopConfirm() {
|
||||
datas.stopShow = false
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/download'
|
||||
})
|
||||
function confirmEvent() {
|
||||
datas.stopShows = false;
|
||||
if (datas.cloneNum < datas.noticeList.length - 1) {
|
||||
++datas.cloneNum;
|
||||
uni.setStorageSync('ids', [...uni.getStorageSync('ids'), datas.noticeList[datas.cloneNum].id]);
|
||||
datas.stopShows = true;
|
||||
}
|
||||
}
|
||||
|
||||
function stopCancel() {
|
||||
datas.stopShow = false
|
||||
}
|
||||
function stopConfirm() {
|
||||
datas.stopShow = false;
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/download'
|
||||
});
|
||||
}
|
||||
|
||||
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 = "下次更新"
|
||||
function stopCancel() {
|
||||
datas.stopShow = false;
|
||||
}
|
||||
|
||||
}
|
||||
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() {
|
||||
uni.showTabBar()
|
||||
datas.version.show = false
|
||||
}
|
||||
function cancelUpdateVersion() {
|
||||
uni.showTabBar();
|
||||
datas.version.show = false;
|
||||
}
|
||||
|
||||
function confirmUpdateVersion() {
|
||||
// plus.runtime.openURL(config.baseUrl + '/pages/login/appEq')
|
||||
linkTo('/pages/login/download')
|
||||
return
|
||||
uni.showLoading({
|
||||
title: '下载中...',
|
||||
mask: true
|
||||
});
|
||||
if (uni.getSystemInfoSync().platform == 'android') {
|
||||
uni.downloadFile({
|
||||
url: datas.version.downloadLink,
|
||||
success: downloadResult => {
|
||||
console.log(downloadResult)
|
||||
if (downloadResult.statusCode === 200) {
|
||||
plus.runtime.install(
|
||||
downloadResult.tempFilePath, {
|
||||
force: false
|
||||
},
|
||||
d => {
|
||||
console.log('install success...');
|
||||
plus.runtime
|
||||
.restart();
|
||||
},
|
||||
e => {
|
||||
console.log(e)
|
||||
console.error('install fail...');
|
||||
}
|
||||
);
|
||||
}
|
||||
function confirmUpdateVersion() {
|
||||
// plus.runtime.openURL(config.baseUrl + '/pages/login/appEq')
|
||||
linkTo('/pages/login/download');
|
||||
return;
|
||||
uni.showLoading({
|
||||
title: '下载中...',
|
||||
mask: true
|
||||
});
|
||||
if (uni.getSystemInfoSync().platform == 'android') {
|
||||
uni.downloadFile({
|
||||
url: datas.version.downloadLink,
|
||||
success: (downloadResult) => {
|
||||
console.log(downloadResult);
|
||||
if (downloadResult.statusCode === 200) {
|
||||
plus.runtime.install(
|
||||
downloadResult.tempFilePath,
|
||||
{
|
||||
force: false
|
||||
},
|
||||
(d) => {
|
||||
console.log('install success...');
|
||||
plus.runtime.restart();
|
||||
},
|
||||
(e) => {
|
||||
console.log(e);
|
||||
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'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 搜索跳转
|
||||
function moreVideo() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/search/index'
|
||||
});
|
||||
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);
|
||||
}
|
||||
|
||||
//获取推荐视频
|
||||
async function getrecomVideo(sort, active = 1) {
|
||||
datas.active = active
|
||||
// 跳转公告链接
|
||||
function goMsg(url) {
|
||||
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) {
|
||||
datas.page = 1
|
||||
datas.page = 1;
|
||||
}
|
||||
let res = await courseselectCourse({
|
||||
page: datas.page,
|
||||
limit: 12,
|
||||
sort: sort,
|
||||
classifyId: ''
|
||||
})
|
||||
});
|
||||
|
||||
console.log('getrecomVideo===', res);
|
||||
|
||||
if (datas.page == 1) {
|
||||
datas.list = res.list
|
||||
datas.list = res.list;
|
||||
} 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>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.indexStyle {
|
||||
height: 350rpx;
|
||||
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%;
|
||||
}
|
||||
}
|
||||
.indexStyle {
|
||||
height: 350rpx;
|
||||
position: relative;
|
||||
|
||||
> image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.navTop-active {
|
||||
color: #cb5d68;
|
||||
}
|
||||
|
||||
.navTop {
|
||||
.indexStyleTwo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 20rpx;
|
||||
padding: 88rpx 25rpx;
|
||||
|
||||
>view {
|
||||
background-color: #f0f0f0;
|
||||
margin-left: 20rpx;
|
||||
padding: 6rpx 20rpx
|
||||
> 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;
|
||||
}
|
||||
}
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -9,17 +9,13 @@
|
|||
<image class="img" src="/static/logo.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="quick-menu">
|
||||
<image class="icon" src="/static/me/logo_btn1.png" mode="aspectFit"
|
||||
@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_btn3.png" mode="aspectFit"
|
||||
@click="linkTo('/pages/me/contact', true)"></image>
|
||||
<image class="icon" src="/static/me/logo_btn1.png" mode="aspectFit" @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_btn3.png" mode="aspectFit" @click="linkTo('/pages/me/contact', true)"></image>
|
||||
</view>
|
||||
</view>
|
||||
<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>
|
||||
<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>
|
||||
<view class="info-wrap">
|
||||
<view class="name">{{ userInfo.phone || '请登录' }}</view>
|
||||
</view>
|
||||
|
|
@ -33,7 +29,7 @@
|
|||
<view class="title">我的追剧</view>
|
||||
<view class="num">{{ likeData.collectCount }}</view>
|
||||
</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="num">{{ amount || 0 }}</view>
|
||||
</view>
|
||||
|
|
@ -48,7 +44,6 @@
|
|||
<div @click="linkTo('/pages/me/gold_record', true)">
|
||||
<view class="btn">金币明细</view>
|
||||
</div>
|
||||
|
||||
</view>
|
||||
<div class="title-wrap" @click="linkTo('/pages/watching_history/watching_history?type=3', true)">
|
||||
<view class="a">
|
||||
|
|
@ -58,8 +53,12 @@
|
|||
</div>
|
||||
|
||||
<view class="history-list">
|
||||
<view class="item" v-for="item in recordThree" :key="item.id"
|
||||
@click="linkTo(`/pages/video/detail?courseId=${item.courseId}&courseDetailsId=${item.courseDetailsId}`)">
|
||||
<view
|
||||
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>
|
||||
<view class="name">{{ item.title }}</view>
|
||||
<view class="t">看到{{ item.courseDetailsName }}</view>
|
||||
|
|
@ -105,7 +104,7 @@
|
|||
<view class="name">绑定微信</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
|
||||
|
||||
<view class="item" @click="linkTo('/pages/me/privacy')">
|
||||
<image class="icon" src="/static/me/menu_icon8.png" mode="aspectFit"></image>
|
||||
<view class="name">隐私政策</view>
|
||||
|
|
@ -114,362 +113,354 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<disable-mask v-if="disableShow"></disable-mask>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
reactive
|
||||
} from 'vue';
|
||||
import {
|
||||
onLoad,
|
||||
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()
|
||||
}
|
||||
}
|
||||
import { ref, reactive } from 'vue';
|
||||
import { onLoad, 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 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) {
|
||||
console.log(error);
|
||||
const disableShow = ref(false);
|
||||
|
||||
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 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,
|
||||
collectCount: 0
|
||||
});
|
||||
async function collectVideoSummaryAjax() {
|
||||
try {
|
||||
const res = await collectVideoSummary();
|
||||
likeData.likeCount = res.likeCount;
|
||||
likeData.collectCount = res.collectCount;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
// 我的喜欢 我的追剧
|
||||
const likeData = reactive({
|
||||
likeCount: 0,
|
||||
collectCount: 0
|
||||
});
|
||||
async function collectVideoSummaryAjax() {
|
||||
try {
|
||||
const res = await collectVideoSummary();
|
||||
likeData.likeCount = res.likeCount;
|
||||
likeData.collectCount = res.collectCount;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
||||
// 金币
|
||||
const gold = ref(0);
|
||||
const amount = ref(0);
|
||||
async function selectUserMoneyAjax() {
|
||||
try {
|
||||
const res = await selectUserMoney();
|
||||
gold.value = res.money;
|
||||
amount.value = res.amount;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
// 金币
|
||||
const gold = ref(0);
|
||||
const amount = ref(0);
|
||||
async function selectUserMoneyAjax() {
|
||||
try {
|
||||
const res = await selectUserMoney();
|
||||
gold.value = res.money;
|
||||
amount.value = res.amount;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
||||
// 跳转任务中心
|
||||
function toTask() {
|
||||
linkTo('/pages/share/index');
|
||||
}
|
||||
// 跳转任务中心
|
||||
function toTask() {
|
||||
linkTo('/pages/share/index');
|
||||
}
|
||||
|
||||
onPullDownRefresh(async () => {
|
||||
await selectByUserIdAjax();
|
||||
await collectVideoSummaryAjax();
|
||||
await selectUserMoneyAjax();
|
||||
userInfo.value = uni.getStorageSync('userInfo');
|
||||
setTimeout(() => {
|
||||
uni.stopPullDownRefresh();
|
||||
}, 500);
|
||||
});
|
||||
|
||||
onPullDownRefresh(async () => {
|
||||
await selectByUserIdAjax();
|
||||
await collectVideoSummaryAjax();
|
||||
await selectUserMoneyAjax();
|
||||
onShow(() => {
|
||||
if (uni.getStorageSync('token')) {
|
||||
selectByUserIdAjax();
|
||||
collectVideoSummaryAjax();
|
||||
selectUserMoneyAjax();
|
||||
userInfo.value = uni.getStorageSync('userInfo');
|
||||
setTimeout(() => {
|
||||
uni.stopPullDownRefresh();
|
||||
}, 500);
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
if (uni.getStorageSync('token')) {
|
||||
selectByUserIdAjax();
|
||||
collectVideoSummaryAjax();
|
||||
selectUserMoneyAjax();
|
||||
userInfo.value = uni.getStorageSync('userInfo');
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background: #f5f7ff;
|
||||
}
|
||||
page {
|
||||
background: #f5f7ff;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
$bgColor: #f5f7ff;
|
||||
$bgColor: #f5f7ff;
|
||||
|
||||
.container {
|
||||
font-size: 28upx;
|
||||
color: #333;
|
||||
}
|
||||
.container {
|
||||
font-size: 28upx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.top-bg {
|
||||
width: 100%;
|
||||
.top-bg {
|
||||
width: 100%;
|
||||
height: 50%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: linear-gradient(90deg, #ffe5ea 0, #e4f5fb 49%, #fff0ee);
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
height: 50%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
background: linear-gradient(to bottom, transparent, $bgColor);
|
||||
position: absolute;
|
||||
bottom: 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 {
|
||||
padding: 28upx;
|
||||
position: relative;
|
||||
.content {
|
||||
padding: 28upx;
|
||||
position: relative;
|
||||
|
||||
.user-info {
|
||||
.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;
|
||||
.user-info {
|
||||
.logo-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
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 {
|
||||
.logo {
|
||||
width: 160upx;
|
||||
|
||||
.img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.quick-menu {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20upx;
|
||||
|
||||
.icon {
|
||||
$size: 52upx;
|
||||
$size: 60upx;
|
||||
width: $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 {
|
||||
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;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</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>
|
||||
|
|
|
|||
1141
pages/task/index.vue
1141
pages/task/index.vue
File diff suppressed because it is too large
Load Diff
|
|
@ -1,93 +1,148 @@
|
|||
<template>
|
||||
<view class="min-page " >
|
||||
<view class="min-page">
|
||||
<!-- <up-button @click="toDetail">toDetail</up-button> -->
|
||||
<my-video-list isCommand isTabbar v-if="state.list.length" @swiperChange="swiperChange" :list="state.list" @update="update"
|
||||
:info="state"
|
||||
></my-video-list>
|
||||
|
||||
|
||||
<my-video-list isCommand isTabbar v-if="state.list.length" @swiperChange="swiperChange" :list="state.list" @update="update" :info="state"></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>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
onLoad,
|
||||
onShow
|
||||
} from '@dcloudio/uni-app'
|
||||
import * as Api from '@/api/video/index.js'
|
||||
import {
|
||||
computed,
|
||||
reactive,
|
||||
ref
|
||||
} from 'vue'
|
||||
import {
|
||||
slice
|
||||
} from 'lodash'
|
||||
import { onLoad, onShow } 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 toDetail() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/video/detail?courseId=1208'
|
||||
})
|
||||
}
|
||||
let options = {}
|
||||
const state = reactive({
|
||||
collect: 0,
|
||||
current: {},
|
||||
list: [],
|
||||
price: 0,
|
||||
title: ''
|
||||
})
|
||||
async function init() {
|
||||
const res = await Api.tuijianVideo(options)
|
||||
state.current = res.list[0]
|
||||
Object.assign(state, res)
|
||||
state.list = res.list
|
||||
function toContact() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/me/contact'
|
||||
});
|
||||
}
|
||||
|
||||
function toDetail() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/video/detail?courseId=1208'
|
||||
});
|
||||
}
|
||||
let options = {};
|
||||
const state = reactive({
|
||||
collect: 0,
|
||||
current: {},
|
||||
list: [],
|
||||
price: 0,
|
||||
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({
|
||||
index,
|
||||
item
|
||||
}) {
|
||||
state.list[index] = item
|
||||
}
|
||||
onLoad((opt) => {
|
||||
Object.assign(options, opt)
|
||||
init()
|
||||
})
|
||||
function update({ index, item }) {
|
||||
state.list[index] = item;
|
||||
}
|
||||
onLoad((opt) => {
|
||||
Object.assign(options, opt);
|
||||
init();
|
||||
});
|
||||
|
||||
function swiperChange({
|
||||
current,
|
||||
direction,
|
||||
data
|
||||
}) {}
|
||||
function swiperChange({ current, direction, data }) {}
|
||||
|
||||
onShow(() => {
|
||||
|
||||
})
|
||||
onShow(() => {});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page{
|
||||
height: calc(100vh - 50px);
|
||||
overflow: hidden;
|
||||
}
|
||||
page {
|
||||
height: calc(100vh - 50px);
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.min-page {
|
||||
/* #ifdef H5 */
|
||||
height: calc(100vh - 50px);
|
||||
/* #endif */
|
||||
/* #ifdef APP */
|
||||
height: 100vh;
|
||||
/* #endif */
|
||||
background-color: #000;
|
||||
overflow: hidden;
|
||||
flex: 1;
|
||||
}
|
||||
.min-page {
|
||||
/* #ifdef H5 */
|
||||
height: calc(100vh - 50px);
|
||||
/* #endif */
|
||||
/* #ifdef APP */
|
||||
height: 100vh;
|
||||
/* #endif */
|
||||
background-color: #000;
|
||||
overflow: hidden;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.u-popup {
|
||||
position: fixed;
|
||||
.u-popup {
|
||||
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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue