Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
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
new-sing
admin-base
Commits
23d3b60c
Commit
23d3b60c
authored
Oct 25, 2018
by
王
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
群发消息
parent
6ed46280
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
114 additions
and
6 deletions
+114
-6
index.js
config/index.js
+2
-2
index.vue
src/components/groupSend/index.vue
+112
-4
No files found.
config/index.js
View file @
23d3b60c
...
@@ -12,8 +12,8 @@ module.exports = {
...
@@ -12,8 +12,8 @@ module.exports = {
//本地代理设置
//本地代理设置
proxyTable
:
{
proxyTable
:
{
'/api'
:
{
'/api'
:
{
target
:
'http://local.base-api.sing.com'
,
// 接口的域名
//
target: 'http://local.base-api.sing.com', // 接口的域名
//
target: 'https://wechat-test.changchangenglish.com/',
target
:
'https://wechat-test.changchangenglish.com/'
,
changeOrigin
:
true
,
// 如果接口跨域,需要进行这个参数配置
changeOrigin
:
true
,
// 如果接口跨域,需要进行这个参数配置
}
}
},
},
...
...
src/components/groupSend/index.vue
View file @
23d3b60c
<
template
>
<
template
>
<div
class=
"index"
>
<div
class=
"top"
>
<span
class=
"title"
>
群发助手
</span>
</div>
<el-tabs
v-model=
"activeName"
type=
"card"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"文本"
name=
"text"
>
<div
class=
"inner-edit_area"
>
<el-input
type=
"textarea"
:autosize=
"
{ minRows: 4, maxRows: 8}"
placeholder="请输入内容"
v-model="content">
</el-input>
</div>
</el-tab-pane>
<el-tab-pane
label=
"图片"
name=
"picture"
>
<div
class=
"inner-edit_area"
>
<el-upload
action=
"/api/public/upload/zone"
:http-request=
"uploadFile"
:before-upload=
"beforeAvatarUpload"
list-type=
"picture-card"
:file-list=
"imageList"
:on-success=
"handleAvatarSuccess"
:on-remove=
"handleRemove"
:limit=
"1"
>
<i
class=
"el-icon-plus"
></i>
</el-upload>
</div>
</el-tab-pane>
<el-tab-pane
label=
"视频"
name=
"radio"
>
<div
class=
"inner-edit_area"
>
<el-upload
action=
"/api/public/upload/zone"
:http-request=
"uploadFile"
:before-upload=
"beforeAvatarUpload"
list-type=
"picture-card"
:file-list=
"imageList"
:on-success=
"handleAvatarSuccess"
:on-remove=
"handleRemove"
:limit=
"1"
>
<i
class=
"el-icon-plus"
></i>
</el-upload>
</div>
</el-tab-pane>
</el-tabs>
<div>
<el-button
type=
"success"
plain
style=
"float: right; margin-right: 2%; margin-top: 20px;"
@
click=
"send"
v-if=
"!$store.state.readonly"
>
发送
</el-button>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
import
{
uploadFileApi
}
from
"../../service/api"
;
name
:
"index"
export
default
{
name
:
"index"
,
data
()
{
return
{
loading
:
false
,
activeName
:
'text'
,
list
:
[],
content
:
''
,
uploadShow
:
true
,
imageList
:
[]
}
},
methods
:
{
handleClick
(
tab
)
{
this
.
activeName
=
tab
.
name
;
},
handleRemove
(){
this
.
uploadShow
=
true
},
beforeAvatarUpload
(){
this
.
uploadShow
=
false
},
handleAvatarSuccess
(
res
)
{
this
.
imageList
=
[{
name
:
res
.
data
.
url
,
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
data
.
url
}]
},
uploadFile
(
a
)
{
this
.
loading
=
true
;
this
.
$store
.
dispatch
(
'setProgress'
,{
type
:
'new'
,
id
:
a
.
file
.
uid
});
uploadFileApi
({
file
:
a
.
file
,
type
:
'local'
}).
then
(
res
=>
{
this
.
imageList
=
[{
name
:
res
.
url
,
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
url
}]
this
.
loading
=
false
;
this
.
$message
({
type
:
'success'
,
message
:
'上传成功!'
});
}).
catch
(()
=>
{
this
.
loading
=
false
;
})
},
send
(){
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.index
{
padding
:
20px
0
;
}
.top
{
margin-bottom
:
30px
;
margin-left
:
20px
;
}
.title
{
font-size
:
16px
;
font-weight
:
400
;
display
:
block
;
line-height
:
1.2
;
color
:
#353535
;
}
.inner-edit_area
{
width
:
96%
;
margin
:
0
auto
;
}
</
style
>
</
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