Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
million
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
million
Commits
02f4a3d3
Commit
02f4a3d3
authored
Jul 06, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
41873b4b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
138 additions
and
19 deletions
+138
-19
account.vue
src/pages/usercenter/account.vue
+124
-16
register.vue
src/pages/usercenter/register.vue
+14
-3
No files found.
src/pages/usercenter/account.vue
View file @
02f4a3d3
<
template
>
<q-page>
<div
class=
"account"
>
账号信息 帳戶設定 (
1006186972@qq.com
)
账号信息 帳戶設定 (
{{
accountMsg
.
Account
}}
)
<table>
<tr>
<td>
...
...
@@ -10,25 +10,66 @@
</tr>
<tr>
<td>
姓氏
:
<q-input
filled
name=
"
name1"
v-model=
"B2BUser.name"
class=
"bg-grey-1"
label=
"姓氏
"
/>
姓名
:
<q-input
filled
name=
"
Name"
v-model=
"accountMsg.Name"
class=
"bg-grey-1"
label=
"姓名
"
/>
</td>
<td>
名字:
<q-input
filled
name=
"name2"
v-model=
"B2BUser.name"
class=
"bg-grey-1"
label=
"名字"
/>
<td>
性別:
<q-input
filled
name=
"Sex"
v-model=
"accountMsg.Sex"
class=
"bg-grey-1"
label=
"性別"
/>
</td>
</tr>
<tr>
<td>
生日:
<q-input
filled
name=
"Birthday"
v-model=
"accountMsg.Birthday"
class=
"bg-grey-1"
label=
"生日"
/>
</td>
<td>
电话:
<q-input
filled
name=
"Mobile"
v-model=
"accountMsg.Mobile"
class=
"bg-grey-1"
label=
"电话"
/>
</td>
</tr>
<tr>
<td>
地址:
<q-input
filled
name=
"Address"
v-model=
"accountMsg.Address"
class=
"bg-grey-1"
label=
"地址"
/>
</td>
</tr>
<tr>
<td>
<q-btn
type=
"a"
@
click=
"SaveBasic"
label=
"儲存變更"
/>
</td>
</tr>
</table>
<table>
<tr>
<td>
密碼變更
</td>
</tr>
<tr>
<tr>
<td>
性別
:
<q-input
filled
name=
"
name13"
v-model=
"B2BUser.name"
class=
"bg-grey-1"
label=
"姓氏
"
/>
舊密碼
:
<q-input
filled
name=
"
oldPassword"
v-model=
"updateMsg.oldPassword"
class=
"bg-grey-1"
label=
"舊密碼
"
/>
</td>
<td>
名字:
<q-input
filled
name=
"name23"
v-model=
"B2BUser.name"
class=
"bg-grey-1"
label=
"名字"
/>
<td>
新密碼
<q-input
filled
name=
"Password"
v-model=
"updateMsg.newPassword"
class=
"bg-grey-1"
label=
"新密碼"
/>
</td>
</tr>
<tr>
<td>
再輸入一次新密碼:
<q-input
filled
name=
"SurePassword"
v-model=
"updateMsg.SurePassword"
class=
"bg-grey-1"
label=
"再輸入一次新密碼"
/>
</td>
</tr>
<tr>
<td>
<q-btn
type=
"a"
@
click=
"SavePwd"
label=
"儲存變更"
/>
</td>
</tr>
</table>
</div>
</q-page>
</
template
>
...
...
@@ -37,7 +78,23 @@
props
:
[],
data
()
{
return
{
B2BUser
:
{}
accountMsg
:
{
AccountId
:
0
,
//账号编号
Name
:
""
,
//姓名
Account
:
""
,
//账号
Sex
:
"1"
,
//性别(1-男,2-女)
Birthday
:
""
,
//生日
Password
:
""
,
//密码
SurePwd
:
""
,
//确认密码
Mobile
:
""
,
//联系电话
Address
:
""
,
//地址
},
updateMsg
:
{
AccountId
:
0
,
//账户编号
oldPassword
:
""
,
//旧密码
newPassword
:
""
,
//新密码
SurePassword
:
""
,
//确认密码
}
};
},
created
()
{
...
...
@@ -45,13 +102,64 @@
},
mounted
()
{
if
(
localStorage
.
b2bUser
)
{
this
.
B2BUser
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'b2bUser'
));
var
b2bUser
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'b2bUser'
))
if
(
b2bUser
)
{
this
.
accountMsg
.
AccountId
=
b2bUser
.
accountId
;
this
.
updateMsg
.
AccountId
=
b2bUser
.
accountId
;
this
.
getAccountInfo
();
}
}
},
methods
:
{
getContract
()
{
//获取基础信息
getAccountInfo
()
{
this
.
apipost
(
"b2b_get_GetCustomerAccountService"
,
{
AccountId
:
this
.
accountMsg
.
AccountId
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
var
jsonData
=
res
.
data
.
data
;
this
.
accountMsg
.
Account
=
jsonData
.
Account
;
this
.
accountMsg
.
Address
=
jsonData
.
Address
;
this
.
accountMsg
.
Birthday
=
jsonData
.
Birthday
;
this
.
accountMsg
.
Mobile
=
jsonData
.
Mobile
;
this
.
accountMsg
.
Name
=
jsonData
.
Name
;
this
.
accountMsg
.
Sex
=
jsonData
.
Sex
;
}
},
err
=>
{}
);
},
//保存基础信息
SaveBasic
()
{
this
.
apipost
(
"b2b_post_SetCustomerAccountService"
,
this
.
accountMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
getAccountInfo
();
// var jsonData = JSON.stringify(res.data.data);
// window.localStorage.setItem("b2bUser", jsonData);
}
}
},
err
=>
{}
);
},
//修改密码
SavePwd
()
{
this
.
apipost
(
"b2b_post_ModifyAccountPassowrd"
,
this
.
updateMsg
,
res
=>
{
console
.
log
(
"res"
,
res
.
data
);
if
(
res
.
data
.
resultCode
==
1
)
{
}
},
err
=>
{}
);
},
},
};
...
...
src/pages/usercenter/register.vue
View file @
02f4a3d3
...
...
@@ -39,9 +39,9 @@
<tr>
<td>
*性別
<q-select
filled
v-model=
"registerMsg.Sex"
:options=
"sexArray"
option-label=
"Name"
option-value=
"Id"
<
!--
<
q-select
filled
v-model=
"registerMsg.Sex"
:options=
"sexArray"
option-label=
"Name"
option-value=
"Id"
label=
"性別"
>
</q-select>
</q-select>
-->
</td>
</tr>
<tr>
...
...
@@ -101,7 +101,18 @@
},
methods
:
{
doRegister
()
{
this
.
apipost
(
"b2b_post_SetCustomerAccountService"
,
this
.
registerMsg
,
res
=>
{
console
.
log
(
"res"
,
res
.
data
);
if
(
res
.
data
.
resultCode
==
1
)
{
var
jsonData
=
JSON
.
stringify
(
res
.
data
.
data
);
window
.
localStorage
.
setItem
(
"b2bUser"
,
jsonData
);
this
.
CommonJump
(
'/index'
,
{})
}
},
err
=>
{}
);
}
},
};
...
...
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