Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
施宇
/
icsalesProgram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3f52f0b8
authored
Jul 24, 2019
by
梁建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
添加参数
parent
27ca2797
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
112 additions
and
30 deletions
pages/person/agreement/index.json
pages/person/register/index.json
pages/person/register/index.wxml
pages/person/successfully/index.json
pages/person/verifycode/index.js
pages/person/verifycode/index.less
pages/person/verifycode/index.wxml
pages/person/verifycode/index.wxss
utils/util.js
pages/person/agreement/index.json
View file @
3f52f0b8
{
"usingComponents"
:
{}
"usingComponents"
:
{},
"navigationBarTitleText"
:
"IC业务助手用户协议"
,
"navigationBarBackgroundColor"
:
"white"
,
"navigationBarTextStyle"
:
"black"
,
"backgroundColor"
:
"white"
}
\ No newline at end of file
pages/person/register/index.json
View file @
3f52f0b8
{
"usingComponents"
:
{}
"usingComponents"
:
{},
"navigationBarTitleText"
:
"免费注册"
,
"navigationBarBackgroundColor"
:
"white"
,
"navigationBarTextStyle"
:
"black"
,
"backgroundColor"
:
"white"
}
\ No newline at end of file
pages/person/register/index.wxml
View file @
3f52f0b8
...
...
@@ -44,7 +44,7 @@
<view class="agreement">
<text class="t1">点击注册即默认同意</text>
<
text class="t2">《IC业务助手用户协议》</text
>
<
navigator url="/pages/person/agreement/index" class="t2">《IC业务助手用户协议》</navigator
>
</view>
</view>
\ No newline at end of file
pages/person/successfully/index.json
View file @
3f52f0b8
{
"navigationBarTitleText"
:
"注册成功"
,
"navigationBarBackgroundColor"
:
"#0D84D1"
,
"navigationBarTextStyle"
:
"white"
,
"backgroundColor"
:
"#0d84d1"
}
"usingComponents"
:
{},
"navigationBarTitleText"
:
"注册成功"
,
"navigationBarBackgroundColor"
:
"white"
,
"navigationBarTextStyle"
:
"black"
,
"backgroundColor"
:
"white"
}
\ No newline at end of file
pages/person/verifycode/index.js
View file @
3f52f0b8
...
...
@@ -14,7 +14,10 @@ Page({
mobileFlag
:
false
,
codeFlag
:
false
,
disabled
:
false
,
disabledBtn
:
false
,
loading
:
false
,
currentTime
:
61
,
timeText
:
'发送验证码'
,
formData
:
{
mobile
:
''
,
code
:
''
...
...
@@ -24,62 +27,114 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
onReady
:
function
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
onShow
:
function
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{
onHide
:
function
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
onUnload
:
function
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
onPullDownRefresh
:
function
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
onReachBottom
:
function
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
onShareAppMessage
:
function
()
{
},
/**
* 校验字段
*/
calcForm
:
function
(
val
,
type
)
{
* 获取验证码
*/
getCode
:
function
()
{
var
self
=
this
;
var
currentTime
=
this
.
data
.
currentTime
;
var
interval
=
setInterval
(
function
()
{
currentTime
--
;
self
.
setData
({
timeText
:
currentTime
+
's'
});
if
(
currentTime
<=
0
)
{
clearInterval
(
interval
);
self
.
setData
({
timeText
:
'重新发送'
,
currentTime
:
61
,
disabled
:
false
});
}
},
1000
)
},
/**
* 发送验证码
*/
getVerificationCode
:
function
(
e
)
{
http
.
getData
(
apis
.
getRegistCode
,{
mobile
:
''
,
code_type
:
2
},
function
(
res
){
if
(
res
.
err_code
===
0
){
http
.
getData
();
this
.
setData
({
disabled
:
true
});
}
});
},
/**
* 校验字段
*/
calcForm
:
function
(
val
,
type
)
{
let
mobile
=
val
.
mobile
;
let
code
=
val
.
code
;
let
reg_mobile
=
/^
(
13
[
0-9
]
|14
[
579
]
|15
[
0-3,5-9
]
|16
[
6
]
|17
[
0135678
]
|18
[
0-9
]
|19
[
89
])\d{8}
$/
;
...
...
@@ -120,20 +175,18 @@ Page({
/**
* 登录
*/
formSubmit
:
function
(
e
)
{
formSubmit
:
function
(
e
)
{
var
self
=
this
;
console
.
log
(
e
.
detail
.
value
)
if
(
this
.
calcForm
(
e
.
detail
.
value
))
{
self
.
setData
({
disabled
:
true
,
disabled
Btn
:
true
,
loading
:
true
});
http
.
postData
(
apis
.
authMobilelogin
,
e
.
detail
.
value
,
function
(
res
)
{
http
.
postData
(
apis
.
authMobilelogin
,
e
.
detail
.
value
,
function
(
res
)
{
if
(
res
.
err_code
===
0
)
{
...
...
@@ -157,7 +210,7 @@ Page({
}
self
.
setData
({
disabled
:
false
,
disabled
Btn
:
false
,
loading
:
false
});
...
...
pages/person/verifycode/index.less
View file @
3f52f0b8
...
...
@@ -22,6 +22,8 @@
color: #adb6bf;
}
.vcode {
width: 219rpx;
text-align: right;
font-size: 32rpx;
color: #61a0f2;
background: none;
...
...
@@ -31,6 +33,9 @@
border: 0 !important;
}
}
.vcode-color{
color: #ADB6BF;
}
.areacode {
border-left: 1px solid #d8dfe6;
.tel-value {
...
...
pages/person/verifycode/index.wxml
View file @
3f52f0b8
...
...
@@ -22,7 +22,7 @@
<text class="icon iconfont iconiconxiantiaoshouji"></text>
<view class="form-item-right row verCenter bothSide">
<input placeholder="请输入验证码" placeholder-class="placeholderClass" name='code'></input>
<button class="vcode
">发送验证码
</button>
<button class="vcode
{{disabled ? 'vcode-color':''}}" disabled="{{disabled}}" bindtap="getVerificationCode">{{timeText}}
</button>
</view>
</view>
...
...
@@ -33,12 +33,12 @@
</block>
</view>
<button class="login-button" form-type="submit" disabled="{{disabled}}" loading="{{loading}}">登录</button>
<button class="login-button" form-type="submit" disabled="{{disabled
Btn
}}" loading="{{loading}}">登录</button>
</form>
<view class="bottom row bothSide">
<navigator url="/pages/person/login/index" class="txt">密码登录</navigator>
<navigator url="/pages/person/
verifycode
/index" class="txt">注册账户</navigator>
<navigator url="/pages/person/
register
/index" class="txt">注册账户</navigator>
</view>
</view>
\ No newline at end of file
pages/person/verifycode/index.wxss
View file @
3f52f0b8
...
...
@@ -24,6 +24,8 @@
color: #adb6bf;
}
.person .inp-wrap .vcode {
width: 219rpx;
text-align: right;
font-size: 32rpx;
color: #61a0f2;
background: none;
...
...
@@ -33,6 +35,9 @@
.person .inp-wrap .vcode::after {
border: 0 !important;
}
.person .inp-wrap .vcode-color {
color: #ADB6BF;
}
.person .inp-wrap .areacode {
border-left: 1px solid #d8dfe6;
}
...
...
utils/util.js
View file @
3f52f0b8
//数据请求(get)
const
getData
=
(
url
,
param
s
,
callBack
,
loading
)
=>
{
const
getData
=
(
url
,
param
,
callBack
,
loading
)
=>
{
wx
.
showNavigationBarLoading
();
var
params
=
Object
.
assign
({},
param
,
{
pf
:
1
});
if
(
loading
){
wx
.
showLoading
();
}
...
...
@@ -36,10 +38,12 @@ const getData = (url, params, callBack,loading) => {
};
//数据请求(post)
const
postData
=
(
url
,
param
s
,
callBack
,
loading
)
=>
{
const
postData
=
(
url
,
param
,
callBack
,
loading
)
=>
{
wx
.
showNavigationBarLoading
();
var
params
=
Object
.
assign
({},
param
,
{
pf
:
1
});
if
(
loading
)
{
wx
.
showLoading
();
}
...
...
@@ -53,6 +57,7 @@ const postData = (url, params, callBack, loading) => {
},
method
:
"POST"
,
success
:
(
res
)
=>
{
typeof
callBack
==
"function"
&&
callBack
(
res
.
data
,
""
);
wx
.
hideNavigationBarLoading
();
...
...
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