Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/new_app into gaohao
This commit is contained in:
17
api/task/index.js
Normal file
17
api/task/index.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import http from '@/http/http.js'
|
||||
|
||||
// 获取任务列表
|
||||
export const announcement = (data) => {
|
||||
return http.request({
|
||||
url: '/announcement',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取签到
|
||||
export const getUserSignData = (data) => {
|
||||
return http.request({
|
||||
url: 'userSignRecord/getUserSignData',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
26
components/emprty-card/emprty-card.vue
Normal file
26
components/emprty-card/emprty-card.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<up-empty :icon="props.icon" :text="props.text"></up-empty>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
icon: {
|
||||
type: String,
|
||||
default: '/static/default/none.png'
|
||||
},
|
||||
text: {
|
||||
type: String,
|
||||
default: '空空如也~'
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.container {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
@@ -32,8 +32,7 @@
|
||||
{
|
||||
"path": "pages/task/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "任务大厅"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/chasingDrama/index",
|
||||
|
||||
@@ -7,57 +7,18 @@
|
||||
<navigator class="more" url="/pages/watching_history/watching_history?type=3">更多</navigator>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="item">
|
||||
<view class="item" v-for="item in data.list1" :key="item.id">
|
||||
<view class="cover">
|
||||
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
|
||||
<view class="num">第三集</view>
|
||||
<image class="img" :src="item.titleImg" mode="aspectFill"></image>
|
||||
<view class="num">{{ item.courseDetailsName }}</view>
|
||||
</view>
|
||||
<view class="intro-wrap">
|
||||
<view class="name">我在八十年代当后妈</view>
|
||||
<view class="t">言情</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="cover">
|
||||
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
|
||||
<view class="num">第三集</view>
|
||||
</view>
|
||||
<view class="intro-wrap">
|
||||
<view class="name">我在八十年代当后妈</view>
|
||||
<view class="t">言情</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="cover">
|
||||
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
|
||||
<view class="num">第三集</view>
|
||||
</view>
|
||||
<view class="intro-wrap">
|
||||
<view class="name">我在八十年代当后妈</view>
|
||||
<view class="t">言情</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="cover">
|
||||
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
|
||||
<view class="num">第三集</view>
|
||||
</view>
|
||||
<view class="intro-wrap">
|
||||
<view class="name">我在八十年代当后妈</view>
|
||||
<view class="t">言情</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="cover">
|
||||
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
|
||||
<view class="num">第三集</view>
|
||||
</view>
|
||||
<view class="intro-wrap">
|
||||
<view class="name">我在八十年代当后妈</view>
|
||||
<view class="t">言情</view>
|
||||
<view class="name">{{ item.title }}</view>
|
||||
<view class="t">{{ item.courseLabel }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<emprty-card v-if="!data.list1.length" />
|
||||
</view>
|
||||
<view class="list-wrap">
|
||||
<view class="title-wrap">
|
||||
@@ -65,19 +26,20 @@
|
||||
<navigator class="more" url="/pages/watching_history/watching_history?type=1">更多</navigator>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="item">
|
||||
<view class="item" v-for="item in data.list2" :key="item.id">
|
||||
<div class="item-content">
|
||||
<view class="cover">
|
||||
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
|
||||
<view class="num">第三集</view>
|
||||
<image class="img" :src="item.titleImg" mode="aspectFill"></image>
|
||||
<view class="num">{{ item.courseDetailsName }}</view>
|
||||
</view>
|
||||
<view class="intro-wrap">
|
||||
<view class="name">我在八十年代当后妈</view>
|
||||
<view class="t">言情</view>
|
||||
<view class="name">{{ item.title }}</view>
|
||||
<view class="t">{{ item.courseLabel }}</view>
|
||||
</view>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
<emprty-card v-if="!data.list2.length" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -87,12 +49,13 @@ import { reactive } from 'vue';
|
||||
import { selectByUserId } from '@/api/me/me.js';
|
||||
import { onLoad, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app';
|
||||
|
||||
// 获取数据
|
||||
async function selectByUserIdAjax() {
|
||||
try {
|
||||
const res1 = await selectByUserId({ page: 1, limit: 6, classify: 3 });
|
||||
const res2 = await selectByUserId({ page: 1, limit: 6, classify: 6 });
|
||||
console.log(res1);
|
||||
console.log(res2);
|
||||
data.list1 = res1.records;
|
||||
data.list2 = res2.records;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
@@ -25,19 +25,19 @@
|
||||
</template>
|
||||
</view>
|
||||
<view class="navTop">
|
||||
<view :style="datas.active == 1 ? 'color:#ff6b7f' : ''" @tap="getrecomVideo('', 1)">
|
||||
<view :class="datas.active == 1 ? 'navTop-active' : ''" @tap="getrecomVideo('', 1)">
|
||||
最新
|
||||
</view>
|
||||
<view :style="datas.active == 2 ? 'color:#ff6b7f' : ''" @tap="getrecomVideo('1', 2)">
|
||||
<view :class="datas.active == 2 ? 'navTop-active' : ''" @tap="getrecomVideo('1', 2)">
|
||||
排行
|
||||
</view>
|
||||
<view :style="datas.active == 3 ? 'color:#ff6b7f' : ''" @tap="getrecomVideo('2', 3)">
|
||||
<view :class="datas.active == 3 ? 'navTop-active' : ''" @tap="getrecomVideo('2', 3)">
|
||||
最热
|
||||
</view>
|
||||
<view :style="datas.active == 4 ? 'color:#ff6b7f' : ''" @tap="getrecomVideo('1', 4)">
|
||||
<view :class="datas.active == 4 ? 'navTop-active' : ''" @tap="getrecomVideo('1', 4)">
|
||||
剧情
|
||||
</view>
|
||||
<view :style="datas.active == 5 ? 'color:#ff6b7f' : ''" @tap="getrecomVideo('2', 5)">
|
||||
<view :class="datas.active == 5 ? 'navTop-active' : ''" @tap="getrecomVideo('2', 5)">
|
||||
飙升
|
||||
</view>
|
||||
</view>
|
||||
@@ -58,13 +58,12 @@
|
||||
import {
|
||||
reactive
|
||||
} from 'vue';
|
||||
import { announcement, messageselectMessage,courseselectCourse } from '@/api/index/index.js'
|
||||
import { announcement, messageselectMessage, courseselectCourse } from '@/api/index/index.js'
|
||||
import {
|
||||
onLoad,
|
||||
onReachBottom
|
||||
} from '@dcloudio/uni-app'
|
||||
import contentlist from './components/contentlist.vue'
|
||||
import http from '@/http/http.js'
|
||||
let datas = reactive({
|
||||
noticeList: [], //公告列表
|
||||
|
||||
@@ -94,18 +93,10 @@ onReachBottom(() => {
|
||||
// 获取弹窗信息
|
||||
async function getPop() {
|
||||
let res = await announcement()
|
||||
if (res.code == 0) {
|
||||
if (res.data && res.data.state == 1) {
|
||||
datas.ruleShow = true
|
||||
datas.rule_title = res.data.title
|
||||
datas.rule_content = res.data.content
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
duration: 1000,
|
||||
icon: 'none'
|
||||
});
|
||||
if (res.state == 1) {
|
||||
datas.ruleShow = true
|
||||
datas.rule_title = res.title
|
||||
datas.rule_content = res.content
|
||||
}
|
||||
}
|
||||
// 搜索跳转
|
||||
@@ -117,15 +108,7 @@ function moreVideo() {
|
||||
// 公告
|
||||
async function getMsg() {
|
||||
let res = await messageselectMessage()
|
||||
if (res.code == 0) {
|
||||
datas.noticeList = res.data.list
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
duration: 1000,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
datas.noticeList = res.list
|
||||
}
|
||||
//获取推荐视频
|
||||
async function getrecomVideo(sort, active = 1) {
|
||||
@@ -140,19 +123,11 @@ async function getrecomVideo(sort, active = 1) {
|
||||
classifyId: ''
|
||||
})
|
||||
|
||||
if (res.code == 0) {
|
||||
if (datas.page == 1) {
|
||||
datas.list = res.data.list
|
||||
if (datas.page == 1) {
|
||||
datas.list = res.list
|
||||
} else {
|
||||
datas.list = [...datas.list, ...res.data.list]
|
||||
datas.list = [...datas.list, ...res.list]
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
duration: 1000,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -225,6 +200,10 @@ async function getrecomVideo(sort, active = 1) {
|
||||
|
||||
}
|
||||
|
||||
.navTop-active {
|
||||
color: #cb5d68;
|
||||
}
|
||||
|
||||
.navTop {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -2,47 +2,58 @@
|
||||
<view>
|
||||
<u-sticky :enable="true">
|
||||
<view class="search-box">
|
||||
<u-search bg-color="#f2f2f2" style="width: 100%;" placeholder="搜索更多资源" :focus="true" :show-action="true"
|
||||
<u-search bg-color="#f2f2f2" style="width: 100%;" placeholder="搜索更多资源" :show-action="true"
|
||||
:animation="true" action-text="取消" v-model="datas.keyword" @custom="goBack()"
|
||||
@search="doSearch(false)"></u-search>
|
||||
@search="doSearch()"></u-search>
|
||||
</view>
|
||||
</u-sticky>
|
||||
</view>
|
||||
<view class="search-keyword">
|
||||
<view class="search-keyword" v-if="datas.isSearch">
|
||||
<view class="keyword-block" v-if="datas.hotKeywordList.length != 0">
|
||||
<view class="keyword-list-header">
|
||||
<view>热搜</view>
|
||||
</view>
|
||||
<view class="keyword" v-if="forbid == ''">
|
||||
<view v-for="(keyword, index) in datas.hotKeywordList" @tap="doSearchs(keyword)" :key="index"
|
||||
v-if="keyword">
|
||||
<view class="keyword">
|
||||
<view v-for="(keyword, index) in datas.hotKeywordList" @tap="doSearchs(keyword)" :key="index">
|
||||
{{ keyword }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="hide-hot-tis" v-else>
|
||||
<view>当前搜热已隐藏</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="search-list" v-else>
|
||||
<view class="search-list-box">
|
||||
<videoList @success="posterSuccess" :list="datas.keywordList" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { selectCourseTitles } from '@/api/index/index.js'
|
||||
import videoList from './videoList.vue'
|
||||
import {
|
||||
reactive
|
||||
} from 'vue';
|
||||
import {
|
||||
onShow
|
||||
onShow, onReachBottom
|
||||
} from '@dcloudio/uni-app'
|
||||
let datas = reactive({
|
||||
hotKeywordList: [], //热搜
|
||||
keywordList: [],// 搜索列表
|
||||
keyword: "",// 搜索关键字
|
||||
page: 1,
|
||||
isSearch: true,
|
||||
})
|
||||
onShow(() => {
|
||||
getList()
|
||||
})
|
||||
|
||||
function posterSuccess() {
|
||||
|
||||
}
|
||||
function getList() {
|
||||
if (uni.getStorageSync('moreSearch')) {
|
||||
datas.hotKeywordList = (uni.getStorageSync('moreSearch')).split(',')
|
||||
@@ -50,14 +61,28 @@ function getList() {
|
||||
datas.hotKeywordList = []
|
||||
}
|
||||
}
|
||||
onReachBottom(() => {
|
||||
++datas.page
|
||||
doSearch()
|
||||
})
|
||||
function doSearchs(keyWord) {
|
||||
datas.keyword = keyWord
|
||||
doSearch()
|
||||
}
|
||||
// 搜索
|
||||
async function doSearch() {
|
||||
datas.isSearch = false
|
||||
let res = await selectCourseTitles({
|
||||
title: datas.keyword,
|
||||
limit: 20,
|
||||
page: 1,
|
||||
page: datas.page,
|
||||
})
|
||||
datas.keywordList = res.data.list
|
||||
if (datas.page == 1) {
|
||||
datas.keywordList = res.list
|
||||
} else {
|
||||
datas.keywordList = [...datas.keywordList, ...res.list]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 取消返回首页
|
||||
@@ -83,20 +108,59 @@ function goBack() {
|
||||
}
|
||||
|
||||
.keyword-block {
|
||||
padding: 10upx 0;
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
|
||||
.keyword {
|
||||
width: 94%;
|
||||
padding: 3px 3%;
|
||||
display: flex;
|
||||
flex-flow: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
>view {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 60upx;
|
||||
padding: 0 20upx;
|
||||
margin: 10upx 20upx 10upx 0;
|
||||
height: 60upx;
|
||||
font-size: 28upx;
|
||||
// background-color: rgb(242, 242, 242);
|
||||
background: #E6EBFF;
|
||||
color: #6b6b6b;
|
||||
}
|
||||
}
|
||||
|
||||
.keyword-block .keyword-list-header {
|
||||
width: 94%;
|
||||
padding: 10upx 3%;
|
||||
font-size: 27upx;
|
||||
padding: 10rpx 3%;
|
||||
font-size: 27rpx;
|
||||
color: #333;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.keyword-block .keyword-list-header image {
|
||||
width: 40upx;
|
||||
height: 40upx;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.search-list {
|
||||
width: 100%;
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.search-list-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
width: 686rpx;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
219
pages/index/search/videoList.vue
Normal file
219
pages/index/search/videoList.vue
Normal file
@@ -0,0 +1,219 @@
|
||||
<!-- 瀑布流 -->
|
||||
<template>
|
||||
<view class="list ">
|
||||
<view class="list-box ">
|
||||
<!-- 左边数据 -->
|
||||
<view class="list-box-ite">
|
||||
<view @click="clickItem(item)" class="list-box-ite-item" v-for="(item, index) in datas.arrListLeft"
|
||||
:key="index">
|
||||
<view class="list-box-ite-item-img">
|
||||
<u-lazy-load border-radius="24rpx 24rpx 0 0" :image="item.titleImg"></u-lazy-load>
|
||||
<view class="list-box-ite-item-img-t" v-if="item.over == 1">
|
||||
共{{ item.courseDetailsCount ? item.courseDetailsCount : 0 }}集
|
||||
</view>
|
||||
<view class="list-box-ite-item-img-t" v-else>
|
||||
更新至{{ item.courseDetailsCount ? item.courseDetailsCount : 0 }}集
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-box-ite-item-txt">
|
||||
<view class="list-box-ite-item-txt-t">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
<view class="list-box-ite-item-txt-l" v-if="item.courseLabel">
|
||||
{{ item.courseLabel }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 右边数据 -->
|
||||
<view class="list-box-ite">
|
||||
<view @click="clickItem(item)" class="list-box-ite-item" v-for="(item, index) in datas.arrListRight"
|
||||
:key="index">
|
||||
<view class="list-box-ite-item-img">
|
||||
<u-lazy-load border-radius="24rpx 24rpx 0 0" :image="item.titleImg"></u-lazy-load>
|
||||
<view class="list-box-ite-item-img-t" v-if="item.over == 1">
|
||||
共{{ item.courseDetailsCount ? item.courseDetailsCount : 0 }}集
|
||||
</view>
|
||||
<view class="list-box-ite-item-img-t" v-else>
|
||||
更新至{{ item.courseDetailsCount ? item.courseDetailsCount : 0 }}集
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-box-ite-item-txt">
|
||||
<view class="list-box-ite-item-txt-t">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
<view class="list-box-ite-item-txt-l" v-if="item.courseLabel">
|
||||
{{ item.courseLabel }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
<script setup>
|
||||
import {
|
||||
reactive,
|
||||
watch
|
||||
} from "vue";
|
||||
import {
|
||||
onShow, onReachBottom
|
||||
} from '@dcloudio/uni-app'
|
||||
const props = defineProps({
|
||||
list: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
})
|
||||
let datas = reactive({
|
||||
arrListLeft: [], //左边数据
|
||||
arrListRight: [], //右边数据
|
||||
})
|
||||
onShow(() => {
|
||||
spliceArrayListr()
|
||||
})
|
||||
watch(() => props.list, () => {
|
||||
spliceArrayListr()
|
||||
})
|
||||
function spliceArrayListr() {
|
||||
datas.arrListRight = []
|
||||
datas.arrListLeft = []
|
||||
props.list.map((item, index) => {
|
||||
if (index % 2 === 0) {
|
||||
datas.arrListLeft.push(item)
|
||||
} else {
|
||||
datas.arrListRight.push(item)
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.list {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.list-box {
|
||||
width: 686rpx;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.list-box-ite {
|
||||
width: calc((100% - 20rpx) / 2);
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.list-box-ite-item {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.list-box-ite-item-img {
|
||||
width: 100%;
|
||||
border-radius: 24rpx 24rpx 0 0;
|
||||
min-height: 300rpx;
|
||||
position: relative;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
min-height: 300rpx;
|
||||
border-radius: 24rpx 24rpx 0 0;
|
||||
}
|
||||
|
||||
.list-box-ite-item-img-t {
|
||||
position: absolute;
|
||||
bottom: 10rpx;
|
||||
right: 0;
|
||||
max-width: 80%;
|
||||
border-radius: 10rpx;
|
||||
background-color: rgba(51, 51, 51, 0.7);
|
||||
color: #FFFFFF;
|
||||
font-size: 22rpx;
|
||||
padding: 10rpx;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.list-box-ite-item-txt {
|
||||
padding: 10rpx 20rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 0 0 24rpx 24rpx;
|
||||
}
|
||||
|
||||
.list-box-ite-item-txt-t {
|
||||
color: #333333;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.list-box-ite-item-txt-l {
|
||||
color: #999999;
|
||||
font-size: 22rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.list-box-item {
|
||||
width: calc((100% - 20rpx) / 2);
|
||||
// height: 100%;
|
||||
min-height: 320rpx;
|
||||
border-radius: 24rpx;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.list-box-item-img {
|
||||
width: 100%;
|
||||
height: 200rpx;
|
||||
border-radius: 24rpx 24rpx 0 0;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 200rpx;
|
||||
border-radius: 24rpx 24rpx 0 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.list-box-item-txt {
|
||||
width: 100%;
|
||||
// height: 120rpx;
|
||||
padding: 20rpx 0;
|
||||
border-radius: 0 0 24rpx 24rpx;
|
||||
}
|
||||
|
||||
.list-box-item-txt-t {
|
||||
width: 100%;
|
||||
padding: 0 20rpx;
|
||||
color: #333333;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.list-box-item-txt-l {
|
||||
color: #999999;
|
||||
font-size: 22rpx;
|
||||
margin-top: 10rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,11 +1,206 @@
|
||||
<template>
|
||||
ios
|
||||
anzhuo
|
||||
<view class="task_bg u-absolute">
|
||||
<image class="task_bg" src="@/static/task/task_bg.png"></image>
|
||||
</view>
|
||||
<view class="icon">
|
||||
<image class="task_icon1" src="@/static/task/task_icon1.png"></image>
|
||||
<view class="icon_title">新人好礼送不停</view>
|
||||
<image class="task_icon2" src="@/static/task/task_icon2.png"></image>
|
||||
</view>
|
||||
|
||||
<view class="contentTop ">
|
||||
<view>
|
||||
<image src="@/static/task/renwubg.png" mode=""></image>
|
||||
<view>已连续签到 <text class="num">{{ datas.signDays }}</text> 天</view>
|
||||
</view>
|
||||
<view>
|
||||
<view v-for="item in datas.signInList" :key="item.id"
|
||||
:style="item.status == 1 ? 'color:#EFA765' : 'color:#999'">
|
||||
{{ item.status == 1 ? '已签到' : '待签到' }}
|
||||
<view :style="item.status == 1 ? 'color:#999' : 'color:#EFA765'">
|
||||
{{ item.signDay.substr(5, 8) }}
|
||||
</view>
|
||||
<image v-if="item.status == 0" src="@/static/task/xing (1).png" mode=""></image>
|
||||
<image v-else src="@/static/task/xing (2).png" mode="">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="content margin-lr padding bg-white u-relative" v-if="list.length">
|
||||
<view class="cell flex justify-between" v-for="(item, index) in list" :key="index" v-if="item.shows">
|
||||
<view class="cell_left flex">
|
||||
<view class="cell_title flex">
|
||||
<view class="u-font-28 text-bold title"
|
||||
:style="{ alignSelf: item.rewardImg ? 'center' : 'flex-start' }">{{ item.title }}</view>
|
||||
<u-image v-if="item.rewardImg" class="cell_icon" :src="item.rewardImg"></u-image>
|
||||
<view class="u-font-24 tip">{{ item.rewardDetail }}</view>
|
||||
</view>
|
||||
<view class="subhead u-font-24">{{ item.detail }}</view>
|
||||
</view>
|
||||
<view class="cell_right flex">
|
||||
<view v-if="item.disabled" class="btn u-font-24 text-bold"
|
||||
:style="{ backgroundColor: item.buttonBgColor, color: item.buttonFontColor }" @click="goNav(item)">
|
||||
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` : (
|
||||
item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }} </view>
|
||||
<view v-else class="btn u-font-24 text-bold disabled">
|
||||
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}`
|
||||
: (item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }} </view>
|
||||
<view v-if="item.buttonUnderContent && item.buttonUnderUrl" class="u-font-22 tip"
|
||||
@click="goNav({ id: item.id, buttonUrl: item.buttonUnderUrl, jumpType: 1, title: item.title, disabled: item.disabled, discNumber: item.discNumber })">
|
||||
{{ item.buttonUnderContent }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive,
|
||||
watch
|
||||
} from "vue";
|
||||
import {
|
||||
onShow, onReachBottom
|
||||
} from '@dcloudio/uni-app'
|
||||
import { getUserSignData } from '@/api/task/index.js'
|
||||
|
||||
let datas = reactive({
|
||||
signDays: 0,
|
||||
signInList: [],
|
||||
})
|
||||
onShow(() => {
|
||||
// this.getTaskdata()
|
||||
getsignIn()
|
||||
})
|
||||
// 获得签到
|
||||
async function getsignIn() {
|
||||
let res = await getUserSignData()
|
||||
datas.signInList = res.recordList
|
||||
datas.signDays = res.signDays
|
||||
}
|
||||
// 获取任务列表
|
||||
function getTaskdata() {
|
||||
this.$Request.getT('/app/taskCenter/selectTaskCenter', {}).then(res => {
|
||||
if (res.code == 0) {
|
||||
if (!this.isShowMoneyPay) {
|
||||
let arrData = []
|
||||
res.data.forEach(ele => {
|
||||
if (ele.title.indexOf('分享奖励') == -1 && ele.title.indexOf('新人福利') == -1 &&
|
||||
ele.title.indexOf('观看视频奖励') == -1) {
|
||||
arrData.push(ele)
|
||||
}
|
||||
})
|
||||
this.list = arrData
|
||||
} else {
|
||||
this.list = res.data
|
||||
}
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped lang="scss">
|
||||
.u-absolute {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.task_bg {
|
||||
width: 100% !important;
|
||||
height: 494rpx !important;
|
||||
}
|
||||
|
||||
.icon {
|
||||
position: relative;
|
||||
padding: 32rpx;
|
||||
|
||||
.icon_title {
|
||||
color: #000000;
|
||||
margin-left: 28rpx;
|
||||
top: -20rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.task_icon1 {
|
||||
width: 74rpx !important;
|
||||
height: 78rpx !important;
|
||||
margin-left: 235rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.task_icon2 {
|
||||
width: 126rpx !important;
|
||||
height: 120rpx !important;
|
||||
top: -40rpx;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
.contentTop {
|
||||
margin-bottom: 32rpx;
|
||||
border-radius: 16rpx;
|
||||
top: -126rpx;
|
||||
padding: 30rpx;
|
||||
position: relative;
|
||||
background-color: #ffffff;
|
||||
color: #666666;
|
||||
margin-left: 32rpx;
|
||||
margin-right: 32rpx;
|
||||
|
||||
>view:first-child {
|
||||
>image {
|
||||
width: 100%;
|
||||
height: 78rpx;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 1
|
||||
}
|
||||
|
||||
>view {
|
||||
z-index: 9999;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
width: 98%;
|
||||
|
||||
.num {
|
||||
color: #EC6F48;
|
||||
margin: 0 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
>view:last-child {
|
||||
margin-top: 100rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
>view {
|
||||
position: relative;
|
||||
|
||||
>view {
|
||||
margin-top: 20rpx;
|
||||
width: 80rpx;
|
||||
height: 94rpx;
|
||||
background: linear-gradient(180deg, #FFF7E3 0%, #FFFFFF 100%);
|
||||
border-radius: 14rpx 14rpx 0rpx 0rpx;
|
||||
|
||||
}
|
||||
|
||||
>image {
|
||||
width: 52rpx;
|
||||
height: 48rpx;
|
||||
position: absolute;
|
||||
top: 100rpx;
|
||||
left: 14rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -6,19 +6,21 @@
|
||||
<image class="img" :src="item.titleImg" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
<view class="record">看到{{ item.courseDetailsName }}</view>
|
||||
<view class="btm">
|
||||
<view class="num">
|
||||
<view v-if="item.courseDetailsCount">更新{{ item.courseDetailsCount }}</view>
|
||||
<view class="top">
|
||||
<view class="title">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
<view class="record">看到{{ item.courseDetailsName }}</view>
|
||||
</view>
|
||||
<view class="btm">
|
||||
<view class="num">更新{{ item.courseDetailsCount }}集</view>
|
||||
<view class="btn">继续观看</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<emprty-card v-if="!listData.list.length && listData.status == 'nomore'" />
|
||||
<up-loadmore :status="listData.status" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -43,7 +45,8 @@ const typeList = ref([
|
||||
const listData = reactive({
|
||||
list: [],
|
||||
page: 1,
|
||||
size: 10
|
||||
size: 10,
|
||||
status: 'loading'
|
||||
});
|
||||
|
||||
// 获取数据
|
||||
@@ -54,9 +57,9 @@ async function selectByUserIdAjax() {
|
||||
limit: listData.size,
|
||||
classify: type.value
|
||||
});
|
||||
console.log(res);
|
||||
if (res.code === 0) {
|
||||
listData.list = res.data.records;
|
||||
listData.list = res.records;
|
||||
if (res.currPage >= res.totalPage) {
|
||||
listData.status = 'nomore';
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
@@ -87,7 +90,7 @@ onLoad((e) => {
|
||||
}
|
||||
.list {
|
||||
.item {
|
||||
padding: 28upx 0;
|
||||
padding-bottom: 28upx;
|
||||
display: flex;
|
||||
.cover {
|
||||
width: 150upx;
|
||||
@@ -101,23 +104,31 @@ onLoad((e) => {
|
||||
}
|
||||
}
|
||||
.info {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
.title {
|
||||
font-size: 32upx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.record {
|
||||
color: $uni-zj-color-primary;
|
||||
justify-content: space-between;
|
||||
.top {
|
||||
.title {
|
||||
font-size: 32upx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.record {
|
||||
color: $uni-zj-color-primary;
|
||||
}
|
||||
}
|
||||
.btm {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-top: 28upx;
|
||||
.num {
|
||||
color: #999;
|
||||
}
|
||||
.btn {
|
||||
padding: 4upx 12upx;
|
||||
padding: 8upx 12upx;
|
||||
color: #fff;
|
||||
background: $uni-zj-color-primary;
|
||||
border-radius: 10upx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BIN
static/task/renwubg.png
Normal file
BIN
static/task/renwubg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
BIN
static/task/task_bg.png
Normal file
BIN
static/task/task_bg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 229 KiB |
BIN
static/task/task_icon1.png
Normal file
BIN
static/task/task_icon1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.8 KiB |
BIN
static/task/task_icon2.png
Normal file
BIN
static/task/task_icon2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.0 KiB |
BIN
static/task/xing (1).png
Normal file
BIN
static/task/xing (1).png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
static/task/xing (2).png
Normal file
BIN
static/task/xing (2).png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
Reference in New Issue
Block a user