Commit cb800588 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 5f9d231f
<template> <template>
<view class="body"> <view class="body">
<view v-if="showMask" class="show-mask flex-v" @click="showMask=false"> <view v-if="showMask" class="show-mask flex-v" @click="showMask=false">
<view class="mt-30" style="width: 90%;text-align: right;"> <view class="mt-30" style="width: 90%;text-align: right;">
<image style="width: 30rpx;height: 30rpx;padding:6rpx; <image style="width: 30rpx;height: 30rpx;padding:6rpx;
border-radius: 40rpx;border: 2px solid darkgray;" src="@/static/index/ic_quit_white.png" /> border-radius: 40rpx;border: 2px solid darkgray;" src="@/static/index/ic_quit_white.png" />
</view> </view>
<text class="mt-10" style="font-size: 46rpx;">如何继续看剧?</text> <text class="mt-10" style="font-size: 46rpx;">如何继续看剧?</text>
<text class="m-10">找到“寻觅短剧” 小程序</text> <text class="m-10">找到“星夜剧场” 小程序</text>
<image class="mt-30" mode="widthFix" :src="maskImage1"></image> <image class="mt-30" mode="widthFix" :src="maskImage1"></image>
<image :src="maskImage2" mode="widthFix"></image> <image :src="maskImage2" mode="widthFix"></image>
</view> </view>
<z-paging class="flex-1" ref="paging" v-model="dataList" @query="queryList"> <z-paging class="flex-1" ref="paging" v-model="dataList" @query="queryList">
<view class="search-wrap"> <view class="search-wrap">
<!-- <image style="width: 80rpx; height: 80rpx" src="@/static/index/ic_quit_white.png"></image> --> <!-- <image style="width: 80rpx; height: 80rpx" src="@/static/index/ic_quit_white.png"></image> -->
<view class="search-bar" @click="handleSearchPage"> <view class="search-bar" @click="handleSearchPage">
<image style="width: 40rpx; height: 40rpx" src="@/static/search.png"></image> <image style="width: 40rpx; height: 40rpx" src="@/static/search.png"></image>
<text style="margin-left: 30rpx;color: darkgray;">{{ <text style="margin-left: 30rpx;color: darkgray;">{{
bannerList.length > 0 ? bannerList[0].title : '' bannerList.length > 0 ? bannerList[0].title : ''
}}</text> }}</text>
</view> </view>
</view> </view>
<view class="content"> <view class="content">
<swiper class="banner" :style="'margin-top:'+statusBarHeight+'px;'" :indicator-dots="true" <swiper class="banner" :style="'margin-top:'+statusBarHeight+'px;'" :indicator-dots="true"
:autoplay="true" :interval="2000" :duration="500"> :autoplay="true" :interval="2000" :duration="500">
<swiper-item v-for="banner in bannerList" :key="banner.vedioId" @click="handleBanner(banner)"> <swiper-item v-for="banner in bannerList" :key="banner.vedioId" @click="handleBanner(banner)">
<image class="banner-img" :src="banner.tabImage" mode="aspectFill"></image> <image class="banner-img" :src="banner.tabImage" mode="aspectFill"></image>
</swiper-item> </swiper-item>
</swiper> </swiper>
<view <view
style="display: flex;flex-direction: column;background-color:white;border-radius:10rpx;margin-top: 20rpx;"> style="display: flex;flex-direction: column;background-color:white;border-radius:10rpx;margin-top: 20rpx;">
<view style="font-size: 30rpx;font-weight: 777;margin-left: 12rpx;margin-top: 18rpx;">排行榜</view> <view style="font-size: 30rpx;font-weight: 777;margin-left: 12rpx;margin-top: 18rpx;">排行榜</view>
<scroll-view scroll-x="true" style="white-space: nowrap; margin-top: 18rpx;"> <scroll-view scroll-x="true" style="white-space: nowrap; margin-top: 18rpx;">
<block v-for="(item, index) in topList" :key="item.vedioId"> <block v-for="(item, index) in topList" :key="item.vedioId">
<view @click="handleTop(item)" <view @click="handleTop(item)"
style="display:inline-block;background-color:white;border-radius:10rpx;width: 200rpx;margin: 5rpx 10rpx 15rpx 10rpx;"> style="display:inline-block;background-color:white;border-radius:10rpx;width: 200rpx;margin: 5rpx 10rpx 15rpx 10rpx;">
<view style="position: relative;"> <view style="position: relative;">
<view style="position: relative;"> <view style="position: relative;">
<view style="position: absolute;z-index: 10;margin-left: 20rpx;"> <view style="position: absolute;z-index: 10;margin-left: 20rpx;">
<view style="position: relative;"> <view style="position: relative;">
<view style=" <view style="
position: absolute; position: absolute;
z-index: 10; z-index: 10;
width: 50rpx; width: 50rpx;
text-align: center; text-align: center;
margin-top: 8rpx; margin-top: 8rpx;
font-size: 24rpx; font-size: 24rpx;
color: white;"> color: white;">
{{index+1}} {{index+1}}
</view> </view>
<image v-if="index==0" <image v-if="index==0"
style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;" style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
src="../../static/index/y43.png"></image> src="../../static/index/y43.png"></image>
<image v-else-if="index==1" <image v-else-if="index==1"
style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;" style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
src="../../static/index/y42.png"></image> src="../../static/index/y42.png"></image>
<image v-else-if="index==2" <image v-else-if="index==2"
style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;" style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
src="../../static/index/y41.png"></image> src="../../static/index/y41.png"></image>
<image v-else <image v-else
style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;" style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
src="../../static/index/y4.png"></image> src="../../static/index/y4.png"></image>
</view> </view>
</view> </view>
<image style="border-radius:10rpx; width: 200rpx;height: 260rpx;" <image style="border-radius:10rpx; width: 200rpx;height: 260rpx;"
:src="item.coverImage" mode="aspectFill"></image> :src="item.coverImage" mode="aspectFill"></image>
</view> </view>
<view style=" <view style="
position: absolute; position: absolute;
bottom: 10rpx; bottom: 10rpx;
background-color: black; background-color: black;
width: 100%; width: 100%;
opacity: 0.5; opacity: 0.5;
"> ">
<view style="display: flex;align-items: center;margin-left: 10rpx;"> <view style="display: flex;align-items: center;margin-left: 10rpx;">
<image <image
style="width: 20rpx;height: 20rpx;display: flex;align-items: right;margin-right: 10rpx;" style="width: 20rpx;height: 20rpx;display: flex;align-items: right;margin-right: 10rpx;"
src="../../static/index/ic_index_play.png"></image> src="../../static/index/ic_index_play.png"></image>
<view style="font-size: 22rpx;color: white;">{{item.showNum}}</view> <view style="font-size: 22rpx;color: white;">{{item.showNum}}</view>
</view> </view>
</view> </view>
</view> </view>
<view style="font-size: 26rpx;margin-top: 10rpx;height: 62rpx;">{{item.title}}</view> <view style="font-size: 26rpx;margin-top: 10rpx;height: 62rpx;">{{item.title}}</view>
<view class="ellipsis" style="font-size: 22rpx;margin-top: 10rpx;" <view class="ellipsis" style="font-size: 22rpx;margin-top: 10rpx;"
v-if="item.orderTags!=null&&item.orderTags.length>0"> v-if="item.orderTags!=null&&item.orderTags.length>0">
<scroll-view scroll-x="true"> <scroll-view scroll-x="true">
<block v-for="t in item.orderTags" :key="item.orderTags"> <block v-for="t in item.orderTags" :key="item.orderTags">
<view style="display:inline-block;margin-right: 4rpx;">{{t}} </view> <view style="display:inline-block;margin-right: 4rpx;">{{t}} </view>
</block> </block>
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
</block> </block>
</scroll-view> </scroll-view>
</view> </view>
<!-- <view <!-- <view
style="font-size: 30rpx;font-weight: 777;margin-top: 20rpx;margin-bottom: 10rpx;margin-left: 4rpx;"> style="font-size: 30rpx;font-weight: 777;margin-top: 20rpx;margin-bottom: 10rpx;margin-left: 4rpx;">
推荐</view> --> 推荐</view> -->
<u-sticky></u-sticky> <u-sticky></u-sticky>
<view style="width: 100%;"> <view style="width: 100%;">
<!-- <u-sticky bgColor="#fff"> --> <!-- <u-sticky bgColor="#fff"> -->
<u-tabs :current="typeIndex" :list="typesList" @change="popHandleChange" lineWidth="30" <u-tabs :current="typeIndex" :list="typesList" @change="popHandleChange" lineWidth="30"
keyName='type' lineColor="#0faeff" :activeStyle="{ keyName='type' lineColor="#0faeff" :activeStyle="{
color: '#0faeff', color: '#0faeff',
fontWeight: 'bold', fontWeight: 'bold',
transform: 'scale(1.05)' transform: 'scale(1.05)'
}" :inactiveStyle="{ }" :inactiveStyle="{
color: '#808080', color: '#808080',
transform: 'scale(1)' transform: 'scale(1)'
}"></u-tabs> }"></u-tabs>
<!-- </u-sticky> --> <!-- </u-sticky> -->
</view> </view>
<view style="column-count: 2;column-gap: 20rpx;margin-top: 20rpx;"> <view style="column-count: 2;column-gap: 20rpx;margin-top: 20rpx;">
<view class="item-wrap" v-for="(item, index) in dataList" :key="index" v-if="index % 2 == 0" <view class="item-wrap" v-for="(item, index) in dataList" :key="index" v-if="index % 2 == 0"
@click="handleInfo(item)"> @click="handleInfo(item)">
<view style="position: relative;"> <view style="position: relative;">
<image class="img" :src="item.coverImage" mode="aspectFill"></image> <image class="img" :src="item.coverImage" mode="aspectFill"></image>
<view style=" <view style="
position: absolute; position: absolute;
bottom: 10rpx; bottom: 10rpx;
width: 95%; width: 95%;
padding: 10rpx; padding: 10rpx;
background-color: black; background-color: black;
opacity: 0.5; opacity: 0.5;
"> ">
<view style="display: flex;flex-direction: row;justify-content:space-between;"> <view style="display: flex;flex-direction: row;justify-content:space-between;">
<view style="display: flex;align-items: center;"> <view style="display: flex;align-items: center;">
<image <image
style="width: 20rpx;height: 20rpx;display: flex;align-items: right;margin-right: 10rpx;" style="width: 20rpx;height: 20rpx;display: flex;align-items: right;margin-right: 10rpx;"
src="../../static/index/ic_index_play.png"></image> src="../../static/index/ic_index_play.png"></image>
<view style="font-size: 22rpx;color: white;">{{item.showNum}}</view> <view style="font-size: 22rpx;color: white;">{{item.showNum}}</view>
</view> </view>
<view style="font-size: 22rpx;color: white;font-weight: 777;">{{item.vedioTotal}} <view style="font-size: 22rpx;color: white;font-weight: 777;">{{item.vedioTotal}}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view style="font-size: 30rpx;margin-top: 10rpx;margin-left: 12rpx;">{{item.title}}</view> <view style="font-size: 30rpx;margin-top: 10rpx;margin-left: 12rpx;">{{item.title}}</view>
<!-- <view style="font-size: 22rpx;margin-top: 10rpx;margin-left: 12rpx;">{{item.vedioDesc}}</view> --> <!-- <view style="font-size: 22rpx;margin-top: 10rpx;margin-left: 12rpx;">{{item.vedioDesc}}</view> -->
</view> </view>
<view class="item-wrap" v-for="(item, index2) in dataList" :key="index2" v-if="index2 % 2 == 1" <view class="item-wrap" v-for="(item, index2) in dataList" :key="index2" v-if="index2 % 2 == 1"
@click="handleInfo(item)"> @click="handleInfo(item)">
<view style="position: relative;"> <view style="position: relative;">
<image class="img" :src="item.coverImage" mode="aspectFill"></image> <image class="img" :src="item.coverImage" mode="aspectFill"></image>
<view style=" <view style="
position: absolute; position: absolute;
bottom: 10rpx; bottom: 10rpx;
width: 95%; width: 95%;
padding: 10rpx; padding: 10rpx;
background-color: black; background-color: black;
opacity: 0.5; opacity: 0.5;
"> ">
<view style="display: flex;flex-direction: row;justify-content:space-between;"> <view style="display: flex;flex-direction: row;justify-content:space-between;">
<view style="display: flex;align-items: center;"> <view style="display: flex;align-items: center;">
<image <image
style="width: 20rpx;height: 20rpx;display: flex;align-items: right;margin-right: 10rpx;" style="width: 20rpx;height: 20rpx;display: flex;align-items: right;margin-right: 10rpx;"
src="../../static/index/ic_index_play.png"></image> src="../../static/index/ic_index_play.png"></image>
<view style="font-size: 22rpx;color: white;">{{item.showNum}}</view> <view style="font-size: 22rpx;color: white;">{{item.showNum}}</view>
</view> </view>
<view style="font-size: 22rpx;color: white;font-weight: 777;">{{item.vedioTotal}} <view style="font-size: 22rpx;color: white;font-weight: 777;">{{item.vedioTotal}}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view style="font-size: 30rpx;margin-top: 10rpx;margin-left: 12rpx;"> <view style="font-size: 30rpx;margin-top: 10rpx;margin-left: 12rpx;">
{{item.title}} {{item.title}}
</view> </view>
<!-- <view style="font-size: 22rpx;margin-top: 10rpx;margin-left: 12rpx;">{{item.vedioDesc}}</view> --> <!-- <view style="font-size: 22rpx;margin-top: 10rpx;margin-left: 12rpx;">{{item.vedioDesc}}</view> -->
</view> </view>
</view> </view>
</view> </view>
</z-paging> </z-paging>
<view v-if="newRecordBean!=null" <view v-if="newRecordBean!=null"
style="width: 97%;height: 150rpx;margin: 10rpx;opacity: 0.8;background-color: black;z-index: 20;position: absolute;bottom: 0;border-radius:10rpx;"> style="width: 97%;height: 150rpx;margin: 10rpx;opacity: 0.8;background-color: black;z-index: 20;position: absolute;bottom: 0;border-radius:10rpx;">
<view style="display: flex;margin-left: 10rpx;"> <view style="display: flex;margin-left: 10rpx;">
<view style="flex-grow: 2;display: flex;align-items: center;"> <view style="flex-grow: 2;display: flex;align-items: center;">
<image style="border-radius:10rpx; width: 100rpx;height: 130rpx;margin-top: 10rpx;" <image style="border-radius:10rpx; width: 100rpx;height: 130rpx;margin-top: 10rpx;"
:src="newRecordBean.coverImage" mode="aspectFill"></image> :src="newRecordBean.coverImage" mode="aspectFill"></image>
<view style="margin: 20rpx;"> <view style="margin: 20rpx;">
<view style="font-size: 30rpx; color: white;">{{newRecordBean.title}}</view> <view style="font-size: 30rpx; color: white;">{{newRecordBean.title}}</view>
<view style="font-size: 24rpx;margin-top: 6rpx;color: white;">上次观看至第{{newRecordBean.seeIndex}} <view style="font-size: 24rpx;margin-top: 6rpx;color: white;">上次观看至第{{newRecordBean.seeIndex}}
</view> </view>
<view style="font-size: 22rpx;" <view style="font-size: 22rpx;"
v-if="newRecordBean.orderTags!=null&&newRecordBean.orderTags.length>0"> v-if="newRecordBean.orderTags!=null&&newRecordBean.orderTags.length>0">
<scroll-view scroll-x="true"> <scroll-view scroll-x="true">
<block v-for="t in newRecordBean.orderTags" :key="newRecordBean.orderTags"> <block v-for="t in newRecordBean.orderTags" :key="newRecordBean.orderTags">
<view style="display:inline-block;margin-right: 4rpx;">{{t}} </view> <view style="display:inline-block;margin-right: 4rpx;">{{t}} </view>
</block> </block>
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
</view> </view>
<view style="display: flex;flex-direction: column;align-items: flex-end;"> <view style="display: flex;flex-direction: column;align-items: flex-end;">
<image @click="handleBottomClose()" <image @click="handleBottomClose()"
style="width: 30rpx;height: 30rpx;display: flex;align-items: right;margin: 10rpx;" style="width: 30rpx;height: 30rpx;display: flex;align-items: right;margin: 10rpx;"
src="../../static/index/ic_quit_white.png" mode="aspectFill"></image> src="../../static/index/ic_quit_white.png" mode="aspectFill"></image>
<view @click="handleBottomPlay(newRecordBean)" style=" <view @click="handleBottomPlay(newRecordBean)" style="
width: 160rpx; width: 160rpx;
height: 50rpx; height: 50rpx;
line-height: 50rpx; line-height: 50rpx;
text-align: center; text-align: center;
background-color: red; background-color: red;
border-radius:30rpx; border-radius:30rpx;
color: white; color: white;
font-size: 24rpx; font-size: 24rpx;
margin-right: 20rpx;"> margin-right: 20rpx;">
继续观看 继续观看
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="box-wrap"> <view class="box-wrap">
<image class="img1" @click="handleTaskPage" :src="boxImgUrl"></image> <image class="img1" @click="handleTaskPage" :src="boxImgUrl"></image>
</view> </view>
<!-- <uni-popup type="center" ref="select"> <!-- <uni-popup type="center" ref="select">
<view> <view>
<view style="font-size: 30rpx;font-weight: 777;color: white;">刚刚看的</view> <view style="font-size: 30rpx;font-weight: 777;color: white;">刚刚看的</view>
<view style="text-align: center;"> <view style="text-align: center;">
<view> <view>
<video :id="recommendBean.vedioId" :loop="true" :enable-progress-gesture="false" <video :id="recommendBean.vedioId" :loop="true" :enable-progress-gesture="false"
:show-loading="true" :show-fullscreen-btn="false" :show-loading="true" :show-fullscreen-btn="false"
style="width:100%; height:100%;background: #f56c6c;" :src="recommendBean.vedioUrl" style="width:100%; height:100%;background: #f56c6c;" :src="recommendBean.vedioUrl"
:poster="recommendBean.coverImage" play-btn-position="center" object-fit="contain" /> :poster="recommendBean.coverImage" play-btn-position="center" object-fit="contain" />
</view> </view>
<view>123</view> <view>123</view>
<view @click="handleVipPay" <view @click="handleVipPay"
style="width: 350rpx;height: 80rpx;background-color: #f2575b;border-radius:20rpx;color: white;font-size: 26rpx;justify-content: center;align-items: center;display: flex;"> style="width: 350rpx;height: 80rpx;background-color: #f2575b;border-radius:20rpx;color: white;font-size: 26rpx;justify-content: center;align-items: center;display: flex;">
立即试看 立即试看
</view> </view>
</view> </view>
</view> </view>
</uni-popup> --> </uni-popup> -->
</view> </view>
</template> </template>
<script> <script>
import common from '@/mixins/common'; import common from '@/mixins/common';
import { import {
navigateTo, navigateTo,
message, message,
alert, alert,
loading loading
} from '../../utils/fun.js' } from '../../utils/fun.js'
import { import {
openUrl openUrl
} from '../../utils/app+.js' } from '../../utils/app+.js'
const app = getApp(); const app = getApp();
export default { export default {
name: 'index', name: 'index',
mixins: [common], mixins: [common],
data() { data() {
return { return {
index: 0, index: 0,
index2: 0, index2: 0,
dataList: [], dataList: [],
bannerList: [], bannerList: [],
typesList: [], typesList: [],
topList: [], topList: [],
typeIndex: 0, typeIndex: 0,
typeId: -1, typeId: -1,
newRecordBean: null, newRecordBean: null,
showMask: false, showMask: false,
maskImage1: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find1.png', maskImage1: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find1.png',
maskImage2: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find2.png', maskImage2: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find2.png',
boxImgUrl: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_bag.png', boxImgUrl: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_bag.png',
statusBarHeight: app.globalData.statusBarHeight, statusBarHeight: app.globalData.statusBarHeight,
}; };
}, },
methods: { methods: {
loadData(){ loadData(){
setTimeout(() => { setTimeout(() => {
...@@ -301,244 +301,244 @@ ...@@ -301,244 +301,244 @@
this.$refs.paging.reload(); this.$refs.paging.reload();
} }
}, 500); }, 500);
}, },
showMaskFuc() { showMaskFuc() {
let showFollowMask = uni.getStorageSync('show-follow-mask') || ''; let showFollowMask = uni.getStorageSync('show-follow-mask') || '';
if (showFollowMask == '1') { if (showFollowMask == '1') {
this.showMask = true this.showMask = true
uni.setStorage({ uni.setStorage({
key: 'show-follow-mask', key: 'show-follow-mask',
data: '2' data: '2'
}); });
} }
}, },
show() { show() {
// 显示引导图 // 显示引导图
this.showMaskFuc() this.showMaskFuc()
// 匹配视频 // 匹配视频
this.showFirstDialog(); this.showFirstDialog();
// 轮播图 // 轮播图
this.post({ this.post({
url: '/vedio/topTabs', url: '/vedio/topTabs',
showLoading: false, showLoading: false,
success: ({ success: ({
data data
}) => { }) => {
this.bannerList = data.list; this.bannerList = data.list;
} }
}); });
// 排行榜 // 排行榜
this.post({ this.post({
url: '/vedio/orders', url: '/vedio/orders',
data: {}, data: {},
showLoading: false, showLoading: false,
success: ({ success: ({
data data
}) => { }) => {
this.topList = data.list; this.topList = data.list;
} }
}); });
// 最近观看剧 // 最近观看剧
this.post({ this.post({
url: '/vedio/newest', url: '/vedio/newest',
data: {}, data: {},
showLoading: false, showLoading: false,
success: ({ success: ({
data data
}) => { }) => {
if (data.vedio != null) { if (data.vedio != null) {
this.newRecordBean = data.vedio; this.newRecordBean = data.vedio;
} }
} }
}); });
// 分类列表 // 分类列表
this.post({ this.post({
url: '/vedio/types', url: '/vedio/types',
data: {}, data: {},
showLoading: false, showLoading: false,
success: ({ success: ({
data data
}) => { }) => {
if (data.list) { if (data.list) {
this.typeId = data.list[0].typeId this.typeId = data.list[0].typeId
this.typesList = data.list this.typesList = data.list
} }
} }
}); });
}, },
hide() { hide() {
}, },
queryList(page, size) { queryList(page, size) {
let that = this let that = this
// 推荐列表 // 推荐列表
this.post({ this.post({
url: '/vedio/listByType', url: '/vedio/listByType',
data: { data: {
page, page,
size, size,
typeId: that.typeId typeId: that.typeId
}, },
showLoading: false, showLoading: false,
success: ({ success: ({
data data
}) => { }) => {
// this.$refs.paging.complete(data.list); // this.$refs.paging.complete(data.list);
this.$refs.paging.complete(data.list); this.$refs.paging.complete(data.list);
} }
}); });
}, },
popHandleChange(e) { popHandleChange(e) {
this.typeId = e.typeId this.typeId = e.typeId
if (this.$refs.paging != null) { if (this.$refs.paging != null) {
this.$refs.paging.reload(); this.$refs.paging.reload();
} }
}, },
handleBanner(item) { handleBanner(item) {
// navigateTo(`/pagesC/ttvideo/ttVideoDetail?data=` + encodeURIComponent(JSON.stringify(item)) + // navigateTo(`/pagesC/ttvideo/ttVideoDetail?data=` + encodeURIComponent(JSON.stringify(item)) +
// '&tt_album_id=' + item.douyinAlbumId + '&tt_episode_id=' + item.douyinEpisodeId); // '&tt_album_id=' + item.douyinAlbumId + '&tt_episode_id=' + item.douyinEpisodeId);
}, },
handleInfo(item) { handleInfo(item) {
navigateTo(`/pagesC/ttvideo/ttVideoDetail?data=` + encodeURIComponent(JSON.stringify(item)) + navigateTo(`/pagesC/ttvideo/ttVideoDetail?data=` + encodeURIComponent(JSON.stringify(item)) +
'&tt_album_id=' + item.douyinAlbumId + '&tt_episode_id=' + item.douyinEpisodeId); '&tt_album_id=' + item.douyinAlbumId + '&tt_episode_id=' + item.douyinEpisodeId);
}, },
handleTop(item) { handleTop(item) {
navigateTo(`/pagesC/ttvideo/ttVideoDetail?data=` + encodeURIComponent(JSON.stringify(item)) + navigateTo(`/pagesC/ttvideo/ttVideoDetail?data=` + encodeURIComponent(JSON.stringify(item)) +
'&tt_album_id=' + item.douyinAlbumId + '&tt_episode_id=' + item.douyinEpisodeId); '&tt_album_id=' + item.douyinAlbumId + '&tt_episode_id=' + item.douyinEpisodeId);
}, },
handleBottomPlay(item) { handleBottomPlay(item) {
navigateTo(`/pagesC/ttvideo/ttVideoDetail?data=` + encodeURIComponent(JSON.stringify(item)) + navigateTo(`/pagesC/ttvideo/ttVideoDetail?data=` + encodeURIComponent(JSON.stringify(item)) +
'&tt_album_id=' + item.douyinAlbumId + '&tt_episode_id=' + item.douyinEpisodeId); '&tt_album_id=' + item.douyinAlbumId + '&tt_episode_id=' + item.douyinEpisodeId);
}, },
handleBottomClose() { handleBottomClose() {
this.newRecordBean = null; this.newRecordBean = null;
this.post({ this.post({
url: '/vedio/colseNewest', url: '/vedio/colseNewest',
data: {}, data: {},
showLoading: false, showLoading: false,
success: ({ success: ({
data data
}) => {} }) => {}
}); });
}, },
handleSearchPage() { handleSearchPage() {
navigateTo(`/pagesA/search/search`) navigateTo(`/pagesA/search/search`)
}, },
handleTaskPage() { handleTaskPage() {
navigateTo(`/pagesA/task/task`) navigateTo(`/pagesA/task/task`)
}, },
showFirstDialog() { showFirstDialog() {
let that = this; let that = this;
let loadEpisode_id = uni.getStorageSync('tt_episode_id') || ''; let loadEpisode_id = uni.getStorageSync('tt_episode_id') || '';
let loadAlbum_id = uni.getStorageSync('tt_album_id') || ''; let loadAlbum_id = uni.getStorageSync('tt_album_id') || '';
setTimeout(() => { setTimeout(() => {
that.post({ that.post({
url: '/vedio/firstVedio/douyin', url: '/vedio/firstVedio/douyin',
data: { data: {
episode_id: loadEpisode_id, episode_id: loadEpisode_id,
album_id: loadAlbum_id album_id: loadAlbum_id
}, },
showLoading: false, showLoading: false,
success: ({ success: ({
data data
}) => { }) => {
if (data.vedioMsg != null) { if (data.vedioMsg != null) {
navigateTo(`/pagesC/ttvideo/ttVideoDetail?data=` + encodeURIComponent( navigateTo(`/pagesC/ttvideo/ttVideoDetail?data=` + encodeURIComponent(
JSON.stringify(data.vedioMsg)) + JSON.stringify(data.vedioMsg)) +
'&tt_album_id=' + data.vedioMsg.douyinAlbumId + '&tt_album_id=' + data.vedioMsg.douyinAlbumId +
'&tt_episode_id=' + data.vedioMsg.douyinEpisodeId); '&tt_episode_id=' + data.vedioMsg.douyinEpisodeId);
// 重置短视频挂载id // 重置短视频挂载id
uni.setStorage({ uni.setStorage({
key: 'tt_album_id', key: 'tt_album_id',
data: '' data: ''
}); });
uni.setStorage({ uni.setStorage({
key: 'tt_episode_id', key: 'tt_episode_id',
data: '' data: ''
}); });
} }
} }
}); });
}, 800); }, 800);
} }
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.body { .body {
// background-color: whitesmoke; // background-color: whitesmoke;
position: relative; position: relative;
} }
.search-wrap { .search-wrap {
height: 80rpx; height: 80rpx;
margin: 10rpx 0; margin: 10rpx 0;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }
.search-bar { .search-bar {
width: 100%; width: 100%;
margin-left: 20rpx; margin-left: 20rpx;
margin-right: 20rpx; margin-right: 20rpx;
border-radius: 10rpx; border-radius: 10rpx;
background-color: white; background-color: white;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
padding: 0 20rpx; padding: 0 20rpx;
} }
.show-mask { .show-mask {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: rgba(0, 0, 0, 0.6); background: rgba(0, 0, 0, 0.6);
position: absolute; position: absolute;
z-index: 999; z-index: 999;
color: white; color: white;
align-items: center; align-items: center;
image { image {
width: 90%; width: 90%;
} }
} }
.item-wrap { .item-wrap {
width: 100%; width: 100%;
border-radius: 10rpx; border-radius: 10rpx;
background-color: #fff; background-color: #fff;
break-inside: avoid; break-inside: avoid;
margin-bottom: 20rpx; margin-bottom: 20rpx;
height: 500rpx; height: 500rpx;
} }
.img { .img {
position: relative; position: relative;
border-radius: 10rpx; border-radius: 10rpx;
width: 100%; width: 100%;
height: 390rpx; height: 390rpx;
} }
.box-wrap { .box-wrap {
height: 100rpx; height: 100rpx;
width: 120rpx; width: 120rpx;
right: 10rpx; right: 10rpx;
bottom: 240rpx; bottom: 240rpx;
position: absolute; position: absolute;
z-index: 999; z-index: 999;
.img1 { .img1 {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
} }
} }
</style> </style>
\ No newline at end of file
<template> <template>
<view class="body"> <view class="body">
<view v-if="showMask" class="show-mask flex-v" @click="showMask=false"> <view v-if="showMask" class="show-mask flex-v" @click="showMask=false">
<view class="mt-30" style="width: 90%;text-align: right;"> <view class="mt-30" style="width: 90%;text-align: right;">
<image style="width: 30rpx;height: 30rpx;padding:6rpx; <image style="width: 30rpx;height: 30rpx;padding:6rpx;
border-radius: 40rpx;border: 2px solid darkgray;" src="@/static/index/ic_quit_white.png" /> border-radius: 40rpx;border: 2px solid darkgray;" src="@/static/index/ic_quit_white.png" />
</view> </view>
<text class="mt-10" style="font-size: 46rpx;">如何继续使用?</text> <text class="mt-10" style="font-size: 46rpx;">如何继续使用?</text>
<text class="m-10">找到“寻觅短剧”小程序</text> <text class="m-10">找到“星夜剧场”小程序</text>
<image class="mt-30" mode="widthFix" :src="maskImage1"></image> <image class="mt-30" mode="widthFix" :src="maskImage1"></image>
<image :src="maskImage2" mode="widthFix"></image> <image :src="maskImage2" mode="widthFix"></image>
</view> </view>
<z-paging style="height: 100%;background-color: #f0f8ff;"> <z-paging style="height: 100%;background-color: #f0f8ff;">
<view style="width: 100%;height: 340rpx; <view style="width: 100%;height: 340rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100%; background-size: 100%;
background-origin: border-box; background-origin: border-box;
background-image: url(https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_my_top.png);"> background-image: url(https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_my_top.png);">
<view <view
style="display: flex;flex-direction: row;align-items: center;margin:20rpx;padding-left: 10rpx;padding-top: 34rpx;"> style="display: flex;flex-direction: row;align-items: center;margin:20rpx;padding-left: 10rpx;padding-top: 34rpx;">
<image class="avatar" src="@/static/logo-about.png"></image> <image class="avatar" src="@/static/logo-about.png"></image>
<view> <view>
<view style="font-size: 32rpx;color: white;margin-left: 20rpx;">用户ID:{{userBean.idcode}}</view> <view style="font-size: 32rpx;color: white;margin-left: 20rpx;">用户ID:{{userBean.idcode}}</view>
</view> </view>
</view> </view>
<view style="display: flex;width: 95%;height: 150rpx;background: linear-gradient(to right, #fdeedd, #f6c194);margin-left: 20rpx;margin-right: 20rpx;margin-top: 59rpx; <view style="display: flex;width: 95%;height: 150rpx;background: linear-gradient(to right, #fdeedd, #f6c194);margin-left: 20rpx;margin-right: 20rpx;margin-top: 59rpx;
border-top-left-radius: 20px; border-top-left-radius: 20px;
border-top-right-radius: 20px;"> border-top-right-radius: 20px;">
<view style="flex-grow: 2; margin-left: 20rpx;"> <view style="flex-grow: 2; margin-left: 20rpx;">
<view <view
style="width: 100%;height: 100%;display: flex;flex-direction: column;justify-content: center;"> style="width: 100%;height: 100%;display: flex;flex-direction: column;justify-content: center;">
<view style="display: flex;align-items: center;"> <view style="display: flex;align-items: center;">
<image <image
style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;" style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_my_vip.png"></image> src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_my_vip.png"></image>
<view style="font-size: 36rpx;font-weight: 777;color: #5b1500;"> <view style="font-size: 36rpx;font-weight: 777;color: #5b1500;">
{{userBean.expireTime<=0 ? '开通VIP会员' : 'VIP会员'}} {{userBean.expireTime<=0 ? '开通VIP会员' : 'VIP会员'}}
</view> </view>
</view> </view>
<view v-if="userBean.expireTime<=0" <view v-if="userBean.expireTime<=0"
style="font-size: 28rpx;color: #5b1500;margin-top: 20rpx;">解锁全部功能</view> style="font-size: 28rpx;color: #5b1500;margin-top: 20rpx;">解锁全部功能</view>
<view v-else style="font-size: 28rpx;color: #5b1500;margin-top: 20rpx;"> <view v-else style="font-size: 28rpx;color: #5b1500;margin-top: 20rpx;">
<!-- 到期时间:{{ formateTime(userBean.expireTime*1000,'yyyy-MM-dd')}} --> <!-- 到期时间:{{ formateTime(userBean.expireTime*1000,'yyyy-MM-dd')}} -->
到期时间:{{ getFormatTime(userBean.expireTime*1000)}} 到期时间:{{ getFormatTime(userBean.expireTime*1000)}}
</view> </view>
</view> </view>
</view> </view>
<view style="width: 220rpx;"> <view style="width: 220rpx;">
<view v-if="userBean.expireTime<=0" <view v-if="userBean.expireTime<=0"
style="width: 100%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;"> style="width: 100%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;">
<view @click="handleCoinPay" <view @click="handleCoinPay"
style="width: 180rpx;height: 60rpx;background: linear-gradient(to right, #bc875e, #45250c);border-radius:30rpx;color: #fff;font-size: 26rpx;justify-content: center;align-items: center;display: flex;padding-bottom: 4rpx;"> style="width: 180rpx;height: 60rpx;background: linear-gradient(to right, #bc875e, #45250c);border-radius:30rpx;color: #fff;font-size: 26rpx;justify-content: center;align-items: center;display: flex;padding-bottom: 4rpx;">
去开通 去开通
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view style="display: flex;height: 120rpx;margin: 20rpx;background: #fff;border-radius: 20rpx;"> <view style="display: flex;height: 120rpx;margin: 20rpx;background: #fff;border-radius: 20rpx;">
<view style="flex-grow: 2; margin-left: 20rpx;"> <view style="flex-grow: 2; margin-left: 20rpx;">
<view <view
style="width: 100%;height: 100%;display: flex;flex-direction: column;justify-content: center;"> style="width: 100%;height: 100%;display: flex;flex-direction: column;justify-content: center;">
<view style="font-size: 28rpx;color: #5b1500;">账户余额: {{userBean.point}}看点</view> <view style="font-size: 28rpx;color: #5b1500;">账户余额: {{userBean.point}}看点</view>
</view> </view>
</view> </view>
<view style="width: 200rpx;"> <view style="width: 200rpx;">
<view <view
style="width: 100%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;"> style="width: 100%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;">
<view @click="handleCoinPay" <view @click="handleCoinPay"
style="width: 160rpx;height: 60rpx;background: linear-gradient(to right, #bc875e, #45250c);border-radius:30rpx;color: #fff;font-size: 26rpx;justify-content: center;align-items: center;display: flex;padding-bottom: 4rpx;"> style="width: 160rpx;height: 60rpx;background: linear-gradient(to right, #bc875e, #45250c);border-radius:30rpx;color: #fff;font-size: 26rpx;justify-content: center;align-items: center;display: flex;padding-bottom: 4rpx;">
去充值 去充值
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="inviteClass"> <view class="inviteClass">
<view @click="handleTask" class="inviteItemclass" style="margin-right: 10rpx"> <view @click="handleTask" class="inviteItemclass" style="margin-right: 10rpx">
<image style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;" <image style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_my_task.png"></image> src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_my_task.png"></image>
<view style="font-size: 26rpx;color: black;">领免费看点</view> <view style="font-size: 26rpx;color: black;">领免费看点</view>
</view> </view>
<view @click="handleInvite" class="inviteItemclass" style="margin-left: 10rpx"> <view @click="handleInvite" class="inviteItemclass" style="margin-left: 10rpx">
<image style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;" <image style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_my_invite.png"></image> src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_my_invite.png"></image>
<view style="font-size: 26rpx;color: black;">邀请好友得看点</view> <view style="font-size: 26rpx;color: black;">邀请好友得看点</view>
</view> </view>
</view> </view>
<view class="infobg" style="margin: 20rpx;"> <view class="infobg" style="margin: 20rpx;">
<view class="item arrow" @click="handlePayRecord"> <view class="item arrow" @click="handlePayRecord">
我的订单 我的订单
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view> <view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view> </view>
<view v-if="false" class="item arrow" @click="handleCoupon"> <view v-if="false" class="item arrow" @click="handleCoupon">
优惠券 优惠券
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view> <view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view> </view>
<view class="item arrow" @click="handleDotRecord"> <view class="item arrow" @click="handleDotRecord">
看点记录 看点记录
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view> <view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view> </view>
<view class="item arrow" @click="handleUseDotRecord"> <view class="item arrow" @click="handleUseDotRecord">
消费记录 消费记录
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view> <view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view> </view>
<view class="item arrow" @click="handleWatchRecord"> <view class="item arrow" @click="handleWatchRecord">
观看记录 观看记录
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view> <view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view> </view>
<view class="item arrow" @click="handleFind"> <view class="item arrow" @click="handleFind">
兑换会员 兑换会员
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view> <view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view> </view>
<view class="item arrow" @click="handlePhone"> <view class="item arrow" @click="handlePhone">
联系客服 联系客服
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view> <view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view> </view>
</view> </view>
</z-paging> </z-paging>
<kefu-popup :show="showKefuPop" @close="showKefuPop = false" /> <kefu-popup :show="showKefuPop" @close="showKefuPop = false" />
</view> </view>
</template> </template>
<script> <script>
import common from '@/mixins/common'; import common from '@/mixins/common';
import { import {
navigateTo, navigateTo,
message, message,
loading loading
} from '../../utils/fun.js' } from '../../utils/fun.js'
import { import {
formateTime formateTime
} from '../../utils/utils.js' } from '../../utils/utils.js'
import kefuPopup from '@/components/kefu-popup/kefu-popup.vue'; import kefuPopup from '@/components/kefu-popup/kefu-popup.vue';
const app = getApp(); const app = getApp();
export default { export default {
name: 'index', name: 'index',
mixins: [common], mixins: [common],
components: { components: {
kefuPopup kefuPopup
}, },
data() { data() {
return { return {
userBean: {}, userBean: {},
showMask: false, showMask: false,
showKefuPop: false, showKefuPop: false,
maskImage1: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find1.png', maskImage1: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find1.png',
maskImage2: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find2.png' maskImage2: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find2.png'
}; };
}, },
methods: { methods: {
show() { show() {
this.post({ this.post({
url: '/user/baseMsg', url: '/user/baseMsg',
showLoading: false, showLoading: false,
success: ({ success: ({
data data
}) => { }) => {
this.userBean = data; this.userBean = data;
} }
}); });
}, },
hide() { hide() {
}, },
handleTask() { handleTask() {
navigateTo(`/pagesA/task/task`) navigateTo(`/pagesA/task/task`)
}, },
handleDotRecord() { handleDotRecord() {
navigateTo(`/pagesD/dotRecord/dotRecord`) navigateTo(`/pagesD/dotRecord/dotRecord`)
}, },
handleUseDotRecord() { handleUseDotRecord() {
navigateTo(`/pagesD/useDotRecord/useDotRecord`) navigateTo(`/pagesD/useDotRecord/useDotRecord`)
}, },
handleWatchRecord() { handleWatchRecord() {
navigateTo(`/pagesD/watchRecord/watchRecord`) navigateTo(`/pagesD/watchRecord/watchRecord`)
}, },
handleInvite() { handleInvite() {
navigateTo(`/pagesD/invite/invite`) navigateTo(`/pagesD/invite/invite`)
}, },
handlePayRecord() { handlePayRecord() {
navigateTo(`/pagesD/payRecord/payRecord`) navigateTo(`/pagesD/payRecord/payRecord`)
}, },
handleCoinPay() { handleCoinPay() {
navigateTo(`/pagesA/vipPay/vipPay`) navigateTo(`/pagesA/vipPay/vipPay`)
}, },
handleFind() { handleFind() {
navigateTo(`/pagesD/cdkey/cdkey`) navigateTo(`/pagesD/cdkey/cdkey`)
}, },
handlePhone() { handlePhone() {
this.showKefuPop = true this.showKefuPop = true
}, },
paySuccess(largeType) { paySuccess(largeType) {
message.notify('支付成功'); message.notify('支付成功');
this.post({ this.post({
url: '/user/baseMsg', url: '/user/baseMsg',
showLoading: false, showLoading: false,
success: ({ success: ({
data data
}) => { }) => {
this.userBean = data; this.userBean = data;
} }
}); });
}, },
getFormatTime(time) { getFormatTime(time) {
return formateTime(time, 'yyyy-MM-dd') return formateTime(time, 'yyyy-MM-dd')
} }
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
@import '@/scss/uni.scss'; @import '@/scss/uni.scss';
.body { .body {
height: 100%; height: 100%;
background-color: #f0f8ff; background-color: #f0f8ff;
} }
.inviteClass { .inviteClass {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
background-color: transparent; background-color: transparent;
margin-left: 20rpx; margin-left: 20rpx;
margin-right: 20rpx; margin-right: 20rpx;
height: 100rpx; height: 100rpx;
justify-content: space-between; justify-content: space-between;
} }
.inviteItemclass { .inviteItemclass {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 50%; width: 50%;
border-radius: 15rpx; border-radius: 15rpx;
height: 100rpx; height: 100rpx;
background-color: #ffffff; background-color: #ffffff;
} }
.avatar { .avatar {
background-color: #d8d8d8; background-color: #d8d8d8;
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
border-radius: 50%; border-radius: 50%;
overflow: hidden; overflow: hidden;
//box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1) //box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)
} }
.show-mask { .show-mask {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: rgba(0, 0, 0, 0.6); background: rgba(0, 0, 0, 0.6);
position: absolute; position: absolute;
z-index: 999; z-index: 999;
color: white; color: white;
align-items: center; align-items: center;
image { image {
width: 90%; width: 90%;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
{ {
"path": "pages/home", "path": "pages/home",
"style": { "style": {
"navigationBarTitleText": "夜剧场", "navigationBarTitleText": "夜剧场",
"navigationStyle": "default", "navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff", "navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
this.tips1 = options.tips1 this.tips1 = options.tips1
this.shareId = options.shareId this.shareId = options.shareId
this.appName = '寻觅短剧' this.appName = '星夜剧场'
}, },
onShow(options) { onShow(options) {
// #ifdef MP-TOUTIAO // #ifdef MP-TOUTIAO
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment