Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
B
bjgee
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
shangbj
bjgee
Commits
5d6fdf39
Commit
5d6fdf39
authored
Sep 08, 2018
by
shangbj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除store该用接口调用
parent
24bd6bd4
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
188 additions
and
145 deletions
+188
-145
index.js
api/index.js
+2
-0
engineering.js
api/routes/data/engineering.js
+86
-2
profile.js
api/routes/data/profile.js
+36
-0
engineering.js
api/routes/engineering.js
+9
-1
profile.js
api/routes/profile.js
+28
-0
index.vue
pages/index.vue
+3
-7
profile.vue
pages/profile.vue
+12
-3
_id.vue
pages/profile/_id.vue
+12
-13
index.js
store/index.js
+0
-119
No files found.
api/index.js
View file @
5d6fdf39
...
...
@@ -8,11 +8,13 @@ const product = require('./routes/product')
const
news
=
require
(
'./routes/news'
)
const
qualifications
=
require
(
'./routes/qualifications'
)
const
engineering
=
require
(
'./routes/engineering'
)
const
profile
=
require
(
'./routes/profile'
)
// Import API Routes
app
.
use
(
product
)
app
.
use
(
news
)
app
.
use
(
qualifications
)
app
.
use
(
engineering
)
app
.
use
(
profile
)
// Export the server middleware
module
.
exports
=
{
...
...
api/routes/data/engineering.js
View file @
5d6fdf39
...
...
@@ -341,5 +341,89 @@ const engineeringData = {
]
}
}
module
.
exports
=
engineeringData
;
\ No newline at end of file
const
engineeringIndexData
=
[
{
title
:
'北京朝阳区农村改水'
,
url
:
'/engineering/drinkingWater/37'
},
{
title
:
'北京市海淀区农村改水'
,
url
:
''
},
{
title
:
'北京市顺义区农村改水'
,
url
:
''
},
{
title
:
'北京市平谷区农村改水'
,
url
:
''
},
{
title
:
'门头沟区消毒设备养护管理'
,
url
:
''
},
{
title
:
'北京市延庆县农村改水'
,
url
:
''
},
{
title
:
'北京市大兴区农村改水'
,
url
:
''
},
{
title
:
'北京八达岭长城自备井'
,
url
:
''
},
{
title
:
'北京首都机场自备井'
,
url
:
''
},
{
title
:
'北京豆各庄水厂'
,
url
:
'/engineering/drinkingWater/36'
},
{
title
:
'北京航天城供水站'
,
url
:
'/engineering/drinkingWater/33'
},
{
title
:
'北京楼梓庄水厂'
,
url
:
'/engineering/drinkingWater/35'
},
{
title
:
'珠海三灶国际机场'
,
url
:
''
},
{
title
:
'山西阳城自来水公司'
,
url
:
''
},
{
title
:
'中石化工程建设公司'
,
url
:
''
},
{
title
:
'内蒙兴和水厂'
,
url
:
''
},
{
title
:
'安徽省涡阳县农村改水'
,
url
:
''
},
{
title
:
'湖南省桃园县水厂'
,
url
:
''
},
{
title
:
'吉林东光集团'
,
url
:
''
},
{
title
:
'廊坊市广阳区水务局'
,
url
:
''
},
]
module
.
exports
=
{
engineeringData
,
engineeringIndexData
};
\ No newline at end of file
api/routes/data/profile.js
0 → 100644
View file @
5d6fdf39
const
profile
=
{
'applicationArea'
:{
id
:
'applicationArea'
,
name
:
'应用领域'
,
detail
:
`<div style="line-height: 20pt; vertical-align: baseline"><strong>绿恒<sup>®</sup>高纯二氧化氯发生器应用领域</strong></div>
<div style="line-height: 20pt; vertical-align: baseline"> 自来水、自备井水、二次供水等生活饮用水的消毒;中水、游泳池、医院污水的灭菌消毒;工业循环冷却水、工业原水的除藻灭菌处理;食品、乳品、饮料加工的灭菌处理;含氰、酚废水处理;造纸、印染行业的废水漂白、脱色;水产养殖中的消毒与增氧;除铁、猛等。</div>
<div style="line-height: 20pt; vertical-align: baseline"> </div>
<div style="line-height: 20pt; vertical-align: baseline"><strong>水木兰<sup>®</sup>二氧化氯消毒粉应用领域</strong></div>
<div style="line-height: 20pt; vertical-align: baseline">♦ 生活饮用水;</div>
<div style="line-height: 20pt; vertical-align: baseline">♦ 工业循环水冷却水、空调用水、工业用水、污水等各种水处理;</div>
<div style="line-height: 20pt; vertical-align: baseline">♦ 游泳池水体及水池的卫生消毒;</div>
<div style="line-height: 20pt; vertical-align: baseline">♦ 食品加工、饮料厂、发酵工业、制药等行业的生产设备、管道、容器以及包装容器和工具的最终灭菌消毒;</div>
<div style="line-height: 20pt; vertical-align: baseline">♦ 食品、饮料、冷饮行业配制无菌原料水;</div>
<div style="line-height: 20pt; vertical-align: baseline">♦ 生产环境(如:生产车间、地面等)消毒、灭菌、防霉、除臭处理;</div>
<div style="line-height: 20pt; vertical-align: baseline">♦ 食品加工企业(如水果蔬菜、肉食品等)的消毒、灭菌、保鲜、防腐;</div>
<div style="line-height: 20pt; vertical-align: baseline">♦ 餐厅、宾馆、家庭、摊档餐具和卫生设施的灭菌消毒与空气环境消毒。</div>`
,
},
'oganization'
:{
id
:
'oganization'
,
name
:
'组织机构'
,
detail
:
`<p><img class="" height="457" width="695" alt="" src="/images/oganization/organization.jpg"></p>`
,
}
}
module
.
exports
=
profile
;
\ No newline at end of file
api/routes/engineering.js
View file @
5d6fdf39
const
{
Router
}
=
require
(
'express'
)
const
engineeringData
=
require
(
'./data/engineering'
)
const
{
engineeringData
,
engineeringIndexData
}
=
require
(
'./data/engineering'
)
const
router
=
Router
()
const
engineeringKeys
=
Object
.
keys
(
engineeringData
);
/* GET users listing. */
...
...
@@ -66,4 +66,12 @@ router.get('/engineering/detail/:type/:id', function (req, res, next) {
})
}
})
router
.
get
(
'/engineering/index'
,
function
(
req
,
res
,
next
)
{
res
.
json
({
data
:
engineeringIndexData
,
result
:
true
})
})
module
.
exports
=
router
\ No newline at end of file
api/routes/profile.js
0 → 100644
View file @
5d6fdf39
const
{
Router
}
=
require
(
'express'
)
const
profileData
=
require
(
'./data/profile'
);
const
router
=
Router
()
router
.
get
(
'/profile'
,
function
(
req
,
res
,
next
)
{
res
.
json
({
data
:
profileData
,
result
:
true
})
})
router
.
get
(
'/profile/:id'
,
function
(
req
,
res
,
next
)
{
const
id
=
req
.
params
.
id
if
(
profileData
[
id
]){
res
.
json
({
data
:
profileData
[
id
],
result
:
true
})
}
else
{
res
.
json
({
data
:
null
,
message
:
'该页面不存在'
,
result
:
false
})
}
})
module
.
exports
=
router
pages/index.vue
View file @
5d6fdf39
...
...
@@ -107,17 +107,13 @@ export default {
const
newsData
=
await
axios
.
get
(
'/api/news?pageSize=10&type=simplify'
);
const
productData
=
await
axios
.
get
(
'/api/product'
);
const
qualificationsData
=
await
axios
.
get
(
'/api/qualifications?pageSize=20&type=simplify'
);
const
engineeringData
=
await
axios
.
get
(
'/api/engineering/index'
);
return
{
newsData
:
newsData
.
data
.
data
||
[],
productData
:[...
productData
.
data
.
ozonizer
.
data
,...
productData
.
data
.
disinfectant
.
data
,...
productData
.
data
.
equipment
.
data
],
qualificationsData
:
qualificationsData
.
data
.
data
||
[],
}
},
data
:
function
(){
return
{
engineeringData
:
this
.
$store
.
state
.
engineeringData
,
productData
:[],
qualificationsData
:[],
engineeringData
:
engineeringData
.
data
.
data
||
[]
}
},
components
:
{
...
...
pages/profile.vue
View file @
5d6fdf39
...
...
@@ -23,15 +23,24 @@
<
script
>
import
NewsScrollList
from
'~/components/NewsScrollList.vue'
import
ProductImgList
from
'~/components/ProductImgList.vue'
import
axios
from
'~/plugins/axios'
export
default
{
async
asyncData
({
app
,
params
,
error
})
{
const
{
data
}
=
await
axios
.
get
(
`/api/profile`
);
if
(
data
.
result
){
return
{
profileData
:
data
.
data
};
}
else
{
return
error
({
message
:
'页面不存在'
,
statusCode
:
404
})
}
},
components
:{
NewsScrollList
,
ProductImgList
,
},
asyncData
({
store
})
{
return
{
profileData
:
store
.
state
.
profileData
}
}
//
asyncData({ store }) {
//
return { profileData: store.state.profileData}
//
}
}
</
script
>
<
style
lang=
"scss"
>
...
...
pages/profile/_id.vue
View file @
5d6fdf39
<
template
>
<div>
<div
class=
"currently-node"
>
{{
name
}}
</div>
<div
class=
"currently-text"
v-html=
"detail"
></div>
<div
class=
"currently-node"
>
{{
details
.
name
}}
</div>
<div
class=
"currently-text"
v-html=
"detail
s.detail
"
></div>
</div>
</
template
>
<
script
>
import
axios
from
'~/plugins/axios'
export
default
{
asyncData
({
params
,
store
,
error
})
{
const
item
=
store
.
state
.
profileData
.
find
((
item
)
=>
String
(
item
.
id
)
===
params
.
id
)
if
(
!
item
)
{
return
error
({
message
:
'页面不存在'
,
statusCode
:
404
})
}
return
item
async
asyncData
({
app
,
params
,
error
})
{
console
.
log
(
app
)
const
{
data
}
=
await
axios
.
get
(
`/api/profile/
${
params
.
id
}
`
);
if
(
data
.
result
){
return
{
details
:
data
.
data
};
}
else
{
return
error
({
message
:
'页面不存在'
,
statusCode
:
404
})
}
},
head
()
{
return
{
title
:
this
.
name
}
}
}
</
script
>
store/index.js
deleted
100644 → 0
View file @
24bd6bd4
export
const
state
=
()
=>
({
engineeringData
:[
{
title
:
'北京朝阳区农村改水'
,
url
:
'/engineering/drinkingWater/37'
},
{
title
:
'北京市海淀区农村改水'
,
url
:
''
},
{
title
:
'北京市顺义区农村改水'
,
url
:
''
},
{
title
:
'北京市平谷区农村改水'
,
url
:
''
},
{
title
:
'门头沟区消毒设备养护管理'
,
url
:
''
},
{
title
:
'北京市延庆县农村改水'
,
url
:
''
},
{
title
:
'北京市大兴区农村改水'
,
url
:
''
},
{
title
:
'北京八达岭长城自备井'
,
url
:
''
},
{
title
:
'北京首都机场自备井'
,
url
:
''
},
{
title
:
'北京豆各庄水厂'
,
url
:
'/engineering/drinkingWater/36'
},
{
title
:
'北京航天城供水站'
,
url
:
'/engineering/drinkingWater/33'
},
{
title
:
'北京楼梓庄水厂'
,
url
:
'/engineering/drinkingWater/35'
},
{
title
:
'珠海三灶国际机场'
,
url
:
''
},
{
title
:
'山西阳城自来水公司'
,
url
:
''
},
{
title
:
'中石化工程建设公司'
,
url
:
''
},
{
title
:
'内蒙兴和水厂'
,
url
:
''
},
{
title
:
'安徽省涡阳县农村改水'
,
url
:
''
},
{
title
:
'湖南省桃园县水厂'
,
url
:
''
},
{
title
:
'吉林东光集团'
,
url
:
''
},
{
title
:
'廊坊市广阳区水务局'
,
url
:
''
},
],
profileData
:[
{
id
:
'applicationArea'
,
name
:
'应用领域'
,
detail
:
`<div style="line-height: 20pt; vertical-align: baseline"><strong>绿恒<sup>®</sup>高纯二氧化氯发生器应用领域</strong></div>
<div style="line-height: 20pt; vertical-align: baseline"> 自来水、自备井水、二次供水等生活饮用水的消毒;中水、游泳池、医院污水的灭菌消毒;工业循环冷却水、工业原水的除藻灭菌处理;食品、乳品、饮料加工的灭菌处理;含氰、酚废水处理;造纸、印染行业的废水漂白、脱色;水产养殖中的消毒与增氧;除铁、猛等。</div>
<div style="line-height: 20pt; vertical-align: baseline"> </div>
<div style="line-height: 20pt; vertical-align: baseline"><strong>水木兰<sup>®</sup>二氧化氯消毒粉应用领域</strong></div>
<div style="line-height: 20pt; vertical-align: baseline">♦ 生活饮用水;</div>
<div style="line-height: 20pt; vertical-align: baseline">♦ 工业循环水冷却水、空调用水、工业用水、污水等各种水处理;</div>
<div style="line-height: 20pt; vertical-align: baseline">♦ 游泳池水体及水池的卫生消毒;</div>
<div style="line-height: 20pt; vertical-align: baseline">♦ 食品加工、饮料厂、发酵工业、制药等行业的生产设备、管道、容器以及包装容器和工具的最终灭菌消毒;</div>
<div style="line-height: 20pt; vertical-align: baseline">♦ 食品、饮料、冷饮行业配制无菌原料水;</div>
<div style="line-height: 20pt; vertical-align: baseline">♦ 生产环境(如:生产车间、地面等)消毒、灭菌、防霉、除臭处理;</div>
<div style="line-height: 20pt; vertical-align: baseline">♦ 食品加工企业(如水果蔬菜、肉食品等)的消毒、灭菌、保鲜、防腐;</div>
<div style="line-height: 20pt; vertical-align: baseline">♦ 餐厅、宾馆、家庭、摊档餐具和卫生设施的灭菌消毒与空气环境消毒。</div>`
,
},
{
id
:
'oganization'
,
name
:
'组织机构'
,
detail
:
`<p><img class="" height="457" width="695" alt="" src="/images/oganization/organization.jpg"></p>`
,
}
]
})
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