Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DoorLock
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
朱建香
DoorLock
Commits
6e40dbb7
Commit
6e40dbb7
authored
Sep 30, 2017
by
朱建香
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0930
parent
72c6d16d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
110 additions
and
57 deletions
+110
-57
dev/src/view/device/v_index.js
+8
-3
dev/src/view/myInfo/v_editNickname.js
+45
-5
dev/src/view/myInfo/v_index.js
+29
-4
web/lib/less/myInfo/myInfo.less
+16
-15
web/view/myInfo/index.html
+6
-6
web/view/myInfo/myInfo.css
+6
-24
No files found.
dev/src/view/device/v_index.js
View file @
6e40dbb7
...
@@ -50,6 +50,7 @@ function init() {
...
@@ -50,6 +50,7 @@ function init() {
mounted
(){
mounted
(){
let
self
=
this
;
let
self
=
this
;
iot
.
navigator
.
closeAllBesidesItself
();
iot
.
navigator
.
closeAllBesidesItself
();
//获取设备信息
iot
.
business
.
sds
.
getDevicesByUser
({
iot
.
business
.
sds
.
getDevicesByUser
({
success
:
(
response
)
=>
{
success
:
(
response
)
=>
{
let
data
=
uPublic
.
checkResponseData
(
response
.
data
);
let
data
=
uPublic
.
checkResponseData
(
response
.
data
);
...
@@ -118,6 +119,7 @@ function init() {
...
@@ -118,6 +119,7 @@ function init() {
let
time
=
new
Date
();
let
time
=
new
Date
();
this
.
ringingTime
=
moment
(
time
).
format
(
"HH:mm"
);
this
.
ringingTime
=
moment
(
time
).
format
(
"HH:mm"
);
// getNewOpenDoorRecord(this);
// getNewOpenDoorRecord(this);
},
},
methods
:{
methods
:{
...
@@ -189,7 +191,7 @@ function init() {
...
@@ -189,7 +191,7 @@ function init() {
},
},
//tap 个人信息
//tap 个人信息
onMyInfoTap
(){
onMyInfoTap
(){
myInfoTap
();
myInfoTap
(
this
);
},
},
//tap 门锁管理
//tap 门锁管理
onDoorlockManageTap
(){
onDoorlockManageTap
(){
...
@@ -347,10 +349,13 @@ function getNewOpenDoorRecord(self){
...
@@ -347,10 +349,13 @@ function getNewOpenDoorRecord(self){
}
}
//tap 个人信息
//tap 个人信息
function
myInfoTap
(){
function
myInfoTap
(
self
){
iot
.
navigator
.
openWindow
({
iot
.
navigator
.
openWindow
({
url
:
'../myInfo/'
,
url
:
'../myInfo/'
,
id
:
'myInfo'
id
:
'myInfo'
,
extras
:
{
nickname
:
self
.
nickname
}
});
});
}
}
...
...
dev/src/view/myInfo/v_editNickname.js
View file @
6e40dbb7
...
@@ -16,18 +16,27 @@ function init() {
...
@@ -16,18 +16,27 @@ function init() {
const
app
=
new
Vue
({
const
app
=
new
Vue
({
data
:{
data
:{
//配置组件
//配置组件
textNickName
:
null
,
textNickName
:
iot
.
navigator
.
getExtras
().
nickname
,
textErrorTip
:
'请输入昵称'
,
textErrorTip
:
null
,
componentsConfig
:
initComponentsConfig
()
componentsConfig
:
initComponentsConfig
()
},
},
mounted
(){
mounted
(){
},
},
methods
:{
methods
:{
getTextNickName
(){
return
this
.
textNickName
;
},
setTextNickName
(
text
){
this
.
textNickName
=
this
;
},
onSaveTap
(){
onSaveTap
(){
saveTap
();
saveTap
(
this
);
},
},
onBackTap
(){
onBackTap
(){
backTap
();
backTap
();
},
onNicknameChange
(
text
){
nicknameChange
(
this
,
text
);
}
}
}
}
}).
$mount
(
'#app'
);
}).
$mount
(
'#app'
);
...
@@ -62,12 +71,43 @@ function initComponentsConfig() {
...
@@ -62,12 +71,43 @@ function initComponentsConfig() {
}
}
}
}
//保存昵称
//保存昵称
function
saveTap
(){
function
saveTap
(
self
){
if
(
self
.
textNickName
==
null
||
self
.
textNickName
.
trim
()
==
''
){
self
.
textErrorTip
=
Vue
.
t
(
'editNickname.nickNameInputTip'
);
}
else
{
uComponents
.
showLoading
(
self
);
iot
.
business
.
user
.
setInfo
({
data
:
{
nickname
:
self
.
textNickName
,
head
:
''
,
info
:
{}
},
success
:
(
response
)
=>
{
if
(
response
.
data
=
'success'
){
iot
.
navigator
.
fire
(
plus
.
webview
.
currentWebview
().
opener
(),
'returnPage'
,{
// name: 'zhu'
});
iot
.
navigator
.
back
();
}
},
error
:
(
error
)
=>
{
console
.
log
(
error
);
},
complete
:
()
=>
{
uComponents
.
hideLoading
(
self
);
}
});
}
}
}
//返回上一页
//返回上一页
function
backTap
(){
function
backTap
(){
iot
.
navigator
.
back
();
iot
.
navigator
.
back
();
}
}
function
nicknameChange
(
self
,
text
){
self
.
textNickName
=
text
;
self
.
textErrorTip
=
''
;
}
dev/src/view/myInfo/v_index.js
View file @
6e40dbb7
...
@@ -16,15 +16,21 @@ function init() {
...
@@ -16,15 +16,21 @@ function init() {
const
app
=
new
Vue
({
const
app
=
new
Vue
({
data
:{
data
:{
//配置组件
//配置组件
nick
N
ame
:
'bank'
,
nick
n
ame
:
'bank'
,
componentsConfig
:
initComponentsConfig
()
componentsConfig
:
initComponentsConfig
()
},
},
mounted
(){
mounted
(){
let
self
=
this
;
getInfo
(
this
);
window
.
addEventListener
(
'returnPage'
,
function
(
event
){
console
.
log
(
"in"
);
getInfo
(
self
);
});
},
},
methods
:{
methods
:{
//tap 修改昵称
//tap 修改昵称
onEditNicknameTap
(){
onEditNicknameTap
(){
editNicknameTap
();
editNicknameTap
(
this
);
},
},
//tap 修改密码
//tap 修改密码
onEditPasswordTap
(){
onEditPasswordTap
(){
...
@@ -49,10 +55,13 @@ function initComponentsConfig() {
...
@@ -49,10 +55,13 @@ function initComponentsConfig() {
}
}
//tap 修改昵称
//tap 修改昵称
function
editNicknameTap
(){
function
editNicknameTap
(
self
){
iot
.
navigator
.
openWindow
({
iot
.
navigator
.
openWindow
({
url
:
'../myInfo/editNickname.html'
,
url
:
'../myInfo/editNickname.html'
,
id
:
'editNickname'
id
:
'editNickname'
,
extras
:
{
nickname
:
self
.
nickname
}
});
});
}
}
...
@@ -67,3 +76,19 @@ function editPasswordTap(){
...
@@ -67,3 +76,19 @@ function editPasswordTap(){
function
backTap
(){
function
backTap
(){
iot
.
navigator
.
back
();
iot
.
navigator
.
back
();
}
}
function
getInfo
(
self
){
iot
.
business
.
user
.
getInfo
({
success
:
(
response
)
=>
{
let
data
=
uPublic
.
checkResponseData
(
response
.
data
);
if
(
data
){
console
.
log
(
data
);
self
.
nickname
=
data
.
nickname
;
}
else
{
}
},
error
:
(
error
)
=>
{},
complete
:
()
=>
{}
});
}
web/lib/less/myInfo/myInfo.less
View file @
6e40dbb7
...
@@ -46,30 +46,31 @@
...
@@ -46,30 +46,31 @@
}
}
span{
span{
//去掉span
//去掉span
// &:first-child{
// font-size: 16px;
// line-height: 1;
// .flex();
// }
&:first-child{
&:first-child{
font-size: 16px;
float: right;
line-height: 1;
font-family: iconfont;
.flex();
font-size: @TEXT-COMPONENT-ICON-FONTSIZE;
}
-webkit-font-smoothing: antialiased;
&:nth-child(2){
.transform(rotate(180deg));
font-size: 12px;
line-height: 1;
float: right;
}
}
&:last-child{
&:last-child{
display: block;
font-size: 12px;
//
float: right;
.iconfont(@TEXT-COMPONENT-ICON-FONTSIZE);
.transform(rotate(180deg));
}
}
}
}
}
}
.editPassword{
.editPassword{
span{
span{
&:nth-child(2){
&:nth-child(2){
display: block;
font-family: iconfont;
//
font-size: @TEXT-COMPONENT-ICON-FONTSIZE;
.iconfont(@TEXT-COMPONENT-ICON-FONTSIZE)
;
-webkit-font-smoothing: antialiased
;
}
}
}
}
}
}
...
...
web/view/myInfo/index.html
View file @
6e40dbb7
...
@@ -25,14 +25,14 @@
...
@@ -25,14 +25,14 @@
</div>
</div>
<ul
class=
"editMyInfo"
>
<ul
class=
"editMyInfo"
>
<v-touch
tag=
"li"
class=
"editNickname"
v-on:tap=
"onEditNicknameTap"
>
<v-touch
tag=
"li"
class=
"editNickname"
v-on:tap=
"onEditNicknameTap"
>
<span
>
{{ $t('myInfo.editNickname') }}
</span>
{{ $t('myInfo.editNickname') }}
<span>
{{ nickName }}
</span>
<span>

</span>
<span>

</span>
<span>
{{ nickname }}
</span>
</v-touch>
</v-touch>
<v-touch
tag=
"li"
class=
"editPassword"
v-on:tap=
"onEditPasswordTap"
>
<v-touch
tag=
"li"
class=
"editPassword"
v-on:tap=
"onEditPasswordTap"
>
<span>
{{ $t('myInfo.editPassword') }}
</span>
{{ $t('myInfo.editPassword') }}
<span>

</span>
<span>

</span>
<span>

</span>
<span>

</span>
</v-touch>
</v-touch>
</ul>
</ul>
<u-loading
ref=
"uloading"
:init-param=
"componentsConfig.loading.initParam"
></u-loading>
<u-loading
ref=
"uloading"
:init-param=
"componentsConfig.loading.initParam"
></u-loading>
...
...
web/view/myInfo/myInfo.css
View file @
6e40dbb7
...
@@ -573,13 +573,7 @@ p {
...
@@ -573,13 +573,7 @@ p {
width
:
100%
;
width
:
100%
;
height
:
1.467rem
;
height
:
1.467rem
;
position
:
relative
;
position
:
relative
;
line-height
:
1
;
line-height
:
1.467rem
;
display
:
-webkit-box
;
display
:
-webkit-flex
;
display
:
flex
;
-webkit-box-align
:
center
;
-webkit-align-items
:
center
;
align-items
:
center
;
padding
:
0
1.147rem
;
padding
:
0
1.147rem
;
}
}
...
@@ -596,35 +590,23 @@ p {
...
@@ -596,35 +590,23 @@ p {
}
}
.editMyInfo
li
span
:first-child
{
.editMyInfo
li
span
:first-child
{
font-size
:
0.427rem
;
line-height
:
1
;
flex
:
1
;
}
.editMyInfo
li
span
:nth-child
(
2
)
{
font-size
:
0.32rem
;
line-height
:
1
;
float
:
right
;
float
:
right
;
}
.editMyInfo
li
span
:last-child
{
display
:
block
;
font-family
:
iconfont
;
font-family
:
iconfont
;
font-size
:
0.533rem
;
font-size
:
0.533rem
;
-webkit-font-smoothing
:
antialiased
;
-webkit-font-smoothing
:
antialiased
;
line-height
:
1
;
-webkit-transform
:
rotate
(
180deg
);
-webkit-transform
:
rotate
(
180deg
);
transform
:
rotate
(
180deg
);
transform
:
rotate
(
180deg
);
}
}
.editMyInfo
li
span
:last-child
{
font-size
:
0.32rem
;
float
:
right
;
}
.editMyInfo
.editPassword
span
:nth-child
(
2
)
{
.editMyInfo
.editPassword
span
:nth-child
(
2
)
{
display
:
block
;
font-family
:
iconfont
;
font-family
:
iconfont
;
font-size
:
0.533rem
;
font-size
:
0.533rem
;
-webkit-font-smoothing
:
antialiased
;
-webkit-font-smoothing
:
antialiased
;
line-height
:
1
;
-webkit-transform
:
rotate
(
180deg
);
transform
:
rotate
(
180deg
);
}
}
.errorTip
{
.errorTip
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment