Browse Source

登录后默认页面调整

maxiaoxiao 4 weeks ago
parent
commit
1fb0155327
6 changed files with 183 additions and 75 deletions
  1. 1 1
      config.js
  2. 1 13
      pages.json
  3. 148 35
      pages/index.vue
  4. 30 23
      pages/index/index.vue
  5. 1 1
      pages/login.vue
  6. 2 2
      store/modules/user.js

+ 1 - 1
config.js

@@ -1,7 +1,7 @@
 // 应用全局配置
 module.exports = {
   // baseUrl: 'https://vue.ruoyi.vip/prod-api',
-  baseUrl: 'http://192.168.60.221/dev-api',
+  baseUrl: 'http://192.168.60.221/prod-api',
   // 应用信息
   appInfo: {
     // 应用名称

+ 1 - 13
pages.json

@@ -12,8 +12,7 @@
   }, {
     "path": "pages/index",
     "style": {
-      "navigationBarTitleText": "若依移动端框架",
-      "navigationStyle": "custom"
+      "navigationBarTitleText": "任务"
     }
   }, {
     "path": "pages/work/index",
@@ -70,12 +69,6 @@
     "style": {
       "navigationBarTitleText": "浏览文本"
     }
-  },
-	{
-    "path": "pages/index/index",
-    "style": {
-      "navigationBarTitleText": "任务"
-    }
   },
   {
     "path": "pages/check/index",
@@ -94,11 +87,6 @@
         "pagePath": "pages/index",
         "iconPath": "static/images/tabbar/home.png",
         "selectedIconPath": "static/images/tabbar/home_.png",
-        "text": "首页"
-      },{
-        "pagePath": "pages/index/index",
-        "iconPath": "static/images/tabbar/home.png",
-        "selectedIconPath": "static/images/tabbar/home_.png",
         "text": "任务"
       }, {
         "pagePath": "pages/check/index",

+ 148 - 35
pages/index.vue

@@ -1,43 +1,156 @@
 <template>
-  <view class="content">
-    <image class="logo" src="@/static/logo.png"></image>
-    <view class="text-area">
-      <text class="title">Hello RuoYi</text>
-    </view>
-  </view>
+	<view class="orderPage">
+		<hcCounts @golist="golist"></hcCounts>
+		<!-- sticky 
+<uni-segmented-control :current="current" :values="tabOptions" style-type="text"
+					active-color="#007aff" @clickItem="onClickItem" />-->
+		<!-- <van-sticky :offset-top="140">
+		<van-tabs v-model="searchForm.basetype" @click="tabList(searchForm.basetype)">
+			<van-tab v-for="(item, key) in tabOptions" :key="key" :name="item.name"
+				:title="`${item.name}(${item.num})`"></van-tab>
+		</van-tabs>
+		<!-- </van-sticky>-->
+		<!-- :finished="finished" -->
+		<van-list v-if="showlist" v-model="loading" :immediate-check="false" :error.sync="error"
+			error-text="请求失败,点击重新加载" finished-text="没有更多了~" @load="getList">
+			<view class="list-item" v-for="(item, key) in pcsjList" :key="key" @click="goDetail(item)">
+				<div class="nameTitle">{{ item.name }}</div>
+				<div>{{ item.dkbh }}</div>
+				<div>监测面积:{{ item.dkmj }}</div>
+				<div>核查截止日期:{{ item.jsdw }}</div>
+			</view>
+		</van-list>
+		<!-- <button type="primary" @click="submit">提交</button> -->
+	</view>
 </template>
-
 <script>
-  export default {
-    onLoad: function() {
-    }
-  }
+	//import { Tabs } from "vant";
+	import hcCounts from "./index/common/hcCounts.vue";
+	import {
+		listDkjbxx
+	} from "@/api/dkjbxx.js";
+	export default {
+		name: "list",
+		components: {
+			hcCounts,
+		},
+		data() {
+			return {
+				activeName: "a",
+				searchForm: {},
+				tabOptions: [{
+						name: "待核查",
+						num: 2,
+					},
+					{
+						name: "核查中",
+						num: 1,
+					},
+					{
+						name: "已核查",
+						num: 1,
+					},
+					{
+						name: "已退回",
+						num: 1,
+					},
+				],
+				showlist: false,
+				queryParams: {
+					pageNum: 1,
+					pageSize: 10,
+					time: ["", ""],
+					startTime: "",
+					endTime: "",
+					auditflowList: [],
+					dkmjbs: "",
+					dkmj: "",
+					descValue: "dkmj",
+					dkbh: "",
+					xzqdm: null,
+				},
+				loading: false,
+				pcsjList: [],
+				total: 0,
+			};
+		},
+		onLoad() {
+			// console.log("aaaa", "00s00s");
+			// this.getUser();
+		},
+		created() {
+			console.log("aaZZaa", "00s00s");
+		},
+		mounted() {
+			console.log("aaaa", "00s00s");
+
+		},
+		onReady() {
+			//this.$refs.form.setRules(this.rules)
+		},
+		methods: {
+			golist() {
+				this.showlist = true
+				this.activeName = 'a'
+				console.log("aaaa", "00s00s");
+				//this.getList();
+			},
+			getList() {
+				this.loading = true;
+				console.log("", "00s00s");
+				listDkjbxx(this.queryParams).then((res) => {
+					console.log(res, "00s00s");
+					this.pcsjList = res.rows;
+					this.total = res.total;
+					this.loading = false;
+				});
+			},
+			//跳转到详情页
+			goDetail(value) {
+				uni.setStorage({
+					key: "my_param",
+					data: value,
+					success: () => {
+						uni.switchTab({
+							url: "/pages/check/index",
+						});
+					},
+				});
+				//   uni.navigateTo({
+				//     url: "/pages/check/index?item=" + value,
+				//   });
+			},
+		},
+	};
 </script>
 
-<style>
-  .content {
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    justify-content: center;
-  }
+<style lang="scss">
+	.button {
+		display: flex;
+		align-items: center;
+		height: 35px;
+		line-height: 35px;
+		margin-left: 10px;
+	}
+
+	.orderPage {
+		padding: 30rpx;
+		background: azure;
+		padding-bottom: 50px;
+
+		.list-item {
+			background: #fff;
+			padding: 40rpx 20rpx;
+			border-radius: 20rpx;
+			margin-bottom: 30rpx;
+			position: relative;
 
-  .logo {
-    height: 200rpx;
-    width: 200rpx;
-    margin-top: 200rpx;
-    margin-left: auto;
-    margin-right: auto;
-    margin-bottom: 50rpx;
-  }
+			.nameTitle {
+				color: red;
+				line-height: 50rpx;
+			}
 
-  .text-area {
-    display: flex;
-    justify-content: center;
-  }
 
-  .title {
-    font-size: 36rpx;
-    color: #8f8f94;
-  }
-</style>
+		}
+	}
+</style>

+ 30 - 23
pages/index/index.vue

@@ -8,26 +8,26 @@
 			<van-tab v-for="(item, key) in tabOptions" :key="key" :name="item.name"
 				:title="`${item.name}(${item.num})`"></van-tab>
 		</van-tabs>
-
 		<!--</van-sticky>-->
 		<!-- :finished="finished" -->
-		{{pcsjList}}---
 		<van-list v-model="loading" :immediate-check="false" :error.sync="error" error-text="请求失败,点击重新加载"
 			finished-text="没有更多了~" @load="getList">
 			<view class="list-item" v-for="(item, key) in pcsjList" :key="key" @click="goDetail(item)">
-				<div class="nameTitle">{{ item.name }}</div>
+				
 				<div>{{ item.dkbh }}</div>
 				<div>监测面积:{{ item.dkmj }}</div>
 				<div>核查截止日期:{{ item.jsdw }}</div>
-				<view class="status">{{ item.status }}</view>
+				
 			</view>
 		</van-list>
+		<!-- <button type="primary" @click="submit">提交</button> -->
 	</view>
 </template>
 <script>
+	// import { Tabs } from "vant";
 	import {
-		Button
-	} from "vant";
+		getUserProfile
+	} from "@/api/system/user";
 	import {
 		listDkjbxx
 	} from "@/api/dkjbxx.js";
@@ -73,12 +73,26 @@
 				total: 0,
 			};
 		},
+		onLoad() {
+			// console.log("aaaa", "00s00s");
+			// this.getUser();
+		},
+		created() {
+			console.log("aaZZaa", "00s00s");
+		},
 		mounted() {
 			console.log("aaaa", "00s00s");
 			this.getList();
 		},
-		unmounted() {},
+		onReady() {
+			//this.$refs.form.setRules(this.rules)
+		},
 		methods: {
+			getUser() {
+				getUserProfile().then((response) => {
+					this.user = response.data;
+				});
+			},
 			getList() {
 				this.loading = true;
 				console.log("", "00s00s");
@@ -107,10 +121,14 @@
 		},
 	};
 </script>
-<style scoped lang="scss">
-	page {
-		background: $page-bg-color;
-		height: 100%;
+
+<style lang="scss">
+	.button {
+		display: flex;
+		align-items: center;
+		height: 35px;
+		line-height: 35px;
+		margin-left: 10px;
 	}
 
 	.orderPage {
@@ -125,19 +143,8 @@
 			margin-bottom: 30rpx;
 			position: relative;
 
-			.nameTitle {
-				color: red;
-				line-height: 50rpx;
-			}
 
-			.status {
-				width: 100rpx;
-				height: 100rpx;
-				background: aqua;
-				position: absolute;
-				right: 20rpx;
-				top: 20rpx;
-			}
+		
 		}
 	}
 </style>

+ 1 - 1
pages/login.vue

@@ -3,7 +3,7 @@
     <view class="logo-content align-center justify-center flex">
       <image style="width: 100rpx;height: 100rpx;" :src="globalConfig.appInfo.logo" mode="widthFix">
       </image>
-      <text class="title">若依移动端登录</text>
+      <text class="title">卫片执法图斑核查举证</text>
     </view>
     <view class="login-form-content">
       <view class="input-item flex align-center">

+ 2 - 2
store/modules/user.js

@@ -46,8 +46,8 @@ const user = {
       const uuid = userInfo.uuid
       return new Promise((resolve, reject) => {
         login(username, password, code, uuid).then(res => {
-          setToken(res.token)
-          commit('SET_TOKEN', res.token)
+          setToken(res.data.access_token)
+          commit('SET_TOKEN', res.data.access_token)
           resolve()
         }).catch(error => {
           reject(error)