Browse Source

天津养老水查查:修改样式

wangfen 4 years ago
parent
commit
9fa22340e2

+ 18 - 13
shuichacha-for-TJ/pages/index/index.js

@@ -18,18 +18,21 @@ Page({
       label: '异常预警',
       label: '异常预警',
       icon: '/static/img/icon_water_abnormal.png',
       icon: '/static/img/icon_water_abnormal.png',
       sonlabel:'用水异常提醒'
       sonlabel:'用水异常提醒'
-    },
-    {
-      id: 'wateranalysis',
-      label: '用水趋势',
-      icon: '/static/img/icon_water_analysis.png',
-      sonlabel:'年度用水趋势'
-    }, {
-      id: 'customermanage',
-      label: '户号管理',
-      icon: '/static/img/btn_hubiao.png',
-      sonlabel:'绑定户号'
-    }],
+     }
+    ],
+    itemsrow:[
+      {
+        id: 'wateranalysis',
+        label: '用水趋势',
+        icon: '/static/img/icon_water_analysis.png',
+        sonlabel:'年度用水趋势'
+      }, {
+        id: 'customermanage',
+        label: '户号管理',
+        icon: '/static/img/btn_hubiao.png',
+        sonlabel:'绑定户号'
+      }
+    ],
     weixinLogin: false,
     weixinLogin: false,
   },
   },
   getPhoneNumber(e) {
   getPhoneNumber(e) {
@@ -148,7 +151,7 @@ Page({
         that.setData({
         that.setData({
           weixinLogin:false
           weixinLogin:false
         })
         })
-      }else{
+      }else if(status===0){  
         that.setData({
         that.setData({
           weixinLogin:true
           weixinLogin:true
         })
         })
@@ -156,8 +159,10 @@ Page({
     })
     })
   },
   },
   onShow() {
   onShow() {
+    let _self=this
     this.getAccountInfo();
     this.getAccountInfo();
     this.isRegister()
     this.isRegister()
+   
   },
   },
   toLogin(msg) {
   toLogin(msg) {
     this.popup && this.popup.setData({
     this.popup && this.popup.setData({

+ 16 - 5
shuichacha-for-TJ/pages/index/index.wxml

@@ -1,10 +1,10 @@
 <!--index.wxml wx:if="{{ !weixinLogin }}"-->
 <!--index.wxml wx:if="{{ !weixinLogin }}"-->
 <view class="container home">
 <view class="container home">
-	<view class="unbind-box" wx:if="{{!userInfo.userNumber && !onQuery}}">
+	<view class="unbind-box" wx:if="{{(!userInfo.userNumber && !onQuery)||weixinLogin==false}}">
 		<image class="unbind-img" src="/static/img/img_no_customer.png"></image>
 		<image class="unbind-img" src="/static/img/img_no_customer.png"></image>
-		<button  class="open-button" wx:if="{{!weixinLogin}}"  open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">点击授权</button>
+		<button  class="open-button" wx:if="{{weixinLogin==false}}"  open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">点击授权</button>
 	</view>
 	</view>
-	<view wx:else class="waterInfo">
+	<view wx:else class="waterInfo waterheight">
 		<block>
 		<block>
 			<view class="dashboard-wrap">
 			<view class="dashboard-wrap">
 				<dashboard params="{{userInfo}}"></dashboard>
 				<dashboard params="{{userInfo}}"></dashboard>
@@ -26,12 +26,23 @@
 		</block>
 		</block>
 	</view>
 	</view>
 	<view class="entrance">
 	<view class="entrance">
-		<view>
+		<view class="boxall">
+			<view class="boxrow">
 			<view class="item" wx:for="{{items}}" wx:key="index" data-item="{{item}}" bindtap="gotopage">
 			<view class="item" wx:for="{{items}}" wx:key="index" data-item="{{item}}" bindtap="gotopage">
 				<image src="{{item.icon}}"></image>
 				<image src="{{item.icon}}"></image>
 				<view class="sonlabel">
 				<view class="sonlabel">
 				<text>{{item.label}}</text>		
 				<text>{{item.label}}</text>		
-				<text >{{item.sonlabel}}</text>
+				<text >{{item.sonlabel}}</text>	
+				</view>
+			</view>
+			</view>
+			<view class="boxrow">
+			<view class="item" wx:for="{{itemsrow}}" wx:key="index" data-item="{{item}}" bindtap="gotopage">
+				<image src="{{item.icon}}"></image>
+				<view class="sonlabel">
+				<text>{{item.label}}</text>		
+				<text >{{item.sonlabel}}</text>	
+				</view>
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>

+ 48 - 16
shuichacha-for-TJ/pages/index/index.wxss

@@ -72,16 +72,21 @@
 }
 }
 
 
 .entrance {
 .entrance {
-  padding: 28rpx 0;
+  /* padding: 28rpx 0; */
   clear: both;
   clear: both;
+  height: 38.4%;
 }
 }
 
 
 .entrance .item {
 .entrance .item {
-  width: 50%;
+  width: 48%;
   display: inline-flex;
   display: inline-flex;
   padding: 28rpx 0;
   padding: 28rpx 0;
-  text-align: center;
-  flex-direction: row
+  /* text-align: center; */
+  flex-direction: row;
+  background: #FFFFFF;
+  box-shadow: 0px 0px 20px 0px rgba(247,250,254,1);
+  border-radius: 12px;
+  align-items: center;
 }
 }
 
 
 .entrance button.item {
 .entrance button.item {
@@ -92,6 +97,7 @@
   width: 80rpx;
   width: 80rpx;
   height: 80rpx;
   height: 80rpx;
   display: block;
   display: block;
+  padding: 5rpx 12rpx;
   margin-left: 1rpx;
   margin-left: 1rpx;
   margin-bottom: 18rpx;
   margin-bottom: 18rpx;
   flex-shrink: 0;
   flex-shrink: 0;
@@ -106,25 +112,51 @@
 }
 }
 .sonlabel{
 .sonlabel{
   margin-left: 10rpx;
   margin-left: 10rpx;
-  padding-left: 10rpx;
-  display: flex;
+  /* padding-left: 10rpx; */
+  /* display: flex; */
   flex-direction: column;
   flex-direction: column;
   justify-content: space-between;
   justify-content: space-between;
 }
 }
 .sonlabel>text:first-child {
 .sonlabel>text:first-child {
-  font-size: 42rpx;
-  color: rgb(1, 1, 12);
-  line-height: 50rpx;
+  font-size: 30rpx;
+  line-height: 42rpx;
   font-weight: bold;
   font-weight: bold;
-  font-family: "PingFang SC","Microsoft YaHei","微软雅黑","Helvetica Neue",Helvetica,"Hiragino Sans GB",Arial,sans-serif;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: 500;
+  color: #686B78;
+  /* -webkit-text-fill-color:transparent; */
 }
 }
 .sonlabel>text:last-child {
 .sonlabel>text:last-child {
-  font-size: 30rpx !important;
+  font-size: 24rpx !important;
   margin-top: 10rpx;
   margin-top: 10rpx;
   padding-top: 10rpx;
   padding-top: 10rpx;
-  padding-left: 10rpx;
-  margin-left: 10rpx;
-  color: rgba(47, 61, 103, 0.404);
-  line-height: 20rpx;
-  font-family: "PingFang SC","Microsoft YaHei","微软雅黑","Helvetica Neue",Helvetica,"Hiragino Sans GB",Arial,sans-serif;
+  /* padding-left: 10rpx;
+  margin-left: 10rpx; */
+  color: rgba(164, 165, 167, 1);
+  line-height: 34rpx;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+}
+.boxitem{
+  display: inline;
+}
+.boxall{
+  display: flex;
+  /* flex-wrap: wrap; */
+  /* align-content: space-between; */
+  flex-wrap: nowrap;
+  align-content: space-between;
+  height: 100%;
+  flex-direction: column;
+  margin: 10rpx;
+  position: relative;
+}
+.boxrow{
+  display: flex;
+  flex-basis: 100%;
+  justify-content: space-between;
+  margin: 10rpx;
+}
+.waterheight{
+  height: 53.4%;
 }
 }