Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.com
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
wechatapp.shangjiadao.com
Commits
de36c86f
Commit
de36c86f
authored
Jun 19, 2019
by
sujie@126.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lvtz3' of git.server:wangxuelai/wechatapp.shangjiadao.com into sj-dev-v3
parents
bbcd9cbf
0a9a96d8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
133 deletions
+80
-133
findpsd.js
business/pages/loginregistermgt/findpsd.js
+22
-71
findpsd.wxml
business/pages/loginregistermgt/findpsd.wxml
+4
-5
register.js
business/pages/loginregistermgt/register.js
+26
-57
register.wxml
business/pages/loginregistermgt/register.wxml
+4
-0
form.wxss
business/pages/loginregistermgt/style/form.wxss
+24
-0
No files found.
business/pages/loginregistermgt/findpsd.js
View file @
de36c86f
...
...
@@ -3,12 +3,6 @@ import messages from '../../../constants/messages.js';
import
{
LocalStorage
}
from
'../../../utilities/index.js'
;
// import {
// getVerifyCode,
// } from '../../../service/business/register.js';
// import {
// resetPassword
// } from '../../../service/business/common.js';
import
{
getVerifyCode
,
...
...
@@ -17,11 +11,9 @@ import {
var
app
=
getApp
();
Page
({
data
:
{
text
:
"This is page data."
,
imageRoot
:
app
.
globalData
.
imageRoot
,
imageVersion
:
app
.
globalData
.
imageVersion
,
localImageRoot
:
'../../../images/'
,
mobileWrong
:
true
,
params
:
{
mobile
:
''
,
verify_code
:
''
,
...
...
@@ -33,7 +25,8 @@ Page({
sending
:
false
,
hasSend
:
false
,
submitting
:
false
,
is_pwd
:
true
is_pwd
:
true
,
warnTip
:
''
},
onLoad
:
function
(
options
)
{
// Do some initialize when page load.
wx
.
hideShareMenu
()
...
...
@@ -58,15 +51,6 @@ Page({
},
mobileInput
(
e
)
{
const
{
value
}
=
e
.
detail
;
// if (regexp.mobile.test(value)) {
// this.setData({
// mobileWrong: false
// });
// } else {
// this.setData({
// mobileWrong: true
// });
// }
this
.
setData
({
'params.mobile'
:
value
,
})
...
...
@@ -93,11 +77,8 @@ Page({
sendVerify
()
{
// 发送验证码
const
that
=
this
;
if
(
!
regexp
.
mobile
.
test
(
that
.
data
.
params
.
mobile
))
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'请输入正确的手机号'
,
confirm
:
true
,
showCancel
:
false
that
.
setData
({
warnTip
:
'请输入正确的手机号'
})
return
;
}
...
...
@@ -116,11 +97,8 @@ Page({
sending
:
false
})
if
(
code
)
{
wx
.
showModal
({
title
:
'提示'
,
content
:
messages
[
code
],
showCancel
:
false
,
confirm
:
true
that
.
setData
({
warnTip
:
`
${
messages
[
code
]}
`
})
return
;
}
...
...
@@ -152,60 +130,41 @@ Page({
})
},
resetPasswordSumbit
(
e
)
{
console
.
log
(
this
.
data
.
params
)
;
var
that
=
this
;
let
commitParams
=
this
.
valueTrim
(
this
.
data
.
params
);
const
visitor
=
LocalStorage
.
getItem
(
'visitor'
);
if
(
!
commitParams
.
mobile
)
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'请输入手机号码'
,
showCancel
:
false
,
confirm
:
true
that
.
setData
({
warnTip
:
'请输入正确的手机号'
})
return
;
}
if
(
!
regexp
.
mobile
.
test
(
commitParams
.
mobile
))
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'手机号码格式不正确'
,
showCancel
:
false
,
confirm
:
true
that
.
setData
({
warnTip
:
'手机号码格式不正确'
})
return
;
}
if
(
commitParams
.
verify_code
.
length
!=
4
)
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'请输入四位数字验证码'
,
showCancel
:
false
,
confirm
:
true
that
.
setData
({
warnTip
:
'请输入四位数字验证码'
})
return
;
}
if
(
!
commitParams
.
password
)
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'请输入密码'
,
showCancel
:
false
,
confirm
:
true
that
.
setData
({
warnTip
:
'请输入密码'
})
return
;
}
if
(
!
regexp
.
passWord
.
test
(
commitParams
.
password
))
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'密码格式不正确,密码必须为6-20位字母和数字组合'
,
showCancel
:
false
,
confirm
:
true
that
.
setData
({
warnTip
:
'密码格式不正确,密码必须为6-20位字母和数字组合'
})
return
;
}
if
(
commitParams
.
password
!=
this
.
data
.
nextpassword
)
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'两次输入密码不一致,请重新输入'
,
showCancel
:
false
,
confirm
:
true
that
.
setData
({
warnTip
:
'两次输入密码不一致,请重新输入'
})
return
;
}
...
...
@@ -220,11 +179,8 @@ Page({
submitting
:
false
})
if
(
res
.
code
)
{
wx
.
showModal
({
title
:
'提示'
,
content
:
messages
[
res
.
code
],
showCancel
:
false
,
confirm
:
true
that
.
setData
({
warnTip
:
`
${
messages
[
res
.
code
]}
`
})
return
;
}
...
...
@@ -253,10 +209,5 @@ Page({
}
});
return
newObj
;
},
gologin
()
{
wx
.
navigateTo
({
url
:
'/business/pages/login/index'
})
},
}
})
\ No newline at end of file
business/pages/loginregistermgt/findpsd.wxml
View file @
de36c86f
<view class="container">
<!-- <view class="logo-box">
<image class="logo" src="{{imageRoot}}2b/login/accounticon.png?{{imageVersion}}"></image>
<view class="slogon">轻松管理学校 轻巧拓客招生</view>
</view> -->
<view class="form-box">
<view class="form-item">
<view class="left-iconbox">
...
...
@@ -31,7 +27,10 @@
</view>
<input type="text" password="{{is_pwd}}" bindinput="nextpsdInput" maxlength="20" placeholder-class="placeholderclass" value="" placeholder="再次确认密码"/>
</view>
<!-- <view class="btn-forgetpsd">忘记密码</view> -->
<view class="error-tip" wx:if="{{warnTip}}">
<image class="icon-warn" src="{{localImageRoot}}2b/loginregistermgt/warn.png?{{imageVersion}}"></image>
<text class="warn-text">{{warnTip}}</text>
</view>
</view>
<form bindsubmit="resetPasswordSumbit" report-submit="true">
<button class="formBtn" form-type="submit" disabled="{{!params.mobile || !params.verify_code || !params.password || !nextpassword}}">重置密码</button>
...
...
business/pages/loginregistermgt/register.js
View file @
de36c86f
...
...
@@ -15,11 +15,9 @@ const { register } = constants;
var
app
=
getApp
();
Page
({
data
:
{
text
:
"This is page data."
,
imageRoot
:
app
.
globalData
.
imageRoot
,
imageVersion
:
app
.
globalData
.
imageVersion
,
localImageRoot
:
'../../../images/'
,
mobileWrong
:
true
,
params
:
{
mobile
:
''
,
verify_code
:
''
,
...
...
@@ -30,7 +28,8 @@ Page({
sending
:
false
,
hasSend
:
false
,
submitting
:
false
,
is_pwd
:
true
is_pwd
:
true
,
warnTip
:
''
},
onLoad
:
function
(
options
)
{
// Do some initialize when page load.
wx
.
hideShareMenu
()
...
...
@@ -52,15 +51,6 @@ Page({
// Event handler.
mobileInput
(
e
)
{
const
{
value
}
=
e
.
detail
;
// if (regexp.mobile.test(value)) {
// this.setData({
// mobileWrong: false
// });
// } else {
// this.setData({
// mobileWrong: true
// });
// }
this
.
setData
({
'params.mobile'
:
value
,
})
...
...
@@ -87,11 +77,8 @@ Page({
sendVerify
()
{
// 发送验证码
const
that
=
this
;
if
(
!
regexp
.
mobile
.
test
(
that
.
data
.
params
.
mobile
))
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'请输入正确的手机号'
,
confirm
:
true
,
showCancel
:
false
that
.
setData
({
warnTip
:
'请输入正确的手机号'
})
return
;
}
...
...
@@ -110,11 +97,8 @@ Page({
sending
:
false
})
if
(
code
)
{
wx
.
showModal
({
title
:
'提示'
,
content
:
messages
[
code
],
showCancel
:
false
,
confirm
:
true
that
.
setData
({
warnTip
:
`
${
messages
[
code
]}
`
})
return
;
}
...
...
@@ -146,61 +130,49 @@ Page({
})
},
registerSumbit
(
e
)
{
var
that
=
this
;
const
{
formId
}
=
e
.
detail
;
let
commitParams
=
this
.
valueTrim
(
this
.
data
.
params
);
const
visitor
=
LocalStorage
.
getItem
(
'visitor'
);
if
(
!
commitParams
.
mobile
)
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'请输入手机号码'
,
showCancel
:
false
,
confirm
:
true
that
.
setData
({
warnTip
:
'请输入手机号码'
})
setTimeout
(()
=>
{
that
.
setData
({
warnTipShow
:
false
,
})
},
1000
)
return
;
}
if
(
!
regexp
.
mobile
.
test
(
commitParams
.
mobile
))
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'手机号码格式不正确'
,
showCancel
:
false
,
confirm
:
true
that
.
setData
({
warnTip
:
'手机号码格式不正确'
})
return
;
}
if
(
commitParams
.
verify_code
.
length
!=
4
)
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'请输入四位数字验证码'
,
showCancel
:
false
,
confirm
:
true
that
.
setData
({
warnTip
:
'请输入四位数字验证码'
})
return
;
}
// if (!commitParams.password) {
// wx.showModal({
// title: '提示',
// content: '请输入密码',
// showCancel: false,
// confirm: true
// that.setData({
// warnTip: '请输入密码'
// })
// return;
// }
// if (!regexp.passWord.test(commitParams.password)) {
// wx.showModal({
// title: '提示',
// content: '密码格式不正确,密码必须为6-20位字母和数字组合',
// showCancel: false,
// confirm: true
// that.setData({
// warnTip: '密码格式不正确,密码必须为6-20位字母和数字组合'
// })
// return;
// }
// if (commitParams.password!=this.data.nextpassword) {
// wx.showModal({
// title: '提示',
// content: '两次输入密码不一致,请重新输入',
// showCancel: false,
// confirm: true
// that.setData({
// warnTip: '两次输入密码不一致,请重新输入'
// })
// return;
// }
...
...
@@ -224,11 +196,8 @@ Page({
submitting
:
false
})
if
(
res
.
code
)
{
wx
.
showModal
({
title
:
'提示'
,
content
:
messages
[
res
.
code
],
showCancel
:
false
,
confirm
:
true
that
.
setData
({
warnTip
:
`
${
messages
[
res
.
code
]}
`
})
return
;
}
...
...
business/pages/loginregistermgt/register.wxml
View file @
de36c86f
...
...
@@ -32,6 +32,10 @@
<input type="text" password="{{is_pwd}}" bindinput="nextpsdInput" maxlength="20" placeholder-class="placeholderclass" value="" placeholder="再次确认密码"/>
</view> -->
<!-- <view class="btn-forgetpsd">忘记密码</view> -->
<view class="error-tip" wx:if="{{warnTip}}">
<image class="icon-warn" src="{{localImageRoot}}2b/loginregistermgt/warn.png?{{imageVersion}}"></image>
<text class="warn-text">{{warnTip}}</text>
</view>
</view>
<form bindsubmit="registerSumbit" report-submit="true">
<button class="formBtn {{!params.mobile || !params.verify_code ? 'formBtn-dark ': ''}}" form-type="submit" disabled="{{!params.mobile || !params.verify_code}}">注册</button>
...
...
business/pages/loginregistermgt/style/form.wxss
View file @
de36c86f
...
...
@@ -90,6 +90,30 @@
width: 38rpx;
height: 26rpx;
}
.form-box .error-tip{
position: absolute;
right: 0;
bottom: -35rpx;
font-weight: 500;
color: #F76260;
padding-left: 25rpx;
display: flex;
align-items: center;
height: 52rpx;
line-height: 52rpx;
background :rgba(255,255,255,1);
box-shadow: 0 1rpx 10rpx 0 rgba(220,220,220,0.3);
border-radius: 0 26rpx 26rpx 26rpx;
padding: 0 13rpx;
}
.form-box .error-tip .icon-warn{
width: 22rpx;
height: 22rpx;
margin-right: 14rpx;
}
.form-box .error-tip .warn-text{
font-size: 24rpx;
}
.form-box .btn-forgetpsd{
position: absolute;
right: 0;
...
...
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