Commit 6f160b2d by 朱建香

#21特殊字符判断

#22用户添加跳转到用户详情页面修改
#19用户默认名称更改
parent 88e2d434
...@@ -75,6 +75,7 @@ ...@@ -75,6 +75,7 @@
"register": "快速注册", "register": "快速注册",
"forgetPassword": "忘记密码", "forgetPassword": "忘记密码",
"failure": "登陆失败", "failure": "登陆失败",
"defaultUser": "user{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,16 @@ uPublic.checkResponseData = function (data) { ...@@ -91,6 +91,16 @@ uPublic.checkResponseData = function (data) {
} }
}; };
// 检查输入文字是否含有特殊字符
uPublic.checkString = function (text){
var pattern = new RegExp("[~!@#$%^&*()_+=|\?/{}<>:;'`]+");
if(!pattern.test(text)){
return false
}else{
return true;
}
}
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 });
......
...@@ -83,9 +83,13 @@ function initComponentsConfig() { ...@@ -83,9 +83,13 @@ function initComponentsConfig() {
} }
function nameChange(self,text){ function nameChange(self,text){
if(uPublic.checkString(text)){
self.setTextErrorTip(Vue.t('editNickname.nickNameTypeTip'));
}else{
self.setTextName(text); self.setTextName(text);
self.setTextErrorTip(''); self.setTextErrorTip('');
console.log('nameChange: ' + self.textName); 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){
if(uPublic.checkString(text)){
self.setTextErrorTip(Vue.t('editNickname.nickNameTypeTip'));
}else{
self.textName = text; self.textName = text;
self.setTextErrorTip(null); self.setTextErrorTip(null);
console.log('nameChange: ' + self.textName); console.log('nameChange: ' + self.textName);
}
} }
//tap 确定 //tap 确定
......
...@@ -42,7 +42,6 @@ function init() { ...@@ -42,7 +42,6 @@ function init() {
getUserInfo(self); getUserInfo(self);
}); });
getUserInfo(this); getUserInfo(this);
checkFirstAddUser(this);
}, },
methods:{ methods:{
getBindShowFlag(){ getBindShowFlag(){
...@@ -109,12 +108,9 @@ function init() { ...@@ -109,12 +108,9 @@ function init() {
onBackTap(){ onBackTap(){
backTap(); backTap();
}, },
onEditNameTap(){
editNameTap(this);
},
//tap 邀请绑定 //tap 邀请绑定
onBindTap(){ onBindButtonTap(){
bindTap(this); bindButtonTap(this);
}, },
//tap 解绑 //tap 解绑
onUnbindButtonTap(){ onUnbindButtonTap(){
...@@ -124,6 +120,10 @@ function init() { ...@@ -124,6 +120,10 @@ function init() {
onBindUnlockInfoTap(){ onBindUnlockInfoTap(){
bindUnlockInfoTap(this); bindUnlockInfoTap(this);
}, },
//tap 编辑用户昵称
onEditNameTap(){
editNameTap(this);
},
//tap 历史开门记录 //tap 历史开门记录
onOpendoorRecordTap(){ onOpendoorRecordTap(){
opendoorRecordTap(this); opendoorRecordTap(this);
...@@ -150,6 +150,27 @@ function init() { ...@@ -150,6 +150,27 @@ function init() {
//配置组件参数 //配置组件参数
function initComponentsConfig() { function initComponentsConfig() {
return { return {
//绑定 button 参数
bindButton: {
initParam: {
class: 'custom-unbind-button',
text: Vue.t('doorlockUser.inviteBind')
}
},
//解绑 button 参数
unbindButton: {
initParam: {
class: 'custom-unbind-button',
text: Vue.t('btn.unbind')
}
},
//解绑 button 参数
unbindButton: {
initParam: {
class: 'custom-unbind-button',
text: Vue.t('btn.unbind')
}
},
//解绑 button 参数 //解绑 button 参数
unbindButton: { unbindButton: {
initParam: { initParam: {
...@@ -209,22 +230,31 @@ function checkFirstAddUser(self){ ...@@ -209,22 +230,31 @@ function checkFirstAddUser(self){
//显示动画 //显示动画
async function showGuide(self){ async function showGuide(self){
self.setGuideShowFlag(true); self.setGuideShowFlag(true);
let time = null
console.log(self.userInfo.role);
if(self.userInfo.role == 0){
try{ try{
let time =await sleep(1000); time = await sleep(1000);
self.setGuideStep3ShowFlag(true),
time = await sleep(1000);
self.setGuideStep4ShowFlag(true);
}
catch (err){
console.log(err);
}
}else{
try{
time =await sleep(1000);
self.setGuideStep1ShowFlag(true); self.setGuideStep1ShowFlag(true);
time = await sleep(1000); time = await sleep(1000);
self.setGuideStep2ShowFlag(true); self.setGuideStep2ShowFlag(true);
// time = await sleep(1000);
// self.setGuideStep3ShowFlag(true),
//
// time = await sleep(1000);
// self.setGuideStep4ShowFlag(true);
} }
catch (err){ catch (err){
console.log(err); console.log(err);
} }
}
} }
async function nextGuide(self){ async function nextGuide(self){
...@@ -261,6 +291,7 @@ function getUserInfo(self){ ...@@ -261,6 +291,7 @@ function getUserInfo(self){
if(data){ if(data){
self.setInfo(data); self.setInfo(data);
setUserInfo(self, data); setUserInfo(self, data);
checkFirstAddUser(self);
}else{} }else{}
}, },
...@@ -310,9 +341,9 @@ function backTap(){ ...@@ -310,9 +341,9 @@ function backTap(){
iot.navigator.aback(); iot.navigator.aback();
} }
//修改用户名 //tap 编辑用户昵
function editNameTap(self){ function editNameTap(self){
if(!self.role){ if(!self.role && self.getUnbindShowFlag()){
iot.navigator.openWindow({ iot.navigator.openWindow({
url: './editName.html', url: './editName.html',
id: 'editName', id: 'editName',
...@@ -327,7 +358,7 @@ function editNameTap(self){ ...@@ -327,7 +358,7 @@ function editNameTap(self){
} }
//tap 邀请绑定 //tap 邀请绑定
function bindTap(self){ function bindButtonTap(self){
iot.navigator.openWindow({ iot.navigator.openWindow({
url: './inviteBind.html', url: './inviteBind.html',
id: 'inviteBind', id: 'inviteBind',
...@@ -428,6 +459,7 @@ function bindUnlockInfoTap(self){ ...@@ -428,6 +459,7 @@ function bindUnlockInfoTap(self){
//tap 历史开门记录 //tap 历史开门记录
function opendoorRecordTap(self){ function opendoorRecordTap(self){
if(self.getUnbindShowFlag()){
iot.navigator.openWindow({ iot.navigator.openWindow({
url: '../device/opendoorRecord.html', url: '../device/opendoorRecord.html',
id: 'opendoorRecord', id: 'opendoorRecord',
...@@ -436,6 +468,7 @@ function opendoorRecordTap(self){ ...@@ -436,6 +468,7 @@ function opendoorRecordTap(self){
deviceId: self.getInfo().device_id deviceId: self.getInfo().device_id
} }
}); });
}
} }
//tap 删除该用户 //tap 删除该用户
......
...@@ -149,7 +149,11 @@ function saveTap(self){ ...@@ -149,7 +149,11 @@ function saveTap(self){
} }
function nameChange(self,text){ function nameChange(self,text){
if(uPublic.checkString(text)){
self.setTextErrorTip(Vue.t('editNickname.nickNameTypeTip'));
}else{
self.textName = text; self.textName = text;
self.setTextErrorTip(null); self.setTextErrorTip(null);
console.log('nameChange: ' + self.textName); 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
} }
......
...@@ -178,6 +178,27 @@ function cloudsLogin(self, id){ ...@@ -178,6 +178,27 @@ function cloudsLogin(self, id){
var data = uPublic.checkResponseData(response.data); var data = uPublic.checkResponseData(response.data);
var infoArray = []; var infoArray = [];
if(data){ if(data){
//判断是否有昵称
if(data.nickname == '' || data.nickname.trim() == ''){
iot.business.user.setInfo({
data: {
nickname: Vue.t('login.defaultUser',[data.username.substr(10,3)]),
head: ''
},
success: (response) => {
if(response.data = 'success'){
iot.navigator.aback();
}
},
error: (error) => {
console.log(error);
uPublic.openRequestErrorAlert(self);
},
complete: () => {
uComponents.hideLoading(self);
}
});
}
infoArray.push(['utoken', data.utoken]); infoArray.push(['utoken', data.utoken]);
infoArray.push(['userinfo', data]); infoArray.push(['userinfo', data]);
iot.business.websql.setMaps(infoArray, () =>{ iot.business.websql.setMaps(infoArray, () =>{
......
...@@ -119,6 +119,10 @@ function backTap(){ ...@@ -119,6 +119,10 @@ function backTap(){
} }
function nicknameChange(self, text){ function nicknameChange(self, text){
if(uPublic.checkString(text)){
self.textErrorTip = Vue.t('editNickname.nickNameTypeTip');
}else{
self.textNickName = text; self.textNickName = text;
self.textErrorTip = ''; 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();
margin-bottom: 5px;
position: relative; position: relative;
padding-right: 65px; padding-right: 104px;
// > icon
&:after{
content: '\e6a7';
.transformV_center(right,35px);
.iconfont(@USERINFOLINK-ICON-FONTSIZE);
} }
//管理员头像
.userInfo-image{
width: 27px;
height: 27px;
margin-right: 14px;
} }
&:nth-child(2){ //绑定/未绑定 头像
.userInfo-subimage{
width: 20px;
height: 20px;
margin-right: 9px;
}
.userInfo-subtitle{
position: relative; position: relative;
} }
//绑定/未绑定 头像 //绑定/未绑定 头像
img{ .userInfo-subimage{
width: 20px; width: 20px;
height: 20px; height: 20px;
margin-right: 13px; margin-right: 9px;
}
//昵称
.userInfo-name{
display: inline-block;
vertical-align: middle;
max-width: 145px;
.text_oneRow_ellipsis();
} }
//邀请绑定 //邀请绑定
span{ .userInfo-toBind{
position: absolute; position: absolute;
bottom: 0; bottom: 0;
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{
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>
<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>
<p class="userInfo-subtitle">
<img class="userInfo-subimage" v-if="userInfo.image && userInfo.role != 0" v-bind:src="userInfo.image"> <img class="userInfo-subimage" v-if="userInfo.image && userInfo.role != 0" v-bind:src="userInfo.image">
<!--<span class="userInfo-name" v-if="userInfo.subtitle">{{ userInfo.subtitle }}</span>--> <span class="userInfo-title">{{ userInfo.title == (null || '') ? $t('doorlockUser.defaultName') : userInfo.title}}</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.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> <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: bindShowFlag}]" v-on:tap="onEditNameTap">{{ $t('doorlockUser.editUsername') }}</v-touch>
<v-touch tag="li" v-bind:class="[{disabled: bindShowFlag}]" 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="bindShowFlag" :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