张文飞 %!s(int64=3) %!d(string=hai) anos
pai
achega
54c5a09f8c
Modificáronse 2 ficheiros con 16 adicións e 78 borrados
  1. 13 77
      App.vue
  2. 3 1
      pages/homePage/homePage.vue

+ 13 - 77
App.vue

@@ -1,5 +1,4 @@
 <script>
-	var ekanfang = uni.requireNativePlugin("Ekanfang")
 	export default {
 		onLaunch: function() {
 			let BASE_URL = "";
@@ -45,90 +44,31 @@
 			
 			let plat = uni.getSystemInfoSync().platform;
 			this.globalData.platform = plat
-			// // console.log('App Launch')
-			// #ifdef APP-VUE
-			var self = this
-			
 			let userInfo = uni.getStorageSync('userInfo');//获得保存在本地的用户信息
-			if(userInfo){//有数据,已登录
-				let roleMenulList = userInfo.roleMenuList
-				this.reloadMeunStatus(roleMenulList);
-			}else{
-				//不存在则跳转登录页
-				uni.reLaunch({
-					url: "/pages/loginPage/index",
-					success: () => {
-						//跳转完页面后再关闭启动页
-						plus.navigator.closeSplashscreen();
-					}
-				})
-			}
-			// #endif
-           
 		},
 		onShow: function() {
-			// console.log("App onshow")
-			document.body.style.setProperty("background-color",this.globalData.backgorundThemeColor)
+			document.body.style.setProperty("background-color",this.globalData.color4)
 		},
 		onHide: function() {
-			// console.log('App Hide')
+
 		},
 		methods: {
-			
-			reloadMeunStatus(roleMenulList) {
-				var self = this
-				if(roleMenulList.length>0){
-				  let menuCode = roleMenulList[0].menuCode
-				  if (menuCode == 100){
-					plus.navigator.closeSplashscreen();
-				  }else if (menuCode == 200) {
-					plus.navigator.closeSplashscreen();
-					uni.reLaunch({
-						url:'./pages/loginsuccess/loginSuccess',
-					})
-				  } else if (menuCode == 300) {
-					plus.navigator.closeSplashscreen();
-					uni.reLaunch({
-						url:'./pages/mine/mine',
-					})
-				  }
-				}
-			},
 			getThemeInfo() {
-				// console.log("调用了")
-				let self = this;
-				uni.getStorage({ //获得保存在本地的用户信息
-					key: 'userInfo',
-					success: (res) => {
-						if (res.data) {
-							//存在则关闭启动页进入首页
-							if (res.data.hasOwnProperty('theme') && null != res.data.theme) {
-								let theme = JSON.parse(res.data.theme);
-								self.globalData.themeColor = theme.themeColor;
-								self.globalData.fuzhuColor = theme.fuzhuColor;
-								self.globalData.fuzhuColor15 = theme.fuzhuColor15;
-								self.globalData.themeColor50 = theme.themeColor50;
-								self.globalData.themeColor25 = theme.themeColor25;
-								self.globalData.fuzhuColor50 = theme.fuzhuColor50;
-								self.globalData.backgorundThemeColor = theme.backgorundThemeColor
-							}
-							self.globalData.token = res.data.token;
-						}
-					},
-				});
-
+			
 			}
 		},
 		globalData: {
 			token: "",
-			themeColor: "#3CD9D9",
-			fuzhuColor: "#FEC350",
-			fuzhuColor15: "#FFF6E5",
-			themeColor50: "#9DECEC",
-			themeColor25: "#CEF6F6",
-			fuzhuColor50: "#FEE1A7",
-			backgorundThemeColor:"#F1F5F9",
-			unReadNumTotal:0,
+			color1: "#F07423",
+			color2: "#FD8F3C",
+			color3: "#FFC444",
+			color4: "#F5F5F7",
+			color5: "#F7A98E",
+			color6: "#FFF4EB",
+			color7:"#F8BA91",
+			color8:"#FFF4EB",
+			color9:"#8B654D",
+			color10:"#FCF6F1",
 			BASE_URL:"https://dm-api.elab-plus.cn",//默认环境
 		}
 	}
@@ -138,9 +78,5 @@
 	/*每个页面公共css */
 	/* #ifndef APP-NVUE */
 	@import url("./static/font/iconfont.css");
-	page {
-		background-color: #F4F7F7;
-	}
-
 	/* #endif */
 </style>

+ 3 - 1
pages/homePage/homePage.vue

@@ -27,7 +27,9 @@
 <script>
 	export default {
 		data() {
-
+           return{
+			   
+		   }
 		},
 		mounted() {