ソースを参照

修改

branch0222
douzhuo 2年前
コミット
dc63648355
5個のファイルの変更90行の追加44行の削除
  1. +6
    -2
      App.vue
  2. +2
    -2
      manifest.json
  3. +32
    -7
      pages/index/index.vue
  4. +48
    -32
      pages/login/index.vue
  5. +2
    -1
      pages/mine/selectBuilding.vue

+ 6
- 2
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 })
},


+ 2
- 2
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,


+ 32
- 7
pages/index/index.vue ファイルの表示

@@ -63,6 +63,11 @@
</view>
</view>
</view>
<!-- 临期项目提醒 -->
<view class="endworking" v-if="bulidIngObj.daysRemaining <= 60" :class="{sixty: (bulidIngObj.daysRemaining > 15 && bulidIngObj.daysRemaining <= 60), fifteen: bulidIngObj.daysRemaining <= 15}">
您的服务于{{ bulidIngObj.endWorking }}到期,为了避免影响您的使用,请与服务商联系
</view>

<view class="title" v-if="equipmentisshow">设备</view>
<view class="shebenbox" v-if="equipmentisshow">
@@ -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;
}
</style>

+ 48
- 32
pages/login/index.vue ファイルの表示

@@ -1,26 +1,33 @@
<template>
<view>
<view class="head">
<image class="head-immg" src="https://qufang.oss-cn-beijing.aliyuncs.com/zkgj/xcx/login.png" mode=""></image>
<image class="head-immg" src="https://qufang.oss-cn-beijing.aliyuncs.com/zkgj/xcx/login.png" mode="">
</image>
</view>
<view class="input">
<view class="cwjs-cells item-flex">
<view class="cwjs-item center">
<image src="https://qufang.oss-cn-beijing.aliyuncs.com/channelHelper/user.png" class="logo_input">
</image>
<input class="cwjs-item cwjs-input" style="font-size: 36rpx;" v-model="username" placeholder="请输入账号名" type="number" maxlength="11" placeholder-style="color:#AAAAAA"/>
<input class="cwjs-item cwjs-input" style="font-size: 36rpx;" v-model="username"
placeholder="请输入账号名" type="number" maxlength="11" placeholder-style="color:#AAAAAA" />
</view>
</view>
<view class="cwjs-cells item-flex" style="margin-top:13rpx;">
<view class="cwjs-item center">
<image src="https://qufang.oss-cn-beijing.aliyuncs.com/channelHelper/lock.png" class="logo_input">
</image>
<input class="cwjs-item cwjs-input" style="font-size: 36rpx;" placeholder="请输入密码" placeholder-style="color:#AAAAAA" type="password" v-model="password" maxlength="16" v-if="passwordType"/>
<input class="cwjs-item cwjs-input" style="font-size: 36rpx;" placeholder="请输入密码" placeholder-style="color:#AAAAAA" maxlength="16" v-model="password" v-else/>
<input class="cwjs-item cwjs-input" style="font-size: 36rpx;" placeholder="请输入密码"
placeholder-style="color:#AAAAAA" type="password" v-model="password" maxlength="16"
v-if="passwordType" />
<input class="cwjs-item cwjs-input" style="font-size: 36rpx;" placeholder="请输入密码"
placeholder-style="color:#AAAAAA" maxlength="16" v-model="password" v-else />
</view>
<view class="imagesBox" @tap="changeBindPassword">
<image v-if="passwordType==false" src="../../static/images/zhengkai.png" class="images" mode="scaleToFill"></image>
<image v-if="passwordType==true" src="../../static/images/bishang.png" class="images" mode="scaleToFill"></image>
<image v-if="passwordType==false" src="../../static/images/zhengkai.png" class="images"
mode="scaleToFill"></image>
<image v-if="passwordType==true" src="../../static/images/bishang.png" class="images"
mode="scaleToFill"></image>
</view>
</view>
<view class="textbox">
@@ -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;


+ 2
- 1
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=> {


読み込み中…
キャンセル
保存