Commit e8b53bdd authored by jyx's avatar jyx

代码优化

parent 9907bacb
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<uni-popup type="center" ref="adPop" :maskClick="false" :isMaskClick="false"> <uni-popup type="center" ref="adPop" :maskClick="false" :isMaskClick="false">
<view class="container"> <view class="container">
<!-- <view class="ad-view"> <!-- <view class="ad-view">
<ad :unit-id="adUnitId" @load="onload" @close="onclose" @error="onerror"></ad> <ad :unit-id="adUnitId" @load="onload" @close="onclose" @error="onerror"></ad>
</view> --> </view> -->
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
<view class="search-wrap"> <view class="search-wrap">
<!-- <image style="width: 80rpx; height: 80rpx" src="@/static/index/ic_quit_white.png"></image> --> <!-- <image style="width: 80rpx; height: 80rpx" src="@/static/index/ic_quit_white.png"></image> -->
<view class="search-bar" @click="goSearchPage"> <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">{{ <text style="margin-left: 30rpx;color: darkgray;">{{
bannerList.length > 0 ? bannerList[0].title : '' bannerList.length > 0 ? bannerList[0].title : ''
}}</text> }}</text>
</view> </view>
...@@ -65,7 +65,6 @@ ...@@ -65,7 +65,6 @@
<image v-else <image v-else
style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;" style="width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
src="../../static/index/y4.png"></image> src="../../static/index/y4.png"></image>
</view> </view>
</view> </view>
...@@ -80,7 +79,6 @@ ...@@ -80,7 +79,6 @@
width: 100%; width: 100%;
opacity: 0.5; opacity: 0.5;
"> ">
<view style="display: flex;align-items: center;margin-left: 10rpx;"> <view style="display: flex;align-items: center;margin-left: 10rpx;">
<image <image
style="width: 20rpx;height: 20rpx;display: flex;align-items: right;margin-right: 10rpx;" style="width: 20rpx;height: 20rpx;display: flex;align-items: right;margin-right: 10rpx;"
...@@ -105,24 +103,35 @@ ...@@ -105,24 +103,35 @@
</scroll-view> </scroll-view>
</view> </view>
<view <!-- <view
style="font-size: 30rpx;font-weight: 777;margin-top: 20rpx;margin-bottom: 10rpx;margin-left: 4rpx;"> style="font-size: 30rpx;font-weight: 777;margin-top: 20rpx;margin-bottom: 10rpx;margin-left: 4rpx;">
推荐</view> 推荐</view> -->
<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 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" <view class="item-wrap" v-for="(item, i) in dataList" :key="i" v-if="i % 2 == 0"
@click="handleInfo(item)"> @click="handleInfo(item)">
<view style="position: relative;"> <view style="position: relative;">
<image class="img" :src="item.coverImage" mode="aspectFill"></image> <image class="img" :src="item.coverImage" mode="aspectFill"></image>
<view style=" <view style="
position: absolute; position: absolute;
bottom: 10rpx; bottom: 10rpx;
width: 95%; width: 95%;
padding: 10rpx; padding: 10rpx;
background-color: black; background-color: black;
opacity: 0.5; opacity: 0.5;
"> ">
<view style="display: flex;flex-direction: row;justify-content:space-between;"> <view style="display: flex;flex-direction: row;justify-content:space-between;">
<view style="display: flex;align-items: center;"> <view style="display: flex;align-items: center;">
<image <image
...@@ -138,7 +147,6 @@ ...@@ -138,7 +147,6 @@
<view style="font-size: 30rpx;margin-top: 10rpx;margin-left: 12rpx;">{{item.title}}</view> <view style="font-size: 30rpx;margin-top: 10rpx;margin-left: 12rpx;">{{item.title}}</view>
<!-- <view style="font-size: 22rpx;margin-top: 10rpx;margin-left: 12rpx;">{{item.vedioDesc}}</view> --> <!-- <view style="font-size: 22rpx;margin-top: 10rpx;margin-left: 12rpx;">{{item.vedioDesc}}</view> -->
</view> </view>
<view class="item-wrap" v-for="(item, i) in dataList" :key="i" v-if="i % 2 == 1" <view class="item-wrap" v-for="(item, i) in dataList" :key="i" v-if="i % 2 == 1"
@click="handleInfo(item)"> @click="handleInfo(item)">
...@@ -167,14 +175,11 @@ ...@@ -167,14 +175,11 @@
<view class="ellipsis" style="font-size: 30rpx;margin-top: 10rpx;margin-left: 12rpx;"> <view class="ellipsis" style="font-size: 30rpx;margin-top: 10rpx;margin-left: 12rpx;">
{{item.title}} {{item.title}}
</view> </view>
<!-- <view style="font-size: 22rpx;margin-top: 10rpx;margin-left: 12rpx;">{{item.vedioDesc}}</view> --> <!-- <view style="font-size: 22rpx;margin-top: 10rpx;margin-left: 12rpx;">{{item.vedioDesc}}</view> -->
</view> </view>
</view> </view>
</view> </view>
</z-paging> </z-paging>
<view v-if="newRecordBean!=null" <view v-if="newRecordBean!=null"
...@@ -220,6 +225,11 @@ ...@@ -220,6 +225,11 @@
</view> </view>
</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"> <!-- <uni-popup type="center" ref="select">
<view> <view>
<view style="font-size: 30rpx;font-weight: 777;color: white;">刚刚看的</view> <view style="font-size: 30rpx;font-weight: 777;color: white;">刚刚看的</view>
...@@ -241,8 +251,6 @@ ...@@ -241,8 +251,6 @@
</view> </view>
</view> </view>
</uni-popup> --> </uni-popup> -->
</view> </view>
</template> </template>
<script> <script>
...@@ -271,11 +279,16 @@ ...@@ -271,11 +279,16 @@
return { return {
dataList: [], dataList: [],
bannerList: [], bannerList: [],
newRecordBean: null, typesList: [],
topList: [], topList: [],
typeIndex: 0,
typeId: -1,
newRecordBean: null,
showBox: false,
showMask: false, showMask: false,
maskImage1: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find1.png', maskImage1: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find1.png',
maskImage2: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find2.png', maskImage2: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find2.png',
boxImgUrl: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_bag.png',
statusBarHeight: app.globalData.statusBarHeight, statusBarHeight: app.globalData.statusBarHeight,
}; };
}, },
...@@ -293,10 +306,12 @@ ...@@ -293,10 +306,12 @@
} }
}, },
show() { show() {
// 显示引导图
this.showMaskFuc() this.showMaskFuc()
// 匹配视频 // 匹配视频
this.showFirstDialog(); this.showFirstDialog();
// 轮播图 // 轮播图
this.post({ this.post({
url: '/vedio/topTabs', url: '/vedio/topTabs',
...@@ -310,6 +325,7 @@ ...@@ -310,6 +325,7 @@
// 排行榜 // 排行榜
this.post({ this.post({
url: '/vedio/orders', url: '/vedio/orders',
data: {},
showLoading: false, showLoading: false,
success: ({ success: ({
data data
...@@ -330,21 +346,48 @@ ...@@ -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() { hide() {
}, },
queryList(page, size) { queryList(page, size) {
let that = this
// 推荐列表 // 推荐列表
this.post({ this.post({
url: '/vedio/list', url: '/vedio/listByType',
data: { data: {
page, page,
size size,
typeId: that.typeId
}, },
showLoading: false, showLoading: false,
success: ({ success: ({
...@@ -354,6 +397,12 @@ ...@@ -354,6 +397,12 @@
} }
}); });
}, },
popHandleChange(e) {
this.typeId = e.typeId
if (this.$refs.paging != null) {
this.$refs.paging.refresh();
}
},
handleBanner(item) { handleBanner(item) {
navigateTo(`/pagesC/ttvideo/ttVideoDetail?data=` + encodeURIComponent(JSON.stringify(item)) + navigateTo(`/pagesC/ttvideo/ttVideoDetail?data=` + encodeURIComponent(JSON.stringify(item)) +
'&tt_album_id=' + item.douyinAlbumId + '&tt_episode_id=' + item.douyinEpisodeId); '&tt_album_id=' + item.douyinAlbumId + '&tt_episode_id=' + item.douyinEpisodeId);
...@@ -381,9 +430,12 @@ ...@@ -381,9 +430,12 @@
}) => {} }) => {}
}); });
}, },
goSearchPage() { handleSearchPage() {
navigateTo(`/pagesA/search/search`) navigateTo(`/pagesA/search/search`)
}, },
handleTaskPage() {
navigateTo(`/pagesA/task/task`)
},
showFirstDialog() { showFirstDialog() {
let that = this; let that = this;
let loadEpisode_id = uni.getStorageSync('tt_episode_id') || ''; let loadEpisode_id = uni.getStorageSync('tt_episode_id') || '';
...@@ -425,23 +477,23 @@ ...@@ -425,23 +477,23 @@
<style lang="scss"> <style lang="scss">
.body { .body {
background-color: whitesmoke; // background-color: whitesmoke;
position: relative; position: relative;
} }
.search-wrap { .search-wrap {
height: 80rpx; height: 80rpx;
margin: 10rpx 15rpx; margin: 10rpx 12rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }
.search-bar { .search-bar {
width: 100%; width: 100%;
margin-left: 20rpx; margin-left: 20rpx;
margin-right: 20rpx; margin-right: 20rpx;
border-radius: 10rpx; border-radius: 10rpx;
background-color: lightgray; background-color: white;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
...@@ -477,4 +529,24 @@ ...@@ -477,4 +529,24 @@
width: 100%; width: 100%;
height: 390rpx; 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> </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 @@ ...@@ -10,6 +10,32 @@
"uview": "^0.1.0" "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": { "node_modules/async-validator": {
"version": "1.12.2", "version": "1.12.2",
"resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-1.12.2.tgz", "resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-1.12.2.tgz",
...@@ -30,6 +56,12 @@ ...@@ -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.", "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 "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": { "node_modules/decimal.js": {
"version": "10.4.3", "version": "10.4.3",
"resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.4.3.tgz", "resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.4.3.tgz",
...@@ -51,12 +83,98 @@ ...@@ -51,12 +83,98 @@
"bignumber.js": "^9.0.0" "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": { "node_modules/popper.js": {
"version": "0.6.4", "version": "0.6.4",
"resolved": "https://registry.npmmirror.com/popper.js/-/popper.js-0.6.4.tgz", "resolved": "https://registry.npmmirror.com/popper.js/-/popper.js-0.6.4.tgz",
"integrity": "sha512-KGPaJaw9822VnignV8HuPdVv0C66d3iC5YbdPaty/57LPmBqmbZX39n2gqN/bDeOtGHzsOA2AA9f9DH2Y0z6AQ==", "integrity": "sha512-KGPaJaw9822VnignV8HuPdVv0C66d3iC5YbdPaty/57LPmBqmbZX39n2gqN/bDeOtGHzsOA2AA9f9DH2Y0z6AQ==",
"deprecated": "You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1" "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": { "node_modules/uview": {
"version": "0.1.0", "version": "0.1.0",
"resolved": "https://registry.npmmirror.com/uview/-/uview-0.1.0.tgz", "resolved": "https://registry.npmmirror.com/uview/-/uview-0.1.0.tgz",
...@@ -74,9 +192,38 @@ ...@@ -74,9 +192,38 @@
"peerDependencies": { "peerDependencies": {
"vue": "^2.4.1" "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": { "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": { "async-validator": {
"version": "1.12.2", "version": "1.12.2",
"resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-1.12.2.tgz", "resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-1.12.2.tgz",
...@@ -92,6 +239,12 @@ ...@@ -92,6 +239,12 @@
"resolved": "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz", "resolved": "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz",
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==" "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": { "decimal.js": {
"version": "10.4.3", "version": "10.4.3",
"resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.4.3.tgz", "resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.4.3.tgz",
...@@ -110,11 +263,53 @@ ...@@ -110,11 +263,53 @@
"bignumber.js": "^9.0.0" "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": { "popper.js": {
"version": "0.6.4", "version": "0.6.4",
"resolved": "https://registry.npmmirror.com/popper.js/-/popper.js-0.6.4.tgz", "resolved": "https://registry.npmmirror.com/popper.js/-/popper.js-0.6.4.tgz",
"integrity": "sha512-KGPaJaw9822VnignV8HuPdVv0C66d3iC5YbdPaty/57LPmBqmbZX39n2gqN/bDeOtGHzsOA2AA9f9DH2Y0z6AQ==" "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": { "uview": {
"version": "0.1.0", "version": "0.1.0",
"resolved": "https://registry.npmmirror.com/uview/-/uview-0.1.0.tgz", "resolved": "https://registry.npmmirror.com/uview/-/uview-0.1.0.tgz",
...@@ -125,6 +320,16 @@ ...@@ -125,6 +320,16 @@
"deepmerge": "^1.5.0", "deepmerge": "^1.5.0",
"popper.js": "^0.6.4" "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 @@ ...@@ -218,7 +218,7 @@
<style lang="scss"> <style lang="scss">
.body { .body {
height: 100%; height: 100%;
background-color: white; // background-color: white;
} }
.editBar { .editBar {
......
...@@ -3,66 +3,59 @@ ...@@ -3,66 +3,59 @@
<view class="search-head"> <view class="search-head">
<view class="search-bar"> <view class="search-bar">
<image style="width: 40rpx; height: 40rpx" src="@/static/search.png"></image> <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" /> :value="keyword" />
<image v-if="keyword!=''" @click="clearWord" style="width: 36rpx; height: 36rpx" <image v-if="keyword!=''" @click="clearWord" style="width: 36rpx; height: 36rpx"
src="@/static/search.png"></image> src="@/static/video/close.png"></image>
</view> </view>
<text class="searchbutton" @click="getsearch">搜索</text> <text class="searchbutton" @click="getsearch">搜索</text>
</view> </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 class="search-item-bottom">
<view> <block v-for="(item, index) in searchList" :key="index">
<view class="search-item-wrap" v-if="searchList.length>0 && !showEmpty"> <text class="search-item" @click="clickHistory(item)">{{ item }}</text>
<view class="search-item-top"> </block>
<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> </view>
</view> </view>
</view>
<view> <view>
<view class="emptyView" if="showEmpty"> <view class="emptyView" v-if="showEmpty">
<text style="font-size: 30rpx;"> 暂无搜索结果 </text> <text style="font-size: 30rpx;"> 暂无搜索结果 </text>
</view>
</view> </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> <text class="item-title">{{showEmpty ? '猜你喜欢' : '今日热门' }}</text>
<view class="item-list-column"> <view class="flex space" style="display:flex; flex-wrap:wrap;">
<block v-for="(item, index) in topList" :key="index"> <block v-for="(value,key) in topList" :key="key">
<view class="product-item-column" @click="handleListItem(item)"> <view class="mt-10"
<image class="item-list-img3" :src="item.coverImage"></image> style="width:31%; position: relative; border-radius:20rpx;margin-bottom: 10rpx;margin-left: 14rpx;"
<view class="item-list-bottom"> @click="handleListItem(value)">
<view> <image class="integral-mall-goods" mode="aspectFill" :src="value.coverImage"></image>
<image class="item-list-bottom-img" src="../../assets/images/ic_index_play.png"> <view class="text" style="font-size: 26rpx;color: black;height: 36rpx;margin-left: 5rpx;">
</image> {{value.title}}
<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> </view>
<text style="font-size: 24rpx; color: black">{{ item.title }}</text>
</view> </view>
</block> </block>
</view> </view>
</view> </view>
<view class="item-content"> <view class="item-content">
<view class="item-list-column"> <view class="item-list-column">
<block v-for="(item, index) in dataList" :key="index"> <block v-for="(item, index) in dataList" :key="index">
<view class="pack-item" @click="handleListItem(item)"> <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"> <view class="pack-item-cloumn">
<text class="text"> <text class="text">
{{ item.title }} {{ item.title }}
...@@ -121,7 +114,7 @@ ...@@ -121,7 +114,7 @@
let that = this let that = this
this.post({ this.post({
url: '/vedioV1/orders', url: '/vedio/orders',
data: { data: {
words: that.keyword words: that.keyword
}, },
...@@ -142,7 +135,7 @@ ...@@ -142,7 +135,7 @@
getOrders() { getOrders() {
let that = this let that = this
this.post({ this.post({
url: '/vedioV1/orders', url: '/vedio/orders',
showLoading: false, showLoading: false,
success: ({ success: ({
data data
...@@ -155,7 +148,7 @@ ...@@ -155,7 +148,7 @@
}); });
}, },
showChangePrompt(e) { showChangePrompt(e) {
this.keyword = e.value this.keyword = e.detail.value
}, },
clickHistory(word) { clickHistory(word) {
this.keyword = word this.keyword = word
...@@ -207,7 +200,8 @@ ...@@ -207,7 +200,8 @@
that.searchList = [] that.searchList = []
} else { } else {
that.searchList = [] that.searchList = []
that.searchList = that.getArrfromClipStr(data) console.log(data)
that.searchList = that.getArrfromClipStr(data.data)
} }
}, },
fail: function() { fail: function() {
...@@ -232,11 +226,10 @@ ...@@ -232,11 +226,10 @@
for (var i = 0; i < strArr.length; i++) { for (var i = 0; i < strArr.length; i++) {
clipStr += (strArr[i] + ',') clipStr += (strArr[i] + ',')
} }
return clipStr return clipStr
}, },
getArrfromClipStr(clipStr) { getArrfromClipStr(clipStr) {
let result = clipStr.split(',') let result = clipStr.toString().split(',')
let resultArr = [] let resultArr = []
for (var i = 0; i < result.length; i++) { for (var i = 0; i < result.length; i++) {
if (result[i] == '') continue if (result[i] == '') continue
...@@ -249,10 +242,8 @@ ...@@ -249,10 +242,8 @@
</script> </script>
<style lang="less"> <style lang="less">
.container { .container {
background-color: #ffffff; background-color: white;
display: flex; flex: 1;
height: 100%;
flex-direction: column;
} }
.item-list { .item-list {
...@@ -282,6 +273,7 @@ ...@@ -282,6 +273,7 @@
.pack-item-cloumn { .pack-item-cloumn {
margin-left: 20rpx; margin-left: 20rpx;
display: flex;
flex-direction: column; flex-direction: column;
.text { .text {
...@@ -328,9 +320,11 @@ ...@@ -328,9 +320,11 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between
} }
.inputkeyword { .inputkeyword {
flex: 1;
margin-left: 30rpx; margin-left: 30rpx;
} }
...@@ -354,8 +348,8 @@ ...@@ -354,8 +348,8 @@
width: 100%; width: 100%;
margin: 10rpx; margin: 10rpx;
display: flex; display: flex;
flex-direction: row;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between;
} }
.item-list-bottom { .item-list-bottom {
...@@ -363,10 +357,10 @@ ...@@ -363,10 +357,10 @@
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center;
margin-top: 280rpx; margin-top: 280rpx;
height: 40rpx; height: 40rpx;
border-radius: 10rpx; border-radius: 10rpx;
align-content: center;
opacity: 0.7; opacity: 0.7;
} }
...@@ -379,18 +373,18 @@ ...@@ -379,18 +373,18 @@
} }
.product-item-column { .product-item-column {
width: 31%; width: 26%;
margin-left: 8rpx;
height: 390rpx; height: 390rpx;
display: flex; display: block;
flex-direction: column; // display: flex;
margin-bottom: 10rpx; // flex-direction: column;
// margin-bottom: 10rpx;
// margin-right: 10rpx;
} }
.item-list-img3 { .item-list-img3 {
position: absolute; position: absolute;
width: 100%; width: 100%;
object-fit: cover;
height: 320rpx; height: 320rpx;
border-radius: 10rpx; border-radius: 10rpx;
} }
...@@ -427,10 +421,18 @@ ...@@ -427,10 +421,18 @@
.search-item { .search-item {
border: 4rpx; border: 4rpx;
height: 60rpx; height: 60rpx;
line-height: 60rpx;
margin: 8rpx 15rpx; margin: 8rpx 15rpx;
border-radius: 60rpx; border-radius: 60rpx;
border: 0rpx solid #f8f8ff; border: 0rpx solid #f8f8ff;
background-color: #f8f8ff; background-color: #f8f8ff;
padding: 10rpx 20rpx; padding: 0 20rpx;
}
.integral-mall-goods {
width: 100%;
height: 320rpx;
background: #F2F2F2;
border-radius: 16upx;
} }
</style> </style>
\ No newline at end of file
<template> <template>
<view class="container"> <z-paging class="container">
<view class="item-content"> <view class="item-content">
<view class="flex1 task-title-wrap"> <view class="flex1 task-title-wrap">
<text class="task-title">签到任务</text> <text class="task-title">签到任务</text>
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
<view class="task-wrap flex"> <view class="task-wrap flex">
<view class="flex1" style="justify-content: space-between"> <view class="flex1" style="justify-content: space-between">
<block v-for="(item,key) in signList" :key="key"> <block v-for="(item,key) in signList" :key="key">
<view class="flex"> <view class="flex ml-10">
<view class="item.compleled?'sign-item':'sign-item2'"> <view :class="item.compleled?'sign-item':'sign-item2'">
<image :src="item.compleled?signOkImg:signNoneImg"></image> <image :src="item.compleled?signOkImg:signNoneImg"></image>
<text class="text1">{{ '+' + item.reward }}</text> <text class="text1">{{ '+' + item.reward }}</text>
</view> </view>
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</view> </view>
</block> </block>
</view> </view>
<text :class="signBtnStyle" @click="sign">{{ signData.buttonText }}</text> <text :class="signBtnStyle" @click="sign">{{signData.buttonText}}</text>
</view> </view>
</view> </view>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</view> </view>
<view class="task-line"></view> <view class="task-line"></view>
<view class="flex task-wrap"> <view class="flex task-wrap">
<block v-for="(item2,key) in item.taskList" :key="key"> <block v-for="(item2,key2) in item.taskList" :key="key2">
<view class="flex1" <view class="flex1"
style="width: 96%;justify-content: space-between;margin-top: 10rpx;margin-bottom: 20rpx;"> style="width: 96%;justify-content: space-between;margin-top: 10rpx;margin-bottom: 20rpx;">
<view class="flex" style="width: 70%; align-items: flex-start"> <view class="flex" style="width: 70%; align-items: flex-start">
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<image style="width: 36rpx; height: 36rpx; margin: 0 10rpx" :src="taskCoinImg"> <image style="width: 36rpx; height: 36rpx; margin: 0 10rpx" :src="taskCoinImg">
</image> </image>
<text <text
style=" color: #f84a57;font-size: 30rpx;font-weight: bold;">{{ '+' + item2.rewardPoint }}</text> style="color: #f84a57;font-size: 30rpx;font-weight: bold;">{{ '+' + item2.rewardPoint }}</text>
</view> </view>
<view> <view>
<text style="font-size: 24rpx">{{ item2.content }}</text> <text style="font-size: 24rpx">{{ item2.content }}</text>
...@@ -69,12 +69,19 @@ ...@@ -69,12 +69,19 @@
</block> </block>
</view> </view>
<!-- <reward-popup v-if="showRewardPopup" :dot="currentDot" @close="rewardClose"></reward-popup> <reward-popup :show="showRewardPopup" :dot="currentDot" @rewardClose="rewardClose"></reward-popup>
<signsuc-popup v-if="showSignPopup" :dot="currentDot" @close="signClose"></signsuc-popup> --> <signsuc-popup :show="showSignPopup" :dot="currentDot" @signClose="signClose"></signsuc-popup>
</view> </z-paging>
</template> </template>
<script> <script>
import rewardPopup from '@/components/reward-popup/reward-popup.vue';
import signsucPopup from '@/components/signsuc-popup/signsuc-popup.vue';
import {
REWARD_ID
} from '../../utils/adConstant.js';
import common from '@/mixins/common'; import common from '@/mixins/common';
import { import {
...@@ -84,9 +91,17 @@ ...@@ -84,9 +91,17 @@
redirectTo redirectTo
} from '@/utils/fun'; } from '@/utils/fun';
import {
TaskConstant
} from '../../utils/taskConstant.js'
export default { export default {
name: 'task', name: 'task',
mixins: [common], mixins: [common],
components: {
rewardPopup,
signsucPopup
},
data() { data() {
return { return {
signData: '', signData: '',
...@@ -103,36 +118,77 @@ ...@@ -103,36 +118,77 @@
} }
}, },
mounted() { mounted() {
// this.getSignList() this.getSignList()
// this.getTaskList() this.getTaskList()
this.preloadAd()
}, },
methods: { methods: {
preloadAd() {
this.ad = tt.createRewardedVideoAd({
adUnitId: REWARD_ID,
});
// 监听错误
this.ad.onError((err) => {
tt.hideLoading();
uni.showToast({
title: '广告拉取失败,请稍候再试'
})
switch (err.errCode) {
case 1004:
// 无合适的广告
break;
default:
// 更多请参考错误码文档
}
});
// 预加载资源
this.ad.load();
},
showAd(item) {
this.ad.show();
let that = this
// 监听视频播放完成
this.ad.onClose((data) => {
tt.hideLoading();
if (data.isEnded) {
that.reportTaskPointMore(item, true)
} else {
console.log("未观看完视频");
}
});
},
getSignList() { getSignList() {
let that = this let that = this
getSignPageMsg() this.post({
.then((data) => { url: '/vTask/sign/pageMsg',
let newData = JSON.parse(data) showLoading: false,
that.signData = newData success: ({
data
}) => {
that.signData = data
that.signList = [] that.signList = []
that.signList = newData.list that.signList = data.list
if (that.signData.buttonStatus == 0 || that.signData.buttonStatus == 1) { if (that.signData.buttonStatus == 0 || that.signData.buttonStatus == 1) {
that.signBtnStyle = "sign-btn" that.signBtnStyle = "sign-btn"
} else { } else {
that.signBtnStyle = "sign-btn2" that.signBtnStyle = "sign-btn2"
} }
}) }
.catch((err) => { });
$utils.showToast('网络出小差了~')
})
}, },
getTaskList() { getTaskList() {
// 任务信息 // 任务信息
let that = this let that = this
getTaskPageMsg() this.post({
.then((data) => { url: '/vTask/taskList/pageMsg',
let newData = JSON.parse(data) showLoading: false,
that.taskList = newData.pageMsg success: ({
data
}) => {
that.taskList = data.pageMsg
for (var i = 0; i < that.taskList.length; i++) { for (var i = 0; i < that.taskList.length; i++) {
for (var j = 0; j < that.taskList[i].taskList.length; j++) { for (var j = 0; j < that.taskList[i].taskList.length; j++) {
...@@ -144,10 +200,9 @@ ...@@ -144,10 +200,9 @@
} }
} }
} }
}) this.$refs.paging.complete(data.list);
.catch((err) => { }
$utils.showToast('网络出小差了~') });
})
}, },
hasShortCut(taskId) { hasShortCut(taskId) {
let that = this let that = this
...@@ -190,7 +245,8 @@ ...@@ -190,7 +245,8 @@
let rewardMoreType = this.signList[this.signData.todayMsgIndexInWeek].rewardMoreType let rewardMoreType = this.signList[this.signData.todayMsgIndexInWeek].rewardMoreType
if (rewardMoreType == 1) { if (rewardMoreType == 1) {
// TODO 看广告 // TODO 看广告
$utils.showToast('服务器繁忙,请稍后再试!') let item = this.signList[this.signData.todayMsgIndexInWeek]
this.showAd(item)
} else if (ewardMoreType == 2) { } else if (ewardMoreType == 2) {
// 分享 // 分享
this.myShare(this.signList[this.signData.todayMsgIndexInWeek]) this.myShare(this.signList[this.signData.todayMsgIndexInWeek])
...@@ -199,8 +255,16 @@ ...@@ -199,8 +255,16 @@
reportTaskPoint(item, isSign) { reportTaskPoint(item, isSign) {
// 领取奖励 // 领取奖励
let that = this let that = this
addTaskPoint(item.taskId)
.then((data) => { this.post({
url: '/vTask/common/addTaskPoint',
data: {
taskId: item.taskId
},
showLoading: false,
success: ({
data
}) => {
if (isSign) { if (isSign) {
that.currentDot = item.reward that.currentDot = item.reward
that.getSignList() that.getSignList()
...@@ -210,23 +274,44 @@ ...@@ -210,23 +274,44 @@
that.getTaskList() that.getTaskList()
that.showRewardPopup = true that.showRewardPopup = true
} }
}) },
.catch((err) => { });
console.log(err) },
$utils.showToast('网络出小差了~') reportTaskPointMore(item, isSign) {
}) // 领取奖励
let that = this
this.post({
url: '/vTask/common/addTaskPoint/more',
data: {
taskId: item.taskId
},
showLoading: false,
success: ({
data
}) => {
that.currentDot = item.reward
that.getSignList()
that.showSignPopup = true
},
});
}, },
reportCompleteTask(taskId) { reportCompleteTask(taskId) {
// 上报完成任务 // 上报完成任务
let that = this let that = this
reportCompleteMsg(taskId) this.post({
.then((data) => { url: '/vTask/common/reportCompleteMsg',
data: {
taskId: taskId
},
showLoading: false,
success: ({
data
}) => {
that.getSignList() that.getSignList()
that.getTaskList() that.getTaskList()
}) }
.catch((err) => { });
$utils.showToast('网络出小差了~')
})
}, },
showRule() { showRule() {
uni.showModal({ uni.showModal({
...@@ -250,9 +335,7 @@ ...@@ -250,9 +335,7 @@
item.listCode == TaskConstant.seeVedioListPage item.listCode == TaskConstant.seeVedioListPage
) { ) {
this.reportCompleteTask(item.taskId) this.reportCompleteTask(item.taskId)
router.push({ navigateTo(`/pages/home`)
uri: '/pages/Home'
})
} else if ( } else if (
item.listCode == TaskConstant.firstToHomePage || item.listCode == TaskConstant.firstToHomePage ||
item.listCode == TaskConstant.seeVedio || item.listCode == TaskConstant.seeVedio ||
...@@ -261,17 +344,14 @@ ...@@ -261,17 +344,14 @@
item.listCode == TaskConstant.compeleVedios || item.listCode == TaskConstant.compeleVedios ||
item.listCode == TaskConstant.completeSeeDays item.listCode == TaskConstant.completeSeeDays
) { ) {
router.push({ redirectTo(`/pages/home`)
uri: '/pages/Home'
})
} else if ( } else if (
item.listCode == TaskConstant.firstPay || item.listCode == TaskConstant.firstPay ||
item.listCode == TaskConstant.payBack || item.listCode == TaskConstant.payBack ||
item.listCode == TaskConstant.completePay item.listCode == TaskConstant.completePay
) { ) {
router.push({ navigateTo(`/pagesA/vipPay/vipPay`)
uri: '/pages/Vip'
})
} else if ( } else if (
item.listCode == TaskConstant.saveToPhonePage item.listCode == TaskConstant.saveToPhonePage
) { ) {
...@@ -279,23 +359,18 @@ ...@@ -279,23 +359,18 @@
} else if ( } else if (
item.listCode == TaskConstant.openForHome item.listCode == TaskConstant.openForHome
) { ) {
router.push({ redirectTo(`/pages/home`)
uri: '/pages/Home'
})
} else if ( } else if (
item.listCode == TaskConstant.loginByMobie item.listCode == TaskConstant.loginByMobie
) { ) {
router.push({ redirectTo(`/pages/loading`)
uri: '/pages/Login'
})
} else if ( } else if (
item.listCode == TaskConstant.seeAd item.listCode == TaskConstant.seeAd
) { ) {
// TODO 看广告 // TODO 看广告
$utils.showToast('服务器繁忙,请稍后再试!')
} else { } else {}
$utils.showToast('服务器繁忙,请稍后再试!')
}
} }
}, },
myShare(item) { myShare(item) {
...@@ -316,15 +391,20 @@ ...@@ -316,15 +391,20 @@
signMoreReward(item) { signMoreReward(item) {
// 签到-广告或者分享后领取更多 // 签到-广告或者分享后领取更多
let that = this let that = this
addTaskPointMore(item.taskId) this.post({
.then((data) => { url: '/vTask/common/addTaskPoint/more',
data: {
taskId: item.taskId
},
showLoading: false,
success: ({
data
}) => {
that.currentDot = item.reward that.currentDot = item.reward
that.getSignList() that.getSignList()
that.showSignPopup = true that.showSignPopup = true
}) }
.catch((err) => { });
$utils.showToast('网络出小差了~')
})
}, },
rewardClose() { rewardClose() {
this.showRewardPopup = false this.showRewardPopup = false
...@@ -334,8 +414,7 @@ ...@@ -334,8 +414,7 @@
}, },
isFromForHome() { isFromForHome() {
let that = this let that = this
if (uni.getEnterOptionsSync().launcher == 'shortcut') {
if (app.getInfo().source.type == 'shortcut') {
if (that.taskList.length > 0) { if (that.taskList.length > 0) {
for (var i = 0; i < that.taskList.length; i++) { for (var i = 0; i < that.taskList.length; i++) {
for (var j = 0; j < that.taskList[i].taskList.length; j++) { for (var j = 0; j < that.taskList[i].taskList.length; j++) {
...@@ -365,7 +444,7 @@ ...@@ -365,7 +444,7 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
width: 100%; width: 100%;
margin-top: 30rpx; margin-top: 20rpx;
} }
.flex { .flex {
...@@ -385,6 +464,11 @@ ...@@ -385,6 +464,11 @@
background-color: #ffffff; background-color: #ffffff;
border-radius: 12rpx; border-radius: 12rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
image {
width: 40rpx;
height: 40rpx;
}
} }
.task-title-wrap { .task-title-wrap {
...@@ -451,6 +535,7 @@ ...@@ -451,6 +535,7 @@
border-radius: 80rpx; border-radius: 80rpx;
font-size: 34rpx; font-size: 34rpx;
width: 90%; width: 90%;
line-height: 80rpx;
height: 80rpx; height: 80rpx;
margin-top: 30rpx; margin-top: 30rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
...@@ -464,6 +549,7 @@ ...@@ -464,6 +549,7 @@
font-size: 30rpx; font-size: 30rpx;
width: 90%; width: 90%;
height: 80rpx; height: 80rpx;
line-height: 80rpx;
margin-top: 30rpx; margin-top: 30rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
background-color: #dcdcdc; background-color: #dcdcdc;
...@@ -477,6 +563,7 @@ ...@@ -477,6 +563,7 @@
background-color: #fb3309; background-color: #fb3309;
width: 180rpx; width: 180rpx;
height: 70rpx; height: 70rpx;
line-height: 70rpx;
} }
.task-btn2 { .task-btn2 {
...@@ -488,6 +575,7 @@ ...@@ -488,6 +575,7 @@
background-color: #ffffff; background-color: #ffffff;
width: 180rpx; width: 180rpx;
height: 70rpx; height: 70rpx;
line-height: 70rpx;
} }
.task-btn3 { .task-btn3 {
...@@ -499,6 +587,7 @@ ...@@ -499,6 +587,7 @@
background-color: #ffffff; background-color: #ffffff;
width: 180rpx; width: 180rpx;
height: 70rpx; height: 70rpx;
line-height: 70rpx;
} }
.sign-item { .sign-item {
......
...@@ -12,12 +12,6 @@ ...@@ -12,12 +12,6 @@
:show-fullscreen-btn="false" @controlstoggle="controlstoggle" @timeupdate="timeUpdate" :show-fullscreen-btn="false" @controlstoggle="controlstoggle" @timeupdate="timeUpdate"
@ended="ended" /> @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" <view v-if="originList[originIndex].lock || !list.vedioUrl" class="videoHover tsimg"
@click.stop="tapVideoHover(index,list.pays)" @click.stop="tapVideoHover(index,list.pays)"
:style="'width: '+ windowWidth +'px; height:'+100+'%;'"> :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