Procházet zdrojové kódy

Merge remote-tracking branch 'origin/master'

wangzhe před 1 rokem
rodič
revize
a358187f8d
35 změnil soubory, kde provedl 3172 přidání a 935 odebrání
  1. 10 0
      api/handleAffairs/gridType.js
  2. 57 0
      api/handleAffairs/matter.js
  3. 51 0
      api/handleAffairs/topicType.js
  4. 35 0
      api/index/index.js
  5. 9 0
      api/information/information.js
  6. 51 0
      api/knowledge/knowledge.js
  7. 15 0
      api/lifeServices/lifeServices.js
  8. 85 18
      pages.json
  9. 95 26
      pages/fuwu/fuwu.vue
  10. 5 0
      pages/gridQuery/gridQuery.vue
  11. 15 5
      pages/handleAffairs/handleAffairs.vue
  12. 89 0
      pages/index/announcementDetails.vue
  13. 105 0
      pages/index/announcementList.vue
  14. 536 404
      pages/index/index.vue
  15. 21 12
      pages/informationDetail/informationDetail.vue
  16. 136 0
      pages/knowledge/knowledge.css
  17. 98 0
      pages/knowledge/knowledge.vue
  18. 0 0
      pages/knowledgeDetails/knowledgeDetails.css
  19. 238 0
      pages/knowledgeDetails/knowledgeDetails.vue
  20. 136 0
      pages/lifeServices/lifeServices.css
  21. 110 0
      pages/lifeServices/lifeServices.vue
  22. 160 0
      pages/lifeServicesDetails/lifeServicesDetails.css
  23. 237 0
      pages/lifeServicesDetails/lifeServicesDetails.vue
  24. 1 1
      pages/liveBroadcastDetails/liveBroadcastDetails.vue
  25. 41 0
      pages/matterAll/matterAll.vue
  26. 26 11
      pages/me/meOperate.vue
  27. 117 107
      pages/toGovernmentList/index.css
  28. 214 56
      pages/toGovernmentList/toGovernmentList.vue
  29. 0 269
      pages/toGovernmentList/toGovernmentListDetail.vue
  30. 97 26
      pages/toLegal/toLegal.vue
  31. 118 0
      pages/topic/topic.vue
  32. 2 0
      uni_modules/uni-section/changelog.md
  33. 167 0
      uni_modules/uni-section/components/uni-section/uni-section.vue
  34. 87 0
      uni_modules/uni-section/package.json
  35. 8 0
      uni_modules/uni-section/readme.md

+ 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'
+  })}
+

+ 51 - 0
api/handleAffairs/topicType.js

@@ -0,0 +1,51 @@
+import request from '@/utils/request'
+
+// 查询主题类型配置列表
+export function listTopicType(query) {
+  return request({
+    url: '/jnb/topicType/list',
+    method: 'get',
+    params: query
+  })
+}
+// 查询主题类型配置列表
+export function listAll(query) {
+  return request({
+    url: '/jnb/topicType/listAll',
+    method: 'get',
+    params: query
+  })
+}
+// 查询主题类型配置详细
+export function getTopicType(id) {
+  return request({
+    url: '/jnb/topicType/' + id,
+    method: 'get'
+  })
+}
+
+// 新增主题类型配置
+export function addTopicType(data) {
+  return request({
+    url: '/jnb/topicType',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改主题类型配置
+export function updateTopicType(data) {
+  return request({
+    url: '/jnb/topicType',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除主题类型配置
+export function delTopicType(id) {
+  return request({
+    url: '/jnb/topicType/' + id,
+    method: 'delete'
+  })
+}

+ 35 - 0
api/index/index.js

@@ -0,0 +1,35 @@
+import request from '@/utils/request'
+
+// 获取最新消息(首页滚动)
+export function getListToAnnouncement(userId) {
+  return request({
+    url: '/my/announcement/getNewAnnouncement?userId='+userId,
+    method: 'get'
+  })
+}
+
+// 根据公告id获取详情
+export function getDetialisById(annoId){
+	return request({
+		url: '/my/announcement/'+annoId,
+		method: 'get'
+	})
+}
+
+//新增已读记录
+export function announcementReat(query){
+	return request({
+		url: '/my/announcement/readAnnouncement',
+		method: 'post',
+		data: query
+	})
+}
+
+//查询公告列表
+export function getList(query){
+	return request({
+		url: '/my/announcement/list',
+		method: 'get',
+		data: query
+	})
+}

+ 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({

+ 51 - 0
api/knowledge/knowledge.js

@@ -0,0 +1,51 @@
+import request from '@/utils/request'
+
+export function list(query) {
+  return request({
+    url: '/knowledge/base/list',
+    method: 'get',
+	params:query
+  })
+}
+export function getDetails(id) {
+  return request({
+    url: '/knowledge/base/' + id,
+    method: 'get',
+  })
+}
+export function popularKnowledgeList() {
+  return request({
+    url: '/knowledge/base/popularKnowledgeList',
+    method: 'get',
+  })
+}
+/**
+ * 验证积分是否充足
+ */
+export function verifyScore(query) {
+  return request({
+    url: '/score/verifyScore',
+    method: 'get',
+	params:query
+  })
+}
+/**
+ * 减少积分
+ */
+export function reduceScore(data) {
+  return request({
+    url: '/score/reduceScore',
+    method: 'post',
+	data:data
+  })
+}
+/**
+ * 增加积分
+ */
+export function addScore(data) {
+  return request({
+    url: '/score/addScore',
+    method: 'post',
+	data:data
+  })
+}

+ 15 - 0
api/lifeServices/lifeServices.js

@@ -0,0 +1,15 @@
+import request from '@/utils/request'
+
+export function list(query) {
+  return request({
+    url: '/high/server/lifeServicesList',
+    method: 'get',
+	params:query
+  })
+}
+export function getDetails(id) {
+  return request({
+    url: '/high/server/lifeServicesDetails/' + id,
+    method: 'get',
+  })
+}

+ 85 - 18
pages.json

@@ -1,6 +1,5 @@
 {
-	"pages": [
-		{
+	"pages": [{
 			"path": "pages/login",
 			"style": {
 				"navigationBarTitleText": "登录",
@@ -99,6 +98,24 @@
 			}
 		},
 		{
+			"path": "pages/index/announcementDetails",
+			"style": {
+				"usingComponents": {},
+				"navigationBarBackgroundColor": "#07c160",
+				"navigationBarTextStyle": "white",
+				"navigationBarTitleText": "公告详情"
+			}
+		},
+		{
+			"path": "pages/index/announcementList",
+			"style": {
+				"usingComponents": {},
+				"navigationBarBackgroundColor": "#07c160",
+				"navigationBarTextStyle": "white",
+				"navigationBarTitleText": "公告列表"
+			}
+		},
+		{
 			"path": "pages/fuwu/fuwu",
 			"style": {
 				"usingComponents": {},
@@ -225,7 +242,7 @@
 
 
 			}
-		},{
+		}, {
 			"path": "pages/toGovernmentList/toGovernmentList",
 			"style": {
 				"usingComponents": {},
@@ -260,14 +277,13 @@
 				"usingComponents": {},
 				"navigationBarBackgroundColor": "#07c160",
 				"navigationBarTextStyle": "white",
-				"navigationBarTitleText": "网格详情"
+				"navigationBarTitleText": ""
 
 			}
 		},
 		{
-			"path" : "pages/liveBroadcast/liveBroadcast",
-			"style" :
-			{
+			"path": "pages/liveBroadcast/liveBroadcast",
+			"style": {
 				"usingComponents": {},
 				"navigationBarBackgroundColor": "#07c160",
 				"navigationBarTextStyle": "white",
@@ -275,13 +291,67 @@
 			}
 		},
 		{
-			"path" : "pages/liveBroadcastDetails/liveBroadcastDetails",
+			"path": "pages/liveBroadcastDetails/liveBroadcastDetails",
 			"style": {
 				"usingComponents": {},
 				"navigationBarBackgroundColor": "#07c160",
 				"navigationBarTextStyle": "white",
 				"navigationBarTitleText": "直播带货详情"
 			}
+		},
+		{
+			"path": "pages/lifeServices/lifeServices",
+			"style": {
+				"usingComponents": {},
+				"navigationBarBackgroundColor": "#07c160",
+				"navigationBarTextStyle": "white",
+				"navigationBarTitleText": "生活服务"
+			}
+		},
+		{
+			"path": "pages/lifeServicesDetails/lifeServicesDetails",
+			"style": {
+				"usingComponents": {},
+				"navigationBarBackgroundColor": "#07c160",
+				"navigationBarTextStyle": "white",
+				"navigationBarTitleText": "生活服务详情"
+			}
+		},
+		{
+			"path": "pages/knowledge/knowledge",
+			"style": {
+				"usingComponents": {},
+				"navigationBarBackgroundColor": "#07c160",
+				"navigationBarTextStyle": "white",
+				"navigationBarTitleText": "知识库"
+			}
+		},
+		{
+			"path": "pages/knowledgeDetails/knowledgeDetails",
+			"style": {
+				"usingComponents": {},
+				"navigationBarBackgroundColor": "#07c160",
+				"navigationBarTextStyle": "white",
+				"navigationBarTitleText": "知识库详情"
+			}
+		},
+		{
+			"path" : "pages/topic/topic",
+			"style": {
+				"usingComponents": {},
+				"navigationBarBackgroundColor": "#07c160",
+				"navigationBarTextStyle": "white",
+				"navigationBarTitleText": "主题导航"
+			}
+		},
+		{
+			"path" : "pages/matterAll/matterAll",
+			"style": {
+				"usingComponents": {},
+				"navigationBarBackgroundColor": "#07c160",
+				"navigationBarTextStyle": "white",
+				"navigationBarTitleText": "事项列表"
+			}
 		}
 	],
 	"easycom": {
@@ -297,8 +367,7 @@
 		"selectedColor": "#2f2f2f",
 		"borderStyle": "black",
 		"backgroundColor": "#f9f9f9",
-		"list": [
-			{
+		"list": [{
 				"text": "服务",
 				"pagePath": "pages/index/index",
 				"iconPath": "static/pages/images/fuwu2.png",
@@ -327,15 +396,13 @@
 		"navigationBarTitleText": "Weixin",
 		"navigationBarTextStyle": "black"
 	},
-	"condition" : { //模式配置,仅开发期间生效
+	"condition": { //模式配置,仅开发期间生效
 		"current": 0, //当前激活的模式(list 的索引项)
-		"list": [
-			{
-				"name": "test", //模式名称
-				"path": "pages/index/index", //启动页面,必选
-				"query": "" //启动参数,在页面的onLoad函数里面得到
-			}
-		]
+		"list": [{
+			"name": "test", //模式名称
+			"path": "pages/index/index", //启动页面,必选
+			"query": "" //启动参数,在页面的onLoad函数里面得到
+		}]
 	},
 	"subPackages": []
 }

+ 95 - 26
pages/fuwu/fuwu.vue

@@ -1,48 +1,58 @@
 <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.jf }}
+	                    <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() {
@@ -63,16 +73,30 @@ 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(){
-		this.getList()
 		// 查置顶
-		listWx({}).then(e => {
+		listWx({
+			type:12,
+			isTop:1
+		}).then(e => {
+			this.topList = e.data
+			this.qbwd = this.topList
+			this.getList()
 		})
 	},
 	onReachBottom(){
@@ -90,12 +114,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: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 = ''
+		},
 		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
@@ -145,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() {

+ 89 - 0
pages/index/announcementDetails.vue

@@ -0,0 +1,89 @@
+<template>
+	<view class="uni-wrap">
+		<uni-section class="mb-10" :title="annoDetail.announcementTitle" :sub-title="subTitle">
+			<view class="uni-common-mt" style="background: #fff; padding: 20rpx">
+				<rich-text :nodes="annoDetail.announcementBody"></rich-text>
+			</view>
+		</uni-section>
+	</view>
+</template>
+
+<script>
+import { getDetialisById, announcementReat } from '@/api/index/index.js';
+
+export default {
+	data() {
+		return {
+			annoDetail: {
+				createBy: null,
+				createTime: '2024-03-04 09:19:49',
+				updateBy: null,
+				updateTime: null,
+				remark: null,
+				id: '2',
+				announcementTitle: '123',
+				announcementBody: '<p><strong>这是内容</strong></p><p><strong><em>真的是内容</em></strong></p><p><strong><em><u>还是内容</u></em></strong></p><p><strong><em><u><span class="ql-cursor">\ufeff</span></u></em></strong><img src="/dev-api/profile/upload/2024/03/04/程序员_20240304091946A002.jpg"></p>',
+				validityStartTime: '2024-03-03',
+				validityEndTime: '2024-03-05',
+				announcementImg: '/profile/upload/2024/03/04/程序员_20240304091901A001.jpg'
+			},
+			queryData:{
+				userId: getApp().globalData.userId,
+				annoId: null,
+			}
+		};
+	},
+	computed: {
+	    subTitle () {
+	      return this.annoDetail.updateBy !== null ? `${this.annoDetail.createTime} - ${this.annoDetail.updateBy}` : `${this.annoDetail.createTime} - ${this.annoDetail.createBy}`
+	    }
+	  },
+	/**
+	 * 生命周期函数--监听页面加载
+	 */
+	onLoad(options) {
+		this.queryData.annoId = options.id
+		this.getDetails(options.id);
+		this.setDataType();
+	},
+	methods: {
+		getDetails(annoId) {
+			getDetialisById(annoId).then((res) => {
+				this.annoDetail = res.data;
+			});
+		},
+		setDataType(){
+			announcementReat(this.queryData).then(res=>{
+				console.log(res.msg)
+			})
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+$uni-success: #18bc37 !default;
+
+.uni-wrap {
+	flex-direction: column;
+	/* #ifdef H5 */
+	height: calc(100vh - 44px);
+	/* #endif */
+	/* #ifndef H5 */
+	height: 100vh;
+	/* #endif */
+	flex: 1;
+}
+
+.mb-10 {
+	margin-bottom: 10px;
+}
+
+.decoration {
+	width: 6px;
+	height: 6px;
+	margin-right: 4px;
+	border-radius: 50%;
+	background-color: $uni-success;
+}
+</style>

+ 105 - 0
pages/index/announcementList.vue

@@ -0,0 +1,105 @@
+<template>
+	<view class="list">
+		<view v-for="(item, index) in list" :key="item.id" class="item">
+			<img :src="loadImgSrc(`${item.announcementImg}`)" class="avatar" />
+			<view class="info" style="height: 5em;">
+				<view class="name" @click="handleNavigate(item)">
+					{{ item.announcementTitle }}
+					<view class="unread-dot" v-if="item.readType == 0"></view>
+				</view>
+			</view>
+			<em class="iconfont icon-xiangyoujiantou" @click="handleNavigate(item)"></em>
+		</view>
+	</view>
+</template>
+
+<script>
+import { getList } from '@/api/index/index.js';
+
+export default {
+	data() {
+		return {
+			queryParam: {
+				pageNum: 1,
+				pageSize: 10,
+				userId: getApp().globalData.userId
+			},
+			total: null,
+			list: []
+		};
+	},
+	onLoad() {
+		this.getAnnoList();
+	},
+	onReachBottom() {
+		let pageNum = this.queryParam.pageNum;
+		let pageSize = this.queryParam.pageSize;
+		let total = this.total;
+		if (pageNum * pageSize >= total) {
+			uni.showToast({
+				title: '暂无更多数据'
+			});
+			return;
+		} else {
+			this.queryParam.pageNum += 1;
+			this.getAnnoList();
+		}
+	},
+	methods: {
+		getAnnoList() {
+			console.log(this.queryParam)
+			getList(this.queryParam).then((res) => {
+				this.list = [...this.list,...res.rows]
+				// this.list = res.rows;
+				this.total = res.total;
+			});
+		},
+		handleNavigate(item) {
+			item.readType = 1;
+			uni.navigateTo({
+				url: '/pages/index/announcementDetails?id=' + item.id
+			});
+		}
+	}
+};
+</script>
+<style>
+.list {
+	padding: 20rpx;
+}
+
+.item {
+	display: flex;
+	align-items: center;
+	margin-bottom: 20rpx;
+}
+
+.avatar {
+	width: 60rpx;
+	height: 60rpx;
+	border-radius: 50%;
+}
+
+.info {
+	display: flex;
+	align-items: center;
+}
+
+.name {
+	font-size: 28rpx;
+	font-weight: bold;
+	margin-right: 10rpx; /* 添加间距 */
+	position: relative;
+}
+
+.unread-dot {
+	width: 10rpx;
+	height: 10rpx;
+	background-color: red;
+	border-radius: 50%;
+	position: absolute;
+	right: -15rpx; /* 相对于父容器位置调整 */
+	top: 50%;
+	transform: translateY(-50%);
+}
+</style>

+ 536 - 404
pages/index/index.vue

@@ -1,420 +1,552 @@
 <template>
-    <view>
-        <!-- index.wxml -->
-        <view class="topBj">
-            <image :src="loadImgSrc('/jcb-top.png')"></image>
-        </view>
-        <view class="container">
-            <!-- 主导航 -->
-            <ul class="mainNav">
-                <li>
-                    <view class="wb" @tap="goWenBa"><em class="iconfont icon-wenhaofill"></em></view>
-                    <span>问吧</span>
-                </li>
-                <li>
-                    <view class="hq" @tap="goHangQing"><em class="iconfont icon-hangqing"></em></view>
-                    <span>行情</span>
-                </li>
-                <li>
-                    <view class="sc" @tap="goShangCheng"><em class="iconfont icon-shangcheng11"></em></view>
-                    <span>商城</span>
-                </li>
-                <li>
-                    <view class="bs" @tap="goBanShi"><em class="iconfont icon-banshidating1"></em></view>
-                    <span>办事</span>
-                </li>
-            </ul>
-            <!-- 村民福利 -->
-            <view class="cmfl_title">
-                <image :src="loadImgSrc('/cnfl-fl.png')"></image>
-                <h1>村民福利</h1>
-                <image :src="loadImgSrc('/cnfl-fr.png')"></image>
-            </view>
-            <view class="cnfl">
-                <view class="fv" @click="toLegal()">
-                    <text>法律乡下</text>
-                    <image :src="loadImgSrc('/fv.jpg')"></image>
-                </view>
-                <view class="hm">
-                    <text>惠民通</text>
-                    <image :src="loadImgSrc('/hm.jpg')"></image>
-                </view>
-            </view>
-        </view>
-        <view class="fengexian"></view>
-        <!-- 分割线 -->
-        <!-- 公告 -->
-        <view class="container">
-            <view class="gonggao">
-                <span>
-                    <em class="iconfont icon-gonggao"></em>
-                    [公告]
-                </span>
-                <swiper class="swiper_container" :autoplay="true" :circular="true" :vertical="true" interval="2000">
-                    <block v-for="(item, index) in msgList" :key="index">
-                        <swiper-item>
-                            <view class="swiper_item">{{ item.title }}</view>
-                        </swiper-item>
-                    </block>
-                </swiper>
-                <em class="iconfont icon-xiangyoujiantou"></em>
-            </view>
-        </view>
-        <!-- 公告 end -->
-        <view class="fengexian"></view>
-        <!-- 分割线 -->
-        <view class="container">
-            <!-- 政策推荐 -->
-            <view class="zcTuijian">
-                <image :src="loadImgSrc('/zctj.png')"></image>
-                <ul>
-                    <view v-for="(item, index) in governmentList" :key="index">
-                        <li style="display: flex;">
-                            <em class="iconfont icon-yuandianxiao"></em>
-                            {{ item.titleName }}
-                        </li>
-                    </view>
-                </ul>
-                <em class="iconfont icon-xiangyoujiantou" @click="toGovernmentList"></em>
-            </view>
-        </view>
-        <view class="fengexian"></view>
-        <!-- 分割线 -->
-        <view class="container">
-            <!-- 图片轮播 -->
-            <swiper :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration" :circular="circular" class="banner">
-                <block v-for="(item, index) in banners" :key="index">
-                    <swiper-item><image :src="loadImgSrc(item.src)" mode="aspectFill"></image></swiper-item>
-                </block>
-            </swiper>
-        </view>
-        <view class="fengexian"></view>
-        <!-- 分割线 -->
-        <view class="container">
-            <view class="titleLeft">
-                <em class="iconfont icon--fuwu"></em>
-                高频服务
-            </view>
-            <view class="gpfwNav">
-                <ul>
-                    <li>
-                        <view class="lvxd"><em class="iconfont icon-jurassic_nav"></em></view>
-                        <span>旅游向导</span>
-                    </li>
-                    <li>
-                        <view class="xlzx"><em class="iconfont icon-xinlizixun"></em></view>
-                        <span>心里咨询</span>
-                    </li>
-                    <li>
-                        <view class="xswz"><em class="iconfont icon-wenzhen"></em></view>
-                        <span>线上问诊</span>
-                    </li>
-                    <li>
-                        <view class="gxs" @tap="goCooperative"><em class="iconfont icon-gongxiaoshelogo"></em></view>
-                        <span @tap="goLoveAtVillage">供</span>
-                        <span @tap="goLegalService">销</span>
-                        <span @tap="goFinancialInfrastructure">社</span>
-                    </li>
-                    <li>
-                        <view class="xlzx"><em class="iconfont icon-linshijiuzhu"></em></view>
-                        <span>帮扶救助</span>
-                    </li>
-                    <li>
-                        <view class="xswz"><em class="iconfont icon-zhishi1"></em></view>
-                        <span>知识库</span>
-                    </li>
-                    <li>
-                        <view class="lvxd"><em class="iconfont icon-zhibo" @tap="gozbdh"></em></view>
-                        <span>直播带货</span>
-                    </li>
-                    <li>
-                        <view class="more"><em class="iconfont icon-gengduo1"></em></view>
-                        <span>更多</span>
-                    </li>
-                </ul>
-            </view>
-        </view>
-        <view class="fengexian"></view>
-        <!-- 分割线 -->
-        <view class="container">
-            <view class="titleLeft">
-                <em class="iconfont icon-licaiwenda"></em>
-                热门问答
-            </view>
-            <view class="rnwdList">
-                <view class="list" @tap="goDetails" v-for="(item, index) in indexList" :key="index">
-                    <span class="listTitle">{{ item.title }}</span>
+	<view>
+		<!-- index.wxml -->
+		<view class="topBj">
+			<image :src="'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'"></image>
+		</view>
+		<view class="container">
+			<!-- 主导航 -->
+			<ul class="mainNav">
+				<li>
+					<view class="wb" @tap="goWenBa"><em class="iconfont icon-wenhaofill"></em></view>
+					<span>问吧</span>
+				</li>
+				<li>
+					<view class="hq" @tap="goHangQing"><em class="iconfont icon-hangqing"></em></view>
+					<span>行情</span>
+				</li>
+				<li>
+					<view class="sc" @tap="goShangCheng"><em class="iconfont icon-shangcheng11"></em></view>
+					<span>商城</span>
+				</li>
+				<li>
+					<view class="bs" @tap="goBanShi"><em class="iconfont icon-banshidating1"></em></view>
+					<span>办事</span>
+				</li>
+			</ul>
+			<!-- 村民福利 -->
+			<view class="cmfl_title">
+				<image :src="loadImgSrc('/cnfl-fl.png')"></image>
+				<h1>村民福利</h1>
+				<image :src="loadImgSrc('/cnfl-fr.png')"></image>
+			</view>
+			<view class="cnfl">
+				<view class="fv" @click="toLegal()">
+					<text>法律乡下</text>
+					<image :src="loadImgSrc('/fv.jpg')"></image>
+				</view>
+				<view class="hm" @click='toGovernmentList1'>
+					<text>惠民通</text>
+					<image :src="loadImgSrc('/hm.jpg')"></image>
+				</view>
+			</view>
+		</view>
+		<view class="fengexian"></view>
+		<!-- 分割线 -->
+		<!-- 公告 -->
+		<view class="container">
+			<view class="gonggao">
+				<span>
+					<em class="iconfont icon-gonggao"></em>
+					[公告]
+				</span>
+				<swiper class="swiper_container" :autoplay="true" :circular="true" :vertical="true" interval="2000">
+					<block v-for="(item, index) in announcementList" :key="index">
+						<swiper-item @click="handleNavigate(item.id)">
+							<view class="swiper_item">{{ item.announcementTitle }}</view>
+						</swiper-item>
+					</block>
+				</swiper>
+				<em class="iconfont icon-xiangyoujiantou" @click="goAnnoList()"></em>
+			</view>
+		</view>
+		<!-- 公告 end -->
+		<view class="fengexian"></view>
+		<!-- 分割线 -->
+		<view class="container">
+			<!-- 政策推荐 -->
+			<view class="zcTuijian">
+				<image :src="loadImgSrc('/zctj.png')"></image>
+				<ul>
+					<view v-for="(item, index) in governmentList" :key="index">
+						<li style="display: flex;">
+							<em class="iconfont icon-yuandianxiao"></em>
+							{{ item.titleName }}
+						</li>
+					</view>
+				</ul>
+				<em class="iconfont icon-xiangyoujiantou" @click="toGovernmentList"></em>
+			</view>
+		</view>
+		<view class="fengexian"></view>
+		<!-- 分割线 -->
+		<view class="container">
+			<!-- 图片轮播 -->
+			<swiper :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration"
+				:circular="circular" class="banner">
+				<block v-for="(item, index) in banners" :key="index">
+					<swiper-item>
+						<image :src="item.src" mode="aspectFill"></image>
+					</swiper-item>
+				</block>
+			</swiper>
+		</view>
+		<view class="fengexian"></view>
+		<!-- 分割线 -->
+		<view class="container">
+			<view class="titleLeft">
+				<em class="iconfont icon--fuwu"></em>
+				高频服务
+			</view>
+			<view class="gpfwNav">
+				<ul>
+					<li>
+						<view class="lvxd"><em class="iconfont icon-jurassic_nav"></em></view>
+						<span>旅游向导</span>
+					</li>
+					<li>
+						<view class="xlzx"><em class="iconfont icon-xinlizixun"></em></view>
+						<span>心里咨询</span>
+					</li>
+					<li>
+						<view class="xswz"><em class="iconfont icon-wenzhen"></em></view>
+						<span>线上问诊</span>
+					</li>
+					<li>
+						<view class="gxs" @tap="goCooperative"><em class="iconfont icon-gongxiaoshelogo"></em></view>
+						<span @tap="goLoveAtVillage">供</span>
+						<span @tap="goLegalService">销</span>
+						<span @tap="goFinancialInfrastructure">社</span>
+					</li>
+					<li>
+						<view class="xlzx"><em class="iconfont icon-linshijiuzhu"></em></view>
+						<span>帮扶救助</span>
+					</li>
+					<li>
+						<view class="xswz"><em class="iconfont icon-zhishi1" @tap="gozsk"></em></view>
+						<span>知识库</span>
+					</li>
+					<li>
+						<view class="lvxd"><em class="iconfont icon-zhibo" @tap="gozbdh"></em></view>
+						<span>直播带货</span>
+					</li>
+					<li>
+						<view class="more"><em class="iconfont icon-gengduo1"></em></view>
+						<span>更多</span>
+					</li>
+				</ul>
+			</view>
+		</view>
+		<view class="fengexian"></view>
+		<!-- 分割线 -->
+		<view class="container">
+			<view class="titleLeft">
+				<em class="iconfont icon-licaiwenda"></em>
+				热门问答
+			</view>
+			<view class="rnwdList">
+				<view class="list" @tap="goDetails" v-for="(item, index) in indexList" :key="index">
+					<span class="listTitle">{{ item.title }}</span>
 
-                    <view class="onePic" v-if="item.imgList.length == 1">
-                        <image :src="loadImgSrc('/'+item.url)" v-for="(item, index1) in item.imgList" :key="index1"></image>
-                    </view>
+					<view class="onePic" v-if="item.imgList.length == 1">
+						<image :src="loadImgSrc('/' + item.url)" v-for="(item, index1) in item.imgList" :key="index1">
+						</image>
+					</view>
 
-                    <view class="twoPic" v-if="item.imgList.length == 2">
-                        <image :src="loadImgSrc('/'+item.url)" v-for="(item, index1) in item.imgList" :key="index1"></image>
-                    </view>
+					<view class="twoPic" v-if="item.imgList.length == 2">
+						<image :src="loadImgSrc('/' + item.url)" v-for="(item, index1) in item.imgList" :key="index1">
+						</image>
+					</view>
 
-                    <view class="threePic" v-if="item.imgList.length == 3">
-                        <image :src="loadImgSrc('/'+item.url)" v-for="(item, index1) in item.imgList" :key="index1"></image>
-                    </view>
+					<view class="threePic" v-if="item.imgList.length == 3">
+						<image :src="loadImgSrc('/' + item.url)" v-for="(item, index1) in item.imgList" :key="index1">
+						</image>
+					</view>
 
-                    <view class="jlSj">
-                        <span class="jf">
-                            {{ item.jf }}
-                            <em class="iconfont icon-jifen"></em>
-                        </span>
-                        <view class="ck">
-                            <span>
-                                <em class="iconfont icon-pinglun"></em>
-                                {{ item.pl }}
-                            </span>
-                            <span>
-                                <em class="iconfont icon-chakan"></em>
-                                {{ item.ck }}
-                            </span>
-                            <span>
-                                <em class="iconfont icon-shoucang"></em>
-                                {{ item.dz }}
-                            </span>
-                        </view>
-                    </view>
-                </view>
-            </view>
-        </view>
-        <view class="fengexian"></view>
-        <!-- 分割线 -->
-        <view class="container">
-            <view class="titleLeft">
-                <em class="iconfont icon-zhishiku1"></em>
-                热门知识
-            </view>
-            <ul class="rmzsList">
-                <li>
-                    <image :src="loadImgSrc('/10_16.png')"></image>
-                    <view class="listCont">
-                        <p>稳预期 促互通——专家学者建言献策国际农产品市场和贸易高质量发展</p>
-                        <text>唐旭 姚媛</text>
-                        <view class="biaoqian">
-                            <span>三农</span>
-                            <span>教育</span>
-                        </view>
-                        <view class="jiage">
-                            <span class="yhjg">
-                                <em>¥</em>
-                                200
-                            </span>
-                            <span class="yjjg">¥500</span>
-                        </view>
-                    </view>
-                </li>
-                <li>
-                    <image :src="loadImgSrc('/10_16.png')"></image>
-                    <view class="listCont">
-                        <p>稳预期 促互通——专家学者建言献策国际农产品市场和贸易高质量发展</p>
-                        <text>唐旭 姚媛</text>
-                        <view class="biaoqian">
-                            <span>三农</span>
-                            <span>教育</span>
-                        </view>
-                        <view class="jiage">
-                            <span class="yhjg">
-                                <em>¥</em>
-                                200
-                            </span>
-                            <span class="yjjg">¥500</span>
-                        </view>
-                    </view>
-                </li>
-            </ul>
-        </view>
-    </view>
+					<view class="jlSj">
+						<span class="jf">
+							{{ item.jf }}
+							<em class="iconfont icon-jifen"></em>
+						</span>
+						<view class="ck">
+							<span>
+								<em class="iconfont icon-pinglun"></em>
+								{{ item.pl }}
+							</span>
+							<span>
+								<em class="iconfont icon-chakan"></em>
+								{{ item.ck }}
+							</span>
+							<span>
+								<em class="iconfont icon-shoucang"></em>
+								{{ item.dz }}
+							</span>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="fengexian"></view>
+		<!-- 分割线 -->
+		<view class="container">
+			<view class="titleLeft">
+				<em class="iconfont icon-zhishiku1"></em>
+				热门知识
+			</view>
+			<ul class="rmzsList" @tap="goKnowledgeDetails(item)" v-for="(item, index) in dataSource" :key="index">
+				<li>
+					<image :src="loadImgSrcLocalhost(item.imgUrlList)"></image>
+					<view class="listCont">
+						<p>{{ item.titleName }}</p>
+						<text>{{ item.createBy }}</text>
+						<view class="biaoqian">
+							<span>三农</span>
+							<span>教育</span>
+						</view>
+						<view class="jiage">
+							<span class="yhjg">
+								<em>¥</em>
+								{{ item.integral }}
+							</span>
+							<span class="yjjg">¥500</span>
+						</view>
+					</view>
+				</li>
+			</ul>
+		</view>
+	</view>
 </template>
 
 <script>
-	import {governmentListData} from '@/api/information/information.js'
-export default {
-    data() {
-        return {
-            // 图片轮播
-            banners: [
-                {
-                    src: '/img1.png'
-                },
-                {
-                    src: '/img2.png'
-                }
-            ],
-            msgList: [
-                {
-                    id: 0,
-                    title: '关于高质量推进土地整治工作赋能乡村振兴的通知'
-                },
-                {
-                    id: 1,
-                    title: '关于高质量推进土地整治工作的通知'
-                },
-                {
-                    id: 2,
-                    title: '关于乡村振兴的通知'
-                }
-            ],
-            indicatorDots: true,
-            vertical: false,
-            autoplay: true,
-            interval: 2000,
-            duration: 500,
-            circular: true,
-			governmentList:[],
-            indexList: [
-			  {
-				  "ck": "10",
-				  "dz": "10",
-				  "id": 1,
-				  "imgList": [],
-				  "jf": "100",
-				  "pl": "10",
-				  "title": "探索乡村能源供给新模式 绘就乡村振兴美丽新画卷"
-			  },
-			  {
-				  "ck": "20",
-				  "dz": "200",
-				  "id": 2,
-				  "imgList": [
-					  {
-						  "url": "/xczx01.png"
-					  }
-				  ],
-				  "jf": "220",
-				  "pl": "20",
-				  "title": "探索乡村能源供给新模式 绘就乡村振兴美丽新画卷"
-			  },
-			  {
-				  "ck": "30",
-				  "dz": "320",
-				  "id": 3,
-				  "imgList": [
-					  {
-						  "url": "/xczx01.png"
-					  },
-					  {
-						  "url": "/xczx01.png"
-					  }
-				  ],
-				  "jf": "300",
-				  "ly": "30",
-				  "title": "探索乡村能源供给新模式 绘就乡村振兴美丽新画卷"
-			  },
-			  {
-				  "ck": "40",
-				  "dz": "420",
-				  "id": 4,
-				  "imgList": [
-					  {
-						  "url": "/img1.png"
-					  },
-					  {
-						  "url": "/img1.png"
-					  },
-					  {
-						  "url": "/img1.png"
-					  }
-				  ],
-				  "jf": "400",
-				  "pl": "40",
-				  "title": "探索乡村能源供给新模式 绘就乡村振兴美丽新画卷"
-			  }
-			]
-        };
-    }
-    /**
-     * 生命周期函数--监听页面加载
-     */,
-    onLoad(options) {
-    },
-	mounted() {
-		this.governmentListData()
-	},
-    methods: {
-		toLegal(){
-			uni.navigateTo({
-			    url: '/pages/toLegal/toLegal'
-			});
+	import {
+		getListToAnnouncement
+	} from '@/api/index/index.js';
+	import {
+		governmentListData
+	} from '@/api/information/information.js';
+	import {
+		popularKnowledgeList,
+		verifyScore,
+		reduceScore,
+		addScore
+	} from '@/api/knowledge/knowledge.js'
+	export default {
+		data() {
+			return {
+				// 图片轮播
+				banners: [{
+						src: '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: '关于高质量推进土地整治工作赋能乡村振兴的通知'
+					},
+					{
+						id: '2',
+						announcementTitle: '关于高质量推进土地整治工作的通知'
+					},
+					{
+						id: '1',
+						announcementTitle: '关于乡村振兴的通知'
+					}
+				],
+				requestParam: {
+					userId: getApp().globalData.userId
+				},
+				msgList: [{
+						id: 0,
+						title: '关于高质量推进土地整治工作赋能乡村振兴的通知'
+					},
+					{
+						id: 1,
+						title: '关于高质量推进土地整治工作的通知'
+					},
+					{
+						id: 2,
+						title: '关于乡村振兴的通知'
+					}
+				],
+				indicatorDots: true,
+				vertical: false,
+				autoplay: true,
+				interval: 2000,
+				duration: 500,
+				circular: true,
+				governmentList: [],
+				indexList: [{
+						ck: '10',
+						dz: '10',
+						id: 1,
+						imgList: [],
+						jf: '100',
+						pl: '10',
+						title: '探索乡村能源供给新模式 绘就乡村振兴美丽新画卷'
+					},
+					{
+						ck: '20',
+						dz: '200',
+						id: 2,
+						imgList: [{
+							url: '/xczx01.png'
+						}],
+						jf: '220',
+						pl: '20',
+						title: '探索乡村能源供给新模式 绘就乡村振兴美丽新画卷'
+					},
+					{
+						ck: '30',
+						dz: '320',
+						id: 3,
+						imgList: [{
+								url: '/xczx01.png'
+							},
+							{
+								url: '/xczx01.png'
+							}
+						],
+						jf: '300',
+						ly: '30',
+						title: '探索乡村能源供给新模式 绘就乡村振兴美丽新画卷'
+					},
+					{
+						ck: '40',
+						dz: '420',
+						id: 4,
+						imgList: [{
+								url: '/img1.png'
+							},
+							{
+								url: '/img1.png'
+							},
+							{
+								url: '/img1.png'
+							}
+						],
+						jf: '400',
+						pl: '40',
+						title: '探索乡村能源供给新模式 绘就乡村振兴美丽新画卷'
+					}
+				],
+				queryParam: {
+					pageNum: 1,
+					pageSize: 10,
+					userId: getApp().globalData.userId
+				},
+				//热门知识数据集合
+				dataSource: [],
+				// 热门知识数据总量
+				total: 0,
+				// 热门知识数据
+				knowledgeParams: {
+					// 当前页
+					pageNum: 1,
+					// 每页数据量
+					pageSize: 2,
+				},
+				loading: false,
+			};
 		},
-		toGovernmentList(){
-			uni.navigateTo({
-			    url: '/pages/toGovernmentList/toGovernmentList'
-			});
+		/**
+		 * 生命周期函数--监听页面加载
+		 */
+		onLoad(options) {
+			this.getAnnouncementList(getApp().globalData.userId);
 		},
-		governmentListData(){
-			let params = {
-			  pageSize: 10,
-			  pageNum: 1,
-			  type:10,
-			  isGovernment:1
-			  }
-			governmentListData(params).then(res =>{
-				if (res.code==200) {
-					this.governmentList=res.data
-				}
-			})
+		mounted() {
+			this.governmentListData();
 		},
-        goWenBa() {
-            uni.navigateTo({
-                url: '/pages/asking/asking'
-            });
-        },
-      goHangQing() {
-        uni.navigateTo({
-          url: '/pages/quotations/quotations'
-        });
-      },
-        goShangCheng() {
-            uni.navigateTo({
-                url: '/pages/shangcheng/shangcheng'
-            });
-        },
-
-        goDetails() {
-            uni.navigateTo({
-                url: '/pages/wenbaxiangqing/wenbaxiangqing'
-            });
-        },
-
-        goCooperative() {
-            uni.navigateTo({
-                url: '/pages/cooperative/cooperative'
-            });
-        },
-        goLoveAtVillage() {
-            uni.navigateTo({
-                url: '/pages/specialService/loveAtVillage/loveAtVillage'
-            });
-        },
-        goLegalService() {
-            uni.navigateTo({
-                url: '/pages/specialService/legalService/legalService'
-            });
-        },
-        goFinancialInfrastructure() {
-            uni.navigateTo({
-                url: '/pages/specialService/financialInfrastructure/financialInfrastructure'
-            });
-        },
-		goBanShi() {
-			uni.navigateTo({
-				url: '/pages/handleAffairs/handleAffairs'
-			});
+		created() {
+			this.getList()
 		},
-		/**
-		 * 跳转直播带货页面
-		 */
-		gozbdh(){
-			uni.navigateTo({
-			    url: '/pages/liveBroadcast/liveBroadcast'
-			});
+		onReachBottom() {
+			let pageNum = this.knowledgeParams.pageNum
+			let pageSize = this.knowledgeParams.pageSize
+			let total = this.total
+			if (pageNum * pageSize >= total) {
+				uni.showToast({
+					title: '暂无更多数据'
+				})
+				return
+			} else {
+				this.queryParams.pageNum += 1;
+				this.getList()
+			}
 		},
-    }
-};
+		methods: {
+			// 热门知识获取数据
+			getList(pageNum) {
+				let params = {
+					pageSize: this.knowledgeParams.pageSize,
+					pageNum: pageNum,
+				}
+				popularKnowledgeList(params).then(res => {
+					if (res.code == 200) {
+						this.dataSource = [...this.dataSource, ...res.rows]
+						this.total = res.total
+						console.log("this.dataSource", this.dataSource)
+					}
+				})
+			},
+			toLegal() {
+				uni.navigateTo({
+					url: '/pages/toLegal/toLegal'
+				});
+			},
+			toGovernmentList() {
+				uni.navigateTo({
+					url: '/pages/toGovernmentList/toGovernmentList'
+				});
+			},
+			toGovernmentList1() {
+				uni.navigateTo({
+					url: '/pages/toGovernmentList/toGovernmentList?type=10'
+				});
+			},
+			governmentListData() {
+				let params = {
+					pageSize: 10,
+					pageNum: 1,
+					type: 10,
+					isGovernment: 1
+				};
+				governmentListData(params).then((res) => {
+					if (res.code == 200) {
+						this.governmentList = res.data;
+					}
+				});
+			},
+			goWenBa() {
+				uni.navigateTo({
+					url: '/pages/asking/asking'
+				});
+			},
+			goHangQing() {
+				uni.navigateTo({
+					url: '/pages/quotations/quotations'
+				});
+			},
+			goShangCheng() {
+				uni.navigateTo({
+					url: '/pages/shangcheng/shangcheng'
+				});
+			},
+
+			goDetails() {
+				uni.navigateTo({
+					url: '/pages/wenbaxiangqing/wenbaxiangqing'
+				});
+			},
+
+			goCooperative() {
+				uni.navigateTo({
+					url: '/pages/cooperative/cooperative'
+				});
+			},
+			goLoveAtVillage() {
+				uni.navigateTo({
+					url: '/pages/specialService/loveAtVillage/loveAtVillage'
+				});
+			},
+			goLegalService() {
+				uni.navigateTo({
+					url: '/pages/specialService/legalService/legalService'
+				});
+			},
+			goFinancialInfrastructure() {
+				uni.navigateTo({
+					url: '/pages/specialService/financialInfrastructure/financialInfrastructure'
+				});
+			},
+			goBanShi() {
+				uni.navigateTo({
+					url: '/pages/handleAffairs/handleAffairs'
+				});
+			},
+			//获取最新公告列表(三条未读消息)
+			getAnnouncementList(userId) {
+				getListToAnnouncement(userId).then((res) => {
+					this.announcementList = res.data;
+				});
+			},
+			handleNavigate(item) {
+				uni.navigateTo({
+					url: '/pages/index/announcementDetails?id=' + item
+				});
+			},
+			//跳转公告列表页面
+			goAnnoList() {
+				uni.navigateTo({
+					url: '/pages/index/announcementList'
+				});
+			},
+			/**
+			 * 跳转直播带货页面
+			 */
+			gozbdh() {
+				uni.navigateTo({
+					url: '/pages/liveBroadcast/liveBroadcast'
+				});
+			},
+			/**
+			 * 跳转知识库页面
+			 */
+			gozsk() {
+				uni.navigateTo({
+					url: '/pages/knowledge/knowledge'
+				});
+			},
+			goKnowledgeDetails(item) {
+				let params = {
+					userId: getApp().globalData.userId,
+					scoreNum: item.integral
+				};
+				verifyScore(params).then((res) => {
+					if (res.data == false) {
+						uni.showToast({
+							title: '您的积分不足'
+						})
+					}else{
+						console.log("verifyScore",res)
+						this.reduceScore(item)
+						this.addScore(item)
+						uni.navigateTo({
+							url: '/pages/knowledgeDetails/knowledgeDetails?id=' + item.id,
+						});
+					}
+				});
+			},
+			/**
+			 * 减少积分
+			 */
+			reduceScore(item) {
+				let params = {
+					userId: getApp().globalData.userId,
+					scoreNum: item.integral,
+					relevanceDataId: item.id,
+					relevance: "0",
+				}
+				reduceScore(params).then((res) => {
+					console.log("reduceScore",res)
+				})
+			},
+			/**
+			 * 增加积分
+			 */
+			addScore(item) {
+				let params = {
+					userId: item.createId,
+					scoreNum: item.integral,
+					relevanceDataId: item.id,
+					relevance: "0",
+				}
+				addScore(params).then((res) => {
+					console.log("addScore",res)
+				})
+			}
+		}
+	};
 </script>
 <style>
-@import './index.css';
+	@import './index.css';
 </style>

+ 21 - 12
pages/informationDetail/informationDetail.vue

@@ -6,9 +6,9 @@
             <view class="wenzhangLy">
                 <!-- 头像昵称 -->
                 <view class="txTime">
-                    <image :src="loadImgSrc('/moren.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>国家乡村振兴局</p>
+                        <p>{{detailInfo.nickName?detailInfo.nickName:'网友'}}</p>
                         <span>{{ detailInfo.createTime }}</span>
                     </view>
                 </view>
@@ -18,9 +18,18 @@
             <view class="wenzhangCont article">
                 <span v-html="detailInfo.textDetails">
                 </span>
-			
-                <!-- <image :src="loadImgSrc('/img2.png')"></image> -->
+
+                <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)"  style="background-size: 100% 100%;"></image></swiper-item>
+                        </block>
+                    </swiper>
+                </view>
             </view>
+
+
         </view>
 	</view>
 </template>
@@ -36,7 +45,7 @@ export default {
 				{
 					deptName:'国家乡村振兴局',
 					updateTime:'2023-2-27 16:04',
-					desc:'用好政策效果评估成果,进一步优化巩固拓展脱贫攻坚成果同乡村振兴有效衔接政策供给,为推动工作提质增效提供有力支撑保障。',					
+					desc:'用好政策效果评估成果,进一步优化巩固拓展脱贫攻坚成果同乡村振兴有效衔接政策供给,为推动工作提质增效提供有力支撑保障。',
 				}
 			],
 			isCollection:false,
@@ -52,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
 		},
@@ -74,11 +83,11 @@ export default {
 					allSrc.forEach(e => {
 						newHtml = newHtml.replace(e,this.loadImgSrc(e))
 					})
-				} 
+				}
 			}catch(e){
 				//TODO handle the exception
 			}
-			
+
 			return newHtml
 		}
 	}
@@ -96,8 +105,8 @@ export default {
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady(e) {  
-	}, 
+    onReady(e) {
+	},
     /**
      * 生命周期函数--监听页面显示
      */
@@ -133,7 +142,7 @@ export default {
 	}
 }
 .not-collect{
-	
+
 }
 .effectBix{
 	width: 56px;
@@ -180,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;

+ 136 - 0
pages/knowledge/knowledge.css

@@ -0,0 +1,136 @@
+/* pages/wenda/wenda.wxss */
+.wendaFL {
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    margin: 30rpx 0 0 0;
+}
+.wendaFL li {
+    width: 48%;
+    height: 168rpx;
+    position: relative;
+}
+.lbBj {
+    position: absolute;
+    left: 0;
+    top: 0;
+    z-index: 0;
+    width: 100%;
+    height: 100%;
+}
+.wendaFL li h2 {
+    font-size: 36rpx;
+    position: absolute;
+    left: 30rpx;
+    top: 40rpx;
+    z-index: 1;
+    font-weight: bold;
+}
+.wendaFL li span {
+    font-size: 30rpx;
+    position: absolute;
+    left: 30rpx;
+    top: 88rpx;
+    z-index: 1;
+}
+.wendaFL li.sanNong {
+    color: #0d9970;
+}
+.wendaFL li.jiuYe {
+    color: #1e8fb4;
+}
+.wendaFL li.faLv {
+    color: #1e5dab;
+}
+.wendaFL li.jiuZhen {
+    color: #4a700d;
+}
+/* 列表 */
+.rnwdList {
+    width: 100%;
+    height: 100%;
+}
+.list {
+    border-bottom: solid 2rpx #f6f6f6;
+    padding: 10rpx 0;
+    width: 100%;
+}
+.lb {
+    background: #0d9970;
+    color: #fff;
+    font-size: 24rpx;
+    width: 12%;
+    text-align: center;
+    padding: 2rpx 0;
+    line-height: 40rpx;
+    height: 40rpx;
+    border-radius: 10rpx;
+}
+.listTitle {
+    font-size: 32rpx;
+    color: #333;
+    line-height: 40rpx;
+}
+.icon-jifen {
+    font-size: 28rpx;
+    color: #07c160;
+    margin: 0 0 0 6rpx;
+}
+.icon-pinglun,
+.icon-chakan,
+.icon-shoucang {
+    font-size: 28rpx;
+    margin: 0 6rpx 0 20rpx;
+    color: #c4c4c4;
+}
+.icon-xiangyoujiantou {
+    font-size: 30rpx;
+    color: #c4c4c4;
+    line-height: 60rpx;
+}
+.onePic {
+    width: 100%;
+    height: 360rpx;
+    border-radius: 20rpx;
+    overflow: hidden;
+    margin: 20rpx 0;
+}
+.onePic image {
+    width: 100%;
+    height: 100%;
+}
+.twoPic {
+    width: 100%;
+    height: 220rpx;
+    margin: 20rpx 0;
+    display: flex;
+    justify-content: space-between;
+}
+.twoPic image {
+    width: 49%;
+    height: auto;
+    border-radius: 20rpx;
+}
+.threePic {
+    width: 100%;
+    height: 160rpx;
+    margin: 20rpx 0;
+    display: flex;
+    justify-content: space-between;
+}
+.threePic image {
+    width: 32%;
+    height: auto;
+    border-radius: 20rpx;
+}
+.jlSj {
+    height: 40rpx;
+    display: flex;
+    justify-content: space-between;
+    font-size: 24rpx;
+    margin: 20rpx 0 0 0;
+}
+.ck {
+    color: #c4c4c4;
+	margin-left:240px;
+}

+ 98 - 0
pages/knowledge/knowledge.vue

@@ -0,0 +1,98 @@
+<template>
+	<!-- 知识库列表 -->
+	<view class="container">
+		<view class="rnwdList">
+			<view class="list" @tap="goDetails(item.id)" v-for="(item, index1) in dataSource" :key="index1">
+				<span class="listTitle">{{ item.titleName }}</span>
+
+				<view class="onePic">
+					<image :src="loadImgSrcLocalhost(item.imgUrlList)">
+					</image>
+				</view>
+
+				<view class="jlSj">
+					<view class="ck">
+						<span>
+							<em class="iconfont icon-chakan"></em>
+							{{ item.likeNum }}
+						</span>
+						<span>
+							<em class="iconfont icon-shoucang"></em>
+							{{ item.watchNum }}
+						</span>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		list
+	} from '@/api/knowledge/knowledge.js';
+	export default {
+		data() {
+			return {
+				dataSource: [],
+				// 数据总量
+				total: 0,
+				queryParams: {
+					// 当前页
+					pageNum: 1,
+					// 每页数据量
+					pageSize: 10,
+				},
+				loading: false,
+			}
+		},
+		/**
+		 * 生命周期函数--监听页面加载
+		 */
+		onLoad(options) {
+			this.getList(1)
+		},
+		onReachBottom(){
+			let pageNum = this.queryParams.pageNum
+			let pageSize = this.queryParams.pageSize
+			let total = this.total
+			if(pageNum * pageSize >= total){
+				uni.showToast({
+					title:'暂无更多数据'
+				})
+				return
+			} else {
+				this.queryParams.pageNum += 1;
+				this.getList()
+			}
+		},
+		methods: {
+			goDetails(id) {
+				uni.navigateTo({
+					url: '/pages/knowledgeDetails/knowledgeDetails?id=' + id,
+				});
+			},
+			// 分页触发
+			change(e) {
+				this.getList(e.current);
+			},
+			// 获取数据
+			getList(pageNum) {
+				let params = {
+					pageSize: this.queryParams.pageSize,
+					pageNum: pageNum,
+				}
+				list(params).then(res => {
+					if (res.code == 200) {
+						this.dataSource = [...this.dataSource,...res.rows]
+						this.total = res.total
+					}
+				})
+			},
+		}
+	}
+</script>
+
+<style>
+	@import './knowledge.css';
+</style>

pages/toGovernmentList/toGovernmentListDetail.css → pages/knowledgeDetails/knowledgeDetails.css


+ 238 - 0
pages/knowledgeDetails/knowledgeDetails.vue

@@ -0,0 +1,238 @@
+<template>
+	<view>
+		<!-- 知识库详情 -->
+		<view class="container">
+			<h1 class="title">{{fromData.titleName}}</h1>
+			<view class="wenzhangLy">
+				<!-- 头像昵称 -->
+				<view class="txTime">
+					<img class="uni-header-image"
+						:src="initInfo.headImg == null || initInfo.headImg == '' ? 'http://116.142.80.12:9000/10_03.png' : initInfo.headImg" />
+					<view class="time">
+						<p>{{initInfo.wechatName}}</p>
+						<span>{{fromData.createTime}}</span>
+					</view>
+				</view>
+			</view>
+			<view class="wenzhangCont article">
+				<view v-html="fromData.textDetails"></view>
+				<view>
+					<image :src="loadImgSrcLocalhost(fromData.imgUrlList)"></image>
+				</view>
+			</view>
+			<view class="fengexian"></view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		getDetails
+	} from '@/api/knowledge/knowledge.js';
+	import {
+		getUserInfo
+	} from '@/api/me/me.js'
+	export default {
+		data() {
+			return {
+				parentId: "",
+				fromData: {},
+				content: "",
+				initInfo: {
+					userId: null,
+					scoreNum: 0,
+					wechatName: "微信用户",
+					name: null,
+					headImg: null,
+				},
+			};
+		},
+		methods: {
+			// 获取数据
+			getDetails() {
+				getDetails(this.parentId).then(res => {
+					if (res.code == 200) {
+						this.fromData = res.data
+					}
+				})
+			},
+			getUserInfoByUserId(userId) {
+				getUserInfo(userId).then(res => {
+					this.initInfo = res.data;
+					console.log("this.initInfo", this.initInfo)
+				})
+			},
+		}
+		/**
+		 * 生命周期函数--监听页面加载
+		 */
+		,
+		onLoad(options) {
+			this.parentId = options.id
+			this.getDetails()
+		},
+		/**
+		 * 生命周期函数--监听页面初次渲染完成
+		 */
+		onReady() {
+			this.userId = getApp().globalData.userId
+			this.getUserInfoByUserId(this.userId)
+		},
+		/**
+		 * 生命周期函数--监听页面显示
+		 */
+		onShow() {},
+		/**
+		 * 生命周期函数--监听页面隐藏
+		 */
+		onHide() {},
+		/**
+		 * 生命周期函数--监听页面卸载
+		 */
+		onUnload() {},
+		/**
+		 * 页面相关事件处理函数--监听用户下拉动作
+		 */
+		onPullDownRefresh() {},
+		/**
+		 * 页面上拉触底事件的处理函数
+		 */
+		onReachBottom() {},
+		/**
+		 * 用户点击右上角分享
+		 */
+		onShareAppMessage() {},
+	};
+</script>
+<style lang="scss">
+	@import './knowledgeDetails.css';
+
+	.collect {
+		.icon-shoucang:before {
+			color: red;
+		}
+	}
+
+	.not-collect {}
+
+	.effectBix {
+		width: 56px;
+		height: 56px;
+		border-radius: 50px;
+		font-family: 'Bebas Neue', cursive;
+		background: linear-gradient(45deg, transparent 5%, #FF013C 5%);
+		border: 0;
+		color: #fff;
+		text-align: center;
+		line-height: 56px;
+		outline: transparent;
+		position: absolute;
+		transform: rotate(-30deg);
+		right: 3%;
+		top: -5%;
+	}
+
+	.effectBox,
+	.effectBox::after {
+		width: 56px;
+		height: 56px;
+		border-radius: 50px;
+		font-size: 16px;
+		font-family: 'Bebas Neue', cursive;
+		background: linear-gradient(45deg, transparent 5%, #FF013C 5%);
+		border: 0;
+		color: #fff;
+		opacity: 1;
+		letter-spacing: 3px;
+		text-align: center;
+		line-height: 56px;
+		outline: transparent;
+		position: relative;
+		left: 78%;
+		top: 113%;
+		transform: rotate(-30deg);
+		z-index: 1;
+	}
+
+	.effectBox::after {
+		--slice-0: inset(50% 50% 50% 50%);
+		--slice-1: inset(80% -6px 0 0);
+		--slice-2: inset(50% -6px 30% 0);
+		--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;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		background: linear-gradient(45deg, transparent 3%, #00E6F6 3%, #00E6F6 5%, #FF013C 5%);
+		text-shadow: -3px -3px 0px #F8F005, 3px 3px 0px #00E6F6;
+		clip-path: var(--slice-0);
+	}
+
+	.effectBox:hover::after {
+		animation: 1s glitch;
+		animation-timing-function: steps(2, end);
+	}
+
+	@keyframes glitch {
+		0% {
+			clip-path: var(--slice-1);
+			transform: translate(-20px, -10px);
+		}
+
+		10% {
+			clip-path: var(--slice-3);
+			transform: translate(10px, 10px);
+		}
+
+		20% {
+			clip-path: var(--slice-1);
+			transform: translate(-10px, 10px);
+		}
+
+		30% {
+			clip-path: var(--slice-3);
+			transform: translate(0px, 5px);
+		}
+
+		40% {
+			clip-path: var(--slice-2);
+			transform: translate(-5px, 0px);
+		}
+
+		50% {
+			clip-path: var(--slice-3);
+			transform: translate(5px, 0px);
+		}
+
+		60% {
+			clip-path: var(--slice-4);
+			transform: translate(5px, 10px);
+		}
+
+		70% {
+			clip-path: var(--slice-2);
+			transform: translate(-10px, 10px);
+		}
+
+		80% {
+			clip-path: var(--slice-5);
+			transform: translate(20px, -10px);
+		}
+
+		90% {
+			clip-path: var(--slice-1);
+			transform: translate(-10px, 0px);
+		}
+
+		100% {
+			clip-path: var(--slice-1);
+			transform: translate(0);
+		}
+	}
+</style>

+ 136 - 0
pages/lifeServices/lifeServices.css

@@ -0,0 +1,136 @@
+/* pages/wenda/wenda.wxss */
+.wendaFL {
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    margin: 30rpx 0 0 0;
+}
+.wendaFL li {
+    width: 48%;
+    height: 168rpx;
+    position: relative;
+}
+.lbBj {
+    position: absolute;
+    left: 0;
+    top: 0;
+    z-index: 0;
+    width: 100%;
+    height: 100%;
+}
+.wendaFL li h2 {
+    font-size: 36rpx;
+    position: absolute;
+    left: 30rpx;
+    top: 40rpx;
+    z-index: 1;
+    font-weight: bold;
+}
+.wendaFL li span {
+    font-size: 30rpx;
+    position: absolute;
+    left: 30rpx;
+    top: 88rpx;
+    z-index: 1;
+}
+.wendaFL li.sanNong {
+    color: #0d9970;
+}
+.wendaFL li.jiuYe {
+    color: #1e8fb4;
+}
+.wendaFL li.faLv {
+    color: #1e5dab;
+}
+.wendaFL li.jiuZhen {
+    color: #4a700d;
+}
+/* 列表 */
+.rnwdList {
+    width: 100%;
+    height: 100%;
+}
+.list {
+    border-bottom: solid 2rpx #f6f6f6;
+    padding: 10rpx 0;
+    width: 100%;
+}
+.lb {
+    background: #0d9970;
+    color: #fff;
+    font-size: 24rpx;
+    width: 12%;
+    text-align: center;
+    padding: 2rpx 0;
+    line-height: 40rpx;
+    height: 40rpx;
+    border-radius: 10rpx;
+}
+.listTitle {
+    font-size: 32rpx;
+    color: #333;
+    line-height: 40rpx;
+}
+.icon-jifen {
+    font-size: 28rpx;
+    color: #07c160;
+    margin: 0 0 0 6rpx;
+}
+.icon-pinglun,
+.icon-chakan,
+.icon-shoucang {
+    font-size: 28rpx;
+    margin: 0 6rpx 0 20rpx;
+    color: #c4c4c4;
+}
+.icon-xiangyoujiantou {
+    font-size: 30rpx;
+    color: #c4c4c4;
+    line-height: 60rpx;
+}
+.onePic {
+    width: 100%;
+    height: 360rpx;
+    border-radius: 20rpx;
+    overflow: hidden;
+    margin: 20rpx 0;
+}
+.onePic image {
+    width: 100%;
+    height: 100%;
+}
+.twoPic {
+    width: 100%;
+    height: 220rpx;
+    margin: 20rpx 0;
+    display: flex;
+    justify-content: space-between;
+}
+.twoPic image {
+    width: 49%;
+    height: auto;
+    border-radius: 20rpx;
+}
+.threePic {
+    width: 100%;
+    height: 160rpx;
+    margin: 20rpx 0;
+    display: flex;
+    justify-content: space-between;
+}
+.threePic image {
+    width: 32%;
+    height: auto;
+    border-radius: 20rpx;
+}
+.jlSj {
+    height: 40rpx;
+    display: flex;
+    justify-content: space-between;
+    font-size: 24rpx;
+    margin: 20rpx 0 0 0;
+}
+.ck {
+    color: #c4c4c4;
+	margin-left:240px;
+}

+ 110 - 0
pages/lifeServices/lifeServices.vue

@@ -0,0 +1,110 @@
+<template>
+	<!-- 生活服务列表 -->
+	<view class="container">
+		<view class="rnwdList">
+			<view class="list" @tap="goDetails(item.id)" v-for="(item, index1) in dataSource" :key="index1">
+				<span class="listTitle">{{ item.titleName }}</span>
+
+				<view class="onePic" v-if="item.pictureList != null && item.pictureList.length == 1">
+					<image :src="loadImgSrcLocalhost(item2)" v-for="(item2, index2) in item.pictureList" :key="index2">
+					</image>
+				</view>
+				<view class="twoPic" v-if="item.pictureList != null && item.pictureList.length == 2">
+					<image :src="loadImgSrcLocalhost(item2)" v-for="(item2, index2) in item.pictureList" :key="index2">
+					</image>
+				</view>
+				<view class="threePic" v-if="item.pictureList != null && item.pictureList.length == 3">
+					<image :src="loadImgSrcLocalhost(item2)" v-for="(item2, index2) in item.pictureList" :key="index2">
+					</image>
+				</view>
+				<view class="threePic" v-if="item.pictureList != null && item.pictureList.length > 3">
+					<image :src="loadImgSrcLocalhost(item2)" v-for="(item2, index2) in item.pictureList"
+						v-if="index2 < 3" :key="index2"></image>
+				</view>
+
+				<view class="jlSj">
+					<view class="ck">
+						<span>
+							<em class="iconfont icon-chakan"></em>
+							{{ item.likeNum }}
+						</span>
+						<span>
+							<em class="iconfont icon-shoucang"></em>
+							{{ item.watchNum }}
+						</span>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		list
+	} from '@/api/lifeServices/lifeServices.js';
+	export default {
+		data() {
+			return {
+				dataSource: [],
+				// 数据总量
+				total: 0,
+				queryParams: {
+					// 当前页
+					pageNum: 1,
+					// 每页数据量
+					pageSize: 10,
+				},
+				loading: false,
+			}
+		},
+		/**
+		 * 生命周期函数--监听页面加载
+		 */
+		onLoad(options) {
+			this.getList(1)
+		},
+		onReachBottom(){
+			let pageNum = this.queryParams.pageNum
+			let pageSize = this.queryParams.pageSize
+			let total = this.total
+			if(pageNum * pageSize >= total){
+				uni.showToast({
+					title:'暂无更多数据'
+				})
+				return
+			} else {
+				this.queryParams.pageNum += 1;
+				this.getList()
+			}
+		},
+		methods: {
+			goDetails(id) {
+				uni.navigateTo({
+					url: '/pages/lifeServicesDetails/lifeServicesDetails?id=' + id,
+				});
+			},
+			// 分页触发
+			change(e) {
+				this.getList(e.current);
+			},
+			// 获取数据
+			getList(pageNum) {
+				let params = {
+					pageSize: this.queryParams.pageSize,
+					pageNum: pageNum,
+				}
+				list(params).then(res => {
+					if (res.code == 200) {
+						this.dataSource = [...this.dataSource,...res.rows]
+						this.total = res.total
+					}
+				})
+			},
+		}
+	}
+</script>
+
+<style>
+	@import './lifeServices.css';
+</style>

+ 160 - 0
pages/lifeServicesDetails/lifeServicesDetails.css

@@ -0,0 +1,160 @@
+/* pages/wenbaxiangqing.wxss */
+.title {
+    font-size: 44rpx;
+    text-align: center;
+    line-height: 70rpx;
+    color: #333;
+    margin: 30rpx 0;
+}
+.wenzhangLy {
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    border-bottom: solid 2rpx #e8e8e8;
+    padding: 0 0 14rpx 0;
+}
+.txTime {
+    display: flex;
+    flex-direction: row;
+}
+.txTime image {
+    width: 80rpx;
+    height: 80rpx;
+}
+.time {
+    display: flex;
+    flex-direction: column;
+    padding: 10rpx 0 0 8px;
+}
+.time p {
+    font-size: 28rpx;
+    color: #9c9c9c;
+}
+.time span {
+    font-size: 24rpx;
+    color: #c4c4c4;
+}
+
+.jf {
+    color: #07c160;
+    line-height: 80rpx;
+    font-size: 24rpx;
+}
+.icon-jifen {
+    font-size: 28rpx;
+    color: #07c160;
+    margin: 0 0 0 6rpx;
+}
+.ck {
+    color: #c4c4c4;
+    font-size: 28rpx;
+}
+.icon-pinglun,
+.icon-chakan,
+.ck .icon-shoucang {
+    font-size: 28rpx;
+    margin: 0 6rpx 0 20rpx;
+    color: #c4c4c4;
+    line-height: 0;
+}
+.wenzhangCont {
+    font-size: 34rpx;
+    margin: 30rpx 0;
+}
+.wenzhangCont image {
+    width: 100%;
+    height: 320rpx;
+    margin: 20rpx auto;
+}
+.pinglunTj {
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    margin: 30rpx 0;
+}
+.pinglunTitle {
+    font-size: 34rpx;
+    color: #2e2e2e;
+    font-weight: 600;
+}
+.pinglunTitle em {
+    font-size: 34rpx;
+    color: #9b9b9b;
+    font-weight: normal;
+    margin: 0 0 0 10rpx;
+}
+.pinglunList {
+    width: 100%;
+    padding: 0 0 120rpx 0;
+}
+.pinglunList li {
+    margin: 20rpx 0;
+    border-bottom: solid 2rpx #e8e8e8;
+    padding: 0 0 20rpx 0;
+    display: flex;
+    flex-direction: column;
+}
+.plListcont {
+    font-size: 30rpx;
+    color: #696868;
+    margin: 20rpx 0;
+}
+.pinglunList li button {
+    width: 80%;
+    border-radius: 10rpx;
+    background: #07c160;
+    color: #fff;
+    font-size: 28rpx;
+    font-weight: normal;
+    margin: 16rpx auto;
+}
+.fabiaoPl {
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    position: fixed;
+    left: 0;
+    bottom: 0;
+    height: 112rpx;
+    background: #e8e8e8;
+    box-shadow: 0rpx 0rpx 16rpx #999;
+}
+.shuRu {
+    width: 72%;
+    display: flex;
+    flex-direction: row;
+    height: 76rpx;
+    background: #e0e0e0;
+    border-radius: 60rpx;
+    margin: 20rpx 0 0 20rpx;
+}
+.shuRu input {
+    line-height: 38px;
+    height: 76rpx;
+    font-size: 30rpx;
+    width: 83%;
+}
+.icon-bianji {
+    font-size: 38rpx;
+    line-height: 76rpx;
+    margin: 0 10rpx 0 20rpx;
+    color: #828181;
+}
+.icon-shoucang {
+    font-size: 50rpx;
+    line-height: 112rpx;
+    color: #828181;
+}
+.fasong {
+    width: 58rpx;
+    height: 58rpx;
+    border-radius: 50rpx;
+    background: #07c160;
+    margin: 26rpx 20rpx 0 10rpx;
+    text-align: center;
+    line-height: 58rpx;
+}
+.icon-fasong {
+    font-size: 40rpx;
+    color: #fff;
+}

+ 237 - 0
pages/lifeServicesDetails/lifeServicesDetails.vue

@@ -0,0 +1,237 @@
+<template>
+	<view>
+		<!-- 生活服务详情 -->
+		<view class="container">
+			<h1 class="title">{{fromData.titleName}}</h1>
+			<view class="wenzhangLy">
+				<!-- 头像昵称 -->
+				<view class="txTime">
+					<img class="uni-header-image"
+						:src="initInfo.headImg == null || initInfo.headImg == '' ? 'http://116.142.80.12:9000/10_03.png' : initInfo.headImg" />
+					<view class="time">
+						<p>{{initInfo.wechatName}}</p>
+						<span>{{fromData.createTime}}</span>
+					</view>
+				</view>
+			</view>
+			<view class="wenzhangCont article">
+				<view v-html="fromData.textDetails"></view>
+				<view v-for="(item, index) in fromData.pictureList" :key="index">
+					<image :src="loadImgSrcLocalhost(item)"></image>
+				</view>
+			</view>
+			<view class="fengexian"></view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		getDetails
+	} from '@/api/lifeServices/lifeServices.js';
+	import {
+		getUserInfo
+	} from '@/api/me/me.js'
+	export default {
+		data() {
+			return {
+				parentId: "",
+				fromData: {},
+				content: "",
+				initInfo: {
+					userId: null,
+					scoreNum: 0,
+					wechatName: "微信用户",
+					name: null,
+					headImg: null,
+				},
+			};
+		},
+		methods: {
+			// 获取数据
+			getDetails() {
+				getDetails(this.parentId).then(res => {
+					if (res.code == 200) {
+						this.fromData = res.data
+					}
+				})
+			},
+			getUserInfoByUserId(userId) {
+				getUserInfo(userId).then(res => {
+					this.initInfo = res.data;
+				})
+			},
+		}
+		/**
+		 * 生命周期函数--监听页面加载
+		 */
+		,
+		onLoad(options) {
+			this.parentId = options.id
+			this.getDetails()
+		},
+		/**
+		 * 生命周期函数--监听页面初次渲染完成
+		 */
+		onReady() {
+			this.userId = getApp().globalData.userId
+			this.getUserInfoByUserId(this.userId)
+		},
+		/**
+		 * 生命周期函数--监听页面显示
+		 */
+		onShow() {},
+		/**
+		 * 生命周期函数--监听页面隐藏
+		 */
+		onHide() {},
+		/**
+		 * 生命周期函数--监听页面卸载
+		 */
+		onUnload() {},
+		/**
+		 * 页面相关事件处理函数--监听用户下拉动作
+		 */
+		onPullDownRefresh() {},
+		/**
+		 * 页面上拉触底事件的处理函数
+		 */
+		onReachBottom() {},
+		/**
+		 * 用户点击右上角分享
+		 */
+		onShareAppMessage() {},
+	};
+</script>
+<style lang="scss">
+	@import './lifeServicesDetails.css';
+
+	.collect {
+		.icon-shoucang:before {
+			color: red;
+		}
+	}
+
+	.not-collect {}
+
+	.effectBix {
+		width: 56px;
+		height: 56px;
+		border-radius: 50px;
+		font-family: 'Bebas Neue', cursive;
+		background: linear-gradient(45deg, transparent 5%, #FF013C 5%);
+		border: 0;
+		color: #fff;
+		text-align: center;
+		line-height: 56px;
+		outline: transparent;
+		position: absolute;
+		transform: rotate(-30deg);
+		right: 3%;
+		top: -5%;
+	}
+
+	.effectBox,
+	.effectBox::after {
+		width: 56px;
+		height: 56px;
+		border-radius: 50px;
+		font-size: 16px;
+		font-family: 'Bebas Neue', cursive;
+		background: linear-gradient(45deg, transparent 5%, #FF013C 5%);
+		border: 0;
+		color: #fff;
+		opacity: 1;
+		letter-spacing: 3px;
+		text-align: center;
+		line-height: 56px;
+		outline: transparent;
+		position: relative;
+		left: 78%;
+		top: 113%;
+		transform: rotate(-30deg);
+		z-index: 1;
+	}
+
+	.effectBox::after {
+		--slice-0: inset(50% 50% 50% 50%);
+		--slice-1: inset(80% -6px 0 0);
+		--slice-2: inset(50% -6px 30% 0);
+		--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;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		background: linear-gradient(45deg, transparent 3%, #00E6F6 3%, #00E6F6 5%, #FF013C 5%);
+		text-shadow: -3px -3px 0px #F8F005, 3px 3px 0px #00E6F6;
+		clip-path: var(--slice-0);
+	}
+
+	.effectBox:hover::after {
+		animation: 1s glitch;
+		animation-timing-function: steps(2, end);
+	}
+
+	@keyframes glitch {
+		0% {
+			clip-path: var(--slice-1);
+			transform: translate(-20px, -10px);
+		}
+
+		10% {
+			clip-path: var(--slice-3);
+			transform: translate(10px, 10px);
+		}
+
+		20% {
+			clip-path: var(--slice-1);
+			transform: translate(-10px, 10px);
+		}
+
+		30% {
+			clip-path: var(--slice-3);
+			transform: translate(0px, 5px);
+		}
+
+		40% {
+			clip-path: var(--slice-2);
+			transform: translate(-5px, 0px);
+		}
+
+		50% {
+			clip-path: var(--slice-3);
+			transform: translate(5px, 0px);
+		}
+
+		60% {
+			clip-path: var(--slice-4);
+			transform: translate(5px, 10px);
+		}
+
+		70% {
+			clip-path: var(--slice-2);
+			transform: translate(-10px, 10px);
+		}
+
+		80% {
+			clip-path: var(--slice-5);
+			transform: translate(20px, -10px);
+		}
+
+		90% {
+			clip-path: var(--slice-1);
+			transform: translate(-10px, 0px);
+		}
+
+		100% {
+			clip-path: var(--slice-1);
+			transform: translate(0);
+		}
+	}
+</style>

+ 1 - 1
pages/liveBroadcastDetails/liveBroadcastDetails.vue

@@ -14,7 +14,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="wenzhangCont">
+			<view class="wenzhangCont article">
 				<view v-html="fromData.textDetails"></view>
 				<view v-for="(item, index) in fromData.pictureList" :key="index">
 					<image :src="loadImgSrcLocalhost(item)"></image>

+ 41 - 0
pages/matterAll/matterAll.vue

@@ -0,0 +1,41 @@
+<template>
+	<view>
+		<uni-list>
+			<uni-list-item  :title="item.title" v-for="(item,index) in dataList"></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: {
+
+			getMatters(data) {
+				let _that = this
+				getMattersAll(data).then(res => {
+					_that.dataList = res.data
+					console.log(_that.dataList)
+				})
+			}
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 26 - 11
pages/me/meOperate.vue

@@ -9,7 +9,7 @@
 					<uni-th align="center">积分变动来源</uni-th>
 					<uni-th align="center">时间</uni-th>
 				</uni-tr>
-				<uni-tr v-for="(item, index) in tableData" :key="index">
+				<uni-tr v-for="(item, index) in tableData" :key="index" style="height: 5em;">
 					<uni-td>{{item.name == null || item.name == '' ? item.wechatName : item.name}}</uni-td>
 					<uni-td>{{ item.scoreOperate }}</uni-td>
 					<uni-td align="center">{{ item.scoreNum }}</uni-td>
@@ -17,9 +17,9 @@
 					<uni-td align="center">{{ item.createTime }}</uni-td>
 				</uni-tr>
 			</uni-table>
-			<view class="uni-pagination-box">
+			<!-- <view class="uni-pagination-box">
 				<uni-pagination show-icon :page-size="queryParams.pageSize" :current="queryParams.pageNum" :total="total" @change="change" />
-			</view>
+			</view> -->
 		</view>
 	</view>
 </template>
@@ -38,7 +38,7 @@ export default {
 				// 当前页
 				pageNum: 1,
 				// 每页数据量
-				pageSize: 10,
+				pageSize: 15,
 				//请求参数
 				userId: getApp().globalData.userId
 			},
@@ -46,22 +46,37 @@ export default {
 		};
 	},
 	onLoad() {
-		this.selectedIndexs = [];
-		this.getData(1);
+		// this.selectedIndexs = [];
+		this.getData();
+	},
+	onReachBottom() {
+		let pageNum = this.queryParams.pageNum;
+		let pageSize = this.queryParams.pageSize;
+		let total = this.total;
+		if (pageNum * pageSize >= total) {
+			uni.showToast({
+				title: '暂无更多数据'
+			});
+			return;
+		} else {
+			this.queryParams.pageNum += 1;
+			this.getData();
+		}
 	},
 	methods: {
 		// 分页触发
-		change(e) {
+		/* change(e) {
 			this.$refs.table.clearSelection();
 			this.selectedIndexs.length = 0;
 			this.getData(e.current);
-		},
+		}, */
 		// 获取数据
-		getData(pageNum) {
+		getData() {
 			this.loading = true;
-			this.queryParams.pageNum = pageNum;
+			// this.queryParams.pageNum = pageNum;
 			listScoreInfo(this.queryParams).then(res =>{
-				this.tableData = res.rows
+				this.tableData = [...this.tableData,...res.rows]
+				// this.tableData = res.rows
 				this.total = res.total
 				this.loading = false;
 			});

+ 117 - 107
pages/toGovernmentList/index.css

@@ -1,44 +1,96 @@
-/*
+/* pages/fuwu.wxss */
+/* pages/sannong.wxss */
+.snTab {
+    width: 100%;
+}
+
+.fontColorBox,
+.fontColorBox1 {
+    color: #07c160;
+}
+
+.navBox {
+    /* 顶部tab盒子样式 */
+    width: 100%;
+    height: 108rpx;
+    background: white;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    justify-content: center;
+}
+/* 最后一个tab标题的样式 */
+
+.titleBox {
+    /* 未选中文字的样式 */
+    color: rgb(168, 170, 175);
+    font-size: 30rpx;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    width: 32%;
+}
+.lineBox,
+.notLineBox {
+    /* 选中及未选中底线共同样式 */
+    width: 32rpx;
+    height: 8rpx;
+}
+
+.lineBox {
+    /* 选中底线样式 */
+    background: #07c160;
+    margin-top: 16rpx;
+    border-radius: 4rpx;
+}
+
+.notLineBox {
+    /* 未选中底线样式 */
+    background: transparent;
+}
+
+.swiperTtemBox {
+    /* 底部内容样式 */
+    height: 100vh;
+    overflow: scroll;
+    margin: 12rpx 0rpx;
+    background: white;
+    font-size: 28rpx;
+}
+
 /* 热门问答 */
 .rnwdList {
     width: 100%;
+    height: 100%;
 }
-
 .list {
     border-bottom: solid 2rpx #f6f6f6;
     padding: 10rpx 0;
     width: 100%;
 }
-
 .listTitle {
     font-size: 32rpx;
     color: #333;
     line-height: 40rpx;
 }
-
 .jlSj {
     height: 40rpx;
     display: flex;
     justify-content: space-between;
-    align-items: center;
     font-size: 24rpx;
     margin: 20rpx 0 0 0;
 }
-
 .jf {
     color: #07c160;
 }
-
 .icon-jifen {
-    font-size: 26rpx;
+    font-size: 28rpx;
     color: #07c160;
     margin: 0 0 0 6rpx;
 }
-
 .ck {
     color: #c4c4c4;
 }
-
 .icon-pinglun,
 .icon-chakan,
 .icon-shoucang {
@@ -46,7 +98,6 @@
     margin: 0 6rpx 0 20rpx;
     color: #c4c4c4;
 }
-
 .onePic {
     width: 100%;
     height: 360rpx;
@@ -54,31 +105,10 @@
     overflow: hidden;
     margin: 20rpx 0;
 }
-
 .onePic image {
     width: 100%;
     height: 100%;
 }
-.imageContainer {
-  display: flex;
-}
-
-.imageContainer.one-image {
-  justify-content: center;
-  align-items: center;
-}
-
-.imageContainer.two-images {
-  justify-content: space-between;
-}
-
-.imageContainer.three-images {
-  justify-content: space-between;
-}
-
-.imageContainer image {
-  /* 根据需要设置图片样式 */
-}
 .twoPic {
     width: 100%;
     height: 220rpx;
@@ -86,13 +116,11 @@
     display: flex;
     justify-content: space-between;
 }
-
 .twoPic image {
     width: 49%;
     height: auto;
     border-radius: 20rpx;
 }
-
 .threePic {
     width: 100%;
     height: 160rpx;
@@ -100,95 +128,77 @@
     display: flex;
     justify-content: space-between;
 }
-
 .threePic image {
     width: 32%;
     height: auto;
     border-radius: 20rpx;
 }
 
-/* 热门知识 */
-.rmzsList li {
-    width: 100%;
-    border-bottom: solid 2rpx #f6f6f6;
-    padding: 20rpx 0;
-    display: flex;
-    justify-content: space-between;
-}
-
-.rmzsList li image {
-    width: 40%;
-    height: 200rpx;
+.pane-con {
+    margin: 20rpx 0;
 }
-
-.listCont {
-    width: 58%;
+.tabs-pane {
+    padding: 10rpx 20rpx;
+    margin-right: 20rpx;
+    border: 1px solid lightgrey;
 }
-
-.listCont p {
-    font-size: 32rpx;
-    color: #333;
-    overflow: hidden;
-    line-height: 40rpx;
-    overflow: hidden;
-    text-overflow: ellipsis;
-    display: -webkit-box;
-    -webkit-line-clamp: 2;
-    -webkit-box-orient: vertical;
+.tabs-pane:nth-last-child(1) {
+    margin-right: 0;
 }
-
-.listCont text {
-    font-size: 24rpx;
-    color: #9c9c9c;
+.tabs-pane.active {
+    background: #5495df;
+    border-color: #5495df;
+    color: #fff;
 }
 
-.biaoqian {
-    display: flex;
-    margin: 6rpx 0;
+.tab-class {
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100vw;
+    bottom: 0;
 }
 
-.biaoqian span {
-    padding: 2rpx 20rpx;
-    font-size: 20rpx;
-    background: #e0e0e0;
-    color: #9c9c9c;
-    margin: 0 20rpx 0 0;
-    border-radius: 30rpx;
+.guidebook .img_box {
+    margin-bottom: 12rpx;
+    padding-left: 4rpx;
 }
-
-.jiage {
+.guidebook .img_box .many_img {
     display: flex;
+    justify-self: start;
+    flex-wrap: wrap;
+}
+.guidebook .img_item.four {
+    width: 198rpx;
+    height: 198rpx;
+    margin-right: 16rpx;
+    margin-bottom: 16rpx;
+    border-radius: 16rpx;
+    overflow: hidden;
 }
-
-.yhjg {
-    font-size: 30rpx;
-    color: #07c160;
-}
-
-.yhjg em {
-    font-size: 24rpx;
-    color: #07c160;
-}
-
-.yjjg {
-    font-size: 24rpx;
-    color: #9c9c9c;
-    margin: 6rpx 0 0 20rpx;
-    text-decoration: line-through;
-}
-
-/* 公告start */
-
-.swiper_container {
-    height: 55rpx;
-    width: 70%;
-    line-height: 60rpx;
+.guidebook .img_item.four:nth-child(2n) {
+    margin-right: 30rpx;
 }
-
-.swiper_item {
-    color: #000;
-    font-size: 28rpx;
+.guidebook .img_item.many {
+    width: 198rpx;
+    height: 198rpx;
+    margin-right: 16rpx;
+    margin-bottom: 16rpx;
+    border-radius: 16rpx;
     overflow: hidden;
-    text-overflow: ellipsis;
-    white-space: nowrap;
 }
+.guidebook .img_item.many:nth-child(3n) {
+    margin-right: 0;
+}
+.addInfomarionBtn{
+	position: fixed;
+	bottom: 3%;
+	right: 3%;
+	width: 40px;
+	height: 40px;
+	background: url('@/static/images/upload/add.png') 0 0 no-repeat;
+	background-size: 100% 100%;
+}
+.addInfomarionBtn::after{
+	border: none;
+}

+ 214 - 56
pages/toGovernmentList/toGovernmentList.vue

@@ -1,72 +1,230 @@
 <template>
-        <!-- 分割线 -->
-        <view class="container">
-            <view class="rnwdList">
-                <view class="list" v-for="(item, index) in indexList1" :key="index" @click="toGovernmentList1">
-                    <span class="listTitle">{{ item.titleName }}</span>
-                    <view class="onePic" v-if="item.urls!=null&&item.urls.length > 0" v-for="(url, i) in item.urls">
-                        <image :src="'http://localhost:88/dev-api'+url" :key="i"></image>
-                    </view>
-                    <view class="jlSj">
-                        <span class="jf">
-                            {{ item.createTime }}
-                        </span>
-                        <view class="ck">
-                            <span>
-                                <em class="iconfont icon-chakan"></em>
-                                {{ item.watchNum }}
-                            </span>
-                            <span>
-                                <em class="iconfont icon-shoucang"></em>
-                                {{ item.likeNum }}
-                            </span>
-                        </view>
-                    </view>
-                </view>
-            </view>
-        </view>
+    <!-- pages/me.wxml -->
+	<view class="container">
+		<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.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.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.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.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">
+	                <span class="jf">
+	                   <!-- {{ item.jf }}
+	                    <em class="iconfont icon-jifen"></em> -->
+	                </span>
+	                <view class="ck">
+	                    <!-- <span>
+	                        <em class="iconfont icon-pinglun"></em>
+	                        {{ item.pl }}
+	                    </span> -->
+	                    <span>
+	                        <em class="iconfont icon-chakan"></em>
+	                        {{ item.watchNum }}
+	                    </span>
+	                    <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>
+		<!-- 新增资讯按钮 -->
+		<!-- <button class="addInfomarionBtn" @click="addInfomation()"></button> -->
+	</view>
 </template>
 
 <script>
-	import {governmentListMore} from '@/api/information/information.js'
+import { listWxs ,listWx,likeServer} from '@/api/information/information.js'
+// pages/me.js
 export default {
     data() {
         return {
-            indexList1: []
-        };
-    }
-    /**
-     * 生命周期函数--监听页面加载
-     */,
-    onLoad(options) {
-		this.governmentListMores()
+			qbwd:[],
+			listParams:{
+			  pageNum: 1,
+			  pageSize: 7,
+			  titleName: '',
+			  type: 10,
+			  flag:'',
+			  isTop:null
+			},
+			topList:[],
+			total:0,
+			searchValue:'',
+			favoriteList:[],
+			value: 1,
+			range: [
+				{ value: 'watch', text: "热度" },
+				{ value: 'like', text: "点赞" },
+				{ value: '', text: "最新" },
+			],
+		};
     },
-	mounted() {
+	created(){
 
 	},
-    methods: {
-      toGovernmentList1(){
-        uni.navigateTo({
-          url: '/pages/toGovernmentList/toGovernmentListDetail'
-        });
-      },
-		governmentListMores(){
-			let params = {
-			  pageSize: 10,
-			  pageNum: 1,
-			  type:10,
-			  isGovernment:1
-			  }
-			governmentListMore(params).then(res =>{
-				if (res.code==200) {
-					this.indexList1=res.rows
-				}
+	onReachBottom(){
+		let pageNum = this.listParams.pageNum
+		let pageSize = this.listParams.pageSize
+		let total = this.total
+		if(pageNum * pageSize >= total){
+			uni.showToast({
+				title:'暂无更多数据'
+			})
+			return
+		} else {
+			this.listParams.pageNum += 1;
+			this.getList()
+		}
+	},
+	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.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
 			})
+		},
+		goDetails(e) {
+			let id = e.id || ''
+			let type = 10
+		    uni.navigateTo({
+		        url: `../informationDetail/informationDetail?id=${id}&type=${type}`
+		    });
+		},
+		// 新增资讯
+		addInfomation(){
+			uni.navigateTo({
+			    url: `../informationAdd/informationAdd`
+			});
+		}
+	},
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad(options) {
+		if(options.type!=null){
+			this.listParams.type = options.type
 		}
-    }
+		if(options.type==null){
+			this.listParams.isGovernment = 1
+		}
+      // 查置顶
+      listWx({
+        type:10,
+        isTop:1
+      }).then(e => {
+        this.topList = e.data
+        this.qbwd = this.topList
+        this.getList()
+      })
+	},
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady() {},
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow() {},
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide() {},
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload() {},
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh() {},
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {},
 };
 </script>
-<style scoped>
-	@import url("./index.css");
+<style lang="scss">
+@import './index.css';
+.container{
+	height: 100%;
+	content: '\e633';
+}
+.favorite{
+	.icon-shoucang:before{
+		color: red;
+	}
+}
+.not-favorite{
+
+}
 </style>

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 269
pages/toGovernmentList/toGovernmentListDetail.vue


+ 97 - 26
pages/toLegal/toLegal.vue

@@ -1,48 +1,57 @@
 <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">
+				<span v-if="item.isTop == 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.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="item.urls.length == 2">
+	            <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="item.urls.length == 3">
+	            <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>
@@ -52,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() {
@@ -62,17 +71,31 @@ export default {
 			  pageNum: 1,
 			  pageSize: 7,
 			  titleName: '',
+			  isTop:0,
 			  type: 11,
 			  flag:''
 			},
+			topList:[],
 			total:0,
-			searchValue:''
+			searchValue:'',
+			favoriteList:[],
+			value: 1,
+			range: [
+				{ value: 'watch', text: "热度" },
+				{ value: 'like', text: "点赞" },
+				{ value: '', text: "最新" },
+			],
 		};
     },
 	created(){
-		this.getList()
 		// 查置顶
-		listWx({}).then(e => {
+		listWx({
+			type:11,
+			isTop:1
+		}).then(e => {
+			this.topList = e.data
+			this.qbwd = this.topList
+			this.getList()
 		})
 	},
 	onReachBottom(){
@@ -90,12 +113,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: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 = ''
+		},
 		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
@@ -145,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>

+ 118 - 0
pages/topic/topic.vue

@@ -0,0 +1,118 @@
+<template>
+	<view>
+		<view style="height: 20%;">
+			<button v-for="(item,index) in userType" @click="onclick(item)">{{item.dictLabel}}
+			</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>
+					</view>
+				</uni-grid-item>
+			</uni-grid>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	import {
+		getDicts
+	} from "@/api/system/dict/data.js"
+	import {
+		listAll
+	} from "@/api/handleAffairs/topicType.js"
+	export default {
+
+		data() {
+			return {
+				userType: [], // 初始化用户类型为空
+				dataList: [],
+
+			}
+		},
+		created() {
+			this.getdictData()//初始化字典按钮
+			this.getdataList()//初始化数据
+		},
+		methods: {
+			
+			getdataList(data){
+				let _that = this
+				if (!data) {
+					data = {
+						objectOfHandling: 0,
+						yesOrNoShow: "0"
+					}
+				}
+				listAll(data).then(res => {
+					_that.dataList = res.data
+				})
+				console.log(_that.dataList)
+			},
+			onclick(row) {
+				
+				let data = {
+					objectOfHandling: row.dictValue,
+					yesOrNoShow: "0"
+				}
+				this.getdataList(data)
+			},
+			getdictData() {
+				let _that = this
+				getDicts("object_application").then(res => {
+					_that.userType = res.data
+				})
+			},
+			changeUserType(type) {
+				this.userType = type
+			}
+		},
+
+	}
+</script>
+
+<style>
+	/* view {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		height: 100vh;
+	} */
+
+	button {
+		margin-bottom: 10px;
+	}
+
+	.selected {
+		background-color: #007bff;
+		color: #fff;
+	}
+
+	.grid-item-box {
+		flex: 1;
+		// position: relative;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		padding: 15px 0;
+	}
+
+	.grid-item-box-row {
+		flex: 1;
+		// position: relative;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		align-items: center;
+		justify-content: center;
+		padding: 15px 0;
+	}
+</style>

+ 2 - 0
uni_modules/uni-section/changelog.md

@@ -0,0 +1,2 @@
+## 0.0.1(2022-07-22)
+- 初始化

+ 167 - 0
uni_modules/uni-section/components/uni-section/uni-section.vue

@@ -0,0 +1,167 @@
+<template>
+	<view class="uni-section">
+		<view class="uni-section-header" @click="onClick">
+				<view class="uni-section-header__decoration" v-if="type" :class="type" />
+        <slot v-else name="decoration"></slot>
+
+        <view class="uni-section-header__content">
+          <text :style="{'font-size':titleFontSize,'color':titleColor}" class="uni-section__content-title" :class="{'distraction':!subTitle}">{{ title }}</text>
+          <text v-if="subTitle" :style="{'font-size':subTitleFontSize,'color':subTitleColor}" class="uni-section-header__content-sub">{{ subTitle }}</text>
+        </view>
+
+        <view class="uni-section-header__slot-right">
+          <slot name="right"></slot>
+        </view>
+		</view>
+
+		<view class="uni-section-content" :style="{padding: _padding}">
+			<slot />
+		</view>
+	</view>
+</template>
+
+<script>
+
+	/**
+	 * Section 标题栏
+	 * @description 标题栏
+	 * @property {String} type = [line|circle|square] 标题装饰类型
+	 * 	@value line 竖线
+	 * 	@value circle 圆形
+	 * 	@value square 正方形
+	 * @property {String} title 主标题
+	 * @property {String} titleFontSize 主标题字体大小
+	 * @property {String} titleColor 主标题字体颜色
+	 * @property {String} subTitle 副标题
+	 * @property {String} subTitleFontSize 副标题字体大小
+	 * @property {String} subTitleColor 副标题字体颜色
+	 * @property {String} padding 默认插槽 padding
+	 */
+
+	export default {
+		name: 'UniSection',
+    emits:['click'],
+		props: {
+			type: {
+				type: String,
+				default: ''
+			},
+			title: {
+				type: String,
+				required: true,
+				default: ''
+			},
+      titleFontSize: {
+        type: String,
+        default: '14px'
+      },
+			titleColor:{
+				type: String,
+				default: '#333'
+			},
+			subTitle: {
+				type: String,
+				default: ''
+			},
+      subTitleFontSize: {
+        type: String,
+        default: '12px'
+      },
+      subTitleColor: {
+        type: String,
+        default: '#999'
+      },
+			padding: {
+				type: [Boolean, String],
+				default: false
+			}
+		},
+    computed:{
+      _padding(){
+        if(typeof this.padding === 'string'){
+          return this.padding
+        }
+
+        return this.padding?'10px':''
+      }
+    },
+		watch: {
+			title(newVal) {
+				if (uni.report && newVal !== '') {
+					uni.report('title', newVal)
+				}
+			}
+		},
+    methods: {
+			onClick() {
+				this.$emit('click')
+			}
+		}
+	}
+</script>
+<style lang="scss" >
+	$uni-primary: #2979ff !default;
+
+	.uni-section {
+		background-color: #fff;
+    .uni-section-header {
+      position: relative;
+      /* #ifndef APP-NVUE */
+      display: flex;
+      /* #endif */
+      flex-direction: row;
+      align-items: center;
+      padding: 12px 10px;
+      font-weight: normal;
+
+      &__decoration{
+        margin-right: 6px;
+        background-color: $uni-primary;
+        &.line {
+          width: 4px;
+          height: 12px;
+          border-radius: 10px;
+        }
+
+        &.circle {
+          width: 8px;
+          height: 8px;
+          border-top-right-radius: 50px;
+          border-top-left-radius: 50px;
+          border-bottom-left-radius: 50px;
+          border-bottom-right-radius: 50px;
+        }
+
+        &.square {
+          width: 8px;
+          height: 8px;
+        }
+      }
+
+      &__content {
+        /* #ifndef APP-NVUE */
+        display: flex;
+        /* #endif */
+        flex-direction: column;
+        flex: 1;
+        color: #333;
+
+        .distraction {
+          flex-direction: row;
+          align-items: center;
+        }
+        &-sub {
+          margin-top: 2px;
+        }
+      }
+
+      &__slot-right{
+        font-size: 14px;
+      }
+    }
+
+    .uni-section-content{
+      font-size: 14px;
+    }
+	}
+</style>

+ 87 - 0
uni_modules/uni-section/package.json

@@ -0,0 +1,87 @@
+{
+  "id": "uni-section",
+  "displayName": "uni-section 标题栏",
+  "version": "0.0.1",
+  "description": "标题栏组件",
+  "keywords": [
+    "uni-ui",
+    "uniui",
+    "标题栏"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": ""
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+  "dcloudext": {
+    "category": [
+      "前端组件",
+      "通用组件"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+  },
+  "uni_modules": {
+    "dependencies": [
+      "uni-scss"
+    ],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "y"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "y",
+          "Edge": "y",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "y",
+          "百度": "y",
+          "字节跳动": "y",
+          "QQ": "y"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

+ 8 - 0
uni_modules/uni-section/readme.md

@@ -0,0 +1,8 @@
+## Section 标题栏
+> **组件名:uni-section**
+> 代码块: `uSection`
+
+uni-section 组件主要用于文章、列表详情等标题展示
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-section)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839