Commit 3302bbd5 by 朱建香

1013

parent 576447a4
...@@ -54,10 +54,11 @@ ...@@ -54,10 +54,11 @@
"userList": "用户列表", "userList": "用户列表",
"doorlockUser": "门锁用户", "doorlockUser": "门锁用户",
"addUser": "添加用户", "addUser": "添加用户",
"editName": "修改名称",
"inviteBind": "邀请绑定", "inviteBind": "邀请绑定",
"unlockInfo": "绑定开锁信息", "unlockInfo": "绑定开锁信息",
"myInfo": "个人信息" "myInfo": "个人信息",
"editNickname": "修改昵称",
"editPassword": "修改密码"
}, },
"guide":{ "guide":{
"footer": "指纹改变生活" "footer": "指纹改变生活"
......
...@@ -24,7 +24,7 @@ function init() { ...@@ -24,7 +24,7 @@ function init() {
bindShowFlag: true, bindShowFlag: true,
unbindShowFlag: false, unbindShowFlag: false,
stateShowFlag: false, stateShowFlag: false,
guideShowFlag: false, guideShowFlag: true,
guideStep1ShowFlag: false, guideStep1ShowFlag: false,
guideStep2ShowFlag: false, guideStep2ShowFlag: false,
guideStep3ShowFlag: false, guideStep3ShowFlag: false,
...@@ -36,8 +36,9 @@ function init() { ...@@ -36,8 +36,9 @@ function init() {
mounted(){ mounted(){
this.extras = iot.navigator.getExtras(); this.extras = iot.navigator.getExtras();
console.log(this.extras); console.log(this.extras);
checkFirstAddUser(this); showGuide(this);
getUserInfo(this); // checkFirstAddUser(this);
// getUserInfo(this);
}, },
methods:{ methods:{
getBindShowFlag(){ getBindShowFlag(){
...@@ -175,22 +176,22 @@ function initComponentsConfig() { ...@@ -175,22 +176,22 @@ function initComponentsConfig() {
} }
//判断是否第一次添加用户 //判断是否第一次添加用户
function checkFirstAddUser(){ function checkFirstAddUser(self){
iot.storage.getMap('isFirstAddUser', (res) => { iot.storage.getMap('isFirstAddUser', (res) => {
if (res) { if (res) {
} else { } else {
//显示引导动画 //显示引导动画
showGuide(); showGuide(self);
} }
}, () => { }, () => {
//显示 引导动画 //显示 引导动画
showGuide(); showGuide(self);
}); });
} }
//显示动画 //显示动画
async function showGuide(){ async function showGuide(self){
try{ try{
let time =await sleep(1000); let time =await sleep(1000);
self.setGuideStep1ShowFlag(true); self.setGuideStep1ShowFlag(true);
...@@ -198,11 +199,11 @@ async function showGuide(){ ...@@ -198,11 +199,11 @@ async function showGuide(){
time = await sleep(1000); time = await sleep(1000);
self.setGuideStep2ShowFlag(true); self.setGuideStep2ShowFlag(true);
time = await sleep(1000); // time = await sleep(1000);
self.setGuideStep3ShowFlag(true), // self.setGuideStep3ShowFlag(true),
//
time = await sleep(1000); // time = await sleep(1000);
self.setGuideStep4ShowFlag(true); // self.setGuideStep4ShowFlag(true);
} }
catch (err){ catch (err){
console.log(err); console.log(err);
...@@ -297,8 +298,9 @@ function deleteUserButtonTap(self){ ...@@ -297,8 +298,9 @@ function deleteUserButtonTap(self){
function nextButtonTap(self){ function nextButtonTap(self){
self.setGuideStep1ShowFlag(false); self.setGuideStep1ShowFlag(false);
self.setGuideStep2ShowFlag(false); self.setGuideStep2ShowFlag(false);
self.setGuideStep3ShowFlag(true);
self.setGuideStep4ShowFlag(true); // self.setGuideStep3ShowFlag(true);
// self.setGuideStep4ShowFlag(true);
} }
//tap 我知道了 //tap 我知道了
......
@import "../public/public.less"; @import "../public/public.less";
@import "../public/header.less"; @import "../public/header.less";
.u-text(); //.u-text();
//
.custom-editNickname-text,.custom-editPassword-text{ //.custom-editNickname-text,.custom-editPassword-text{
input{ // input{
font-size: @CUSTOM-EDITNAMETEXT-COMPONENT-INPUT-FONTSIZE; // font-size: @CUSTOM-EDITNAMETEXT-COMPONENT-INPUT-FONTSIZE;
padding-left: 46px; // padding-left: 46px;
&::-webkit-input-placeholder{ // &::-webkit-input-placeholder{
color: @CUSTOM-TEXT-COMPONENT-INPUT-PLACEHOLDER-COLOR; // color: @CUSTOM-TEXT-COMPONENT-INPUT-PLACEHOLDER-COLOR;
} // }
} // }
//x icon // //x icon
.u-text-clear{ // .u-text-clear{
right: 41px; // right: 41px;
&:before{ // &:before{
content: '\e601'; // content: '\e601';
font-family: iconfont; // font-family: iconfont;
color: @CUSTOM-TEXT-COMPONENT-DEFAULTICON-COLOR; // color: @CUSTOM-TEXT-COMPONENT-DEFAULTICON-COLOR;
font-size: @CUSTOM-EDITNAMETEXT-COMPONENT-DEFAULTICON-FONTSIZE; // font-size: @CUSTOM-EDITNAMETEXT-COMPONENT-DEFAULTICON-FONTSIZE;
} // }
} // }
&:after{ // &:after{
.white_gradient_border(); // .white_gradient_border();
} // }
} //}
.u-button(); .u-button();
...@@ -33,56 +33,56 @@ ...@@ -33,56 +33,56 @@
.buttonPosition(); .buttonPosition();
} }
.editMyInfo{
.editNickname, .editPassword{
font-size: 16px;
padding: 17px 72px 17px 42px;
position: relative;
overflow: hidden;
p{
float: right;
color: #A0A0A7;
font-size: 12px;
margin-top: 3px;
}
// > icon
&:before{
content: '\e6a7';
.transformV_center(right,35px);
.iconfont(@USERINFOLINK-ICON-FONTSIZE);
}
&:after{
content: '';
position: absolute; position: absolute;
top: 44px;
bottom: 0; bottom: 0;
left: 0; left: 0;
height: auto; right: 0;
width: 100%; height: 1px;/*no*/
li{
width: 100%;
height: 55px;
position: relative;
line-height: 55px;
padding: 0 43px;
&:after{
//
.defaultBorder();
.white_gradient_border(); .white_gradient_border();
} }
span{ }
//去掉span
// &:first-child{
// font-size: 16px;
// line-height: 1;
// .flex();
// }
// &:first-child{
// float: right;
// font-family: iconfont;
// font-size: @TEXT-COMPONENT-ICON-FONTSIZE;
// -webkit-font-smoothing: antialiased;
// .transform(rotate(180deg));
// }
// &:last-child{
font-size: 12px;
float: right;
// } .editPassword{
} p{
}
.editPassword{
span{
// &:nth-child(2){
font-family: iconfont; font-family: iconfont;
font-size: @TEXT-COMPONENT-ICON-FONTSIZE;
-webkit-font-smoothing: antialiased;
// }
}
} }
} }
//修改昵称
.u-text();
.inputBox{
margin: 0 42px;
padding-bottom: 40px;
}
.custom-editNickname-text{
.textInput(0,17px,@CUSTOM-EDITTEXT-COMPONENT-INPUT-FONTSIZE);
}
.errorTip{ .errorTip{
position: absolute;
left: 0;
right: 0;
.errorTip(); .errorTip();
} }
\ No newline at end of file
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
<script type="text/javascript" src="../../lib/js/UIOT.js"></script> <script type="text/javascript" src="../../lib/js/UIOT.js"></script>
</head> </head>
<body ontouchstart=""> <body ontouchstart="">
<div id="app" v-cloak> <div id="app" v-cloak>
<div class="header"> <div class="header">
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch> <v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
......
...@@ -37,7 +37,7 @@ function init() { ...@@ -37,7 +37,7 @@ function init() {
bindShowFlag: true, bindShowFlag: true,
unbindShowFlag: false, unbindShowFlag: false,
stateShowFlag: false, stateShowFlag: false,
guideShowFlag: false, guideShowFlag: true,
guideStep1ShowFlag: false, guideStep1ShowFlag: false,
guideStep2ShowFlag: false, guideStep2ShowFlag: false,
guideStep3ShowFlag: false, guideStep3ShowFlag: false,
...@@ -49,8 +49,9 @@ function init() { ...@@ -49,8 +49,9 @@ function init() {
mounted: function mounted() { mounted: function mounted() {
this.extras = _public.iot.navigator.getExtras(); this.extras = _public.iot.navigator.getExtras();
console.log(this.extras); console.log(this.extras);
checkFirstAddUser(this); showGuide(this);
getUserInfo(this); // checkFirstAddUser(this);
// getUserInfo(this);
}, },
methods: { methods: {
...@@ -197,20 +198,20 @@ function initComponentsConfig() { ...@@ -197,20 +198,20 @@ function initComponentsConfig() {
} }
//判断是否第一次添加用户 //判断是否第一次添加用户
function checkFirstAddUser() { function checkFirstAddUser(self) {
_public.iot.storage.getMap('isFirstAddUser', function (res) { _public.iot.storage.getMap('isFirstAddUser', function (res) {
if (res) {} else { if (res) {} else {
//显示引导动画 //显示引导动画
showGuide(); showGuide(self);
} }
}, function () { }, function () {
//显示 引导动画 //显示 引导动画
showGuide(); showGuide(self);
}); });
} }
//显示动画 //显示动画
function showGuide() { function showGuide(self) {
var time; var time;
return _regenerator2.default.async(function showGuide$(_context) { return _regenerator2.default.async(function showGuide$(_context) {
while (1) { while (1) {
...@@ -233,34 +234,26 @@ function showGuide() { ...@@ -233,34 +234,26 @@ function showGuide() {
self.setGuideStep2ShowFlag(true); self.setGuideStep2ShowFlag(true);
_context.next = 11; // time = await sleep(1000);
return _regenerator2.default.awrap(sleep(1000)); // self.setGuideStep3ShowFlag(true),
//
case 11: // time = await sleep(1000);
time = _context.sent; // self.setGuideStep4ShowFlag(true);
self.setGuideStep3ShowFlag(true); _context.next = 14;
_context.next = 15;
return _regenerator2.default.awrap(sleep(1000));
case 15:
time = _context.sent;
self.setGuideStep4ShowFlag(true);
_context.next = 22;
break; break;
case 19: case 11:
_context.prev = 19; _context.prev = 11;
_context.t0 = _context['catch'](0); _context.t0 = _context['catch'](0);
console.log(_context.t0); console.log(_context.t0);
case 22: case 14:
case 'end': case 'end':
return _context.stop(); return _context.stop();
} }
} }
}, null, this, [[0, 19]]); }, null, this, [[0, 11]]);
} }
function sleep(time) { function sleep(time) {
...@@ -344,8 +337,9 @@ function deleteUserButtonTap(self) { ...@@ -344,8 +337,9 @@ function deleteUserButtonTap(self) {
function nextButtonTap(self) { function nextButtonTap(self) {
self.setGuideStep1ShowFlag(false); self.setGuideStep1ShowFlag(false);
self.setGuideStep2ShowFlag(false); self.setGuideStep2ShowFlag(false);
self.setGuideStep3ShowFlag(true);
self.setGuideStep4ShowFlag(true); // self.setGuideStep3ShowFlag(true);
// self.setGuideStep4ShowFlag(true);
} }
//tap 我知道了 //tap 我知道了
......
...@@ -21,17 +21,19 @@ ...@@ -21,17 +21,19 @@
<div id="app" v-cloak> <div id="app" v-cloak>
<div class="header"> <div class="header">
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch> <v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.doorlockUsers') }}</p> <p>{{ $t('title.editNickname') }}</p>
<v-touch tag="span" class="header-right" v-on:tap="onSaveTap">{{ $t('btn.save') }}</v-touch> <v-touch tag="span" class="header-right" v-on:tap="onSaveTap">{{ $t('btn.save') }}</v-touch>
</div> </div>
<div class="content"> <div class="content">
<div class="inputBox">
<u-text :init-param="componentsConfig.nameInput.initParam" :text="textNickName" <u-text :init-param="componentsConfig.nameInput.initParam" :text="textNickName"
v-on:u-text-change="onNicknameChange(arguments[0])"></u-text> v-on:u-text-change="onNicknameChange(arguments[0])"></u-text>
<p class="errorTip" v-if="textErrorTip">{{ textErrorTip }}</p> <p class="errorTip" v-if="textErrorTip">{{ textErrorTip }}</p>
</div>
</div>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog> <u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading> <u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div> </div>
</div>
<script type="text/javascript" src="./editNickname.js" defer async></script> <script type="text/javascript" src="./editNickname.js" defer async></script>
</body> </body>
</html> </html>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<div id="app" v-cloak> <div id="app" v-cloak>
<div class="header"> <div class="header">
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch> <v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.doorlockUsers') }}</p> <p>{{ $t('title.editPassword') }}</p>
<v-touch tag="span" class="header-right" v-on:tap="onSaveTap">{{ $t('btn.save') }}</v-touch> <v-touch tag="span" class="header-right" v-on:tap="onSaveTap">{{ $t('btn.save') }}</v-touch>
</div> </div>
<div class="content"> <div class="content">
......
...@@ -23,16 +23,16 @@ ...@@ -23,16 +23,16 @@
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch> <v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.myInfo') }}</p> <p>{{ $t('title.myInfo') }}</p>
</div> </div>
<ul class="editMyInfo"> <div class="content">
<v-touch tag="li" class="editNickname" v-on:tap="onEditNicknameTap"> <v-touch tag="div" class="editNickname" v-on:tap="onEditNicknameTap">
{{ $t('myInfo.editNickname') }} {{ $t('myInfo.editNickname') }}
<span>{{ nickname }}</span> <p>{{ nickname }}</p>
</v-touch> </v-touch>
<v-touch tag="li" class="editPassword" v-on:tap="onEditPasswordTap"> <v-touch tag="div" class="editPassword" v-on:tap="onEditPasswordTap">
{{ $t('myInfo.editPassword') }} {{ $t('myInfo.editPassword') }}
<span>&#xe655;</span> <p>&#xe63d;&#xe63d;&#xe63d;&#xe63d;&#xe63d;&#xe63d;</p>
</v-touch> </v-touch>
</ul> </div>
<u-button :init-param="componentsConfig.logoutButton.initParam" v-on:u-button-tap="onLogoutButtonTap"></u-button> <u-button :init-param="componentsConfig.logoutButton.initParam" v-on:u-button-tap="onLogoutButtonTap"></u-button>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog> <u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading> <u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
......
...@@ -452,6 +452,97 @@ p { ...@@ -452,6 +452,97 @@ p {
padding-top: 1.173rem; padding-top: 1.173rem;
} }
.u-button {
width: 6.4rem;
color: #fff;
font-size: inherit;
background-color: #007aff;
border-radius: 0.533rem;
text-align: center;
line-height: 1;
margin: 0 auto;
padding: 0.267rem 0;
-webkit-transition: all 0.2s linear;
transition: all 0.2s linear;
background-clip: padding-box;
}
.u-button:active {
background-color: #0065ff;
}
.u-button.disabled {
background-color: #bbb;
}
.custom-button {
width: 7.333rem;
border-radius: 0.133rem;
background-color: transparent;
border: 1px solid;
color: #00ffff;
font-size: 0.427rem;
position: absolute;
bottom: 1.733rem;
left: 0;
right: 0;
}
.custom-button:active {
background-color: #153D4C;
}
.custom-button.disabled {
background-color: transparent;
color: #999;
}
.editNickname,
.editPassword {
font-size: 0.427rem;
padding: 0.453rem 1.92rem 0.453rem 1.12rem;
position: relative;
overflow: hidden;
}
.editNickname p,
.editPassword p {
float: right;
color: #A0A0A7;
font-size: 0.32rem;
margin-top: 0.08rem;
}
.editNickname:before,
.editPassword:before {
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;
}
.editNickname:after,
.editPassword:after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 1px;
background: -webkit-linear-gradient(left, #242635, #fff, #242635);
background: linear-gradient(to right, #242635, #fff, #242635);
}
.editPassword p {
font-family: iconfont;
}
.u-text { .u-text {
width: 100%; width: 100%;
display: table; display: table;
...@@ -544,122 +635,57 @@ p { ...@@ -544,122 +635,57 @@ p {
} }
} }
.custom-editNickname-text input, .inputBox {
.custom-editPassword-text input { margin: 0 1.12rem;
font-size: 0.48rem; padding-bottom: 1.067rem;
padding-left: 1.227rem;
}
.custom-editNickname-text input::-webkit-input-placeholder,
.custom-editPassword-text input::-webkit-input-placeholder {
color: #91929a;
}
.custom-editNickname-text .u-text-clear,
.custom-editPassword-text .u-text-clear {
right: 1.093rem;
}
.custom-editNickname-text .u-text-clear:before,
.custom-editPassword-text .u-text-clear:before {
content: '\e601';
font-family: iconfont;
color: #00ffff;
font-size: 0.533rem;
} }
.custom-editNickname-text:after, .custom-editNickname-text {
.custom-editPassword-text:after { margin-top: 0;
background: -webkit-linear-gradient(left, #242635, #fff, #242635);
background: linear-gradient(to right, #242635, #fff, #242635);
} }
.u-button { .custom-editNickname-text input {
width: 6.4rem; padding-top: 0.453rem;
color: #fff; padding-bottom: 0.453rem;
font-size: inherit; padding-right: 0.667rem;
background-color: #007aff; font-size: 0.427rem;
border-radius: 0.533rem;
text-align: center;
line-height: 1;
margin: 0 auto;
padding: 0.267rem 0;
-webkit-transition: all 0.2s linear;
transition: all 0.2s linear;
background-clip: padding-box;
} }
.u-button:active { .custom-editNickname-text input::-webkit-input-placeholder {
background-color: #0065ff; color: #91929a;
} }
.u-button.disabled { .custom-editNickname-text .u-text-icon {
background-color: #bbb; font-size: 0.64rem;
width: 1.28rem;
padding-left: 0.24rem;
vertical-align: text-bottom;
} }
.custom-button { .custom-editNickname-text .u-text-clear:before,
width: 7.333rem; .custom-editNickname-text .u-text-see:before {
border-radius: 0.133rem; font-family: iconfont;
background-color: transparent;
border: 1px solid;
color: #00ffff; color: #00ffff;
font-size: 0.427rem; font-size: 0.347rem;
position: absolute;
bottom: 1.733rem;
left: 0;
right: 0;
}
.custom-button:active {
background-color: #153D4C;
}
.custom-button.disabled {
background-color: transparent;
color: #999;
} }
.editMyInfo { .custom-editNickname-text .u-text-clear {
position: absolute; right: -0.187rem;
top: 1.173rem;
bottom: 0;
left: 0;
height: auto;
width: 100%;
} }
.editMyInfo li { .custom-editNickname-text .u-text-clear:before {
width: 100%; content: '\e724';
height: 1.467rem;
position: relative;
line-height: 1.467rem;
padding: 0 1.147rem;
} }
.editMyInfo li:after { .custom-editNickname-text:after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 1px;
background: #bbb;
background: -webkit-linear-gradient(left, #242635, #fff, #242635); background: -webkit-linear-gradient(left, #242635, #fff, #242635);
background: linear-gradient(to right, #242635, #fff, #242635); background: linear-gradient(to right, #242635, #fff, #242635);
} }
.editMyInfo li span {
font-size: 0.32rem;
float: right;
}
.editMyInfo .editPassword span {
font-family: iconfont;
font-size: 0.533rem;
-webkit-font-smoothing: antialiased;
}
.errorTip { .errorTip {
position: absolute;
left: 0;
right: 0;
color: #fc2168; color: #fc2168;
font-size: 0.427rem; font-size: 0.427rem;
-webkit-transform: scale(0.7); -webkit-transform: scale(0.7);
......
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