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
ee329591
Commit
ee329591
authored
Mar 11, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改东西
parent
5110e599
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
142 additions
and
15 deletions
+142
-15
friendcircle.vue
pages/friendcircle/friendcircle.vue
+27
-1
my-news.vue
pages/friendcircle/my-news.vue
+33
-11
release.vue
pages/friendcircle/release.vue
+82
-3
No files found.
pages/friendcircle/friendcircle.vue
View file @
ee329591
...
...
@@ -221,10 +221,29 @@
background
:
#C92B2B
;
border-radius
:
8px
;
}
.fbanniu
{
width
:
42px
;
height
:
42px
;
border-radius
:
21px
;
position
:
fixed
;
right
:
20
rpx
;
bottom
:
140
rpx
;
background
:
#40766E
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
z-index
:
99
;
}
</
style
>
<
template
>
<div
class=
'friendcircle'
>
<!-- 发布动态按钮 -->
<view
class=
"fbanniu"
@
click=
"btnclick"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/fabupyq.png"
style=
"height: 26rpx;"
mode=
"aspectFit"
></image>
<text
style=
"font-size: 10px;color: #FFF;"
>
发布
</text>
</view>
<view
class=
"mynews-top"
v-if=
"Messagecount>0"
>
<view
class=
"top-box"
@
click=
"gomymessage()"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/wodehufong.png"
mode=
"widthFix"
style=
"width: 16px;height: auto;"
></image>
...
...
@@ -788,7 +807,14 @@
this
.
videoContext
.
play
()
this
.
controls
=
true
}
}
},
btnclick
(
item
)
{
//跳入发布
uni
.
navigateTo
({
url
:
'/pages/friendcircle/release'
})
innerAudioContext
.
stop
();
},
}
}
</
script
>
pages/friendcircle/my-news.vue
View file @
ee329591
...
...
@@ -131,14 +131,32 @@
top
:
-5px
;
background
:
#C92B2B
;
border-radius
:
8px
;
}
.fbanniu
{
width
:
42px
;
height
:
42px
;
border-radius
:
21px
;
position
:
fixed
;
right
:
20
rpx
;
bottom
:
80
rpx
;
background
:
#40766E
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
z-index
:
99
}
</
style
>
<
template
>
<div
class=
'mynews'
>
<!-- 发布动态按钮 -->
<floatbutton
:list=
'list'
openIcon=
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/fabupyq.png'
background=
'#40766E'
openText=
'发布'
bottom=
'80'
@
click=
'btnclick'
></floatbutton>
<!-- 发布动态按钮 -->
<view
class=
"fbanniu"
@
click=
"btnclick"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/fabupyq.png"
style=
"height: 26rpx;"
mode=
"aspectFit"
></image>
<text
style=
"font-size: 10px;color: #FFF;"
>
发布
</text>
</view>
<!--
<floatbutton
:list=
'list'
openIcon=
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/fabupyq.png'
background=
'#40766E'
openText=
'发布'
bottom=
'80'
@
click=
'btnclick'
></floatbutton>
-->
<u-empty
v-if=
"g.length == 0"
text=
"暂无动态"
mode=
"list"
></u-empty>
<view
v-if=
"g.length > 0"
:style=
"
{'width':'100vw','overflow':'hidden','margin-top':Messagecount>0?'60px':'0','height':Messagecount>0?calc('100vh-60px'):'100vh'}">
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
:style=
"
{ height: '100%' }">
...
...
@@ -344,14 +362,18 @@
},
btnclick
(
item
)
{
if
(
item
.
type
==
2
)
{
this
.
upvideo
()
}
else
{
uni
.
navigateTo
({
url
:
'/pages/friendcircle/release?type='
+
item
.
type
})
innerAudioContext
.
stop
();
}
// if (item.type == 2) {
// this.upvideo()
// } else {
// uni.navigateTo({
// url: '/pages/friendcircle/release?type=' + item.type
// })
// innerAudioContext.stop();
// }
uni
.
navigateTo
({
url
:
'/pages/friendcircle/release'
})
innerAudioContext
.
stop
();
},
upvideo
()
{
...
...
pages/friendcircle/release.vue
View file @
ee329591
...
...
@@ -163,6 +163,16 @@
<textarea
placeholder=
"今天有什么可以给大家分享呢?"
style=
"width: 100%;height: 100px;"
maxlength=
'-1'
confirm-type=
'done'
v-model=
"addMsg.Content"
>
</textarea>
<u-radio-group
v-model=
"addMsg.FileType"
style=
'margin-top: 20px;'
>
<u-radio
@
change=
"releaseChange"
v-for=
"(item, index) in list2"
:key=
"index"
:name=
"item.id"
>
{{
item
.
name
}}
</u-radio>
</u-radio-group>
<text
v-if=
'addMsg.FileType==1 '
style=
"font-size: 12px;color: #333333"
>
上传图片
<span
style=
'color: ;#A9A9A9'
>
(图片无上限)
</span>
</text>
<text
v-if=
' addMsg.FileType==2'
style=
"font-size: 12px;color: #333333"
>
上传视频
</text>
<view
style=
"width: 100%;margin-top: 15px;"
>
...
...
@@ -178,7 +188,7 @@
<!-- 视频 -->
<view
style=
"width: 100%;margin-top: 15px;display: flex;flex-direction: row;"
v-if=
"addMsg.FileType==2"
>
<view
style=
"width: 150px; height: 200px;position: relative;margin-right: 20px;"
>
<view
style=
"width: 150px; height: 200px;position: relative;margin-right: 20px;"
v-if=
"addMsg.FileList.length>0"
>
<video
id=
"myVideo"
:src=
"addMsg.FileList[0]"
:controls=
'controls'
:show-center-play-btn=
'false'
...
...
@@ -189,6 +199,12 @@
<u-icon
name=
"play-circle-o"
:size=
"70"
color=
"#FFF"
></u-icon>
</view>
</view>
<view
v-if=
"addMsg.FileList.length==0"
>
<view
slot=
"addBtn"
class=
"slot-btn"
@
click=
"upvideo()"
>
<u-icon
name=
"photograph"
size=
"40"
color=
"#888"
></u-icon>
<view
class=
"mian-title"
>
上传视频
</view>
</view>
</view>
</view>
...
...
@@ -296,7 +312,17 @@
FileList
:
[],
FileType
:
0
,
},
fileList
:[],
fileList
:[],
list2
:
[
{
name
:
'文字'
,
id
:
0
},
{
name
:
'图文'
,
id
:
1
},
{
name
:
'视频'
,
id
:
2
},
{
name
:
'音频'
,
id
:
3
},
],
value
:
'orange'
,
list
:
[{
'name'
:
'全部可见'
,
Id
:
1
...
...
@@ -407,6 +433,10 @@
}
);
},
releaseChange
(
e
){
//发布的类型
console
.
log
(
e
)
this
.
addMsg
.
FileList
=
[]
},
//打开地图
getAddress
()
{
let
that
=
this
;
...
...
@@ -712,7 +742,56 @@
this
.
videoContext
.
play
()
this
.
controls
=
true
}
}
},
upvideo
()
{
let
that
=
this
uni
.
chooseVideo
({
count
:
1
,
sourceType
:
[
'camera'
,
'album'
],
success
:
function
(
res
)
{
console
.
log
(
res
)
that
.
upFile
(
res
.
tempFilePath
,
1
)
uni
.
showLoading
({
title
:
'上传中...'
})
},
fail
(
err
)
{
console
.
log
(
err
,
)
}
});
},
upFile
(
filePath
,
type
)
{
let
MallBaseId
=
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
:
1
;
let
action
=
this
.
host2
+
'/api/File/UploadTencent?MallBaseId='
+
MallBaseId
let
that
=
this
uni
.
uploadFile
({
url
:
action
,
filePath
:
filePath
,
name
:
'file'
,
formData
:
{
user
:
'tesdt'
},
success
:
(
uploadFileRes
)
=>
{
uni
.
hideLoading
()
if
(
uploadFileRes
.
statusCode
==
200
)
{
let
data
=
JSON
.
parse
(
uploadFileRes
.
data
)
that
.
addMsg
.
FileList
.
push
(
data
.
data
)
}
},
fail
:
function
(
res
)
{
console
.
log
(
res
)
wx
.
showToast
({
title
:
'上传失败!'
,
icon
:
'none'
,
duration
:
1000
})
}
});
},
}
}
...
...
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