Commit fa4bf9b0 authored by shangbj's avatar shangbj

增加新闻和产品接口

parent 06d54cfd
......@@ -4,10 +4,12 @@ const express = require('express')
const app = express()
// Require API routes
const users = require('./routes/users')
const product = require('./routes/product')
const news = require('./routes/news')
// Import API Routes
app.use(users)
app.use(product)
app.use(news)
// Export the server middleware
module.exports = {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
const productData = {
equipment:{
name:'绿恒二氧化氯消毒设备',
data:[
{
id:6,
url:'/product/equipment/6',
title:'电解法二氧化氯发生器',
time:'2011-03-03',
thumbnail:'/images/product/00601.jpg',
con:`<p align="center"><img style="width: 566px; height: 442px" class="" alt="" width="700" height="525" src="/images/product/00601.jpg"></p>
<p align="center"><font style="font-size: medium"><strong>电解法二氧化氯发生器</strong></font></p>`
},
{
id:5,
url:'/product/equipment/5',
title:'绿恒TLS纯二氧化氯发生器壁挂机',
time:'2011-03-05',
thumbnail:'/images/product/00501.jpg',
con:`<p style="text-align: center">&nbsp;<img alt="" src="/images/product/00501.jpg" style="height:711px; width:648px"></p>
<p style="text-align: center"><span style="font-size:16px">功能介绍</span></p>
<p>标准功能:</p>
<ul>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>高性价比:一款高性能的产品,但价格相对较低,用户易于接受。</span></li>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>安调方便:标准化的安调程序和模块化配置,保障了安装的方便快捷。</span></li>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>性能优越:所有主要零部件均为国际著名品牌,整机性能优越。</span></li>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>运行安全:独到的设计和工艺保障了设备运行的安全,尤其在防回流和防虹吸方面有专有技术支持。</span></li>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>报警及时:具有缺水、欠压、缺料和停泵时报警并停机功能。</span></li>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>联动功能:可与变频泵或供水泵电源实现联动。</span></li>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>时序控制:不同时段可实现不同计量的药液投加,并可定时开关机。</span></li>
</ul>
<p>增值功能:</p>
<ul>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>远程监控:所有报警信息(缺药、故障及设备运行状态)以手机短信方式发送给设备管理人员,实现人机对话和远程无线控制。</span></li>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>定比投加:专门的控制软件,可实现闭环控制,保障了在水量或水质变化时定比精准投加药液。</span></li>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>液位自动调整:专门的控制软件,自动调整两种药液同步进药,避免因原料不同步而造成的单种原料过量所带来的水质隐患和健康危害。</span></li>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>计量泵故障自动诊断:专门的控制软件,自动诊断计量泵运行故障,并在出现故障时实现自动停机,同时将该信息以手机短信的方式无线远传给管理人员,以便及时检修和恢复设备的正常运行。</span></li>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>密封功能:专用进口阀体,保障从原料桶到投加点的全密封,避免因原料或药液挥发引起的对周围设施的腐蚀破坏。</span></li>
</ul>
<div style="text-align: left; line-height: 150%; text-indent: 21.25pt">&nbsp;</div>`
},
{
id:4,
url:'/product/equipment/4',
title:'绿恒TLS纯二氧化氯发生器一体机',
time:'2011-03-04',
thumbnail:'/images/product/00401.jpg',
con:`<p style="text-align: center">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img alt="" src="/images/product/00401.jpg" style="height:453px; width:600px"></p>
<p style="text-align: center"><span style="font-size:16px">功能介绍</span></p>
<p>标准功能:</p>
<ul>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>高性价比:一款高性能的产品,但价格相对较低,用户易于接受。</span></li>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>安调方便:标准化的安调程序和模块化配置,保障了安装的方便快捷。</span></li>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>性能优越:所有主要零部件均为国际著名品牌,整机性能优越。</span></li>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>运行安全:独到的设计和工艺保障了设备运行的安全,尤其在防回流和防虹吸方面有专有技术支持。</span></li>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>报警及时:具有缺水、欠压、缺料和停泵时报警并停机功能。</span></li>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>联动功能:可与变频泵或供水泵电源实现联动。</span></li>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>时序控制:不同时段可实现不同计量的药液投加,并可定时开关机。</span></li>
</ul>
<p>增值功能:</p>
<ul>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>远程监控:所有报警信息(缺药、故障及设备运行状态)以手机短信方式发送给设备管理人员,实现人机对话和远程无线控制。</span></li>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>定比投加:专门的控制软件,可实现闭环控制,保障了在水量或水质变化时定比精准投加药液。</span></li>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>液位自动调整:专门的控制软件,自动调整两种药液同步进药,避免因原料不同步而造成的单种原料过量所带来的水质隐患和健康危害。</span></li>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>计量泵故障自动诊断:专门的控制软件,自动诊断计量泵运行故障,并在出现故障时实现自动停机,同时将该信息以手机短信的方式无线远传给管理人员,以便及时检修和恢复设备的正常运行。</span></li>
<li><span style="font-size:12px"><span style="color:fuchsia">★</span>密封功能:专用进口阀体,保障从原料桶到投加点的全密封,避免因原料或药液挥发引起的对周围设施的腐蚀破坏。</span></li>
</ul>`
},
{
id:3,
url:'/product/equipment/3',
title:'二氧化氯消毒粉专用投加装置',
time:'2011-03-03',
thumbnail:'/images/product/00301.jpg',
con:`<p align="center">&nbsp;<img style="width: 554px; height: 484px" class="" alt="" width="2192" height="2208" src="/images/product/00301.jpg"></p>
<p align="center"><span style="font-size: 12pt"><font style="font-size: x-small"><strong>二氧化氯消毒粉专用投加装置</strong></font></span><span style="font-size: 12pt"><span style="font-size: 12pt">&nbsp;&nbsp;&nbsp; </span></span></p>
<div>
<div style="line-height: 20pt; text-indent: 21pt"><font style="font-size: x-small">设备主要含有储药装置、计量泵和智能控制系统,均采用国外进口名牌产品,坚固耐用,投加精确。储药装置内不设搅拌器,可直接投加液态的化学药剂。设备可连续自动运行。设备结构简单,操作方便。解决了中小型用户以往手动加药造成的投量不准、操作麻烦的问题。</font></div>
<div style="line-height: 20pt; text-indent: 15.75pt"><font style="font-size: x-small">&nbsp;绿恒<sup>®</sup>牌自动加药装置具有结构简单,占地面积小,操作方便,价格合理等特点,可投加二氧化氯药剂和其它一些液体药剂,在自备井水消毒和管道消毒以及小型医疗污水消毒方面有着广泛的使用价值。</font></div>
</div>`
},
{
id:2,
url:'/product/equipment/2',
title:'便携式二氧化氯检测仪',
time:'2011-03-02',
thumbnail:'/images/product/00201.jpg',
con:`<p align="center">&nbsp;&nbsp;</p>
<p align="center"><img style="width: 420px; height: 306px" class="" alt="" width="510" height="510" src="/images/product/00201.jpg"></p>
<p align="center">&nbsp;</p>
<p align="center"><img style="width: 420px; height: 292px" class="" alt="" width="586" height="485" src="/images/product/00202.jpg"></p>
<p align="center">&nbsp;</p>`
},
{
id:1,
url:'/product/equipment/1',
title:'安徽省毫州市涡阳县农村安全饮水工程',
time:'2011-03-01',
thumbnail:'/images/product/00101.jpg',
con:`<p align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </p>
<p align="center"><img style="width: 369px; height: 282px" class="" alt="" width="800" height="576" src="/images/product/00101.jpg"></p>
<p align="center">&nbsp;</p>
<p align="center"><img class="" alt="" width="368" height="324" src="/images/product/00102.jpg"></p>
<p align="center">&nbsp;</p>`
},
{
id:0,
url:'/product/equipment/0',
title:'易威奇计量泵及配件',
time:'2011-02-28',
thumbnail:'/images/product/00001.jpg',
con:`<p align="left">&nbsp;<img style="width: 330px; height: 235px" class="" alt="" width="927" height="919" src="/images/product/00001.jpg">&nbsp;<img style="width: 329px; height: 235px" class="" alt="" width="1121" height="884" src="/images/product/00002.jpg"></p>
<p align="left">&nbsp;<img style="width: 331px; height: 391px" class="" alt="" width="776" height="1190" src="/images/product/00003.jpg">&nbsp;<img style="width: 329px; height: 391px" class="" alt="" width="502" height="778" src="/images/product/00004.jpg"></p>`
},
]
},
ozonizer:{
name:'臭氧发生器',
data:[
{
id:0,
url:'/product/ozonizer/0',
title:'绿恒TLS-C-20臭氧发生器',
time:'2014-01-22',
thumbnail:'/images/product/ozonizer00001.jpg',
con:`<div style="text-align: center">&nbsp;<img alt="蓝底大IMG_0836" src="/images/product/ozonizer00001.jpg"></div>
<div>&nbsp;</div>
<div>臭氧可杀灭细菌繁殖体和芽胞、病毒、真菌等,并可破坏内毒杆菌毒素。</div>
<div>广泛应用于:饮用水、游泳池、医院无菌室、流动水消毒、冷却塔、动物园和湖泊、水产养殖、小规模试验性工厂、去色、去味、石油化工、食品生产、大气细菌控制、除化学药物、果蔬保鲜。</div>`
}
]
},
disinfectant:{
name:'水木兰二氧化氯消毒粉',
data:[
{
id:0,
url:'/product/disinfectant/0',
title:'水木兰二氧化氯消毒粉',
time:'2011-03-04',
thumbnail:'/images/product/disinfectant00001.jpg',
con:`<p style="text-align: center"><img alt="" src="/images/product/disinfectant00001.jpg" style="height:338px; width:450px"></p>
<div>  </div>
<p><strong>水木兰<span style="font-size:10.5pt"><sup>®</sup></span>二氧化氯消毒粉</strong></p>
<div style="line-height: 150%; text-indent: 21.2pt">水木兰<span style="font-size:10.5pt"><sup>®</sup></span>高纯二氧化氯消毒粉剂是北京天绿恒力科技有限公司根据多年的实践经验,采用高新技术精心研制而成的一种具有世界先进水平的新一代高科技环保型消毒剂。填补了市场上对使用方便、快速高效的二氧化氯剂型需求的空白。其精选进口原料,优良品质,绝无重金属残留,杜绝二次污染,使用安全放心。</div>
<div style="line-height: 150%; text-indent: 21.2pt">使用时将粉剂包装内容物倒入一定量水中,无须专门活化,溶解后,即可获得一定浓度的二氧化氯溶液,转化率高达95%以上。具有转化率高、杀菌力极强,运输、储藏安全,反应迅速,纯度高、无杂质,用量少、成本低,有效期长、使用方便等优点。</div>
<div style="line-height: 150%; text-indent: 24.25pt">&nbsp;</div>
<div style="line-height: 150%"><strong>可广泛应用于:</strong></div>
<div style="line-height: 150%">&nbsp;</div>
<div style="line-height: 20pt; vertical-align: baseline"><span style="font-size:14px"><span style="color:fuchsia">★</span>适用于饮用水消毒</span></div>
<p><span style="font-size:14px">&nbsp;&nbsp;&nbsp;&nbsp;自备井水、地表水、二次供水、直饮水及游泳池水</span></p>
<div style="line-height: 150%">
<p style="margin-left: 21.21pt"><span style="font-size:14px">等水体的消毒、杀菌、灭藻、除味等。</span></p>
<p><span style="font-size:14px"><span style="color:fuchsia">★</span>适用于一般物体表面的消毒</span></p>
<p style="margin-left: 21.21pt"><span style="font-size:14px">食品加工、饮料厂、发酵工业、制药等行业的生产设备、管道、容器以及包装容器和工具的最终灭菌消毒。</span></p>
<p style="margin-left: 21.21pt"><span style="font-size:14px">食品、饮料、冷饮行业配制无菌原料水。生产环境(如:生产车间、地面等)消毒、灭菌、防霉、除臭处理。</span></p>
<p style="margin-left: 21.21pt"><span style="font-size:14px">餐厅、宾馆、家庭、摊档餐具和卫生设施的灭菌消毒与空气环境消毒。</span></p>
<p><span style="font-size:14px"><span style="color:fuchsia">★</span>适用于瓜果、蔬菜的消毒</span></p>
<p><span style="font-size:14px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;水果蔬菜、肉食品等的消毒、灭菌、保鲜、防腐。</span></p>
</div>
<div style="line-height: 150%"><strong>☆</strong><strong>卫生许可证:(京)卫消证字</strong><strong>(2013)</strong><strong>第</strong><strong>0264</strong><strong>号</strong></div>`
}
]
}
}
module.exports = productData;
\ No newline at end of file
const { Router } = require('express')
const newsData = require('./data/news');
const router = Router()
/* GET users listing. */
router.get('/news', function (req, res, next) {
if(req.query.pageSize){
res.json(newsData.slice(0,req.query.page))
}else{
res.json(newsData)
}
})
module.exports = router
\ No newline at end of file
const { Router } = require('express')
const productData = require('./data/product')
const router = Router()
/* GET users listing. */
router.get('/product', function (req, res, next) {
res.json(productData)
})
module.exports = router
\ No newline at end of file
const { Router } = require('express')
const router = Router()
// Mock Users
const users = [
{ name: 'Alexandre' },
{ name: 'Pooya' },
{ name: 'Sébastien' }
]
/* GET users listing. */
router.get('/users', function (req, res, next) {
res.json(users)
})
/* GET user by ID. */
router.get('/users/:id', function (req, res, next) {
const id = parseInt(req.params.id)
if (id >= 0 && id < users.length) {
res.json(users[id])
} else {
res.sendStatus(404)
}
})
module.exports = router
\ No newline at end of file
......@@ -19,10 +19,9 @@
<script>
export default {
data(){
return {
newsData:this.$store.state.news.newsData,
}
async asyncData({ app }) {
const newsData = await app.$axios.$get('/api/news?pageSize=10');
return { newsData: newsData }
},
computed:{
optionTop(){
......
......@@ -102,18 +102,14 @@ import Profile from '~/components/index/Profile.vue'
import ContactUs from '~/components/ContactUs.vue'
export default {
props:{
async asyncData({ app }) {
const newsData = await app.$axios.$get('/api/news?pageSize=10');
const productData = await app.$axios.$get('/api/product');
return { newsData: newsData,productData:[...productData.ozonizer.data,...productData.disinfectant.data,...productData.equipment.data] }
},
data:function(){
return {
productData:[
...this.$store.state.product.data.ozonizer.data,
...this.$store.state.product.data.disinfectant.data,
...this.$store.state.product.data.equipment.data,
],
qualificationsData:this.$store.state.qualifications.data,
newsData:this.$store.state.news.newsData,
engineeringData:this.$store.state.engineeringData,
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment