Commit a9580391 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 2b7150a6
<template>
<view>
<uni-popup type="center" ref="adPop" :maskClick="false" :isMaskClick="false">
<view class="container">
<!-- <view class="ad-view">
<ad :unit-id="adUnitId" @load="onload" @close="onclose" @error="onerror"></ad>
</view> -->
<view class="content">
<text class="title">恭喜你,获得免费看剧名额</text>
<text class="button" @click="handleClose">看视频免费解锁1集</text>
<text class="downtext">{{countDown}}s后自动进入广告,观看完成解锁第{{vedioIndex+1}}集剧情</text>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import {
EXPRESS_ID
} from "@/utils/adConstant.js"
export default {
name: 'adPopup',
props: {
show: {
type: Boolean,
default: false,
<template>
<view>
<uni-popup type="center" ref="adPop" :maskClick="false" :isMaskClick="false">
<view class="container">
<!-- <view class="ad-view">
<ad :unit-id="adUnitId" @load="onload" @close="onclose" @error="onerror"></ad>
</view> -->
<view class="content">
<text class="title">恭喜你,获得免费看剧名额</text>
<text class="button" @click="handleClose">看视频免费解锁1集</text>
<text class="downtext">{{countDown}}s后自动进入广告,阅读完成解锁第{{vedioIndex+1}}集剧情</text>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import {
EXPRESS_ID
} from "@/utils/adConstant.js"
export default {
name: 'adPopup',
props: {
show: {
type: Boolean,
default: false,
},
vedioIndex: {
type: [Number, String],
default: 0
}
},
data() {
return {
adUnitId: EXPRESS_ID,
countDown: 3,
};
},
methods: {
handleShow() {
this.$refs.adPop.open('center');
this.startCountdown()
},
startCountdown() {
let that = this;
var countDownSeconds = 3
that.countDown = countDownSeconds
const timer = setInterval(() => {
if (countDownSeconds > 0) {
that.countDown = countDownSeconds
countDownSeconds--
} else {
clearInterval(timer)
that.handleClose()
}
}, 1000)
},
handleClose() {
this.$refs.adPop.close('center');
this.$emit('close');
},
onload(e) {
console.log("onload");
},
onclose(e) {
console.log("onclose: " + e.detail);
},
onerror(e) {
console.log("onerror: " + e.detail.errCode + " message:: " + e.detail.errMsg);
}
},
watch: {
show: {
handler: function(newVal, oldVal) {
if (newVal) {
this.handleShow();
}
},
immediate: true
}
}
};
</script>
<style lang="scss">
.container {
width: 600rpx;
height: 800rpx;
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
}
.ad-view {
width: 600rpx;
border-radius: 20rpx;
// background-color: white;
margin-bottom: 10px;
}
.content {
border-radius: 20rpx;
background-color: white;
display: flex;
width: 600rpx;
padding: 30rpx 0;
flex-direction: column;
align-items: center;
.title {
color: black;
font-size: 40rpx;
font-weight: bold;
margin-bottom: 30rpx;
}
.button {
margin: 20rpx 20rpx;
border-radius: 10rpx;
background-color: orange;
color: white;
font-size: 36rpx;
}
},
data() {
return {
adUnitId: EXPRESS_ID,
countDown: 3,
};
},
methods: {
handleShow() {
this.$refs.adPop.open('center');
this.startCountdown()
},
startCountdown() {
let that = this;
var countDownSeconds = 3
that.countDown = countDownSeconds
const timer = setInterval(() => {
if (countDownSeconds > 0) {
that.countDown = countDownSeconds
countDownSeconds--
} else {
clearInterval(timer)
that.handleClose()
}
}, 1000)
},
handleClose() {
this.$refs.adPop.close('center');
this.$emit('close');
},
onload(e) {
console.log("onload");
},
onclose(e) {
console.log("onclose: " + e.detail);
},
onerror(e) {
console.log("onerror: " + e.detail.errCode + " message:: " + e.detail.errMsg);
}
},
watch: {
show: {
handler: function(newVal, oldVal) {
if (newVal) {
this.handleShow();
}
},
immediate: true
}
}
};
</script>
<style lang="scss">
.container {
width: 600rpx;
height: 800rpx;
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
}
.ad-view {
width: 600rpx;
border-radius: 20rpx;
// background-color: white;
margin-bottom: 10px;
}
.content {
border-radius: 20rpx;
background-color: white;
display: flex;
width: 600rpx;
padding: 30rpx 0;
flex-direction: column;
align-items: center;
.title {
color: black;
font-size: 40rpx;
font-weight: bold;
margin-bottom: 30rpx;
}
.button {
margin: 20rpx 20rpx;
border-radius: 10rpx;
background-color: orange;
color: white;
font-size: 36rpx;
}
.downtext{
color: darkgray;
font-size: 26rpx;
}
}
}
}
</style>
\ No newline at end of file
This diff is collapsed.
......@@ -175,7 +175,7 @@
:src="newRecordBean.coverImage" mode="aspectFill"></image>
<view style="margin: 20rpx;">
<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 style="font-size: 22rpx;"
v-if="newRecordBean.orderTags!=null&&newRecordBean.orderTags.length>0">
......@@ -202,7 +202,7 @@
color: white;
font-size: 24rpx;
margin-right: 20rpx;">
继续观看
继续阅读
</view>
</view>
......@@ -306,7 +306,7 @@
this.topList = data.list;
}
});
// 最近观看
// 最近阅读
this.post({
url: '/vedio/newest',
data: {},
......
This diff is collapsed.
......@@ -177,7 +177,7 @@
"enable" : true
}
},
"title" : "短剧",
"title" : "小说",
"router" : {
"base" : "./"
},
......
export default {
data() {
return {
share: {
title: '更多好剧,等你来看',
imageUrl: 'https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/ic_movie.png',
path: '/pages/loading?shareId='
}
}
},
onShareAppMessage(res) { //发送给朋友
return {
title: this.share.title,
imageUrl: this.share.imageUrl,
path: this.share.path,
}
},
onShareTimeline(res) { //分享到朋友圈
return {
title: this.share.title,
imageUrl: this.share.imageUrl,
path: this.share.path,
}
},
export default {
data() {
return {
share: {
title: '更多小说,等你来看',
imageUrl: 'https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/ic_movie.png',
path: '/pages/loading?shareId='
}
}
},
onShareAppMessage(res) { //发送给朋友
return {
title: this.share.title,
imageUrl: this.share.imageUrl,
path: this.share.path,
}
},
onShareTimeline(res) { //分享到朋友圈
return {
title: this.share.title,
imageUrl: this.share.imageUrl,
path: this.share.path,
}
},
}
\ No newline at end of file
{
"easycom": {
"^u-(.*)": "@/uni_modules/uview-ui/components/u-$1/u-$1.vue",
"autoscan": true,
"custom": {
"^n-(.*)": "@/nPro/$1/$1.vue", // 匹配nPro内的vue文件
"^nx-(.*)": "@/nProX/$1/$1.vue" // 匹配nProX内的vue文件
}
},
"pages": [
// #ifndef APP-PLUS
{
"path": "pages/loading",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#F2F1FF",
"navigationBarTextStyle": "#000000"
}
},
// #endif
{
"path": "pages/home",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "#000000"
}
}, {
"path": "pages/index/index",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "#000000"
}
},
{
"path": "pages/my/my",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "#000000"
}
}, {
"path": "pages/brower/brower",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}, {
"path": "pages/recommend/recommend",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#000000",
"navigationBarTextStyle": "#ffffff"
}
}, {
"path": "pages/recommend/follow",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "#000000"
}
}, {
"path": "pages/recommend/recommendVideo",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#000000",
"navigationBarTextStyle": "#ffffff"
}
}
],
// 分包配置
"subPackages": [{
"root": "pagesA",
"pages": [{
"path": "vipPay/vipPay",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#2196f3",
"navigationBarTextStyle": "black"
}
}]
}, {
"root": "pagesC",
"pages": [{
"path": "ttvideo/ttVideoDetail",
{
"easycom": {
"^u-(.*)": "@/uni_modules/uview-ui/components/u-$1/u-$1.vue",
"autoscan": true,
"custom": {
"^n-(.*)": "@/nPro/$1/$1.vue", // 匹配nPro内的vue文件
"^nx-(.*)": "@/nProX/$1/$1.vue" // 匹配nProX内的vue文件
}
},
"pages": [
// #ifndef APP-PLUS
{
"path": "pages/loading",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#F2F1FF",
"navigationBarTextStyle": "#000000"
}
},
// #endif
{
"path": "pages/home",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "#000000"
}
}, {
"path": "pages/index/index",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "#000000"
}
},
{
"path": "pages/my/my",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "#000000"
}
}, {
"path": "pages/brower/brower",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}, {
"path": "pages/recommend/recommend",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#000000",
"navigationBarTextStyle": "#ffffff"
}
}, {
"path": "pages/recommend/follow",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "#000000"
}
}, {
"path": "pages/recommend/recommendVideo",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#000000",
"navigationBarTextStyle": "#ffffff"
}
}
],
// 分包配置
"subPackages": [{
"root": "pagesA",
"pages": [{
"path": "vipPay/vipPay",
"style": {
"backgroundColor": "#000000",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#000000",
"navigationBarTextStyle": "#ffffff",
"usingComponents ": {
"video-player": "ext://industry/video-player"
}
}
}]
},
{
"root": "pagesD",
"pages": [{
"path": "watchRecord/watchRecord",
"style": {
"navigationBarTitleText": "观看记录",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}, {
"path": "payRecord/payRecord",
"style": {
"navigationBarTitleText": "我的订单",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}, {
"path": "dotRecord/dotRecord",
"style": {
"navigationBarTitleText": "看点记录",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}, {
"path": "useDotRecord/useDotRecord",
"style": {
"navigationBarTitleText": "消费记录",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}]
}
],
// 分包预载配置
"preloadRule": {
// 当我们进入了pages/home页面以后就会预下载pagesA分包
"pages/home": {
"network": "all", //在指定网络下预下载,可选值为:all(不限网络)、wifi(仅wifi下预下载)
"packages": ["pagesA", "pagesC", "pagesD"] //进入页面后预下载分包
},
"pages/recommend/recommend": {
"network": "all", //在指定网络下预下载,可选值为:all(不限网络)、wifi(仅wifi下预下载)
"packages": ["pagesC"] //进入页面后预下载分包
},
"pages/my/my": {
"network": "all", //在指定网络下预下载,可选值为:all(不限网络)、wifi(仅wifi下预下载)
"packages": ["pagesD"] //进入页面后预下载分包
}
},
"globalStyle": {
"backgroundColor": "#f5f5f5",
"navigationStyle": "default",
"app-plus": {
"bounce": "none",
"scrollIndicator": "none"
}
},
"condition": { //模式配置,仅开发期间生效
"current": 0, //当前激活的模式(list 的索引项)
"list": [{
"name": "", //模式名称
"path": "", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
}]
}
"navigationStyle": "default",
"navigationBarBackgroundColor": "#2196f3",
"navigationBarTextStyle": "black"
}
}]
}, {
"root": "pagesC",
"pages": [{
"path": "ttvideo/ttVideoDetail",
"style": {
"backgroundColor": "#000000",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#000000",
"navigationBarTextStyle": "#ffffff",
"usingComponents ": {
"video-player": "ext://industry/video-player"
}
}
}]
},
{
"root": "pagesD",
"pages": [{
"path": "watchRecord/watchRecord",
"style": {
"navigationBarTitleText": "阅读记录",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}, {
"path": "payRecord/payRecord",
"style": {
"navigationBarTitleText": "我的订单",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}, {
"path": "dotRecord/dotRecord",
"style": {
"navigationBarTitleText": "书豆记录",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}, {
"path": "useDotRecord/useDotRecord",
"style": {
"navigationBarTitleText": "消费记录",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}]
}
],
// 分包预载配置
"preloadRule": {
// 当我们进入了pages/home页面以后就会预下载pagesA分包
"pages/home": {
"network": "all", //在指定网络下预下载,可选值为:all(不限网络)、wifi(仅wifi下预下载)
"packages": ["pagesA", "pagesC", "pagesD"] //进入页面后预下载分包
},
"pages/recommend/recommend": {
"network": "all", //在指定网络下预下载,可选值为:all(不限网络)、wifi(仅wifi下预下载)
"packages": ["pagesC"] //进入页面后预下载分包
},
"pages/my/my": {
"network": "all", //在指定网络下预下载,可选值为:all(不限网络)、wifi(仅wifi下预下载)
"packages": ["pagesD"] //进入页面后预下载分包
}
},
"globalStyle": {
"backgroundColor": "#f5f5f5",
"navigationStyle": "default",
"app-plus": {
"bounce": "none",
"scrollIndicator": "none"
}
},
"condition": { //模式配置,仅开发期间生效
"current": 0, //当前激活的模式(list 的索引项)
"list": [{
"name": "", //模式名称
"path": "", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
}]
}
}
\ No newline at end of file
......@@ -5,7 +5,7 @@
<view style="color: #A231EF;margin-top: 10rpx;font-size: 40rpx;font-size: 40rpx;">欢迎使用</view>
<view style="bottom: 0;position: absolute;">
<image style="width: 540rpx;height: 644rpx;display: flex;align-items: center;margin-bottom: 30%;"
src="https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/bg_splash.png" mode="scaleToFill">
src="https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/book_bg_splash.png" mode="scaleToFill">
</image>
</view>
......@@ -40,6 +40,7 @@
},
onLoad(options) {
this.tips1 = options.tips1
this.appName = '幻墨小说阁'
},
onShow(options) {
......
This diff is collapsed.
This diff is collapsed.
<template>
<view class="body">
<!-- <status-title :showBack="true">看点记录</status-title> -->
<z-paging class="flex-1" ref="paging" v-model="dataList" @query="queryList">
<view v-for="(item, i) in dataList" :key="i">
<view class="flex m-20 pd-20" style="background-color:white;border-radius:10rpx;">
<image style="margin: auto 10rpx;width: 60rpx;height: 60rpx;" src="../../static/ic_coin.png">
</image>
<view class="flex1 ml-10">
<view class="mt-10" style="font-size: 28rpx;color: black;">{{item.remark}}</view>
<view class="mt-10" style="font-size: 26rpx;color: darkgray;">
{{item.time}}
</view>
</view>
<view style="margin:auto 10rpx auto auto;font-size: 36rpx;color: steelblue;">
{{ '+'+ item.subValue + '看点'}}
</view>
</view>
</view>
</z-paging>
</view>
</template>
<script>
import common from '@/mixins/common';
import {
formateTime
} from "@/utils/utils.js"
export default {
name: 'dotRecord',
mixins: [common],
data() {
return {
dataList: []
};
},
methods: {
show() {
if (this.$refs.paging != null) {
this.$refs.paging.refresh();
}
},
myFormateTime(time) {
return formateTime(time, 'yyyy-MM-dd hh:mm:ss')
},
queryList(page, size) {
this.post({
url: '/vedio/assetsRecords/add',
data: {
page,
size
},
showLoading: false,
success: ({
data
}) => {
this.$refs.paging.complete(data.list);
}
});
}
}
};
</script>
<style lang="scss">
.body {
background-color: whitesmoke;
}
<template>
<view class="body">
<!-- <status-title :showBack="true">书豆记录</status-title> -->
<z-paging class="flex-1" ref="paging" v-model="dataList" @query="queryList">
<view v-for="(item, i) in dataList" :key="i">
<view class="flex m-20 pd-20" style="background-color:white;border-radius:10rpx;">
<image style="margin: auto 10rpx;width: 60rpx;height: 60rpx;" src="../../static/ic_coin.png">
</image>
<view class="flex1 ml-10">
<view class="mt-10" style="font-size: 28rpx;color: black;">{{item.remark}}</view>
<view class="mt-10" style="font-size: 26rpx;color: darkgray;">
{{item.time}}
</view>
</view>
<view style="margin:auto 10rpx auto auto;font-size: 36rpx;color: steelblue;">
{{ '+'+ item.subValue + '书豆'}}
</view>
</view>
</view>
</z-paging>
</view>
</template>
<script>
import common from '@/mixins/common';
import {
formateTime
} from "@/utils/utils.js"
export default {
name: 'dotRecord',
mixins: [common],
data() {
return {
dataList: []
};
},
methods: {
show() {
if (this.$refs.paging != null) {
this.$refs.paging.refresh();
}
},
myFormateTime(time) {
return formateTime(time, 'yyyy-MM-dd hh:mm:ss')
},
queryList(page, size) {
this.post({
url: '/vedio/assetsRecords/add',
data: {
page,
size
},
showLoading: false,
success: ({
data
}) => {
this.$refs.paging.complete(data.list);
}
});
}
}
};
</script>
<style lang="scss">
.body {
background-color: whitesmoke;
}
</style>
\ No newline at end of file
<template>
<view class="body">
<!-- <status-title :showBack="true">消费记录</status-title> -->
<z-paging class="flex-1" ref="paging" v-model="dataList" @query="queryList">
<view v-for="(item, i) in dataList" :key="i">
<view class="flex m-20 pd-20" style="background-color:white;border-radius:10rpx;">
<image style="margin: auto 10rpx;width: 60rpx;height: 60rpx;" src="../../static/ic_shop.png">
</image>
<view class="flex1 ml-10">
<view class="mt-10" style="font-size: 28rpx;color: black;">{{item.remark}}
</view>
<view class="mt-10" style="font-size: 26rpx;color: darkgray;">
{{item.time}}
</view>
</view>
<view style="margin:auto 10rpx auto auto;font-size: 36rpx;color: steelblue;">
{{ '-'+ item.subValue + '看点'}}
</view>
</view>
</view>
</z-paging>
</view>
</template>
<script>
import common from '@/mixins/common';
import {
formateTime
} from "@/utils/utils.js"
export default {
name: 'useDotRecord',
mixins: [common],
data() {
return {
dataList: []
};
},
methods: {
show() {
if (this.$refs.paging != null) {
this.$refs.paging.refresh();
}
},
myFormateTime(time) {
return formateTime(time, 'yyyy-MM-dd hh:mm:ss')
},
queryList(page, size) {
this.post({
url: '/vedio/assetsRecords/sub',
data: {
page,
size
},
showLoading: false,
success: ({
data
}) => {
this.$refs.paging.complete(data.list);
}
});
}
}
};
</script>
<style lang="scss">
.body {
background-color: whitesmoke;
}
<template>
<view class="body">
<!-- <status-title :showBack="true">消费记录</status-title> -->
<z-paging class="flex-1" ref="paging" v-model="dataList" @query="queryList">
<view v-for="(item, i) in dataList" :key="i">
<view class="flex m-20 pd-20" style="background-color:white;border-radius:10rpx;">
<image style="margin: auto 10rpx;width: 60rpx;height: 60rpx;" src="../../static/ic_shop.png">
</image>
<view class="flex1 ml-10">
<view class="mt-10" style="font-size: 28rpx;color: black;">{{item.remark}}
</view>
<view class="mt-10" style="font-size: 26rpx;color: darkgray;">
{{item.time}}
</view>
</view>
<view style="margin:auto 10rpx auto auto;font-size: 36rpx;color: steelblue;">
{{ '-'+ item.subValue + '书豆'}}
</view>
</view>
</view>
</z-paging>
</view>
</template>
<script>
import common from '@/mixins/common';
import {
formateTime
} from "@/utils/utils.js"
export default {
name: 'useDotRecord',
mixins: [common],
data() {
return {
dataList: []
};
},
methods: {
show() {
if (this.$refs.paging != null) {
this.$refs.paging.refresh();
}
},
myFormateTime(time) {
return formateTime(time, 'yyyy-MM-dd hh:mm:ss')
},
queryList(page, size) {
this.post({
url: '/vedio/assetsRecords/sub',
data: {
page,
size
},
showLoading: false,
success: ({
data
}) => {
this.$refs.paging.complete(data.list);
}
});
}
}
};
</script>
<style lang="scss">
.body {
background-color: whitesmoke;
}
</style>
\ No newline at end of file
<template>
<view class="body">
<!-- <status-title :showBack="true">观看记录</status-title> -->
<z-paging class="flex-1" ref="paging" v-model="dataList" @query="queryList" :defaultPageNo="1"
:defaultPageSize="500">
<view style="font-size: 30rpx;font-weight: 777;margin-left: 12rpx;margin-top: 10rpx;">最近观看</view>
<view v-for="(item, i) in dataList" :key="i">
<view style="display: flex;flex-direction: row;justify-content:space-between;margin: 20rpx;">
<view style="display: flex;align-items: center;" @click="handleInfo(item)">
<image class="img" :src="item.coverImage" mode="aspectFill"></image>
<view style="display: flex;flex-direction: column;margin-left: 20rpx;">
<view style="font-size: 30rpx;color: black;">{{item.title}}</view>
<view style="font-size: 22rpx;color: gray;margin-top: 16rpx;">观看至第{{item.seeIndex}}</view>
</view>
</view>
<view style="display: flex;align-items: center;margin-right: 8rpx;">
<view style="display: flex;flex-direction: column;">
<image v-if="item.collect==0" @click="handleXing(item)"
style="width: 50rpx;height: 50rpx;display: flex;align-items: right;padding-right: 4rpx;"
src="../../static/home_collect_img_0.png"></image>
<image v-else @click="handleXing(item)"
style="width: 50rpx;height: 50rpx;display: flex;align-items: right;padding-right: 4rpx;"
src="../../static/home_collect_img_1.png"></image>
<view
style="font-size: 22rpx;color: gray;margin-top: 10rpx;display: flex;justify-content: center;">
追剧</view>
</view>
</view>
</view>
</view>
</z-paging>
</view>
</template>
<script>
import common from '@/mixins/common';
import {
getToLocal
} from "@/utils/utils.js"
import {
navigateTo,
message,
alert,
loading
} from '@/utils/fun.js';
import {
openUrl
} from '@/utils/app+.js';
const app = getApp();
export default {
name: 'index',
mixins: [common],
data() {
return {
dataList: []
};
},
methods: {
show() {
if (this.$refs.paging != null) {
this.$refs.paging.refresh();
}
},
queryList(page, size) {
this.post({
<template>
<view class="body">
<!-- <status-title :showBack="true">阅读记录</status-title> -->
<z-paging class="flex-1" ref="paging" v-model="dataList" @query="queryList" :defaultPageNo="1"
:defaultPageSize="500">
<view style="font-size: 30rpx;font-weight: 777;margin-left: 12rpx;margin-top: 10rpx;">最近阅读</view>
<view v-for="(item, i) in dataList" :key="i">
<view style="display: flex;flex-direction: row;justify-content:space-between;margin: 20rpx;">
<view style="display: flex;align-items: center;" @click="handleInfo(item)">
<image class="img" :src="item.coverImage" mode="aspectFill"></image>
<view style="display: flex;flex-direction: column;margin-left: 20rpx;">
<view style="font-size: 30rpx;color: black;">{{item.title}}</view>
<view style="font-size: 22rpx;color: gray;margin-top: 16rpx;">阅读至第{{item.seeIndex}}</view>
</view>
</view>
<view style="display: flex;align-items: center;margin-right: 8rpx;">
<view style="display: flex;flex-direction: column;">
<image v-if="item.collect==0" @click="handleXing(item)"
style="width: 50rpx;height: 50rpx;display: flex;align-items: right;padding-right: 4rpx;"
src="../../static/home_collect_img_0.png"></image>
<image v-else @click="handleXing(item)"
style="width: 50rpx;height: 50rpx;display: flex;align-items: right;padding-right: 4rpx;"
src="../../static/home_collect_img_1.png"></image>
<view
style="font-size: 22rpx;color: gray;margin-top: 10rpx;display: flex;justify-content: center;">
追剧</view>
</view>
</view>
</view>
</view>
</z-paging>
</view>
</template>
<script>
import common from '@/mixins/common';
import {
getToLocal
} from "@/utils/utils.js"
import {
navigateTo,
message,
alert,
loading
} from '@/utils/fun.js';
import {
openUrl
} from '@/utils/app+.js';
const app = getApp();
export default {
name: 'index',
mixins: [common],
data() {
return {
dataList: []
};
},
methods: {
show() {
if (this.$refs.paging != null) {
this.$refs.paging.refresh();
}
},
queryList(page, size) {
this.post({
url: '/vedio/history',
data: {
page,
size
},
showLoading: false,
success: ({
data
}) => {
this.$refs.paging.complete(data.list);
}
});
},
handleInfo(item) {
},
showLoading: false,
success: ({
data
}) => {
this.$refs.paging.complete(data.list);
}
});
},
handleInfo(item) {
navigateTo(`/pagesC/ttvideo/ttVideoDetail?data=` + encodeURIComponent(JSON.stringify(item)) +
'&tt_album_id=' + item.douyinAlbumId + '&tt_episode_id=' + item.douyinEpisodeId);
},
handleXing(item) {
var that = this;
//0未收藏,1收藏
if (item.collect == 0) {
this.post({
url: '/vedio/collect',
data: {
vedioId: item.vedioId,
},
showLoading: false,
success: ({
data
}) => {
that.show();
}
});
} else {
this.post({
url: '/vedio/cancelCollect',
data: {
vedioId: item.vedioId,
},
showLoading: false,
success: ({
data
}) => {
that.show();
}
});
}
}
}
};
</script>
<style lang="scss">
@import '@/scss/uni.scss';
.body {
background-color: whitesmoke;
}
.img {
position: relative;
border-radius: 10rpx;
width: 180rpx;
height: 240rpx;
}
'&tt_album_id=' + item.douyinAlbumId + '&tt_episode_id=' + item.douyinEpisodeId);
},
handleXing(item) {
var that = this;
//0未收藏,1收藏
if (item.collect == 0) {
this.post({
url: '/vedio/collect',
data: {
vedioId: item.vedioId,
},
showLoading: false,
success: ({
data
}) => {
that.show();
}
});
} else {
this.post({
url: '/vedio/cancelCollect',
data: {
vedioId: item.vedioId,
},
showLoading: false,
success: ({
data
}) => {
that.show();
}
});
}
}
}
};
</script>
<style lang="scss">
@import '@/scss/uni.scss';
.body {
background-color: whitesmoke;
}
.img {
position: relative;
border-radius: 10rpx;
width: 180rpx;
height: 240rpx;
}
</style>
\ No newline at end of file
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