Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
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
viitto
mallapp
Commits
278bb7ae
Commit
278bb7ae
authored
Jun 24, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
ce9f1689
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
261 additions
and
0 deletions
+261
-0
picDetail.vue
pages/school/picDetail.vue
+143
-0
share-select-school.vue
pages/share-qrcode/share-select-school.vue
+118
-0
No files found.
pages/school/picDetail.vue
0 → 100644
View file @
278bb7ae
<
template
>
<view
class=
"box"
>
<view
class=
"nodata"
v-if=
"dataList.length===0"
>
暂无内容
</view>
<view
v-for=
"(item,index) in dataList"
:key=
"index"
class=
"img-box"
style=
"position: relative;"
v-if=
"dataList.length>0"
>
<image
:src=
"item.Path"
mode=
"aspectFill"
class=
"img"
v-if=
"item.Type==1"
@
click=
"previewImage"
></image>
<video
:id=
"item.Id"
:src=
"item.Path"
style=
"width: 200rpx;height: 200rpx;"
:controls=
'controls'
:show-center-play-btn=
'false'
:show-fullscreen-btn=
'false'
@
fullscreenchange=
'videoControl'
object-fit =
'fill'
v-if=
"item.Type==2"
@
click=
"enlarge(item.Name)"
></video>
<view
style=
"position: absolute;left: 50%;top: 50%;margin-top: -49rpx;margin-left: -49rpx;width: 98rpx;height: 98rpx;border-radius: 20rpx;background-color: rgba(255,255,255,.4);display: flex;align-items: center;justify-content: center;"
v-if=
"item.Type==2"
>
<!-- 播放按钮 -->
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616471847000_345.png"
style=
"width: 37rpx;height: 44rpx;"
mode=
""
></image>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
id
:
0
,
boxOption
:
0
,
navsOption
:
0
,
titleStyle
:
{},
active
:
0
,
mainColor
:
''
,
likeStatus
:
false
,
controls
:
false
,
//显示默认控件
dataList
:[],
preImg
:[],
videoContext
:
null
}
},
onLoad
(
options
)
{
uni
.
setNavigationBarTitle
({
title
:
'相册详情'
});
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
if
(
options
.
data
){
let
res
=
JSON
.
parse
(
decodeURIComponent
(
options
.
data
))
this
.
dataList
=
res
.
data
this
.
dataList
.
map
(
e
=>
{
this
.
preImg
.
push
(
e
.
Path
)
})
console
.
log
(
this
.
dataList
)
}
},
methods
:
{
previewImage
(
i
)
{
console
.
log
(
i
)
uni
.
previewImage
({
urls
:
this
.
preImg
,
current
:
i
,
longPressActions
:
{
itemList
:
[
"发送给朋友"
,
"保存图片"
,
"收藏"
],
success
:
function
(
data
)
{},
fail
:
function
(
err
)
{
console
.
log
(
err
.
errMsg
);
},
},
});
},
scroll
(
e
)
{
this
.
boxOption
=
Math
.
floor
((
e
.
detail
.
scrollTop
-
50
)
/
1.5
);
this
.
titleStyle
.
opacity
=
((
e
.
detail
.
scrollTop
-
100
)
<
0
?
0
:
Math
.
floor
(
e
.
detail
.
scrollTop
-
100
))
+
"%"
this
.
$forceUpdate
()
},
goback
()
{
uni
.
navigateBack
({
delta
:
1
,
});
},
enlarge
(
file
)
{
// 全屏
this
.
videoContext
=
uni
.
createVideoContext
(
file
);
this
.
videoContext
.
requestFullScreen
({
direction
:
0
})
console
.
log
(
this
.
videoContext
)
},
videoControl
(
e
){
if
(
e
.
detail
.
fullScreen
==
false
){
this
.
videoContext
.
stop
()
this
.
controls
=
false
}
else
{
this
.
videoContext
.
play
()
this
.
controls
=
true
}
},
},
mounted
()
{
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.box
{
margin
:
30rpx
;
display
:
flex
;
flex-wrap
:
wrap
;
&
.img-box
:nth-child
(
3n
)
{
margin-right
:
0rpx
!
important
;
background-color
:
#000000
;
}
.img-box
{
width
:
200rpx
;
height
:
200rpx
;
border-radius
:
12rpx
;
bottom
:
10px
;
margin-right
:
10px
;
margin-bottom
:
10px
;
border
:
1rpx
solid
#EEEEEE
;
}
.img
{
width
:
200rpx
;
height
:
200rpx
;
border-radius
:
12rpx
;
}
}
.nodata
{
width
:
100%
;
text-align
:center
;
}
</
style
>
pages/share-qrcode/share-select-school.vue
0 → 100644
View file @
278bb7ae
<
template
>
<view
class=
"school-company"
>
<view
class=
"no-data"
v-if=
"schoolCompanyList.length===0"
>
暂无数据
</view>
<view
class=
"u-radio-box"
v-if=
"schoolCompanyList.length!==0"
>
<view
v-for=
"(item, index) in schoolCompanyList"
:key=
"item.Id"
class=
"radio-item"
@
click=
"goUrl(1,item.Id)"
>
<view
class=
"radio-item-imgbox"
>
<image
:src=
"item.CoverPhoto"
mode=
"aspectFit"
></image>
</view>
<view
class=
"radio-item-name"
>
{{
item
.
ShoolName
}}
</view>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
schoolCompanyList
:
[],
mainColor
:
""
,
}
},
created
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
uni
.
setNavigationBarTitle
({
title
:
'选择学校'
});
},
mounted
()
{
this
.
getSchoolCompanyList
();
},
methods
:
{
getSchoolCompanyList
()
{
this
.
request2
({
url
:
'/api/AppletEducation/GetEduSchool'
,
data
:
{}
},
(
res
)
=>
{
if
(
res
.
resultCode
===
1
)
{
this
.
schoolCompanyList
=
res
.
data
if
(
this
.
schoolCompanyList
.
length
===
0
){
this
.
goUrl
(
1
,
0
)
}
}
}
);
},
goUrl
(
type
=
1
,
id
)
{
uni
.
navigateTo
({
url
:
'/pages/share-qrcode/share-qrcode'
+
'?type='
+
type
+
'&schoolId='
+
id
});
},
}
}
</
script
>
<
style
scoped
>
.school-company
{
padding
:
30
rpx
;
background-color
:
#FFFFFF
;
}
.u-radio-box
{
display
:
flex
;
flex-direction
:
row
;
flex-wrap
:
wrap
;
justify-content
:
space-between
;
}
.radio-item
{
width
:
300
rpx
;
/* height: 300rpx; */
border-radius
:
8
rpx
;
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
center
;
margin-bottom
:
30
rpx
;
box-shadow
:
0px
4px
4px
0px
#999999
;
}
.radio-item-name
{
/* white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis; */
font-size
:
26
rpx
;
color
:
#07090D
;
padding
:
10
rpx
;
background-color
:
#FFFFFF
;
}
.radio-item-imgbox
{
width
:
100%
;
height
:
144
rpx
;
overflow
:
hidden
;
background-color
:
#f3f4f6
;
/* box-shadow: 0px 4px 40px 0px rgba(2, 144, 66, 0.1); */
}
.radio-item-imgbox
image
{
width
:
100%
;
height
:
100%
;
}
.no-data
{
font-size
:
26
rpx
;
color
:
#07090D
;
text-align
:
center
;
}
</
style
>
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