From dc63648355c3c99fb92318d9a5aa4f7acb4aa31a Mon Sep 17 00:00:00 2001
From: douzhuo <17611323298@163.com>
Date: Wed, 2 Nov 2022 10:21:39 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 8 +++-
manifest.json | 4 +-
pages/index/index.vue | 39 ++++++++++++++---
pages/login/index.vue | 80 +++++++++++++++++++++--------------
pages/mine/selectBuilding.vue | 3 +-
5 files changed, 90 insertions(+), 44 deletions(-)
diff --git a/App.vue b/App.vue
index 9eb6ec2..a23915a 100644
--- a/App.vue
+++ b/App.vue
@@ -19,12 +19,16 @@
StatusBar: Vue.prototype.StatusBar,
CustomBar: Vue.prototype.CustomBar,
windowHeight: Vue.prototype.windowHeight,
- LOADING: false
+ LOADING: false,
+ bulidIngObj: uni.getStorageSync('buildingID'),
+
};
},
methods: {
-
+ upDateBulidIngObj() {
+ this.bulidIngObj = uni.getStorageSync('buildingID')
+ },
addLookingCount() {
this.$u.post('/user/addLookingCount', { houseId: uni.getStorageSync('buildingID').id })
},
diff --git a/manifest.json b/manifest.json
index d5bfc1e..16c8fd4 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,5 +1,5 @@
{
- "name" : "数智工牌",
+ "name" : "去房智控管家",
"appid" : "__UNI__7A1611D",
"description" : "去房智控管家",
"versionName" : "1.1.0",
@@ -91,7 +91,7 @@
},
"quickapp" : {},
"mp-weixin" : {
- "appid" : "wxe044603515ff2cb5",
+ "appid" : "wx8f883dca5ecc5510",
"setting" : {
"urlCheck" : false,
"es6" : true,
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 7cc8a8e..58de1f5 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -63,6 +63,11 @@
+
+
+
+ 您的服务于{{ bulidIngObj.endWorking }}到期,为了避免影响您的使用,请与服务商联系
+
设备
@@ -312,6 +317,7 @@
onShow() {
+ this.upDateBulidIngObj()
this.LOADING = true
this.getMenu()
@@ -922,13 +928,15 @@
}
.cented-box {
- padding: 30rpx;
+ position: relative;
+ padding: 30rpx 0;
background: #F8F8F8;
width: 100%;
height: 100%;
}
.Switchingbox {
+ padding: 0 30rpx;
width: 100%;
height: 44rpx;
display: flex;
@@ -1034,17 +1042,17 @@
}
.title {
+ margin: 48rpx 0 24rpx;
+ padding: 0 30rpx;
width: 100%;
- height: 30rpx;
font-size: 30rpx;
font-weight: 600;
color: #333333;
- margin-top: 40rpx;
- margin-bottom: 24rpx;
}
.shebenbox {
- width: 100%;
+ margin: 0 auto;
+ width: 690rpx;
height: 156rpx;
background: #FFFFFF;
box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
@@ -1076,7 +1084,8 @@
}
.real-timebox {
- width: 100%;
+ margin: 0 auto;
+ width: 690rpx;
background: #FFFFFF;
box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
border-radius: 12rpx;
@@ -1113,7 +1122,8 @@
}
.commonly-box {
- width: 100%;
+ margin: 0 auto;
+ width: 690rpx;
background: #FFFFFF;
box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
border-radius: 12rpx;
@@ -1147,4 +1157,19 @@
}
}
}
+
+ .endworking {
+ margin-top: 20rpx;
+ padding: 15rpx 30rpx;
+ width: 100%;
+ }
+
+ .sixty {
+ background-color: #FDFCDA;
+ }
+
+ .fifteen {
+ background-color: #F9C8C8;
+ color: #ff0000;
+ }
diff --git a/pages/login/index.vue b/pages/login/index.vue
index a12b5c3..a90958e 100644
--- a/pages/login/index.vue
+++ b/pages/login/index.vue
@@ -1,26 +1,33 @@
-
+
+
-
+
-
-
+
+
-
-
+
+
@@ -41,8 +48,8 @@
export default {
data() {
return {
- username: '',//18831048327 ,18888888800
- password: '',//123456
+ username: '', //18831048327 ,18888888800
+ password: '', //123456
passwordType: true,
agreeChecked: true
};
@@ -65,7 +72,7 @@
},
//密码选择
changeBindPassword: function(e) {
- this.passwordType=!this.passwordType;
+ this.passwordType = !this.passwordType;
},
//登录
bindWxBLogin: function(e) {
@@ -82,7 +89,7 @@
var loginParams = {
loginName: this.username,
password: this.password
- };
+ };
// 请求服务器登录地址,获得会话信息
uni.request({
url: config.service.login,
@@ -92,7 +99,7 @@
method: "POST",
data: loginParams,
success: function(result) {
- var data = result.data;
+ var data = result.data;
//console.log("登陆信息", data);
if (data && data.code == 10000) {
var res = data.data;
@@ -107,7 +114,7 @@
} else {
util.showNone("账号名或密码错误,请重试");
return false;
- }
+ }
// 没有正确响应会话信息
} else {
util.showNone(data.message);
@@ -121,33 +128,41 @@
}
});
},
- getUser(){
+ getUser() {
util.getRequestPromise(config.service.getUser, {}, false, "GET").then(data => {
+ let arr = []
if (data.zkProperties) {
-
+ arr = data.zkProperties.filter(item => item.lockFlag != 1)
+ console.log(arr)
+ if (arr.length !== 0) {
+ let lopan = {
+ id: arr[0].id,
+ name: arr[0].propertyName,
+ ...arr[0],
+ }
+ uni.setStorageSync("fendianindex", 0); //写入缓存
+ uni.setStorageSync("weapp_session_userInfo_data", data); //写入缓存
+ uni.setStorageSync("buildingID", lopan); //项目id写入缓存
+ this.$u.post('/user/addLoginCount', {
+ houseId: arr[0].id
+ })
+ uni.switchTab({
+ url: '/pages/index/index'
+ });
+ } else {
+ util.showNone("当前用户无可用项目!")
+ uni.clearStorageSync(); //清除
+ }
} else {
- data.zkProperties = [{
- id: "",
- propertyName: ''
- }]
- }
- let lopan = {
- id: data.zkProperties[0].id,
- name: data.zkProperties[0].propertyName
+ util.showNone("当前用户无可用项目!")
+ uni.clearStorageSync(); //清除
}
- uni.setStorageSync("fendianindex", 0); //写入缓存
- uni.setStorageSync("weapp_session_userInfo_data", data); //写入缓存
- uni.setStorageSync("buildingID", lopan); //项目id写入缓存
- this.$u.post('/user/addLoginCount', { houseId: data.zkProperties[0].id})
- uni.switchTab({
- url: '/pages/index/index'
- });
});
},
- getMenu(){
+ getMenu() {
this.$u.get("/user/getMenu").then(data => {
uni.setStorageSync("weapp_session_Menu_data", data)
- })
+ })
}
}
};
@@ -224,7 +239,8 @@
width: 750rpx;
height: 500rpx;
position: relative;
- .head-immg{
+
+ .head-immg {
width: 118rpx;
height: 61rpx;
position: absolute;
diff --git a/pages/mine/selectBuilding.vue b/pages/mine/selectBuilding.vue
index a76dabe..3d83595 100644
--- a/pages/mine/selectBuilding.vue
+++ b/pages/mine/selectBuilding.vue
@@ -40,7 +40,8 @@
}
let lopan = {
id: data.id,
- name: data.propertyName
+ name: data.propertyName,
+ ...data
}
uni.setStorageSync("buildingID", lopan);
this.$u.post('/user/addLoginCount', { houseId: data.id}).then(res=> {