Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
tjty-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王永飞
tjty-app
Commits
44c66293
Commit
44c66293
authored
Nov 28, 2022
by
王永阿飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
ssh://gitlab.91isoft.com:10022/wyf/tjty-app
parents
d98a9156
a67de785
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
24 deletions
+30
-24
tjty_vote_channel.vue
tjty-app/pages_vote/tjty_vote_channel/tjty_vote_channel.vue
+22
-13
tjty_vote_detail.vue
tjty-app/pages_vote/tjty_vote_detail/tjty_vote_detail.vue
+8
-11
No files found.
tjty-app/pages_vote/tjty_vote_channel/tjty_vote_channel.vue
View file @
44c66293
...
...
@@ -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
...
...
tjty-app/pages_vote/tjty_vote_detail/tjty_vote_detail.vue
View file @
44c66293
<
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
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment