Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1
Overview
Overview
Details
Activity
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
吴迪
gs1
Commits
63a69bf9
Commit
63a69bf9
authored
Jan 02, 2022
by
林家欣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改服务中心服务商列表、案例介绍点击详情页数据获取接口
parent
9d540db0
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
66 additions
and
38 deletions
+66
-38
service.js
src/axios/module/service.js
+13
-1
caseList.vue
src/views/Service/Partners/caseList.vue
+6
-10
caseMsg.vue
src/views/Service/Partners/caseMsg.vue
+19
-8
content.vue
src/views/Service/Partners/content.vue
+22
-11
list.vue
src/views/Service/Partners/list.vue
+6
-8
No files found.
src/axios/module/service.js
View file @
63a69bf9
import
{
POST
POST
,
}
from
"../fetch.js"
const
Prefix
=
process
.
env
.
NODE_ENV
===
'development'
?
'/gs1'
:
''
;
...
...
@@ -21,8 +21,20 @@ const serviceCasesFrontList = (params = {}) => {
}
// 案例介绍根据id获取详情
const
serviceGetCaseDetailInfo
=
(
params
=
{})
=>
{
return
POST
(
`
${
Prefix
}
/office/cases/api/getDetailInfo`
,
params
)
}
// 案例介绍根据id获取详情
const
serviceGetPartnersDetailInfo
=
(
params
=
{})
=>
{
return
POST
(
`
${
Prefix
}
/office/partners/api/getDetailInfo`
,
params
)
}
export
default
{
getCodeBook
,
servicePartnersFrontList
,
serviceCasesFrontList
,
serviceGetCaseDetailInfo
,
serviceGetPartnersDetailInfo
,
}
src/views/Service/Partners/caseList.vue
View file @
63a69bf9
...
...
@@ -46,7 +46,6 @@
</
template
>
<
script
>
import
{
mapMutations
}
from
"vuex"
;
import
pages
from
"../../comps/pages2.vue"
;
export
default
{
...
...
@@ -84,17 +83,15 @@ export default {
this
.
casesFrontList
();
},
methods
:
{
...
mapMutations
(
"service"
,
{
setPartnersMsg
:
"setPartnersMsg"
,
}),
// 点击列表跳转详情
handelJumpMsg
(
msg
)
{
const
prefix
=
'http://www.gs1cn.org'
msg
.
brief
=
msg
.
brief
.
replace
(
new
RegExp
(
'src="/UserFiles/Image'
,
'g'
),
`src="
${
prefix
}
/UserFiles/Image`
);
this
.
setPartnersMsg
(
msg
);
this
.
$router
.
push
({
let
routeData
=
this
.
$router
.
resolve
({
path
:
"/Service/Partners/caseMsg"
,
query
:
{
id
:
msg
.
id
}
});
window
.
open
(
routeData
.
href
,
"_blank"
);
},
// 接收分页子组件传过来的值
receivePagesChild
(
val
)
{
...
...
@@ -112,9 +109,8 @@ export default {
const
serviceCasesFrontListRes
=
await
this
.
$api
.
service
.
serviceCasesFrontList
(
params
);
const
{
success
,
data
}
=
serviceCasesFrontListRes
;
console
.
log
(
serviceCasesFrontListRes
,
"
serviceCasesFrontListRes
"
);
console
.
log
(
serviceCasesFrontListRes
,
"
案例介绍
"
);
if
(
success
)
{
console
.
log
(
data
,
"案例介绍"
);
this
.
pageParams
.
total
=
data
.
totalCount
;
this
.
list
=
data
.
list
;
}
...
...
src/views/Service/Partners/caseMsg.vue
View file @
63a69bf9
...
...
@@ -17,16 +17,14 @@
</
template
>
<
script
>
import
{
mapState
}
from
"vuex"
;
export
default
{
computed
:
{
...
mapState
(
"service"
,
{
partnersMsg
:
"partnersMsg"
,
}
),
data
()
{
return
{
partnersMsg
:
{}
,
}
},
created
()
{
console
.
log
(
"TODO QUERY"
,
this
.
$route
.
query
,
this
.
partnersMsg
);
this
.
serviceGetCaseDetailInfo
(
);
},
mounted
()
{
// 面包屑单独处理
...
...
@@ -36,7 +34,20 @@ export default {
{
name
:
"GS1标准服务提供商案例"
},
]);
},
methods
:
{},
methods
:
{
async
serviceGetCaseDetailInfo
()
{
const
query
=
{
id
:
this
.
$route
.
query
.
id
,
}
const
serviceGetCaseDetailInfoRes
=
await
this
.
$api
.
service
.
serviceGetCaseDetailInfo
(
query
);
const
{
returnCode
,
data
}
=
serviceGetCaseDetailInfoRes
;
console
.
log
(
serviceGetCaseDetailInfoRes
,
"serviceGetCaseDetailInfoRes"
);
if
(
returnCode
===
"0"
)
{
this
.
partnersMsg
=
data
;
}
},
},
};
</
script
>
...
...
src/views/Service/Partners/content.vue
View file @
63a69bf9
...
...
@@ -2,7 +2,7 @@
<div
class=
"msg-cont"
>
<div
class=
"container"
>
<div
class=
"msg-title"
>
{{
partnersMsg
.
titl
e
}}
{{
partnersMsg
.
firmnam
e
}}
</div>
<div
class=
"msg-head"
>
<div
class=
"msg-head-left"
>
...
...
@@ -26,7 +26,7 @@
<div
class=
"col-md-6"
>
<i
class=
"iconfont icon-lianxiren"
></i
><span
style=
"font-size: 14px; color: #666; margin-left: 6px"
>
联系人:
<span
id=
"Lab_name"
>
{{
partnersMsg
.
firm
name
}}
</span></span
>
联系人:
<span
id=
"Lab_name"
>
{{
partnersMsg
.
name
}}
</span></span
>
</div>
<div
class=
"col-md-6"
>
...
...
@@ -48,16 +48,14 @@
</
template
>
<
script
>
import
{
mapState
}
from
"vuex"
;
export
default
{
computed
:
{
...
mapState
(
"service"
,
{
partnersMsg
:
"partnersMsg"
,
}
),
data
()
{
return
{
partnersMsg
:
{}
,
}
},
created
()
{
console
.
log
(
"TODO QUERY"
,
this
.
$route
.
query
,
this
.
partnersMsg
);
this
.
serviceGetPartnersDetailInfo
(
);
},
mounted
()
{
// 面包屑单独处理
...
...
@@ -67,7 +65,20 @@ export default {
{
name
:
"服务提供商介绍"
},
]);
},
methods
:
{},
methods
:
{
async
serviceGetPartnersDetailInfo
()
{
const
query
=
{
id
:
this
.
$route
.
query
.
id
,
}
const
serviceGetPartnersDetailInfoRes
=
await
this
.
$api
.
service
.
serviceGetPartnersDetailInfo
(
query
);
const
{
returnCode
,
data
}
=
serviceGetPartnersDetailInfoRes
;
console
.
log
(
serviceGetPartnersDetailInfoRes
,
"serviceGetPartnersDetailInfoRes"
);
if
(
returnCode
===
"0"
)
{
this
.
partnersMsg
=
data
;
}
},
},
};
</
script
>
...
...
@@ -140,7 +151,7 @@ export default {
padding-top
:
6px
;
padding-bottom
:
6px
;
}
i
{
i
{
color
:
#aaa
;
}
}
...
...
src/views/Service/Partners/list.vue
View file @
63a69bf9
...
...
@@ -64,7 +64,6 @@
</
template
>
<
script
>
import
{
mapMutations
}
from
"vuex"
;
import
pages
from
"../../comps/pages2.vue"
;
export
default
{
...
...
@@ -111,15 +110,15 @@ export default {
this
.
partnersFrontList
();
},
methods
:
{
...
mapMutations
(
"service"
,
{
setPartnersMsg
:
"setPartnersMsg"
,
}),
// 点击列表跳转详情
handelJumpMsg
(
msg
)
{
this
.
setPartnersMsg
(
msg
);
this
.
$router
.
push
({
let
routeData
=
this
.
$router
.
resolve
({
path
:
"/Service/Partners/content"
,
query
:
{
id
:
msg
.
id
}
});
window
.
open
(
routeData
.
href
,
"_blank"
);
},
// 接收分页子组件传过来的值
receivePagesChild
(
val
)
{
...
...
@@ -137,9 +136,8 @@ export default {
const
businessGetPlanBranchListRes
=
await
this
.
$api
.
service
.
servicePartnersFrontList
(
params
);
const
{
success
,
data
}
=
businessGetPlanBranchListRes
;
console
.
log
(
businessGetPlanBranchListRes
,
"
businessGetPlanBranchListRes
"
);
console
.
log
(
businessGetPlanBranchListRes
,
"
服务商列表
"
);
if
(
success
)
{
console
.
log
(
data
,
"服务商列表"
);
this
.
pageParams
.
total
=
data
.
totalCount
;
this
.
list
=
data
.
list
;
this
.
list
.
forEach
(
el
=>
{
...
...
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