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
be3bbbef
Commit
be3bbbef
authored
Sep 14, 2018
by
王
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
01aa8dc9
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
497 additions
and
107 deletions
+497
-107
10.464403db1a1c52b8f60a.js
dist/static/js/10.464403db1a1c52b8f60a.js
+1
-1
app.d8afd8460c7df3c4e4d0.js
dist/static/js/app.d8afd8460c7df3c4e4d0.js
+1
-1
dialog.vue
src/components/noLesson/dialog.vue
+21
-16
index.vue
src/components/order/index.vue
+12
-4
dialog.vue
src/components/single/dialog.vue
+1
-1
index.vue
src/components/single/index.vue
+1
-1
index.vue
src/components/teacherDetail/index.vue
+26
-5
index.vue
src/components/user/index.vue
+4
-11
dialog.vue
src/components/userDetail/dialog.vue
+74
-0
index.vue
src/components/userDetail/index.vue
+305
-0
autoReplyDialog.vue
src/components/weChat/autoReplyDialog.vue
+1
-1
focusReply.vue
src/components/weChat/focusReply.vue
+38
-49
focusReplyDialog.vue
src/components/weChat/focusReplyDialog.vue
+6
-11
index.js
src/router/index.js
+3
-3
api.js
src/service/api.js
+3
-3
No files found.
dist/static/js/10.464403db1a1c52b8f60a.js
View file @
be3bbbef
This diff is collapsed.
Click to expand it.
dist/static/js/app.d8afd8460c7df3c4e4d0.js
View file @
be3bbbef
This diff is collapsed.
Click to expand it.
src/components/noLesson/dialog.vue
View file @
be3bbbef
...
...
@@ -9,13 +9,15 @@
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
>
<el-row>
<el-col
:span=
"4"
><label>
不上课日期
</label></el-col>
<el-col
:span=
"
8
"
>
<el-col
:span=
"
20
"
>
<el-form-item>
<el-date-picker
style=
"width: 100%"
v-model=
"noLessonDate"
type=
"date"
type=
"date
s
"
format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd"
:picker-options=
"pickerOptions1"
placeholder=
"选择日期"
>
</el-date-picker>
</el-form-item>
...
...
@@ -51,11 +53,16 @@
value
:
'no_lesson_date'
,
desc
:[]
},
noLessonDate
:
''
,
noLessonDate
:
[]
,
rules
:{
noLessonDate
:[
{
required
:
true
,
message
:
'请选择日期'
,
trigger
:
'change'
}
]
},
pickerOptions1
:
{
disabledDate
(
time
)
{
return
!
(
time
.
getTime
()
>
Date
.
now
());
}
}
}
},
...
...
@@ -64,7 +71,7 @@
},
methods
:{
save
(){
if
(
!
this
.
noLessonDate
){
if
(
this
.
noLessonDate
.
length
===
0
){
this
.
$message
({
type
:
'error'
,
message
:
'请选择不上课时间!'
...
...
@@ -76,17 +83,9 @@
value
:
this
.
form
.
value
}
let
_desc
=
this
.
form
.
desc
||
[];
let
index
=
_desc
.
findIndex
((
val
)
=>
{
return
val
===
this
.
noLessonDate
})
if
(
index
===
-
1
){
_desc
.
push
(
this
.
noLessonDate
);
}
else
{
this
.
$message
({
type
:
'error'
,
message
:
'日期不能重复添加!'
});
return
;
if
(
this
.
noLessonDate
.
length
>
0
)
{
_desc
=
_desc
.
concat
(
this
.
noLessonDate
)
_desc
=
this
.
dedupe
(
_desc
)
}
json
.
desc
=
JSON
.
stringify
(
_desc
);
...
...
@@ -96,6 +95,7 @@
type
:
'success'
,
message
:
'新增成功!'
});
this
.
noLessonDate
=
_desc
this
.
$emit
(
"reflash"
);
this
.
show
=
false
;
})
...
...
@@ -105,6 +105,7 @@
type
:
'success'
,
message
:
'新增成功!'
});
this
.
noLessonDate
=
_desc
this
.
$emit
(
"reflash"
);
this
.
show
=
false
;
})
...
...
@@ -118,7 +119,11 @@
}
this
.
title
=
this
.
dialogObj
.
title
;
this
.
form
.
desc
=
this
.
dialogObj
.
desc
;
this
.
loading
=
false
this
.
noLessonDate
=
this
.
form
.
desc
;
this
.
loading
=
false
},
dedupe
(
array
){
return
Array
.
from
(
new
Set
(
array
));
}
},
watch
:{
...
...
src/components/order/index.vue
View file @
be3bbbef
...
...
@@ -67,7 +67,12 @@
</el-col>
</el-row>
<el-row>
<el-col
:span=
"18"
>
<el-col
:span=
"6"
>
<el-form-item
label=
"收件人手机号"
>
<el-input
v-model=
"searchFrom.receive_mobile"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"购买时间"
>
<el-date-picker
v-model=
"searchFrom.payTime"
...
...
@@ -190,7 +195,7 @@
import
detailDialog
from
'./detail'
import
AddressArray
from
'../framework/address-picker/addr'
import
{
INVITETYPE
,
ORDERSTATUS
,
BUYTYPE
,
BUYTYPEOPTION
,
ORDERSTATUSOPTION
,
INVITETYPEOPTION
}
from
"../../util/wordbook"
;
import
CommonJs
from
'../../util/common'
;
import
{
dateFmt
}
from
'../../util/common'
;
export
default
{
name
:
'index'
,
...
...
@@ -284,10 +289,13 @@
if
(
this
.
searchFrom
.
out_trade_no
)
{
json
.
out_trade_no
=
this
.
searchFrom
.
out_trade_no
}
if
(
this
.
searchFrom
.
receive_mobile
)
{
json
.
receive_mobile
=
this
.
searchFrom
.
receive_mobile
}
if
(
this
.
searchFrom
.
payTime
&&
this
.
searchFrom
.
payTime
.
length
>
0
){
console
.
log
(
'this.searchFrom.payTime'
)
json
.
pay_start_at
=
CommonJs
.
dateFmt
(
this
.
searchFrom
.
payTime
[
0
],
"yyyy-MM-dd hh:mm:ss"
)
json
.
pay_end_at
=
CommonJs
.
dateFmt
(
this
.
searchFrom
.
payTime
[
1
],
"yyyy-MM-dd hh:mm:ss"
)
json
.
pay_start_at
=
dateFmt
(
this
.
searchFrom
.
payTime
[
0
],
"yyyy-MM-dd hh:mm:ss"
)
json
.
pay_end_at
=
dateFmt
(
this
.
searchFrom
.
payTime
[
1
],
"yyyy-MM-dd hh:mm:ss"
)
}
getOrderListApi
(
json
).
then
((
res
)
=>
{
this
.
tableData
=
res
.
list
...
...
src/components/single/dialog.vue
View file @
be3bbbef
...
...
@@ -25,7 +25,7 @@
</el-row>
<el-row>
<el-col
:span=
"4"
>
<label>
分类
</label>
<label>
标签
</label>
</el-col>
<el-col
:span=
"20"
>
<el-form-item>
...
...
src/components/single/index.vue
View file @
be3bbbef
...
...
@@ -21,7 +21,7 @@
</el-button>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-col
:span=
"4"
:offset=
"8"
>
<el-form-item>
<el-button
type=
"success"
plain
size=
"small"
@
click=
"onAdd"
v-if=
"!$store.state.readonly"
>
添加单品
...
...
src/components/teacherDetail/index.vue
View file @
be3bbbef
...
...
@@ -13,7 +13,9 @@
</el-col>
<el-col
:span=
"6"
>
<label>
二维码:
</label>
<img
class=
"avatar"
:src=
"detail.qr"
/>
<a
:href=
"detail.qr"
>
<img
class=
"avatar"
:src=
"detail.qr"
/>
</a>
</el-col>
</el-row>
<el-row>
...
...
@@ -50,26 +52,45 @@
label=
"创建时间"
>
</el-table-column>
</el-table>
<page
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
/>
</div>
</
template
>
<
script
>
import
{
getTeacherDetailApi
}
from
"../../service/api"
;
import
{
TEACHERTYPE
}
from
"../../util/wordbook"
;
import
page
from
'../framework/page'
export
default
{
name
:
"index"
,
components
:{
page
},
data
(){
return
{
list
:[],
id
:
''
,
detail
:
{}
detail
:
{},
total
:
0
,
limit
:
10
,
nowPage
:
1
}
},
methods
:{
onPageChange
(
val
){
this
.
nowPage
=
val
this
.
getTeacherDetail
()
},
getTeacherDetail
(){
let
id
=
this
.
id
;
getTeacherDetailApi
(
id
).
then
((
res
)
=>
{
this
.
list
=
res
.
class_list
||
[];
let
json
=
{
limit
:
this
.
limit
,
page
:
this
.
nowPage
}
getTeacherDetailApi
(
id
,
json
).
then
((
res
)
=>
{
if
(
res
.
class_list
)
{
this
.
list
=
res
.
class_list
.
list
||
[];
this
.
total
=
res
.
class_list
.
total
;
}
this
.
detail
=
res
;
})
}
...
...
@@ -91,7 +112,7 @@ import {TEACHERTYPE} from "../../util/wordbook";
padding: 20px 0;
}
.avatar {
width:
6
0px;
width:
8
0px;
}
.header {
padding: 0 20px;
...
...
src/components/user/index.vue
View file @
be3bbbef
...
...
@@ -63,18 +63,11 @@
label=
"最后登录时间"
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"300"
>
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
plain
type=
"warning"
v-if=
"!$store.state.readonly"
@
click=
"bindTeacher(scope.row)"
>
绑定老师
</el-button>
<el-button
size=
"mini"
plain
type=
"primary"
@
click=
"detail(scope.row)"
>
<el-button
size=
"mini"
plain
type=
"primary"
@
click=
"goToDetail(scope.row.user_id)"
>
查看详情
</el-button>
<el-button
size=
"mini"
plain
type=
"primary"
@
click=
"goToOrder(scope.row.user_id)"
>
购买记录
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -165,8 +158,8 @@
teacher_id
:
data
.
teacher_id
}
},
goTo
Order
(
id
){
this
.
$router
.
push
(
'/user
Order
/'
+
id
);
goTo
Detail
(
id
){
this
.
$router
.
push
(
'/user
Detail
/'
+
id
);
}
}
}
...
...
src/components/userDetail/dialog.vue
0 → 100644
View file @
be3bbbef
<
template
>
<el-dialog
:title=
"dialogObj.title"
:visible
.
sync=
"dialogObj.show"
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"120px"
>
<el-form-item
label=
"老师"
>
<el-select
v-model=
"form.teacher_id"
placeholder=
"请选择"
>
<el-option
v-for=
"(data,index) in teacherList"
:key=
"index"
:label=
"data.name"
:value=
"data.id"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogObj.show = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"onSave"
>
确 定
</el-button>
</span>
</el-dialog>
</
template
>
<
script
>
import
{
getTeacherListApi
,
addRelatedTeacherApi
}
from
"../../service/api"
;
export
default
{
props
:[
'dialogObj'
],
data
(){
return
{
form
:{
id
:
''
,
teacher_id
:
''
,
},
teacherList
:[],
}
},
methods
:{
initPage
(){
getTeacherListApi
().
then
(
res
=>
{
this
.
teacherList
=
res
.
list
});
this
.
form
=
{
id
:
this
.
dialogObj
.
id
,
teacher_id
:
this
.
dialogObj
.
teacher_id
?
this
.
dialogObj
.
teacher_id
:
''
};
},
onSave
(){
let
json
=
{
teacher_id
:
this
.
form
.
teacher_id
?
this
.
form
.
teacher_id
:
0
};
addRelatedTeacherApi
(
this
.
form
.
id
,
json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'绑定成功!'
});
this
.
$emit
(
"reflash"
);
this
.
dialogObj
.
show
=
false
;
})
}
},
watch
:{
'dialogObj'
(
value
){
this
.
initPage
()
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/components/user
Order
/index.vue
→
src/components/user
Detail
/index.vue
View file @
be3bbbef
<
template
>
<div
class=
"user"
>
<div
class=
"header"
>
<div
class=
"clear-both"
style=
"margin-top: 20px"
v-if=
"detail"
>
<el-button
size=
"mini"
plain
type=
"success"
v-if=
"!$store.state.readonly"
@
click=
"bindTeacher"
style=
"float: right"
>
绑定老师
</el-button>
</div>
<el-row>
<el-col
:span=
"6"
>
<label>
昵称:
</label>
<a
:href=
"detail.qr"
>
<img
class=
"avatar"
:src=
"detail.avatar"
/>
</a>
{{
detail
.
nickname
}}
</el-col>
<el-col
:span=
"6"
>
<label>
手机号:
</label>
{{
detail
.
mobile
}}
</el-col>
<el-col
:span=
"6"
>
<label>
生日:
</label>
{{
detail
.
birthday
}}
</el-col>
<el-col
:span=
"6"
>
<label>
等级:
</label>
{{
detail
.
level
}}
</el-col>
</el-row>
<el-row>
<el-col
:span=
"6"
>
<label>
老师ID:
</label>
{{
detail
.
teacher_id
}}
</el-col>
<el-col
:span=
"6"
>
<label>
邀请类型:
</label>
{{
detail
.
invite_type
|
inviteType
}}
</el-col>
<el-col
:span=
"6"
>
<label>
邀请人ID:
</label>
{{
detail
.
invite_user_id
}}
</el-col>
<el-col
:span=
"6"
>
<label>
邀请码:
</label>
{{
detail
.
invite_code
}}
</el-col>
</el-row>
<el-row>
<el-col
:span=
"6"
>
<label>
注册时间:
</label>
{{
detail
.
created_at
}}
</el-col>
<el-col
:span=
"6"
>
<label>
最后登录:
</label>
{{
detail
.
last_login_at
}}
</el-col>
</el-row>
</div>
<div
class=
"b-title"
>
期数列表
</div>
<el-table
:data=
"periodList"
style=
"width: 100%"
>
<el-table-column
prop=
"id"
label=
"ID"
>
</el-table-column>
<el-table-column
prop=
"periods_title"
label=
"期数名称"
>
</el-table-column>
<el-table-column
label=
"开课权限"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
is_view_course
===
1
?
'开'
:
'关'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"老师"
>
<
template
slot-scope=
"scope"
>
<img
class=
"avatar"
:src=
"scope.row.teacher_qr"
>
{{
scope
.
row
.
teacher_name
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"join_num"
label=
"加入人数"
>
</el-table-column>
<el-table-column
prop=
"max_join_num"
label=
"最大加入人数"
>
</el-table-column>
<el-table-column
prop=
"start_at"
label=
"开课时间"
>
</el-table-column>
<el-table-column
prop=
"created_at"
label=
"创建时间"
>
</el-table-column>
</el-table>
<div
class=
"b-title"
>
订单列表
</div>
<el-table
:data=
"userList"
style=
"width: 100%"
>
...
...
@@ -66,14 +155,16 @@
label
=
"创建时间"
>
<
/el-table-column
>
<
/el-table
>
<
page
:
total
=
"total"
v
-
model
=
"nowPage"
/>
<
page
:
total
=
"total"
:
limit
=
"limit"
@
pageChange
=
"onPageChange"
/>
<
teacher
-
dialog
:
dialogObj
=
"dialogObj"
@
reflash
=
"getDetail"
><
/teacher-dialog
>
<
/div
>
<
/template
>
<
script
>
import
{
getOrderListApi
}
from
"../../service/api"
;
import
{
getOrderListApi
,
getUserDetailApi
}
from
"../../service/api"
;
import
page
from
'../framework/page'
import
{
INVITETYPE
,
ORDERSTATUS
,
BUYTYPE
}
from
"../../util/wordbook"
;
import
teacherDialog
from
'./dialog'
export
default
{
name
:
"index"
,
data
(){
...
...
@@ -81,25 +172,60 @@
userList
:[],
total
:
0
,
nowPage
:
1
,
id
:
''
limit
:
3
,
id
:
''
,
detail
:
{
}
,
periodList
:
[],
dialogObj
:{
show
:
false
,
title
:
'绑定老师'
,
id
:
0
,
teacher_id
:
0
}
}
}
,
components
:{
page
page
,
teacherDialog
}
,
mounted
(){
this
.
id
=
this
.
$route
.
params
.
id
;
this
.
getDetail
()
this
.
getUser
()
}
,
methods
:{
onPageChange
(
val
){
this
.
nowPage
=
val
;
this
.
getUser
();
}
,
getUser
(){
let
json
=
{
user_id
:
this
.
id
user_id
:
this
.
id
,
limit
:
this
.
limit
,
page
:
this
.
nowPage
}
getOrderListApi
(
json
).
then
(
res
=>
{
this
.
userList
=
res
.
list
;
this
.
total
=
res
.
total
}
)
}
,
getDetail
(){
if
(
!
this
.
id
)
return
;
getUserDetailApi
(
this
.
id
).
then
(
res
=>
{
this
.
detail
=
res
if
(
res
.
periods_list
)
{
this
.
periodList
=
res
.
periods_list
}
}
)
}
,
bindTeacher
(){
let
data
=
this
.
detail
this
.
dialogObj
=
{
show
:
true
,
title
:
'绑定老师'
,
id
:
data
.
user_id
,
teacher_id
:
data
.
teacher_id
}
}
}
,
filters
:{
...
...
@@ -129,13 +255,51 @@
@
import
"../../util/public"
;
.
avatar
{
width
:
50
px
;
border
-
radius
:
50
%
;
}
.
user
{
height
:
100
%
;
overflow
:
auto
;
padding
:
20
px
0
;
/*padding: 20px 0;*/
.
btn
-
content
{
text
-
align
:
center
;
}
}
.
header
{
padding
:
0
20
px
;
margin
-
bottom
:
20
px
;
}
.
header
{
.
el
-
row
{
display
:
flex
;
justify
-
content
:
flex
-
start
;
align
-
items
:
center
;
color
:
#
666
;
font
-
size
:
16
px
;
margin
:
25
px
0
;
label
{
margin
-
right
:
10
px
;
}
}
.
avatar
{
margin
-
right
:
10
px
;
}
}
.
el
-
col
{
/*height: 50px;*/
display
:
flex
;
justify
-
content
:
flex
-
start
;
align
-
items
:
center
;
img
{
width
:
50
px
;
border
-
radius
:
100
px
;
}
label
{
color
:
#
5982
e6
;
}
}
.
b
-
title
{
padding
:
20
px
;
color
:
#
666
;
}
<
/style
>
src/components/weChat/autoReplyDialog.vue
View file @
be3bbbef
...
...
@@ -151,7 +151,7 @@
},
addContent
(
type
,
content
,
mediaId
)
{
let
_form
=
this
.
form
;
let
_desc
=
JSON
.
parse
(
_form
.
desc
)
;
let
_desc
=
_form
.
desc
?
JSON
.
parse
(
_form
.
desc
)
:
[]
;
let
obj
=
{};
if
(
content
)
{
obj
=
{
...
...
src/components/weChat/focusReply.vue
View file @
be3bbbef
...
...
@@ -4,9 +4,14 @@
<span
class=
"title"
>
自动回复
</span>
<el-button
type=
"success"
plain
style=
"float: right"
@
click=
"add"
v-if=
"!$store.state.readonly"
>
添加回复
</el-button>
</div>
<el-tabs
v-model=
"activeName"
type=
"card"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"新用户"
name=
"focus_reply_new"
></el-tab-pane>
<el-tab-pane
label=
"无课用户"
name=
"focus_reply_no_course"
></el-tab-pane>
<el-tab-pane
label=
"有课用户"
name=
"focus_reply_course"
></el-tab-pane>
</el-tabs>
<el-table
:data=
"list"
style=
"width: 100%"
style=
"width: 100%
;
"
max-height=
"800"
>
<el-table-column
fixed
...
...
@@ -68,7 +73,7 @@
<
script
>
import
dialogCom
from
'./focusReplyDialog'
import
{
updateConfigApi
,
saveConfigApi
,
get
MediaListApi
,
get
ConfigListApi
}
from
"../../service/api"
;
import
{
updateConfigApi
,
saveConfigApi
,
getConfigListApi
}
from
"../../service/api"
;
import
page
from
'../framework/page'
export
default
{
name
:
"focusReply"
,
...
...
@@ -77,11 +82,13 @@
loading
:
false
,
total
:
0
,
nowPage
:
1
,
limit
:
10
,
activeName
:
'focus_reply_new'
,
id
:
null
,
list
:
[],
form
:{
key
:
'focus_reply'
,
value
:
'focus_reply'
,
key
:
'focus_reply
_new
'
,
value
:
'focus_reply
_new
'
,
desc
:
''
},
content
:
''
,
...
...
@@ -150,6 +157,18 @@
}
},
methods
:{
handleClick
(
tab
)
{
console
.
log
(
tab
.
name
);
this
.
form
=
{
key
:
tab
.
name
,
value
:
tab
.
name
,
desc
:
''
}
this
.
nowPage
=
1
;
this
.
getList
();
this
.
id
=
''
;
},
save
(){
let
json
=
this
.
form
let
_desc
=
[];
...
...
@@ -192,31 +211,6 @@
})
}
},
getMediaList
(
type
){
let
json
=
{
type
:
type
,
page
:
this
.
nowPage
};
this
.
loading
=
true
;
getMediaListApi
(
json
).
then
(
res
=>
{
this
.
loading
=
false
;
this
.
type
=
type
;
this
.
total
=
res
.
total_count
;
if
(
res
.
item
.
length
===
0
)
{
this
.
$message
({
showClose
:
true
,
message
:
'暂无数据'
});
this
.
showMedia
=
false
;
}
else
{
this
.
showMedia
=
true
;
this
.
mediaList
=
res
.
item
;
}
}).
catch
(()
=>
{
this
.
loading
=
false
;
this
.
showMedia
=
false
;
})
},
onChooseMedia
(
val
){
this
.
addContent
(
this
.
type
,
val
.
url
,
val
.
media_id
);
this
.
showMedia
=
false
;
...
...
@@ -235,22 +229,13 @@
this
.
imageContent
=
obj
},
getList
(){
getConfigListApi
({
key
:
'focus_reply'
}).
then
(
res
=>
{
getConfigListApi
({
key
:
this
.
form
.
key
}).
then
(
res
=>
{
if
(
res
.
list
.
length
>
0
)
{
this
.
id
=
res
.
list
[
0
].
id
;
console
.
log
(
'res.list[0].desc'
,
res
.
list
[
0
].
desc
)
let
_desc
=
JSON
.
parse
(
res
.
list
[
0
].
desc
);
this
.
list
=
_desc
||
[];
// this.type = _desc[0].type;
// if (this.type === 'text') {
// this.content = _desc[0].content
// } else if (this.type === 'image') {
// this.imageContent = {
// type: 'image',
// content: _desc[0].content,
// media_id: _desc[0].media_id
// }
// }
}
else
{
this
.
list
=
[]
}
})
},
...
...
@@ -259,7 +244,9 @@
show
:
true
,
id
:
this
.
id
?
this
.
id
:
null
,
index
:
-
1
,
list
:
this
.
list
list
:
this
.
list
,
key
:
this
.
form
.
key
,
value
:
this
.
form
.
value
}
},
editRow
(
index
,
row
){
...
...
@@ -267,15 +254,17 @@
show
:
true
,
id
:
this
.
id
,
index
:
index
,
list
:
this
.
list
list
:
this
.
list
,
key
:
this
.
form
.
key
,
value
:
this
.
form
.
value
}
},
deleteRow
(
index
,
list
){
let
desc
=
list
;
desc
.
splice
(
index
,
1
);
let
json
=
{
key
:
'focus_reply'
,
value
:
'focus_reply'
key
:
this
.
form
.
key
,
value
:
this
.
form
.
value
}
json
.
desc
=
JSON
.
stringify
(
desc
)
this
.
$confirm
(
'此操作将删除该文件, 是否继续?'
,
'提示'
,
{
...
...
@@ -304,8 +293,8 @@
this
.
list
[
second
]
=
_first
;
let
desc
=
this
.
list
;
let
json
=
{
key
:
'focus_reply'
,
value
:
'focus_reply'
key
:
this
.
form
.
key
,
value
:
this
.
form
.
value
}
json
.
desc
=
JSON
.
stringify
(
desc
)
updateConfigApi
(
this
.
id
,
json
).
then
(
res
=>
{
...
...
@@ -316,8 +305,8 @@
this
.
getList
();
})
},
changeShow
(){
this
.
dialogObj
.
show
=
false
;
changeShow
(
val
){
this
.
dialogObj
.
show
=
val
;
}
}
}
...
...
src/components/weChat/focusReplyDialog.vue
View file @
be3bbbef
...
...
@@ -2,8 +2,7 @@
<el-dialog
title=
"自动回复"
center
:visible
.
sync=
"show"
:close=
"close"
:visible
.
sync=
"dialogObj.show"
width=
"800px"
>
<div
class=
"focus-reply"
>
<div
class=
"content"
>
...
...
@@ -85,8 +84,8 @@
list
:
[],
index
:
-
1
,
form
:{
key
:
'
focus_reply
'
,
value
:
'
focus_reply
'
,
key
:
''
,
value
:
''
,
desc
:
''
},
content
:
''
,
...
...
@@ -131,10 +130,11 @@
},
methods
:{
initDialog
(){
this
.
show
=
this
.
dialogObj
.
show
;
if
(
this
.
dialogObj
.
id
)
{
this
.
id
=
this
.
dialogObj
.
id
;
}
this
.
form
.
key
=
this
.
dialogObj
.
key
;
this
.
form
.
value
=
this
.
dialogObj
.
value
;
this
.
index
=
this
.
dialogObj
.
index
this
.
list
=
this
.
dialogObj
.
list
||
[]
if
(
this
.
index
===
-
1
)
{
...
...
@@ -172,15 +172,12 @@
type
:
this
.
type
,
content
:
this
.
content
};
console
.
log
(
'index'
,
this
.
index
)
if
(
this
.
index
>
-
1
)
{
_desc
[
this
.
index
]
=
obj
}
else
{
_desc
.
push
(
obj
)
}
console
.
log
(
'save contennt _desc'
,
_desc
);
}
else
if
(
this
.
type
===
'image'
)
{
console
.
log
(
'image'
);
if
(
!
this
.
imageContent
)
{
this
.
$message
({
showClose
:
true
,
...
...
@@ -194,7 +191,6 @@
_desc
.
push
(
this
.
imageContent
)
}
}
console
.
log
(
'save contennt _desc'
,
_desc
);
json
.
desc
=
JSON
.
stringify
(
_desc
)
if
(
this
.
id
)
{
updateConfigApi
(
this
.
id
,
json
).
then
(
res
=>
{
...
...
@@ -260,7 +256,7 @@
this
.
imageContent
=
obj
},
getList
(){
getConfigListApi
({
key
:
'focus_reply'
}).
then
(
res
=>
{
getConfigListApi
({
key
:
this
.
form
.
key
}).
then
(
res
=>
{
if
(
res
.
total
>
0
)
{
this
.
id
=
res
.
list
[
0
].
id
;
let
_desc
=
JSON
.
parse
(
res
.
list
[
0
].
desc
);
...
...
@@ -275,7 +271,6 @@
media_id
:
_desc
[
0
].
media_id
}
}
console
.
log
(
'this.type'
,
_desc
)
}
})
},
...
...
src/router/index.js
View file @
be3bbbef
...
...
@@ -19,9 +19,9 @@ const router =new Router({
component
:
e
=>
require
([
'@/components/main'
],
e
),
},
{
path
:
'/user
Order
/:id'
,
name
:
'user
Order
'
,
component
:
e
=>
require
([
'@/components/user
Order
'
],
e
),
path
:
'/user
Detail
/:id'
,
name
:
'user
Detail
'
,
component
:
e
=>
require
([
'@/components/user
Detail
'
],
e
),
},
{
path
:
'/teacher/:id'
,
...
...
src/service/api.js
View file @
be3bbbef
...
...
@@ -60,8 +60,8 @@ export const getTeacherListApi = function (json) {
};
//获取教师详情
const
getTeacherDetailUrl
=
`
${
_baseUrl
}
api/admin/teacher/info`
;
export
const
getTeacherDetailApi
=
function
(
id
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
getTeacherDetailUrl
}
/
${
id
}
`
)
export
const
getTeacherDetailApi
=
function
(
id
,
json
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
getTeacherDetailUrl
}
/
${
id
}
`
,
json
)
};
//添加教师
const
addTeacherUrl
=
`
${
_baseUrl
}
api/admin/teacher/add`
;
...
...
@@ -470,7 +470,7 @@ export const addBoxTypeApi = function (json) {
// 用户关联老师
const
addRelatedTeacherUrl
=
`
${
_baseUrl
}
api/admin/student/bind/`
;
export
const
addRelatedTeacherApi
=
function
(
id
,
json
)
{
return
Vue
.
prototype
.
$put
(
`
${
addRelatedTeacherUrl
}
/
${
id
}
`
,
json
)
return
Vue
.
prototype
.
$put
(
`
${
addRelatedTeacherUrl
}${
id
}
`
,
json
)
};
// 操作日志
const
getAdminLogListUrl
=
`
${
_baseUrl
}
api/admin/user/log`
;
...
...
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