Bladeren bron

2021-8-21

cmy 3 jaren geleden
bovenliggende
commit
9ff63c1b01

+ 106 - 0
src/api/index.js

@@ -0,0 +1,106 @@
+import request from '@/utils/request'
+
+// 获取首页数据
+export function loadIndexs(data) {
+	return request({
+		url: '/api/index',
+		method: 'get',
+		data
+	});
+}
+
+// 公司产品列表
+export function cateList(data, type) {
+	return request({
+		url: '/api/cate/' + type,
+		method: 'get',
+		data
+	});
+}
+
+// 获取公司产品详情
+// export function productInfo(data, id) {
+// 	return request({
+// 		url: '/api/product/' + id,
+// 		method: 'get',
+// 		data
+// 	});
+// }
+
+// aboutlist
+export function aboutlist(data) {
+	return request({
+		url: '/api/about',
+		method: 'get',
+		data
+	});
+}
+
+// storylist
+export function storylist(data) {
+	return request({
+		url: '/api/story',
+		method: 'get',
+		data
+	});
+}
+// caseslist
+export function caseslist(data) {
+	return request({
+		url: '/api/cases',
+		method: 'get',
+		data
+	});
+}
+// productlist
+export function productlist(data) {
+	return request({
+		url: '/api/product',
+		method: 'get',
+		data
+	});
+}
+// articlelist
+export function articlelist(data) {
+	return request({
+		url: '/api/article',
+		method: 'get',
+		data
+	});
+}
+
+// 提交表单 addForm
+export function addForm(data) {
+	return request({
+		url: '/api/form',
+		method: 'post',
+		data
+	});
+}
+
+// 获取公司列表
+export function companies(data) {
+	return request({
+		url: '/api/companies',
+		method: 'get',
+		data
+	});
+}
+// 获取设备信息
+export function machine(data,id) {
+	return request({
+		url: '/api/machine/'+id,
+		method: 'get',
+		data
+	});
+}
+// 获取设备信息数据展示
+export function machineId(data,id) {
+	return request({
+		url: '/api/machine/'+id,
+		method: 'get',
+		data
+	});
+}
+
+

+ 38 - 0
src/api/product.js

@@ -0,0 +1,38 @@
+import request from '@/utils/request'
+
+// 获取公司产品详情
+export function productInfo(data, id) {
+	return request({
+		url: '/api/product/' + id,
+		method: 'get',
+		data
+	});
+}
+ 
+// 关于我们详情
+export function aboutInfo(data, id) {
+	return request({
+		url: '/api/about/' + id,
+		method: 'get',
+		data
+	});
+}
+
+//  公司案例详情 
+export function casesInfo(data, id) {
+	return request({
+		url: '/api/cases/' + id,
+		method: 'get',
+		data
+	});
+}
+
+// 公司介绍 articleInfo
+export function articleInfo(data, id) {
+	return request({
+		url: '/api/article/' + id,
+		method: 'get',
+		data
+	});
+}
+

BIN
src/assets/img/weichat.png


+ 7 - 10
src/components/navBar/NavBar.vue

@@ -1,5 +1,4 @@
 <template>
-  <div>
     <div class="top-bar">
 	  <div class="img">
 	  	<img src="../../assets/img/logo.png" >
@@ -11,7 +10,6 @@
 		</div>
 	  </div>
     </div>
-  </div>
 </template>
 
 <script>
@@ -71,10 +69,10 @@ export default {
 <style lang="scss" scoped>
 .top-bar {
   max-width: 1920px;
-  min-width: 1200px;
-  height: 140px;
+  min-width: 1080px;
+  // height: 140px;
   margin: 0 auto;
-  padding: 35px 97px 0 122px;
+  padding: 15px;
   display: flex;
   justify-content: space-between;
   background-color: #FFFFFF;
@@ -84,21 +82,20 @@ export default {
   color: #000000;
   letter-spacing:3px;
   margin-bottom: 24px;
+  align-items:center;
   .img {
-	  width: 373px;
-	  height: 94px;
+	  width: 200px;
+	  height: auto;
 	  img {
 		  width: 100%;
-		  height: 100%;
+		  height: auto;
 	  }
   }
   .barbox {
 	display: flex;
 	.bar-item {
-		padding-top: 50px;
 		margin-left: 30px;
 		flex-grow: 1;
-		height: 60px;
 		align-items: center;
 		font-family: PingFang SC;
 		font-size: 18px;

+ 11 - 8
src/components/pageBottom/PageBottom.vue

@@ -2,7 +2,7 @@
 	<div class="view-bottom">
 		<div class="erweima">
 			<div class="erweima-bg">
-				<img src="" >
+				<img src="../../assets/img/weichat.png" >
 			</div>
 			<div class="erweima-title">
 				扫一扫关注我们
@@ -86,7 +86,7 @@ export default {
 			align-items: center;
 			font-family: PingFang SC;
 			line-height: 25px;
-			font-size: 18px;
+			font-size: 16px;
 			cursor: pointer;
 			border-left: 1px solid #FFFFFF;
 			.title {
@@ -98,7 +98,7 @@ export default {
 		width: 1200px;
 		text-align: center;
 		margin: 0 auto;
-		font-size: 21px;
+		font-size: 14px;
 		font-family: Adobe Heiti Std;
 		font-weight: normal;
 		color: #ffffff;
@@ -110,20 +110,23 @@ export default {
 }
 .erweima {
 		position: absolute;
-		top: 57px;
-		right: 104px;
+		top: 50px;
+		right: 100px;
 		display: flex;
 		flex-direction: column;
 		align-items: center;
 		width: auto;
 		height: auto;
 		.erweima-bg {
-			width: 184px;
-			height: 174px;
+			width: 130px;
 			background-color: #FFFFFF;
+			line-height: 0;
+			img{
+				width: 100%;
+			}
 		}
 		.erweima-title {
-			font-size: 25px;
+			font-size: 14px;
 			font-family: Adobe Heiti Std;
 			font-weight: normal;
 			color: #FFFFFF;

+ 2 - 2
src/components/swiper/swiper.vue

@@ -7,7 +7,7 @@
 </template>
 
 <script>
-import {  banner } from '../../request/api.js';
+import {  loadIndexs } from '@/api/index.js';
 export default {
 	data(){
 		return {
@@ -20,7 +20,7 @@ export default {
 	methods:{
 		getSwiperList() {
 			let obj = this
-			banner().then(res => {
+			loadIndexs().then(res => {
 				let list = res.data.list.map( item => {
 					return item.image_input[0]
 				})

+ 0 - 70
src/request/api.js

@@ -1,70 +0,0 @@
-import request from "./request.js"
-
-
-// 获取首页数据
-export function loadIndexs(data) {
-	return request({
-		url: '/api/index',
-		method: 'get',
-		data
-	});
-}
-
-// 获取轮播图数据
-export function banner(data) {
-	return request({
-		url: '/api/article/list/9',
-		method: 'get',
-		params: data
-	});
-}
-
-// 获取科普文章列表
-export function splist(data) {
-	return request({
-		url: '/api/article/list/1',
-		method: 'get',
-		params: data
-	});
-}
-// 获取红会新闻文章列表
-export function newsList(data) {
-	return request({
-		url: '/api/article/list/7',
-		method: 'get',
-		params: data
-	});
-}
-// 获取红会新闻文章列表
-export function openList(data) {
-	return request({
-		url: '/api/article/list/8',
-		method: 'get',
-		params: data
-	});
-}
-//获取政策法规文章列表
-export function regulationList(data) {
-	return request({
-		url: '/api/article/list/10',
-		method: 'get',
-		params: data
-	});
-}
-// 获取文章详情
-export function details(data,id) {
-	return request({
-		url: '/api/article/details/'+id,
-		method: 'get',
-		data
-	});
-}
-// 获取爱心捐款列表
-export function loveList(data) {
-	return request({
-		url: '/api/bulletin',
-		method: 'get',
-		params: data
-	});
-}
-

+ 0 - 0
src/request/request.js → src/utils/request.js


+ 1 - 1
src/views/Home.vue

@@ -50,7 +50,7 @@
 <script>
 import ItemTitle from './homeChild/ItemTitle.vue';
 
-import { loadIndexs, splist, loveList, friendList, newsList, openList, banner, regulationList } from '../request/api.js';
+// import { loadIndexs, splist, loveList, friendList, newsList, openList, banner, regulationList } from '../request/api.js';
 export default {
 	components: {
 		ItemTitle

+ 1 - 1
src/views/donation/Contribution.vue

@@ -7,7 +7,7 @@
 </template>
 
 <script>
-	import { details } from '../../request/api.js'
+	// import { details } from '../../request/api.js'
 	
 	export default {
 		data() {

+ 1 - 1
src/views/donation/Hpc.vue

@@ -5,7 +5,7 @@
 </template>
 
 <script>
-	import { details } from '../../request/api.js'
+	// import { details } from '../../request/api.js'
 	export default {
 		data() {
 			return {

+ 1 - 1
src/views/donation/OrganDonation.vue

@@ -5,7 +5,7 @@
 </template>
 
 <script>
-	import { details } from '../../request/api.js'
+	// import { details } from '../../request/api.js'
 	
 	export default {
 		data() {

+ 19 - 20
vue.config.js

@@ -2,26 +2,25 @@
 const path = require('path')
 const port = process.env.port || process.env.npm_config_port || 9527 // dev port
 module.exports = {
-  publicPath: '/',
-  outputDir: 'dist',
-  indexPath: process.env.NODE_ENV === 'development' ? 'mer.html' : 'index.html',
-  lintOnSave: process.env.NODE_ENV === 'development',
-  productionSourceMap: false,
-  devServer: {
-    port: port,
-    // open: true,
-    overlay: {
-      warnings: false,
-      errors: true
-    },
-	proxyTable: {
-		'/apis': {
-			target:'http://tianli.liuniu946.com',
-			changOrigin: true,
-			pathRewrite: {
-				'^/apis':'/apis'
-			}
+	publicPath: '/',
+	outputDir: 'dist',
+	indexPath: process.env.NODE_ENV === 'development' ? 'mer.html' : 'index.html',
+	lintOnSave: process.env.NODE_ENV === 'development',
+	productionSourceMap: false,
+	devServer: {
+		port: port,
+		open: true,
+		overlay: {
+			warnings: false,
+			errors: true
+		},
+		"proxy" : {
+		    "/api" : {
+		        "target" : "http://tianli.liuniu946.com/api", //请求的目标域名
+		        "changeOrigin" : true,
+		        // "secure": false,
+		        "pathRewrite" : {'^/api': ''}
+		    }
 		}
 	}
-  }
 }