Quellcode durchsuchen

水查查智慧养老:修改登录页

wangfen vor 4 Jahren
Ursprung
Commit
0844dc042a

+ 12 - 16
shuichacha-for-TJ/pages/index/index.js

@@ -11,27 +11,23 @@ Page({
       id: 'realtimewater',
       label: '用水量',
       icon: '/static/img/icon-water.png',
-      url: '?period=7'
-    }, {
-      id: 'waterprice',
-      label: '水价查询',
-      icon: '/static/img/icon_water_price.png'
-    }, {
-      id: 'payment',
-      label: '缴费',
-      icon: '/static/img/icon-payment.png'
+      url: '?period=7',
+      sonlabel:'近期用水量'
     }, {
       id: 'wateranalysis',
       label: '用水趋势',
-      icon: '/static/img/icon_water_analysis.png'
+      icon: '/static/img/icon_water_analysis.png',
+      sonlabel:'年度用水趋势'
     }, {
       id: 'waterabnormal',
       label: '异常预警',
-      icon: '/static/img/icon_water_abnormal.png'
+      icon: '/static/img/icon_water_abnormal.png',
+      sonlabel:'用水异常提醒'
     }, {
       id: 'customermanage',
       label: '户号管理',
-      icon: '/static/img/icon_customer_manage.png'
+      icon: '/static/img/icon_customer_manage.png',
+      sonlabel:'绑定户号'
     }],
     weixinLogin: false,
   },
@@ -51,7 +47,7 @@ Page({
           const {
             code
           } = res;
-          app.$http.postForm('/user/bindingMobile', {
+          app.$http.postForm('/appletUser/bindingMobile', {
             code,
             encryptedData,
             iv
@@ -145,7 +141,7 @@ Page({
   // 获取用户注册状态 /user/getUser 
   isRegister(){
     let that=this;
-    app.$http.postForm('/user/getUser').then(({ status, msg, data }) => {
+    app.$http.postForm('/appletUser/getUser').then(({ status, msg, data }) => {
       // 已授权但客户不存在
       // 未授权
       if(status===-602){
@@ -160,7 +156,7 @@ Page({
     })
   },
   onShow() {
-    this.getAccountInfo();
+    //this.getAccountInfo();
     this.isRegister()
   },
   toLogin(msg) {
@@ -176,7 +172,7 @@ Page({
     this.popup.close();
   },
   confirmEvent: function () {
-    this.getAccountInfo(true);
+    // this.getAccountInfo(true);
   },
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 4 - 1
shuichacha-for-TJ/pages/index/index.wxml

@@ -29,7 +29,10 @@
 		<view>
 			<view class="item" wx:for="{{items}}" wx:key="index" data-item="{{item}}" bindtap="gotopage">
 				<image src="{{item.icon}}"></image>
-				<text>{{item.label}}</text>
+				<view class="sonlabel">
+				<text>{{item.label}}</text>		
+				<text >{{item.sonlabel}}</text>
+				</view>
 			</view>
 		</view>
 	</view>

+ 30 - 4
shuichacha-for-TJ/pages/index/index.wxss

@@ -77,10 +77,11 @@
 }
 
 .entrance .item {
-  width: 33.33%;
-  display: inline-block;
+  width: 50%;
+  display: inline-flex;
   padding: 28rpx 0;
   text-align: center;
+  flex-direction: row
 }
 
 .entrance button.item {
@@ -91,14 +92,39 @@
   width: 80rpx;
   height: 80rpx;
   display: block;
-  margin: auto;
+  margin-left: 1rpx;
   margin-bottom: 18rpx;
   flex-shrink: 0;
 }
 
 .entrance .item text {
-  font-size: 24rpx;
+  font-size: 46rpx;
   display: block;
   color: rgba(104, 107, 120, 1);
   line-height: 34rpx;
+  font-family: sans-serif
+}
+.sonlabel{
+  margin-left: 10rpx;
+  padding-left: 10rpx;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+}
+.sonlabel>text:first-child {
+  font-size: 42rpx;
+  color: rgb(1, 1, 12);
+  line-height: 50rpx;
+  font-weight: bold;
+  font-family: "PingFang SC","Microsoft YaHei","微软雅黑","Helvetica Neue",Helvetica,"Hiragino Sans GB",Arial,sans-serif;
+}
+.sonlabel>text:last-child {
+  font-size: 30rpx !important;
+  margin-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;
 }

+ 1 - 3
shuichacha-for-TJ/pages/login/index.js

@@ -27,9 +27,7 @@ Page({
           msg
         }) => {
           if (status == 0) {
-            const {
-              token
-            } = data;
+            const token= data;
             app.getUserInfo(token);
             app.isLogin = true;
             toHomePage();

+ 3 - 2
shuichacha-for-TJ/utils/http.js

@@ -1,8 +1,8 @@
 // 本地环境
 // const $perfix = 'http://localhost:8090';
-
+const $perfix = 'http://192.168.0.115:8099';
 // 测试环境
-const $perfix = 'http://114.135.61.188:58082';
+// const $perfix = 'http://114.135.61.188:58082';
 
 // 演示环境
 // const $perfix = 'https://water.zoniot.com'; 
@@ -17,6 +17,7 @@ const toLogin = (status = 0) => {
   getApp().token = '';
 };
 const httpFun = (url, data, type, isForm) => {
+  
   let token = getApp().token || wx.getStorageSync('token');
   return new Promise(resolve => {
     const filterUrl = [