Commit e8b53bdd authored by jyx's avatar jyx

代码优化

parent 9907bacb
......@@ -3,7 +3,7 @@
<uni-popup type="center" ref="adPop" :maskClick="false" :isMaskClick="false">
<view class="container">
<!-- <view class="ad-view">
<!-- <view class="ad-view">
<ad :unit-id="adUnitId" @load="onload" @close="onclose" @error="onerror"></ad>
</view> -->
......
......@@ -16,9 +16,9 @@
<view class="search-wrap">
<!-- <image style="width: 80rpx; height: 80rpx" src="@/static/index/ic_quit_white.png"></image> -->
<view class="search-bar" @click="goSearchPage">
<view class="search-bar" @click="handleSearchPage">
<image style="width: 40rpx; height: 40rpx" src="@/static/search.png"></image>
<text style="margin-left: 30rpx">{{
<text style="margin-left: 30rpx;color: darkgray;">{{
bannerList.length > 0 ? bannerList[0].title : ''
}}</text>
</view>
......@@ -65,7 +65,6 @@
<image v-else
style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
src="../../static/index/y4.png"></image>
</view>
</view>
......@@ -80,7 +79,6 @@
width: 100%;
opacity: 0.5;
">
<view style="display: flex;align-items: center;margin-left: 10rpx;">
<image
style="width: 20rpx;height: 20rpx;display: flex;align-items: right;margin-right: 10rpx;"
......@@ -105,24 +103,35 @@
</scroll-view>
</view>
<view
<!-- <view
style="font-size: 30rpx;font-weight: 777;margin-top: 20rpx;margin-bottom: 10rpx;margin-left: 4rpx;">
推荐</view>
推荐</view> -->
<view style="width: 100%;">
<u-tabs :current="typeIndex" :list="typesList" @change="popHandleChange" lineWidth="30"
keyName='type' lineColor="#0faeff" :activeStyle="{
color: '#0faeff',
fontWeight: 'bold',
transform: 'scale(1.05)'
}" :inactiveStyle="{
color: '#808080',
transform: 'scale(1)'
}"></u-tabs>
</view>
<view style="column-count: 2;column-gap: 20rpx;margin-top: 20rpx;">
<view class="item-wrap" v-for="(item, i) in dataList" :key="i" v-if="i % 2 == 0"
@click="handleInfo(item)">
<view style="position: relative;">
<image class="img" :src="item.coverImage" mode="aspectFill"></image>
<view style="
position: absolute;
bottom: 10rpx;
width: 95%;
padding: 10rpx;
background-color: black;
opacity: 0.5;
">
position: absolute;
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;align-items: center;">
<image
......@@ -138,7 +147,6 @@
<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>
<view class="item-wrap" v-for="(item, i) in dataList" :key="i" v-if="i % 2 == 1"
@click="handleInfo(item)">
......@@ -167,14 +175,11 @@
<view class="ellipsis" 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>
</z-paging>
<view v-if="newRecordBean!=null"
......@@ -220,6 +225,11 @@
</view>
</view>
<view class="box-wrap" v-if="showBox">
<image class="img1" @click="handleTaskPage" :src="boxImgUrl"></image>
<image class="img2" @click="clearBox" src="@/static/video/close.png"></image>
</view>
<!-- <uni-popup type="center" ref="select">
<view>
<view style="font-size: 30rpx;font-weight: 777;color: white;">刚刚看的</view>
......@@ -241,8 +251,6 @@
</view>
</view>
</uni-popup> -->
</view>
</template>
<script>
......@@ -271,11 +279,16 @@
return {
dataList: [],
bannerList: [],
newRecordBean: null,
typesList: [],
topList: [],
typeIndex: 0,
typeId: -1,
newRecordBean: null,
showBox: false,
showMask: false,
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',
boxImgUrl: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_bag.png',
statusBarHeight: app.globalData.statusBarHeight,
};
},
......@@ -293,10 +306,12 @@
}
},
show() {
// 显示引导图
this.showMaskFuc()
// 匹配视频
this.showFirstDialog();
// 轮播图
this.post({
url: '/vedio/topTabs',
......@@ -310,6 +325,7 @@
// 排行榜
this.post({
url: '/vedio/orders',
data: {},
showLoading: false,
success: ({
data
......@@ -330,21 +346,48 @@
}
}
});
// 是否展示
this.post({
url: '/vTask/sign/homePageShowSign',
data: {},
showLoading: false,
success: ({
data
}) => {
if (data.show) {
this.showBox = data.show
}
}
});
// 分类列表
this.post({
url: '/vedio/types',
data: {},
showLoading: false,
success: ({
data
}) => {
if (data.list) {
this.typeId = data.list[0].typeId
this.typesList = data.list
}
}
});
if (this.$refs.paging != null) {
this.$refs.paging.refresh();
}
},
hide() {
},
queryList(page, size) {
let that = this
// 推荐列表
this.post({
url: '/vedio/list',
url: '/vedio/listByType',
data: {
page,
size
size,
typeId: that.typeId
},
showLoading: false,
success: ({
......@@ -354,6 +397,12 @@
}
});
},
popHandleChange(e) {
this.typeId = e.typeId
if (this.$refs.paging != null) {
this.$refs.paging.refresh();
}
},
handleBanner(item) {
navigateTo(`/pagesC/ttvideo/ttVideoDetail?data=` + encodeURIComponent(JSON.stringify(item)) +
'&tt_album_id=' + item.douyinAlbumId + '&tt_episode_id=' + item.douyinEpisodeId);
......@@ -381,9 +430,12 @@
}) => {}
});
},
goSearchPage() {
handleSearchPage() {
navigateTo(`/pagesA/search/search`)
},
handleTaskPage() {
navigateTo(`/pagesA/task/task`)
},
showFirstDialog() {
let that = this;
let loadEpisode_id = uni.getStorageSync('tt_episode_id') || '';
......@@ -425,23 +477,23 @@
<style lang="scss">
.body {
background-color: whitesmoke;
// background-color: whitesmoke;
position: relative;
}
.search-wrap {
height: 80rpx;
margin: 10rpx 15rpx;
margin: 10rpx 12rpx;
display: flex;
flex-direction: row;
}
.search-bar {
width: 100%;
margin-left: 20rpx;
margin-left: 20rpx;
margin-right: 20rpx;
border-radius: 10rpx;
background-color: lightgray;
background-color: white;
display: flex;
flex-direction: row;
align-items: center;
......@@ -477,4 +529,24 @@
width: 100%;
height: 390rpx;
}
.box-wrap {
height: 100rpx;
width: 120rpx;
right: 20rpx;
bottom: 160rpx;
position: absolute;
z-index: 999;
.img1 {
width: 100rpx;
height: 100rpx;
}
.img2 {
width: 20rpx;
height: 20rpx;
margin-bottom: 80rpx;
}
}
</style>
\ No newline at end of file
<template>
<uni-popup type="center" ref="rpopup" :maskClick="false" :isMaskClick="false">
<view class="dialog">
<view class="dialog-container">
<text style="font-size: 44rpx; color: #ffa500"> 看点领取成功 </text>
<text style="margin-top: 20rpx; font-size: 38rpx; color: #ffa500">{{
'已领取' + dot + '看点'
}}</text>
<image style="width: 564rpx; height: 566rpx;margin-top: 30rpx" :src="taskOkImg"></image>
</view>
</view>
</uni-popup>
</template>
<script>
export default {
name: 'rewardPopup',
props: {
show: {
type: Boolean,
default: false
},
dot: {
type: [Number, String],
default: 0
}
},
data() {
return {
taskOkImg: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_sign_suc.png',
};
},
watch: {
show: {
handler: function(newVal, oldVal) {
if (newVal) {
this.showdialog();
}
},
immediate: true
}
},
methods: {
showdialog() {
if (this.show) {
this.$refs.rpopup.open();
let that = this
setTimeout(function() {
that.onClose()
}, 3000)
} else {
this.onClose()
}
},
onClose() {
this.$refs.rpopup.close();
this.$emit('close');
}
}
};
</script>
<style lang="less">
.dialog {
// position: fixed;
height: 100%;
width: 100%;
display: flex;
align-items: flex-start;
// background-color: rgba(0, 0, 0, 0.8);
}
.dialog-container {
display: flex;
align-items: center;
flex-direction: column;
width: 100%;
height: 100%;
position: relative;
border-radius: 20rpx;
}
.fly-in {
animation-name: flyIn;
animation-duration: 500ms;
animation-timing-function: ease-out;
}
.fly-out {
animation-name: flyOut;
animation-duration: 500ms;
animation-timing-function: ease-in;
}
@keyframes flyIn {
from {
opacity: 0;
transform: translateY(3000rpx);
}
to {
opacity: 1;
transform: translateY(1rpx);
}
}
@keyframes flyOut {
from {
opacity: 1;
transform: translateY(1rpx);
}
to {
opacity: 0;
transform: translateY(3000rpx);
}
}
</style>
\ No newline at end of file
<template>
<uni-popup type="center" ref="spopup" :maskClick="false" :isMaskClick="false">
<view class="dialog">
<view class="dialog-container">
<image @click="onClose" style="width: 40px; height: 40px; margin-top: 30px;margin-left:auto;"
src="@/static/video/close.png"></image>
<text style="margin-top: 20px; font-size: 46px; color: #ffffff">签到成功</text>
<text style="margin-top: 20px; font-size: 30px; color: #ffffff">{{
'已获得' + dot + '看点,有效期3天'
}}</text>
</view>
</view>
</uni-popup>
</template>
<script>
export default {
name: 'signPopup',
props: {
show: {
type: Boolean,
default: false
},
dot: {
type: [Number, String],
default: 0
}
},
data() {
return {
taskOkImg: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_sign_suc.png',
};
},
watch: {
show: {
handler: function(newVal, oldVal) {
if (newVal) {
this.showdialog();
}
},
immediate: true
}
},
methods: {
showdialog() {
if (this.show) {
this.$refs.spopup.open();
} else {
this.onClose()
}
},
onClose() {
this.$refs.spopup.close();
this.$emit('signClose');
}
}
}
</script>
<style lang="less">
.dialog {
height: 100%;
width: 100%;
display: flex;
align-items: flex-start;
}
.dialog-container {
display: flex;
flex-direction: column;
width: 100%;
margin: 0 30px;
height: 320px;
padding: 0 30px;
background-color: #fb3309;
border-radius: 30px;
}
</style>
\ No newline at end of file
......@@ -10,6 +10,32 @@
"uview": "^0.1.0"
}
},
"node_modules/@babel/parser": {
"version": "7.24.6",
"resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.24.6.tgz",
"integrity": "sha512-eNZXdfU35nJC2h24RznROuOpO94h6x8sg9ju0tT9biNtLZ2vuP8SduLqqV+/8+cebSLV9SJEAN5Z3zQbJG/M+Q==",
"peer": true,
"bin": {
"parser": "bin/babel-parser.js"
},
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@vue/compiler-sfc": {
"version": "2.7.16",
"resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-2.7.16.tgz",
"integrity": "sha512-KWhJ9k5nXuNtygPU7+t1rX6baZeqOYLEforUPjgNDBnLicfHCoi48H87Q8XyLZOrNNsmhuwKqtpDQWjEFe6Ekg==",
"peer": true,
"dependencies": {
"@babel/parser": "^7.23.5",
"postcss": "^8.4.14",
"source-map": "^0.6.1"
},
"optionalDependencies": {
"prettier": "^1.18.2 || ^2.0.0"
}
},
"node_modules/async-validator": {
"version": "1.12.2",
"resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-1.12.2.tgz",
......@@ -30,6 +56,12 @@
"deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.",
"hasInstallScript": true
},
"node_modules/csstype": {
"version": "3.1.3",
"resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz",
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
"peer": true
},
"node_modules/decimal.js": {
"version": "10.4.3",
"resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.4.3.tgz",
......@@ -51,12 +83,98 @@
"bignumber.js": "^9.0.0"
}
},
"node_modules/nanoid": {
"version": "3.3.7",
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.7.tgz",
"integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"peer": true,
"bin": {
"nanoid": "bin/nanoid.cjs"
},
"engines": {
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
"node_modules/picocolors": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.1.tgz",
"integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==",
"peer": true
},
"node_modules/popper.js": {
"version": "0.6.4",
"resolved": "https://registry.npmmirror.com/popper.js/-/popper.js-0.6.4.tgz",
"integrity": "sha512-KGPaJaw9822VnignV8HuPdVv0C66d3iC5YbdPaty/57LPmBqmbZX39n2gqN/bDeOtGHzsOA2AA9f9DH2Y0z6AQ==",
"deprecated": "You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1"
},
"node_modules/postcss": {
"version": "8.4.38",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.38.tgz",
"integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==",
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/postcss"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"peer": true,
"dependencies": {
"nanoid": "^3.3.7",
"picocolors": "^1.0.0",
"source-map-js": "^1.2.0"
},
"engines": {
"node": "^10 || ^12 || >=14"
}
},
"node_modules/prettier": {
"version": "2.8.8",
"resolved": "https://registry.npmmirror.com/prettier/-/prettier-2.8.8.tgz",
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
"optional": true,
"peer": true,
"bin": {
"prettier": "bin-prettier.js"
},
"engines": {
"node": ">=10.13.0"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"peer": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/source-map-js": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.0.tgz",
"integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==",
"peer": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/uview": {
"version": "0.1.0",
"resolved": "https://registry.npmmirror.com/uview/-/uview-0.1.0.tgz",
......@@ -74,9 +192,38 @@
"peerDependencies": {
"vue": "^2.4.1"
}
},
"node_modules/vue": {
"version": "2.7.16",
"resolved": "https://registry.npmmirror.com/vue/-/vue-2.7.16.tgz",
"integrity": "sha512-4gCtFXaAA3zYZdTp5s4Hl2sozuySsgz4jy1EnpBHNfpMa9dK1ZCG7viqBPCwXtmgc8nHqUsAu3G4gtmXkkY3Sw==",
"deprecated": "Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details.",
"peer": true,
"dependencies": {
"@vue/compiler-sfc": "2.7.16",
"csstype": "^3.1.0"
}
}
},
"dependencies": {
"@babel/parser": {
"version": "7.24.6",
"resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.24.6.tgz",
"integrity": "sha512-eNZXdfU35nJC2h24RznROuOpO94h6x8sg9ju0tT9biNtLZ2vuP8SduLqqV+/8+cebSLV9SJEAN5Z3zQbJG/M+Q==",
"peer": true
},
"@vue/compiler-sfc": {
"version": "2.7.16",
"resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-2.7.16.tgz",
"integrity": "sha512-KWhJ9k5nXuNtygPU7+t1rX6baZeqOYLEforUPjgNDBnLicfHCoi48H87Q8XyLZOrNNsmhuwKqtpDQWjEFe6Ekg==",
"peer": true,
"requires": {
"@babel/parser": "^7.23.5",
"postcss": "^8.4.14",
"prettier": "^1.18.2 || ^2.0.0",
"source-map": "^0.6.1"
}
},
"async-validator": {
"version": "1.12.2",
"resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-1.12.2.tgz",
......@@ -92,6 +239,12 @@
"resolved": "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz",
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ=="
},
"csstype": {
"version": "3.1.3",
"resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz",
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
"peer": true
},
"decimal.js": {
"version": "10.4.3",
"resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.4.3.tgz",
......@@ -110,11 +263,53 @@
"bignumber.js": "^9.0.0"
}
},
"nanoid": {
"version": "3.3.7",
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.7.tgz",
"integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
"peer": true
},
"picocolors": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.1.tgz",
"integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==",
"peer": true
},
"popper.js": {
"version": "0.6.4",
"resolved": "https://registry.npmmirror.com/popper.js/-/popper.js-0.6.4.tgz",
"integrity": "sha512-KGPaJaw9822VnignV8HuPdVv0C66d3iC5YbdPaty/57LPmBqmbZX39n2gqN/bDeOtGHzsOA2AA9f9DH2Y0z6AQ=="
},
"postcss": {
"version": "8.4.38",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.38.tgz",
"integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==",
"peer": true,
"requires": {
"nanoid": "^3.3.7",
"picocolors": "^1.0.0",
"source-map-js": "^1.2.0"
}
},
"prettier": {
"version": "2.8.8",
"resolved": "https://registry.npmmirror.com/prettier/-/prettier-2.8.8.tgz",
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
"optional": true,
"peer": true
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"peer": true
},
"source-map-js": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.0.tgz",
"integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==",
"peer": true
},
"uview": {
"version": "0.1.0",
"resolved": "https://registry.npmmirror.com/uview/-/uview-0.1.0.tgz",
......@@ -125,6 +320,16 @@
"deepmerge": "^1.5.0",
"popper.js": "^0.6.4"
}
},
"vue": {
"version": "2.7.16",
"resolved": "https://registry.npmmirror.com/vue/-/vue-2.7.16.tgz",
"integrity": "sha512-4gCtFXaAA3zYZdTp5s4Hl2sozuySsgz4jy1EnpBHNfpMa9dK1ZCG7viqBPCwXtmgc8nHqUsAu3G4gtmXkkY3Sw==",
"peer": true,
"requires": {
"@vue/compiler-sfc": "2.7.16",
"csstype": "^3.1.0"
}
}
}
}
......@@ -218,7 +218,7 @@
<style lang="scss">
.body {
height: 100%;
background-color: white;
// background-color: white;
}
.editBar {
......
......@@ -3,66 +3,59 @@
<view class="search-head">
<view class="search-bar">
<image style="width: 40rpx; height: 40rpx" src="@/static/search.png"></image>
<input class="inputkeyword" type="text" placeholder="请输入搜索剧集" onchange="showChangePrompt"
<input class="inputkeyword" type="text" placeholder="请输入搜索剧集" @input="showChangePrompt"
:value="keyword" />
<image v-if="keyword!=''" @click="clearWord" style="width: 36rpx; height: 36rpx"
src="@/static/search.png"></image>
src="@/static/video/close.png"></image>
</view>
<text class="searchbutton" @click="getsearch">搜索</text>
</view>
<view>
<view class="search-item-wrap" v-if="searchList.length>0 && !showEmpty">
<view class="search-item-top">
<text class="item-title">历史搜索</text>
<image @click="clearHistory" style="width: 40rpx; height: 40rpx;margin-right: 10rpx;"
src="@/static/video/ic_delete.png">
</image>
</view>
<z-paging class="item-list">
<view>
<view class="search-item-wrap" v-if="searchList.length>0 && !showEmpty">
<view class="search-item-top">
<text class="item-title">历史搜索</text>
<image @click="clearHistory" style="width: 40rpx; height: 40rpx"
src"@/static/video/ic_delete.png"></image>
</view>
<view class="search-item-bottom">
<block v-for="(item, index) in searchList" :key="index">
<text class="search-item" @click="clickHistory(item)">{{ item }}</text>
</block>
</view>
<view class="search-item-bottom">
<block v-for="(item, index) in searchList" :key="index">
<text class="search-item" @click="clickHistory(item)">{{ item }}</text>
</block>
</view>
</view>
</view>
<view>
<view class="emptyView" if="showEmpty">
<text style="font-size: 30rpx;"> 暂无搜索结果 </text>
</view>
<view>
<view class="emptyView" v-if="showEmpty">
<text style="font-size: 30rpx;"> 暂无搜索结果 </text>
</view>
</view>
<view v-if="topList.length>0 && dataList.length==0" class="flex">
<z-paging class="flex-1">
<view v-if="topList.length>0 && dataList.length==0" class="flex1">
<text class="item-title">{{showEmpty ? '猜你喜欢' : '今日热门' }}</text>
<view class="item-list-column">
<block v-for="(item, index) in topList" :key="index">
<view class="product-item-column" @click="handleListItem(item)">
<image class="item-list-img3" :src="item.coverImage"></image>
<view class="item-list-bottom">
<view>
<image class="item-list-bottom-img" src="../../assets/images/ic_index_play.png">
</image>
<text
style="margin-left: 4rpx; color: white; font-size: 24rpx">{{ item.showNum }}</text>
</view>
<text style="margin-left: 4rpx; color: white; font-size: 24rpx">
{{ item.vedioTotal }}
</text>
<view class="flex space" style="display:flex; flex-wrap:wrap;">
<block v-for="(value,key) in topList" :key="key">
<view class="mt-10"
style="width:31%; position: relative; border-radius:20rpx;margin-bottom: 10rpx;margin-left: 14rpx;"
@click="handleListItem(value)">
<image class="integral-mall-goods" mode="aspectFill" :src="value.coverImage"></image>
<view class="text" style="font-size: 26rpx;color: black;height: 36rpx;margin-left: 5rpx;">
{{value.title}}
</view>
<text style="font-size: 24rpx; color: black">{{ item.title }}</text>
</view>
</block>
</view>
</view>
<view class="item-content">
<view class="item-list-column">
<block v-for="(item, index) in dataList" :key="index">
<view class="pack-item" @click="handleListItem(item)">
<image class="images" :src="item.coverImage" />
<image class="images" mode="aspectFill" :src="item.coverImage" />
<view class="pack-item-cloumn">
<text class="text">
{{ item.title }}
......@@ -121,7 +114,7 @@
let that = this
this.post({
url: '/vedioV1/orders',
url: '/vedio/orders',
data: {
words: that.keyword
},
......@@ -142,7 +135,7 @@
getOrders() {
let that = this
this.post({
url: '/vedioV1/orders',
url: '/vedio/orders',
showLoading: false,
success: ({
data
......@@ -155,7 +148,7 @@
});
},
showChangePrompt(e) {
this.keyword = e.value
this.keyword = e.detail.value
},
clickHistory(word) {
this.keyword = word
......@@ -207,7 +200,8 @@
that.searchList = []
} else {
that.searchList = []
that.searchList = that.getArrfromClipStr(data)
console.log(data)
that.searchList = that.getArrfromClipStr(data.data)
}
},
fail: function() {
......@@ -232,11 +226,10 @@
for (var i = 0; i < strArr.length; i++) {
clipStr += (strArr[i] + ',')
}
return clipStr
},
getArrfromClipStr(clipStr) {
let result = clipStr.split(',')
let result = clipStr.toString().split(',')
let resultArr = []
for (var i = 0; i < result.length; i++) {
if (result[i] == '') continue
......@@ -249,10 +242,8 @@
</script>
<style lang="less">
.container {
background-color: #ffffff;
display: flex;
height: 100%;
flex-direction: column;
background-color: white;
flex: 1;
}
.item-list {
......@@ -282,6 +273,7 @@
.pack-item-cloumn {
margin-left: 20rpx;
display: flex;
flex-direction: column;
.text {
......@@ -328,9 +320,11 @@
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between
}
.inputkeyword {
flex: 1;
margin-left: 30rpx;
}
......@@ -354,8 +348,8 @@
width: 100%;
margin: 10rpx;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
}
.item-list-bottom {
......@@ -363,10 +357,10 @@
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 280rpx;
height: 40rpx;
border-radius: 10rpx;
align-content: center;
opacity: 0.7;
}
......@@ -379,18 +373,18 @@
}
.product-item-column {
width: 31%;
margin-left: 8rpx;
width: 26%;
height: 390rpx;
display: flex;
flex-direction: column;
margin-bottom: 10rpx;
display: block;
// display: flex;
// flex-direction: column;
// margin-bottom: 10rpx;
// margin-right: 10rpx;
}
.item-list-img3 {
position: absolute;
width: 100%;
object-fit: cover;
height: 320rpx;
border-radius: 10rpx;
}
......@@ -427,10 +421,18 @@
.search-item {
border: 4rpx;
height: 60rpx;
line-height: 60rpx;
margin: 8rpx 15rpx;
border-radius: 60rpx;
border: 0rpx solid #f8f8ff;
background-color: #f8f8ff;
padding: 10rpx 20rpx;
padding: 0 20rpx;
}
.integral-mall-goods {
width: 100%;
height: 320rpx;
background: #F2F2F2;
border-radius: 16upx;
}
</style>
\ No newline at end of file
This diff is collapsed.
......@@ -12,12 +12,6 @@
:show-fullscreen-btn="false" @controlstoggle="controlstoggle" @timeupdate="timeUpdate"
@ended="ended" />
<!-- <video v-if="!canUseTTPlayer && Math.abs(displayIndex-index)==0" :id="list.vedioIndex"
@ended="ended" :controls="controls" :loop="!isplay" :enable-progress-gesture="false"
:show-loading="true" :show-fullscreen-btn="false" @controlstoggle="controlstoggle"
:poster="data.coverImage" @timeupdate="timeupdate" :autoplay="!list.lock" :src="list.vedioUrl"
class="tsvideo" play-btn-position="center" object-fit="contain" /> -->
<view v-if="originList[originIndex].lock || !list.vedioUrl" class="videoHover tsimg"
@click.stop="tapVideoHover(index,list.pays)"
:style="'width: '+ windowWidth +'px; height:'+100+'%;'">
......
export var TaskConstant = {
firstToHomePage: 1, // "去完成一次追剧"
firstPay: 2, // "首次充值"
saveToPhonePage: 3, // "保存至桌面"
openForHome: 4, // "从手机桌面启动"
loginByMobie: 5, // "安全登录"
seeAd: 11, // "看小视频得看点"
seeVedioListPage: 12, // "去剧场看一看"
seeOneNewVedio: 13, // "看一部新剧"
payBack: 14, // "充值回馈"
seeVedio: 15, // "天天看剧"
share: 16, // "早中晚分享"
compeleOneVedio: 51, // "看完一部剧"
compeleVedios: 52, // "累计看完多部剧"
completePay: 53, // "累计充值"
completeSeeDays: 54, // "每天看剧"
}
\ 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