Procházet zdrojové kódy

政策推荐前三个+惠民通路由初始化

qinhouyu před 1 rokem
rodič
revize
7a082dc8b0

+ 10 - 0
api/information/information.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+// 政策推荐前三个
+export function governmentListData(query) {
+  return request({
+    url: '/jnb/information/listWx',
+    method: 'get',
+	params:query
+  })
+}

+ 11 - 2
pages.json

@@ -120,7 +120,7 @@
 				"navigationBarBackgroundColor": "#07c160",
 				"navigationBarTextStyle": "white",
 				"navigationBarTitleText": "办事"
-				
+
 			}
 		},
 		{
@@ -130,7 +130,16 @@
 				"navigationBarBackgroundColor": "#07c160",
 				"navigationBarTextStyle": "white",
 				"navigationBarTitleText": "主题配置类型"
-				
+
+			}
+		},{
+			"path": "pages/toGovernmentList/toGovernmentList",
+			"style": {
+				"usingComponents": {},
+				"navigationBarBackgroundColor": "#07c160",
+				"navigationBarTextStyle": "white",
+				"navigationBarTitleText": "惠民通"
+
 			}
 		},
 		{

+ 25 - 3
pages/index/index.vue

@@ -68,14 +68,14 @@
             <view class="zcTuijian">
                 <image :src="loadImgSrc('/zctj.png')"></image>
                 <ul>
-                    <view v-for="(item, index) in msgList" :key="index">
+                    <view v-for="(item, index) in governmentList" :key="index">
                         <li style="display: flex;">
                             <em class="iconfont icon-yuandianxiao"></em>
-                            {{ item.title }}
+                            {{ item.titleName }}
                         </li>
                     </view>
                 </ul>
-                <em class="iconfont icon-xiangyoujiantou"></em>
+                <em class="iconfont icon-xiangyoujiantou" @click="toGovernmentList"></em>
             </view>
         </view>
         <view class="fengexian"></view>
@@ -228,6 +228,7 @@
 </template>
 
 <script>
+	import {governmentListData} from '@/api/information/information.js'
 export default {
     data() {
         return {
@@ -260,6 +261,7 @@ export default {
             interval: 2000,
             duration: 500,
             circular: true,
+			governmentList:[],
             indexList: [
 			  {
 				  "ck": "10",
@@ -326,7 +328,27 @@ export default {
      */,
     onLoad(options) {
     },
+	mounted() {
+		this.governmentListData()
+	},
     methods: {
+		toGovernmentList(){
+			uni.navigateTo({
+			    url: '/pages/toGovernmentList/toGovernmentList'
+			});
+		},
+		governmentListData(){
+			let params = {
+			  pageSize: 10,
+			  pageNum: 1,
+			  type:10,
+			  }
+			governmentListData(params).then(res =>{
+				if (res.code==200) {
+					this.governmentList=res.data
+				}
+			})
+		},
         goWenBa() {
             uni.navigateTo({
                 url: '/pages/wenba/wenba'

+ 26 - 0
pages/toGovernmentList/toGovernmentList.vue

@@ -0,0 +1,26 @@
+<template>
+	<view>
+	  <text>秦厚玉</text>
+	</view>
+
+</template>
+
+<script>
+	
+	export default {
+		data() {
+			return {
+				
+			};
+		},
+		mount() {
+			
+		},
+		methods: {
+			
+		}
+	}
+</script>
+<style scoped>
+	
+</style>