Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/video_app into ymf
This commit is contained in:
commit
c9826276e9
69
pages.json
69
pages.json
|
|
@ -4,6 +4,15 @@
|
|||
"^tn-(.*)": "@/tuniao-ui/components/tn-$1/tn-$1.vue"
|
||||
},
|
||||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||
{
|
||||
"path": "pages/task/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "任务",
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationStyle": "custom"
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
|
|
@ -12,13 +21,21 @@
|
|||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "pages/task/index",
|
||||
"path": "pages/task/prizeList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "任务",
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationStyle": "custom"
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/task/receiveMember",
|
||||
"style": {
|
||||
"navigationBarTitleText": "任务",
|
||||
"navigationStyle": "custom"
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -785,18 +802,7 @@
|
|||
"backgroundColor": "#FFFFFF",
|
||||
"borderStyle": "black",
|
||||
|
||||
"list": [{
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "static/tabbar/index@2x.png",
|
||||
"selectedIconPath": "static/tabbar/index_@2x.png",
|
||||
"text": "小剧场"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/video/video",
|
||||
"iconPath": "static/tabbar/learn@2x.png",
|
||||
"selectedIconPath": "static/tabbar/learn_@2x.png",
|
||||
"text": "推荐"
|
||||
},
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/task/index",
|
||||
"iconPath": "static/tabbar/task@2x.png",
|
||||
|
|
@ -804,17 +810,30 @@
|
|||
"text": "任务"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/chasingDrama/chasingDrama",
|
||||
"iconPath": "static/tabbar/zhuiju.png",
|
||||
"selectedIconPath": "static/tabbar/zhuiju_.png",
|
||||
"text": "追剧"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/me/index",
|
||||
"iconPath": "static/tabbar/me@2x.png",
|
||||
"selectedIconPath": "static/tabbar/me_@2x.png",
|
||||
"text": "我的"
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "static/tabbar/index@2x.png",
|
||||
"selectedIconPath": "static/tabbar/index_@2x.png",
|
||||
"text": "刷剧"
|
||||
}
|
||||
// {
|
||||
// "pagePath": "pages/video/video",
|
||||
// "iconPath": "static/tabbar/learn@2x.png",
|
||||
// "selectedIconPath": "static/tabbar/learn_@2x.png",
|
||||
// "text": "推荐"
|
||||
// },
|
||||
|
||||
// {
|
||||
// "pagePath": "pages/chasingDrama/chasingDrama",
|
||||
// "iconPath": "static/tabbar/zhuiju.png",
|
||||
// "selectedIconPath": "static/tabbar/zhuiju_.png",
|
||||
// "text": "追剧"
|
||||
// },
|
||||
// {
|
||||
// "pagePath": "pages/me/index",
|
||||
// "iconPath": "static/tabbar/me@2x.png",
|
||||
// "selectedIconPath": "static/tabbar/me_@2x.png",
|
||||
// "text": "我的"
|
||||
// }
|
||||
]
|
||||
},
|
||||
"condition": { //模式配置,仅开发期间生效
|
||||
|
|
|
|||
|
|
@ -1,14 +1,19 @@
|
|||
<!-- 任务中心 -->
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-navbar :background="background" :is-back="false" :title="title" :border-bottom="false"></u-navbar>
|
||||
<!-- <u-navbar :background="background" :is-back="false" :title="title" :border-bottom="false"></u-navbar> -->
|
||||
<view class="task_bg u-absolute">
|
||||
<u-image class="task_bg" src="../../static/images/me/task_bg.png" ></u-image>
|
||||
<image class="task_bg" src="../../static/images/me/task_bg.png" ></image>
|
||||
</view>
|
||||
<view class="navTitle">
|
||||
<view></view>
|
||||
<view class="title">任务大厅</view>
|
||||
<image @click="goNav({jumpType:1,buttonUrl:'/pages/me/index'})" class="navTitleIcon" src="../../static/images/my.png" ></image>
|
||||
</view>
|
||||
<view class="icon u-relative padding">
|
||||
<u-image class="task_icon1 u-relative" src="../../static/images/me/task_icon1.png"></u-image>
|
||||
<image class="task_icon1 u-relative" src="../../static/images/me/task_icon1.png"></image>
|
||||
<view class="icon_title u-font-32 text-bold u-relative">新人好礼送不停</view>
|
||||
<u-image class="task_icon2 u-relative" src="../../static/images/me/task_icon2.png"></u-image>
|
||||
<image class="task_icon2 u-relative" src="../../static/images/me/task_icon2.png"></image>
|
||||
</view>
|
||||
|
||||
<view class="content signIn margin-lr padding bg-white u-relative" v-if="isShowMoneyPay" style="margin-bottom: 32rpx;">
|
||||
|
|
@ -35,11 +40,7 @@
|
|||
|
||||
<view class="tishi">连续签到7天即可获得7元奖励</view>
|
||||
|
||||
<view class="signInBtn" v-if="signInBtn=='已签到'">
|
||||
<view>{{signInBtn}}</view>
|
||||
<view class="signInBtnBg"></view>
|
||||
</view>
|
||||
<view class="signInBtn" v-else @click="taskReceive(15)">
|
||||
<view class="signInBtn" @click="goNav({jumpType: 0, id:15, buttonTitle: '去领取'})">
|
||||
<view>{{signInBtn}}</view>
|
||||
<view class="signInBtnBg"></view>
|
||||
</view>
|
||||
|
|
@ -119,7 +120,7 @@
|
|||
this.signInBtn = this.signInList[index-1].status == 0 ? '重新签到' : '点击签到'
|
||||
}
|
||||
let someDate = new Date(item.signDay); // 假设这是需要判断的日期
|
||||
if (item.signDay && this.isToday(someDate)) {
|
||||
if (item.signDate && this.isToday(someDate)) {
|
||||
this.signInBtn = '已签到'
|
||||
}
|
||||
})
|
||||
|
|
@ -145,8 +146,15 @@
|
|||
// jumpType (integer, optional): 跳转类型 1 内部路径 2 外部路径 ,
|
||||
// type (integer, optional): 任务类型 1 普通任务 2 打卡任务 9 其它 ,
|
||||
// buttonUrl
|
||||
|
||||
if ( item.jumpType == 0) {
|
||||
this.taskReceive(item.id)
|
||||
if ( item.buttonTitle == '去领取') {
|
||||
this.taskReceive(item.id)
|
||||
} else {
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
}
|
||||
} else if ( item.jumpType == 1) {
|
||||
uni.navigateTo({
|
||||
url: item.buttonUrl
|
||||
|
|
@ -159,8 +167,6 @@
|
|||
plus.runtime.openURL(item.buttonUrl)
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
@ -238,6 +244,25 @@
|
|||
top: -40rpx;
|
||||
}
|
||||
}
|
||||
.navTitle{
|
||||
width: 100%;
|
||||
position: relative;
|
||||
z-index: 9;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 106rpx 28rpx 0 28rpx;
|
||||
.title{
|
||||
font-weight: bold;
|
||||
font-size: 40rpx;
|
||||
color: #000000;
|
||||
}
|
||||
.navTitleIcon{
|
||||
width: 40.48rpx!important;
|
||||
height: 46rpx!important;
|
||||
align-self: flex-end;
|
||||
}
|
||||
}
|
||||
.content{
|
||||
border-radius: 16rpx;
|
||||
top: -115rpx;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,162 @@
|
|||
<!-- 任务中心 -->
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- <u-navbar :background="background" :is-back="false" :title="title" :border-bottom="false"></u-navbar> -->
|
||||
<view class="task_bg u-relative"></view>
|
||||
|
||||
|
||||
<view class="content u-relative" v-if="list.length">
|
||||
|
||||
<view class="cell flex justify-between" v-for="(item,index) in list" :key="index" >
|
||||
<image class="cell_icon" :src="'../../static/images/task/member_bg.png'"></image>
|
||||
<view class="name u-font-24 text-bold ">已领取</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
background: {
|
||||
backgroundImage: 'linear-gradient(to right, #DDEAFC 0%, #C8DBFA 49%, #AFC9F6 100%)'
|
||||
},
|
||||
list: [],
|
||||
|
||||
isShowMoneyPay: true,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getTaskdata()
|
||||
this.$Request.getT("app/common/type/919", {}).then(res => {
|
||||
if (res.code == 0) {
|
||||
const sysInfo = uni.getSystemInfoSync();
|
||||
let isIos = sysInfo.platform == 'ios'
|
||||
this.isShowMoneyPay = !(res.data.value == '1' && isIos)
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 跳转
|
||||
* @param {Object} item
|
||||
*/
|
||||
goNav( item ) {
|
||||
// jumpType (integer, optional): 跳转类型 1 内部路径 2 外部路径 ,
|
||||
// type (integer, optional): 任务类型 1 普通任务 2 打卡任务 9 其它 ,
|
||||
// buttonUrl
|
||||
if ( item.jumpType == 0) {
|
||||
this.taskReceive(item.id)
|
||||
} else if ( item.jumpType == 1) {
|
||||
uni.navigateTo({
|
||||
url: item.buttonUrl
|
||||
})
|
||||
} else if( item.jumpType == 3) {
|
||||
uni.switchTab({
|
||||
url: item.buttonUrl
|
||||
})
|
||||
} else if( item.jumpType == 2) {
|
||||
plus.runtime.openURL(item.buttonUrl)
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 领取
|
||||
*/
|
||||
taskReceive(id) {
|
||||
let data = {
|
||||
id: id
|
||||
}
|
||||
this.$Request.getT('app/taskCenter/taskReceive', data).then(res => {
|
||||
if (res.code == 0 ) {
|
||||
uni.showToast({
|
||||
title: id==15?'签到成功':'领取成功',
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.getTaskdata()
|
||||
this.getsignIn()
|
||||
},1000)
|
||||
} else {
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取任务列表
|
||||
*/
|
||||
getTaskdata() {
|
||||
|
||||
this.$Request.getT('app/taskCenter/selectTaskCenter', {}).then(res => {
|
||||
if (res.code == 0 ) {
|
||||
this.list = res.data
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.container{
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
// display: flex;
|
||||
// flex-direction: column;
|
||||
.task_bg{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
background: url('../../static/images/task/prize_bg.png') no-repeat top center / cover;
|
||||
|
||||
}
|
||||
|
||||
.content{
|
||||
z-index: 9;
|
||||
padding: 370rpx 28rpx 0 28rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
.cell{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
background: linear-gradient( 315deg, #FFFFFF 0%, #F9E3D9 100%);
|
||||
border-radius: 32rpx 32rpx 32rpx 32rpx;
|
||||
border: 4rpx solid #FFFFFF;
|
||||
margin-bottom: 48rpx;
|
||||
padding: 36rpx 28rpx;
|
||||
.cell_icon{
|
||||
width: 244rpx!important;
|
||||
height: 198rpx!important;
|
||||
border-radius: 16rpx!important;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.name{
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
|
@ -0,0 +1,252 @@
|
|||
<!-- 任务中心 -->
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- <u-navbar :background="background" :is-back="false" :title="title" :border-bottom="false"></u-navbar> -->
|
||||
<view class="task_bg u-relative">
|
||||
<u-image class="task_bg" src="../../static/images/task/member_bg.png" ></u-image>
|
||||
<view class="title ">每月打卡免费领</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="content bg-white u-relative" v-if="list.length">
|
||||
<view class="title">
|
||||
<view>打卡奖励</view>
|
||||
<view class="tip">每月免费领</view>
|
||||
</view>
|
||||
<view class="cell flex justify-between" v-for="(item,index) in list" :key="index" >
|
||||
<view class="cell_left flex">
|
||||
<image class="cell_icon" :src="'../../static/images/task/member_bg.png'"></image>
|
||||
<view class="cell_title flex">
|
||||
<view class="u-font-28 text-bold title">{{ item.title}}</view>
|
||||
<view class="u-font-24 tip">{{ item.rewardDetail }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cell_right flex">
|
||||
<view v-if=" item.disabled " class="btn u-font-24 text-bold" @click="goNav(item)">领取</view>
|
||||
<view v-else class="btn u-font-24 text-bold receive">已领取</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
background: {
|
||||
backgroundImage: 'linear-gradient(to right, #DDEAFC 0%, #C8DBFA 49%, #AFC9F6 100%)'
|
||||
},
|
||||
list: [],
|
||||
|
||||
isShowMoneyPay: true,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getTaskdata()
|
||||
this.$Request.getT("app/common/type/919", {}).then(res => {
|
||||
if (res.code == 0) {
|
||||
const sysInfo = uni.getSystemInfoSync();
|
||||
let isIos = sysInfo.platform == 'ios'
|
||||
this.isShowMoneyPay = !(res.data.value == '1' && isIos)
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 跳转
|
||||
* @param {Object} item
|
||||
*/
|
||||
goNav( item ) {
|
||||
// jumpType (integer, optional): 跳转类型 1 内部路径 2 外部路径 ,
|
||||
// type (integer, optional): 任务类型 1 普通任务 2 打卡任务 9 其它 ,
|
||||
// buttonUrl
|
||||
if ( item.jumpType == 0) {
|
||||
this.taskReceive(item.id)
|
||||
} else if ( item.jumpType == 1) {
|
||||
uni.navigateTo({
|
||||
url: item.buttonUrl
|
||||
})
|
||||
} else if( item.jumpType == 3) {
|
||||
uni.switchTab({
|
||||
url: item.buttonUrl
|
||||
})
|
||||
} else if( item.jumpType == 2) {
|
||||
plus.runtime.openURL(item.buttonUrl)
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 领取
|
||||
*/
|
||||
taskReceive(id) {
|
||||
let data = {
|
||||
id: id
|
||||
}
|
||||
this.$Request.getT('app/taskCenter/taskReceive', data).then(res => {
|
||||
if (res.code == 0 ) {
|
||||
uni.showToast({
|
||||
title: id==15?'签到成功':'领取成功',
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.getTaskdata()
|
||||
this.getsignIn()
|
||||
},1000)
|
||||
} else {
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取任务列表
|
||||
*/
|
||||
getTaskdata() {
|
||||
|
||||
this.$Request.getT('app/taskCenter/selectTaskCenter', {}).then(res => {
|
||||
if (res.code == 0 ) {
|
||||
this.list = res.data
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.container{
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
// display: flex;
|
||||
// flex-direction: column;
|
||||
.task_bg{
|
||||
width: 100%!important;
|
||||
height: 470rpx!important;
|
||||
position: relative;
|
||||
.title{
|
||||
width: 314rpx;
|
||||
height: 72rpx;
|
||||
line-height: 72rpx;
|
||||
text-align: center;
|
||||
border-radius: 108rpx 108rpx 108rpx 108rpx;
|
||||
border: 6rpx solid #3D6DC6;
|
||||
font-weight: bold;
|
||||
font-size: 34rpx;
|
||||
color: #3D6DC6;
|
||||
position: absolute;
|
||||
top: 210rpx;
|
||||
left: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.content{
|
||||
height: calc(100% - 410rpx);
|
||||
border-radius: 16rpx;
|
||||
top: -60rpx;
|
||||
z-index: 9;
|
||||
padding: 64rpx 28rpx;
|
||||
background: linear-gradient( -45deg, #DDEAFC 0%, #FFFFFF 100%);
|
||||
border-radius: 32rpx 32rpx 0rpx 0rpx;
|
||||
overflow-y: auto;
|
||||
.title{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
margin-bottom: 22rpx;
|
||||
.tip{
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
.cell{
|
||||
align-items: center;
|
||||
background: linear-gradient( 90deg, #FFF4E0 0%, #FFFBF5 100%);
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
margin-bottom: 32rpx;
|
||||
padding: 32rpx 28rpx;
|
||||
.cell_left{
|
||||
flex-direction: row;
|
||||
.cell_icon{
|
||||
width: 84rpx!important;
|
||||
height: 84rpx!important;
|
||||
margin-right: 30rpx;
|
||||
border-radius: 4rpx!important;
|
||||
}
|
||||
.cell_title{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 12rpx;
|
||||
color: #333;
|
||||
.title{
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.tip{
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.cell_right{
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
margin-left: 20rpx;
|
||||
.btn{
|
||||
width: 148rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
text-align: center;
|
||||
background: #6DA9F7;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
border: 2rpx solid transparent;
|
||||
}
|
||||
|
||||
.opt{
|
||||
color: #D39B7E;
|
||||
background-color: #FBF3EB;
|
||||
}
|
||||
.disabled{
|
||||
color: #999999;
|
||||
background-color: #E2E2E2;
|
||||
}
|
||||
.receive{
|
||||
background: rgba(178,223,255,0.62);
|
||||
border: 2rpx solid #6DA9F7;
|
||||
color: #6DA9F7;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.cell:last-child{
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 284 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.0 MiB |
Loading…
Reference in New Issue