Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
蒋秀川
/
miniProject
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4b3204fd
authored
Sep 06, 2022
by
李君
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化
1 parent
05a8d440
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
16 deletions
miniProject/pages/editPwd/editPwd.js
miniProject/pages/editPwd/editPwd.wxml
miniProject/pages/index/mall/index.wxml
miniProject/pages/me/index.js
miniProject/pages/me/index.wxml
miniProject/pages/editPwd/editPwd.js
View file @
4b3204f
...
...
@@ -13,7 +13,16 @@ Page({
navTop
:
App
.
globalData
.
navTop
,
newPwd
:
''
,
newPwd1
:
""
,
oldPwd
:
''
oldPwd
:
''
,
password
:[{
required
:
true
,
message
:
'请输入'
,
trigger
:
'onBlur'
,
validator
:
value
=>
{
return
/^
(?=
.*
[
0-9
])((?=
.*
[
A-Z
])
|
(?=
.*
[
a-z
]))(?=
.*
[^
a-zA-Z0-9
])
.
{8,30}
$/
.
test
(
value
)
},
}]
},
/**
...
...
@@ -23,18 +32,18 @@ Page({
},
onGoBack
:
function
()
{
wx
.
switchTab
({
wx
.
navigateTo
({
url
:
'/pages/me/index'
})
},
inputBlur1
(
e
){
this
.
data
.
oldPwd
=
e
.
detail
.
value
this
.
data
.
oldPwd
=
e
.
detail
},
inputBlur2
(
e
){
this
.
data
.
newPwd
=
e
.
detail
.
value
this
.
data
.
newPwd
=
e
.
detail
},
inputBlur3
(
e
){
this
.
data
.
newPwd1
=
e
.
detail
.
value
this
.
data
.
newPwd1
=
e
.
detail
},
onSubmit
(){
if
(
this
.
data
.
newPwd
&&
this
.
data
.
newPwd1
&&
this
.
data
.
oldPwd
){
...
...
miniProject/pages/editPwd/editPwd.wxml
View file @
4b3204f
...
...
@@ -15,24 +15,27 @@
type='password'
name="原密码"
label="原密码"
required
placeholder="原密码"
bind:
blur
='inputBlur1'
bind:
change
='inputBlur1'
/>
<van-field
type='password'
value="{{newPwd}}"
name="新密码"
required
label="新密码"
placeholder="新密码"
bind:
blur
='inputBlur2'
bind:
change
='inputBlur2'
/>
<van-field
type='password'
value="{{newPwd1}}"
name="确认密码"
required
label="确认密码"
placeholder="确认密码"
bind:
blur
='inputBlur3'
bind:
change
='inputBlur3'
/>
</van-cell-group>
<view style="margin-top: 20rpx;">
...
...
miniProject/pages/index/mall/index.wxml
View file @
4b3204f
...
...
@@ -24,7 +24,7 @@
<view class="mcards ~acea-row" wx:if="{{cardData.length>2}}">
<view class="card" wx:for="{{cardData}}" wx:for-index="index" wx:for-item="item" wx:if="{{index>1}}" wx:key='index'>
<view class="mnum">{{
index}}{{
item.value||'--' }}</view>
<view class="mnum">{{ item.value||'--' }}</view>
<view class="mname">{{ item.name||'--' }}{{item.unit?'('+item.unit+')':''}}</view>
</view>
<!-- <view class="card" wx:if="{{cardData.length>3}}">
...
...
miniProject/pages/me/index.js
View file @
4b3204f
...
...
@@ -30,13 +30,13 @@ Page({
console
.
log
(
e
)
},
inputBlur
(
e
){
this
.
data
.
userForm
.
realName
=
e
.
detail
.
value
this
.
data
.
userForm
.
realName
=
e
.
detail
},
inputBlur2
(
e
){
this
.
data
.
userForm
.
tel
=
e
.
detail
.
value
this
.
data
.
userForm
.
tel
=
e
.
detail
},
inputBlur3
(
e
){
this
.
data
.
userForm
.
email
=
e
.
detail
.
value
this
.
data
.
userForm
.
email
=
e
.
detail
},
getUserInfo
(){
basicApi
.
singleUser
(
wx
.
getStorageSync
(
'uid'
)).
then
(
res
=>
{
...
...
@@ -71,7 +71,7 @@ Page({
})
},
undatePwd
(){
wx
.
reLaunch
({
url
:
'/pages/editPwd/editPwd'
})
wx
.
navigateTo
({
url
:
'/pages/editPwd/editPwd'
})
},
logout
:
()
=>
{
wx
.
getStorageInfo
({
...
...
miniProject/pages/me/index.wxml
View file @
4b3204f
...
...
@@ -27,21 +27,21 @@
name="姓名"
label="姓名"
placeholder="姓名"
bind:
blur
='inputBlur'
bind:
change
='inputBlur'
/>
<van-field
value="{{userForm.tel}}"
name="电话号码"
label="电话号码"
placeholder="电话号码"
bind:
blur
='inputBlur2'
bind:
change
='inputBlur2'
/>
<van-field
value="{{userForm.email}}"
name="邮箱"
label="邮箱"
placeholder="邮箱"
bind:
blur
='inputBlur3'
bind:
change
='inputBlur3'
/>
<van-field
value="{{userForm.roles}}"
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment