首页搜索
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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
@@ -24,8 +24,7 @@
|
|||||||
}, {
|
}, {
|
||||||
"path": "pages/task/index",
|
"path": "pages/task/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "任务大厅"
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/chasingDrama/index",
|
"path": "pages/chasingDrama/index",
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ import {
|
|||||||
onReachBottom
|
onReachBottom
|
||||||
} from '@dcloudio/uni-app'
|
} from '@dcloudio/uni-app'
|
||||||
import contentlist from './components/contentlist.vue'
|
import contentlist from './components/contentlist.vue'
|
||||||
import http from '@/http/http.js'
|
|
||||||
let datas = reactive({
|
let datas = reactive({
|
||||||
noticeList: [], //公告列表
|
noticeList: [], //公告列表
|
||||||
|
|
||||||
@@ -94,18 +93,10 @@ onReachBottom(() => {
|
|||||||
// 获取弹窗信息
|
// 获取弹窗信息
|
||||||
async function getPop() {
|
async function getPop() {
|
||||||
let res = await announcement()
|
let res = await announcement()
|
||||||
if (res.code == 0) {
|
if (res.state == 1) {
|
||||||
if (res.data && res.data.state == 1) {
|
datas.ruleShow = true
|
||||||
datas.ruleShow = true
|
datas.rule_title = res.title
|
||||||
datas.rule_title = res.data.title
|
datas.rule_content = res.content
|
||||||
datas.rule_content = res.data.content
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
duration: 1000,
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 搜索跳转
|
// 搜索跳转
|
||||||
@@ -117,15 +108,7 @@ function moreVideo() {
|
|||||||
// 公告
|
// 公告
|
||||||
async function getMsg() {
|
async function getMsg() {
|
||||||
let res = await messageselectMessage()
|
let res = await messageselectMessage()
|
||||||
if (res.code == 0) {
|
datas.noticeList = res.list
|
||||||
datas.noticeList = res.data.list
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
duration: 1000,
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//获取推荐视频
|
//获取推荐视频
|
||||||
async function getrecomVideo(sort, active = 1) {
|
async function getrecomVideo(sort, active = 1) {
|
||||||
@@ -140,19 +123,11 @@ async function getrecomVideo(sort, active = 1) {
|
|||||||
classifyId: ''
|
classifyId: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
if (res.code == 0) {
|
if (datas.page == 1) {
|
||||||
if (datas.page == 1) {
|
datas.list = res.list
|
||||||
datas.list = res.data.list
|
|
||||||
} else {
|
} 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>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -72,16 +72,15 @@ function doSearchs(keyWord) {
|
|||||||
// 搜索
|
// 搜索
|
||||||
async function doSearch() {
|
async function doSearch() {
|
||||||
datas.isSearch = false
|
datas.isSearch = false
|
||||||
|
|
||||||
let res = await selectCourseTitles({
|
let res = await selectCourseTitles({
|
||||||
title: datas.keyword,
|
title: datas.keyword,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
page: datas.page,
|
page: datas.page,
|
||||||
})
|
})
|
||||||
if (datas.page == 1) {
|
if (datas.page == 1) {
|
||||||
datas.keywordList = res.data.list
|
datas.keywordList = res.list
|
||||||
} else {
|
} else {
|
||||||
datas.keywordList = [...datas.keywordList, ...res.data.list]
|
datas.keywordList = [...datas.keywordList, ...res.list]
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,206 @@
|
|||||||
<template>
|
<template>
|
||||||
ios
|
<view class="task_bg u-absolute">
|
||||||
anzhuo
|
<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>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<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>
|
</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>
|
</style>
|
||||||
|
|||||||
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