Commit 60a0a5b0 authored by jyx's avatar jyx

代码优化

parent 545cb2d3
...@@ -111,7 +111,6 @@ ...@@ -111,7 +111,6 @@
getPlayletManager getPlayletManager
} = tt; } = tt;
export default { export default {
mixins: [common],
data() { data() {
return { return {
vipList: [], vipList: [],
...@@ -186,7 +185,7 @@ ...@@ -186,7 +185,7 @@
} }
}); });
this.post({ common.data.post({
url: '/user/baseMsg', url: '/user/baseMsg',
showLoading: false, showLoading: false,
success: ({ success: ({
...@@ -209,7 +208,7 @@ ...@@ -209,7 +208,7 @@
handlePay() { handlePay() {
let that = this; let that = this;
let vipBean = this.vipList[this.selectedIndex]; let vipBean = this.vipList[this.selectedIndex];
this.post({ common.data.post({
url: '/vip/getVipPayParams/douyin', url: '/vip/getVipPayParams/douyin',
data: { data: {
vedioId: that.point <= 0 ? null : that.vedioId, vedioId: that.point <= 0 ? null : that.vedioId,
......
<template> <template>
<view style="background: white;height: 100%;"> <view style="background-color: #f0f8ff;height: 100%;">
<z-paging class="flex-1"> <scroll-view scroll-y="true" v-if="dataList.length>0" :style="{'height': clientHeight + 'px'}">
<scroll-view scroll-y="true" v-if="dataList.length>0" :style="'height: '+(windowHeight -120)+'px;'"> <view class="flex space" style="display:flex; flex-wrap:wrap;">
<view class="flex space" style="display:flex; flex-wrap:wrap;"> <block v-for="(value,key) in dataList" :key="key">
<block v-for="(value,key) in dataList" :key="key"> <view class="mt-10"
<view class="mt-10" style="width:31%; position: relative; border-radius:20rpx;margin-bottom: 10rpx;margin-left: 14rpx;"
style="width:31%; position: relative; border-radius:20rpx;margin-bottom: 10rpx;margin-left: 14rpx;" @click.stop="click(value)" @longpress.stop="longClick(key)">
@click.stop="click(value)" @longpress.stop="longClick(key)"> <image class="integral-mall-goods" mode="aspectFill" :src="value.coverImage"></image>
<image class="integral-mall-goods" mode="aspectFill" :src="value.coverImage"></image> <view style="font-size: 26rpx;color: black;height: 60rpx;margin-left: 5rpx;">
<view style="font-size: 26rpx;color: black;height: 60rpx;margin-left: 5rpx;"> {{value.title}}
{{value.title}} </view>
</view> <view class="text" style="font-size: 22rpx;color: gray;height: 30rpx;margin-left: 5rpx;">
<view class="text" style="font-size: 22rpx;color: gray;height: 30rpx;margin-left: 5rpx;"> {{value.vedioDesc}}
{{value.vedioDesc}} </view>
</view> <view v-if="isEditStyle" @click.stop="cbClick(key)" style="position: absolute;background: #000000; opacity: 0.6;width: 92%;height: 96%;top: 0;border-radius:20rpx;
<view v-if="isEditStyle" @click.stop="cbClick(key)" style="position: absolute;background: #000000; opacity: 0.6;width: 92%;height: 96%;top: 0;border-radius:20rpx;
padding-left: 20rpx;padding-top: 20rpx;"> padding-left: 20rpx;padding-top: 20rpx;">
<image v-if="value.isChecked" src="@/static/ic_selected.png" <image v-if="value.isChecked" src="@/static/ic_selected.png"
style="width: 50rpx;height: 50rpx;" /> style="width: 50rpx;height: 50rpx;" />
<image v-if="!value.isChecked" src="@/static/ic_unselected.png" <image v-if="!value.isChecked" src="@/static/ic_unselected.png"
style="width: 50rpx;height: 50rpx;" /> style="width: 50rpx;height: 50rpx;" />
</view>
</view> </view>
</block> </view>
</view> </block>
</scroll-view>
<view v-if="dataList.length<=0"
style="position: absolute;left: 50%;width: 240rpx;margin-left: -120rpx;top: 600rpx;text-align: center;">
<text style="color: gray;">暂无在追剧</text>
<view @click="goRecommend" class="button" style="margin-top: 20rpx;color: white;">去剧场</view>
</view> </view>
</scroll-view>
<view v-if="dataList.length>=0" @click="clickEdit" class="editBar"> <view v-if="dataList.length<=0"
<image style="width: 50rpx;height: 50rpx;" style="position: absolute;left: 50%;width: 240rpx;margin-left: -120rpx;top: 600rpx;text-align: center;">
:src="!isEditStyle?'../../static/video/edit.png':'../../static/video/close.png'"></image> <text style="color: gray;">暂无在追剧</text>
</view> <view @click="goRecommend" class="button" style="margin-top: 20rpx;color: white;">去剧场</view>
</z-paging> </view>
</view>
<view v-if="dataList.length>=0" @click="clickEdit" class="editBar">
<image style="width: 50rpx;height: 50rpx;"
:src="!isEditStyle?'../../static/video/edit.png':'../../static/video/close.png'"></image>
</view>
</view>
</template> </template>
<script> <script>
import common from '@/mixins/common'; import common from '@/mixins/common';
import { import {
gotoVideoPlayerPage gotoVideoPlayerPage
} from "@/common/page-route.js" } from "@/common/page-route.js"
...@@ -62,9 +59,9 @@ ...@@ -62,9 +59,9 @@
return { return {
titleBarHeight: app.globalData.titleBarHeight, titleBarHeight: app.globalData.titleBarHeight,
statusBarHeight: app.globalData.statusBarHeight, statusBarHeight: app.globalData.statusBarHeight,
windowHeight: 0,
dataList: [], dataList: [],
isEditStyle: false isEditStyle: false,
clientHeight: 0,
} }
}, },
watch: { watch: {
...@@ -74,10 +71,15 @@ ...@@ -74,10 +71,15 @@
} }
}, },
}, },
onLoad(e) {}, mounted() {
uni.getSystemInfo({
success: (res => {
this.clientHeight = res.windowHeight - 42;
})
});
},
methods: { methods: {
show() { show() {
this.windowHeight = uni.getSystemInfoSync().windowHeight
this.loadData() this.loadData()
}, },
hide() { hide() {
...@@ -94,7 +96,12 @@ ...@@ -94,7 +96,12 @@
success: ({ success: ({
data data
}) => { }) => {
this.dataList = data.list; for (var i = 0; i < 10; i++) {
this.dataList = [...this.dataList, ...data.list];
}
// this.dataList = data.list;
if (this.dataList.length > 0) { if (this.dataList.length > 0) {
this.$emit("showEdit", true) this.$emit("showEdit", true)
} else { } else {
...@@ -189,7 +196,7 @@ ...@@ -189,7 +196,7 @@
.editBar { .editBar {
position: absolute; position: absolute;
bottom: 80rpx; bottom: 200rpx;
right: 60rpx; right: 60rpx;
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;
...@@ -197,7 +204,7 @@ ...@@ -197,7 +204,7 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
border-radius: 80rpx; border-radius: 80rpx;
background-color: whitesmoke; background-color: white;
box-shadow: 0 0 2px 0px rgba(255, 255, 255, 0.1); box-shadow: 0 0 2px 0px rgba(255, 255, 255, 0.1);
} }
</style> </style>
\ No newline at end of file
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
<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"> <scroll-view v-if="clientHeight != 0" scroll-y="true" :style="{'height': clientHeight + 'px'}"
@scroll="onScroll">
<view class="search-wrap"> <view class="search-wrap">
<!-- <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;">{{
...@@ -25,8 +25,7 @@ ...@@ -25,8 +25,7 @@
</view> </view>
<view class="content"> <view class="content">
<swiper class="banner" :style="'margin-top:'+statusBarHeight+'px;'" :indicator-dots="true" <swiper class="banner" :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>
...@@ -43,14 +42,8 @@ ...@@ -43,14 +42,8 @@
<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
position: absolute; style="position: absolute;z-index: 10;width: 50rpx;text-align: center;margin-top: 8rpx;font-size: 24rpx;color: white;">
z-index: 10;
width: 50rpx;
text-align: center;
margin-top: 8rpx;
font-size: 24rpx;
color: white;">
{{index+1}} {{index+1}}
</view> </view>
<image v-if="index==0" <image v-if="index==0"
...@@ -72,13 +65,8 @@ ...@@ -72,13 +65,8 @@
:src="item.coverImage" mode="aspectFill"></image> :src="item.coverImage" mode="aspectFill"></image>
</view> </view>
<view style=" <view
position: absolute; style="position: absolute;bottom: 10rpx;background-color: black;width: 100%;opacity: 0.5;">
bottom: 10rpx;
background-color: black;
width: 100%;
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;"
...@@ -103,14 +91,7 @@ ...@@ -103,14 +91,7 @@
</scroll-view> </scroll-view>
</view> </view>
<!-- <view
style="font-size: 30rpx;font-weight: 777;margin-top: 20rpx;margin-bottom: 10rpx;margin-left: 4rpx;">
推荐</view> -->
<u-sticky></u-sticky>
<view style="width: 100%;"> <view style="width: 100%;">
<!-- <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',
...@@ -120,7 +101,6 @@ ...@@ -120,7 +101,6 @@
color: '#808080', color: '#808080',
transform: 'scale(1)' transform: 'scale(1)'
}"></u-tabs> }"></u-tabs>
<!-- </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;">
...@@ -128,14 +108,8 @@ ...@@ -128,14 +108,8 @@
@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
position: absolute; style="position: absolute;bottom: 10rpx;width: 95%;padding: 10rpx;background-color: black;opacity: 0.5;">
bottom: 10rpx;
width: 95%;
padding: 10rpx;
background-color: black;
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
...@@ -156,14 +130,8 @@ ...@@ -156,14 +130,8 @@
<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
position: absolute; style="position: absolute;bottom: 10rpx;width: 95%;padding: 10rpx;background-color: black;opacity: 0.5;">
bottom: 10rpx;
width: 95%;
padding: 10rpx;
background-color: black;
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
...@@ -184,7 +152,7 @@ ...@@ -184,7 +152,7 @@
</view> </view>
</view> </view>
</z-paging> </scroll-view>
<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;">
...@@ -195,7 +163,8 @@ ...@@ -195,7 +163,8 @@
: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">
...@@ -212,16 +181,8 @@ ...@@ -212,16 +181,8 @@
<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)"
width: 160rpx; style="width: 160rpx;height: 50rpx;line-height: 50rpx;text-align: center;background-color: red;border-radius:30rpx;color: white;font-size: 24rpx;margin-right: 20rpx;">
height: 50rpx;
line-height: 50rpx;
text-align: center;
background-color: red;
border-radius:30rpx;
color: white;
font-size: 24rpx;
margin-right: 20rpx;">
继续观看 继续观看
</view> </view>
</view> </view>
...@@ -232,28 +193,6 @@ ...@@ -232,28 +193,6 @@
<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">
<view>
<view style="font-size: 30rpx;font-weight: 777;color: white;">刚刚看的</view>
<view style="text-align: center;">
<view>
<video :id="recommendBean.vedioId" :loop="true" :enable-progress-gesture="false"
:show-loading="true" :show-fullscreen-btn="false"
style="width:100%; height:100%;background: #f56c6c;" :src="recommendBean.vedioUrl"
:poster="recommendBean.coverImage" play-btn-position="center" object-fit="contain" />
</view>
<view>123</view>
<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;">
立即试看
</view>
</view>
</view>
</uni-popup> -->
</view> </view>
</template> </template>
...@@ -294,12 +233,32 @@ ...@@ -294,12 +233,32 @@
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, clientHeight: 0,
page: 1,
size: 10,
loadStatus: 'loadmore'
}; };
}, },
mounted() {
uni.getSystemInfo({
success: (res => {
this.clientHeight = res.windowHeight - 42;
})
});
// 匹配视频
this.showFirstDialog();
},
methods: { methods: {
loadData() { onScroll(event) {
// 获取scrollview已滚动的高度
const scrollTop = event.detail.scrollTop;
// 获取内容的总高度
const contentHeight = event.detail.scrollHeight;
// 判断是否滑动到底部(已滚动的高度 + 视图高度 >= 内容高度)
if ((scrollTop + this.clientHeight + 50) >= contentHeight) {
this.loadMore()
}
}, },
showMaskFuc() { showMaskFuc() {
let showFollowMask = uni.getStorageSync('show-follow-mask') || ''; let showFollowMask = uni.getStorageSync('show-follow-mask') || '';
...@@ -317,9 +276,6 @@ ...@@ -317,9 +276,6 @@
// 显示引导图 // 显示引导图
this.showMaskFuc() this.showMaskFuc()
// 匹配视频
this.showFirstDialog();
// 轮播图 // 轮播图
this.post({ this.post({
url: '/vedio/topTabs', url: '/vedio/topTabs',
...@@ -370,45 +326,60 @@ ...@@ -370,45 +326,60 @@
if (!this.firstEnter) { if (!this.firstEnter) {
this.firstEnter = true this.firstEnter = true
setTimeout(() => { setTimeout(() => {
if (this.$refs.paging != null) { this.refresh()
this.$refs.paging.reload();
}
}, 500); }, 500);
} }
} }
} }
}); });
}, },
hide() { hide() {
}, },
queryList(page, size) { refresh() {
this.page = 1
this.loadList()
},
loadMore() {
if (this.loadStatus === 'loading' || this.loadStatus === 'nomore') return;
this.loadStatus = 'loading'
this.page = ++this.page
this.loadList()
},
loadList() {
let that = this let that = this
// 推荐列表 // 推荐列表
this.post({ this.post({
url: '/vedio/listByType', url: '/vedio/listByType',
data: { data: {
page, page: this.page,
size, size: this.size,
typeId: that.typeId typeId: that.typeId
}, },
showLoading: false, showLoading: false,
success: ({ success: ({
data data
}) => { }) => {
this.loadStatus = data.list.size < this.size ? 'nomore' : 'loadmore';
// this.$refs.paging.complete(data.list); if (data.list.size <= 10) {
this.$refs.paging.complete(data.list); this.dataList = [...this.dataList, ...data.list];
return
}
if (this.page == 1) {
this.dataList = data.list
} else {
this.dataList = [...this.dataList, ...data.list];
}
} }
}); });
}, },
popHandleChange(e) { popHandleChange(e) {
this.typeId = e.typeId this.typeId = e.typeId
if (this.$refs.paging != null) {
// this.$refs.paging.reload(); this.refresh()
this.$refs.paging.refresh();
}
}, },
handleBanner(item) { handleBanner(item) {
gotoVideoPlayerPage(item) gotoVideoPlayerPage(item)
...@@ -478,7 +449,6 @@ ...@@ -478,7 +449,6 @@
<style lang="scss"> <style lang="scss">
.body { .body {
// background-color: whitesmoke;
position: relative; position: relative;
} }
......
<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;">
<scroll-view scroll-y="true" :style="{'height': clientHeight + 'px'}">
<view style="width: 100%;height: 340rpx;
background-repeat: no-repeat; <view style="width: 100%;height: 340rpx;
background-size: 100%; background-repeat: no-repeat;
background-origin: border-box; background-size: 100%;
background-image: url(https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_my_top.png);"> background-origin: border-box;
<view background-image: url(https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_my_top.png);">
style="display: flex;flex-direction: row;align-items: center;margin:20rpx;padding-left: 10rpx;padding-top: 34rpx;"> <view
<image class="avatar" src="@/static/logo-about.png"></image> style="display: flex;flex-direction: row;align-items: center;margin:20rpx;padding-left: 10rpx;padding-top: 34rpx;">
<view> <image class="avatar" src="@/static/logo-about.png"></image>
<view style="font-size: 32rpx;color: white;margin-left: 20rpx;">用户ID:{{userBean.idcode}}</view> <view>
</view> <view style="font-size: 32rpx;color: white;margin-left: 20rpx;">用户ID:{{userBean.idcode}}</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;
border-top-left-radius: 20px; <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-right-radius: 20px;"> border-top-left-radius: 20px;
<view style="flex-grow: 2; margin-left: 20rpx;"> border-top-right-radius: 20px;">
<view <view style="flex-grow: 2; margin-left: 20rpx;">
style="width: 100%;height: 100%;display: flex;flex-direction: column;justify-content: center;"> <view
<view style="display: flex;align-items: center;"> style="width: 100%;height: 100%;display: flex;flex-direction: column;justify-content: center;">
<image <view style="display: flex;align-items: center;">
style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;" <image
src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_my_vip.png"></image> style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
<view style="font-size: 36rpx;font-weight: 777;color: #5b1500;"> src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_my_vip.png"></image>
{{userBean.expireTime<=0 ? '开通VIP会员' : 'VIP会员'}} <view style="font-size: 36rpx;font-weight: 777;color: #5b1500;">
</view> {{userBean.expireTime<=0 ? '开通VIP会员' : 'VIP会员'}}
</view> </view>
</view>
<view v-if="userBean.expireTime<=0"
style="font-size: 28rpx;color: #5b1500;margin-top: 20rpx;">解锁全部功能</view> <view v-if="userBean.expireTime<=0"
<view v-else style="font-size: 28rpx;color: #5b1500;margin-top: 20rpx;"> style="font-size: 28rpx;color: #5b1500;margin-top: 20rpx;">解锁全部功能</view>
<!-- 到期时间:{{ formateTime(userBean.expireTime*1000,'yyyy-MM-dd')}} --> <view v-else style="font-size: 28rpx;color: #5b1500;margin-top: 20rpx;">
到期时间:{{ getFormatTime(userBean.expireTime*1000)}} <!-- 到期时间:{{ formateTime(userBean.expireTime*1000,'yyyy-MM-dd')}} -->
</view> 到期时间:{{ getFormatTime(userBean.expireTime*1000)}}
</view> </view>
</view> </view>
<view style="width: 220rpx;"> </view>
<view v-if="userBean.expireTime<=0" <view style="width: 220rpx;">
style="width: 100%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;"> <view v-if="userBean.expireTime<=0"
<view @click="handleCoinPay" style="width: 100%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;">
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 @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;">
</view> 去开通
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view style="display: flex;height: 120rpx;margin: 20rpx;background: #fff;border-radius: 20rpx;"> </view>
<view style="flex-grow: 2; margin-left: 20rpx;"> <view style="display: flex;height: 120rpx;margin: 20rpx;background: #fff;border-radius: 20rpx;">
<view <view style="flex-grow: 2; margin-left: 20rpx;">
style="width: 100%;height: 100%;display: flex;flex-direction: column;justify-content: center;"> <view
<view style="font-size: 28rpx;color: #5b1500;">账户余额: {{userBean.point}}看点</view> style="width: 100%;height: 100%;display: flex;flex-direction: column;justify-content: center;">
</view> <view style="font-size: 28rpx;color: #5b1500;">账户余额: {{userBean.point}}看点</view>
</view> </view>
<view style="width: 200rpx;"> </view>
<view <view style="width: 200rpx;">
style="width: 100%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;"> <view
<view @click="handleCoinPay" style="width: 100%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;">
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 @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;">
</view> 去充值
</view> </view>
</view> </view>
</view> </view>
</view>
<view class="inviteClass">
<view @click="handleTask" class="inviteItemclass" style="margin-right: 10rpx"> <view class="inviteClass">
<image style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;" <view @click="handleTask" class="inviteItemclass" style="margin-right: 10rpx">
src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_my_task.png"></image> <image style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
<view style="font-size: 26rpx;color: black;">领免费看点</view> src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_my_task.png"></image>
</view> <view style="font-size: 26rpx;color: black;">领免费看点</view>
<view @click="handleInvite" class="inviteItemclass" style="margin-left: 10rpx"> </view>
<image style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;" <view @click="handleInvite" class="inviteItemclass" style="margin-left: 10rpx">
src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_my_invite.png"></image> <image style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
<view style="font-size: 26rpx;color: black;">邀请好友得看点</view> src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_my_invite.png"></image>
</view> <view style="font-size: 26rpx;color: black;">邀请好友得看点</view>
</view> </view>
</view>
<view class="infobg" style="margin: 20rpx;">
<view class="item arrow" @click="handlePayRecord"> <view class="infobg" style="margin: 20rpx;">
我的订单 <view class="item arrow" @click="handlePayRecord">
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view> 我的订单
</view> <view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
<view v-if="false" class="item arrow" @click="handleCoupon"> </view>
优惠券 <view v-if="false" class="item arrow" @click="handleCoupon">
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view> 优惠券
</view> <view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
<view class="item arrow" @click="handleDotRecord"> </view>
看点记录 <view class="item arrow" @click="handleDotRecord">
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view> 看点记录
</view> <view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
<view class="item arrow" @click="handleUseDotRecord"> </view>
消费记录 <view class="item arrow" @click="handleUseDotRecord">
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view> 消费记录
</view> <view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
<view class="item arrow" @click="handleWatchRecord"> </view>
观看记录 <view class="item arrow" @click="handleWatchRecord">
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view> 观看记录
</view> <view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
<view class="item arrow" @click="handleFind"> </view>
兑换会员 <view class="item arrow" @click="handleFind">
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view> 兑换会员
</view> <view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
<view class="item arrow" @click="handlePhone"> </view>
联系客服 <view class="item arrow" @click="handlePhone">
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view> 联系客服
</view> <view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view> </view>
</z-paging> </view>
</scroll-view>
<kefu-popup :show="showKefuPop" @close="showKefuPop = false" />
</view> <kefu-popup :show="showKefuPop" @close="showKefuPop = false" />
</template> </view>
<script> </template>
import common from '@/mixins/common'; <script>
import { import common from '@/mixins/common';
navigateTo, import {
message, navigateTo,
loading message,
} from '../../utils/fun.js' loading
} from '../../utils/fun.js'
import {
formateTime import {
} from '../../utils/utils.js' formateTime
} 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 {
name: 'index', export default {
mixins: [common], name: 'index',
components: { mixins: [common],
kefuPopup components: {
}, kefuPopup
data() { },
return { data() {
userBean: {}, return {
showMask: false, userBean: {},
showKefuPop: false, showMask: false,
maskImage1: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find1.png', showKefuPop: false,
maskImage2: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find2.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',
}, clientHeight: 0,
methods: { };
show() { },
this.post({ mounted() {
url: '/user/baseMsg', uni.getSystemInfo({
showLoading: false, success: (res => {
success: ({ this.clientHeight = res.windowHeight - 42;
data })
}) => { });
this.userBean = data; },
} methods: {
}); show() {
}, this.post({
hide() { url: '/user/baseMsg',
showLoading: false,
}, success: ({
handleTask() { data
navigateTo(`/pagesA/task/task`) }) => {
}, this.userBean = data;
handleDotRecord() { }
navigateTo(`/pagesD/dotRecord/dotRecord`) });
}, },
handleUseDotRecord() { hide() {
navigateTo(`/pagesD/useDotRecord/useDotRecord`)
}, },
handleWatchRecord() { handleTask() {
navigateTo(`/pagesD/watchRecord/watchRecord`) navigateTo(`/pagesA/task/task`)
}, },
handleInvite() { handleDotRecord() {
navigateTo(`/pagesD/invite/invite`) navigateTo(`/pagesD/dotRecord/dotRecord`)
}, },
handlePayRecord() { handleUseDotRecord() {
navigateTo(`/pagesD/payRecord/payRecord`) navigateTo(`/pagesD/useDotRecord/useDotRecord`)
}, },
handleCoinPay() { handleWatchRecord() {
navigateTo(`/pagesA/vipPay/vipPay`) navigateTo(`/pagesD/watchRecord/watchRecord`)
}, },
handleFind() { handleInvite() {
navigateTo(`/pagesD/cdkey/cdkey`) navigateTo(`/pagesD/invite/invite`)
}, },
handlePhone() { handlePayRecord() {
this.showKefuPop = true navigateTo(`/pagesD/payRecord/payRecord`)
}, },
paySuccess(largeType) { handleCoinPay() {
message.notify('支付成功'); navigateTo(`/pagesA/vipPay/vipPay`)
this.post({ },
url: '/user/baseMsg', handleFind() {
showLoading: false, navigateTo(`/pagesD/cdkey/cdkey`)
success: ({ },
data handlePhone() {
}) => { this.showKefuPop = true
this.userBean = data; },
} paySuccess(largeType) {
}); message.notify('支付成功');
}, this.post({
getFormatTime(time) { url: '/user/baseMsg',
return formateTime(time, 'yyyy-MM-dd') showLoading: false,
} success: ({
} data
}; }) => {
</script> this.userBean = data;
}
<style lang="scss"> });
@import '@/scss/uni.scss'; },
getFormatTime(time) {
.body { return formateTime(time, 'yyyy-MM-dd')
height: 100%; }
background-color: #f0f8ff; }
} };
</script>
.inviteClass {
display: flex; <style lang="scss">
flex-direction: row; @import '@/scss/uni.scss';
background-color: transparent;
margin-left: 20rpx; .body {
margin-right: 20rpx; height: 100%;
height: 100rpx; background-color: #f0f8ff;
justify-content: space-between; }
}
.inviteClass {
.inviteItemclass { display: flex;
display: flex; flex-direction: row;
align-items: center; background-color: transparent;
justify-content: center; margin-left: 20rpx;
width: 50%; margin-right: 20rpx;
border-radius: 15rpx; height: 100rpx;
height: 100rpx; justify-content: space-between;
background-color: #ffffff; }
}
.inviteItemclass {
.avatar { display: flex;
background-color: #d8d8d8; align-items: center;
width: 100rpx; justify-content: center;
height: 100rpx; width: 50%;
border-radius: 50%; border-radius: 15rpx;
overflow: hidden; height: 100rpx;
//box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1) background-color: #ffffff;
} }
.show-mask { .avatar {
width: 100%; background-color: #d8d8d8;
height: 100%; width: 100rpx;
background: rgba(0, 0, 0, 0.6); height: 100rpx;
position: absolute; border-radius: 50%;
z-index: 999; overflow: hidden;
color: white; //box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)
align-items: center; }
image { .show-mask {
width: 90%; width: 100%;
} height: 100%;
} background: rgba(0, 0, 0, 0.6);
position: absolute;
z-index: 999;
color: white;
align-items: center;
image {
width: 90%;
}
}
</style> </style>
\ No newline at end of file
...@@ -124,7 +124,9 @@ ...@@ -124,7 +124,9 @@
this.isFirstLoad = false this.isFirstLoad = false
this.queryList() this.queryList()
} else { } else {
this.videoContext.play() if (this.videoContext) {
this.videoContext.play()
}
} }
}, },
hide() { hide() {
......
<template>
<view class="number-box">
<view @click="_calcValue('minus')" class="number-box-btns" :class="{ 'number-box-disabled': inputValue <= min || disabled }">
<icons icon="minus" :color="inputValue <= min || disabled ? '#868686' : '#299FEF'" size="40" />
</view>
<input :disabled="disabled" @focus="_onFocus" @blur="_onBlur" class="number-box-input" type="number" v-model="inputValue" />
<view @click="_calcValue('plus')" class="number-box-btns"><icons icon="plus" :color="inputValue >= max || disabled ? '#868686' : '#299FEF'" size="40" /></view>
</view>
</template>
<script>
/**
* NumberBox 数字输入框
* @description 带加减按钮的数字输入框
* @tutorial https://ext.dcloud.net.cn/plugin?id=31
* @property {Number} value 输入框当前值
* @property {Number} min 最小值
* @property {Number} max 最大值
* @property {Number} step 每次点击改变的间隔大小
* @property {String} color 字体颜色(前景色)
* @property {Boolean} disabled = [true|false] 是否为禁用状态
* @event {Function} change 输入框值改变时触发的事件,参数为输入框当前的 value
* @event {Function} focus 输入框聚焦时触发的事件,参数为 event 对象
* @event {Function} blur 输入框失焦时触发的事件,参数为 event 对象
*/
export default {
name: 'NumberBox',
emits: ['change', 'input', 'update:modelValue', 'blur', 'focus'],
props: {
value: {
type: [Number, String],
default: 1
},
modelValue: {
type: [Number, String],
default: 1
},
min: {
type: Number,
default: 0
},
max: {
type: Number,
default: 100
},
step: {
type: Number,
default: 1
},
disabled: {
type: Boolean,
default: false
}
},
data() {
return {
inputValue: 0
};
},
watch: {
value(val) {
this.inputValue = +val;
},
modelValue(val) {
this.inputValue = +val;
}
},
created() {
if (this.value === 1) {
this.inputValue = +this.modelValue;
}
if (this.modelValue === 1) {
this.inputValue = +this.value;
}
},
methods: {
_calcValue(type) {
if (this.disabled) {
return;
}
const scale = this._getDecimalScale();
let value = this.inputValue * scale;
let step = this.step * scale;
if (type === 'minus') {
value -= step;
if (value < this.min * scale) {
return;
}
if (value > this.max * scale) {
value = this.max * scale;
}
}
if (type === 'plus') {
value += step;
if (value > this.max * scale) {
return;
}
if (value < this.min * scale) {
value = this.min * scale;
}
}
this.inputValue = (value / scale).toFixed(String(scale).length - 1);
this.$emit('change', +this.inputValue);
// TODO vue2 兼容
this.$emit('input', +this.inputValue);
// TODO vue3 兼容
this.$emit('update:modelValue', +this.inputValue);
},
_getDecimalScale() {
let scale = 1;
// 浮点型
if (~~this.step !== this.step) {
scale = Math.pow(10, String(this.step).split('.')[1].length);
}
return scale;
},
_onBlur(event) {
this.$emit('blur', event);
let value = event.detail.value;
if (!value) {
// this.inputValue = 0;
return;
}
value = +value;
if (value > this.max) {
value = this.max;
} else if (value < this.min) {
value = this.min;
}
const scale = this._getDecimalScale();
this.inputValue = value.toFixed(String(scale).length - 1);
this.$emit('change', +this.inputValue);
this.$emit('input', +this.inputValue);
},
_onFocus(event) {
this.$emit('focus', event);
}
}
};
</script>
<style lang="scss">
.number-box {
display: inline-flex;
align-items: center;
margin-right: -16rpx;
&-btns {
line-height: 1;
vertical-align: bottom;
display: inline-block;
padding: 16rpx;
cursor: pointer;
}
&-input {
margin: 0 4rpx;
width: 50rpx;
text-align: center;
color: black;
}
}
</style>
<template> <template>
<view> <view>
<view class="container" v-show="showRewardAdPop"> <view class="container" v-show="true">
<image @click="closeAdPop" style="width: 50rpx; height: 50rpx;margin-left:auto;margin-right: 30rpx; <image @click="closeAdPop" style="width: 50rpx; height: 50rpx;margin-left:auto;margin-right: 30rpx;
margin-bottom: 30rpx;" src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_close_white.png"></image> margin-bottom: 30rpx;" src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_close_white.png"></image>
<view class="content"> <view class="content">
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</view> </view>
</view> </view>
<view class="shortcut" v-show="showShortcutPop"> <view class="shortcut" v-show="true">
<image style="width:70rpx;height:70rpx;margin-left:10rpx;" src="../../static/logo-about.png"> <image style="width:70rpx;height:70rpx;margin-left:10rpx;" src="../../static/logo-about.png">
</image> </image>
<view class="flex1" style="margin-left:20rpx;"> <view class="flex1" style="margin-left:20rpx;">
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
seq: 0, seq: 0,
episodeId: "", episodeId: "",
countDown: 3, countDown: 3,
showRewardAdPop: false, showRewardAdPop: true,
showAdForServer: false, showAdForServer: false,
showShortcutPop: false, showShortcutPop: false,
canShowShortcut: false, canShowShortcut: false,
...@@ -54,7 +54,10 @@ ...@@ -54,7 +54,10 @@
async beforeCreate() { async beforeCreate() {
const pm = await getPlayletManager({ const pm = await getPlayletManager({
is: "playler", // 和插槽同名 is: "playler", // 和插槽同名
}); });
console.log('AAAAAAAAAAAAA', pm)
pm.getPlayletInfo().then(res => { pm.getPlayletInfo().then(res => {
this.albumId = res.albumId this.albumId = res.albumId
this.seq = res.seq this.seq = res.seq
...@@ -276,7 +279,6 @@ ...@@ -276,7 +279,6 @@
} }
}); });
// do other thing
// 卸载 close 事件监听 // 卸载 close 事件监听
// this.ad.offClose(closeHandler); // this.ad.offClose(closeHandler);
......
import { import {
navigateTo, navigateTo,
redirectTo, redirectTo,
loading, loading,
message, message,
confirm, confirm,
alert alert
} from '../utils/fun.js'; } from '../utils/fun.js';
const app = getApp(); const app = getApp();
export default { export default {
data() { data() {
return { return {
xhrPool: new Set(), xhrPool: new Set(),
bottomSafePadding: app.globalData.bottomSafePadding, bottomSafePadding: app.globalData.bottomSafePadding,
options: {}, options: {},
auth: false, // 登录验证 auth: false, // 登录验证
paying: false, // 支付按钮状态 paying: false, // 支付按钮状态
}; };
}, },
onLoad(options) { onLoad(options) {
this.options = options; this.options = options;
}, },
onShow() { onShow() {
this.loadData(); this.loadData();
}, },
onHide() { onHide() {
if (this.xhrPool.size) { if (this.xhrPool && this.xhrPool.size) {
this.xhrPool.forEach((requestTask) => { this.xhrPool.forEach((requestTask) => {
requestTask.abort(); requestTask.abort();
}) })
} }
}, },
methods: { methods: {
authTo(url) {//登录校验 authTo(url) { //登录校验
}, },
authToNs(url) {//登录校验不保留当前页面 authToNs(url) { //登录校验不保留当前页面
}, },
loadData() {}, loadData() {},
startPay() { startPay() {
loading.show(); loading.show();
this.paying = true; this.paying = true;
}, },
stopPay() { stopPay() {
loading.hide(); loading.hide();
this.paying = false; this.paying = false;
}, },
/** /**
* @param {Object} url 接口请求地址 * @param {Object} url 接口请求地址
* @param {Object} method 接口请求方式 * @param {Object} method 接口请求方式
* @param {Object} data 接口请求参数 * @param {Object} data 接口请求参数
*/ */
$http(url, method, data = {}, showLoading = false) { $http(url, method, data = {}, showLoading = false) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this[method.toLowerCase()]({ this[method.toLowerCase()]({
url: url, url: url,
data: data, data: data,
showLoading: showLoading, showLoading: showLoading,
success: (res) => { success: (res) => {
resolve(res) resolve(res)
}, },
fail: (e) => { fail: (e) => {
reject(e) reject(e)
} }
}); });
}) })
}, },
login() { login() {
// navigateTo('user/login'); // navigateTo('user/login');
// let redirect = this.$scope.$page.fullPath.replace('/pages', ''); // let redirect = this.$scope.$page.fullPath.replace('/pages', '');
// console.log(redirect) // console.log(redirect)
// navigateTo('user/login?redirect=' + encodeURIComponent(redirect)); // navigateTo('user/login?redirect=' + encodeURIComponent(redirect));
}, },
logout() { logout() {
uni.removeStorageSync('token'); uni.removeStorageSync('token');
}, },
put(options) { put(options) {
options = Object.assign({ options = Object.assign({
showLoading: true showLoading: true
}, options, { }, options, {
method: 'PUT' method: 'PUT'
}) })
this.req(options); this.req(options);
}, },
post(options) { post(options) {
options = Object.assign({ options = Object.assign({
showLoading: true showLoading: true
}, options, { }, options, {
method: 'POST' method: 'POST'
}) })
this.req(options); this.req(options);
}, },
get(options) { get(options) {
options = Object.assign({ options = Object.assign({
showLoading: false showLoading: false
}, options, { }, options, {
method: 'GET' method: 'GET'
}) })
this.req(options); this.req(options);
}, },
req(options) { req(options) {
let { let {
showLoading, showLoading,
url, url,
data, data,
auth auth
} = options; } = options;
const success = options?.success; const success = options?.success;
const fail = options?.fail; const fail = options?.fail;
const header = options?.header ?? {}; const header = options?.header ?? {};
showLoading && loading.show(); showLoading && loading.show();
let requestTask; let requestTask;
let uniChannel='wechat'; let uniChannel = 'wechat';
// #ifdef MP-KUAISHOU // #ifdef MP-KUAISHOU
uniChannel='kuaishou'; uniChannel = 'kuaishou';
// #endif // #endif
// #ifdef MP-TOUTIAO // #ifdef MP-TOUTIAO
uniChannel='douyin'; uniChannel = 'douyin';
// #endif // #endif
Object.assign(header, { Object.assign(header, {
token: uni.getStorageSync('token'), token: uni.getStorageSync('token'),
pkgName: app.globalData.pkgName, pkgName: app.globalData.pkgName,
version: app.globalData.versionName, version: app.globalData.versionName,
proChannel:uniChannel proChannel: uniChannel
}) })
options = Object.assign(options, { options = Object.assign(options, {
url: `${app.globalData.baseUrl}${url}`, url: `${app.globalData.baseUrl}${url}`,
header, header,
data, data,
success: (res) => { success: (res) => {
showLoading && loading.hide(); showLoading && loading.hide();
switch (res.data.status) { switch (res.data.status) {
case 200: case 200:
if (success) { if (success) {
success(res.data); success(res.data);
} }
break; break;
default: default:
if (fail) { if (fail) {
fail(res.data.message); fail(res.data.message);
} }
message.notify(res.data.message); message.notify(res.data.message);
break; break;
} }
}, },
fail: (e) => { fail: (e) => {
// message.notify('服务器开小差了'); // message.notify('服务器开小差了');
// alert({ // alert({
// content: JSON.stringify(e) // content: JSON.stringify(e)
// }); // });
if (fail) { if (fail) {
fail(e); fail(e);
} }
}, },
complete: () => { complete: () => {
this.xhrPool.delete(requestTask) if (this.xhrPool) {
} this.xhrPool.delete(requestTask)
}) }
}
requestTask = uni.request(options); })
this.xhrPool.add(requestTask)
} requestTask = uni.request(options);
} if (this.xhrPool) {
}; this.xhrPool.add(requestTask)
}
}
}
};
\ No newline at end of file
...@@ -36,12 +36,7 @@ ...@@ -36,12 +36,7 @@
{ {
"root": "pagesC", "root": "pagesC",
"pages": [{ "pages": [{
"path": "ttvideo/ttVideoDetail", "path": "ttvideo/ttVideoDetail"
"style": {
"backgroundColor": "#000000",
"navigationBarBackgroundColor": "#000000",
"navigationBarTextStyle": "#ffffff"
}
}, { }, {
"path": "playlet/index", "path": "playlet/index",
"style": { "style": {
......
...@@ -7,9 +7,8 @@ ...@@ -7,9 +7,8 @@
ref="follow" /> ref="follow" />
<userPage v-show="currentPage==3" ref="user" /> <userPage v-show="currentPage==3" ref="user" />
</view> </view>
<view v-if="!isShowBlackBar" class="tabs-bar"> <view class="home-tab">
<view :class="currentPage==0?'tab active': 'tab'" <view :class="currentPage==0?'tab active': 'tab'" @click="tabChange(0)">
:style="'padding-top:35rpx;padding-bottom:' + bottomSafePadding + 'px;'" @click="tabChange(0)">
<view v-if="false" style="margin: 16rpx 0 11rpx;"> <view v-if="false" style="margin: 16rpx 0 11rpx;">
<image v-if="currentPage==0" class="tabs-image" src="/static/tab/index_selected.png" <image v-if="currentPage==0" class="tabs-image" src="/static/tab/index_selected.png"
mode="heightFix"> mode="heightFix">
...@@ -18,8 +17,7 @@ ...@@ -18,8 +17,7 @@
</view> </view>
剧场 剧场
</view> </view>
<view :class="currentPage == 1?'tab active': 'tab'" <view :class="currentPage == 1?'tab active': 'tab'" @click="tabChange(1)">
:style="'padding-top:35rpx;padding-bottom:' + bottomSafePadding + 'px;'" @click="tabChange(1)">
<view v-if="false" style="margin: 16rpx 0 11rpx;"> <view v-if="false" style="margin: 16rpx 0 11rpx;">
<image v-if="currentPage==1" class="tabs-image" src="/static/tab/promote_selected.png" <image v-if="currentPage==1" class="tabs-image" src="/static/tab/promote_selected.png"
mode="heightFix"></image> mode="heightFix"></image>
...@@ -27,8 +25,7 @@ ...@@ -27,8 +25,7 @@
</view> </view>
推荐 推荐
</view> </view>
<view :class="currentPage == 2?'tab active': 'tab'" <view :class="currentPage == 2?'tab active': 'tab'" @click="tabChange(2)">
:style="'padding-top:35rpx;padding-bottom:' + bottomSafePadding + 'px;'" @click="tabChange(2)">
<view v-if="false" style="margin: 16rpx 0 11rpx;"> <view v-if="false" style="margin: 16rpx 0 11rpx;">
<image v-if="currentPage==2" class="tabs-image" src="/static/tab/promote_selected.png" <image v-if="currentPage==2" class="tabs-image" src="/static/tab/promote_selected.png"
mode="heightFix"></image> mode="heightFix"></image>
...@@ -36,8 +33,7 @@ ...@@ -36,8 +33,7 @@
</view> </view>
看过 看过
</view> </view>
<view :class="currentPage == 3?'tab active': 'tab'" <view :class="currentPage == 3?'tab active': 'tab'" @click="tabChange(3)">
:style="'padding-top:35rpx;padding-bottom:' + bottomSafePadding + 'px;'" @click="tabChange(3)">
<view v-if="false" style="margin: 16rpx 0 11rpx;"> <view v-if="false" style="margin: 16rpx 0 11rpx;">
<image v-if="currentPage==3" class="tabs-image" src="/static/tab/my_selected.png" mode="heightFix"> <image v-if="currentPage==3" class="tabs-image" src="/static/tab/my_selected.png" mode="heightFix">
</image> </image>
...@@ -47,37 +43,6 @@ ...@@ -47,37 +43,6 @@
</view> </view>
</view> </view>
<view v-if="isShowBlackBar" class="tabs-bar2">
<view :class="currentPage==0?'tab active': 'tab'"
:style="'padding-top:35rpx;padding-bottom:' + bottomSafePadding + 'px;'" @click="tabChange(0)">
<view v-if="false" style="margin: 16rpx 0 11rpx;">
<image v-if="currentPage==0" class="tabs-image" src="/static/tab/index_selected.png"
mode="heightFix">
</image>
<image v-else class="tabs-image" src="/static/tab/index_unselected.png" mode="heightFix"></image>
</view>
剧场
</view>
<view :class="currentPage == 1?'tab active': 'tab'"
:style="'padding-top:35rpx;padding-bottom:' + bottomSafePadding + 'px;'" @click="tabChange(1)">
<view v-if="false" style="margin: 16rpx 0 11rpx;">
<image v-if="currentPage==1" class="tabs-image" src="/static/tab/promote_selected.png"
mode="heightFix"></image>
<image v-else class="tabs-image" src="/static/tab/promote_unselected.png" mode="heightFix"></image>
</view>
推荐
</view>
<view :class="currentPage == 2?'tab active': 'tab'"
:style="'padding-top:35rpx;padding-bottom:' + bottomSafePadding + 'px;'" @click="tabChange(2)">
<view v-if="false" style="margin: 16rpx 0 11rpx;">
<image v-if="currentPage==2" class="tabs-image" src="/static/tab/my_selected.png" mode="heightFix">
</image>
<image v-else class="tabs-image" src="/static/tab/my_unselected.png" mode="heightFix"></image>
</view>
我的
</view>
</view>
<view v-if="showEditBar" class="editBar" <view v-if="showEditBar" class="editBar"
:style="'padding-top:35rpx;padding-bottom:' + bottomSafePadding + 'px;'"> :style="'padding-top:35rpx;padding-bottom:' + bottomSafePadding + 'px;'">
<view class="editItem" @click="!isFullChoice?fullChoice():noChoice()"> <view class="editItem" @click="!isFullChoice?fullChoice():noChoice()">
...@@ -117,7 +82,6 @@ ...@@ -117,7 +82,6 @@
currentPage: 0, currentPage: 0,
showEditBar: false, showEditBar: false,
isFullChoice: false, isFullChoice: false,
isShowBlackBar: false
} }
}, },
onLoad(options) { onLoad(options) {
...@@ -129,9 +93,7 @@ ...@@ -129,9 +93,7 @@
if (tt.setVisualEffectOnCapture) { if (tt.setVisualEffectOnCapture) {
tt.setVisualEffectOnCapture({ tt.setVisualEffectOnCapture({
visualEffect: 'hidden', visualEffect: 'hidden',
success: (res) => { success: (res) => {},
},
}) })
} }
}, },
...@@ -226,40 +188,41 @@ ...@@ -226,40 +188,41 @@
<style lang="scss"> <style lang="scss">
.body { .body {
height: 100%; height: 100%;
// background-color: white;
} }
.editBar { .editBar {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
height: 110rpx; height: 60rpx;
background: white; background: white;
display: flex; display: flex;
.editItem { .editItem {
height: 110rpx; height: 60rpx;
line-height: 110rpx; line-height: 60rpx;
text-align: center; text-align: center;
width: 50%; width: 50%;
} }
} }
.tabs-bar2 { .home-tab {
display: flex; display: flex;
background-color: black; align-items: center;
background-color: white;
height: 42px;
.tab { .tab {
height: 110rpx;
flex: 1; flex: 1;
text-align: center; text-align: center;
font-size: 26rpx; font-size: 12px;
font-weight: bold; font-weight: bold;
color: white; color: black;
&.active { &.active {
color: #F8425A; color: #F8425A;
} }
} }
} }
</style> </style>
\ No newline at end of file
<template></template>
<script> <script>
import Player from "@/components/player/player.vue"; import Player from "@/components/player/player.vue";
import Charge from "@/components/charge/charge.vue"; import Charge from "@/components/charge/charge.vue";
...@@ -44,7 +45,7 @@ ...@@ -44,7 +45,7 @@
console.log("show"); console.log("show");
}, },
mounted() { mounted() {
console.error(this, "this"); // console.error(this, "this");
}, },
onShareAppMessage() { onShareAppMessage() {
console.log("share"); console.log("share");
......
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