Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eduline
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
冷斌
eduline
Commits
830c9b66
Commit
830c9b66
authored
May 13, 2020
by
陈超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
T
parent
f65f0e84
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
229 additions
and
173 deletions
+229
-173
addons/theme/stv1/_header_w3g.html
+1
-0
apps/basic/Tpl/default/Passport/login_w3g.html
+1
-9
apps/basic/Tpl/default/Passport/reg_w3g.html
+1
-13
apps/home/Tpl/default/Repwd/index_w3g.html
+226
-151
No files found.
addons/theme/stv1/_header_w3g.html
View file @
830c9b66
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
<link
rel=
"stylesheet"
href=
"https://cdn.jsdelivr.net/npm/vant@2.6/lib/index.css"
/>
<link
rel=
"stylesheet"
href=
"https://cdn.jsdelivr.net/npm/vant@2.6/lib/index.css"
/>
<script
src=
"https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"
></script>
<script
src=
"https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"
></script>
<script
src=
"https://cdn.jsdelivr.net/npm/vant@2.6/lib/vant.min.js"
></script>
<script
src=
"https://cdn.jsdelivr.net/npm/vant@2.6/lib/vant.min.js"
></script>
<script
src=
"__THEMEW3G__/js/extension.js"
charset=
"utf-8"
></script>
<script>
<script>
//全局变量
//全局变量
...
...
apps/basic/Tpl/default/Passport/login_w3g.html
View file @
830c9b66
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
<div
class=
"login_input_frame layout_v"
>
<div
class=
"login_input_frame layout_v"
>
<van-field
class=
"login_input"
left-icon=
"__THEME__/img/account_icon.png"
v-model=
"phone"
type=
"tel"
placeholder=
"请输入手机号"
></van-field>
<van-field
class=
"login_input"
left-icon=
"__THEME__/img/account_icon.png"
v-model=
"phone"
type=
"tel"
placeholder=
"请输入手机号"
></van-field>
<van-field
class=
"login_input"
left-icon=
"__THEME__/img/pwd_icon.png"
v-model=
"password"
type=
"password"
placeholder=
"请输入6~18位密码"
></van-field>
<van-field
class=
"login_input"
left-icon=
"__THEME__/img/pwd_icon.png"
v-model=
"password"
type=
"password"
maxlength=
"18"
placeholder=
"请输入6~18位密码"
></van-field>
<div
class=
"van-hairline--bottom"
style=
"transform: scaleY(.5);"
></div>
<div
class=
"van-hairline--bottom"
style=
"transform: scaleY(.5);"
></div>
</div>
</div>
<div
class=
"layout_h_b login_action_bar"
>
<div
class=
"layout_h_b login_action_bar"
>
...
@@ -74,14 +74,6 @@
...
@@ -74,14 +74,6 @@
$
(
"#preloader"
).
hide
()
$
(
"#preloader"
).
hide
()
});
});
String
.
prototype
.
isMobile
=
function
()
{
return
(
/^1
[
3|4|5|6|7|8|9
]\d{9}
$/
.
test
(
this
));
}
String
.
prototype
.
isPwd
=
function
()
{
return
this
.
length
>=
6
&&
this
.
length
<=
18
}
new
Vue
({
new
Vue
({
el
:
'#app'
,
el
:
'#app'
,
data
:
function
()
{
data
:
function
()
{
...
...
apps/basic/Tpl/default/Passport/reg_w3g.html
View file @
830c9b66
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
</div>
</div>
</template>
</template>
</van-field>
</van-field>
<van-field
v-model=
"password"
label=
"密码"
type=
"password"
maxlength=
"1
6
"
placeholder=
"请输入6~18位密码"
></van-field>
<van-field
v-model=
"password"
label=
"密码"
type=
"password"
maxlength=
"1
8
"
placeholder=
"请输入6~18位密码"
></van-field>
<div
@
click=
"onConfirm"
:class=
"isOk ? 'confirm_button' : 'confirm_button_disable'"
style=
"margin-top: 6.625rem;"
>
<div
@
click=
"onConfirm"
:class=
"isOk ? 'confirm_button' : 'confirm_button_disable'"
style=
"margin-top: 6.625rem;"
>
<span>
注册并登录
</span>
<span>
注册并登录
</span>
</div>
</div>
...
@@ -120,18 +120,6 @@
...
@@ -120,18 +120,6 @@
$
(
"#preloader"
).
hide
();
$
(
"#preloader"
).
hide
();
})
})
String
.
prototype
.
isMobile
=
function
()
{
return
(
/^1
[
3|4|5|6|7|8|9
]\d{9}
$/
.
test
(
this
));
}
String
.
prototype
.
isCode
=
function
()
{
return
this
.
length
==
4
||
this
.
length
==
6
}
String
.
prototype
.
isPwd
=
function
()
{
return
this
.
length
>=
6
&&
this
.
length
<=
18
}
new
Vue
({
new
Vue
({
el
:
'#app'
,
el
:
'#app'
,
data
:
function
()
{
data
:
function
()
{
...
...
apps/home/Tpl/default/Repwd/index_w3g.html
View file @
830c9b66
<include
file=
"__THEME__/_header_w3g"
/>
<include
file=
"__THEME__/_header_w3g"
/>
<script>
<script>
var
REPOHNE_VAR
=
"{:U('home/Repwd/getVrifi')}"
;
var
REPOHNE_VAR
=
"{:U('home/Repwd/getVrifi')}"
;
var
REPWDHANDLE
=
"{:U('home/Repwd/repwdhandle')}"
;
var
REPWDHANDLE
=
"{:U('home/Repwd/repwdhandle')}"
;
var
REPWDEMAIL
=
"{:U('basic/Passport/doFindPasswordByEmail')}"
;
var
REPWDEMAIL
=
"{:U('basic/Passport/doFindPasswordByEmail')}"
;
var
OKEMAILADD
=
"{:U('basic/Passport/okemailadd')}"
;
var
OKEMAILADD
=
"{:U('basic/Passport/okemailadd')}"
;
</script>
</script>
<div
class=
"content"
>
<
!-- <
div class="content">
<div class="loginbox">
<div class="loginbox">
<a class="icon-colse" href="/"></a>
<a class="icon-colse" href="/"></a>
<ul class="logintype">
<ul class="logintype">
...
@@ -109,100 +108,84 @@
...
@@ -109,100 +108,84 @@
</div>
</div>
</div>
</div>
</div> -->
<div
id=
"app"
>
<div
class=
"layout_v"
>
<div
class=
"layout_v"
style=
"margin-top: 0.625rem;"
>
<van-field
v-model=
"phone"
label=
"手机号"
type=
"number"
placeholder=
"请输入手机号"
></van-field>
<van-field
v-model=
"code"
label=
"验证码"
type=
"digit"
maxlength=
"6"
placeholder=
"请输入验证码"
>
<template
#
button
>
<div
@
click=
"onSendCode"
class=
"layout_center"
:class=
"valid ? 'button_green' : 'button_disable'"
>
<span
class=
"self_center"
>
{{codeText}}
</span>
</div>
</template>
</van-field>
<van-field
v-model=
"password"
label=
"新密码"
type=
"password"
maxlength=
"18"
placeholder=
"请输入6~18位密码"
></van-field>
<van-field
v-model=
"password"
label=
"请确认密码"
type=
"repassword"
maxlength=
"18"
placeholder=
"请输入6~18位密码"
></van-field>
<div
@
click=
"onConfirm"
:class=
"isOk ? 'confirm_button' : 'confirm_button_disable'"
style=
"margin-top: 3.5rem;"
>
<span>
修改密码
</span>
</div>
</div>
</div>
</div>
</div>
<script>
<script>
$
(
function
(){
$
(
"#preloader"
).
hide
();
$
(
"#showEmail"
).
click
(
function
(){
$
(
".phone"
).
hide
();
$
(
".email"
).
show
();
});
$
(
"#showPhone"
).
click
(
function
(){
$
(
".email"
).
hide
();
$
(
".phone"
).
show
();
});
var
codeSrc
=
"{:captcha_src('resetPwd',['imageW'=>108,'imageH'=>42])}&!"
+
Math
.
random
();
$
(
function
(){
$
(
"#preloader"
).
hide
()
})
$
(
".resetcode"
).
attr
(
'src'
,
codeSrc
).
load
(
function
()
{
new
Vue
(
{
$
(
"#verifyimg_loading"
).
remove
();
el
:
'#app'
,
$
(
this
).
parent
().
show
();
data
:
function
()
{
});
return
{
/** 刷新验证码 */
counting
:
false
,
$
(
'.resetcode'
).
click
(
function
(){
count
:
60
,
$
(
".resetcode"
).
attr
(
'src'
,
function
(){
phone
:
""
,
var
index
=
this
.
src
.
indexOf
(
'&!'
);
code
:
""
,
if
(
index
!==
-
1
){
password
:
""
,
return
this
.
src
.
substr
(
0
,
index
)
+
'&!'
+
Math
.
random
();
repassword
:
""
}
}
return
this
.
src
+
'&!'
+
Math
.
random
();
},
});
computed
:
{
});
valid
:
function
()
{
// 每60s 刷新一次验证码
return
!
this
.
counting
setInterval
(
function
(){
},
$
(
".resetcode"
).
click
();
codeText
:
function
()
{
},
120
*
1000
);
return
this
.
counting
?
(
this
.
count
+
's'
)
:
'发验证码'
});
},
isOk
:
function
()
{
/**
return
this
.
phone
.
isMobile
()
&&
this
.
code
.
isCode
()
&&
this
.
password
.
isPwd
()
&&
(
this
.
password
==
this
.
repassword
)
* 邮箱找回密码
*/
function
repEmailNext
(
cate
){
var
email
=
$
.
trim
(
$
(
"#repemail"
).
val
());
//获取用户手机号
var
code
=
$
.
trim
(
$
(
"#repcode"
).
val
());
//获取用户手机号
if
(
!
email
.
match
(
/^
\w
+
((
-
\w
+
)
|
(\.\w
+
))
*
\@[
A-Za-z0-9
]
+
((\.
|-
)[
A-Za-z0-9
]
+
)
*
\.[
A-Za-z0-9
]
+$/
)){
//setRepMsg("repmsgemail","email不正确!");
ui
.
error
(
"邮箱不正确"
);
return
;
}
}
},
$
(
cate
).
attr
(
"disabled"
,
"disabled"
);
methods
:
{
$
(
cate
).
val
(
"提交中...."
);
onConfirm
:
function
()
{
//修改密码
let
that
=
this
let
phone
=
this
.
phone
let
code
=
this
.
code
let
pwd
=
this
.
password
$
.
ajax
({
$
.
ajax
({
type
:
"POST"
,
type
:
"POST"
,
url
:
REPWDEMAIL
,
url
:
"{:U('home/Repwd/repwdhandle')}"
,
data
:
"email="
+
email
+
"&everify="
+
code
,
data
:
"phone="
+
phone
+
"&code="
+
code
+
"&pwd="
+
pwd
+
"&repwd="
+
pwd
,
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
data
){
success
:
function
(
data
)
{
if
(
data
.
status
==
'0'
){
var
data
=
getResponseData
(
data
)
$
(
cate
).
removeAttr
(
'disabled'
);
if
(
data
.
status
==
'1'
)
{
$
(
cate
).
val
(
"下一步"
);
window
.
location
.
href
=
"{:U('basic/Passport/login')}"
ui
.
success
(
data
.
info
);
}
else
{
return
;
ui
.
error
(
data
.
info
)
}
else
{
return
$
(
"p"
).
text
(
""
);
window
.
location
.
href
=
OKEMAILADD
;
}
}
});
}
//临时处理方法
var
timerc
;
function
dctime
(){
if
(
timerc
>
1
){
timerc
=
timerc
-
1
;
$
(
"#dctime"
).
text
(
timerc
);
setTimeout
(
"dctime()"
,
1000
);
//设置1000毫秒以后执行一次本函数
}
else
{
$
(
'.width97'
).
css
(
"display"
,
"none"
);
$
(
'.width80'
).
removeAttr
(
"style"
);
}
}
}
}
/**
})
* 找回密码发送手机验证码
},
*/
onSendCode
:
function
()
{
function
getRepPhoneVerify
(){
let
that
=
this
phone
=
$
.
trim
(
$
(
"#rephoneval"
).
val
());
//获取用户手机号
let
phone
=
that
.
phone
//检查手机号格式
if
(
!
phone
.
isMobile
())
{
if
(
!
phone
.
match
(
PHONE_MATCH
)){
return
ui
.
error
(
'请填写正确的手机号'
);
return
;
}
}
//获取手机验证码
$
.
ajax
({
$
.
ajax
({
type
:
"POST"
,
type
:
"POST"
,
url
:
REPOHNE_VAR
,
url
:
REPOHNE_VAR
,
...
@@ -210,84 +193,175 @@
...
@@ -210,84 +193,175 @@
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
data
){
success
:
function
(
data
){
if
(
data
.
status
==
'0'
){
if
(
data
.
status
==
'0'
){
ui
.
error
(
data
.
info
);
ui
.
error
(
data
.
info
)
return
;
return
}
else
{
}
else
{
ui
.
success
(
data
.
info
);
ui
.
success
(
data
.
info
)
$
(
'.width80'
).
css
(
"display"
,
"none"
);
if
(
!
that
.
counting
)
{
$
(
'.width97'
).
removeAttr
(
"style"
);
that
.
counting
=
true
timerc
=
60
;
that
.
onTick
()
dctime
();
return
;
}
}
return
}
}
});
}
}
})
function
okPhonecode
(){
},
phone
=
$
(
'#rephoneval'
).
val
();
onTick
:
function
()
{
code
=
$
(
'#repverval'
).
val
();
if
(
this
.
count
>
0
)
{
$
.
ajax
({
this
.
count
-=
1
type
:
"POST"
,
setTimeout
(
this
.
onTick
,
1000
)
url
:
"{:U('home/Repwd/repwdhandle')}"
,
}
else
{
data
:
"phone="
+
phone
+
"&code="
+
code
,
this
.
count
=
60
dataType
:
"json"
,
this
.
counting
=
false
success
:
function
(
data
){
var
data
=
getResponseData
(
data
);
if
(
data
.
status
==
'1'
)
{
$
(
".s"
).
removeClass
(
"on"
);
$
(
".second"
).
addClass
(
"on"
);
$
(
".verify"
).
css
(
"display"
,
"none"
);
$
(
".reset"
).
css
(
"display"
,
"block"
);
$
(
"#phonecode"
).
val
(
code
);
}
}
else
{
ui
.
error
(
data
.
info
);
}
}
}
}
})
});
// /**
}
// * 邮箱找回密码
// */
// function repEmailNext(cate){
// var email=$.trim($("#repemail").val());//获取用户手机号
// var code=$.trim($("#repcode").val());//获取用户手机号
// if(!email.match(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)){
// //setRepMsg("repmsgemail","email不正确!");
// ui.error("邮箱不正确");
// return;
// }
function
okPhonepwd
()
{
// $(cate).attr("disabled","disabled");
phone
=
$
(
'#rephoneval'
).
val
();
// $(cate).val("提交中....");
code
=
$
(
'#repverval'
).
val
();
// //修改密码
pwd
=
$
(
'#ppwd'
).
val
();
// $.ajax({
pwds
=
$
(
'#ppwds'
).
val
();
// type: "POST",
// url:REPWDEMAIL,
// data:"email="+email+"&everify="+code,
// dataType:"json",
// success:function(data){
// if(data.status=='0'){
// $(cate).removeAttr('disabled');
// $(cate).val("下一步");
// ui.success(data.info);
// return;
// }else{
// $("p").text("");
// window.location.href=OKEMAILADD;
// }
// }
// });
// }
if
(
!
pwd
)
{
// //临时处理方法
ui
.
error
(
"请输入新密码"
);
// var timerc;
return
;
// function dctime(){
}
// if(timerc > 1){
if
(
!
pwds
)
{
// timerc=timerc-1;
ui
.
error
(
"请输入确认密码"
);
// $("#dctime").text(timerc);
return
;
// setTimeout("dctime()", 1000); //设置1000毫秒以后执行一次本函数
}
// }else{
// $('.width97').css("display","none");
// $('.width80').removeAttr("style");
// }
// }
if
(
pwd
!=
pwds
)
{
// /**
ui
.
error
(
"新密码与确认密码请保持一致"
);
// * 找回密码发送手机验证码
return
;
// */
}
// function getRepPhoneVerify(){
$
.
ajax
({
// phone=$.trim($("#rephoneval").val());//获取用户手机号
type
:
"POST"
,
// //检查手机号格式
url
:
"{:U('home/Repwd/repwdhandle')}"
,
// if(!phone.match( PHONE_MATCH )){
data
:
"phone="
+
phone
+
"&code="
+
code
+
"&pwd="
+
pwd
+
"&repwd="
+
pwds
,
// ui.error('请填写正确的手机号');
dataType
:
"json"
,
// return;
success
:
function
(
data
)
{
// }
var
data
=
getResponseData
(
data
);
// //获取手机验证码
if
(
data
.
status
==
'1'
)
{
// $.ajax({
$
(
".s"
).
removeClass
(
"on"
);
// type: "POST",
$
(
".third"
).
addClass
(
"on"
);
// url:REPOHNE_VAR,
$
(
".reset"
).
css
(
"display"
,
"none"
);
// data:"phone="+phone,
$
(
".completebox"
).
css
(
"display"
,
"block"
);
// dataType:"json",
}
else
{
// success:function(data){
ui
.
error
(
data
.
info
);
// if(data.status=='0'){
return
;
// ui.error(data.info);
}
// return;
}
// }else{
// ui.success(data.info);
// $('.width80').css("display","none");
// $('.width97').removeAttr("style");
// timerc = 60;
// dctime();
// return;
// }
// }
// });
// }
});
// function okPhonecode(){
}
// phone = $('#rephoneval').val();
// code = $('#repverval').val();
// $.ajax({
// type: "POST",
// url:"{:U('home/Repwd/repwdhandle')}",
// data:"phone="+phone+"&code="+code,
// dataType:"json",
// success:function(data){
// var data = getResponseData(data);
// if(data.status =='1')
// {
// $(".s").removeClass("on");
// $(".second").addClass("on");
// $(".verify").css("display", "none");
// $(".reset").css("display", "block");
// $("#phonecode").val(code);
// }
// else {
// ui.error(data.info);
// }
// }
// });
// }
// function okPhonepwd() {
// phone = $('#rephoneval').val();
// code = $('#repverval').val();
// pwd = $('#ppwd').val();
// pwds = $('#ppwds').val();
// if (!pwd) {
// ui.error("请输入新密码");
// return;
// }
// if (!pwds) {
// ui.error("请输入确认密码");
// return;
// }
// if (pwd != pwds) {
// ui.error("新密码与确认密码请保持一致");
// return;
// }
// $.ajax({
// type: "POST",
// url: "{:U('home/Repwd/repwdhandle')}",
// data: "phone=" + phone + "&code=" + code + "&pwd=" + pwd + "&repwd=" + pwds,
// dataType: "json",
// success: function (data) {
// var data = getResponseData(data);
// if (data.status == '1') {
// $(".s").removeClass("on");
// $(".third").addClass("on");
// $(".reset").css("display", "none");
// $(".completebox").css("display", "block");
// } else {
// ui.error(data.info);
// return;
// }
// }
// });
// }
</script>
</script>
\ No newline at end of file
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