Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
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
bp
op-web-service
Commits
ec879c13
Commit
ec879c13
authored
May 28, 2021
by
mengwenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 接口的封装
parent
1f52d687
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
194 additions
and
81 deletions
+194
-81
system.js
server/controllers/system.js
+8
-11
index.vue
src/pages/Enterprise/Audit/index.vue
+149
-50
index.vue
src/pages/Enterprise/Certification/index.vue
+25
-15
enterprise.js
src/service/enterprise.js
+12
-5
No files found.
server/controllers/system.js
View file @
ec879c13
const
{
LOGIN_URI
,
API_INTERNAL_URI
}
=
require
(
'../config.js'
)
const
req
=
require
(
'../utils/request'
).
httpReq
const
{
LOGIN_URI
,
API_INTERNAL_URI
}
=
require
(
"../config.js"
);
const
req
=
require
(
"../utils/request"
).
httpReq
;
/**
* 用户登录校验,用于校验是否是公司员工, 目前使用pandora系统的登录验证
...
...
@@ -8,10 +8,10 @@ exports.login = async (ctx, next) => {
const
url
=
`
${
LOGIN_URI
}
/api/v1/pandora/auth`
;
const
opts
=
{
url
,
method
:
'POST'
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
}
body
:
ctx
.
request
.
body
}
;
// ctx.body = await req(ctx, opts)
const
userInfo
=
await
req
(
ctx
,
opts
);
...
...
@@ -42,13 +42,10 @@ exports.login = async (ctx, next) => {
// active: true
// }
// }
if
(
typeof
userInfo
===
'string'
)
{
ctx
.
body
=
{
status
:
'fail'
,
message
:
userInfo
};
}
else
{
if
(
typeof
userInfo
===
"string"
)
{
ctx
.
body
=
{
status
:
"fail"
,
message
:
userInfo
};
}
console
.
log
(
43444
,
userInfo
,
typeof
userInfo
);
// if userInfo
}
};
src/pages/Enterprise/Audit/index.vue
View file @
ec879c13
This diff is collapsed.
Click to expand it.
src/pages/Enterprise/Certification/index.vue
View file @
ec879c13
...
...
@@ -148,17 +148,17 @@
<el-button
size=
"mini"
type=
"primary"
@
click=
"goAuditPage('AUDIT',scope.row.id)"
@
click=
"goAuditPage('AUDIT',
scope.row.id)"
>
审核
</el-button>
<el-button
size=
"mini"
type=
"success"
@
click=
"goAuditPage('EDIT',scope.row.id)"
@
click=
"goAuditPage('EDIT',
scope.row.id)"
>
修改提交
</el-button>
<el-button
size=
"mini"
type=
"warning"
@
click=
"goAuditPage('DETAIL',scope.row.id)"
@
click=
"goAuditPage('DETAIL',
scope.row.id)"
>
查看详情
</el-button>
</
template
>
</el-table-column>
...
...
@@ -171,9 +171,10 @@
<
style
lang=
"less"
src=
"./index.less"
scope
></
style
>
<
script
>
import
Layout
from
'@/layouts'
import
Layout
from
"@/layouts"
;
import
{
entCheck
as
entChecked
}
from
"@/service/enterprise"
;
export
default
{
name
:
'Certification'
,
name
:
"Certification"
,
components
:
{
Layout
},
data
()
{
return
{
...
...
@@ -214,10 +215,21 @@ export default {
};
},
created
()
{
},
created
()
{
this
.
entCheck
();
},
methods
:
{
// 获取商户认证检查信息
async
entCheck
()
{
try
{
const
res
=
await
entChecked
(
510232747179
);
console
.
log
(
res
);
}
catch
(
error
)
{
console
.
log
(
error
);
}
},
// 重置表单
resetForm
(
formName
)
{
...
...
@@ -226,20 +238,18 @@ export default {
// 跳转到审核页面
goAuditPage
(
pageStatus
,
auditId
)
{
this
.
$router
.
push
(
{
name
:
"Audit"
,
params
:
{
pageStatus
,
auditId
}
this
.
$router
.
push
({
name
:
"Audit"
,
params
:
{
pageStatus
,
auditId
}
);
}
);
},
// 跳转到企业信息提交
goEstablish
()
{
this
.
$router
.
push
({
name
:
'Establish'
})
this
.
$router
.
push
({
name
:
"Establish"
});
}
}
};
...
...
src/service/enterprise.js
View file @
ec879c13
/**
* 企业请求
*/
import
axios
from
"../utils/request"
;
export
default
{
async
getMessage
()
{
const
res
=
await
axios
.
get
()
console
.
log
(
res
);
}
export
const
entCheck
=
async
user_id
=>
{
const
res
=
await
axios
({
method
:
"GET"
,
url
:
"/api/merchant/inner/ent_check"
,
params
:
{
user_id
}
});
return
res
;
};
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