Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-merchant-data
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8beeef96
authored
Mar 21, 2019
by
liwk
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交代码
1 parent
9d2cbddb
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
82 deletions
package.json
src/api/bussinessListApi.js
src/api/index.js
src/api/sign.js
src/views/customer/businessList/index.vue
package.json
View file @
8beeef9
...
@@ -9,8 +9,10 @@
...
@@ -9,8 +9,10 @@
},
},
"dependencies"
:
{
"dependencies"
:
{
"axios"
:
"^0.18.0"
,
"axios"
:
"^0.18.0"
,
"blueimp-md5"
:
"^2.10.0"
,
"glsx-vue-common"
:
"^1.1.14"
,
"glsx-vue-common"
:
"^1.1.14"
,
"glsx-vue-components"
:
"^1.0.13"
,
"glsx-vue-components"
:
"^1.0.13"
,
"js-md5"
:
"^0.7.3"
,
"node-sass"
:
"^4.9.3"
,
"node-sass"
:
"^4.9.3"
,
"sass-loader"
:
"^7.1.0"
,
"sass-loader"
:
"^7.1.0"
,
"vee-validate"
:
"^2.1.7"
,
"vee-validate"
:
"^2.1.7"
,
...
...
src/api/bussinessListApi.js
View file @
8beeef9
import
{
GlAxios
}
from
'glsx-vue-common'
const
path
=
'/glsx.accounts.admin.merchant.'
const
path
=
'/glsx.accounts.admin.merchant.'
const
__sGetList
=
`
${
path
}
search`
const
methods
=
{
const
__sDetail
=
`
${
path
}
detail`
Search
:
`
${
path
}
search`
,
const
__sPersonal
=
`
${
path
}
personal`
Detail
:
`
${
path
}
detail`
,
const
__sGroup
=
`
${
path
}
group`
Personal
:
`
${
path
}
personal`
,
const
__sSaveMerchant
=
`
${
path
}
create`
Group
:
`
${
path
}
group`
,
const
__sLevel
=
`
${
path
}
group.level`
Create
:
`
${
path
}
create`
,
GroupLevel
:
`
${
path
}
group.level`
// 获取商户列表(根据条件获取商户列表)
const
getList
=
{
p
:
[
__sGetList
],
req
:
params
=>
GlAxios
.
get
(
__sGetList
,
{
params
})
}
}
// 获取商户详情(通过商户id获取商户详情)
const
merchantDetail
=
{
p
:
[
__sDetail
],
req
:
params
=>
GlAxios
.
get
(
__sDetail
,
{
params
})
}
// 获取员工信息(通过商户id获取员工信息)
const
merchantPersonal
=
{
p
:
[
__sPersonal
],
req
:
params
=>
GlAxios
.
get
(
__sPersonal
,
{
params
})
}
// 获取分组信息(通过商户id获取分组信息)
const
merchantGroup
=
{
p
:
[
__sGroup
],
req
:
params
=>
GlAxios
.
get
(
__sGroup
,
{
params
})
}
// 新增商户
const
saveMerchant
=
{
p
:
[
__sSaveMerchant
],
req
:
params
=>
GlAxios
.
get
(
__sSaveMerchant
,
{
params
})
}
// 根据分组跟商户查询父子商户
const
merchantGroupLevel
=
{
p
:
[
__sLevel
],
req
:
params
=>
GlAxios
.
get
(
__sLevel
,
{
params
})
}
export
{
export
{
getList
,
methods
merchantDetail
,
merchantPersonal
,
merchantGroup
,
saveMerchant
,
merchantGroupLevel
}
}
src/api/index.js
View file @
8beeef9
import
{
import
{
getBusinessList
GlAxios
}
from
'./businessManagement'
}
from
'glsx-vue-common'
import
{
sign
}
from
'./sign'
import
{
import
{
getList
,
methods
as
bizMethods
merchantDetail
,
merchantPersonal
,
merchantGroup
,
saveMerchant
,
merchantGroupLevel
}
from
'./bussinessListApi'
}
from
'./bussinessListApi'
const
request
=
{
req
:
params
=>
{
const
url
=
process
.
env
.
NODE_ENV
===
'production'
?
'router'
:
params
.
methods
return
GlAxios
.
get
(
url
,
{
'params'
:
sign
(
params
)
})
}
}
export
{
export
{
getBusinessList
,
bizMethods
,
getList
,
request
merchantDetail
,
merchantPersonal
,
merchantGroup
,
saveMerchant
,
merchantGroupLevel
}
}
src/api/sign.js
0 → 100644
View file @
8beeef9
import
MD5
from
'js-md5'
const
sign
=
params
=>
{
const
secret
=
'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
const
keys
=
Object
.
keys
(
params
).
sort
()
var
str
=
[]
keys
.
forEach
(
e
=>
{
str
.
push
(
e
+
params
[
e
])
})
console
.
log
(
str
)
params
.
sign
=
MD5
(
secret
+
str
.
join
(
''
)
+
secret
)
console
.
log
(
params
.
sign
)
return
params
}
export
{
sign
}
src/views/customer/businessList/index.vue
View file @
8beeef9
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
<
script
>
<
script
>
import
SearchDialog
from
'./SearchDialog'
import
SearchDialog
from
'./SearchDialog'
import
AddDialog
from
'./AddDialog'
import
AddDialog
from
'./AddDialog'
import
{
getList
,
saveMerchant
}
from
'@/api/bussinessListA
pi'
import
{
bizMethods
,
request
}
from
'@/a
pi'
import
notice
from
'@/common/notice'
import
notice
from
'@/common/notice'
export
default
{
export
default
{
name
:
'businessList'
,
name
:
'businessList'
,
...
@@ -150,7 +150,8 @@ export default {
...
@@ -150,7 +150,8 @@ export default {
// 接口请求-start
// 接口请求-start
getList
()
{
getList
()
{
const
params
=
this
.
getParams
()
const
params
=
this
.
getParams
()
getList
.
req
(
params
).
then
(
res
=>
{
params
.
methods
=
bizMethods
.
Search
request
.
req
(
params
).
then
(
res
=>
{
this
.
ListTableData
.
data
=
res
.
merchants
this
.
ListTableData
.
data
=
res
.
merchants
this
.
total
=
res
.
pagination
.
totalCount
this
.
total
=
res
.
pagination
.
totalCount
this
.
reset
(
this
.
merchantSearch
)
this
.
reset
(
this
.
merchantSearch
)
...
@@ -161,7 +162,7 @@ export default {
...
@@ -161,7 +162,7 @@ export default {
})
})
},
},
saveMerchant
()
{
saveMerchant
()
{
saveMerchan
t
.
req
(
this
.
merchantForm
).
then
(
res
=>
{
reques
t
.
req
(
this
.
merchantForm
).
then
(
res
=>
{
notice
.
okTips
()
notice
.
okTips
()
this
.
reset
(
this
.
merchantForm
)
this
.
reset
(
this
.
merchantForm
)
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment