lchao 1 anno fa
parent
commit
1323b0e00b

+ 6 - 14
api/cooperative/cooperative.js

@@ -1,26 +1,18 @@
-import upload from '@/utils/upload'
 import request from '@/utils/request'
 
 // 查询合作社列表
-export function getCooperative(query) {
+export function getList(query) {
   return request({
-    url: '/system/cooperative/list',
+    url: '/high/server/cooperative/list',
     method: 'get',
-    params: query
-  })
-}
-export function getCooperative() {
-  return request({
-    url: '/system/user/listAll',
-    method: 'get'
+    params: {}
   })
 }
 
 // 查询合作社详情
-export function updateUserProfile(data) {
+export function getDetails(id) {
   return request({
-    url: '/system/user/profile',
-    method: 'put',
-    data: data
+    url: '/high/server/cooperative/' + id,
+    method: 'get'
   })
 }

+ 10 - 0
api/handleAffairs/gridType.js

@@ -17,6 +17,16 @@ export function getGridType(id) {
   })
 }
 
+// 查询事项列表
+export function getMattersAll(query) {//需要移动地方,暂时放这里
+  return request({
+    url: '/system/matter/listAll',
+    method: 'get',
+    params: query
+  })
+}
+
+
 // 新增网格类型配置
 export function addGridType(data) {
   return request({

+ 57 - 0
api/handleAffairs/matter.js

@@ -0,0 +1,57 @@
+import request from '@/utils/request'
+
+// 查询事项列表
+export function listDept(query) {
+  return request({
+    url: '/system/collect/list',
+    method: 'get',
+    params: query
+  })
+}
+// 查询事项列表
+export function getMattersAll(query) {
+  return request({
+    url: '/system/matter/listAll',
+    method: 'get',
+    params: query
+  })
+}
+// 查询事项详细
+export function getDept(id) {
+  return request({
+    url: '/system/matter/lists/' + id,
+    method: 'get'
+  })
+}
+// 新增事项
+export function addsc(data) {
+  return request({
+    url: '/system/collect/add',
+    method: 'post',
+    data: data
+  })
+}
+
+// 查询事项收藏详细
+export function collectlist(id) {
+  return request({
+    url: '/system/collect/collectlist/' + id,
+    method: 'get'
+  })
+}
+
+// 查询事项详细
+export function getsc(id) {
+  return request({
+    url: '/system/collect/lists/' + id,
+    method: 'get'
+  })
+}
+
+// 删除事项
+export function delDept(id) {
+  return request({
+    url: '/system/collect/delete/' + id,
+    method: 'delete'
+  })}
+

+ 17 - 0
api/index/index.js

@@ -32,4 +32,21 @@ export function getList(query){
 		method: 'get',
 		data: query
 	})
+}
+
+//查询封面
+export function getCovers(){
+	return request({
+		url: '/my/img/getCover',
+		method: 'get'
+	})
+}
+
+
+//查询封面
+export function getCarousel(){
+	return request({
+		url: '/my/img/getCarousel',
+		method: 'get'
+	})
 }

+ 9 - 0
api/information/information.js

@@ -62,6 +62,15 @@ export function updateServer(data) {
   })
 }
 
+// 点赞
+export function likeServer(data) {
+  return request({
+    url: '/jnb/information/like',
+    method: 'post',
+    data: data
+  })
+}
+
 // 删除资讯
 export function delServer(ids,type) {
   return request({

+ 34 - 2
pages.json

@@ -237,12 +237,35 @@
 			"style": {
 				"usingComponents": {},
 				"navigationBarBackgroundColor": "#07c160",
+				"enablePullDownRefresh": true,
+				"onReachBottomDistance" : 5,
 				"navigationBarTextStyle": "white",
 				"navigationBarTitleText": "行情"
 
 
 			}
-		}, {
+		},
+		{
+			"path": "pages/quotations/quotationsForm",
+			"style": {
+				"usingComponents": {},
+				"navigationBarBackgroundColor": "#07c160",
+				"navigationBarTextStyle": "white",
+				"navigationBarTitleText": "新增行情列表"
+			}
+		},
+		{
+			"path": "pages/quotations/quotationsSecond",
+			"style": {
+				"usingComponents": {},
+				"navigationBarBackgroundColor": "#07c160",
+				"enablePullDownRefresh": true,
+				"onReachBottomDistance" : 5,
+				"navigationBarTextStyle": "white",
+				"navigationBarTitleText": "行情列表"
+			}
+		},
+		{
 			"path": "pages/toGovernmentList/toGovernmentList",
 			"style": {
 				"usingComponents": {},
@@ -277,7 +300,7 @@
 				"usingComponents": {},
 				"navigationBarBackgroundColor": "#07c160",
 				"navigationBarTextStyle": "white",
-				"navigationBarTitleText": "网格详情"
+				"navigationBarTitleText": ""
 
 			}
 		},
@@ -415,6 +438,15 @@
 				"navigationBarTextStyle": "white",
 				"navigationBarTitleText": "主题导航"
 			}
+		},
+		{
+			"path" : "pages/matterAll/matterAll",
+			"style": {
+				"usingComponents": {},
+				"navigationBarBackgroundColor": "#07c160",
+				"navigationBarTextStyle": "white",
+				"navigationBarTitleText": "事项列表"
+			}
 		}
 	],
 	"easycom": {

+ 22 - 27
pages/cooperative/cooperative.vue

@@ -1,16 +1,16 @@
 <template>
     <view class="container">
         <!-- 供销社列表 -->
-        <view class="rnwdList" @tap="goDetails" v-for="(item, index) in list" :key="index">
-            <view class="cooperativeImgBox">
-                <image :src="loadImgSrc('/snbj.png')" class="cooperativeImg" @tap="goDetails"></image>
+        <view class="rnwdList" v-for="(item, index) in list" :key="index">
+            <view @tap="goDetails(item.id)" class="cooperativeImgBox">
+                <image :src="loadImgSrc('/snbj.png')" class="cooperativeImg"></image>
             </view>
-            <view class="cooperativeBox">
+            <view @tap="goDetails(item.id)" class="cooperativeBox">
                 <view class="list">
                     <span class="listTitle">{{ item.name }}</span>
                     <view class="jlSj">
                         <span class="jf">
-                            {{ item.address }}
+                            {{ item.address?item.address:'' }}
                         </span>
                     </view>
                 </view>
@@ -21,30 +21,17 @@
 </template>
 
 <script>
+import { getList, getDetails } from '@/api/cooperative/cooperative';
 export default {
     data() {
         return {
             list: [
                 {
-                    name:"供销社1",
-                    address:"供销社地址1",
-                    chargePeople:"负责人1",
-                    chargePhone:"13103215236",
-                    imgUrl:"/profile/upload/2024/03/01/nacos_20240301145836A002.png"
-                },
-                {
-                    name:"供销社2",
-                    address:"供销社地址2",
-                    chargePeople:"负责人2",
-                    chargePhone:"09876543210",
-                    imgUrl:"/profile/upload/2024/03/01/nacos_20240301145836A002.png"
-                },
-                {
-                    name:"供销社3",
-                    address:"供销社地址3",
-                    chargePeople:"负责人3",
-                    chargePhone:"12345678910",
-                    imgUrl:"/profile/upload/2024/03/01/nacos_20240301145836A002.png"
+                    name:"-",
+                    address:"-",
+                    chargePeople:"-",
+                    chargePhone:"-",
+                    imgUrl:"-"
                 }
             ],
         };
@@ -53,12 +40,20 @@ export default {
      * 生命周期函数--监听页面加载
      */,
     onLoad(options) {
-
+        this.getList();
     },
     methods: {
-        goDetails() {
+        /** 查询列表 */
+        getList(type) {
+            this.loading = true;
+            getList().then(response => {
+                this.list = response.rows;
+            });
+        },
+        /** 查询详情 */
+        goDetails(id) {
             uni.navigateTo({
-                url: '/pages/cooperative/details'
+                url: '/pages/cooperative/details?id='+id
             });
         }
     }

+ 24 - 11
pages/cooperative/details.vue

@@ -10,7 +10,7 @@
                     {{ item.title }}:
                 </span>
                 <span>
-                    {{ item.content }}
+                    {{ item.content?item.content:'' }}
                 </span>
             </view>
         </view>
@@ -18,31 +18,32 @@
 </template>
 
 <script>
-export default {
+    import { getDetails } from '@/api/cooperative/cooperative';
+    export default {
     data() {
         return {
             list: [
                 {
                     title: "名称",
-                    content: "第十三号供销社",
+                    content: "-",
                 },
                 {
                     title: "地址",
-                    content: "十三号街区地下研究所",
+                    content: "-",
                 },
                 {
                     title: "负责人",
-                    content: "高耀",
+                    content: "-",
                 },
                 {
                     title: "负责人电话",
-                    content: "13178945612",
+                    content: "-",
                 }
             ],
             cooperative: {
-                name:"供销社1",
-                address:"供销社地址1",
-                chargePeople:"负责人1",
+                name:"第十三号供销社",
+                address:"十三号街区地下研究所",
+                chargePeople:"高耀",
                 chargePhone:"13103215236",
                 imgUrl:"/profile/upload/2024/03/01/nacos_20240301145836A002.png"
             }
@@ -52,10 +53,22 @@ export default {
      * 生命周期函数--监听页面加载
      */,
     onLoad(options) {
-        console.log(666)
+        this.getDetails(options.id);
     },
     methods: {
-
+        /** 详情 */
+        getDetails(id) {
+            getDetails(id).then(response => {
+                let details = response.data;
+                console.log(response.data)
+                let list = [];
+                list.push({ title:"名称", content:details.name });
+                list.push({ title:"地址", content:details.address });
+                list.push({ title:"负责人", content:details.chargePeople });
+                list.push({ title:"负责人电话", content:details.chargePhone });
+                this.list = list;
+            });
+        },
     }
 };
 </script>

+ 83 - 24
pages/fuwu/fuwu.vue

@@ -1,49 +1,58 @@
 <template>
     <!-- pages/me.wxml -->
 	<view class="container">
-		<uni-search-bar  :focus="true" v-model="searchValue"  @input="search"
-		style="width: 100%;"
-			@cancel="cancel">
-		</uni-search-bar>
+		<view style="width: 100%;display: flex;">
+			<uni-search-bar  :focus="true" v-model="searchValue"  @input="search"
+				style="width: 70%;"
+				@cancel="cancel">
+			</uni-search-bar>
+			  <uni-data-select
+				  style="width: 30%;margin: auto;"
+				  v-model="value"
+				  placeholder="请选择排序"
+				  :localdata="range"
+				  @change="getList(value)"
+			></uni-data-select>
+		</view>
 	    <view class="rnwdList">
-	        <view class="list" @tap="goDetails(item)" v-for="(item, index1) in qbwd" :key="index1">
-				<span v-if="index1 < 3" style="color: red;">[置顶]</span>
+	        <view class="list" @tap.stop="goDetails(item)" v-for="(item, index1) in qbwd" :key="index1">
+				<span v-if="item.top == 1" style="color: red;">[置顶]</span>
 	            <span class="listTitle">{{ item.titleName }}</span>
 	
-	            <view class="onePic" v-if="index1 >2  ? item.urls.length == 1 : false ">
+	            <view class="onePic" v-if="item.top != 1  ? item.urls.length == 1 : false ">
 	                <image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
 					</image>
 	            </view>
-	            <view class="twoPic" v-if="index1 >2 ? item.urls.length == 2 : false">
+	            <view class="twoPic" v-if="item.top != 1 ? item.urls.length == 2 : false">
 	                <image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
 					</image>
 	            </view>
 	
-	            <view class="threePic" v-if="index1 >2 ? item.urls.length == 3 : false">
+	            <view class="threePic" v-if="item.top != 1 ? item.urls.length == 3 : false">
 	                <image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
 					</image>
 	            </view>
 	
-	           <!-- <view class="jlSj">
+	           <view class="jlSj">
 	                <span class="jf">
-	                    {{ item.jf }}
-	                    <em class="iconfont icon-jifen"></em>
+	                   {{ item.updateTime || item.createTime }}
+	                    <!-- <em class="iconfont icon-jifen"></em> -->
 	                </span>
 	                <view class="ck">
-	                    <span>
+	                    <!-- <span>
 	                        <em class="iconfont icon-pinglun"></em>
 	                        {{ item.pl }}
-	                    </span>
+	                    </span> -->
 	                    <span>
 	                        <em class="iconfont icon-chakan"></em>
-	                        {{ item.ck }}
+	                        {{ item.watchNum }}
 	                    </span>
-	                    <span>
-	                        <em class="iconfont icon-shoucang"></em>
-	                        {{ item.dz }}
+	                    <span :class=" favoriteList.includes(item.id) ? 'favorite' : 'not-favorite' ">
+	                        <em class="iconfont icon-shoucang" @click.stop="addFavorite(item)"></em>
+	                        {{ currentFavoriteCount(item) }}
 	                    </span>
 	                </view>
-	            </view> -->
+	            </view>
 	
 			</view>
 	    </view>
@@ -53,7 +62,7 @@
 </template>
 
 <script>
-import { listWxs ,listWx} from '@/api/information/information.js'
+import { listWxs ,listWx,likeServer} from '@/api/information/information.js'
 // pages/me.js
 export default {
     data() {
@@ -64,11 +73,19 @@ export default {
 			  pageSize: 7,
 			  titleName: '',
 			  type: 12,
-			  flag:''
+			  flag:'',
+			  isTop:0
 			},
 			topList:[],
 			total:0,
-			searchValue:''
+			searchValue:'',
+			favoriteList:[],
+			value: 1,
+			range: [
+				{ value: 'watch', text: "热度" },
+				{ value: 'like', text: "点赞" },
+				{ value: '', text: "最新" },
+			],
 		};
     },
 	created(){
@@ -97,6 +114,38 @@ export default {
 		}
 	},
 	methods:{
+		currentFavoriteCount(e){
+			if(this.favoriteList.includes(e.id)){
+				return e.likeNum + 1
+			} else {
+				return e.likeNum
+			}
+		},
+		addFavorite(e){
+			if(this.favoriteList.includes(e.id)) return
+			likeServer({
+				id:e.id,
+				type:12
+			}).then(e => {
+			})
+			this.favoriteList.push(e.id)
+			return
+			if(this.favoriteList.includes(e.id)){
+				// 取消点赞
+				likeServer({
+					id:e.id,
+					type:12
+				})
+				let deleteIdx = this.favoriteList.findIndex((v => v == e.id))
+				this.favoriteList.splice(deleteIdx,1)
+			} else {
+				likeServer({
+					id:e.id,
+					type:12
+				})
+				this.favoriteList.push(e.id)
+			}
+		},
 		cancel(){
 			this.listParams.titleName = ''
 		},
@@ -104,7 +153,8 @@ export default {
 			this.listParams.titleName = this.searchValue
 			this.getList()
 		},
-		getList(){
+		getList(val = null){
+			this.listParams.flag = val || ''
 			this.qbwd = this.topList
 			listWxs(this.listParams).then(res => {
 				this.qbwd = [...this.qbwd,...res.rows]
@@ -155,9 +205,18 @@ export default {
     onShareAppMessage() {},
 };
 </script>
-<style>
+<style lang="scss">
 @import './fuwu.css';
 .container{
 	height: 100%;
+	content: '\e633';
+}
+.favorite{
+	.icon-shoucang:before{
+		color: red;
+	}
+}
+.not-favorite{
+	
 }
 </style>

+ 5 - 0
pages/gridQuery/gridQuery.vue

@@ -20,7 +20,12 @@
 				jobDescription:'',
 			};
 		},
+		
 		onLoad(option){
+			    uni.setNavigationBarTitle({
+			      title: option.titleText
+			    });
+			  
 			const _that = this
 			const id = uni.getStorageSync('id');
 			console.log(id)

+ 15 - 5
pages/handleAffairs/handleAffairs.vue

@@ -3,8 +3,8 @@
 	<view>
 		<!-- 搜索栏 -->
 		<view class="input-view">
-			<input confirm-type="search" class="nav-bar-input" type="text" placeholder="输入搜索关键词" @confirm="confirm" />
-			<uni-icons class="input-uni-icon" type="search" size="18" color="#999" />
+			<uni-icons type="search" size="20" class="search-icon" @tap="confirm"></uni-icons>
+			<input confirm-type="search" class="nav-bar-input" type="text" placeholder="输入搜索关键词" @confirm="confirm" v-model="title"/>
 		</view>
 		<!-- 网格配置列表滑动 -->
 		<view>
@@ -56,6 +56,7 @@
 	export default {
 		data() {
 			return {
+				title:"",
 				gridtType: [], //是一个list<map>数据 [{0,[1,2,3]}]
 			};
 		},
@@ -63,9 +64,18 @@
 			this.getList();
 		},
 		methods: {
+			confirm(){
+				if (!this.title.trim()) {//去除前后空格,在判断是否为空
+					return 
+				}
+				console.log(this.title)
+				uni.setStorageSync('data', {title:this.title})
+				uni.navigateTo({
+					url: '/pages/matterAll/matterAll',
+				});
+			},
 			//主题导航跳转
 			topic(){
-
 				uni.navigateTo({
 					url: '/pages/topic/topic',
 				});
@@ -78,8 +88,8 @@
 				console.log(item)
 				uni.setStorageSync('id', item.id)
 				uni.navigateTo({
-					url: '/pages/gridQuery/gridQuery',
-
+					url: '/pages/gridQuery/gridQuery?titleText='+item.name
+					 
 				});
 			},
 			getList() {

+ 26 - 12
pages/index/index.vue

@@ -2,7 +2,7 @@
 	<view>
 		<!-- index.wxml -->
 		<view class="topBj">
-			<image :src="loadImgSrc('/jcb-top.png')"></image>
+			<image :src="loadImgSrc(bigImg)"></image>
 		</view>
 		<view class="container">
 			<!-- 主导航 -->
@@ -86,7 +86,7 @@
 				:circular="circular" class="banner">
 				<block v-for="(item, index) in banners" :key="index">
 					<swiper-item>
-						<image :src="loadImgSrc(item.src)" mode="aspectFill"></image>
+						<image :src="loadImgSrc(item)" mode="aspectFill"></image>
 					</swiper-item>
 				</block>
 			</swiper>
@@ -219,7 +219,7 @@
 
 <script>
 	import {
-		getListToAnnouncement
+		getListToAnnouncement,getCovers,getCarousel
 	} from '@/api/index/index.js';
 	import {
 		governmentListData
@@ -233,14 +233,11 @@
 	export default {
 		data() {
 			return {
+				bigImg:'https://tse1-mm.cn.bing.net/th/id/OIP-C.JsghMT_u8V52I4PSHow2hAHaEG?w=332&h=186&c=7&r=0&o=5&pid=1.7',
 				// 图片轮播
-				banners: [{
-						src: '/img1.png'
-					},
-					{
-						src: '/img2.png'
-					}
-				],
+				banners: [
+						'https://tse1-mm.cn.bing.net/th/id/OIP-C.JsghMT_u8V52I4PSHow2hAHaEG?w=332&h=186&c=7&r=0&o=5&pid=1.7'
+					],
 				announcementList: [{
 						id: '3',
 						announcementTitle: '关于高质量推进土地整治工作赋能乡村振兴的通知'
@@ -361,6 +358,7 @@
 		},
 		created() {
 			this.getList()
+			this.getCovers()
 		},
 		onReachBottom() {
 			let pageNum = this.knowledgeParams.pageNum
@@ -377,6 +375,15 @@
 			}
 		},
 		methods: {
+			//封面与轮播图
+			getCovers(){
+				getCovers().then(res=>{
+					this.bigImg = res.data
+				})
+				getCarousel().then(res=>{
+					this.banners = res.data
+				})	
+			},
 			// 热门知识获取数据
 			getList(pageNum) {
 				let params = {
@@ -396,11 +403,13 @@
 					url: '/pages/toLegal/toLegal'
 				});
 			},
+			//政策推荐
 			toGovernmentList() {
 				uni.navigateTo({
 					url: '/pages/toGovernmentList/toGovernmentList'
 				});
 			},
+			//惠民通
 			toGovernmentList1() {
 				uni.navigateTo({
 					url: '/pages/toGovernmentList/toGovernmentList?type=10'
@@ -537,7 +546,12 @@
 					scoreNum: item.integral
 				};
 				verifyScore(params).then((res) => {
-					if (res.code == 200) {
+					if (res.data == false) {
+						uni.showToast({
+							title: '您的积分不足'
+						})
+					}else{
+						console.log("verifyScore",res)
 						this.reduceScore(item)
 						this.addScore(item)
 						uni.navigateTo({
@@ -579,4 +593,4 @@
 </script>
 <style>
 	@import './index.css';
-</style>
+</style>

+ 13 - 13
pages/informationDetail/informationDetail.vue

@@ -6,7 +6,7 @@
             <view class="wenzhangLy">
                 <!-- 头像昵称 -->
                 <view class="txTime">
-                    <image :src="loadImgSrc(detailInfo.headImg!=null?detailInfo.headImg:'/profile/upload/2024/03/05/abf969632ee94bd5a429c8c2dbb2f6b4 (1)_20240305092823A002.png')"></image>
+                    <image :src="loadImgSrc(detailInfo.headImg!=null?detailInfo.headImg:'/profile/upload/2024/03/05/abf969632ee94bd5a429c8c2dbb2f6b4 (1)_20240305092823A002.png')" style="border-radius: 50px;"></image>
                     <view class="time">
                         <p>{{detailInfo.nickName?detailInfo.nickName:'网友'}}</p>
                         <span>{{ detailInfo.createTime }}</span>
@@ -18,18 +18,18 @@
             <view class="wenzhangCont article">
                 <span v-html="detailInfo.textDetails">
                 </span>
-			
+
                 <view >
                     <!-- 图片轮播 -->
                     <swiper :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration" :circular="circular">
                         <block v-for="(one, index) in detailInfo.urls" :key="index">
-                            <swiper-item><image :src="loadImgSrc(one)" mode="aspectFill"></image></swiper-item>
+                            <swiper-item><image :src="loadImgSrc(one)"  style="background-size: 100% 100%;"></image></swiper-item>
                         </block>
                     </swiper>
                 </view>
             </view>
-			
-			
+
+
         </view>
 	</view>
 </template>
@@ -45,7 +45,7 @@ export default {
 				{
 					deptName:'国家乡村振兴局',
 					updateTime:'2023-2-27 16:04',
-					desc:'用好政策效果评估成果,进一步优化巩固拓展脱贫攻坚成果同乡村振兴有效衔接政策供给,为推动工作提质增效提供有力支撑保障。',					
+					desc:'用好政策效果评估成果,进一步优化巩固拓展脱贫攻坚成果同乡村振兴有效衔接政策供给,为推动工作提质增效提供有力支撑保障。',
 				}
 			],
 			isCollection:false,
@@ -61,7 +61,7 @@ export default {
 			this.anwserList.push({
 				deptName:'国家烟草局',
 				updateTime:new Date().getFullYear() + "-" + new Date().getMonth() + "-" + new Date().getDay() + " " + (new Date().getHours() < 10 ? "0" + new Date().getHours() : new Date().getHours()) + ':' + (new Date().getMinutes() < 10 ? "0" + new Date().getMinutes() : new Date().getMinutes()),
-				desc:this.anwserVal,		
+				desc:this.anwserVal,
 			})
 			this.anwserVal = null
 		},
@@ -83,11 +83,11 @@ export default {
 					allSrc.forEach(e => {
 						newHtml = newHtml.replace(e,this.loadImgSrc(e))
 					})
-				} 
+				}
 			}catch(e){
 				//TODO handle the exception
 			}
-			
+
 			return newHtml
 		}
 	}
@@ -105,8 +105,8 @@ export default {
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady(e) {  
-	}, 
+    onReady(e) {
+	},
     /**
      * 生命周期函数--监听页面显示
      */
@@ -142,7 +142,7 @@ export default {
 	}
 }
 .not-collect{
-	
+
 }
 .effectBix{
 	width: 56px;
@@ -189,7 +189,7 @@ export default {
   --slice-3: inset(10% -6px 85% 0);
   --slice-4: inset(40% -6px 43% 0);
   --slice-5: inset(80% -6px 5% 0);
-  
+
   content: 'AVAILABLE NOW';
   display: block;
   position: absolute;

+ 43 - 0
pages/matterAll/matterAll.vue

@@ -0,0 +1,43 @@
+<template>
+	<view>
+		<uni-list>
+			<uni-list-item  :title="item.title" v-for="(item,index) in dataList" @click="onclick(item)"></uni-list-item>
+		</uni-list>
+	</view>
+</template>
+
+<script>
+	import {
+		getMattersAll
+	} from "@/api/handleAffairs/matter.js"
+	export default {
+		data() {
+			return {
+				dataList: [],
+			};
+		},
+		created() {
+
+		},
+		onLoad(option) {
+			const data = uni.getStorageSync('data');
+			this.getMatters(data)
+		},
+		methods: {
+			onclick(data){//点击详情
+				
+			},
+			getMatters(data) {
+				let _that = this
+				getMattersAll(data).then(res => {
+					_that.dataList = res.data
+					console.log(_that.dataList)
+				})
+			}
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 53 - 11
pages/quotations/quotations.vue

@@ -15,12 +15,15 @@
     <view class="uni-container">
       <uni-table>
         <uni-tr>
+          <uni-th width="80" align="center">地区</uni-th>
           <uni-th width="80" align="center">名称</uni-th>
           <uni-th width="80" align="center">类型</uni-th>
           <uni-th width="80" align="center">价格</uni-th>
           <uni-th width="100" align="center">时间</uni-th>
         </uni-tr>
         <uni-tr v-for="(item, index) in quotationsList" :key="index">
+          <uni-td align="center">{{ item.area+item.address }}
+          </uni-td>
           <uni-td align="center">{{ item.productName }}
           </uni-td>
           <uni-td align="center">
@@ -32,6 +35,7 @@
           </uni-td>
         </uni-tr>
       </uni-table>
+      <uni-load-more :status="status" :content-text="contentText"/>
       <uni-fab ref="fab" :horizontal="right" :vertical="bottom"
                @fabClick="fabClick()"/>
     </view>
@@ -64,31 +68,66 @@ export default {
       ],
       //查询参数
       queryParams: {
-        // pageNum: 1,
-        // pageSize: 10,
+        pageNum: 1,
+        pageSize: 15,
         id: null,
       },
+      //加载更多
+      status: 'more',
+      contentText: {
+        contentdown: '查看更多',
+        contentrefresh: '加载中',
+        contentnomore: '没有更多'
+      },
+
       //表单数据
       form: {},
       imageList: []
     }
   },
-  created() {
+  onPullDownRefresh() {
+    this.queryParams.pageNum = 1;
+    this.quotationsList = [];
+    this.getList()
+  },
+  //上拉加载
+  onReachBottom() {
+    if (this.status === 'noMore') {
+      return;
+    }
+    this.queryParams.pageNum++;
+    this.getList();
+  },
+  onLoad() {
     this.getList();
   },
   methods: {
     getList(row) {
       // 这里是获取列表的方法
-      listQuotations().then(response => {
-        this.quotationsList = response.rows.map(item => {
-          let date = new Date(item.createTime);
-          item.createTime = date.toLocaleDateString('zh-CN', {dateStyle: 'short'});
-          return item;
-        });
+      listQuotations(this.queryParams).then(response => {
+        if (this.queryParams.pageNum === 1) {
+          this.quotationsList = this.dataFormat(response.rows)
+        } else {
+          this.quotationsList = this.quotationsList.concat(this.dataFormat(response.rows));
+        }
+        // 判断是否还有更多数据
+        if (response.rows.length < this.queryParams.pageSize) {
+          this.status = 'noMore'; // 没有更多数据
+        } else {
+          this.status = 'more'; // 还有更多数据
+        }
       });
       //获取分类树的方法
       listConfig().then(response => {
-        this.categories = response.data.quotations;
+        this.categories = response.data.quotations.filter(item => item.homeDisplay === "1");
+      });
+      uni.stopPullDownRefresh();
+    },
+    dataFormat(rows) {
+      return rows.map(item => {
+        let date = new Date(item.createTime);
+        item.createTime = date.toLocaleDateString('zh-CN', {dateStyle: 'short'});
+        return item;
       });
     },
     //根据分类id查询列表
@@ -123,13 +162,16 @@ export default {
   flex-direction: column;
   align-items: center;
   justify-content: center;
-  padding: 0px 0;
+  padding: 0 0;
 }
 
 .image {
   height: 100%;
   width: 100%;
 }
+.uni-container{
+  align-items: center;
+}
 
 
 </style>

+ 39 - 21
pages/quotations/quotationsSecond.vue

@@ -32,8 +32,6 @@
           </uni-td>
         </uni-tr>
       </uni-table>
-      <uni-fab ref="fab" :horizontal="right" :vertical="bottom"
-               @fabClick="fabClick()"/>
     </view>
   </view>
 </template>
@@ -64,11 +62,11 @@ export default {
       quotationsList: [
         // 这里是列表的数据
       ],
-      //查询参数
       queryParams: {
-        // pageNum: 1,
-        // pageSize: 10,
+        pageNum: 1,
+        pageSize: 15,
         id: null,
+        type: null,
       },
       //表单数据
       form: {},
@@ -77,6 +75,19 @@ export default {
       imageList: []
     }
   },
+  onPullDownRefresh() {
+    this.queryParams.pageNum = 1;
+    this.quotationsList = [];
+    this.getList()
+  },
+  //上拉加载
+  onReachBottom() {
+    if (this.status === 'noMore') {
+      return;
+    }
+    this.queryParams.pageNum++;
+    this.getList();
+  },
   onLoad(e) {
     this.FatherType = e.type;
     this.getList();
@@ -84,23 +95,36 @@ export default {
   methods: {
     getList(row) {
       // 这里是获取列表的方法
-      this.form.type = this.FatherType
-      listQuotations(this.form).then(response => {
-        this.quotationsList = response.rows.map(item => {
-          let date = new Date(item.createTime);
-          item.createTime = date.toLocaleDateString('zh-CN', {dateStyle: 'short'});
-          return item;
-        });
+      this.queryParams.type = this.FatherType
+      listQuotations(this.queryParams).then(response => {
+        if (this.queryParams.pageNum === 1) {
+          this.quotationsList = this.dataFormat(response.rows)
+        } else {
+          this.quotationsList = this.quotationsList.concat(this.dataFormat(response.rows));
+        }
+        // 判断是否还有更多数据
+        if (response.rows.length < this.queryParams.pageSize) {
+          this.status = 'noMore'; // 没有更多数据
+        } else {
+          this.status = 'more'; // 还有更多数据
+        }
       });
       this.forms.parentId = this.FatherType
       //获取分类树的方法
       QuotationsList(this.forms).then(response => {
         //取出response.rows中所有homeDisplay为1的数据
-        this.categories = response.rows.filter(item => item.homeDisplay === 1);
+        this.categories = response.rows
+      });
+      uni.stopPullDownRefresh();
+    },
+    //格式化时间
+    dataFormat(rows) {
+      return rows.map(item => {
+        let date = new Date(item.createTime);
+        item.createTime = date.toLocaleDateString('zh-CN', {dateStyle: 'short'});
+        return item;
       });
     },
-    //递归查询分类的父级
-
     //根据分类id查询列表
     change(e) {
       this.queryParams.type = e.detail.index;
@@ -112,12 +136,6 @@ export default {
         });
       });
     },
-    //悬浮按钮点击事件
-    fabClick() {
-      uni.navigateTo({
-        url: '../quotations/quotationsForm'
-      });
-    },
     updateImg(imgList) {
       this.imageList = imgList;
     }

+ 102 - 35
pages/toGovernmentList/toGovernmentList.vue

@@ -1,49 +1,59 @@
 <template>
     <!-- pages/me.wxml -->
 	<view class="container">
-		<uni-search-bar @confirm="search" :focus="true" v-model="searchValue" @blur="search"  @input="search"
-		style="width: 100%;"
-			@cancel="cancel">
-		</uni-search-bar>
+		<view style="width: 100%;display: flex;">
+			<uni-search-bar  :focus="true" v-model="searchValue"  @input="search"
+				style="width: 70%;"
+				@cancel="cancel">
+			</uni-search-bar>
+			  <uni-data-select
+				  style="width: 30%;margin: auto;"
+				  v-model="value"
+				  placeholder="请选择排序"
+				  :localdata="range"
+				  @change="getList(value)"
+			></uni-data-select>
+		</view>
 	    <view class="rnwdList">
-	        <view class="list" @tap="goDetails(item)" v-for="(item, index1) in qbwd" :key="index1">
+	        <view class="list" @tap.stop="goDetails(item)" v-for="(item, index1) in qbwd" :key="index1">
+				<span v-if="item.top == 1" style="color: red;">[置顶]</span>
 	            <span class="listTitle">{{ item.titleName }}</span>
-	
-	            <view class="onePic" v-if="item.urls.length == 1">
+
+	            <view class="onePic" v-if="item.top != 1  ? item.urls.length == 1 : false ">
 	                <image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
 					</image>
 	            </view>
-	            <view class="twoPic" v-if="item.urls.length == 2">
+	            <view class="twoPic" v-if="item.top != 1 ? item.urls.length == 2 : false">
 	                <image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
 					</image>
 	            </view>
-	
-	            <view class="threePic" v-if="item.urls.length == 3">
+
+	            <view class="threePic" v-if="item.top != 1 ? item.urls.length == 3 : false">
 	                <image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
 					</image>
 	            </view>
-	
-	           <!-- <view class="jlSj">
+
+	           <view class="jlSj">
 	                <span class="jf">
-	                    {{ item.jf }}
-	                    <em class="iconfont icon-jifen"></em>
+	                   {{ item.updateTime || item.createTime }}
+	                    <!-- <em class="iconfont icon-jifen"></em> -->
 	                </span>
 	                <view class="ck">
-	                    <span>
+	                    <!-- <span>
 	                        <em class="iconfont icon-pinglun"></em>
 	                        {{ item.pl }}
-	                    </span>
+	                    </span> -->
 	                    <span>
 	                        <em class="iconfont icon-chakan"></em>
-	                        {{ item.ck }}
+	                        {{ item.watchNum }}
 	                    </span>
-	                    <span>
-	                        <em class="iconfont icon-shoucang"></em>
-	                        {{ item.dz }}
+	                    <span :class=" favoriteList.includes(item.id) ? 'favorite' : 'not-favorite' ">
+	                        <em class="iconfont icon-shoucang" @click.stop="addFavorite(item)"></em>
+	                        {{ currentFavoriteCount(item) }}
 	                    </span>
 	                </view>
-	            </view> -->
-	
+	            </view>
+
 			</view>
 	    </view>
 		<!-- 新增资讯按钮 -->
@@ -52,7 +62,7 @@
 </template>
 
 <script>
-import { listWxs ,listWx} from '@/api/information/information.js'
+import { listWxs ,listWx,likeServer} from '@/api/information/information.js'
 // pages/me.js
 export default {
     data() {
@@ -62,16 +72,24 @@ export default {
 			  pageNum: 1,
 			  pageSize: 7,
 			  titleName: '',
-			  isGovernment:'',
 			  type: 10,
-			  flag:''
+			  flag:'',
+			  isTop:null
 			},
+			topList:[],
 			total:0,
-			searchValue:''
+			searchValue:'',
+			favoriteList:[],
+			value: 1,
+			range: [
+				{ value: 'watch', text: "热度" },
+				{ value: 'like', text: "点赞" },
+				{ value: '', text: "最新" },
+			],
 		};
     },
 	created(){
-		
+
 	},
 	onReachBottom(){
 		let pageNum = this.listParams.pageNum
@@ -88,12 +106,48 @@ export default {
 		}
 	},
 	methods:{
+		currentFavoriteCount(e){
+			if(this.favoriteList.includes(e.id)){
+				return e.likeNum + 1
+			} else {
+				return e.likeNum
+			}
+		},
+		addFavorite(e){
+			if(this.favoriteList.includes(e.id)) return
+			likeServer({
+				id:e.id,
+				type:12
+			}).then(e => {
+			})
+			this.favoriteList.push(e.id)
+			return
+			if(this.favoriteList.includes(e.id)){
+				// 取消点赞
+				likeServer({
+					id:e.id,
+					type:10
+				})
+				let deleteIdx = this.favoriteList.findIndex((v => v == e.id))
+				this.favoriteList.splice(deleteIdx,1)
+			} else {
+				likeServer({
+					id:e.id,
+					type:10
+				})
+				this.favoriteList.push(e.id)
+			}
+		},
+		cancel(){
+			this.listParams.titleName = ''
+		},
 		search(){
 			this.listParams.titleName = this.searchValue
-			this.qbwd = []
 			this.getList()
 		},
-		getList(){
+		getList(val = null){
+			this.listParams.flag = val || ''
+			this.qbwd = this.topList
 			listWxs(this.listParams).then(res => {
 				this.qbwd = [...this.qbwd,...res.rows]
 				this.total = res.total
@@ -117,17 +171,21 @@ export default {
      * 生命周期函数--监听页面加载
      */
     onLoad(options) {
-		console.log(options)
 		if(options.type!=null){
 			this.listParams.type = options.type
 		}
 		if(options.type==null){
 			this.listParams.isGovernment = 1
 		}
-		this.getList()
-		// 查置顶
-		listWx({}).then(e => {
-		})
+      // 查置顶
+      listWx({
+        type:10,
+        isTop:1
+      }).then(e => {
+        this.topList = e.data
+        this.qbwd = this.topList
+        this.getList()
+      })
 	},
     /**
      * 生命周期函数--监听页面初次渲染完成
@@ -155,9 +213,18 @@ export default {
     onShareAppMessage() {},
 };
 </script>
-<style>
+<style lang="scss">
 @import './index.css';
 .container{
 	height: 100%;
+	content: '\e633';
+}
+.favorite{
+	.icon-shoucang:before{
+		color: red;
+	}
+}
+.not-favorite{
+
 }
 </style>

+ 88 - 27
pages/toLegal/toLegal.vue

@@ -1,49 +1,57 @@
 <template>
     <!-- pages/me.wxml -->
 	<view class="container">
-		<uni-search-bar  :focus="true" v-model="searchValue"  @input="search"
-		style="width: 100%;"
-			@cancel="cancel">
-		</uni-search-bar>
+		<view style="width: 100%;display: flex;">
+			<uni-search-bar  :focus="true" v-model="searchValue"  @input="search"
+				style="width: 70%;"
+				@cancel="cancel">
+			</uni-search-bar>
+			  <uni-data-select
+				  style="width: 30%;margin: auto;"
+				  v-model="value"
+				  placeholder="请选择排序"
+				  :localdata="range"
+				  @change="getList(value)"
+			></uni-data-select>
+		</view>
 	    <view class="rnwdList">
 	        <view class="list" @tap="goDetails(item)" v-for="(item, index1) in qbwd" :key="index1">
-				<span v-if="index1 < 3" style="color: red;">[置顶]</span>
+				<span v-if="item.isTop == 1" style="color: red;">[置顶]</span>
 	            <span class="listTitle">{{ item.titleName }}</span>
-	
-	            <view class="onePic" v-if="index1 >2  ? item.urls.length == 1 : false ">
+	            <view class="onePic" v-if="item.isTop != 1 ? item.urls.length == 1 : false ">
 	                <image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
 					</image>
 	            </view>
-	            <view class="twoPic" v-if="index1 >2 ? item.urls.length == 2 : false">
+	            <view class="twoPic" v-if="item.isTop != 1 ? item.urls.length == 2 : false">
 	                <image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
 					</image>
 	            </view>
 	
-	            <view class="threePic" v-if="index1 >2 ? item.urls.length == 3 : false">
+	            <view class="threePic" v-if="item.isTop != 1 ? item.urls.length == 3 : false">
 	                <image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
 					</image>
 	            </view>
 	
-	           <!-- <view class="jlSj">
+	           <view class="jlSj">
 	                <span class="jf">
-	                    {{ item.jf }}
-	                    <em class="iconfont icon-jifen"></em>
+	                   <!-- {{ item.jf }}
+	                    <em class="iconfont icon-jifen"></em> -->
 	                </span>
-	                <view class="ck">
-	                    <span>
+	                <view class="ck favoriteIcon">
+	                    <!-- <span>
 	                        <em class="iconfont icon-pinglun"></em>
 	                        {{ item.pl }}
-	                    </span>
+	                    </span> -->
 	                    <span>
 	                        <em class="iconfont icon-chakan"></em>
-	                        {{ item.ck }}
+	                        {{ item.watchNum }}
 	                    </span>
-	                    <span>
-	                        <em class="iconfont icon-shoucang"></em>
-	                        {{ item.dz }}
+	                    <span :class=" favoriteList.includes(item.id) ? 'favorite' : 'not-favorite' ">
+	                        <em class="iconfont icon-shoucang" @click.stop="addFavorite(item)"></em>
+	                        {{ currentFavoriteCount(item) }}
 	                    </span>
 	                </view>
-	            </view> -->
+	            </view>
 	
 			</view>
 	    </view>
@@ -53,7 +61,7 @@
 </template>
 
 <script>
-import { listWxs ,listWx} from '@/api/information/information.js'
+import { listWxs ,listWx,likeServer} from '@/api/information/information.js'
 // pages/me.js
 export default {
     data() {
@@ -63,18 +71,26 @@ export default {
 			  pageNum: 1,
 			  pageSize: 7,
 			  titleName: '',
-			  type: 12,
+			  isTop:0,
+			  type: 11,
 			  flag:''
 			},
 			topList:[],
 			total:0,
-			searchValue:''
+			searchValue:'',
+			favoriteList:[],
+			value: 1,
+			range: [
+				{ value: 'watch', text: "热度" },
+				{ value: 'like', text: "点赞" },
+				{ value: '', text: "最新" },
+			],
 		};
     },
 	created(){
 		// 查置顶
 		listWx({
-			type:12,
+			type:11,
 			isTop:1
 		}).then(e => {
 			this.topList = e.data
@@ -97,6 +113,38 @@ export default {
 		}
 	},
 	methods:{
+		currentFavoriteCount(e){
+			if(this.favoriteList.includes(e.id)){
+				return e.likeNum + 1
+			} else {
+				return e.likeNum
+			}
+		},
+		addFavorite(e){
+			if(this.favoriteList.includes(e.id)) return
+			likeServer({
+				id:e.id,
+				type:11
+			}).then(e => {
+			})
+			this.favoriteList.push(e.id)
+			return
+			if(this.favoriteList.includes(e.id)){
+				// 取消点赞
+				likeServer({
+					id:e.id,
+					type:12
+				})
+				let deleteIdx = this.favoriteList.findIndex((v => v == e.id))
+				this.favoriteList.splice(deleteIdx,1)
+			} else {
+				likeServer({
+					id:e.id,
+					type:12
+				})
+				this.favoriteList.push(e.id)
+			}
+		},
 		cancel(){
 			this.listParams.titleName = ''
 		},
@@ -104,7 +152,8 @@ export default {
 			this.listParams.titleName = this.searchValue
 			this.getList()
 		},
-		getList(){
+		getList(val = null){
+			this.listParams.flag = val || ''
 			this.qbwd = this.topList
 			listWxs(this.listParams).then(res => {
 				this.qbwd = [...this.qbwd,...res.rows]
@@ -113,7 +162,7 @@ export default {
 		},
 		goDetails(e) {
 			let id = e.id || ''
-			let type = 12
+			let type = 11
 		    uni.navigateTo({
 		        url: `../informationDetail/informationDetail?id=${id}&type=${type}`
 		    });
@@ -155,9 +204,21 @@ export default {
     onShareAppMessage() {},
 };
 </script>
-<style>
+<style lang="scss">
 @import './toLegal.css';
 .container{
 	height: 100%;
 }
+.container{
+	height: 100%;
+	content: '\e633';
+}
+.favorite{
+	.icon-shoucang:before{
+		color: red;
+	}
+}
+.not-favorite{
+	
+}
 </style>

+ 10 - 5
pages/topic/topic.vue

@@ -5,10 +5,10 @@
 			</button>
 		</view>
 		<view>
-			<uni-grid :column="2" :square="false" :highlight="false">
-				<uni-grid-item v-for="(item, index) in dataList" :index="index" :key="index">
-					<view class="grid-item-box">
-						<text class="text">{{ item.deptName }}</text>
+			<uni-grid :column="2" :square="false" :highlight="false" >
+				<uni-grid-item v-for="(item, index) in dataList" :index="index" :key="index" >
+					<view class="grid-item-box" @click="onMatters(item)">
+						<text class="text" >{{ item.deptName }}</text>
 					</view>
 				</uni-grid-item>
 			</uni-grid>
@@ -38,7 +38,12 @@
 			this.getdataList()//初始化数据
 		},
 		methods: {
-			
+			onMatters(data){
+				uni.setStorageSync('data', {type:data.deptName})
+				uni.navigateTo({
+					url: '/pages/matterAll/matterAll',
+				});
+			},
 			getdataList(data){
 				let _that = this
 				if (!data) {