Commit 3302bbd5 by 朱建香

1013

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