2312970463@qq.com 3 lat temu
rodzic
commit
1a7fcaba79

+ 1 - 0
public/鄂州志愿者登记表.doc

@@ -0,0 +1 @@
+hello

BIN
src/assets/img/search.png


+ 17 - 0
src/request/api.js

@@ -67,6 +67,14 @@ export function loveList(data) {
 		params: data
 	});
 }
+//
+export function searchLoveList(data) {
+	return request({
+		url: '/api/donate/search',
+		method: 'post',
+		params: data
+	});
+}
 //获取鄂州区新闻
 export function ezqList(data) {
 	return request({
@@ -111,3 +119,12 @@ export function friendLink(data) {
 		params: data
 	});
 }
+//获取表格下载列表
+
+export function downloadList(data) {
+	return request({
+		url: '/api/article/list/24',
+		method: 'get',
+		params: data
+	});
+}

+ 1 - 1
src/router.js

@@ -17,7 +17,7 @@ Router.prototype.push = function push(location) {
 Vue.use(Router)
 
 export default new Router({
-  mode: 'history',
+  // mode: 'history',
   base: process.env.BASE_URL,
   routes: [
     {

+ 1 - 0
src/views/Home.vue

@@ -630,6 +630,7 @@ export default {
 						color: #FFFFFF;
 						position: absolute;
 						bottom: 0;
+						text-shadow: 0 0 2px #000;
 					}
 				}
 				.news {

+ 67 - 3
src/views/LoveList.vue

@@ -1,5 +1,9 @@
 <template>
 	<div class="love-list">
+		<div class="search">
+			<input type="text" v-model="name" placeholder="请输入捐赠者" class="" @keyup.enter="search()"/>
+			<img src="../assets/img/search.png" class="hand" @click="search()">
+		</div>
 		<el-table :data="tableData" border style="width: 100%">
 			<el-table-column prop="time" label="捐献时间" width="154" align="center"></el-table-column>
 			<el-table-column prop="donate_er" label="捐献者" width="409" align="center"></el-table-column>
@@ -7,19 +11,23 @@
 			<el-table-column prop="intention" label="捐献意向" width="356" align="center"></el-table-column>
 			<el-table-column prop="mark" label="备注" align="center"></el-table-column>
 		</el-table>
-		<el-pagination layout="prev, pager, next" :total="total" background prev-text="上一页" next-text="下一页" @current-change="currentChange" :page-size="14"></el-pagination>
+		<el-pagination layout="prev, pager, next" :total="total" background prev-text="上一页" next-text="下一页" @current-change="currentChange" :page-size="limit" hide-on-single-page></el-pagination>
 	</div>
 </template>
 
 <script>
-	import { loveList } from '../request/api.js'
+	import { loveList, searchLoveList } from '../request/api.js'
+	import {
+		Message
+	} from 'element-ui'
 export default {
 	data() {
 		return {
 			tableData: [],
 			total: 100,
 			page:1,
-			limit: 14
+			limit: 14,
+			name: ''
 		};
 	},
 	created() {
@@ -53,6 +61,35 @@ export default {
 				obj.total = res.data.count
 				console.log(obj.tableData)
 			})
+		},
+		search() {
+			console.log(this.name)
+			let obj = this
+			let data = {
+				page: obj.page,
+				limit: obj.limit,
+				key: obj.name
+			}
+			searchLoveList(data).then( res => {
+				console.log(res,'dddddddddddd')
+				if(res.data.list.length !== 0){
+					Message.success('数据加载完成!')
+				}else {
+					Message('未找到该用户数据。')
+				}
+				obj.tableData = res.data.list.map(item => {
+					if(item.intention === ''){
+						item.intention = '非定向捐款'
+					}
+					let date = new Date(item.add_time*1000)
+					let Y = date.getFullYear()
+					let M = date.getMonth()+1 < 10 ? '0' + (date.getMonth()+1) : date.getMonth() + 1;
+					let D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
+					item.time = Y + '/' + M + '/' + D
+					return item
+				})
+				
+			})
 		}
 	}
 };
@@ -84,4 +121,31 @@ export default {
 	right: 0;
 	padding-right: 0;
 }
+.search {
+	margin-left: 879px;
+	padding-left: 13px;
+	padding-right: 13px;
+	width: 295px;
+	height: 33px;
+	line-height: 33px;
+	background: #FFFFFF;
+	border: 1px solid #CCCCCC;
+	border-radius: 10px;
+	margin-bottom: 10px;
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	input {
+		width: 235px;
+		font-size: 16px;
+		font-family: PingFang SC;
+		font-weight: bold;
+		outline: none;
+		border: none;
+	}
+	img {
+		width: 20px;
+		height: 20px;
+	}
+}
 </style>

+ 15 - 20
src/views/download/List.vue

@@ -1,19 +1,19 @@
 <template>
 	<div class="new-list">
-		<div class="new-item  hand" v-for="item in newList" :key="item.id" @click="navTo('/download/detail?id='+ item.id)">
+		<div class="new-item  hand" v-for="item in newList" :key="item.id">
 			<div class="title clamp">
 				<!-- <span class="title-icon"></span> -->
 				<img src="../../assets/img/download.png" >
-				{{ item.title }}
+				<a :href="item.synopsis">{{ item.title }}</a>
 			</div>
 			<div class="time">{{ item.add_time }}</div>
 		</div>
-		<el-pagination layout="prev, pager, next" :total="total" background prev-text="上一页" next-text="下一页" @current-change="currentChange" :page-size="15"></el-pagination>
+		<el-pagination layout="prev, pager, next" :total="total" background prev-text="上一页" next-text="下一页" @current-change="currentChange" :page-size="limit" hide-on-single-page></el-pagination>
 	</div>
 </template>
 
 <script>
-import { loadIndexs, splist, loveList, friendList , newsList, openList } from '../../request/api.js';
+import { downloadList } from '../../request/api.js';
 export default {
 	data() {
 		return {
@@ -37,10 +37,11 @@ export default {
 		},
 		getList() {
 			let obj = this
-			openList({
+			downloadList({
 				page: obj.page,
 				limit: obj.limit
 			}).then(res => {
+				console.log(res.data.list)
 				obj.newList = res.data.list
 				obj.total = res.data.count
 			})
@@ -64,30 +65,24 @@ export default {
 		line-height: 40px;
 		&:hover {
 			color: red;
-			// .title {
-			// 	.title-icon {
-			// 		border-left-color: red;
-			// 	}
-			// }
+			.title {
+				a {
+					color: red;
+				}
+			}
 		}
 		&:last-of-type {
 			border-bottom: none;
 		}
 		.title {
 			width: 500px;
-			// .title-icon {
-			// 	display: inline-block;
-			// 	width: 0;
-			// 	height: 0;
-			// 	width: 0;
-			// 	height: 0;
-			// 	border-top: 6px solid transparent;
-			// 	border-left: 8px solid #d2d2d2;
-			// 	border-bottom: 6px solid transparent;
-			// }
+			a {
+				color: #000;
+			}
 			img {
 				width: 14px;
 				height: 14px;
+				margin-right: 13px;
 			}
 		}
 	}

+ 1 - 1
src/views/help/Aid.vue

@@ -20,7 +20,7 @@
 		},
 		methods: {
 			getContent() {
-				details({},25).then(({data}) => {
+				details({},125).then(({data}) => {
 					this.content = data.content
 				})
 			}

+ 1 - 1
src/views/help/Juvenile.vue

@@ -20,7 +20,7 @@
 		},
 		methods: {
 			getContent() {
-				details({},25).then(({data}) => {
+				details({},127).then(({data}) => {
 					this.content = data.content
 				})
 			}

+ 1 - 1
src/views/help/Service.vue

@@ -20,7 +20,7 @@
 		},
 		methods: {
 			getContent() {
-				details({},25).then(({data}) => {
+				details({},126).then(({data}) => {
 					this.content = data.content
 				})
 			}

+ 1 - 1
src/views/newsCenter/echeng/List.vue

@@ -7,7 +7,7 @@
 			</div>
 			<div class="time">{{ item.add_time }}</div>
 		</div>
-		<el-pagination layout="prev, pager, next" :total="total" background prev-text="上一页" next-text="下一页" @current-change="currentChange" :page-size="15" hide-on-single-page></el-pagination>
+		<el-pagination layout="prev, pager, next" :total="total" background prev-text="上一页" next-text="下一页" @current-change="currentChange" :page-size="limit" hide-on-single-page></el-pagination>
 	</div>
 </template>
 

+ 1 - 1
src/views/newsCenter/laws/List.vue

@@ -7,7 +7,7 @@
 			</div>
 			<div class="time">{{ item.add_time }}</div>
 		</div>
-		<el-pagination layout="prev, pager, next" :total="total" background prev-text="上一页" next-text="下一页" @current-change="currentChange" :page-size="15" hide-on-single-page></el-pagination>
+		<el-pagination layout="prev, pager, next" :total="total" background prev-text="上一页" next-text="下一页" @current-change="currentChange" :page-size="limit" hide-on-single-page></el-pagination>
 	</div>
 </template>
 

+ 1 - 1
src/views/newsCenter/liangzihu/List.vue

@@ -7,7 +7,7 @@
 			</div>
 			<div class="time">{{ item.add_time }}</div>
 		</div>
-		<el-pagination layout="prev, pager, next" :total="total" background prev-text="上一页" next-text="下一页" @current-change="currentChange" :page-size="15" hide-on-single-page></el-pagination>
+		<el-pagination layout="prev, pager, next" :total="total" background prev-text="上一页" next-text="下一页" @current-change="currentChange" :page-size="limit" hide-on-single-page></el-pagination>
 	</div>
 </template>
 

+ 3 - 3
src/views/newsCenter/redNews/List.vue

@@ -7,12 +7,12 @@
 			</div>
 			<div class="time">{{ item.add_time }}</div>
 		</div>
-		<el-pagination layout="prev, pager, next" :total="total" background prev-text="上一页" next-text="下一页" @current-change="currentChange" :page-size="15"></el-pagination>
+		<el-pagination layout="prev, pager, next" :total="total" hide-on-single-page background prev-text="上一页" next-text="下一页" @current-change="currentChange" :page-size="limit"></el-pagination>
 	</div>
 </template>
 
 <script>
-import { loadIndexs, splist, loveList, friendList , newsList, openList } from '../../../request/api.js';
+import { newsList } from '../../../request/api.js';
 export default {
 	data() {
 		return {
@@ -36,7 +36,7 @@ export default {
 		},
 		getList() {
 			let obj = this
-			openList({
+			newsList({
 				page: obj.page,
 				limit: obj.limit
 			}).then(res => {

+ 1 - 1
src/views/popularScience/List.vue

@@ -9,7 +9,7 @@
 					<div class="num">{{item.visit}}人已观看</div>
 				</div>
 			</div>
-			<el-pagination layout="prev, pager, next" :total="total" background prev-text="上一页" next-text="下一页" @current-change="currentChange" :page-size="7"></el-pagination>
+			<el-pagination layout="prev, pager, next" :total="total" background prev-text="上一页" next-text="下一页" @current-change="currentChange" :page-size="limit"></el-pagination>
 		</div>
 	</div>
 </template>

+ 1 - 1
src/views/publicity/List.vue

@@ -7,7 +7,7 @@
 			</div>
 			<div class="time">{{ item.add_time }}</div>
 		</div>
-		<el-pagination layout="prev, pager, next" :total="total" background prev-text="上一页" next-text="下一页" @current-change="currentChange" :page-size="15" hide-on-single-page></el-pagination>
+		<el-pagination layout="prev, pager, next" :total="total" background prev-text="上一页" next-text="下一页" @current-change="currentChange" :page-size="limit" hide-on-single-page></el-pagination>
 	</div>
 </template>
 

+ 1 - 0
vue.config.js

@@ -15,4 +15,5 @@ module.exports = {
       errors: true
     }
   }
+ 
 }