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
6ed46280
Commit
6ed46280
authored
Oct 25, 2018
by
wangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加菜单
parent
c8337286
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
333 additions
and
13 deletions
+333
-13
index.js
config/index.js
+2
-2
userList.vue
src/components/class/userList.vue
+2
-2
index.vue
src/components/groupSend/index.vue
+13
-0
index.vue
src/components/orderCount/index.vue
+7
-1
dialog.vue
src/components/qrcode/dialog.vue
+89
-0
index.vue
src/components/qrcode/index.vue
+144
-0
index.vue
src/components/userDetail/index.vue
+44
-7
api.js
src/service/api.js
+10
-0
menuList.js
src/util/menuList.js
+22
-1
No files found.
config/index.js
View file @
6ed46280
...
@@ -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/class/userList.vue
View file @
6ed46280
...
@@ -411,8 +411,8 @@
...
@@ -411,8 +411,8 @@
getUser
(){
getUser
(){
let
json
=
{
let
json
=
{
page
:
this
.
nowPage
,
page
:
this
.
nowPage
,
limit
:
this
.
limit
limit
:
5
}
}
;
if
(
this
.
searchFrom
.
userId
)
{
if
(
this
.
searchFrom
.
userId
)
{
json
.
user_id
=
this
.
searchFrom
.
userId
json
.
user_id
=
this
.
searchFrom
.
userId
}
}
...
...
src/components/groupSend/index.vue
0 → 100644
View file @
6ed46280
<
template
>
</
template
>
<
script
>
export
default
{
name
:
"index"
}
</
script
>
<
style
scoped
>
</
style
>
src/components/orderCount/index.vue
View file @
6ed46280
...
@@ -80,10 +80,16 @@
...
@@ -80,10 +80,16 @@
this
.
initPage
()
this
.
initPage
()
},
},
methods
:{
methods
:{
Div
:
function
(
arg1
,
arg2
)
{
var
r1
=
arg1
.
toString
(),
r2
=
arg2
.
toString
(),
m
,
resultVal
,
d
=
arguments
[
2
];
m
=
(
r2
.
split
(
"."
)[
1
]
?
r2
.
split
(
"."
)[
1
].
length
:
0
)
-
(
r1
.
split
(
"."
)[
1
]
?
r1
.
split
(
"."
)[
1
].
length
:
0
);
resultVal
=
Number
(
r1
.
replace
(
"."
,
""
))
/
Number
(
r2
.
replace
(
"."
,
""
))
*
Math
.
pow
(
10
,
m
);
return
typeof
d
!==
"number"
?
Number
(
resultVal
)
:
Number
(
resultVal
.
toFixed
(
parseInt
(
d
)));
},
initPage
(){
initPage
(){
getGoodsListApi
({
limit
:
99999
}).
then
(
res
=>
{
getGoodsListApi
({
limit
:
99999
}).
then
(
res
=>
{
res
.
list
.
forEach
(
i
=>
{
res
.
list
.
forEach
(
i
=>
{
i
.
current_price
=
(
i
.
current_price
/
100
).
toFixed
(
2
);
i
.
current_price
=
(
this
.
Div
(
i
.
current_price
,
100
)
);
this
.
searchFrom
.
priceList
.
push
(
i
.
current_price
)
this
.
searchFrom
.
priceList
.
push
(
i
.
current_price
)
});
});
this
.
goodsList
=
res
.
list
this
.
goodsList
=
res
.
list
...
...
src/components/qrcode/dialog.vue
0 → 100644
View file @
6ed46280
<
template
>
<el-dialog
title=
"新建二维码"
:visible
.
sync=
"newObj.show"
>
<el-form
label-width=
"100px"
>
<el-form-item
label=
"标题"
>
<el-input
v-model=
"form.title"
/>
</el-form-item>
<el-form-item
label=
"二维码类型"
>
<el-select
v-model=
"form.type"
placeholder=
"请选择"
>
<el-option
v-for=
"item in typeOption"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"推广码"
>
<el-input
v-model=
"form.invite_code"
/>
</el-form-item>
<el-form-item
label=
"状态"
>
<el-select
v-model=
"form.status"
placeholder=
"请选择"
>
<el-option
v-for=
"item in statusOption"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"结束时间"
>
<el-date-picker
v-model=
"form.end_at"
type=
"date"
format=
"yyyy-MM-dd"
placeholder=
"选择日期"
>
</el-date-picker>
</el-form-item>
</el-form>
</el-dialog>
</
template
>
<
script
>
import
{
createQrCodeApi
}
from
"../../service/api"
;
export
default
{
name
:
"dialog"
,
props
:[
'newObj'
],
data
(){
return
{
form
:{
title
:
null
,
type
:
null
,
invite_code
:
null
,
status
:
null
,
end_at
:
null
},
typeOption
:[
{
label
:
'请选择'
,
value
:
''
},{
label
:
'永久'
,
value
:
1
},{
label
:
'临时'
,
value
:
2
},
],
statusOption
:[
{
label
:
'请选择'
,
value
:
''
},{
label
:
'正常'
,
value
:
1
},{
label
:
'禁用'
,
value
:
2
},
],
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/components/qrcode/index.vue
0 → 100644
View file @
6ed46280
<
template
>
<div>
<el-form
label-width=
"100px"
inline=
""
>
<el-form-item
label=
"标题"
>
<el-input/>
</el-form-item>
<el-form-item
label=
"二维码类型"
>
<el-select
v-model=
"searchFrom.type"
placeholder=
"请选择"
>
<el-option
v-for=
"item in typeOption"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"渠道类型"
>
<el-select
v-model=
"searchFrom.code_type"
placeholder=
"请选择"
>
<el-option
v-for=
"item in code_typeOption"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"状态"
>
<el-select
v-model=
"searchFrom.status"
placeholder=
"请选择"
>
<el-option
v-for=
"item in statusOption"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
""
>
<el-button
@
click=
"initPage"
type=
"primary"
plain
>
搜索
</el-button>
</el-form-item>
<el-form-item
label=
""
>
<el-button
type=
"success"
plain
@
click=
"newObj.show = true"
>
创建二维码
</el-button>
</el-form-item>
</el-form>
<el-table
style=
"width: 100%"
:data=
"list"
>
<el-table-column
prop=
"title"
label=
"日期"
>
</el-table-column>
</el-table>
<dialog-div
:newObj=
"newObj"
></dialog-div>
</div>
</
template
>
<
script
>
import
dialogDiv
from
'./dialog'
import
{
getQrCodeListApi
}
from
"../../service/api"
;
export
default
{
name
:
"index"
,
data
(){
return
{
newObj
:{
show
:
false
,
},
list
:[],
limit
:
10
,
typeOption
:[
{
label
:
'请选择'
,
value
:
''
},{
label
:
'永久'
,
value
:
1
},{
label
:
'临时'
,
value
:
2
},
],
code_typeOption
:[
{
label
:
'请选择'
,
value
:
''
},{
label
:
'渠道'
,
value
:
1
},{
label
:
'用户'
,
value
:
2
},
],
statusOption
:[
{
label
:
'请选择'
,
value
:
''
},{
label
:
'正常'
,
value
:
1
},{
label
:
'禁用'
,
value
:
2
},
],
total
:
0
,
searchFrom
:{
title
:
''
,
type
:
''
,
code_type
:
''
,
status
:
''
}
}
},
components
:{
dialogDiv
,
},
mounted
(){
this
.
initPage
()
},
methods
:{
initPage
(){
let
json
=
{
title
:
this
.
searchFrom
.
title
,
type
:
this
.
searchFrom
.
title
,
code_type
:
this
.
searchFrom
.
title
,
status
:
this
.
searchFrom
.
title
,
limit
:
this
.
limit
};
getQrCodeListApi
(
json
).
then
(
res
=>
{
this
.
list
=
res
.
list
;
this
.
total
=
res
.
total
})
}
}
}
</
script
>
<
style
scoped
lang=
"less"
>
@import "../../util/public";
.text-r{
padding: 10px;
text-align: right;
}
</
style
>
src/components/userDetail/index.vue
View file @
6ed46280
...
@@ -115,9 +115,9 @@
...
@@ -115,9 +115,9 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"
开
课权限"
>
label=
"
看
课权限"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
is_view_course
===
1
?
'
开'
:
'关
'
}}
{{
scope
.
row
.
is_view_course
===
1
?
'
是'
:
'否
'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
...
@@ -153,7 +153,34 @@
...
@@ -153,7 +153,34 @@
<div
class=
"b-title"
>
订单列表
</div>
<div
class=
"b-title"
>
订单列表
</div>
<el-table
<el-table
:data=
"userList"
:data=
"userList"
@
expand-change=
"changeRow2"
style=
"width: 100%"
>
style=
"width: 100%"
>
<el-table-column
type=
"expand"
>
<
template
slot-scope=
"scope"
>
<el-table
:border=
"false"
empty-text=
"无退款数据"
:data=
"scope.row.refundList"
>
<el-table-column
prop=
"refund_no"
label=
"退款编号"
>
</el-table-column>
<el-table-column
label=
"退款金额"
>
<template
slot-scope=
"item"
>
{{
item
.
row
.
refund_money
|
moneytFilter
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"desc"
label=
"备注"
>
</el-table-column>
</el-table>
</template>
</el-table-column>
<el-table-column
<el-table-column
prop=
"out_trade_no"
prop=
"out_trade_no"
label=
"订单号"
>
label=
"订单号"
>
...
@@ -220,7 +247,7 @@
...
@@ -220,7 +247,7 @@
<
/template
>
<
/template
>
<
script
>
<
script
>
import
{
getOrderListApi
,
getUserDetailApi
,
getPeriodsStatisticsApi
}
from
"../../service/api"
;
import
{
getOrderListApi
,
getUserDetailApi
,
getPeriodsStatisticsApi
,
getRefundListApi
}
from
"../../service/api"
;
import
page
from
'../framework/page'
import
page
from
'../framework/page'
import
{
INVITETYPE
,
ORDERSTATUS
,
BUYTYPE
}
from
"../../util/wordbook"
;
import
{
INVITETYPE
,
ORDERSTATUS
,
BUYTYPE
}
from
"../../util/wordbook"
;
import
teacherDialog
from
'./dialog'
import
teacherDialog
from
'./dialog'
...
@@ -250,10 +277,17 @@
...
@@ -250,10 +277,17 @@
}
,
}
,
mounted
(){
mounted
(){
this
.
id
=
this
.
$route
.
params
.
id
;
this
.
id
=
this
.
$route
.
params
.
id
;
this
.
getDetail
()
this
.
getDetail
()
;
this
.
getUser
()
this
.
getUser
()
}
,
}
,
methods
:{
methods
:{
changeRow2
(
data
,
b
){
if
(
b
.
indexOf
(
data
)
>-
1
){
getRefundListApi
({
out_trade_no
:
data
.
out_trade_no
}
).
then
(
res
=>
{
data
.
refundList
=
res
.
list
}
)
}
}
,
changeRow
(
data
,
b
){
changeRow
(
data
,
b
){
this
.
list
=
[];
this
.
list
=
[];
if
(
b
.
indexOf
(
data
)
>-
1
){
if
(
b
.
indexOf
(
data
)
>-
1
){
...
@@ -279,9 +313,12 @@
...
@@ -279,9 +313,12 @@
user_id
:
this
.
id
,
user_id
:
this
.
id
,
limit
:
this
.
limit
,
limit
:
this
.
limit
,
page
:
this
.
nowPage
,
page
:
this
.
nowPage
,
status
:
1
status
:
'1,3'
}
}
;
getOrderListApi
(
json
).
then
(
res
=>
{
getOrderListApi
(
json
).
then
(
res
=>
{
res
.
list
.
forEach
(
i
=>
{
i
.
refundList
=
[]
}
);
this
.
userList
=
res
.
list
;
this
.
userList
=
res
.
list
;
this
.
total
=
res
.
total
this
.
total
=
res
.
total
}
)
}
)
...
@@ -289,7 +326,7 @@
...
@@ -289,7 +326,7 @@
getDetail
(){
getDetail
(){
if
(
!
this
.
id
)
return
;
if
(
!
this
.
id
)
return
;
getUserDetailApi
(
this
.
id
).
then
(
res
=>
{
getUserDetailApi
(
this
.
id
).
then
(
res
=>
{
this
.
detail
=
res
this
.
detail
=
res
;
if
(
res
.
periods_list
)
{
if
(
res
.
periods_list
)
{
this
.
periodList
=
res
.
periods_list
this
.
periodList
=
res
.
periods_list
}
}
...
...
src/service/api.js
View file @
6ed46280
...
@@ -539,3 +539,13 @@ const changeClassUrl = `/api/admin/change/class`;
...
@@ -539,3 +539,13 @@ const changeClassUrl = `/api/admin/change/class`;
export
const
changeClassApi
=
function
(
json
)
{
export
const
changeClassApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$put
(
changeClassUrl
,
json
)
return
Vue
.
prototype
.
$put
(
changeClassUrl
,
json
)
};
};
// 创建微信推广二维码
const
createQrCodeUrl
=
'/api/admin/create/wechat/qrcode'
;
export
const
createQrCodeApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$post
(
createQrCodeUrl
,
json
)
};
// 获取公众号二维码
const
getQrCodeListUrl
=
'/api/admin/wechat/qrcode/list'
;
export
const
getQrCodeListApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
getQrCodeListUrl
,
json
)
};
src/util/menuList.js
View file @
6ed46280
...
@@ -255,7 +255,28 @@ export default [
...
@@ -255,7 +255,28 @@ export default [
name
:
'banner'
,
name
:
'banner'
,
component
:
e
=>
require
([
'@/components/system/banner'
],
e
),
component
:
e
=>
require
([
'@/components/system/banner'
],
e
),
}
}
}
},
{
value
:
'二维码管理'
,
routerName
:
'qrcode'
,
path
:
'/qrcode'
,
cover
:
'7-6'
,
router
:{
path
:
'/qrcode'
,
name
:
'qrcode'
,
component
:
e
=>
require
([
'@/components/qrcode'
],
e
),
}
},
{
value
:
'群发助手'
,
routerName
:
'groupSend'
,
path
:
'/groupSend'
,
cover
:
'7-7'
,
router
:{
path
:
'/groupSend'
,
name
:
'groupSend'
,
component
:
e
=>
require
([
'@/components/groupSend'
],
e
),
}
},
]
]
},{
},{
name
:
''
,
name
:
''
,
...
...
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