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
6fa3b93d
Commit
6fa3b93d
authored
Oct 30, 2018
by
王
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二维码管理
parent
ae11e34d
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1147 additions
and
35 deletions
+1147
-35
index.js
config/index.js
+3
-3
dialog.vue
src/components/qrcode/dialog.vue
+321
-23
focusReplyDialog.vue
src/components/qrcode/focusReplyDialog.vue
+716
-0
index.vue
src/components/qrcode/index.vue
+97
-9
api.js
src/service/api.js
+10
-0
No files found.
config/index.js
View file @
6fa3b93d
...
...
@@ -12,14 +12,14 @@ module.exports = {
//本地代理设置
proxyTable
:
{
'/api'
:
{
target
:
'http://local.base-api.sing.com'
,
// 接口的域名
//
target: 'https://wechat-test.changchangenglish.com/',
//
target: 'http://local.base-api.sing.com', // 接口的域名
target
:
'https://wechat-test.changchangenglish.com/'
,
changeOrigin
:
true
,
// 如果接口跨域,需要进行这个参数配置
}
},
// Various Dev Server settings
host
:
'
10.1.21.181
'
,
// can be overwritten by process.env.HOST
host
:
'
localhost
'
,
// can be overwritten by process.env.HOST
port
:
8080
,
// can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser
:
false
,
errorOverlay
:
true
,
...
...
src/components/qrcode/dialog.vue
View file @
6fa3b93d
This diff is collapsed.
Click to expand it.
src/components/qrcode/focusReplyDialog.vue
0 → 100644
View file @
6fa3b93d
This diff is collapsed.
Click to expand it.
src/components/qrcode/index.vue
View file @
6fa3b93d
...
...
@@ -80,15 +80,35 @@
</a>
</
template
>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"150"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click
.
native
.
prevent=
"editRow(scope.$index, list)"
type=
"text"
size=
"small"
v-if=
"!$store.state.readonly"
>
编辑
</el-button>
<el-button
@
click
.
native
.
prevent=
"detail(scope.$index, list)"
type=
"text"
size=
"small"
>
查看详情
</el-button>
</
template
>
</el-table-column>
</el-table>
<page
:nowPage=
"nowPage"
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
/>
<dialog-div
:newObj=
"newObj"
@
initPage=
"initPage
"
></dialog-div>
<dialog-div
v-if=
"newObj.show"
:newObj=
"newObj"
@
initPage=
"initPage"
@
changeShow=
"changeShow
"
></dialog-div>
</div>
</template>
<
script
>
import
dialogDiv
from
'./dialog'
import
{
getQrCodeListApi
}
from
"../../service/api"
;
import
{
getQrCodeListApi
,
getQrCodeDetailUrlApi
}
from
"../../service/api"
;
import
{
QRCODETYPE
,
QRSTATUS
,
QRTYPE
}
from
"../../util/wordbook"
;
import
page
from
'../framework/page'
export
default
{
...
...
@@ -171,17 +191,85 @@
},
initPage
(){
let
json
=
{
title
:
this
.
searchFrom
.
title
,
type
:
this
.
searchFrom
.
type
,
code_type
:
this
.
searchFrom
.
code_type
,
status
:
this
.
searchFrom
.
status
,
limit
:
this
.
limit
,
page
:
this
.
nowPage
};
if
(
this
.
searchFrom
.
title
){
json
.
title
=
this
.
searchFrom
.
title
}
if
(
this
.
searchFrom
.
type
){
json
.
type
=
this
.
searchFrom
.
type
}
if
(
this
.
searchFrom
.
code_type
){
json
.
code_type
=
this
.
searchFrom
.
code_type
}
if
(
this
.
searchFrom
.
status
){
json
.
status
=
this
.
searchFrom
.
status
}
getQrCodeListApi
(
json
).
then
(
res
=>
{
this
.
list
=
res
.
list
;
this
.
total
=
res
.
total
this
.
list
=
res
?
res
.
list
:
[];
this
.
total
=
res
?
res
.
total
:
0
;
})
},
newQrcode
(){
this
.
newObj
=
{
show
:
true
,
title
:
null
,
type
:
2
,
invite_code
:
null
,
status
:
0
,
end_at
:
null
}
},
editRow
(
index
,
list
){
let
_obj
=
list
[
index
]
getQrCodeDetailUrlApi
(
_obj
.
id
).
then
(
res
=>
{
this
.
newObj
=
{
title
:
res
.
title
,
type
:
res
.
type
,
invite_code
:
res
.
invite_code
?
res
.
invite_code
.
split
(
'-'
)[
2
]
:
''
,
status
:
res
.
status
,
end_at
:
res
.
end_at
,
id
:
_obj
.
id
}
if
(
res
.
auto_reply
){
this
.
newObj
.
list
=
JSON
.
parse
(
res
.
auto_reply
)
}
this
.
newObj
.
editFlag
=
true
;
this
.
newObj
.
show
=
true
;
});
},
detail
(
index
,
list
){
let
_obj
=
list
[
index
]
getQrCodeDetailUrlApi
(
_obj
.
id
).
then
(
res
=>
{
this
.
newObj
=
{
title
:
res
.
title
,
type
:
res
.
type
,
invite_code
:
res
.
invite_code
?
res
.
invite_code
.
split
(
'-'
)[
2
]
:
''
,
status
:
res
.
status
,
end_at
:
res
.
end_at
,
id
:
_obj
.
id
}
if
(
res
.
auto_reply
){
this
.
newObj
.
list
=
JSON
.
parse
(
res
.
auto_reply
)
}
this
.
newObj
.
readFlag
=
true
;
this
.
newObj
.
show
=
true
;
});
},
changeShow
(
val
){
this
.
newObj
=
{
show
:
false
,
title
:
null
,
type
:
2
,
invite_code
:
null
,
status
:
0
,
end_at
:
null
}
},
getQrCodeDetail
(
id
){
getQrCodeDetailUrlApi
(
id
).
then
(
res
=>
{
})
}
}
...
...
src/service/api.js
View file @
6fa3b93d
...
...
@@ -574,3 +574,13 @@ const getDefaultPeriodsUrl = '/api/admin/periods/default';
export
const
getDefaultPeriodsApi
=
function
()
{
return
Vue
.
prototype
.
$fetch
(
getDefaultPeriodsUrl
)
};
// 修改二维码管理
const
updateQrCodeUrl
=
'api/admin/wechat/qrcode'
;
export
const
updateQrCodeApi
=
function
(
id
,
json
)
{
return
Vue
.
prototype
.
$put
(
`
${
updateQrCodeUrl
}
/
${
id
}
`
,
json
)
};
// 获取二维码列表详情
const
getQrCodeDetailUrl
=
'api/admin/wechat/qrcode'
;
export
const
getQrCodeDetailUrlApi
=
function
(
id
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
getQrCodeDetailUrl
}
/
${
id
}
`
)
};
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