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
15cb459e
Commit
15cb459e
authored
Dec 13, 2021
by
林家欣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
联调常见问题列表
parent
be95e227
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
89 additions
and
56 deletions
+89
-56
.env.development
.env.development
+2
-0
fetch.js
src/axios/fetch.js
+1
-1
business.js
src/axios/module/business.js
+8
-0
parameter.js
src/axios/parameter.js
+4
-4
HeaderDropdown.vue
src/components/layout/header/HeaderDropdown.vue
+1
-1
Fap.vue
src/views/Business/Fap.vue
+58
-43
Notice.vue
src/views/Business/Notice.vue
+4
-4
table.vue
src/views/Business/copms/table.vue
+3
-3
vue.config.js
vue.config.js
+8
-0
No files found.
.env.development
View file @
15cb459e
...
...
@@ -2,4 +2,5 @@ VUE_APP_CURRENTMODE = "development"
VUE_APP_HOST_URL = "http://81.68.189.225:9091"
VUE_APP_API_URL = "/"
VUE_APP_GDS_URL = "/gds"
VUE_APP_FAQ_URL = "http://member.gds.org.cn:8080/chinatm"
VUE_APP_LOG = true
\ No newline at end of file
src/axios/fetch.js
View file @
15cb459e
...
...
@@ -61,7 +61,7 @@ function fetch(options) {
const
resData
=
res
.
data
;
const
code
=
String
(
resData
.
code
)
// console.log(resData, ResponseCode.success, 'ResponseCode.success');
if
(
code
===
ResponseCode
.
success
)
{
if
(
ResponseCode
.
success
.
indexOf
(
code
)
!==
-
1
)
{
// console.log(resData, '响应数据的拦截2');
resolve
(
resData
)
}
else
if
(
checkResponseCodeTokenError
(
code
))
{
...
...
src/axios/module/business.js
View file @
15cb459e
import
{
GET
,
POST
}
from
"../fetch.js"
const
Prefix
=
process
.
env
.
NODE_ENV
===
'development'
?
'/gs1'
:
''
;
const
Prefix2
=
process
.
env
.
NODE_ENV
===
'development'
?
'/chinatm'
:
''
;
// 右侧表格下载功能
const
businessDownLoad
=
(
params
=
{})
=>
{
...
...
@@ -25,9 +27,15 @@ const businessGetDetailById = (params = {}) => {
return
POST
(
`
${
Prefix
}
/office/eanupc/api/getDetailById`
,
params
)
}
// 常见问题
const
businessGetFaqListByTypeName
=
(
params
=
{})
=>
{
return
GET
(
`
${
Prefix2
}
/tm/faq/third/getFaqListByTypeName`
,
params
)
}
export
default
{
businessDownLoad
,
businessGetTop4
,
businessGetEanUpcByCondition
,
businessGetDetailById
,
businessGetFaqListByTypeName
,
}
src/axios/parameter.js
View file @
15cb459e
...
...
@@ -38,7 +38,7 @@ export function cleanArray(actual) {
export
const
REQUEST_HEADER_TOKEN
=
"token"
export
const
ResponseCode
=
{
success
:
"0"
,
success
:
[
'0'
,
'200'
]
,
tokenError
:
"0202"
,
tokenEmpty
:
"0203"
,
...
...
@@ -68,8 +68,8 @@ export function handleResponseSuccess(res = {}) {
return
{
success
:
true
,
returnCode
:
res
.
code
||
ResponseCode
.
success
,
returnMsg
:
res
.
msg
,
data
:
res
.
data
||
res
.
page
||
null
returnMsg
:
res
.
msg
||
"请求成功"
,
data
:
res
.
data
||
res
.
page
||
res
.
member
||
null
}
}
...
...
@@ -77,7 +77,7 @@ export function handleResponseError(res = {}) {
return
{
success
:
false
,
returnCode
:
res
.
code
||
ResponseCode
.
failed
,
returnMsg
:
res
.
msg
||
""
,
returnMsg
:
res
.
msg
||
"
请求失败
"
,
data
:
res
.
data
||
null
}
}
src/components/layout/header/HeaderDropdown.vue
View file @
15cb459e
...
...
@@ -95,7 +95,7 @@ export default {
return
(
<
div
class
=
{
classNames
.
join
(
" "
).
trim
()}
style
=
{
items
[
0
].
style
}
>
{
items
.
map
((
item
)
=>
{
console
.
log
(
item
.
isHiddenMenu
,
'item.isHiddenMenu'
);
//
console.log(item.isHiddenMenu, 'item.isHiddenMenu');
if
(
item
.
isHiddenMenu
)
return
return
(
<
div
class
=
"gs-dropdown-item"
>
...
...
src/views/Business/Fap.vue
View file @
15cb459e
...
...
@@ -39,7 +39,11 @@
:aria-labelledby="tmp.type + '-tab'"
>
<faqTable
:list=
"tmp.data"
/>
<pages
/>
<pages
:currPage=
"pageParams.currPage"
:total=
"pageParams.total"
@
getLimit=
"receivePagesChild"
/>
</div>
</div>
</div>
...
...
@@ -63,20 +67,22 @@ export default {
ico
:
""
,
},
search
:
{
typeName
:
""
,
keywords
:
""
,
},
pageParams
:
{
currPage
:
1
,
pageSize
:
10
,
pageCount
:
5
,
total
:
0
,
},
list
:
[
{
type
:
"qbwt"
,
name
:
"全部问题"
,
link
:
"/Business/Guide8"
,
active
:
"qbwt"
,
data
:
[
{
name
:
"企业申请注册厂商识别代码是否必须到中国物品编码中心总部办理?"
,
type
:
"业务办理"
,
},
],
data
:
[],
},
{
type
:
"ywbl"
,
...
...
@@ -95,72 +101,42 @@ export default {
name
:
"产品信息通报"
,
link
:
"/Business/Guide8"
,
active
:
"cpxxtb"
,
data
:
[
{
name
:
"企业申请注册厂商识别代码后,中国物品编码中心会发放哪些材料?"
,
type
:
"业务办理"
,
},
],
data
:
[],
},
{
type
:
"bmjs"
,
name
:
"编码技术"
,
link
:
"/Business/Guide8"
,
active
:
"bmjs"
,
data
:
[
{
name
:
"编码技术?"
,
type
:
"业务办理"
,
},
],
data
:
[],
},
{
type
:
"fgybz"
,
name
:
"法规与标准"
,
link
:
"/Business/Guide8"
,
active
:
"fgybz"
,
data
:
[
{
name
:
"法规与标准标题?"
,
type
:
"业务办理"
,
},
],
data
:
[],
},
{
type
:
"tmzl"
,
name
:
"条码质量"
,
link
:
"/Business/Guide8"
,
active
:
"tmzl"
,
data
:
[
{
name
:
"条码质量标题?"
,
type
:
"业务办理"
,
},
],
data
:
[],
},
{
type
:
"tmjsyy"
,
name
:
"条码技术应用"
,
link
:
"/Business/Guide8"
,
active
:
"tmjsyy"
,
data
:
[
{
name
:
"条码技术应用标题?"
,
type
:
"业务办理"
,
},
],
data
:
[],
},
{
type
:
"other"
,
name
:
"其他"
,
link
:
"/Business/Guide8"
,
active
:
"other"
,
data
:
[
{
name
:
"其他标题?"
,
type
:
"业务办理"
,
},
],
data
:
[],
},
],
};
...
...
@@ -177,7 +153,46 @@ export default {
return
id
;
},
},
watch
:
{
$route
:
{
handler
(
val
)
{
this
.
init
(
val
.
query
.
id
);
},
deep
:
true
,
immediate
:
true
,
},
},
methods
:
{
init
(
id
)
{
const
current
=
this
.
list
.
filter
((
item
)
=>
item
.
active
===
id
)[
0
];
this
.
search
.
typeName
=
current
.
name
;
this
.
getFaqListByTypeName
();
},
// 接收分页子组件传过来的值
receivePagesChild
(
val
)
{
this
.
pageParams
.
currentPage
=
val
;
this
.
getFaqListByTypeName
();
},
// 常见问题
async
getFaqListByTypeName
()
{
const
params
=
{
typeName
:
this
.
search
.
typeName
,
pageNo
:
this
.
pageParams
.
currPage
,
pageSize
:
this
.
pageParams
.
pageSize
,
};
const
businessGetFaqListByTypeNameRes
=
await
this
.
$api
.
business
.
businessGetFaqListByTypeName
(
params
);
const
{
returnCode
,
data
}
=
businessGetFaqListByTypeNameRes
;
if
(
returnCode
===
200
)
{
console
.
log
(
businessGetFaqListByTypeNameRes
,
"常见问题"
);
this
.
pageParams
.
total
=
data
.
totalRows
;
this
.
list
.
forEach
((
el
)
=>
{
if
(
el
.
active
===
this
.
$route
.
query
.
id
)
{
el
.
data
=
data
.
rows
;
}
});
}
},
jump
(
i
)
{
// console.log(i);
this
.
$router
.
push
({
...
...
src/views/Business/Notice.vue
View file @
15cb459e
...
...
@@ -38,7 +38,7 @@
:aria-labelledby="tmp.type + '-tab'"
>
<list
:list=
"tmp.data"
@
toListFather=
"receiveListChild"
/>
<pages
:
pages=
"pageParams"
@
toPagesFather=
"receivePagesChild"
/>
<pages
:
currPage=
"pageParams.currPage"
:total=
"pageParams.total"
@
getLimit=
"receivePagesChild"
/>
</div>
</div>
</div>
...
...
@@ -80,7 +80,7 @@ export default {
},
],
pageParams
:
{
curr
ent
Page
:
1
,
currPage
:
1
,
pageSize
:
10
,
pageCount
:
5
,
total
:
100
,
...
...
@@ -111,7 +111,7 @@ export default {
// 条码注册/注销公告
async
businessGetEanUpcByCondition
()
{
const
params
=
{
page
:
this
.
pageParams
.
curr
ent
Page
,
page
:
this
.
pageParams
.
currPage
,
limit
:
this
.
pageParams
.
pageSize
,
logoutFlag
:
this
.
logoutFlag
,
};
...
...
@@ -142,7 +142,7 @@ export default {
},
// 接收分页子组件传过来的值
receivePagesChild
(
val
)
{
this
.
pageParams
.
curr
ent
Page
=
val
;
this
.
pageParams
.
currPage
=
val
;
this
.
businessGetEanUpcByCondition
();
},
// 接收列表子组件传过来的值
...
...
src/views/Business/copms/table.vue
View file @
15cb459e
...
...
@@ -5,18 +5,18 @@
<div
class=
"col-lg-8"
>
标题
</div>
<div
class=
"col-lg-2"
>
类型
</div>
</div>
<div
class=
"fqtbody
"
>
<div
class=
"fqtbody
"
v-if=
"list.length > 0
"
>
<div
class=
"row"
v-for=
"(tmp, i) in list"
:key=
"i"
>
<div
class=
"col-lg-2"
>
{{
i
+
1
}}
</div>
<div
class=
"col-lg-8"
>
{{
tmp
.
name
}}
</div>
<div
class=
"col-lg-2"
>
{{
tmp
.
typ
e
}}
</div>
<div
class=
"col-lg-2"
>
{{
tmp
.
types
&&
tmp
.
types
.
nam
e
}}
</div>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
props
:
[
'list'
]
props
:
[
'list'
]
,
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
vue.config.js
View file @
15cb459e
...
...
@@ -70,6 +70,14 @@ module.exports = {
pathRewrite
:
{
"^/gds"
:
"/"
}
},
"/chinatm"
:
{
target
:
'http://member.gds.org.cn:8080/chinatm'
,
// 原地址
changeOrigin
:
true
,
ws
:
true
,
pathRewrite
:
{
"^/chinatm"
:
"/"
}
}
}
}
...
...
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