Commit 1218deff by wjd

Merge branch 'jianxiang' into 'test/96'

Jianxiang

See merge request iot-project-js/doorlock!25
parents 1e252eca df8e14b1
...@@ -75,6 +75,7 @@ ...@@ -75,6 +75,7 @@
"register": "快速注册", "register": "快速注册",
"forgetPassword": "忘记密码", "forgetPassword": "忘记密码",
"failure": "登陆失败", "failure": "登陆失败",
"defaultUser": "用户{0}",
"error": { "error": {
"telNull": "请输入手机号", "telNull": "请输入手机号",
"passWordNull": "请输入密码" "passWordNull": "请输入密码"
...@@ -255,6 +256,7 @@ ...@@ -255,6 +256,7 @@
"name": "昵称:", "name": "昵称:",
"inviteBind": "邀请绑定", "inviteBind": "邀请绑定",
"bindUnlockInfo": "关联开锁信息", "bindUnlockInfo": "关联开锁信息",
"editUsername": "编辑用户昵称",
"opendoorRecord": "历史开门记录", "opendoorRecord": "历史开门记录",
"unbindDialogTip": "<span></span>解绑后,该用户不能对门锁下的信息进行查看", "unbindDialogTip": "<span></span>解绑后,该用户不能对门锁下的信息进行查看",
"deleteUserDialogTip": "删除后,用户对应的开锁id取消关联,同时失去信息查看权限。", "deleteUserDialogTip": "删除后,用户对应的开锁id取消关联,同时失去信息查看权限。",
...@@ -332,7 +334,8 @@ ...@@ -332,7 +334,8 @@
"logoutDialogTip": "确定要退出系统吗?" "logoutDialogTip": "确定要退出系统吗?"
}, },
"editNickname": { "editNickname": {
"nickNameInputTip": "请输入昵称" "nickNameInputTip": "请输入昵称",
"nickNameTypeTip": "请输入中文、字母和数字"
}, },
"editPassword": { "editPassword": {
"newPasswordInputTip": "请输入新密码", "newPasswordInputTip": "请输入新密码",
......
...@@ -75,6 +75,7 @@ ...@@ -75,6 +75,7 @@
"register": "快速注册", "register": "快速注册",
"forgetPassword": "忘记密码", "forgetPassword": "忘记密码",
"failure": "登陆失败", "failure": "登陆失败",
"defaultUser": "用户{0}",
"error": { "error": {
"telNull": "请输入手机号", "telNull": "请输入手机号",
"passWordNull": "请输入密码" "passWordNull": "请输入密码"
...@@ -255,6 +256,7 @@ ...@@ -255,6 +256,7 @@
"name": "昵称:", "name": "昵称:",
"inviteBind": "邀请绑定", "inviteBind": "邀请绑定",
"bindUnlockInfo": "关联开锁信息", "bindUnlockInfo": "关联开锁信息",
"editUsername": "编辑用户昵称",
"opendoorRecord": "历史开门记录", "opendoorRecord": "历史开门记录",
"unbindDialogTip": "<span></span>解绑后,该用户不能对门锁下的信息进行查看", "unbindDialogTip": "<span></span>解绑后,该用户不能对门锁下的信息进行查看",
"deleteUserDialogTip": "删除后,用户对应的开锁id取消关联,同时失去信息查看权限。", "deleteUserDialogTip": "删除后,用户对应的开锁id取消关联,同时失去信息查看权限。",
...@@ -332,7 +334,8 @@ ...@@ -332,7 +334,8 @@
"logoutDialogTip": "确定要退出系统吗?" "logoutDialogTip": "确定要退出系统吗?"
}, },
"editNickname": { "editNickname": {
"nickNameInputTip": "请输入昵称" "nickNameInputTip": "请输入昵称",
"nickNameTypeTip": "请输入中文、字母和数字"
}, },
"editPassword": { "editPassword": {
"newPasswordInputTip": "请输入新密码", "newPasswordInputTip": "请输入新密码",
......
...@@ -49,6 +49,6 @@ export default { ...@@ -49,6 +49,6 @@ export default {
"ringBell_timeout": 300, "ringBell_timeout": 300,
"intervalTime": 3, "intervalTime": 3,
"getHistoryTime": 10, "getHistoryTime": 10,
"audioUrl": "../../resources/audio/tipSound.mp3" "audioUrl": "../../resources/audio/tipSound.mp3",
// "audioUrl": "_www/resources/audio/tipSound.mp3" // "audioUrl": "_www/resources/audio/tipSound.mp3"
} }
\ No newline at end of file
...@@ -91,6 +91,55 @@ uPublic.checkResponseData = function (data) { ...@@ -91,6 +91,55 @@ uPublic.checkResponseData = function (data) {
} }
}; };
// 检查输入文字是否含有特殊字符
uPublic.checkString = function (text){
var pattern = new RegExp("[~!@#$%^&*()_+=|\?/{}<>:;'`]+");
if(!pattern.test(text)){
return false
}else{
return true;
}
}
uPublic.getCompleteDeviceInfo = function iOSbindToUgen(vmobj, inCompleteInfo){
let target = inCompleteInfo.model;
let nickname = target;
let product_id = target;
let deviceInfo = null
console.log("调用SDS云获取设备列表,getSDSDevice.....");
iot.business.device.getList({
data: {
sds: true
},
success: (response) => {
console.log("sds云返回设备数据。。。↓↓");
console.log(response);
response.data.map((item,index)=>{
console.log("展示sds设备...");
console.log(item);
if (item.sn == inCompleteInfo.sn) {
console.log("匹配到了sn一致...");
deviceInfo = {
mac:item.sn,
device_id:item.uuid,
nickname:nickname,
product_id:product_id
};
}
})
},
error: (err) => {
console.log(err);
return false;
},
complete: () => {
}
});
return deviceInfo;
}
uPublic.openWindow = function (params){ uPublic.openWindow = function (params){
console.log("innnnn"); console.log("innnnn");
var wv = plus.webview.create(params.url, params.id, {styles: params.styles || {} }, { IOTData: params.extras }); var wv = plus.webview.create(params.url, params.id, {styles: params.styles || {} }, { IOTData: params.extras });
......
...@@ -159,10 +159,6 @@ function connectButtonTap(self){ ...@@ -159,10 +159,6 @@ function connectButtonTap(self){
if((self.countDownText <= 0) && (self.wifiAddSuccess == false)){ if((self.countDownText <= 0) && (self.wifiAddSuccess == false)){
window.clearInterval(countDown); window.clearInterval(countDown);
addFailue(self); addFailue(self);
// iot.business.sds.stopFindWIFI({
// success: (response) => {},
// error: (error) => {}
// });
iot.business.sds.stopFindDevices({ iot.business.sds.stopFindDevices({
success: (response) => {}, success: (response) => {},
error: (error) => {} error: (error) => {}
...@@ -219,7 +215,8 @@ function connectButtonTap(self){ ...@@ -219,7 +215,8 @@ function connectButtonTap(self){
if (window.iotDebug) { if (window.iotDebug) {
iotDebug.upload(iot,'配网失败'); iotDebug.upload(iot,'配网失败');
} }
uPublic.openRequestErrorAlert(self); self.wifiAddSuccess = true;
addFailue(self);
} }
}); });
iot.business.sds.findDevices({ iot.business.sds.findDevices({
...@@ -232,7 +229,6 @@ function connectButtonTap(self){ ...@@ -232,7 +229,6 @@ function connectButtonTap(self){
if (window.iotDebug) { if (window.iotDebug) {
iotDebug.upload(iot,'找设备'); iotDebug.upload(iot,'找设备');
} }
let productId = defaultConfig.model;
if(response.data == "onJoining"){ if(response.data == "onJoining"){
if(window.iotDebug){ if(window.iotDebug){
iotDebug.push('end: 激活中'+JSON.stringify(response)); iotDebug.push('end: 激活中'+JSON.stringify(response));
...@@ -265,28 +261,7 @@ function connectButtonTap(self){ ...@@ -265,28 +261,7 @@ function connectButtonTap(self){
if (window.iotDebug) { if (window.iotDebug) {
iotDebug.upload(iot,'激活成功'); iotDebug.upload(iot,'激活成功');
} }
let deviceId = response.info.sn; joinedSuccess(self, response);
// unbind(self, deviceId, productId);
bind(self, deviceId, productId);
iot.business.sds.setDeviceStatus({
data: {
uuid: response.info.uuid,
setParams: {
'action': {
'value': 'regiserSuccess'
}
}
},
success: (response) => {
//激活成功
console.log(response);
},
error: (error) => {
console.log(error);
uPublic.openRequestErrorAlert(self);
},
complete(){}
});
}else if(response.data == "fail"){ }else if(response.data == "fail"){
//连接失败 //连接失败
if(window.iotDebug){ if(window.iotDebug){
...@@ -311,7 +286,8 @@ function connectButtonTap(self){ ...@@ -311,7 +286,8 @@ function connectButtonTap(self){
if (window.iotDebug) { if (window.iotDebug) {
iotDebug.upload(iot); iotDebug.upload(iot);
} }
uPublic.openRequestErrorAlert(self); self.activeSuccess = true;
addFailue(self);
} }
}); });
} }
...@@ -326,6 +302,73 @@ function connectButtonTap(self){ ...@@ -326,6 +302,73 @@ function connectButtonTap(self){
// },config.wifi_add_timeout); // },config.wifi_add_timeout);
} }
function joinedSuccess(self, response){
let deviceId = response.info.sn;
let uuid = null;
let productId = defaultConfig.model;
if(response.info.uuid){
uuid = response.info.uuid;
sendDeviceStatus(self, deviceId, productId, uuid);
}else{
let target = response.info.model;
let nickname = target;
let product_id = target;
iot.business.device.getList({
data: {
sds: true
},
success: (response) => {
console.log("sds云返回设备数据。。。↓↓");
console.log(response);
response.data.map((item,index)=>{
console.log("展示sds设备...");
console.log(item);
if (item.sn == deviceId) {
console.log("匹配到了sn一致...");
let deviceInfo = {
mac:item.sn,
device_id:item.uuid,
nickname:nickname,
product_id:product_id
};
uuid = deviceInfo.device_id;
sendDeviceStatus(self, deviceId, productId, uuid);
}
});
},
error: (error) => {
console.log(error);
},
complete: () => {}
});
}
}
function sendDeviceStatus(self, deviceId, productId, uuid){
iot.business.sds.setDeviceStatus({
data: {
uuid: uuid,
setParams: {
'action': {
'value': 'registerSuccess'
}
}
},
success: (response) => {
//激活成功
bind(self, deviceId, productId);
console.log(response);
},
error: (error) => {
console.log(error);
uPublic.openRequestErrorAlert(self);
self.activeSuccess = true;
uComponents.hideProcess(self);
},
complete(){}
});
}
//云端绑定之前先解绑 //云端绑定之前先解绑
function unbind(self, deviceId, productId){ function unbind(self, deviceId, productId){
console.log(deviceId); console.log(deviceId);
...@@ -389,6 +432,7 @@ function bind(self, deviceId, productId){ ...@@ -389,6 +432,7 @@ function bind(self, deviceId, productId){
if (window.iotDebug) { if (window.iotDebug) {
iotDebug.upload(iot,'绑定失败'); iotDebug.upload(iot,'绑定失败');
} }
self.activeSuccess = true;
addFailue(self); addFailue(self);
}, },
complete: () => {} complete: () => {}
......
...@@ -479,6 +479,7 @@ function getDevices(self){ ...@@ -479,6 +479,7 @@ function getDevices(self){
iotDebug.upload(iot,'获取设备信息'); iotDebug.upload(iot,'获取设备信息');
} }
uPublic.openRequestErrorAlert(self); uPublic.openRequestErrorAlert(self);
uComponents.hideLoading(self);
}, },
complete: () => {} complete: () => {}
}); });
...@@ -863,6 +864,15 @@ async function sdsDataPorcessing(self, data){ ...@@ -863,6 +864,15 @@ async function sdsDataPorcessing(self, data){
//远程开门失败 //远程开门失败
setRemoteOpenDoorLoading(self, 2, Vue.t('remoteOpendoor.openDoorFailure'), Vue.t('remoteOpendoor.remoteOpendoorAgain')); setRemoteOpenDoorLoading(self, 2, Vue.t('remoteOpendoor.openDoorFailure'), Vue.t('remoteOpendoor.remoteOpendoorAgain'));
break; break;
case '6':
//远程开门超时
uComponents.openAlert(self, Vue.t('remoteOpendoor.remoteTimeout'), {
text: Vue.t('dialog.confirm'), callback: function () {
self.setValueRemoteOpendoor(false);
self.setRemoteOpendoorDisabledFlag(true);
}
});
break;
} }
break; break;
} }
...@@ -1251,6 +1261,7 @@ function confirmButtonTap(self){ ...@@ -1251,6 +1261,7 @@ function confirmButtonTap(self){
iotDebug.upload(iot,'远程开门密码下发失败'); iotDebug.upload(iot,'远程开门密码下发失败');
} }
uPublic.openRequestErrorAlert(self); uPublic.openRequestErrorAlert(self);
uComponents.hideCommLoading(self);
}, },
complete(){ complete(){
} }
...@@ -1282,6 +1293,7 @@ function confirmButtonTap(self){ ...@@ -1282,6 +1293,7 @@ function confirmButtonTap(self){
error: (error) => { error: (error) => {
console.log(error); console.log(error);
uPublic.openRequestErrorAlert(self); uPublic.openRequestErrorAlert(self);
uComponents.hideCommLoading(self);
} }
}); });
} }
......
...@@ -83,9 +83,13 @@ function initComponentsConfig() { ...@@ -83,9 +83,13 @@ function initComponentsConfig() {
} }
function nameChange(self,text){ function nameChange(self,text){
self.setTextName(text); if(uPublic.checkString(text)){
self.setTextErrorTip(''); self.setTextErrorTip(Vue.t('editNickname.nickNameTypeTip'));
console.log('nameChange: ' + self.textName); }else{
self.setTextName(text);
self.setTextErrorTip('');
console.log('nameChange: ' + self.textName);
}
} }
//tap < //tap <
......
...@@ -92,9 +92,13 @@ function backTap(){ ...@@ -92,9 +92,13 @@ function backTap(){
} }
function nameChange(self,text){ function nameChange(self,text){
self.textName = text; if(uPublic.checkString(text)){
self.setTextErrorTip(null); self.setTextErrorTip(Vue.t('editNickname.nickNameTypeTip'));
console.log('nameChange: ' + self.textName); }else{
self.textName = text;
self.setTextErrorTip(null);
console.log('nameChange: ' + self.textName);
}
} }
//tap 确定 //tap 确定
......
...@@ -149,7 +149,11 @@ function saveTap(self){ ...@@ -149,7 +149,11 @@ function saveTap(self){
} }
function nameChange(self,text){ function nameChange(self,text){
self.textName = text; if(uPublic.checkString(text)){
self.setTextErrorTip(null); self.setTextErrorTip(Vue.t('editNickname.nickNameTypeTip'));
console.log('nameChange: ' + self.textName); }else{
self.textName = text;
self.setTextErrorTip(null);
console.log('nameChange: ' + self.textName);
}
} }
\ No newline at end of file
...@@ -223,7 +223,7 @@ function onTapUserList(self, listIndex) { ...@@ -223,7 +223,7 @@ function onTapUserList(self, listIndex) {
extras: { extras: {
id: self.getUserListData()[listIndex].id, id: self.getUserListData()[listIndex].id,
uuid: self.extras.uuid, uuid: self.extras.uuid,
account: self.getUserListData()[listIndex].account, // account: self.getUserListData()[listIndex].account,
lockId: self.extras.lockId, lockId: self.extras.lockId,
role: self.extras.role role: self.extras.role
} }
......
...@@ -174,28 +174,46 @@ function cloudsLogin(self, id){ ...@@ -174,28 +174,46 @@ function cloudsLogin(self, id){
if (window.iotDebug) { if (window.iotDebug) {
iotDebug.upload(iot,'登陆流程时间'); iotDebug.upload(iot,'登陆流程时间');
} }
console.log(response);
var data = uPublic.checkResponseData(response.data); var data = uPublic.checkResponseData(response.data);
var infoArray = [];
if(data){ if(data){
infoArray.push(['utoken', data.utoken]); //更新tocken userinfo
infoArray.push(['userinfo', data]); iot.business.user.handleLoginSuccess({
iot.business.websql.setMaps(infoArray, () =>{ success: (response) => {
iot.navigator.openWindow({ if(response && data.nickname == '' || data.nickname == null || data.nickname.trim() == ''){
url: '../device/index.html', iot.business.user.setInfo({
id: 'device', data: {
styles: { nickname: Vue.t('login.defaultUser',[data.username.substr(10,3)]),
popGesture: 'none' head: ''
}, },
extras: { success: (response) => {
needClose: true console.log(response);
} },
}); error: (error) => {
}, (error) => { console.log(error);
console.log(error); uPublic.openRequestErrorAlert(self);
}); },
plus.navigator.closeSplashscreen(); complete: () => {
} uComponents.hideLoading(self);
}
});
}
iot.navigator.openWindow({
url: '../device/index.html',
id: 'device',
styles: {
popGesture: 'none'
},
extras: {
needClose: true
}
});
plus.navigator.closeSplashscreen();
},
error: (error) => {
console.log(error);
}
}, response);
}
}, },
error: (error) => { error: (error) => {
console.log(error); console.log(error);
......
...@@ -119,6 +119,10 @@ function backTap(){ ...@@ -119,6 +119,10 @@ function backTap(){
} }
function nicknameChange(self, text){ function nicknameChange(self, text){
self.textNickName = text; if(uPublic.checkString(text)){
self.textErrorTip = ''; self.textErrorTip = Vue.t('editNickname.nickNameTypeTip');
}else{
self.textNickName = text;
self.textErrorTip = '';
}
} }
...@@ -71,15 +71,14 @@ ...@@ -71,15 +71,14 @@
.userInfo-title{ .userInfo-title{
font-size: @USERINFOLINK-TITLE-FONTSIZE; font-size: @USERINFOLINK-TITLE-FONTSIZE;
.text_oneRow_ellipsis(); .text_oneRow_ellipsis();
margin-bottom: 5px;
position: relative; position: relative;
padding-right: 65px; padding-right: 104px;
// > icon // > icon
&:after{ // &:after{
content: '\e6a7'; // content: '\e6a7';
.transformV_center(right,35px); // .transformV_center(right,35px);
.iconfont(@USERINFOLINK-ICON-FONTSIZE); // .iconfont(@USERINFOLINK-ICON-FONTSIZE);
} // }
} }
.userInfo-subtitle{ .userInfo-subtitle{
position: relative; position: relative;
...@@ -104,26 +103,16 @@ ...@@ -104,26 +103,16 @@
display: inline-block; display: inline-block;
color: @USERINFOLINK-INVITEBIND-COLOR; color: @USERINFOLINK-INVITEBIND-COLOR;
font-size: @USERINFOLINK-INVITEBIND-FONTSIZE; font-size: @USERINFOLINK-INVITEBIND-FONTSIZE;
.transform(scale(0.7));
padding: 0 22px 2px;
margin-left: -15px; margin-left: -15px;
&:after{
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 1px;/*no*/
.blue_gradient_border();
}
} }
//解绑 //解绑
.custom-unbind-button{ .custom-unbind-button{
position: absolute; position: absolute;
top: -4px; top: 50%;
margin-left: 6px; bottom: auto;
right: 35px;
.button(72px); .button(72px);
.transform(scale(0.7)); .transform(translateY(-50%) scale(0.7));
padding: 5px 0; padding: 5px 0;
display: inline-block; display: inline-block;
} }
...@@ -138,6 +127,10 @@ ...@@ -138,6 +127,10 @@
} }
} }
} }
.disabled{
color: #ccc;
}
} }
//邀请绑定 //邀请绑定
...@@ -219,51 +212,62 @@ ...@@ -219,51 +212,62 @@
left: 0; left: 0;
width: 100%; width: 100%;
.guideStep1Cont{ .guideStep1Cont{
padding: 13px 0 13px 42px; padding: 25px 0 25px 42px;
position: relative; position: relative;
p{ .userInfo-title{
&:nth-child(1){ font-size: @USERINFOLINK-TITLE-FONTSIZE;
font-size: @USERINFOLINK-TITLE-FONTSIZE; .text_oneRow_ellipsis();
.text_oneRow_ellipsis(); position: relative;
margin-bottom: 5px; padding-right: 104px;
position: relative; }
padding-right: 65px; //管理员头像
// > icon .userInfo-image{
&:after{ width: 27px;
content: '\e6a7'; height: 27px;
.transformV_center(right,35px); margin-right: 14px;
.iconfont(@USERINFOLINK-ICON-FONTSIZE); }
} //绑定/未绑定 头像
} .userInfo-subimage{
&:nth-child(2){ width: 20px;
position: relative; height: 20px;
} margin-right: 9px;
//绑定/未绑定 头像 }
img{
width: 20px; .userInfo-subtitle{
height: 20px; position: relative;
margin-right: 13px; }
} //绑定/未绑定 头像
//邀请绑定 .userInfo-subimage{
span{ width: 20px;
position: absolute; height: 20px;
bottom: 0; margin-right: 9px;
display: inline-block; }
color: @USERINFOLINK-INVITEBIND-COLOR; //昵称
font-size: @USERINFOLINK-INVITEBIND-FONTSIZE; .userInfo-name{
.transform(scale(0.7)); display: inline-block;
padding: 0 22px 2px; vertical-align: middle;
margin-left: -15px; max-width: 145px;
&:after{ .text_oneRow_ellipsis();
content: ''; }
position: absolute; //邀请绑定
bottom: 0; .userInfo-toBind{
left: 0; position: absolute;
right: 0; bottom: 0;
height: 1px;/*no*/ display: inline-block;
.blue_gradient_border(); color: @USERINFOLINK-INVITEBIND-COLOR;
} font-size: @USERINFOLINK-INVITEBIND-FONTSIZE;
} margin-left: -15px;
}
//解绑
.custom-unbind-button{
position: absolute;
top: 50%;
bottom: auto;
right: 35px;
.button(72px);
.transform(translateY(-50%) scale(0.7));
padding: 5px 0;
display: inline-block;
} }
//虚线框 //虚线框
&:after{ &:after{
......
...@@ -705,22 +705,8 @@ p { ...@@ -705,22 +705,8 @@ p {
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
margin-bottom: 0.133rem;
position: relative; position: relative;
padding-right: 1.733rem; padding-right: 2.773rem;
}
.userInfoLink li.userInfo .userInfo-title:after {
content: '\e6a7';
position: absolute;
top: 50%;
right: 0.933rem;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
font-family: iconfont;
font-size: 0.667rem;
-webkit-font-smoothing: antialiased;
line-height: 1;
} }
.userInfoLink li.userInfo .userInfo-subtitle { .userInfoLink li.userInfo .userInfo-subtitle {
...@@ -748,35 +734,22 @@ p { ...@@ -748,35 +734,22 @@ p {
display: inline-block; display: inline-block;
color: #00ffff; color: #00ffff;
font-size: 0.427rem; font-size: 0.427rem;
-webkit-transform: scale(0.7);
transform: scale(0.7);
padding: 0 0.587rem 0.053rem;
margin-left: -0.4rem; margin-left: -0.4rem;
} }
.userInfoLink li.userInfo .userInfo-toBind:after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 1px;
background: -webkit-linear-gradient(left, #242635, #00ffff, #242635);
background: linear-gradient(to right, #242635, #00ffff, #242635);
}
.userInfoLink li.userInfo .custom-unbind-button { .userInfoLink li.userInfo .custom-unbind-button {
position: absolute; position: absolute;
top: -0.107rem; top: 50%;
margin-left: 0.16rem; bottom: auto;
right: 0.933rem;
width: 1.92rem; width: 1.92rem;
border-radius: 0.133rem; border-radius: 0.133rem;
background-color: transparent; background-color: transparent;
border: 1px solid; border: 1px solid;
color: #00ffff; color: #00ffff;
font-size: 0.427rem; font-size: 0.427rem;
-webkit-transform: scale(0.7); -webkit-transform: translateY(-50%) scale(0.7);
transform: scale(0.7); transform: translateY(-50%) scale(0.7);
padding: 0.133rem 0; padding: 0.133rem 0;
display: inline-block; display: inline-block;
} }
...@@ -800,6 +773,10 @@ p { ...@@ -800,6 +773,10 @@ p {
background-color: #50515d; background-color: #50515d;
} }
.userInfoLink .disabled {
color: #ccc;
}
.inviteBind { .inviteBind {
margin: 1.093rem 1.12rem 0; margin: 1.093rem 1.12rem 0;
} }
...@@ -940,64 +917,83 @@ p { ...@@ -940,64 +917,83 @@ p {
} }
.guide-dialog .guideStep1 .guideStep1Cont { .guide-dialog .guideStep1 .guideStep1Cont {
padding: 0.347rem 0 0.347rem 1.12rem; padding: 0.667rem 0 0.667rem 1.12rem;
position: relative; position: relative;
} }
.guide-dialog .guideStep1 .guideStep1Cont p:nth-child(1) { .guide-dialog .guideStep1 .guideStep1Cont .userInfo-title {
font-size: 0.427rem; font-size: 0.427rem;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
margin-bottom: 0.133rem;
position: relative; position: relative;
padding-right: 1.733rem; padding-right: 2.773rem;
} }
.guide-dialog .guideStep1 .guideStep1Cont p:nth-child(1):after { .guide-dialog .guideStep1 .guideStep1Cont .userInfo-image {
content: '\e6a7'; width: 0.72rem;
position: absolute; height: 0.72rem;
top: 50%; margin-right: 0.373rem;
right: 0.933rem; }
-webkit-transform: translateY(-50%);
transform: translateY(-50%); .guide-dialog .guideStep1 .guideStep1Cont .userInfo-subimage {
font-family: iconfont; width: 0.533rem;
font-size: 0.667rem; height: 0.533rem;
-webkit-font-smoothing: antialiased; margin-right: 0.24rem;
line-height: 1;
} }
.guide-dialog .guideStep1 .guideStep1Cont p:nth-child(2) { .guide-dialog .guideStep1 .guideStep1Cont .userInfo-subtitle {
position: relative; position: relative;
} }
.guide-dialog .guideStep1 .guideStep1Cont p img { .guide-dialog .guideStep1 .guideStep1Cont .userInfo-subimage {
width: 0.533rem; width: 0.533rem;
height: 0.533rem; height: 0.533rem;
margin-right: 0.347rem; margin-right: 0.24rem;
}
.guide-dialog .guideStep1 .guideStep1Cont .userInfo-name {
display: inline-block;
vertical-align: middle;
max-width: 3.867rem;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
} }
.guide-dialog .guideStep1 .guideStep1Cont p span { .guide-dialog .guideStep1 .guideStep1Cont .userInfo-toBind {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
display: inline-block; display: inline-block;
color: #00ffff; color: #00ffff;
font-size: 0.427rem; font-size: 0.427rem;
-webkit-transform: scale(0.7);
transform: scale(0.7);
padding: 0 0.587rem 0.053rem;
margin-left: -0.4rem; margin-left: -0.4rem;
} }
.guide-dialog .guideStep1 .guideStep1Cont p span:after { .guide-dialog .guideStep1 .guideStep1Cont .custom-unbind-button {
content: '';
position: absolute; position: absolute;
bottom: 0; top: 50%;
left: 0; bottom: auto;
right: 0; right: 0.933rem;
height: 1px; width: 1.92rem;
background: -webkit-linear-gradient(left, #242635, #00ffff, #242635); border-radius: 0.133rem;
background: linear-gradient(to right, #242635, #00ffff, #242635); background-color: transparent;
border: 1px solid;
color: #00ffff;
font-size: 0.427rem;
-webkit-transform: translateY(-50%) scale(0.7);
transform: translateY(-50%) scale(0.7);
padding: 0.133rem 0;
display: inline-block;
}
.guide-dialog .guideStep1 .guideStep1Cont .custom-unbind-button:active {
background-color: #153D4C;
}
.guide-dialog .guideStep1 .guideStep1Cont .custom-unbind-button.disabled {
background-color: transparent;
color: #999;
} }
.guide-dialog .guideStep1 .guideStep1Cont:after { .guide-dialog .guideStep1 .guideStep1Cont:after {
......
...@@ -29,20 +29,16 @@ ...@@ -29,20 +29,16 @@
<ul class="userInfoLink"> <ul class="userInfoLink">
<li class="userInfo" > <li class="userInfo" >
<img class="userInfo-image" v-if="userInfo.image && userInfo.role == 0" v-bind:src="userInfo.image"> <img class="userInfo-image" v-if="userInfo.image && userInfo.role == 0" v-bind:src="userInfo.image">
<div> <img class="userInfo-subimage" v-if="userInfo.image && userInfo.role != 0" v-bind:src="userInfo.image">
<v-touch tag="p" class="userInfo-title" v-bind:class="{'userInfo-title-disabled': role}" v-on:tap="onEditNameTap">{{ userInfo.title == (null || '') ? $t('doorlockUser.defaultName') : userInfo.title}}</v-touch> <span class="userInfo-title">{{ userInfo.title == (null || '') ? $t('doorlockUser.defaultName') : userInfo.title}}</span>
<p class="userInfo-subtitle"> <u-button :init-param="componentsConfig.bindButton.initParam" class="userInfo-toBind" v-on:u-button-tap="onBindButtonTap" v-show="bindShowFlag && !role"></u-button>
<img class="userInfo-subimage" v-if="userInfo.image && userInfo.role != 0" v-bind:src="userInfo.image"> <u-button :init-param="componentsConfig.unbindButton.initParam" v-on:u-button-tap="onUnbindButtonTap" v-show="(unbindShowFlag && !role && userInfo.role != 0)"></u-button>
<!--<span class="userInfo-name" v-if="userInfo.subtitle">{{ userInfo.subtitle }}</span>-->
<v-touch tag="span" class="userInfo-toBind" v-show="bindShowFlag && !role" v-on:tap="onBindTap">{{ $t('doorlockUser.inviteBind') }}</v-touch>
<u-button :init-param="componentsConfig.unbindButton.initParam" v-on:u-button-tap="onUnbindButtonTap" v-show="(unbindShowFlag && !role && userInfo.role != 0)"></u-button>
</p>
</div>
</li> </li>
<v-touch tag="li" v-on:tap="onBindUnlockInfoTap">{{ $t('doorlockUser.bindUnlockInfo') }}</v-touch> <v-touch tag="li" v-on:tap="onBindUnlockInfoTap">{{ $t('doorlockUser.bindUnlockInfo') }}</v-touch>
<v-touch tag="li" v-on:tap="onOpendoorRecordTap">{{ $t('doorlockUser.opendoorRecord') }}</v-touch> <v-touch tag="li" v-bind:class="[{disabled: isFirstAddUser}]" v-on:tap="onEditNameTap">{{ $t('doorlockUser.editUsername') }}</v-touch>
<v-touch tag="li" v-bind:class="[{disabled: isFirstAddUser}]" v-on:tap="onOpendoorRecordTap">{{ $t('doorlockUser.opendoorRecord') }}</v-touch>
</ul> </ul>
<u-button :init-param="componentsConfig.deleteUserButton.initParam" v-on:u-button-tap="onDeleteUserButtonTap" v-show="!role && userInfo.role != 0"></u-button> <u-button :disabled="isFirstAddUser" :init-param="componentsConfig.deleteUserButton.initParam" v-on:u-button-tap="onDeleteUserButtonTap" v-show="!role && userInfo.role != 0"></u-button>
</div> </div>
<transition name="fade"> <transition name="fade">
<v-touch tag="div" class="unbindState-dialog" v-show="stateShowFlag" v-on:tap="onUnbindStateDialogTap"> <v-touch tag="div" class="unbindState-dialog" v-show="stateShowFlag" v-on:tap="onUnbindStateDialogTap">
...@@ -56,8 +52,11 @@ ...@@ -56,8 +52,11 @@
<transition name="fade"> <transition name="fade">
<div class="guideStep1" v-show="guideStep1ShowFlag"> <div class="guideStep1" v-show="guideStep1ShowFlag">
<div class="guideStep1Cont"> <div class="guideStep1Cont">
<p>我是个用户</p> <img class="userInfo-image" v-if="userInfo.image && userInfo.role == 0" v-bind:src="userInfo.image">
<p><img src="../../resources/image/gray_unbindHead_icon.png">{{ $t('doorlockUser.name') }}<span>{{ $t('doorlockUser.inviteBind') }}</span></p> <img class="userInfo-subimage" v-if="userInfo.image && userInfo.role != 0" v-bind:src="userInfo.image">
<span class="userInfo-title">{{ userInfo.title == (null || '') ? $t('doorlockUser.defaultName') : userInfo.title}}</span>
<u-button :init-param="componentsConfig.bindButton.initParam" class="userInfo-toBind" v-on:u-button-tap="onBindButtonTap" v-show="bindShowFlag && !role"></u-button>
<u-button :init-param="componentsConfig.unbindButton.initParam" v-on:u-button-tap="onUnbindButtonTap" v-show="(unbindShowFlag && !role && userInfo.role != 0)"></u-button>
</div> </div>
<div class="guideStep1Tip"> <div class="guideStep1Tip">
<p>{{ $t('doorlockUser.guideStep1Tip1') }}</p> <p>{{ $t('doorlockUser.guideStep1Tip1') }}</p>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment