123456
@@ -10,10 +10,10 @@
|
||||
playerManagerList: [],
|
||||
}
|
||||
},
|
||||
globalData: {},
|
||||
onLaunch: function(e) {
|
||||
uni.getLocation({
|
||||
|
||||
})
|
||||
this.getappinfodata()
|
||||
uni.getLocation({})
|
||||
let that = this;
|
||||
if (e.query.invite) {
|
||||
uni.setStorageSync('invite_number', e.query.invite);
|
||||
@@ -110,9 +110,6 @@
|
||||
if (res.statusBarHeight == 0) {
|
||||
res.statusBarHeight = 30;
|
||||
}
|
||||
// menuButtonInfo.statusBarHeight = res.statusBarHeight;
|
||||
// res.menuButtonInfo = menuButtonInfo;
|
||||
// uni.setStorageSync("setGetSystemInfo", res);
|
||||
}
|
||||
})
|
||||
|
||||
@@ -125,6 +122,56 @@
|
||||
console.log('App Hide')
|
||||
},
|
||||
methods: {
|
||||
// ========== 设备信息采集 ==========
|
||||
getappinfodata() {
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
const doginfo = {
|
||||
osName: res.osName,
|
||||
model: res.model,
|
||||
language: res.language,
|
||||
safeAreaInsets: res.safeAreaInsets,
|
||||
width: res.screenWidth,
|
||||
height: res.screenHeight,
|
||||
pixelRatio: res.pixelRatio,
|
||||
navbar: 44,
|
||||
addnavbar: 44 + res.safeAreaInsets.top,
|
||||
}
|
||||
uni.setStorageSync('appInfo', res)
|
||||
uni.setStorageSync('osName', res.osName)
|
||||
|
||||
// 平台判断
|
||||
// #ifdef APP-PLUS
|
||||
doginfo.type = 'app'
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
doginfo.type = 'h5'
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
doginfo.navbar = 40
|
||||
doginfo.addnavbar = 40 + res.safeAreaInsets.top
|
||||
doginfo.qiudata = uni.getMenuButtonBoundingClientRect()
|
||||
doginfo.type = 'wx'
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY
|
||||
doginfo.type = 'zfb'
|
||||
// #endif
|
||||
// #ifdef MP-BAIDU
|
||||
doginfo.type = 'bd'
|
||||
// #endif
|
||||
// #ifdef MP-QQ
|
||||
doginfo.type = 'qq'
|
||||
// #endif
|
||||
// #ifdef MP-KUAISHOU
|
||||
doginfo.type = 'ks'
|
||||
// #endif
|
||||
|
||||
uni.setStorageSync('doginfo', doginfo)
|
||||
this.globalData.doginfo = doginfo
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//获取扫描小程序二维码
|
||||
getScence(scene) {
|
||||
const sceneParams = {};
|
||||
@@ -164,7 +211,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style lang="scss">
|
||||
@import url("@/utils/default.css");
|
||||
|
||||
view {
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="u-flex-col u-row-center u-col-center u-p-t-100">
|
||||
<image :src="icon" class="u-w-160 u-h-160"></image>
|
||||
<view class="u-font-24 u-color-181818 u-m-t-20">{{text}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "empty",
|
||||
props: {
|
||||
text: {
|
||||
type: String,
|
||||
default: '暂无记录'
|
||||
},
|
||||
icon: {
|
||||
type: String,
|
||||
default: '/static/image/icon27.png'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,193 @@
|
||||
<template>
|
||||
<view class="" :style="{height:doginfo.safeAreaInsets.top + doginfo.navbar+'px',backgroundColor:bgcolor,}">
|
||||
<view class="navbarBox"
|
||||
:style="{height:doginfo.safeAreaInsets.top + doginfo.navbar+'px',backgroundColor:bgcolor}">
|
||||
<view :style="{height:doginfo.safeAreaInsets.top +'px'}"></view>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="Topnavbar">
|
||||
<slot name="left" v-if="backopen">
|
||||
<u-icon @click="goBack()" :name="backname" :color="backcolor" size="20"></u-icon>
|
||||
</slot>
|
||||
<slot name="center">
|
||||
<view class="title" :style="{marginLeft: rightwidth - doginfo.qiudata.width + 'px',color:backcolor}"
|
||||
v-if="title">
|
||||
{{title}}
|
||||
</view>
|
||||
</slot>
|
||||
<view class="navbar-right-slot">
|
||||
<slot name="right">
|
||||
<!-- 保留占位,确保元素始终存在 -->
|
||||
</slot>
|
||||
<view :style="{width:doginfo.qiudata.width + 5 +'px',height:'40px'}"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<view class="Topnavbar">
|
||||
<slot name="left" v-if="backopen">
|
||||
<u-icon @click="goBack()" :name="backname" :color="backcolor" size="20"></u-icon>
|
||||
</slot>
|
||||
<slot name="center">
|
||||
<view class="title" :style="{marginLeft:rightwidth+'px',color:backcolor}" v-if="title">{{title}}
|
||||
</view>
|
||||
</slot>
|
||||
<view class="navbar-right-slot">
|
||||
<slot name="right">
|
||||
<!-- 保留占位,确保元素始终存在 -->
|
||||
<view style="width: 38rpx;height: 44rpx;"></view>
|
||||
</slot>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "navbar",
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
bgcolor: {
|
||||
type: String,
|
||||
default: "transparent"
|
||||
},
|
||||
backcolor: {
|
||||
type: String,
|
||||
default: "#111111"
|
||||
},
|
||||
backname: {
|
||||
type: String,
|
||||
default: "arrow-left"
|
||||
},
|
||||
backopen: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
title: {
|
||||
handler(newVal) {
|
||||
console.log(newVal);
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
doginfo: getApp().globalData.doginfo,
|
||||
rightwidth: getApp().globalData.doginfo.osName == 'ios' ? 87 : 95 // 新增:存储 right slot 尺寸
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// 微信小程序:同步预计算 rightwidth,避免标题闪烁
|
||||
if (this.doginfo.type === 'wx') {
|
||||
const cw = this.doginfo.qiudata.width;
|
||||
// 右侧只有胶囊占位时:占位宽 = cw+5,rightwidth = (cw+5) + cw/2
|
||||
this.rightwidth = (cw + 5) + (cw / 2);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.getRightSlotSize();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
let pages = getCurrentPages();
|
||||
let curRoute = pages[pages.length - 1].route;
|
||||
if (pages.length == 1) {
|
||||
uni.switchTab({
|
||||
url: '/pages/home/home'
|
||||
})
|
||||
} else {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
}
|
||||
},
|
||||
getRightSlotSize(retryCount = 0) {
|
||||
const maxRetries = 3;
|
||||
uni.createSelectorQuery().in(this).select('.navbar-right-slot').boundingClientRect((rect) => {
|
||||
if (rect && rect.width > 0 && rect.height > 0) {
|
||||
if (this.doginfo.type === 'wx') {
|
||||
if (rect.width == this.doginfo.qiudata.width + 5) {
|
||||
this.rightwidth = rect.width + (this.doginfo.qiudata.width / 2)
|
||||
return
|
||||
} else {
|
||||
this.rightwidth = rect.width - 20
|
||||
}
|
||||
} else {
|
||||
this.rightwidth = rect.width - 20
|
||||
}
|
||||
} else {
|
||||
// 如果还没达到最大重试次数,延迟后重试
|
||||
if (retryCount < maxRetries) {
|
||||
setTimeout(() => {
|
||||
this.getRightSlotSize(retryCount + 1);
|
||||
}, 300); // 减少重试间隔
|
||||
}
|
||||
}
|
||||
}).exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.navbarBox {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
background-color: #fff;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
.Topnavbar {
|
||||
height: 40px;
|
||||
padding: 0 7px;
|
||||
width: 100vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
flex-direction: row;
|
||||
|
||||
.title {
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
color: #111111;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-right-slot {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
// #endif
|
||||
|
||||
// #ifndef MP-WEIXIN
|
||||
.Topnavbar {
|
||||
height: 44px;
|
||||
padding: 0 12px;
|
||||
width: 100vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
flex-direction: row;
|
||||
|
||||
.title {
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
color: #111111;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// #endif
|
||||
</style>
|
||||
@@ -9,7 +9,9 @@ Vue.prototype.$config = config;
|
||||
Vue.config.productionTip = false;
|
||||
|
||||
App.mpType = 'app'
|
||||
|
||||
// main.js,注意要在use方法之后执行
|
||||
import uView from 'uview-ui'
|
||||
Vue.use(uView)
|
||||
const app = new Vue({
|
||||
...App
|
||||
})
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "吆喝",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"uview-ui": "^2.0.38"
|
||||
}
|
||||
},
|
||||
"node_modules/uview-ui": {
|
||||
"version": "2.0.38",
|
||||
"resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.38.tgz",
|
||||
"integrity": "sha512-6egHDf9lXHKpG3hEjRE0vMx4+VWwKk/ReTf5x18KrIKqdvdPRqO3+B8Unh7vYYwrIxzAWIlmhZ9RJpKI/4UqPQ==",
|
||||
"engines": {
|
||||
"HBuilderX": "^3.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"uview-ui": "^2.0.38"
|
||||
}
|
||||
}
|
||||
@@ -4,13 +4,22 @@
|
||||
{
|
||||
"path": "pages/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/my",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/zui",
|
||||
"style": {
|
||||
"navigationBarTitleText": "福利",
|
||||
"navigationBarBackgroundColor": "#FEECEB"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -22,16 +31,18 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/tabs/recommend",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"drama-feed-list": "plugin://playlet-plugin/drama-feed-list"
|
||||
}
|
||||
}
|
||||
},
|
||||
// {
|
||||
// "path": "pages/tabs/recommend",
|
||||
// "style": {
|
||||
// "navigationStyle": "custom",
|
||||
// "enablePullDownRefresh": false,
|
||||
// // #ifdef MP-WEIXIN
|
||||
// "usingComponents": {
|
||||
// "drama-feed-list": "plugin://playlet-plugin/drama-feed-list"
|
||||
// }
|
||||
// // #endif
|
||||
// }
|
||||
// },
|
||||
{
|
||||
"path": "pages/tabs/bingeWatch",
|
||||
"style": {
|
||||
@@ -69,6 +80,26 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "index/search",
|
||||
"style": {
|
||||
"navigationBarTitleText": "搜索"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "index/searchList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "搜索"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "index/charts",
|
||||
"style": {
|
||||
"navigationBarTitleText": "排行榜",
|
||||
"navigationBarBackgroundColor": "#FD7323",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "agreement/agreement",
|
||||
"style": {
|
||||
@@ -85,10 +116,10 @@
|
||||
},
|
||||
{
|
||||
"path": "myCenter/wallet/bill",
|
||||
"style": {
|
||||
"navigationBarTitleText": "金豆明细",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
"style": {
|
||||
"navigationBarTitleText": "金豆明细",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "myCenter/wallet/earning",
|
||||
@@ -274,7 +305,7 @@
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#F7F8F9"
|
||||
}
|
||||
},{
|
||||
}, {
|
||||
"path": "VIP/VIP",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
@@ -296,31 +327,31 @@
|
||||
"selectedColor": "#333333",
|
||||
"borderStyle": "black",
|
||||
"backgroundColor": "#ffffff",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/index",
|
||||
"iconPath": "static/tabImg/yzy_xjc.png",
|
||||
"selectedIconPath": "static/tabImg/yzy_xjcs.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/my",
|
||||
"iconPath": "static/tabImg/index.png",
|
||||
"selectedIconPath": "static/tabImg/index2.png",
|
||||
"text": "我的"
|
||||
}]
|
||||
"list": [{
|
||||
"pagePath": "pages/index",
|
||||
"iconPath": "static/tabbar/index.png",
|
||||
"selectedIconPath": "static/tabbar/index2.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/zui",
|
||||
"iconPath": "static/tabbar/zui.png",
|
||||
"selectedIconPath": "static/tabbar/zui2.png",
|
||||
"text": "福利"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/my",
|
||||
"iconPath": "static/tabbar/my.png",
|
||||
"selectedIconPath": "static/tabbar/my2.png",
|
||||
"text": "我的"
|
||||
}
|
||||
]
|
||||
},
|
||||
"easycom": {
|
||||
"autoscan": true,
|
||||
"custom": {
|
||||
// "com-(.*)": "@/components/common/$1.vue",
|
||||
// "show-(.*)": "@/components/show/$1.vue",
|
||||
// "countdown-(.*)": "@/components/countdown/$1.vue",
|
||||
// "sub-(.*)": "@/components/sub/$1.vue",
|
||||
// "dialog-(.*)": "@/components/dialog/$1.vue",
|
||||
// "select-(.*)": "@/components/select/$1.vue",
|
||||
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue",
|
||||
"home-(.*)": "@/components/home/$1.vue"
|
||||
// "order-(.*)": "@/pages/client/components/order/$1.vue"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,22 +1,482 @@
|
||||
<template>
|
||||
<view>
|
||||
<navbar :backopen="false"></navbar>
|
||||
<view class="u-p-l-30 u-p-r-30" @click="$u.route('/pagesA/index/search')">
|
||||
<u-search @click="$u.route('/pagesA/index/search')" placeholder="搜短剧名/演员名,免费看短剧" :showAction="false"
|
||||
disabled borderColor="#C81F22" searchIconColor="#C81F22"
|
||||
:inputStyle="{backgroundColor:'#fff'}"></u-search>
|
||||
</view>
|
||||
<view class="u-p-t-20 u-p-l-30 u-p-r-30">
|
||||
<u-swiper :list="bannerList" IconShow keyName="src" @click="clickSwiper" radius="6" circular indicator
|
||||
indicatorStyle="right: 20px" indicatorMode="dot" indicatorActiveColor="#C81F22"></u-swiper>
|
||||
|
||||
<view class="gitGiF u-m-t-30" v-if="dy_seek == '1'">
|
||||
<view class="imtext">
|
||||
<view class="leftTriangle"></view>
|
||||
<view class="seek">
|
||||
如何找到我们
|
||||
</view>
|
||||
<view class="rightTriangle"></view>
|
||||
</view>
|
||||
<image class="homeGif" :src="home_gif" mode=""></image>
|
||||
</view>
|
||||
|
||||
<view class="u-b-f u-m-t-30 u-radius-20 u-p-t-30 u-p-b-30 u-p-l-20">
|
||||
<u-tabs :list="videoMenuList" IconShow keyName="name" lineWidth="0" :curennt="curennt"
|
||||
:activeStyle="{padding:'0rpx 20rpx',fontSize:'30rpx'}"
|
||||
:inactiveStyle="{padding:'0rpx 20rpx',color:'#86909C',fontSize:'24rpx'}" @click="TabsClick">
|
||||
<view slot="right" class="u-flex u-p-r-20" @click="$u.route('/pagesA/index/charts')">
|
||||
<view class="u-color-666 u-font-24 u-m-r-10">全部</view>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</u-tabs>
|
||||
<scroll-view scroll-x class="w-100">
|
||||
<view class="u-flex u-col-top">
|
||||
<view v-if="index<4" class="u-m-r-20" v-for="(item,index) in recommendList" :key="index">
|
||||
<view @click.stop="govideo(item1.id)" class="u-flex u-col-top u-m-t-30 u-w-300 "
|
||||
v-for="(item1,index1) in item" :key="index1">
|
||||
<view class="u-relative">
|
||||
<u-image :src="apiUrl+ item1.img" width="100rpx" height="140rpx"
|
||||
radius="5"></u-image>
|
||||
<image v-show="index == 0 && index1==0" src="/static/image/icon8.png"
|
||||
class="u-w-40 u-h-40 u-absolute u-index-1" style="top: 0px;left:-2px;"></image>
|
||||
<image v-show="index == 0 && index1==1" src="/static/image/icon9.png"
|
||||
class="u-w-40 u-h-40 u-absolute u-index-1" style="top: 0px;left:-2px;"></image>
|
||||
<image v-show="index == 0 && index1==2" src="/static/image/icon10.png"
|
||||
class="u-w-40 u-h-40 u-absolute u-index-1" style="top: 0px;left:-2px;"></image>
|
||||
<view v-show="index != 0"
|
||||
class="u-w-40 u-h-40 u-b-F9E1E9 u-text-center u-lh-40 u-font-20 u-absolute u-index-1"
|
||||
style="border-radius:0 0 20rpx 0 ;top: 0px;left:0px;">{{3*index+index1+1}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex-1 u-m-l-16 u-flex-col u-h-140 u-row-between">
|
||||
<view class="u-word-break u-line-2 u-font-26">{{item1.name}}</view>
|
||||
<view class="u-color-999 u-font-24">
|
||||
<!-- {{item1.album_status == 1?'未上映':item1.album_status == 2?'更新中':'已完结'}} -->
|
||||
共{{item1.sum}}集
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<view v-if="list.length>0" class="u-m-t-20 u-b-f u-radius-20 u-p-t-30 u-p-b-30 u-p-l-20 ">
|
||||
<view class="u-flex">
|
||||
<image src="/static/image/icon7.png" class="u-w-50 u-h-50"></image>
|
||||
<view class="u-m-l-10 u-font-30">100分好剧</view>
|
||||
</view>
|
||||
<view class="u-flex u-flex-wrap u-col-top">
|
||||
<view @click.stop="govideo(item.id)" class="u-m-t-30 u-m-r-20 u-w-200" v-for="(item,index) in list"
|
||||
:key="index">
|
||||
<view class="u-relative">
|
||||
<u-image :src="apiUrl+ item.img" width="200rpx" height="280rpx" radius="6"></u-image>
|
||||
<view
|
||||
class="u-b-9505FF-09A7FF u-absolute u-index-1 u-w-72 u-h-40 u-text-center u-lh-40 u-color-f u-font-22"
|
||||
style="border-radius: 12rpx 0 20rpx 0;top: 0px;left:0px;">{{item.video_tag}}</view>
|
||||
</view>
|
||||
<view class="u-m-t-10 u-word-break u-line-1 u-font-24">{{item.name}}</view>
|
||||
<view class="u-m-t-10 u-word-break u-line-1 u-font-22 u-color-999">
|
||||
<!-- {{item.album_status == 1?'未上映':item.album_status == 2?'更新中':'已完结'}} · -->
|
||||
共{{item.sum}}集
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-tabs :list="tabsList" lineWidth="0" :curennt="onTabsIndex"
|
||||
:activeStyle="{background:'linear-gradient(to right,#FF5205,#FF0591)',color:'#fff',borderRadius:'10rpx',padding:'8rpx 20rpx'}"
|
||||
:inactiveStyle="{background:'#ECECEC',padding:'8rpx 20rpx',borderRadius:'10rpx'}"
|
||||
@click="onTabsClick"></u-tabs>
|
||||
<view v-if="CatList.length>0" class="u-flex u-flex-wrap u-col-top">
|
||||
<view @click.stop="govideo(item.id)" class="u-m-t-30 u-m-r-16 u-w-210" v-for="(item,index) in CatList"
|
||||
:key="index">
|
||||
<view class="u-relative">
|
||||
<u-image :src="apiUrl+ item.img" width="210rpx" height="280rpx" radius="6"></u-image>
|
||||
<view v-show="item.type_text && item.type_text!=''"
|
||||
class="yichu u-b-FF5205-FF0591 u-absolute u-index-1 u-text-center u-lh-40 u-color-f u-font-22 u-p-t-4 u-p-b-4 u-p-l-10 u-p-r-10"
|
||||
style="border-radius: 12rpx 0 20rpx 0;top: 0px;left:0px;">
|
||||
<span>{{item.type_text.split(",")[0]}}</span>
|
||||
</view>
|
||||
<view class="u-absolute u-index-1 u-color-f u-font-20 u-word-break"
|
||||
style="bottom:6rpx;right:6rpx;">{{item.views}}人看过</view>
|
||||
</view>
|
||||
<view class="u-m-t-10 u-word-break u-line-1 u-font-24">{{item.name}}</view>
|
||||
<view class="u-m-t-10 u-word-break u-line-1 u-font-22 u-color-999">
|
||||
{{item.album_status == 1?'未上映':item.album_status == 2?'更新中':'已完结'}} · 共{{item.sum}}集
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<empty v-if="CatList.length<1"></empty>
|
||||
<u-loadmore v-if="CatList.length>0" :status="status" icon-color="#999999" color="#999999" icon-type="circle"
|
||||
margin-top="30" margin-bottom="30" />
|
||||
</view>
|
||||
|
||||
<view v-if="show" class="u-fixed w-100 u-index-2" style="bottom: 40rpx;">
|
||||
<view class="u-p-l-20 u-p-r-20">
|
||||
<view class="u-b-383636 u-radius-20 u-p-t-10 u-p-b-10 u-p-l-20 u-p-r-20 u-flex u-col-top u-row-between">
|
||||
<view class="u-flex">
|
||||
<u-image :src="item.img" width="80rpx" height="120rpx" radius="6"></u-image>
|
||||
<view class="u-flex-1 u-m-l-20 u-h-100 u-flex-col u-row-between u-p-t-10 u-p-b-10 u-color-f">
|
||||
<view class="u-font-24 u-word-break u-line-1">{{LookInfo.vname}}</view>
|
||||
<view class="u-font-20">{{LookInfo.mid}}集</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex-col u-col-bottom">
|
||||
<u-icon @click="show=false" stop name="close" color="#999" size="16"></u-icon>
|
||||
<view @click.stop="govideo(LookInfo.vl_id)"
|
||||
class="u-bnt-tabbar-FF5205-FF0591 u-radius-40 u-p-l-20 u-p-r-20 u-p-t-10 u-p-b-10 u-font-24 u-m-t-10">
|
||||
继续播放</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import navbar from '@/components/navbar.vue'
|
||||
export default {
|
||||
components: {
|
||||
navbar,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
bannerList: [], //轮播图
|
||||
videoMenuList: [], //剧栏目
|
||||
curennt: 0, //剧栏目tab切换事件
|
||||
recommendList: [], //剧栏目数据
|
||||
list: [], //100分好剧列表数据
|
||||
tabsList: [], //分类tab
|
||||
onTabsIndex: 0, //分类tab当前索引
|
||||
CatList: [], //列表
|
||||
status: 'loadmore', //加载更多
|
||||
parameter: {
|
||||
limit: 20, //每页的总条数
|
||||
page: 1, //页码
|
||||
cat_id: '0', //分类id 全部=0
|
||||
},
|
||||
show: false, //底部最近观看短剧显示隐藏
|
||||
LookInfo: {}, //最近观看短剧信息
|
||||
apiUrl: '', //域名
|
||||
home_gif: "",
|
||||
dy_seek: ""
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.config()
|
||||
},
|
||||
onShow() {
|
||||
this.videoMenu()
|
||||
this.VideoCatList()
|
||||
// this.getVideoGroupList()
|
||||
this.videoLookGive()
|
||||
},
|
||||
// 下拉到底事件
|
||||
onReachBottom() {
|
||||
//避免多次触发
|
||||
if (this.status == 'loading' || this.status == 'nomore') {
|
||||
return;
|
||||
}
|
||||
this.getVideoList()
|
||||
},
|
||||
methods: {
|
||||
// 公共参数
|
||||
config() {
|
||||
let that = this;
|
||||
that.$httpRequest({
|
||||
url: '/api/video/indexdata',
|
||||
method: 'GET',
|
||||
data: {},
|
||||
isLoading: true,
|
||||
}).then(res => {
|
||||
if (res.config.name) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: res.config.name
|
||||
});
|
||||
}
|
||||
uni.setStorageSync("config", res.config)
|
||||
|
||||
this.bannerList = res.config.banner //轮播图
|
||||
|
||||
|
||||
// this.config = res.config;
|
||||
// this.banners = res.config.banner
|
||||
// this.listbz = res.listbz
|
||||
// this.listjq = res.listjq
|
||||
// // this.datasa = res.new
|
||||
// this.hotdata = res.hotdata
|
||||
// this.givedata = res.givedata
|
||||
// this.freedata = res.freedata;
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
|
||||
},
|
||||
clickSwiper(index) {
|
||||
console.log('ok')
|
||||
console.log(url)
|
||||
var fxpid = 1
|
||||
if (uni.getStorageSync("userinfo")) {
|
||||
fxpid = uni.getStorageSync("userinfo").id
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/' + vlid + '?mid=' + 0 + '&fxpid=' + fxpid
|
||||
})
|
||||
},
|
||||
// 剧栏目新剧 那个
|
||||
async videoMenu() {
|
||||
let that = this;
|
||||
await that.$httpRequest({
|
||||
url: '/api/pno/videoMenu',
|
||||
method: 'GET',
|
||||
isLoading: true,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
res.data[0].after_image = require('@/static/image/icon2.png')
|
||||
res.data[0].before_image = require('@/static/image/icon1.png')
|
||||
res.data[1].after_image = require('@/static/image/icon4.png')
|
||||
res.data[1].before_image = require('@/static/image/icon3.png')
|
||||
res.data[2].after_image = require('@/static/image/icon6.png')
|
||||
res.data[2].before_image = require('@/static/image/icon5.png')
|
||||
this.videoMenuList = res.data
|
||||
this.videoGroupList()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 剧栏目tab切换事件
|
||||
TabsClick(e) {
|
||||
this.curennt = e.index
|
||||
this.videoGroupList()
|
||||
},
|
||||
// 剧栏目列表数据
|
||||
videoGroupList() {
|
||||
this.$httpRequest({
|
||||
url: '/api/pno/videoGroupList',
|
||||
method: 'GET',
|
||||
data: {
|
||||
menu_id: this.videoMenuList[this.curennt].id
|
||||
},
|
||||
isLoading: true,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
// 使用reduce方法进行分组
|
||||
let groupedArray = res.data.data.reduce((acc, curr, index) => {
|
||||
// 检查当前索引是否能被3整除,以确定是否需要开始一个新的分组
|
||||
if (index % 3 === 0) {
|
||||
acc.push([curr]); // 开始新的分组并添加当前元素
|
||||
} else {
|
||||
// 将当前元素添加到最后一个分组中
|
||||
acc[acc.length - 1].push(curr);
|
||||
}
|
||||
return acc;
|
||||
}, []); // 初始值是一个空数组
|
||||
this.recommendList = groupedArray
|
||||
}
|
||||
})
|
||||
},
|
||||
// 100分好剧
|
||||
getVideoGroupList() {
|
||||
this.$httpRequest({
|
||||
url: '/api/pno/videoGroupList',
|
||||
method: 'GET',
|
||||
data: {
|
||||
is_top: 1,
|
||||
limit: 99
|
||||
},
|
||||
isLoading: true,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
this.list = res.data.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 分类tab列表数据
|
||||
VideoCatList() {
|
||||
this.$httpRequest({
|
||||
url: '/api/pno/VideoCatList',
|
||||
method: 'GET',
|
||||
isLoading: true,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
res.data.unshift({
|
||||
name: '全部',
|
||||
id: 0
|
||||
})
|
||||
this.tabsList = res.data
|
||||
this.clear()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 分类tab切换事件
|
||||
onTabsClick(e) {
|
||||
this.onTabsIndex = e.index
|
||||
this.clear()
|
||||
},
|
||||
clear() {
|
||||
this.parameter.cat_id = this.tabsList[this.onTabsIndex].id
|
||||
this.parameter.page = 1
|
||||
this.CatList = []
|
||||
this.getVideoList()
|
||||
},
|
||||
// 分类tab列表数据下拉刷新和上拉加载更多
|
||||
getVideoList() {
|
||||
this.$httpRequest({
|
||||
url: '/api/pno/videoGroupList',
|
||||
method: 'GET',
|
||||
data: {
|
||||
...this.parameter
|
||||
},
|
||||
isLoading: true,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
if (res.data.data.length < this.parameter.limit) {
|
||||
this.status = 'nomore';
|
||||
} else {
|
||||
this.parameter.page = this.parameter.page + 1;
|
||||
this.status = 'loadmore';
|
||||
}
|
||||
this.CatList = this.CatList.concat(res.data.data);
|
||||
uni.stopPullDownRefresh();
|
||||
}
|
||||
})
|
||||
|
||||
// this.$api.videoGroupList(this.parameter).then(res => {
|
||||
// if (res.code == 1) {
|
||||
// if (res.data.data.length < this.parameter.limit) {
|
||||
// this.status = 'nomore';
|
||||
// } else {
|
||||
// this.parameter.page = this.parameter.page + 1;
|
||||
// this.status = 'loadmore';
|
||||
// }
|
||||
// this.CatList = this.CatList.concat(res.data.data);
|
||||
// uni.stopPullDownRefresh();
|
||||
// }
|
||||
// })
|
||||
},
|
||||
// 底部最近观看短剧数据
|
||||
async videoLookGive() {
|
||||
// this.$api.videoLookGive().then(res => {
|
||||
// if (res.code == 1) {
|
||||
// if (res.data.id) {
|
||||
// this.show = true
|
||||
// this.LookInfo = res.data
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
|
||||
await this.$httpRequest({
|
||||
url: "/api/video/videolog",
|
||||
methods: "GET",
|
||||
data: {
|
||||
limit: 1,
|
||||
page: this.page
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.total == 1) {
|
||||
this.show = true
|
||||
this.LookInfo = res.rows[0]
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
// 进入短剧播放页面
|
||||
govideo(vlid) {
|
||||
if (tt.canIUse('video-player')) {
|
||||
uni.navigateTo({
|
||||
url: '/pagesA/index/VideoPlayer?vl_id=' + vlid
|
||||
})
|
||||
return
|
||||
this.$api.videoGroupInfo({
|
||||
vl_id: vlid,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
if (res.data.video_look == false) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/VideoPlayer?tt_album_id=' + res.data.album_id +
|
||||
'&tt_episode_id=' + res.data.video_info[0].episode_id + '&vl_id=' +
|
||||
vlid
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/VideoPlayer?tt_album_id=' + res.data.album_id +
|
||||
'&tt_episode_id=' + res.data.video_info[res.data.video_look.weigh -
|
||||
1].episode_id + '&vl_id=' + vlid
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
this.$getMsg(res.msg)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$getMsg('当前版本过低,请升级抖音后观看')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped lang="scss">
|
||||
.yichu {
|
||||
display: -webkit-box;
|
||||
/*将对象转为弹性盒模型展示*/
|
||||
-webkit-box-orient: vertical;
|
||||
/*设置弹性盒模型子元素的排列方式*/
|
||||
-webkit-line-clamp: 1;
|
||||
/*限制文本行数*/
|
||||
overflow: hidden;
|
||||
/*超出隐藏*/
|
||||
}
|
||||
|
||||
::v-deep .u-tabs__wrapper__nav__item {
|
||||
padding: 0 6rpx !important;
|
||||
}
|
||||
|
||||
::v-deep .u-search__content {
|
||||
background-color: #ffffff !important;
|
||||
}
|
||||
|
||||
.gitGiF {
|
||||
background-color: #fff;
|
||||
padding: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
font-size: 0rpx
|
||||
}
|
||||
|
||||
.imtext {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: -30rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.seek {
|
||||
font-size: 24rpx;
|
||||
background-color: #FE2C55;
|
||||
color: #ffffff;
|
||||
height: 32rpx;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
|
||||
.leftTriangle {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-top: 32rpx solid #FE2C55;
|
||||
border-right: 32rpx solid #FE2C55;
|
||||
border-left: 32rpx solid transparent;
|
||||
}
|
||||
|
||||
.rightTriangle {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-top: 32rpx solid #FE2C55;
|
||||
border-right: 32rpx solid transparent;
|
||||
border-left: 32rpx solid #FE2C55;
|
||||
}
|
||||
|
||||
.homeGif {
|
||||
width: 100%;
|
||||
height: 320rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -1,22 +1,294 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
<view class="heardbg u-p-l-30 u-p-r-30 u-p-t-20">
|
||||
<navbar :backopen="false"></navbar>
|
||||
<view class="u-flex" @click.stop="login">
|
||||
<u-avatar :src="userInfo.avatar" size="44"></u-avatar>
|
||||
<view class="u-m-l-20 u-flex-1 u-flex u-row-between">
|
||||
<view>
|
||||
<view v-if="!isLogin" class="u-flex">
|
||||
<view class="u-font-28 u-m-r-10">立即登录</view>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
<view v-else class="u-font-28 u-word-break u-line-1">{{userInfo.nickname}}</view>
|
||||
<view v-if="isLogin" class="u-m-t-10 u-font-22 u-color-666 u-word-break u-line-1">
|
||||
ID:{{userInfo.id}}</view>
|
||||
</view>
|
||||
<view v-if="isLogin" @click.stop="exit"
|
||||
class="u-border-f u-b-fff-2 u-color-aaa u-w-100 u-h-50 u-radius-40 u-lh-50 u-text-center u-font-24">
|
||||
退出</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-b-f u-radius-20 u-p-t-16 u-p-b-16 u-p-r-20 u-p-l-20 u-m-t-30">
|
||||
<view class="u-m-t-30 u-flex u-col-top u-row-around">
|
||||
<view class="u-text-center" @click="$u.route('/pagesA/my/VIPRecord')">
|
||||
<image src="/static/image/icon23.png" class="u-w-42 u-h-42"></image>
|
||||
<view class="u-m-t-6 u-font-22">VIP记录</view>
|
||||
</view>
|
||||
<!-- 抖音的IM 客服 data-im-id:客服的抖音号-->
|
||||
<button class="u-reset-button" open-type="contact">
|
||||
<view class="u-text-center">
|
||||
<image src="/static/image/icon26.png" class="u-w-42 u-h-42"></image>
|
||||
<view class="u-m-t-6 u-font-22">联系客服</view>
|
||||
</view>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-p-l-30 u-p-r-30 u-m-t-20">
|
||||
<view class="u-b-f u-radius-20 u-p-b-20">
|
||||
<u-tabs :list="tabList" lineColor="#C81F22" :current="current" @click="onclick"
|
||||
:IconShow="false"></u-tabs>
|
||||
<scroll-view scroll-y style="height: 51vh;" v-if="list.length>0" @scrolltolower="getbottom()">
|
||||
<view class="u-p-l-20 u-p-r-20 u-p-b-30">
|
||||
<view v-if="current == 0" class="u-flex u-m-t-30" v-for="(item,index) in list" :key="index">
|
||||
<u-image :src="item.img" @click="govideo(item.vl_id)" width="100rpx" height="140rpx"
|
||||
radius="5"></u-image>
|
||||
<view class="u-flex-1 u-m-l-20 u-flex u-row-between">
|
||||
<view @click="govideo(item.vl_id)">
|
||||
<view class="u-font-28 u-word-break u-line-1">{{item.vname}}</view>
|
||||
<view class="u-font-24 u-m-t-30 u-color-999">{{item.mid}}集</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="u-flex u-flex-wrap u-col-top">
|
||||
<view class="u-w-200 u-m-t-30 u-m-r-16" v-for="(item,index) in list" :key="index"
|
||||
@click="govideo(item.vl_id)">
|
||||
<image :src="item.img" class="u-w-200 u-h-280 u-radius-10" mode="aspectFill">
|
||||
</image>
|
||||
<view class="u-word-break u-line-1 u-m-t-10 u-font-26">{{item.vname}}</view>
|
||||
<view class="u-m-t-10 u-color-999 u-font-22">{{item.mid}}集</view>
|
||||
<view
|
||||
class="u-bnt-tabbar-FF5205-FF0591 u-radius-40 u-w-140 u-text-center u-p-t-10 u-p-b-10 u-font-22 u-m-t-10">
|
||||
点击观看</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view v-if="list.length>0" class="u-flex u-row-center">
|
||||
<view class="u-w-60 u-h-2 u-b-EC"></view>
|
||||
<view class="u-color-666 u-font-20">海量短剧 · 免费观看</view>
|
||||
<view class="u-w-60 u-h-2 u-b-EC"></view>
|
||||
</view>
|
||||
<empty v-if="list.length<1"></empty>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import navbar from '@/components/navbar.vue'
|
||||
import empty from '@/components/empty/empty.vue'
|
||||
import login from "@/utils/login";
|
||||
export default {
|
||||
components: {
|
||||
navbar,
|
||||
empty
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
isLogin: uni.getStorageSync('kyToken') ? true : false, //是否登录
|
||||
current: 0,
|
||||
paramster: {
|
||||
code: '', //授权code
|
||||
invite: '', //推广码
|
||||
ad_code: '', //巨量广告id
|
||||
source: '', //来源:1=自由授权,2=巨量来源
|
||||
},
|
||||
userInfo: {}, //用户信息
|
||||
page: 1,
|
||||
status: 'loadmore', //加载更多
|
||||
list: [],
|
||||
apiUrl: getApp().globalData.oss_url, //域名
|
||||
dy_im: getApp().globalData.dy_im,
|
||||
tabList: [{
|
||||
name: "看过"
|
||||
}, {
|
||||
name: "收藏"
|
||||
}]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getuserInfo()
|
||||
},
|
||||
onShow() {
|
||||
this.clear()
|
||||
},
|
||||
methods: {
|
||||
// 获取用户信息
|
||||
getuserInfo() {
|
||||
let that = this;
|
||||
that.$httpRequest({
|
||||
url: "/api/user/index",
|
||||
method: "GET",
|
||||
data: {}
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
this.userInfo = res.data
|
||||
uni.setStorageSync('userInfo', res.data)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
},
|
||||
// 登录
|
||||
login() {
|
||||
login.wxLogin().then(res => {
|
||||
this.getuserInfo()
|
||||
})
|
||||
},
|
||||
onclick(e) {
|
||||
this.current = e.index
|
||||
this.clear()
|
||||
},
|
||||
clear() {
|
||||
this.list = []
|
||||
this.page = 1
|
||||
if (this.current == 0) {
|
||||
this.videoLookList()
|
||||
} else {
|
||||
this.videoCollectList()
|
||||
}
|
||||
},
|
||||
// 观看记录
|
||||
videoLookList() {
|
||||
this.$httpRequest({
|
||||
url: "/api/video/videolog",
|
||||
methods: "GET",
|
||||
data: {
|
||||
limit: 15,
|
||||
page: this.page
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.rows.length < 15) {
|
||||
this.status = 'nomore';
|
||||
} else {
|
||||
this.page = this.page + 1;
|
||||
this.status = 'loadmore';
|
||||
}
|
||||
this.list = this.list.concat(res.rows);
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
// 收藏记录
|
||||
videoCollectList() {
|
||||
this.$httpRequest({
|
||||
url: "/api/video/recordlist",
|
||||
methods: "GET",
|
||||
data: {
|
||||
limit: 15,
|
||||
page: this.page
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.rows.length < 15) {
|
||||
this.status = 'nomore';
|
||||
} else {
|
||||
this.page = this.page + 1;
|
||||
this.status = 'loadmore';
|
||||
}
|
||||
this.list = this.list.concat(res.rows);
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
},
|
||||
//追剧的修改稿
|
||||
videoCollectAdd(item, index) {
|
||||
this.$api.videoCollectAdd({
|
||||
vl_id: item.vl_id, //剧目id
|
||||
vid: item.vid, //剧集id
|
||||
status: item.is_collect ? 2 : 1,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
if (!this.list[index].is_collect) {
|
||||
this.$getMsg('添加成功')
|
||||
} else {
|
||||
this.$getMsg('取消追剧')
|
||||
}
|
||||
this.list[index].is_collect = !this.list[index].is_collect
|
||||
}
|
||||
})
|
||||
},
|
||||
//添加小程序
|
||||
addApplet() {
|
||||
this.$getMsg('已添加成功', 1500, false, 'success')
|
||||
},
|
||||
// 进入短剧播放页面
|
||||
govideo(vlid) {
|
||||
if (tt.canIUse('video-player')) {
|
||||
uni.navigateTo({
|
||||
url: '/pagesA/index/VideoPlayer?vl_id=' + vlid
|
||||
})
|
||||
return
|
||||
this.$api.videoGroupInfo({
|
||||
vl_id: vlid,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
if (res.data.video_look == false) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/VideoPlayer?tt_album_id=' + res.data
|
||||
.album_id +
|
||||
'&tt_episode_id=' + res.data.video_info[0].episode_id +
|
||||
'&vl_id=' +
|
||||
vlid
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/VideoPlayer?tt_album_id=' + res.data
|
||||
.album_id +
|
||||
'&tt_episode_id=' + res.data.video_info[res.data
|
||||
.video_look.weigh -
|
||||
1].episode_id + '&vl_id=' + vlid
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$getMsg(res.msg)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$getMsg('当前版本过低,请升级抖音后观看')
|
||||
}
|
||||
},
|
||||
getbottom() {
|
||||
//避免多次触发
|
||||
if (this.status == 'loading' || this.status == 'nomore') {
|
||||
return;
|
||||
}
|
||||
if (this.current == 0) {
|
||||
this.videoLookList()
|
||||
} else {
|
||||
this.videoCollectList()
|
||||
}
|
||||
},
|
||||
// 退出
|
||||
exit() {
|
||||
uni.showModal({
|
||||
content: '确认退出登录',
|
||||
cancelText: '返回',
|
||||
confirmColor: '#C81F22',
|
||||
success: (s) => {
|
||||
if (s.confirm) {
|
||||
uni.removeStorageSync('djtoken')
|
||||
this.$getMsg('退出成功')
|
||||
this.isLogin = false
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped lang="scss">
|
||||
.heardbg {
|
||||
background: linear-gradient(173deg, #FEECEB, #FEECEB, #FFF6DD, #f7f7f7, #f7f7f7) no-repeat;
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
|
||||
.bg99 {
|
||||
background: #999;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
@@ -52,7 +52,7 @@
|
||||
</image>
|
||||
<view class="barName">金豆充值</view>
|
||||
</view>
|
||||
<view class="barItem" @click="goEarning" v-if="config.site.shop_type == 1">
|
||||
<view class="barItem" @click="goEarning" >
|
||||
<image class="barIcon" style="width: 72rpx;height: 72rpx;"
|
||||
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/qianbao.png" mode="scaleToFill">
|
||||
</image>
|
||||
@@ -313,7 +313,6 @@
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
memberLinkTo(e) {
|
||||
|
||||
@@ -0,0 +1,596 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="TopBox">
|
||||
<view class="bean">
|
||||
<image class="beanImg" mode="scaleToFill" src="@/static/image/jindou1.png"></image>
|
||||
<text class="beanText1">{{userinfo.beans || '0'}}金豆</text>
|
||||
</view>
|
||||
<view class="rightBox" style="display: flex;align-items: flex-end">
|
||||
<view class="view0"></view>
|
||||
<view class="view1"></view>
|
||||
<view class="view2"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="Box">
|
||||
<view class="Top">
|
||||
<view class="sign_conent_title">
|
||||
<text class="zitiyangshi">签到</text>
|
||||
<span class="sign_conent_title_span zitiyangshi">7</span>
|
||||
<text class="zitiyangshi">天得金豆</text>
|
||||
</view>
|
||||
<image class="rejoice" src="@/static/image/rejoice.png" mode=""></image>
|
||||
<view class="sign" @click="cksigin()">今日签到</view>
|
||||
</view>
|
||||
|
||||
<view class="signBox">
|
||||
|
||||
<view class="timeFormat">
|
||||
{{$u.timeFormat(new Date().getTime(), 'yyyy-mm-dd')}}
|
||||
</view>
|
||||
|
||||
<view class="succession">
|
||||
<view class="left">
|
||||
<view class="skytext">已连续签到</view>
|
||||
<view class="skytext" style="color: #FB5F97;padding: 0 6rpx;font-size: 32rpx;">{{qdjl}}</view>
|
||||
<view class="skytext">天</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
连续签到金豆翻倍哦
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<scroll-view class="scroll-view_H" scroll-x="true" show-scrollbar='false'>
|
||||
<view class="scroll_view_items" v-for="(item, index) in sign_list" :key="index">
|
||||
<view class="scroll_view_itemsv">
|
||||
<view class="scroll_view_item">
|
||||
<view class="scroll_view_item_img_box" :style="{width:index == 6?'72rpx':'89rpx'}">
|
||||
<view v-if="item.xz==2"
|
||||
style="width: 72rpx;height: 110rpx;background-color:#FD8FB7;text-align: center;border-radius: 8rpx;border: 2rpx solid rgba(64,21,32,0.2);">
|
||||
<view
|
||||
style="color: #fff;font-size: 30rpx;position: absolute;top: 56rpx;left: 20rpx;">
|
||||
{{item.beans}}
|
||||
</view>
|
||||
<image src="@/static/image/jindou.png"
|
||||
style="width: 54rpx;height: 56rpx;margin-top: 10rpx;"></image>
|
||||
</view>
|
||||
|
||||
<view v-if="item.xz==1"
|
||||
style="width: 72rpx;height: 110rpx;background-color: #FFEFF5;text-align: center;border-radius: 8rpx;border: 2rpx solid rgba(64,21,32,0.2);">
|
||||
<view
|
||||
style="color: #401520;font-size: 30rpx;position: absolute;top: 56rpx;left: 20rpx;">
|
||||
{{item.beans}}
|
||||
</view>
|
||||
<image src="@/static/image/jindou.png"
|
||||
style="width: 54rpx;height: 56rpx;margin-top: 10rpx;"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="scroll_view_item_tips" style="margin-top: 60rpx;">{{ item.day }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userinfo: {},
|
||||
//签到
|
||||
newsa: [],
|
||||
record: [],
|
||||
sign_list: [],
|
||||
qdjl: 0,
|
||||
tdsy: 0,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
onLoad(e) {
|
||||
|
||||
},
|
||||
onShow() {
|
||||
this.ongrzlTap()
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// getList() {
|
||||
// let that = this;
|
||||
// that.$httpRequest({
|
||||
// url: "/api/video/zuiju",
|
||||
// method: "GET",
|
||||
// data: {}
|
||||
// }).then(res => {
|
||||
// that.newsa = res.new
|
||||
// that.record = res.record
|
||||
// that.sign_list = res.getweek
|
||||
// that.qdjl = res.qdjl
|
||||
// that.tdsy = res.tdsy
|
||||
// }).catch(err => {
|
||||
// console.log(err)
|
||||
// })
|
||||
// },
|
||||
ongrzlTap() {
|
||||
this.$httpRequest({
|
||||
url: "/api/user/index",
|
||||
method: "POST"
|
||||
}).then(res => {
|
||||
if (res.data.code == 1) {
|
||||
this.userinfo = res.data.data;
|
||||
uni.setStorage({ //缓存配置信息
|
||||
key: 'userinfo',
|
||||
data: res.data.data
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
let this_ = this
|
||||
let data = {};
|
||||
if (uni.getStorageSync("userinfo")) {
|
||||
data.uid = uni.getStorageSync("userinfo").id;
|
||||
}
|
||||
this.$httpRequest({
|
||||
url: '/api/video/zuiju',
|
||||
data: data,
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
this.newsa = res.new
|
||||
this.record = res.record
|
||||
this.sign_list = res.getweek
|
||||
this.qdjl = res.qdjl
|
||||
this.tdsy = res.tdsy
|
||||
}).catch(err => {
|
||||
console.log('clientindex err', err)
|
||||
})
|
||||
},
|
||||
cksigin() {
|
||||
if (uni.getStorageSync("userinfo")) {
|
||||
let this_ = this
|
||||
let data = {};
|
||||
data.tdsy = this.tdsy
|
||||
data.token = uni.getStorageSync("userinfo").token
|
||||
data.uid = uni.getStorageSync("userinfo").id
|
||||
this.$httpRequest({
|
||||
url: '/api/user/qingdao',
|
||||
data: data,
|
||||
}).then(res => {
|
||||
this_.getList()
|
||||
uni.showToast({
|
||||
title: res.data.msg,
|
||||
duration: 1500,
|
||||
icon: 'none'
|
||||
});
|
||||
}).catch(err => {
|
||||
console.log('clientindex err', err)
|
||||
})
|
||||
} else {
|
||||
console.log(123);
|
||||
uni.showToast({
|
||||
title: '请您先登录',
|
||||
duration: 1500,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@font-face {
|
||||
font-family: "MyFont";
|
||||
src: url('https://youlu.youlu.xyz/assets/fonts/ZiTiaoZiChangGuDan-Shan-ChaoHei.ttf');
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(173deg, #FEECEB, #FEECEB, #FFF6DD, #f7f7f7, #f7f7f7) no-repeat;
|
||||
padding: 40rpx 36rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.zitiyangshi {
|
||||
font-family: 'MyFont';
|
||||
font-weight: 500;
|
||||
font-size: 34rpx;
|
||||
color: #401520;
|
||||
}
|
||||
|
||||
.TopBox {
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.bean {
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
.view0 {
|
||||
border-left: 20rpx solid transparent;
|
||||
border-top: 20rpx solid transparent;
|
||||
border-right: 20rpx solid #fff;
|
||||
border-bottom: 6rpx solid #fff;
|
||||
}
|
||||
|
||||
.view1 {
|
||||
width: 40rpx;
|
||||
height: 64rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 34rpx 0 0 0;
|
||||
}
|
||||
|
||||
.view2 {
|
||||
margin-right: 16rpx;
|
||||
border-left: 150rpx solid #fff;
|
||||
border-top: 30rpx solid transparent;
|
||||
border-right: 150rpx solid transparent;
|
||||
border-bottom: 34rpx solid #fff;
|
||||
|
||||
}
|
||||
|
||||
.beanText1 {
|
||||
color: #401520;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
line-height: 50rpx;
|
||||
padding-bottom: 12rpx;
|
||||
padding-left: 8rpx;
|
||||
}
|
||||
|
||||
.beanImg {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.Box {
|
||||
background-color: #fff;
|
||||
border-radius: 32rpx;
|
||||
width: 100%;
|
||||
// min-height: 600rpx;
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.Top {
|
||||
display: flex;
|
||||
position: relative;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 28rpx;
|
||||
|
||||
.sign_conent_title {
|
||||
// width: 100%;
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
|
||||
.sign_conent_title_span {
|
||||
color: #FB3D82 !important;
|
||||
font-size: 48rpx;
|
||||
margin-left: 12rpx;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.rejoice {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
position: absolute;
|
||||
left: 300rpx;
|
||||
top: -96rpx;
|
||||
}
|
||||
|
||||
.sign {
|
||||
width: 168rpx;
|
||||
height: 64rpx;
|
||||
background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.5) 100%), #FB3D82;
|
||||
border-radius: 40rpx 40rpx 40rpx 40rpx;
|
||||
|
||||
font-family: OPPOSans, OPPOSans;
|
||||
font-weight: 400;
|
||||
font-size: 26rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 64rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.signBox {
|
||||
width: 638rpx;
|
||||
height: 282rpx;
|
||||
background: #FFF7F9;
|
||||
border-radius: 24rpx;
|
||||
padding: 16rpx;
|
||||
|
||||
.timeFormat {
|
||||
font-family: OPPOSans, OPPOSans;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #BB959E;
|
||||
line-height: 29rpx;
|
||||
}
|
||||
|
||||
.succession {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 16rpx 0;
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
|
||||
.skytext {
|
||||
font-family: OPPOSans, OPPOSans;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #401520;
|
||||
line-height: 29rpx
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
font-family: OPPOSans, OPPOSans;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #BB959E;
|
||||
line-height: 24rpx;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.scroll-view_H {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
white-space: nowrap;
|
||||
|
||||
.scroll_view_items {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.scroll_view_itemsv {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.scroll_view_item {
|
||||
.scroll_view_item_img_box {
|
||||
width: 90rpx;
|
||||
height: 30rpx;
|
||||
position: relative;
|
||||
|
||||
.scroll_view_item_top {
|
||||
font-size: 24upx;
|
||||
color: #bfbfbf;
|
||||
// font-weight: bold;
|
||||
position: absolute;
|
||||
top: 14upx;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.scroll_view_item_bottom {
|
||||
font-size: 12upx;
|
||||
color: #ffe29d;
|
||||
position: absolute;
|
||||
bottom: 18upx;
|
||||
left: 42upx;
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
|
||||
.scroll_view_item_tips {
|
||||
width: 72upx;
|
||||
text-align: center;
|
||||
font-size: 24upx;
|
||||
padding-top: 40upx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.scroll_view_item_img {
|
||||
width: 60upx;
|
||||
height: 60upx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.scroll_xian {
|
||||
width: 40upx;
|
||||
height: 4upx;
|
||||
background: #bfbfbf;
|
||||
margin-top: 30upx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.integral-mall-goods {
|
||||
width: 100%;
|
||||
height: 280rpx;
|
||||
background: #F2F2F2;
|
||||
border-radius: 16upx;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<style scoped>
|
||||
.patop80 {
|
||||
padding-top: 80rpx;
|
||||
}
|
||||
|
||||
.home-header {
|
||||
height: 300rpx;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
border-radius: 0rpx 0rpx 48rpx 48rpx;
|
||||
}
|
||||
|
||||
.home-main {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
margin-top: -156rpx;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
.home-mendian {
|
||||
width: 100%;
|
||||
height: 84rpx;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
border-radius: 42rpx;
|
||||
}
|
||||
|
||||
.integral-mall-header {
|
||||
position: relative;
|
||||
height: 320rpx;
|
||||
}
|
||||
|
||||
.integral-mall-header .bg {
|
||||
width: 100%;
|
||||
height: 320rpx;
|
||||
}
|
||||
|
||||
.integral-mall-header .main {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 320rpx;
|
||||
}
|
||||
|
||||
.swiper-integral {
|
||||
height: 32rpx;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.integral-mall-main {
|
||||
position: relative;
|
||||
/* margin-top: -104rpx; */
|
||||
}
|
||||
|
||||
.integal-mall-menu {
|
||||
width: 100%;
|
||||
height: 190rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.integral-tuan-l {
|
||||
width: 100%;
|
||||
height: 280rpx;
|
||||
background: #f2f2f2;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
|
||||
.integral-mall-coupon {
|
||||
background: #FFFFFF;
|
||||
position: relative;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.integral-mall-coupon .top {
|
||||
padding: 0rpx 0rpx 24rpx 0rpx;
|
||||
border-bottom: 2rpx dashed #FEC675;
|
||||
}
|
||||
|
||||
.integral-mall-coupon .y-l,
|
||||
.integral-mall-coupon .y-r {
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
background: #F5F6FA;
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
top: 284rpx;
|
||||
}
|
||||
|
||||
.integral-mall-coupon .y-l {
|
||||
left: -10rpx;
|
||||
}
|
||||
|
||||
.integral-mall-coupon .y-r {
|
||||
right: -10rpx;
|
||||
}
|
||||
|
||||
.integral-mall-coupon .coupon-value {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.integral-mall-coupon .coupon-value image {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.integral-mall-coupon .coupon-value .num {
|
||||
width: 100%;
|
||||
height: 64rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.integral-mall-goods {
|
||||
width: 100%;
|
||||
height: 280rpx;
|
||||
background: #F2F2F2;
|
||||
border-radius: 16upx;
|
||||
}
|
||||
|
||||
.titleNview-placing {
|
||||
height: var(--status-bar-height);
|
||||
padding-top: 44px;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.tuan-product-l {
|
||||
width: 150rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 16rpx;
|
||||
background: #F2F2F2;
|
||||
}
|
||||
|
||||
.tuan-product-r {
|
||||
width: calc(100% - 150rpx);
|
||||
}
|
||||
|
||||
.btn-vip-adviser_bg {
|
||||
width: 155rpx;
|
||||
height: 65rpx;
|
||||
border-radius: 12rpx;
|
||||
background-image: linear-gradient(180deg, #70FEBC 0%, #0BD99F 100%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.btn-vip-adviser {
|
||||
width: 150rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 12rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 28rpx;
|
||||
/* font-weight: 600; */
|
||||
background: #FFF;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,144 @@
|
||||
<template>
|
||||
<view>
|
||||
<image src="/static/image/icon11.png" class="w-100 u-h-166"></image>
|
||||
<view class="u-relative u-b-f u-radius-30 u-p-30" style="margin-top: -30rpx;">
|
||||
<u-tabs :list="videoMenuList" IconShow keyName="name" lineWidth="0" :curennt="curennt"
|
||||
:activeStyle="{padding:'0rpx 20rpx',fontSize:'30rpx'}"
|
||||
:inactiveStyle="{padding:'0rpx 20rpx',color:'#86909C',fontSize:'24rpx'}" @click="TabsClick"></u-tabs>
|
||||
<view class="u-m-t-40 u-flex u-col-top" v-for="(item,index) in recommendList" :key="index"
|
||||
@click.stop="govideo(item.id)">
|
||||
<view class="u-relative u-m-r-16">
|
||||
<u-image :src="apiUrl+item.img" width="130rpx" height="170rpx" radius="5"></u-image>
|
||||
<image v-show="index==0 " src="/static/image/icon8.png" class="u-w-40 u-h-40 u-absolute u-index-1"
|
||||
style="top: 0px;left:-2px;"></image>
|
||||
<image v-show="index==1 " src="/static/image/icon9.png" class="u-w-40 u-h-40 u-absolute u-index-1"
|
||||
style="top: 0px;left:-2px;"></image>
|
||||
<image v-show="index==2 " src="/static/image/icon10.png" class="u-w-40 u-h-40 u-absolute u-index-1"
|
||||
style="top: 0px;left:-2px;"></image>
|
||||
<view v-show="index>2"
|
||||
class="u-w-40 u-h-40 u-b-F9E1E9 u-text-center u-lh-40 u-font-20 u-absolute u-index-1"
|
||||
style="border-radius:0 0 20rpx 0 ;top: 0px;left:0px;">{{index+1}}</view>
|
||||
</view>
|
||||
<view class="u-flex-1 u-flex-col u-h-170 u-row-between">
|
||||
<view class="u-flex u-row-between">
|
||||
<view class="u-word-break u-line-1 u-font-26">{{item.name}}</view>
|
||||
<view class="u-flex">
|
||||
<image src="/static/image/icon12.png" class="u-w-30 u-h-30"></image>
|
||||
<view class="u-m-l-10 u-font-22 u-color-666">{{item.views}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-word-break u-font-20 u-color-999 u-line-2">
|
||||
{{item.story}}
|
||||
</view>
|
||||
<view class="u-color-999 u-font-24">
|
||||
<!-- {{item.album_status == 1?'未上映':item.album_status == 2?'更新中':'已完结'}} -->
|
||||
共{{item.sum}}集
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<empty v-if="recommendList.length<1"></empty>
|
||||
<u-loadmore v-if="recommendList.length>0" :status="status" icon-color="#999999" color="#999999"
|
||||
icon-type="circle" margin-top="30" margin-bottom="30" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
videoMenuList: [], //剧栏目
|
||||
curennt: 0, //当前栏目索引
|
||||
recommendList: [], //剧栏目列表数据
|
||||
apiUrl: getApp().globalData.oss_url, //域名
|
||||
status: 'loadmore', //加载更多
|
||||
parameter: {
|
||||
limit: 15, //每页的总条数
|
||||
page: 1, //页码
|
||||
menu_id: '', //剧栏目id
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(opt) {
|
||||
this.curennt = opt.curennt
|
||||
this.videoMenu()
|
||||
},
|
||||
// 下拉到底事件
|
||||
onReachBottom() {
|
||||
//避免多次触发
|
||||
if (this.status == 'loading' || this.status == 'nomore') {
|
||||
return;
|
||||
}
|
||||
this.videoGroupList()
|
||||
},
|
||||
methods: {
|
||||
// 剧栏目
|
||||
videoMenu() {
|
||||
this.$httpRequest({
|
||||
url: '/api/pno/videoMenu',
|
||||
method: 'GET',
|
||||
isLoading: true,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
res.data[0].after_image = require('@/static/image/icon2.png')
|
||||
res.data[0].before_image = require('@/static/image/icon1.png')
|
||||
res.data[1].after_image = require('@/static/image/icon4.png')
|
||||
res.data[1].before_image = require('@/static/image/icon3.png')
|
||||
res.data[2].after_image = require('@/static/image/icon6.png')
|
||||
res.data[2].before_image = require('@/static/image/icon5.png')
|
||||
this.videoMenuList = res.data
|
||||
this.clear()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 剧栏目tab切换事件
|
||||
TabsClick(e) {
|
||||
this.curennt = e.index
|
||||
this.clear()
|
||||
},
|
||||
clear() {
|
||||
this.parameter.menu_id = this.videoMenuList[this.curennt].id
|
||||
this.recommendList = []
|
||||
this.parameter.page = 1
|
||||
this.videoGroupList()
|
||||
},
|
||||
// 剧栏目列表数据
|
||||
videoGroupList() {
|
||||
this.$httpRequest({
|
||||
url: '/api/pno/videoGroupList',
|
||||
method: 'GET',
|
||||
data: {
|
||||
...this.parameter
|
||||
},
|
||||
isLoading: true,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
if (res.data.data.length < this.parameter.limit) {
|
||||
this.status = 'nomore';
|
||||
} else {
|
||||
this.parameter.page = this.parameter.page + 1;
|
||||
this.status = 'loadmore';
|
||||
}
|
||||
this.recommendList = this.recommendList.concat(res.data.data);
|
||||
uni.stopPullDownRefresh();
|
||||
}
|
||||
})
|
||||
}, // 进入短剧播放页面
|
||||
govideo(vlid) {
|
||||
if (tt.canIUse('video-player')) {
|
||||
uni.navigateTo({
|
||||
url: '/pagesA/index/VideoPlayer?vl_id=' + vlid
|
||||
})
|
||||
} else {
|
||||
this.$getMsg('当前版本过低,请升级抖音后观看')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,206 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="u-p-30">
|
||||
<u-search v-model="keyword" placeholder="搜短剧名/演员名,免费看短剧" borderColor="#C81F22" searchIconColor="#C81F22"
|
||||
:inputStyle="{backgroundColor:'#ffffff'}" @custom="onSearch"></u-search>
|
||||
<view v-if="SearchHistory.length>0">
|
||||
<view class="u-m-t-30 u-flex u-row-between">
|
||||
<view class="u-font-30">历史搜索</view>
|
||||
<view class="u-flex" @click="shanchu()">
|
||||
<u-icon name="trash" size="18"></u-icon>
|
||||
<view class="u-m-l-10 u-font-24 u-color-999">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex u-flex-wrap">
|
||||
<view class="u-m-t-20 u-m-r-20" v-for="(item,index) in SearchHistory" :key="index">
|
||||
<u-tag @click="$u.route({type:'redirect',url:'/pagesA/index/searchList?keyword='+item})"
|
||||
:text="item" bgColor="#f5f5f5" borderColor="#f5f5f5" color="#333" shape="circle"></u-tag>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-x class="w-100" v-if="recommendList.length>0">
|
||||
<view class="u-flex u-col-top u-m-t-40">
|
||||
<view class="u-radius-10 u-b-f u-p-b-56 u-m-r-20" style="width: 480rpx;flex-shrink: 0"
|
||||
v-for="(item,index) in recommendList" :key="index">
|
||||
<view :class="(index+1)%3==0?'bg3':(index+1)%2==0?'bg2':'bg1'"
|
||||
class="u-flex u-p-l-30 u-p-t-6 u-p-b-6 u-radius-20 u-p-r-30 u-col-bottom u-row-between">
|
||||
<view class="u-font-34 u-fw-600">{{item.cartName}}</view>
|
||||
<image v-if="(index+1)%3==0" src="/static/image/icon15.png" class="u-w-70 u-h-70"></image>
|
||||
<image v-else-if="(index+1)%2==0" src="/static/image/icon16.png" class="u-w-70 u-h-70">
|
||||
</image>
|
||||
<image v-else src="/static/image/icon13.png" class="u-w-70 u-h-70"></image>
|
||||
</view>
|
||||
<view @click.stop="govideo(item1.id)" v-if="index1<8"
|
||||
class="u-m-t-30 u-p-l-30 u-p-r-30 u-flex u-col-top" style="width: 380rpx;"
|
||||
v-for="(item1,index1) in item.list" :key="index1">
|
||||
<view class="u-relative">
|
||||
<u-image :src="apiUrl+item1.img" width="100rpx" height="140rpx" radius="5"></u-image>
|
||||
<image v-show="index1 == 0" src="/static/image/icon17.png"
|
||||
class="u-w-40 u-h-40 u-absolute u-index-1" style="top: 0px;left:-2px;"></image>
|
||||
<image v-show="index1 == 1" src="/static/image/icon18.png"
|
||||
class="u-w-40 u-h-40 u-absolute u-index-1" style="top: 0px;left:-2px;"></image>
|
||||
<image v-show="index1 == 2" src="/static/image/icon19.png"
|
||||
class="u-w-40 u-h-40 u-absolute u-index-1" style="top: 0px;left:-2px;"></image>
|
||||
<view v-show="index1 >2"
|
||||
class="u-w-40 u-h-40 u-b-000-03 u-text-center u-lh-40 u-font-20 u-absolute u-index-1 u-color-f"
|
||||
style="border-radius:0 0 20rpx 0 ;top: 0px;left:-2px;">{{index1+1}}</view>
|
||||
</view>
|
||||
<view class="u-flex-1 u-m-l-10 u-flex-col u-row-between u-h-120 u-p-t-10 u-p-b-10">
|
||||
<view class="u-word-break u-line-1 u-font-26">{{item1.name}}</view>
|
||||
<view class="u-flex">
|
||||
<image src="/static/image/icon14.png" class="u-w-28 u-h-34"></image>
|
||||
<view class="u-color-C76B52 u-font-22 u-m-l-10 u-word-break u-line-1">
|
||||
热度值{{item1.views}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-font-24 u-color-999 u-word-break u-line-1">{{item1.video_cat}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.list.length>7" @click.stop="$u.route(`/pagesA/index/charts?curennt=${index}`)"
|
||||
class="u-flex u-row-center u-m-t-30">
|
||||
<view class="u-font-24 u-color-999 u-m-r-6">查看全部榜单</view>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
keyword: '', //关键字
|
||||
SearchHistory: [], //搜索历史
|
||||
recommendList: [],
|
||||
apiUrl: getApp().globalData.oss_url, //域名
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.SearchHistory = []
|
||||
if (uni.getStorageSync('HistoryArray')) {
|
||||
this.SearchHistory = uni.getStorageSync('HistoryArray')
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.videoMenu()
|
||||
},
|
||||
methods: {
|
||||
onSearch() {
|
||||
if (this.keyword == '') {
|
||||
this.$getMsg('请输入搜索关键字')
|
||||
} else {
|
||||
let index = this.SearchHistory.findIndex(item => item == this.keyword)
|
||||
if (index > -1) {
|
||||
uni.redirectTo({
|
||||
url: '/pagesA/index/searchList?keyword=' + this.keyword
|
||||
})
|
||||
} else {
|
||||
this.SearchHistory.push(this.keyword)
|
||||
uni.setStorageSync('HistoryArray', this.SearchHistory)
|
||||
uni.redirectTo({
|
||||
url: '/pagesA/index/searchList?keyword=' + this.keyword
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
shanchu() {
|
||||
uni.removeStorageSync('HistoryArray')
|
||||
this.SearchHistory = []
|
||||
},
|
||||
// 剧栏目
|
||||
videoMenu() {
|
||||
let that = this;
|
||||
that.$httpRequest({
|
||||
url: '/api/pno/videoMenu',
|
||||
method: 'GET',
|
||||
isLoading: true,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
this.recommendList = []
|
||||
res.data.forEach(item => {
|
||||
this.videoGroupList(item)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 剧栏目列表数据
|
||||
videoGroupList(item) {
|
||||
this.$httpRequest({
|
||||
url: '/api/pno/videoGroupList',
|
||||
method: 'GET',
|
||||
data: {
|
||||
menu_id: item.id
|
||||
},
|
||||
isLoading: true,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
this.recommendList.push({
|
||||
cartName: item.name,
|
||||
list: res.data.data
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 进入短剧播放页面
|
||||
govideo(vlid) {
|
||||
if (tt.canIUse('video-player')) {
|
||||
uni.navigateTo({
|
||||
url: '/pagesA/index/VideoPlayer?vl_id=' + vlid
|
||||
})
|
||||
return
|
||||
this.$api.videoGroupInfo({
|
||||
vl_id: vlid,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
if (res.data.video_look == false) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/VideoPlayer?tt_album_id=' + res.data.album_id +
|
||||
'&tt_episode_id=' + res.data.video_info[0].episode_id + '&vl_id=' +
|
||||
vlid
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/VideoPlayer?tt_album_id=' + res.data.album_id +
|
||||
'&tt_episode_id=' + res.data.video_info[res.data.video_look.weigh -
|
||||
1].episode_id + '&vl_id=' + vlid
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
this.$getMsg(res.msg)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$getMsg('当前版本过低,请升级抖音后观看')
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background: linear-gradient(to top, #f8f8f8, #ffffff) no-repeat;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
::v-deep .u-search__content {
|
||||
background-color: #ffffff !important;
|
||||
}
|
||||
|
||||
.bg1 {
|
||||
background: linear-gradient(to top, #ffffff, #FFF9E6);
|
||||
}
|
||||
|
||||
.bg2 {
|
||||
background: linear-gradient(to top, #ffffff, #FFF0ED);
|
||||
}
|
||||
|
||||
.bg3 {
|
||||
background: linear-gradient(to top, #ffffff, #E0FFFF);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,122 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="u-p-30">
|
||||
<u-search v-model="paramster.keyword" placeholder="搜短剧名/演员名,免费看短剧" borderColor="#C81F22"
|
||||
searchIconColor="#C81F22" :inputStyle="{backgroundColor:'#ffffff'}" @custom="clear" @search="clear"
|
||||
@clickIcon="clear" @clear="clear"></u-search>
|
||||
</view>
|
||||
<view :class="item.is_top==1?'u-b-FFEFEF-6':''"
|
||||
class="u-m-b-20 u-flex u-col-top u-p-t-20 u-p-b-20 u-p-l-30 u-p-r-30 u-relative"
|
||||
@click.stop="govideo(item.id)" v-for="(item,index) in list" :key="index">
|
||||
<image v-if="item.is_top==1" src="/static/image/icon20.png" class="u-w-84 u-h-94 u-absolute u-index-1"
|
||||
style="right: 30rpx;"></image>
|
||||
<u-image :src="apiUrl+item.img" width="150rpx" height="200rpx" radius="5"></u-image>
|
||||
<view class="u-flex-1 u-m-l-20 u-p-t-10 u-p-b-10 u-flex-col u-row-between u-h-180">
|
||||
<view class="u-font-30 u-fw-500 u-word-break u-line-1" :class="item.is_top==1?'u-color-FE5A5B':''">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<!-- <view class="u-font-24 u-word-break u-line-1 u-color-999">{{item.actor}}</view> -->
|
||||
<view class="u-font-24 u-word-break u-line-1 u-color-999">{{item.type_text}} | {{item.sum}}集</view>
|
||||
<view class="u-font-24 u-word-break u-line-2 u-color-999">{{item.story}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<empty v-if="list.length<1"></empty>
|
||||
<u-loadmore v-if="list.length>0" :status="status" icon-color="#999999" color="#999999" icon-type="circle"
|
||||
margin-top="30"/>
|
||||
<view style="padding-top: 30rpx;"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
paramster: {
|
||||
keyword: '',
|
||||
page: 1,
|
||||
limit: 15,
|
||||
},
|
||||
list: [],
|
||||
status: 'loadmore', //加载更多
|
||||
apiUrl: getApp().globalData.oss_url, //域名
|
||||
}
|
||||
},
|
||||
onLoad(opt) {
|
||||
this.paramster.keyword = opt.keyword
|
||||
this.clear()
|
||||
},
|
||||
methods: {
|
||||
clear() {
|
||||
this.list = []
|
||||
this.page = 1
|
||||
this.videoGroupList()
|
||||
},
|
||||
// 剧栏目列表数据
|
||||
videoGroupList() {
|
||||
this.$httpRequest({
|
||||
url: '/api/pno/videoGroupList',
|
||||
method: 'GET',
|
||||
data: {
|
||||
...this.parameter
|
||||
},
|
||||
isLoading: true,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
if (res.data.data.length < this.paramster.limit) {
|
||||
this.status = 'nomore';
|
||||
} else {
|
||||
this.paramster.page = this.paramster.page + 1;
|
||||
this.status = 'loadmore';
|
||||
}
|
||||
this.list = this.list.concat(res.data.data);
|
||||
uni.stopPullDownRefresh();
|
||||
}
|
||||
})
|
||||
},
|
||||
// 进入短剧播放页面
|
||||
govideo(vlid) {
|
||||
if (tt.canIUse('video-player')) {
|
||||
uni.navigateTo({
|
||||
url: '/pagesA/index/VideoPlayer?vl_id=' + vlid
|
||||
})
|
||||
return
|
||||
this.$api.videoGroupInfo({
|
||||
vl_id: vlid,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
if (res.data.video_look == false) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/VideoPlayer?tt_album_id=' + res.data.album_id +
|
||||
'&tt_episode_id=' + res.data.video_info[0].episode_id + '&vl_id=' +
|
||||
vlid
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/VideoPlayer?tt_album_id=' + res.data.album_id +
|
||||
'&tt_episode_id=' + res.data.video_info[res.data.video_look.weigh -
|
||||
1].episode_id + '&vl_id=' + vlid
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
this.$getMsg(res.msg)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$getMsg('当前版本过低,请升级抖音后观看')
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
::v-deep .u-search__content {
|
||||
background-color: #ffffff !important;
|
||||
}
|
||||
</style>
|
||||
|
After Width: | Height: | Size: 804 B |
|
After Width: | Height: | Size: 643 B |
|
After Width: | Height: | Size: 1000 B |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 576 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
@@ -361,3 +361,7 @@ button::after{
|
||||
margin-top: 0;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -47,23 +47,27 @@ const options = {
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.code == 401) {
|
||||
console.log('no login')
|
||||
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: "请登录后再进行操作",
|
||||
confirmText: "确定",
|
||||
cancelText: '取消',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
let nowPage = getCurrentPages();
|
||||
let pageNum = nowPage.length - 1;
|
||||
console.log(nowPage)
|
||||
uni.setStorageSync('loginPage', nowPage[pageNum].route)
|
||||
uni.navigateTo({url: "/pagesA/login/login"})
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(213);
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (s) => {
|
||||
uni.request({
|
||||
url: apiUrl.apiUrl + '/api/user/getOpenid', //仅为示例,并非真实接口地址。
|
||||
data: {
|
||||
code: s.code,
|
||||
ad_code: uni.getStorageSync('get_ad_code'),
|
||||
invite: uni.getStorageSync("invite_number")
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.code == 1) {
|
||||
uni.setStorageSync("userinfo", res.data.userinfo);
|
||||
uni.setStorageSync("token", res.data.userinfo.token);
|
||||
uni.setStorageSync("config", res.data.config);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
reject(res.data)
|
||||
} else if (res.data.code == 0) {
|
||||
resolve(res.data)
|
||||
|
||||