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
45728d0b
Commit
45728d0b
authored
May 30, 2021
by
mengwenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 接口封装更改
parent
a82b5ed8
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
53 additions
and
47 deletions
+53
-47
config.js
server/config.js
+3
-3
enterprise.js
server/controllers/enterprise.js
+8
-8
router.js
server/router.js
+1
-1
index.vue
src/pages/Enterprise/Audit/index.vue
+1
-0
index.vue
src/pages/Enterprise/Certification/index.vue
+1
-1
index.js
src/router/index.js
+35
-32
enterprise.js
src/service/enterprise.js
+4
-2
No files found.
server/config.js
View file @
45728d0b
...
@@ -8,9 +8,9 @@ const LOGIN_URI = {
...
@@ -8,9 +8,9 @@ const LOGIN_URI = {
}
}
const
API_INTERNAL_URI
=
{
const
API_INTERNAL_URI
=
{
'development'
:
"
bp-test.ini.yidian-inc.com
"
,
'development'
:
"
http://bp-test.ini.yidian-inc.com
"
,
'test'
:
"
bp-test.ini.yidian-inc.com
"
,
'test'
:
"
http://bp-test.ini.yidian-inc.com
"
,
'production'
:
"
bp-test.go2yd.com
"
'production'
:
"
http://bp-test.go2yd.com
"
}
}
module
.
exports
=
{
module
.
exports
=
{
...
...
server/controllers/enterprise.js
View file @
45728d0b
const
LOGIN_URI
=
require
(
"../config.js"
).
LOGIN
_URI
;
const
API_INTERNAL_URI
=
require
(
"../config.js"
).
API_INTERNAL
_URI
;
const
req
=
require
(
"../utils/request"
).
httpReq
;
const
req
=
require
(
"../utils/request"
).
httpReq
;
exports
.
entCheck
=
async
ctx
=>
{
exports
.
entCheck
=
async
(
ctx
,
next
)
=>
{
const
url
=
`
${
LOGIN_URI
}
/merchant/inner/ent_check`
;
const
url
=
`
${
API_INTERNAL_URI
}
/merchant/inner/ent_check`
;
const
{
user_id
}
=
ctx
.
request
.
params
;
const
opts
=
{
const
opts
=
{
url
,
url
,
method
:
"GET"
,
method
:
"GET"
,
json
:
true
,
timeout
:
8000
,
timeout
:
8000
,
params
:
{
body
:
ctx
.
request
.
body
user_id
}
};
};
ctx
.
body
=
await
req
(
ctx
,
opts
)
console
.
log
(
"next:"
,
next
);
console
.
log
(
"参数传递"
,
ctx
.
request
.
query
);
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
};
server/router.js
View file @
45728d0b
...
@@ -8,6 +8,6 @@ const API_VERSION = "/api/v1";
...
@@ -8,6 +8,6 @@ const API_VERSION = "/api/v1";
router
.
post
(
`
${
API_VERSION
}
/login`
,
system
.
login
);
router
.
post
(
`
${
API_VERSION
}
/login`
,
system
.
login
);
router
.
get
(
`
${
API_VERSION
}
/user/:type`
,
user
.
query
);
router
.
get
(
`
${
API_VERSION
}
/user/:type`
,
user
.
query
);
router
.
get
(
`
${
API_VERSION
}
/
merchant/inner/ent_check`
,
enterprise
.
entCheck
)
router
.
get
(
`
${
API_VERSION
}
/
certification/:user_id`
,
enterprise
.
entCheck
);
module
.
exports
=
router
;
module
.
exports
=
router
;
src/pages/Enterprise/Audit/index.vue
View file @
45728d0b
...
@@ -74,6 +74,7 @@
...
@@ -74,6 +74,7 @@
<!-- 修改详情页 -->
<!-- 修改详情页 -->
<el-form
<el-form
v-if=
"pageStatus === 'EDIT' "
:rules=
"messageLishRules"
:rules=
"messageLishRules"
label-width=
"240px"
label-width=
"240px"
ref=
"establish_form"
ref=
"establish_form"
...
...
src/pages/Enterprise/Certification/index.vue
View file @
45728d0b
...
@@ -172,7 +172,7 @@
...
@@ -172,7 +172,7 @@
<
script
>
<
script
>
import
Layout
from
"@/layouts"
;
import
Layout
from
"@/layouts"
;
import
{
entCheck
as
entChecked
}
from
"
@
/service/enterprise"
;
import
{
entCheck
as
entChecked
}
from
"
../../..
/service/enterprise"
;
export
default
{
export
default
{
name
:
"Certification"
,
name
:
"Certification"
,
components
:
{
Layout
},
components
:
{
Layout
},
...
...
src/router/index.js
View file @
45728d0b
import
{
createRouter
,
createWebHistory
}
from
"vue-router"
;
import
{
createRouter
,
createWebHistory
}
from
"vue-router"
;
import
Home
from
"../pages/Home"
;
import
Home
from
"../pages/Home"
;
import
Login
from
"../pages/Login"
;
import
Login
from
"../pages/Login"
;
import
LifeNo
from
'../pages/Life-no/index.vue'
import
LifeNo
from
"../pages/Life-no/index.vue"
;
import
LifeNoDetail
from
'../pages/Life-no/life-no-detail.vue'
import
LifeNoDetail
from
"../pages/Life-no/life-no-detail.vue"
;
import
UserDetail
from
'../pages/User/user-detail.vue'
import
UserDetail
from
"../pages/User/user-detail.vue"
;
import
AddRole
from
'../pages/Role/add-role.vue'
import
AddRole
from
"../pages/Role/add-role.vue"
;
import
Certification
from
"../pages/Enterprise/Certification"
;
import
Establish
from
"../pages/Enterprise/Establish"
;
import
Audit
from
"../pages/Enterprise/Audit"
;
const
routes
=
[
const
routes
=
[
{
{
path
:
"/home"
,
path
:
"/home"
,
name
:
"Home"
,
name
:
"Home"
,
component
:
Home
,
component
:
Home
},
},
{
{
path
:
"/login"
,
path
:
"/login"
,
name
:
"Login"
,
name
:
"Login"
,
component
:
Login
,
component
:
Login
},
},
{
{
path
:
"/about"
,
path
:
"/about"
,
name
:
"About"
,
name
:
"About"
,
component
:
()
=>
import
(
/* webpackChunkName: "about" */
"
../pages/About"
),
component
:
()
=>
import
(
/* webpackChunkName: "about" */
"
@/pages/About"
)
},
},
// 企业认证管理
{
{
path
:
'/enterprise/certification'
,
path
:
"/certification"
,
name
:
'Certification'
,
name
:
"Certification"
,
component
:
()
=>
import
(
/* webpackChunkName: "enterprise" */
'@/pages/Enterprise/Certification'
)
component
:
Certification
},
},
{
{
path
:
'/enterprise/audit'
,
path
:
"/audit"
,
name
:
'Audit'
,
name
:
"Audit"
,
component
:
()
=>
import
(
/* webpackChunkName: "enterprise" */
'@/pages/Enterprise/Audit'
)
component
:
Audit
},
},
{
{
path
:
'/enterprise/establish'
,
path
:
"/establish"
,
name
:
'Establish'
,
name
:
"Establish"
,
component
:
()
=>
import
(
/* webpackChunkName: "enterprise" */
'@/pages/Enterprise/Establish'
)
component
:
Establish
},
},
//生活号管理
//生活号管理
{
{
path
:
'/life-no/life'
,
path
:
"/life-no/life"
,
name
:
'LifeNo'
,
name
:
"LifeNo"
,
component
:
LifeNo
,
component
:
LifeNo
},
},
{
{
path
:
'/life-no/lifeNoDetail'
,
path
:
"/life-no/lifeNoDetail"
,
name
:
'LifeNoDetail'
,
name
:
"LifeNoDetail"
,
component
:
LifeNoDetail
,
component
:
LifeNoDetail
},
},
//用户管理
//用户管理
{
{
path
:
'/user/userDetail'
,
path
:
"/user/userDetail"
,
name
:
'UserDetail'
,
name
:
"UserDetail"
,
component
:
UserDetail
,
component
:
UserDetail
},
},
//角色管理
//角色管理
{
{
path
:
'/role/addRole'
,
path
:
"/role/addRole"
,
name
:
'AddRole'
,
name
:
"AddRole"
,
component
:
AddRole
,
component
:
AddRole
}
,
}
];
];
const
router
=
createRouter
({
const
router
=
createRouter
({
history
:
createWebHistory
(),
history
:
createWebHistory
(),
routes
,
routes
});
});
export
default
router
;
export
default
router
;
src/service/enterprise.js
View file @
45728d0b
...
@@ -3,7 +3,9 @@
...
@@ -3,7 +3,9 @@
*/
*/
import
axios
from
"../utils/request"
;
import
axios
from
"../utils/request"
;
export
const
entCheck
=
async
user_id
=>
{
export
async
function
entCheck
(
user_id
)
{
const
res
=
await
axios
.
get
(
`api/v1/merchant/inner/ent_check`
,
{
params
:
{
user_id
}
})
let
res
=
await
axios
.
get
(
`api/v1/certification`
,
{
user_id
}
)
return
res
.
data
;
return
res
.
data
;
};
};
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