Commit 69196163 authored by LiZongLin's avatar LiZongLin

Merge branch 'dev' of http://gitlab.91isoft.com:90/wyf/tjty-app into dev

parents 46fe7575 a0679e6a
......@@ -14,14 +14,14 @@
<view class="font-body">
<!-- // type 1--赛事活动 2-答题活动 signupNum--赛事活动人数 signupExamNum--答题活动人数 -->
<view class="activity_title">
<view style="padding: 2% 4%;">{{item.activityName |ellipsis}}</view>
<view style="padding: 2% 4%;white-space:pre-wrap">{{item.activityName |ellipsis}}</view>
</view>
<view style="margin-top: -70rpx;">
<view class="activity_font"> <text
style="padding-top: -1rpx;">报名截止:&nbsp;&nbsp;{{!item.signupTime ? '—' : item.signupTime}}</text>
</view>
<view class="activity_font">
<text>组织机构:&nbsp;&nbsp;{{item.mechanismName |ellipsisInstitutions}}</text></view>
<text style="white-space:pre-wrap">组织机构:&nbsp;&nbsp;{{item.mechanismName |ellipsisInstitutions}}</text></view>
<view class="activity_font" style="padding-bottom:10rpx;"> <text>已报名:&nbsp;&nbsp;<text
style="color: #FCA624; margin-left: 12rpx;">
<text v-if="item.type ==='1'">{{item.signupNum}}</text>
......@@ -89,11 +89,6 @@
this.login()
// this.getList()
},
created() {
// uni.setStorageSync("title", '赛事活动')
// this.getList()
// this.getList()
},
onShow() {
console.log('onShow')
this.getList()
......
......@@ -74,7 +74,8 @@ import {
errorMessage: '请输入姓名',
}, {
validateFunction: function(rule, value, data, callback) {
let nameReg = /^[A-z]{2,16}$|^[\u4E00-\u9FA5]{2,16}$/
// let nameReg = /^[A-z]{2,16}$|^[\u4E00-\u9FA5]{2,16}$/
let nameReg = /^[A-z | \u4E00-\u9FA5]{2,16}$/
if (!nameReg.test(value)) {
callback('姓名只能输入汉字或字母且长度为2-16')
}
......
......@@ -10,7 +10,7 @@
<view class="signIn-body"><text>项目:<text style="display: block;float: right;margin-right: 20rpx;">{{item.projectName}}</text></text></view>
<view class="signIn-body"><text>费用:<text style="display: block;float: right;margin-right: 20rpx; color: #F28723;">{{item.projectFee}}/人</text></text></view>
<view class="signIn-body" v-if="item.projectFee!==0"><text>缴费方式:<text style="display: block;float: right;margin-right: 20rpx;">微信支付</text></text></view>
<view class="signIn-body" v-if="item.projectFee!==0"><text>缴费时间:<text style="display: block;float: right;margin-right: 20rpx;" >{{item.transactionTime}}</text></text></view>
<view class="signIn-body" v-if="item.projectFee!==0"><text>缴费时间:<text style="display: block;float: right;margin-right: 20rpx;" >{{item.transactionTime===null?'未缴费':item.transactionTime}}</text></text></view>
</view>
</view>
</view>
......
......@@ -19,9 +19,9 @@
<view class="production-bottom">
<view class="production-content" v-for="(productionItem,productionIndex) in productionList"
:key="productionIndex">
<image v-if="opusType == 1" :src="productionItem.tjtActivityPictureList[0].url" mode=""></image>
<image v-if="opusType == '1'" :src="productionItem.tjtActivityPictureList[0].url" mode=""></image>
<video v-if=" opusType == 2" id="myVideo" class="video" :controls="false" :show-center-play-btn="false"
<video v-if="opusType == '2'" id="myVideo" class="video" :controls="false" :show-center-play-btn="false"
:show-fullscreen-btn="false" :src="productionItem.tjtActivityPictureList[0].url"
@timeupdate='timeupdate'></video>
......@@ -49,14 +49,15 @@
data() {
return {
// 活动作品形式(1--图片, 2--视频)
opusType: 2,
opusType: '1',
//活动id
projectIdMoment: '',
activity: {
activityId: '',
activityName: '',
bannerImage: ''
bannerImage: '',
},
// 点击投票时的数据
voteObject: {
......@@ -127,17 +128,25 @@
this.activity.activityId = res.data[0].activityId
this.activity.activityName = res.data[0].activityName
this.activity.bannerImage = res.data[0].bannerImage
this.opusType = res.data[0].fileType
this.projectList = res.data[0].tjtActivityProjectVoList
this.productionList = this.projectList[0].tjtActivityOpusVoList
console.log("投票通道获取内容----?", this.productionList)
//获取最后一个.的位置
var index = this.productionList[0].tjtActivityPictureList[0].url.lastIndexOf(".");
//获取后缀
var ext = this.productionList[0].tjtActivityPictureList[0].url.substr(index + 1);
if (ext != 'mp4') {
this.opusType = 1
} else {
this.opusType = 2
}
// for(let item in this.productionList){
// if(!this.productionList[item].tjtActivityPictureList[0].url){
// var index = this.productionList[item].tjtActivityPictureList[0].url.lastIndexOf(".");
// //获取后缀
// var ext = this.productionList[item].tjtActivityPictureList[0].url.substr(index + 1);
// if (ext != 'mp4') {
// this.opusType = 1
// } else {
// this.opusType = 2
// }
// return
// }
// }
this.projectIdMoment = this.projectList[0].projectId
} else {
......@@ -164,7 +173,7 @@
// 跳转对应的详情页
toVoteDetail(item) {
console.log("跳转放到投票详情页面---", item)
this.voteObject.activityId = this.activity.activityId
this.voteObject.opusType = this.opusType
// 将当前项目下的项目id传给voteObject
......
<template>
<view>
<view class="production-content">
<swiper v-if="opusType == 1" class="swiper-home" indicator-dots="true" autoplay="true" interval="2000"
<swiper v-if="opusType == '1'" class="swiper-home" indicator-dots="true" autoplay="true" interval="2000"
circular="true" indicator-color="#000" indicator-active-color="#FF0000">
<swiper-item v-for="(item,index) in bannerList" :key="index">
<image :src="item.url" :webp="true" @click="clickImg(item.url)"></image>
</swiper-item>
</swiper>
<video v-if=" opusType == 2" id="myVideo" class="video" show-fullscreen-btn :src="bannerList[0].url" :controls="true"
:show-mute-btn="true" direction="0"></video>
<video v-if=" opusType == '2'" id="myVideo" class="video" show-fullscreen-btn :src="bannerList[0].url"
:controls="true" :show-mute-btn="true" direction="0"></video>
<view class="vote-main">
<text class="production-name">{{name}}的作品</text>
<text class="vote-message">
......@@ -43,7 +42,7 @@
productionId: '',
bannerList: [],
opusBrief: '',
weChatId: 1,
weChatId: '',
opusType: 1,
opusId: ''
}
......@@ -100,7 +99,9 @@
})
}
},
computed: {
...mapState('m_user', ['userInfo']),
},
onLoad(option) { //option为object类型,会序列化上个页面传递的参数
if (option) {
if (option.param) {
......@@ -114,12 +115,8 @@
this.opusBrief = JSON.parse(decodeURIComponent(option.param)).opusBrief
this.opusType = JSON.parse(decodeURIComponent(option.param)).opusType
this.opusId = JSON.parse(decodeURIComponent(option.param)).productionId
console.log("作品id:", this.opusId)
console.log("作品id:", this.bannerList)
}
this.weChatId = this.userInfo.wechatId
}
}
}
......
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