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
9b056455
Commit
9b056455
authored
Mar 12, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
朋友圈修改
parent
ee329591
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
656 additions
and
56 deletions
+656
-56
pages.json
pages.json
+2
-0
jin-edit.vue
pages/blindDate/components/jin-edit.vue
+335
-0
jin-icons.vue
pages/blindDate/components/jin-icons.vue
+48
-0
postDetails.vue
pages/blindDate/postDetails.vue
+10
-5
postPublishing.vue
pages/blindDate/postPublishing.vue
+23
-8
richText.vue
pages/blindDate/richText.vue
+70
-0
friendcircle.vue
pages/friendcircle/friendcircle.vue
+36
-18
mydetails.vue
pages/friendcircle/mydetails.vue
+6
-2
release.vue
pages/friendcircle/release.vue
+126
-23
No files found.
pages.json
View file @
9b056455
...
...
@@ -578,6 +578,8 @@
"path"
:
"baomingList"
//招募贴查看报名列表
},{
"path"
:
"personal/myrecruitstick"
//我的招募贴
},{
"path"
:
"richText"
//富文本编辑页面
}]
},
//韩国馆项目
{
"root"
:
"pages/kotra"
,
"pages"
:
[{
"path"
:
"contanctus"
},{
"path"
:
"contanctDetail"
},{
"path"
:
"compInformation"
},{
...
...
pages/blindDate/components/jin-edit.vue
0 → 100644
View file @
9b056455
<
template
>
<view
class=
"container"
:style=
"
{
paddingBottom: showMoreTool ? '220rpx' : '120rpx'
}">
<editor
class=
"ql-container"
:placeholder=
"placeholder"
:show-img-size=
"true"
:show-img-toolbar=
"true"
:show-img-resize=
"true"
@
ready=
"onEditorReady"
id=
"editor"
@
statuschange=
"statuschange"
@
focus=
"editFocus"
@
blur=
"editBlur"
ref=
"editot"
></editor>
<!-- 操作工具 -->
<view
class=
"tool-view"
>
<view
class=
"tool"
>
<jinIcon
class=
"single"
type=
""
font-size=
"44rpx"
title=
"插入图片"
@
click=
"insertImage"
></jinIcon>
<jinIcon
class=
"single"
type=
""
font-size=
"44rpx"
title=
"修改文字样式"
@
click=
"showMore"
:color=
"showMoreTool ? activeColor : '#666666'"
></jinIcon>
<jinIcon
class=
"single"
type=
""
font-size=
"44rpx"
title=
"分割线"
@
click=
"insertDivider"
></jinIcon>
<jinIcon
class=
"single"
type=
""
font-size=
"44rpx"
title=
"撤销"
@
click=
"undo"
></jinIcon>
<jinIcon
class=
"single"
type=
""
font-size=
"44rpx"
title=
"重做"
@
click=
"redo"
></jinIcon>
<jinIcon
class=
"single"
type=
""
font-size=
"44rpx"
title=
"设置"
@
click=
"release"
></jinIcon>
</view>
<!-- 文字相关操作 -->
<view
class=
"font-more"
:style=
"
{ height: showMoreTool ? '100rpx' : 0 }">
<jinIcon
class=
"single"
type=
""
font-size=
"44rpx"
title=
"加粗"
@
click=
"setBold"
:color=
"showBold ? activeColor : '#666666'"
></jinIcon>
<jinIcon
class=
"single"
type=
""
font-size=
"44rpx"
title=
"斜体"
@
click=
"setItalic"
:color=
"showItalic ? activeColor : '#666666'"
></jinIcon>
<jinIcon
class=
"single"
type=
""
font-size=
"44rpx"
title=
"分割线"
@
click=
"setIns"
:color=
"showIns ? activeColor : '#666666'"
></jinIcon>
<jinIcon
class=
"single"
type=
""
font-size=
"44rpx"
title=
"标题"
@
click=
"setHeader"
:color=
"showHeader ? activeColor : '#666666'"
></jinIcon>
<jinIcon
class=
"single"
type=
""
font-size=
"44rpx"
title=
"居中"
@
click=
"setCenter"
:color=
"showCenter ? activeColor : '#666666'"
></jinIcon>
<jinIcon
class=
"single"
type=
""
font-size=
"44rpx"
title=
"居右"
@
click=
"setRight"
:color=
"showRight ? activeColor : '#666666'"
></jinIcon>
</view>
<view
class=
"setting-layer-mask"
v-if=
"showSettingLayer"
@
click=
"showSetting"
></view>
<view
class=
"setting-layer"
v-if=
"showSettingLayer"
>
<view
class=
"single"
@
click=
"release(true)"
>
<jinIcon
class=
"icon"
type=
""
></jinIcon>
<view>
公开发布
</view>
</view>
<view
class=
"single"
@
click=
"release(false)"
>
<jinIcon
class=
"icon"
type=
""
></jinIcon>
<view>
私密保存
</view>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
import
jinIcon
from
'./jin-icons.vue'
;
export
default
{
props
:
{
// 点击图片时显示图片大小控件
showImgSize
:
{
type
:
Boolean
,
default
:
false
},
// 点击图片时显示工具栏控件
showImgToolbar
:
{
type
:
Boolean
,
default
:
false
},
// 点击图片时显示修改尺寸控件
showImgResize
:
{
type
:
Boolean
,
default
:
false
},
// 占位符
placeholder
:
{
type
:
String
,
default
:
'开始输入...'
},
// 图片上传的地址
uploadFileUrl
:
{
type
:
String
,
default
:
'#'
},
// 上传文件时的name
fileKeyName
:
{
type
:
String
,
default
:
'file'
},
// 上传图片时,http请求的header
header
:
{
type
:
Object
},
// 初始化html
html
:
{
type
:
String
},
},
computed
:{
},
data
()
{
return
{
showMoreTool
:
true
,
showBold
:
false
,
showItalic
:
false
,
showIns
:
false
,
showHeader
:
false
,
showCenter
:
false
,
showRight
:
false
,
showSettingLayer
:
false
,
activeColor
:
'#F56C6C'
};
},
components
:
{
jinIcon
},
created
()
{
},
methods
:
{
onEditorReady
(
e
)
{
this
.
html
=
decodeURIComponent
(
this
.
html
)
//解密
uni
.
createSelectorQuery
()
.
in
(
this
)
.
select
(
'.ql-container'
)
.
fields
({
size
:
true
,
context
:
true
},
res
=>
{
this
.
editorCtx
=
res
.
context
;
this
.
editorCtx
.
setContents
({
html
:
this
.
html
})
})
.
exec
();
},
undo
()
{
this
.
editorCtx
.
undo
();
},
// 插入图片
insertImage
()
{
uni
.
chooseImage
({
count
:
9
,
//默认9
sizeType
:
[
'original'
,
'compressed'
],
//可以指定是原图还是压缩图,默认二者都有
sourceType
:
[
'album'
,
'camera'
],
//从相册选择
success
:
async
(
res
)
=>
{
var
tempFilePaths
=
res
.
tempFilePaths
;
uni
.
showLoading
({
title
:
'正在上传中...'
})
for
(
let
temp
of
tempFilePaths
)
{
// 图片上传服务器
await
uni
.
uploadFile
({
url
:
this
.
uploadFileUrl
,
filePath
:
temp
,
name
:
this
.
fileKeyName
,
header
:
this
.
header
,
success
:
res
=>
{
let
data
=
JSON
.
parse
(
res
.
data
)
// 上传完成后处理
this
.
editorCtx
.
insertImage
({
src
:
data
.
data
,
// 此处需要将图片地址切换成服务器返回的真实图片地址
success
:
function
(
e
)
{
}
});
uni
.
hideLoading
()
},
});
}
}
});
},
insertDivider
()
{
this
.
editorCtx
.
insertDivider
();
},
redo
()
{
this
.
editorCtx
.
redo
();
},
showMore
()
{
this
.
showMoreTool
=
!
this
.
showMoreTool
;
this
.
editorCtx
.
setContents
()
},
setBold
()
{
this
.
showBold
=
!
this
.
showBold
;
this
.
editorCtx
.
format
(
'bold'
);
},
setItalic
()
{
this
.
showItalic
=
!
this
.
showItalic
;
this
.
editorCtx
.
format
(
'italic'
);
},
checkStatus
(
name
,
detail
,
obj
)
{
if
(
detail
.
hasOwnProperty
(
name
))
{
this
[
obj
]
=
true
;
}
else
{
this
[
obj
]
=
false
;
}
},
statuschange
(
e
)
{
var
detail
=
e
.
detail
;
this
.
checkStatus
(
'bold'
,
detail
,
'showBold'
);
this
.
checkStatus
(
'italic'
,
detail
,
'showItalic'
);
this
.
checkStatus
(
'ins'
,
detail
,
'showIns'
);
this
.
checkStatus
(
'header'
,
detail
,
'showHeader'
);
if
(
detail
.
hasOwnProperty
(
'align'
))
{
if
(
detail
.
align
==
'center'
)
{
this
.
showCenter
=
true
;
this
.
showRight
=
false
;
}
else
if
(
detail
.
align
==
'right'
)
{
this
.
showCenter
=
false
;
this
.
showRight
=
true
;
}
else
{
this
.
showCenter
=
false
;
this
.
showRight
=
false
;
}
}
else
{
this
.
showCenter
=
false
;
this
.
showRight
=
false
;
}
},
setIns
()
{
this
.
showIns
=
!
this
.
showIns
;
this
.
editorCtx
.
format
(
'ins'
);
},
setHeader
()
{
this
.
showHeader
=
!
this
.
showHeader
;
this
.
editorCtx
.
format
(
'header'
,
this
.
showHeader
?
'H2'
:
false
);
},
setCenter
()
{
this
.
showCenter
=
!
this
.
showCenter
;
this
.
editorCtx
.
format
(
'align'
,
this
.
showCenter
?
'center'
:
false
);
},
setRight
()
{
this
.
showRight
=
!
this
.
showRight
;
this
.
editorCtx
.
format
(
'align'
,
this
.
showRight
?
'right'
:
false
);
},
showSetting
()
{
this
.
showSettingLayer
=
!
this
.
showSettingLayer
;
},
async
editFocus
()
{
},
editBlur
()
{
},
release
(
isPublic
)
{
this
.
showSettingLayer
=
false
;
this
.
editorCtx
.
getContents
({
success
:
res
=>
{
Object
.
assign
(
res
,
{
isPublic
:
isPublic
})
this
.
$emit
(
'editOk'
,
res
);
}
})
},
}
};
</
script
>
<
style
scoped
>
.container
{
padding
:
30
rpx
0
;
box-sizing
:
border-box
;
padding-bottom
:
120
rpx
;
}
.ql-container
{
line-height
:
160%
;
font-size
:
34
rpx
;
width
:
calc
(
100%
-
60
rpx
);
height
:
auto
;
margin
:
0
auto
;
}
.tool-view
{
width
:
100vw
;
position
:
fixed
;
bottom
:
0
;
left
:
0
;
}
.tool
{
height
:
100
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-around
;
width
:
100%
;
background
:
#eee
;
}
.font-more
{
position
:
absolute
;
left
:
0
;
bottom
:
100
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-around
;
width
:
100%
;
background
:
rgb
(
235
,
235
,
235
);
overflow
:
hidden
;
transition
:
all
0.15s
;
}
.setting-layer
{
position
:
absolute
;
bottom
:
100
rpx
;
background
:
#fff
;
width
:
250
rpx
;
right
:
20
rpx
;
box-shadow
:
0
2px
8px
rgba
(
0
,
0
,
0
,
0.15
);
border-radius
:
8
rpx
;
}
.setting-layer
.single
{
height
:
80
rpx
;
font-size
:
32
rpx
;
padding
:
0
30
rpx
;
display
:
flex
;
align-items
:
center
;
line-height
:
80
rpx
;
flex-direction
:
row
;
color
:
#666
;
}
.setting-layer
.single
.icon
{
margin-right
:
20
rpx
;
}
.setting-layer-mask
{
position
:
fixed
;
left
:
0
;
top
:
0
;
width
:
100vw
;
height
:
100vh
;
background
:
transparent
;
}
</
style
>
pages/blindDate/components/jin-icons.vue
0 → 100644
View file @
9b056455
<
template
>
<view
class=
"content"
>
<view
class=
"icon"
:style=
"
{color: color, fontSize: fontSize}" v-html="type" @click="toclick">
</view>
</view>
</
template
>
<
script
>
export
default
{
props
:
{
type
:
{
type
:
String
,
default
:
''
},
color
:
{
type
:
String
,
default
:
'#666666'
},
fontSize
:
{
type
:
String
,
default
:
'34rpx'
}
},
methods
:
{
toclick
()
{
this
.
$emit
(
'click'
);
}
}
}
</
script
>
<
style
scoped
>
.content
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
@font-face
{
font-family
:
'jin'
;
/** 阿里巴巴矢量图标库的字体库地址,可以替换自己的字体库地址 **/
src
:
url('https://at.alicdn.com/t/font_1491431_6m7ltjo8wi.ttf')
format
(
'truetype'
);
}
.icon
{
font-family
:
jin
!important
;
font-size
:
34
rpx
;
}
</
style
>
pages/blindDate/postDetails.vue
View file @
9b056455
...
...
@@ -326,14 +326,15 @@
<text>
活动截止时间:
{{
details
.
Deadline
}}
</text>
<text>
{{
gettime
()
}}
</text>
</view>
<view
class=
"content"
>
{{
details
.
Content
}}
<view
class=
"content"
v-html=
"details.Content"
>
<rich-text
:nodes=
"details.Content"
></rich-text>
</view>
<view
style=
"width: 100%;"
v-if=
"details.ImageList.length>0"
>
<
!--
<
view
style=
"width: 100%;"
v-if=
"details.ImageList.length>0"
>
<view
v-for=
"(x, i) in details.ImageList"
:key=
"i"
>
<image
:src=
"x"
mode=
"widthFix"
class=
"imgs"
@
click=
"previewImage(i,details.ImageList)"
></image>
</view>
</view>
</view>
-->
<view
class=
"esignup"
v-if=
"details.IsOpenEnroll==1"
>
<view
v-if=
'Enrollcount==0'
style=
"font-size: 12px;color: #111111;"
>
暂无人报名
</view>
<view
v-if=
'Enrollcount>0'
>
...
...
@@ -609,6 +610,7 @@
this
.
sendMsg
.
ReplyUserId
=
UserId
},
methods
:{
getActivityInfo
(){
this
.
request2
(
{
...
...
@@ -617,7 +619,10 @@
},
res
=>
{
this
.
details
=
res
.
data
let
richtext
=
res
.
data
.
Content
;
let
regex
=
new
RegExp
(
'<img'
,
'gi'
);
richtext
=
richtext
.
replace
(
regex
,
`<img width="100%"`
);
//图片超出的处理
this
.
details
.
Content
=
richtext
this
.
init
()
//评论列表
if
(
this
.
details
.
IsOpenEnroll
==
1
){
this
.
GetActivityEnrollPageList
()
//获取招募贴报名列表
...
...
pages/blindDate/postPublishing.vue
View file @
9b056455
...
...
@@ -73,6 +73,9 @@
color
:
#FFFFFF
;
margin
:
30px
0
;
}
.continue
{
width
:
100%
;
height
:
35px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
12px
;
}
</
style
>
<
template
>
...
...
@@ -116,14 +119,18 @@
<view
class=
"box-item"
>
<input
type=
"text"
v-model=
"addMsg.ActivityTitle"
placeholder=
"请将标题写在这里~"
style=
"width: 100%;"
>
</view>
<view>
<textarea
<view
style=
"height: 135px;width: 100%;padding: 15px 0;"
@
click=
"gorichText"
>
<view
v-html=
'addMsg.Content'
v-if=
"addMsg.Content!=''"
style=
"width: 100%;height: 100px;overflow: hidden;"
></view>
<view
v-else
style=
"color: #999999;font-size: 14px;"
>
详情描述
</view>
<view
v-if=
"addMsg.Content.length>0"
class=
"continue"
:style=
"
{color:mainColor}">
继续编辑
</view>
<!--
<textarea
style=
"height: 100px;width: 100%;padding: 15px 0;"
placeholder=
"来吧,尽情发挥吧..."
v-model=
"addMsg.Content"
maxlength=
'2000'
/>
/>
-->
</view>
<view
style=
"width: 100%;margin-top: 15px;"
>
<u-upload
:action=
"action"
:file-list=
"fileList"
@
on-remove=
"onRemove1"
:custom-btn=
"true"
...
...
@@ -137,6 +144,7 @@
<view
class=
"release"
:ripple=
"true"
@
click=
"disbth==false?releasebtn():''"
:style=
"
{background:mainColor}">
发布
</view>
</view>
<u-popup
v-model=
"show"
mode=
"bottom"
border-radius=
"20"
>
<view
class=
"pubox"
>
...
...
@@ -169,7 +177,7 @@
import
auth
from
"@/components/auth/index.vue"
;
export
default
{
components
:
{
auth
auth
,
},
data
()
{
return
{
...
...
@@ -251,13 +259,10 @@ export default {
res
=>
{
if
(
res
.
resultCode
==
1
){
this
.
forumList
=
res
.
data
}
}
);
},
select
(
x
){
this
.
addMsg
.
ForumId
=
x
.
Id
;
this
.
ForumName
=
x
.
Name
;
...
...
@@ -361,6 +366,16 @@ export default {
}
);
},
gorichText
(){
let
data
=
this
.
addMsg
.
Content
data
=
encodeURIComponent
(
data
)
//加密
uni
.
navigateTo
({
url
:
'/pages/blindDate/richText?Content='
+
data
})
},
Children
(
e
){
this
.
addMsg
.
Content
=
e
}
...
...
pages/blindDate/richText.vue
0 → 100644
View file @
9b056455
<
style
>
.richtext
{
width
:
100%
;
height
:
100vh
;
background
:
#FFF
;
}
</
style
>
<
template
>
<view
class=
"richtext"
>
<jinEdit
placeholder=
"开始输入..."
@
editOk=
"editOk"
:uploadFileUrl=
"action"
:html=
"Content"
></jinEdit>
</view>
</
template
>
<
script
>
import
jinEdit
from
'./components/jin-edit.vue'
;
export
default
{
components
:
{
jinEdit
},
data
()
{
return
{
pageTitle
:
"详情描述"
,
mainColor
:
""
,
action
:
this
.
host2
+
"/api/File/UploadTencent"
,
Content
:
''
,
showedit
:
false
,
};
},
created
()
{
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
"px"
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
},
mounted
()
{
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
let
MallBaseId
=
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
:
1
;
this
.
action
=
this
.
host2
+
'/api/File/UploadTencent?MallBaseId='
+
MallBaseId
},
onLoad
:
function
(
option
)
{
if
(
option
&&
option
.
Content
){
this
.
Content
=
option
.
Content
}
},
methods
:
{
editOk
(
res
){
let
html
=
res
.
html
let
pages
=
getCurrentPages
();
// 当前页面
let
beforePage
=
pages
[
pages
.
length
-
2
];
// 前一个页面
setTimeout
(()
=>
{
uni
.
navigateBack
({
success
:
function
()
{
beforePage
.
$vm
.
Children
(
html
);
// 执行前一个页面的方法
}
});
},
100
)
}
},
};
</
script
>
pages/friendcircle/friendcircle.vue
View file @
9b056455
...
...
@@ -240,7 +240,7 @@
<
template
>
<div
class=
'friendcircle'
>
<!-- 发布动态按钮 -->
<view
class=
"fbanniu"
@
click=
"btnclick"
>
<view
class=
"fbanniu"
@
click=
"btnclick"
v-if=
"IsOpenMiAi==1"
>
<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>
...
...
@@ -264,7 +264,7 @@
</view>
<view
class=
"ftBox-right"
>
<view
class=
"text"
:style=
"
{'font-size': '14px','font-weight': 'bold','margin-bottom': '5px','color':mainColor}">
{{
x
.
createEmName
}}
</view>
<view
class=
"text2"
style=
"font-size: 14px;margin-bottom: 5px;"
>
{{
x
.
content
}}
</view>
<view
class=
"text2"
style=
"font-size: 14px;margin-bottom: 5px;"
>
<text
@
click=
"gohuati(x)"
style=
"font-weight: 600;margin-right: 2px;"
v-if=
"x.TalkContent!=null && x.TalkContent!=''"
>
#
{{
x
.
TalkContent
}}
#
</text>
{{
x
.
content
}}
</view>
<!-- 图片模式 -->
<view
class=
"imgmode"
v-if=
"x.fileType==1"
>
<view
v-if=
"x.files.length==1"
style=
"width: 150px;height:200px;margin-bottom: 6px;"
@
click=
"previewImage(0,x.files)"
>
...
...
@@ -405,7 +405,8 @@
pageSize
:
15
,
UserTeacher
:
0
,
CreateBy
:
''
,
UserId
:
0
,
UserId
:
0
,
TalkId
:
0
,
},
mainColor
:
""
,
secondary
:
''
,
...
...
@@ -440,12 +441,14 @@
dianindex
:
0
,
//点的索引
inputheight
:
0
,
//键盘的高度
is_bang
:
0
,
barshow
:
0
,
barshow
:
0
,
IsOpenMiAi
:
0
,
//1开启 0 没开启
}
},
created
()
{
this
.
is_bang
=
this
.
$uiConfig
.
is_bang
?
85
:
52
;
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
"px"
;
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
"px"
;
this
.
IsOpenMiAi
=
uni
.
getStorageSync
(
"mall_UserInfo"
)?
uni
.
getStorageSync
(
"mall_UserInfo"
).
IsOpenMiAi
:
0
;
//是否开启相亲模式
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
this
.
pricecolor
=
this
.
$uiConfig
.
pricecolor
;
...
...
@@ -453,21 +456,22 @@
this
.
msg
.
UserId
=
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
:
0
;
},
mounted
()
{
let
currentPages
=
getCurrentPages
();
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
pages
=
wx
.
getStorageSync
(
"basedata"
)
?
wx
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
pages
.
forEach
((
x
)
=>
{
if
(
x
.
value
==
u
)
{
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
}
});
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
},
onLoad
(
options
)
{
let
currentPages
=
getCurrentPages
();
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
pages
=
wx
.
getStorageSync
(
"basedata"
)
?
wx
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
pages
.
forEach
((
x
)
=>
{
if
(
x
.
value
==
u
)
{
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
}
});
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
if
(
options
){
if
(
options
.
ID
){
this
.
msg
.
UserTeacher
=
options
.
ID
...
...
@@ -475,6 +479,14 @@
if
(
options
.
barshow
){
this
.
barshow
=
options
.
barshow
}
if
(
options
.
TalkId
){
this
.
msg
.
TalkId
=
options
.
TalkId
}
if
(
options
.
TalkContent
){
uni
.
setNavigationBarTitle
({
title
:
options
.
TalkContent
,
});
}
}
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
u
)
{
...
...
@@ -814,7 +826,13 @@
})
innerAudioContext
.
stop
();
},
},
gohuati
(
x
){
//跳入话题列表
uni
.
navigateTo
({
url
:
'/pages/friendcircle/friendcircle?TalkId='
+
x
.
TalkId
+
'&TalkContent='
+
x
.
TalkContent
+
'&barshow=1'
})
innerAudioContext
.
stop
();
}
}
}
</
script
>
pages/friendcircle/mydetails.vue
View file @
9b056455
...
...
@@ -385,9 +385,13 @@
if
(
type
==
1
){
//第一次进来判断
this
.
loading
=
true
;
}
let
mall_UserInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
)?
uni
.
getStorageSync
(
"mall_UserInfo"
):
''
;
let
url
=
'/api/AppletEducation/GetDynamicDetial'
if
(
mall_UserInfo
.
IsOpenMiAi
&&
mall_UserInfo
.
IsOpenMiAi
==
1
){
url
=
'/api/AppletMiai/GetMiAiDynamicDetial'
}
this
.
request2
({
url
:
'/api/AppletEducation/GetDynamicDetial'
,
url
:
url
,
data
:
{
articleId
:
this
.
articleId
}
},
res
=>
{
...
...
pages/friendcircle/release.vue
View file @
9b056455
...
...
@@ -155,24 +155,82 @@
}
#myVideo
{
width
:
150px
;
height
:
200px
;
}
.release-top
{
width
:
100%
;
height
:
94px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-around
;
}
.release-item
{
width
:
90
rpx
;
font-size
:
12px
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
.r-item-img
{
width
:
90
rpx
;
height
:
90
rpx
;
margin-bottom
:
10px
;
}
.r-item-img
image
{
width
:
100%
;
height
:
100%
;
}
.pubox
{
width
:
100%
;
padding
:
0
15px
;
}
.pubox-top
{
width
:
100%
;
height
:
45px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
14px
;
color
:
#111
;
}
.ht-box
{
padding
:
0
15px
;
display
:
flex
;
flex-wrap
:
wrap
;
}
.foritem
{
height
:
30px
;
font-size
:
12px
;
padding
:
0
12px
;
display
:
flex
;
align-items
:
center
;
border-radius
:
15px
;
margin-right
:
25px
;
margin-bottom
:
15px
;
}
</
style
>
<
template
>
<view
class=
"release"
>
<view
class=
"release-box"
>
<view
class=
"release"
>
<view
class=
"release-top"
>
<view
class=
"release-item"
v-for=
"(item, index) in list2"
:key=
"index"
@
click=
"releaseChange(item)"
>
<view
class=
"r-item-img"
>
<image
:src=
"item.img_y"
v-if=
"item.id== addMsg.FileType"
></image>
<image
:src=
"item.img_n"
v-else
></image>
</view>
<view
:style=
"
{color:item.id== addMsg.FileType?'#111111':'#999999'}">
{{
item
.
name
}}
</view>
</view>
</view>
<view
class=
"release-box"
>
<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>
<view
style=
"width: 100%;height: 45px;display: flex;align-items: center;font-size: 14px;"
>
<image
src=
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/friend-ht.png'
style=
"width: 35px;height: 35px;margin-right: 10px;"
@
click=
"show=true"
></image>
<view
:style=
"
{color:mainColor}" v-if="TalkName!=''">#
{{
TalkName
}}
#
</view>
</view>
<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;"
>
...
...
@@ -248,7 +306,7 @@
<u-icon
name=
"arrow"
:size=
"32"
color=
"#B7B7B7"
></u-icon>
</view>
</view>
<view
class=
"releasebtn"
@
click=
"publish"
>
<view
class=
"releasebtn"
@
click=
"publish"
:style=
"
{background:mainColor}"
>
发布
</view>
</view>
...
...
@@ -287,6 +345,23 @@
</view>
</view>
</view>
</u-popup>
<!-- 话题选择 -->
<u-popup
v-model=
"show"
mode=
"bottom"
border-radius=
"20"
>
<view
class=
"pubox"
>
<view
class=
"pubox-top"
>
<view></view>
<text
>
选择话题
</text>
<u-icon
name=
"cross"
color=
"#555"
size=
"40"
@
click=
'show=false'
></u-icon>
</view>
<scroll-view
scroll-y=
"true"
style=
"max-height: calc(100vh * 0.7 - 65px);padding-bottom: 20px;"
>
<view
class=
"ht-box"
>
<view
v-for=
"(x,y) in TalkList"
:key=
"y"
class=
"foritem"
@
click=
"select(x)"
:style=
"
{color:x.Id == addMsg.TalkId?'#FFF':'#666666',background:x.Id == addMsg.TalkId?mainColor:'#F9F9F9'}">
{{
x
.
Content
}}
</view>
</view>
</scroll-view>
</view>
</u-popup>
</view>
</
template
>
...
...
@@ -299,7 +374,8 @@
data
()
{
return
{
whoshow
:
false
,
audioshow
:
false
,
audioshow
:
false
,
show
:
false
,
pageTitle
:
"发布"
,
mainColor
:
""
,
secondary
:
''
,
...
...
@@ -310,14 +386,16 @@
Address
:
''
,
//地址
IsOpen
:
1
,
//1-是,2-关注可见
FileList
:
[],
FileType
:
0
,
FileType
:
0
,
TalkId
:
0
,
},
TalkName
:
''
,
fileList
:[],
list2
:
[
{
name
:
'文字'
,
id
:
0
},
{
name
:
'图文'
,
id
:
1
},
{
name
:
'视频'
,
id
:
2
},
{
name
:
'音频'
,
id
:
3
},
{
name
:
'文字'
,
id
:
0
,
img_y
:
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/friend-wz-y.png'
,
img_n
:
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/friend-wz-n.png'
},
{
name
:
'图文'
,
id
:
1
,
img_y
:
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/friend-tw-y.png'
,
img_n
:
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/friend-tw-n.png'
},
{
name
:
'视频'
,
id
:
2
,
img_y
:
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/friend-sp-y.png'
,
img_n
:
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/friend-sp-n.png'
},
{
name
:
'音频'
,
id
:
3
,
img_y
:
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/friend-yp-y.png'
,
img_n
:
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/friend-yp-n.png'
},
],
...
...
@@ -344,7 +422,8 @@
gifshow
:
false
,
playshow
:
false
,
controls
:
false
,
//显示默认控件
luyintype
:
1
,
luyintype
:
1
,
TalkList
:[],
//话题列表
}
},
...
...
@@ -365,7 +444,8 @@
title
:
this
.
pageTitle
,
});
let
MallBaseId
=
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
:
1
;
this
.
action
=
this
.
host2
+
'/api/File/UploadTencent?MallBaseId='
+
MallBaseId
this
.
action
=
this
.
host2
+
'/api/File/UploadTencent?MallBaseId='
+
MallBaseId
this
.
GetEducationTalk
()
},
created
()
{
// 监听
...
...
@@ -374,7 +454,30 @@
onUnload
(){
innerAudioContext
.
stop
();
},
methods
:
{
methods
:
{
select
(
x
){
if
(
this
.
addMsg
.
TalkId
!=
x
.
Id
){
this
.
addMsg
.
TalkId
=
x
.
Id
;
this
.
TalkName
=
x
.
Content
;
}
else
{
this
.
addMsg
.
TalkId
=
0
;
this
.
TalkName
=
''
;
}
},
GetEducationTalk
(){
//获取朋友圈话题
this
.
request2
({
url
:
'/api/AppletSchool/GetEducationTalkList'
,
data
:
{}
},
res
=>
{
uni
.
hideLoading
()
if
(
res
.
resultCode
==
1
)
{
this
.
TalkList
=
res
.
data
}
}
);
},
publish
()
{
//发布
if
(
this
.
addMsg
.
FileType
==
0
&&
this
.
addMsg
.
Content
==
''
)
{
uni
.
showToast
({
...
...
@@ -434,7 +537,7 @@
);
},
releaseChange
(
e
){
//发布的类型
console
.
log
(
e
)
this
.
addMsg
.
FileType
=
e
.
id
this
.
addMsg
.
FileList
=
[]
},
//打开地图
...
...
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