隐藏拼团和任务入口正式环境
This commit is contained in:
@@ -30,10 +30,10 @@
|
||||
</view>
|
||||
<view class="avatars">
|
||||
<block>
|
||||
<image v-for="(item,index) in users" :key='index+1' :class="['avatar',item.master?'pin':''] " :src="item" mode="aspectFill" />
|
||||
<image v-for="(item,index) in users" :key='"avatar"+index+1' :class="['avatar',item.master?'pin':''] " :src="item" mode="aspectFill" />
|
||||
</block>
|
||||
<block v-if="collage.surplus>0">
|
||||
<image v-for="(item,index) in collage.surplus" :key='index+2' class="wen" src="/static/book/wen.png" mode="aspectFill" />
|
||||
<image v-for="(item,index) in collage.surplus" :key='"surplus"+index+2' class="wen" src="/static/book/wen.png" mode="aspectFill" />
|
||||
</block>
|
||||
</view>
|
||||
<view class="title" v-if="collage.sale>0">已拼<span>{{collage.sale}}</span>人</view>
|
||||
@@ -107,6 +107,7 @@
|
||||
methods: {
|
||||
getInfo(){
|
||||
myPinDetail(this.$Route.query.id).then(res => {
|
||||
console.log(res)
|
||||
this.orderDetail = res.order_detail;
|
||||
this.goods = res.item;
|
||||
let collage = res.collage;
|
||||
|
||||
@@ -79,8 +79,8 @@
|
||||
<image src="../../static/img/house_back.jpg" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="life-flex-item both">
|
||||
<view class="both-item team" @click="onNav({name: 'Mission'}, '')">
|
||||
<!-- <view class="both-item team" @click="onToast('努力开发中~')"> -->
|
||||
<!-- <view class="both-item team" @click="onNav({name: 'Mission'}, '')"> -->
|
||||
<view class="both-item team" @click="onToast('正在努力开发中,耐心等待~')">
|
||||
<view class="team-content">
|
||||
<view class="team-title">奖励任务</view>
|
||||
<view class="team-subtitle">完成任务可获DT积分/奖励</view>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<view class="des"> 已领DT积分 </view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="count-item" @click="onTab('GetGoods')">
|
||||
<view class="count-item" @click="onTab('GetGoods')">
|
||||
<view class="number">123 </view>
|
||||
<view class="des"> 已领商品 </view>
|
||||
</view>
|
||||
@@ -23,28 +23,31 @@
|
||||
</view>
|
||||
|
||||
<!-- 看视频 得积分 -->
|
||||
<view class="list-content">
|
||||
<view class="list-content" v-if="videos.length>0">
|
||||
<view class="title">
|
||||
<image class="bind" src="/static/mission/icon-right.png" mode="widthFix" />
|
||||
<view class="name">看视频得积分</view>
|
||||
<view class="name">看视频得奖励</view>
|
||||
<image class="bind" src="/static/mission/icon-left.png" mode="widthFix" />
|
||||
<view class="right-title" @click="change('0')">
|
||||
<view class="right-title" @click="change('1')">
|
||||
<image :class="['change',canRotate0?'rotateChange':'']" src="/static/mission/change.png"
|
||||
mode="widthFix" />
|
||||
换一换
|
||||
</view>
|
||||
</view>
|
||||
<block v-if="videos.length>0">
|
||||
<view class="list" v-for="item in videos" :key="item">
|
||||
<block>
|
||||
<view class="list" v-for="item in videos" :key="item.task_id">
|
||||
<image class='icon' src="/static/mission/video.png" mode="widthFix" />
|
||||
<view class="list-item">
|
||||
<view class="list-item-left">
|
||||
<view class="item-title">看视频<span>+100</span></view>
|
||||
<view class="item-des"> 观看2分钟视频可得15DT积分,一天封顶150DT积分</view>
|
||||
<view class="item-title">{{item.title}}<span
|
||||
v-if="item.gift_type && item.gift_type.code == 2">+{{item.attach_gift.price}}</span>
|
||||
</view>
|
||||
<view class="item-des"> {{item.description}}</view>
|
||||
</view>
|
||||
<view class="list-item-right">
|
||||
<view class="btn">去观看</view>
|
||||
<view class="count">(0/10)</view>
|
||||
<view class="btn" @click="goPlay(item.task_id)">去观看</view>
|
||||
<view class="count" v-if="item.type && item.type.code == 1 ">
|
||||
({{item.me.number}}/{{item.attach_type.num}})</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -57,13 +60,13 @@
|
||||
<image class="bind" src="/static/mission/icon-right.png" mode="widthFix" />
|
||||
<view class="name">做任务得积分</view>
|
||||
<image class="bind" src="/static/mission/icon-left.png" mode="widthFix" />
|
||||
<view class="right-title" @click="change('1')">
|
||||
<view class="right-title" @click="change('2')">
|
||||
<image :class="['change',canRotate1?'rotateChange':'']" src="/static/mission/change.png"
|
||||
mode="widthFix" /> 换一换
|
||||
</view>
|
||||
</view>
|
||||
<block v-if="missions.length>0">
|
||||
<view class="list" v-for="item in missions" :key="item">
|
||||
<view class="list" v-for="item in missions" :key="item.task_id">
|
||||
<image class='icon' src="/static/mission/mission.png" mode="widthFix" />
|
||||
<view class="list-item">
|
||||
<view class="list-item-left">
|
||||
@@ -78,28 +81,87 @@
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
list
|
||||
} from '@/apis/interfaces/mission.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
videos: [1, 2, 3],
|
||||
videoPage: 1,
|
||||
videoHasMore: true,
|
||||
missions: [1, 2, 3],
|
||||
missionsPage: 1,
|
||||
missionsHasMore: true,
|
||||
canRotate0: false,
|
||||
canRotate1: false,
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getVideoList(1)
|
||||
},
|
||||
methods: {
|
||||
|
||||
goPlay(id) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/mission/videoPlay/videoPlay?id=' + id,
|
||||
})
|
||||
},
|
||||
getVideoList(type) {
|
||||
let data = {
|
||||
page: type == 1 ? this.videoPage : this.missionsPage,
|
||||
type: type,
|
||||
}
|
||||
list(data).then(res => {
|
||||
console.log(res)
|
||||
if (type == 1) {
|
||||
if (this.videoPage == 1) {
|
||||
this.videos = [];
|
||||
}
|
||||
this.videoHasMore = res.page.has_more;
|
||||
this.videos = res.data
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == 2) {
|
||||
if (this.videoPage == 1) {
|
||||
this.videos = [];
|
||||
}
|
||||
this.missionsHasMore = res.page.has_more;
|
||||
this.missions = res.data
|
||||
return;
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none',
|
||||
mask: true,
|
||||
duration: 2000,
|
||||
})
|
||||
})
|
||||
},
|
||||
change(num) {
|
||||
switch (num) {
|
||||
case '0':
|
||||
this.canRotate0 = true;
|
||||
break;
|
||||
case '1':
|
||||
this.canRotate1 = true;
|
||||
this.canRotate0 = true;
|
||||
if (this.videoHasMore) {
|
||||
this.videoPage = this.videoPage + 1;
|
||||
} else {
|
||||
this.videoPage = 1;
|
||||
}
|
||||
this.getVideoList(1);
|
||||
break;
|
||||
case '2':
|
||||
// if(this.videoHasMore){
|
||||
// this.videoPage = this.videoPage + 1;
|
||||
// }else{
|
||||
// this.videoPage = 1;
|
||||
// }
|
||||
break;
|
||||
}
|
||||
this.close();
|
||||
@@ -109,12 +171,12 @@
|
||||
this.canRotate0 = false;
|
||||
this.canRotate1 = false;
|
||||
}, 3000)
|
||||
},
|
||||
// 跳转已领取的 dt 积分和商品
|
||||
onTab(it){
|
||||
this.$Router.push({
|
||||
name:it
|
||||
})
|
||||
},
|
||||
// 跳转已领取的 dt 积分和商品
|
||||
onTab(it) {
|
||||
this.$Router.push({
|
||||
name: it
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -263,9 +325,9 @@
|
||||
|
||||
|
||||
.name {
|
||||
padding:$padding $padding - 10;
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
padding: $padding $padding - 10;
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
color: #454545;
|
||||
}
|
||||
}
|
||||
|
||||
71
pages/mission/videoPlay/videoPlay.vue
Normal file
71
pages/mission/videoPlay/videoPlay.vue
Normal file
@@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<view class="videoContainer">
|
||||
<!-- @timeupdate='timeupdate' -->
|
||||
<video v-if="src!=''" class="video" :controls='false' :src="src" autoplay loop direction='0' :muted='muted' />
|
||||
<cover-view class="currentDown">倒计时</cover-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getVideoUrl
|
||||
} from '@/apis/interfaces/mission.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// url: this.$route.query.url,
|
||||
src: '',
|
||||
muted: false, // 静音播放
|
||||
duration: 0,
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
getVideoUrl(e.id).then(res => {
|
||||
this.src = res
|
||||
}).catch(res => {
|
||||
uni.showModal({
|
||||
title: '视频播放出错',
|
||||
confirmText: '立即返回',
|
||||
showCancel: false,
|
||||
success: (res) => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// timeupdate(e){
|
||||
// this.duration = e.detail.duration - e.detail.currentTime - 4
|
||||
// if(this.duration == 0){
|
||||
// uni.navigateBack()
|
||||
// }
|
||||
// }
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.videoContainer {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: pink;
|
||||
position: relative;
|
||||
@extend .ios-top;
|
||||
|
||||
.video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.currentDown {
|
||||
position: fixed;
|
||||
z-index: 2;
|
||||
right: $margin;
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -28,9 +28,9 @@
|
||||
</u-scroll-list>
|
||||
|
||||
<!-- 拼团广告图 -->
|
||||
<view class="collage" v-if="collage_banner!=''">
|
||||
<!-- <view class="collage" v-if="collage_banner!=''">
|
||||
<image @click="goCollage" :src="collage_banner" mode="widthFix" />
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 每日上新 -->
|
||||
<view class="new-box">
|
||||
|
||||
@@ -380,7 +380,7 @@
|
||||
this.hasPassword = res.has_transfer_password;
|
||||
this.messages = Number(res.messages);
|
||||
this.wbtAccount = res.wbt_account;
|
||||
this.collage_switch = res.collage_switch
|
||||
this.collage_switch = res.collage_switch;
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
|
||||
Reference in New Issue
Block a user