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
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
247 additions
and
191 deletions
+247
-191
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
+244
-169
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,185 +108,260 @@
...
@@ -109,185 +108,260 @@
</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
(){
$
(
function
(){
$
(
"#preloader"
).
hide
();
$
(
"#preloader"
).
hide
()
$
(
"#showEmail"
).
click
(
function
(){
})
$
(
".phone"
).
hide
();
$
(
".email"
).
show
();
new
Vue
({
});
el
:
'#app'
,
$
(
"#showPhone"
).
click
(
function
(){
data
:
function
()
{
$
(
".email"
).
hide
();
return
{
$
(
".phone"
).
show
();
counting
:
false
,
});
count
:
60
,
phone
:
""
,
var
codeSrc
=
"{:captcha_src('resetPwd',['imageW'=>108,'imageH'=>42])}&!"
+
Math
.
random
();
code
:
""
,
password
:
""
,
$
(
".resetcode"
).
attr
(
'src'
,
codeSrc
).
load
(
function
(){
repassword
:
""
$
(
"#verifyimg_loading"
).
remove
();
}
$
(
this
).
parent
().
show
();
},
});
computed
:
{
/** 刷新验证码 */
valid
:
function
()
{
$
(
'.resetcode'
).
click
(
function
(){
return
!
this
.
counting
$
(
".resetcode"
).
attr
(
'src'
,
function
(){
},
var
index
=
this
.
src
.
indexOf
(
'&!'
);
codeText
:
function
()
{
if
(
index
!==
-
1
){
return
this
.
counting
?
(
this
.
count
+
's'
)
:
'发验证码'
return
this
.
src
.
substr
(
0
,
index
)
+
'&!'
+
Math
.
random
();
},
}
isOk
:
function
()
{
return
this
.
src
+
'&!'
+
Math
.
random
();
return
this
.
phone
.
isMobile
()
&&
this
.
code
.
isCode
()
&&
this
.
password
.
isPwd
()
&&
(
this
.
password
==
this
.
repassword
)
});
}
});
},
// 每60s 刷新一次验证码
methods
:
{
setInterval
(
function
(){
onConfirm
:
function
()
{
$
(
".resetcode"
).
click
();
let
that
=
this
},
120
*
1000
);
let
phone
=
this
.
phone
});
let
code
=
this
.
code
let
pwd
=
this
.
password
/**
$
.
ajax
({
* 邮箱找回密码
type
:
"POST"
,
*/
url
:
"{:U('home/Repwd/repwdhandle')}"
,
function
repEmailNext
(
cate
){
data
:
"phone="
+
phone
+
"&code="
+
code
+
"&pwd="
+
pwd
+
"&repwd="
+
pwd
,
dataType
:
"json"
,
success
:
function
(
data
)
{
var
data
=
getResponseData
(
data
)
if
(
data
.
status
==
'1'
)
{
window
.
location
.
href
=
"{:U('basic/Passport/login')}"
}
else
{
ui
.
error
(
data
.
info
)
return
}
}
})
},
onSendCode
:
function
()
{
let
that
=
this
let
phone
=
that
.
phone
if
(
!
phone
.
isMobile
())
{
return
}
$
.
ajax
({
type
:
"POST"
,
url
:
REPOHNE_VAR
,
data
:
"phone="
+
phone
,
dataType
:
"json"
,
success
:
function
(
data
){
if
(
data
.
status
==
'0'
){
ui
.
error
(
data
.
info
)
return
}
else
{
ui
.
success
(
data
.
info
)
if
(
!
that
.
counting
)
{
that
.
counting
=
true
that
.
onTick
()
}
return
}
}
})
},
onTick
:
function
()
{
if
(
this
.
count
>
0
)
{
this
.
count
-=
1
setTimeout
(
this
.
onTick
,
1000
)
}
else
{
this
.
count
=
60
this
.
counting
=
false
}
}
}
})
// /**
// * 邮箱找回密码
// */
// function repEmailNext(cate){
var
email
=
$
.
trim
(
$
(
"#repemail"
).
val
());
//获取用户手机号
//
var email=$.trim($("#repemail").val());//获取用户手机号
var
code
=
$
.
trim
(
$
(
"#repcode"
).
val
());
//获取用户手机号
//
var code=$.trim($("#repcode").val());//获取用户手机号
if
(
!
email
.
match
(
/^
\w
+
((
-
\w
+
)
|
(\.\w
+
))
*
\@[
A-Za-z0-9
]
+
((\.
|-
)[
A-Za-z0-9
]
+
)
*
\.[
A-Za-z0-9
]
+$/
)){
//
if(!email.match(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)){
//setRepMsg("repmsgemail","email不正确!");
//
//setRepMsg("repmsgemail","email不正确!");
ui
.
error
(
"邮箱不正确"
);
//
ui.error("邮箱不正确");
return
;
//
return;
}
//
}
$
(
cate
).
attr
(
"disabled"
,
"disabled"
);
//
$(cate).attr("disabled","disabled");
$
(
cate
).
val
(
"提交中...."
);
//
$(cate).val("提交中....");
//修改密码
//
//修改密码
$
.
ajax
({
//
$.ajax({
type
:
"POST"
,
//
type: "POST",
url
:
REPWDEMAIL
,
//
url:REPWDEMAIL,
data
:
"email="
+
email
+
"&everify="
+
code
,
//
data:"email="+email+"&everify="+code,
dataType
:
"json"
,
//
dataType:"json",
success
:
function
(
data
){
//
success:function(data){
if
(
data
.
status
==
'0'
){
//
if(data.status=='0'){
$
(
cate
).
removeAttr
(
'disabled'
);
//
$(cate).removeAttr('disabled');
$
(
cate
).
val
(
"下一步"
);
//
$(cate).val("下一步");
ui
.
success
(
data
.
info
);
//
ui.success(data.info);
return
;
//
return;
}
else
{
//
}else{
$
(
"p"
).
text
(
""
);
//
$("p").text("");
window
.
location
.
href
=
OKEMAILADD
;
//
window.location.href=OKEMAILADD;
}
//
}
}
//
}
});
//
});
}
//
}
//临时处理方法
//
//
临时处理方法
var
timerc
;
//
var timerc;
function
dctime
(){
//
function dctime(){
if
(
timerc
>
1
){
//
if(timerc > 1){
timerc
=
timerc
-
1
;
//
timerc=timerc-1;
$
(
"#dctime"
).
text
(
timerc
);
//
$("#dctime").text(timerc);
setTimeout
(
"dctime()"
,
1000
);
//设置1000毫秒以后执行一次本函数
//
setTimeout("dctime()", 1000); //设置1000毫秒以后执行一次本函数
}
else
{
//
}else{
$
(
'.width97'
).
css
(
"display"
,
"none"
);
//
$('.width97').css("display","none");
$
(
'.width80'
).
removeAttr
(
"style"
);
//
$('.width80').removeAttr("style");
}
//
}
}
//
}
/**
/
/ /
**
* 找回密码发送手机验证码
//
* 找回密码发送手机验证码
*/
//
*/
function
getRepPhoneVerify
(){
//
function getRepPhoneVerify(){
phone
=
$
.
trim
(
$
(
"#rephoneval"
).
val
());
//获取用户手机号
//
phone=$.trim($("#rephoneval").val());//获取用户手机号
//检查手机号格式
//
//检查手机号格式
if
(
!
phone
.
match
(
PHONE_MATCH
)){
//
if(!phone.match( PHONE_MATCH )){
ui
.
error
(
'请填写正确的手机号'
);
//
ui.error('请填写正确的手机号');
return
;
//
return;
}
//
}
//获取手机验证码
//
//获取手机验证码
$
.
ajax
({
//
$.ajax({
type
:
"POST"
,
//
type: "POST",
url
:
REPOHNE_VAR
,
//
url:REPOHNE_VAR,
data
:
"phone="
+
phone
,
//
data:"phone="+phone,
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"
);
//
$('.width80').css("display","none");
$
(
'.width97'
).
removeAttr
(
"style"
);
//
$('.width97').removeAttr("style");
timerc
=
60
;
//
timerc = 60;
dctime
();
//
dctime();
return
;
//
return;
}
//
}
}
//
}
});
//
});
}
//
}
function
okPhonecode
(){
//
function okPhonecode(){
phone
=
$
(
'#rephoneval'
).
val
();
//
phone = $('#rephoneval').val();
code
=
$
(
'#repverval'
).
val
();
//
code = $('#repverval').val();
$
.
ajax
({
//
$.ajax({
type
:
"POST"
,
//
type: "POST",
url
:
"{:U('home/Repwd/repwdhandle')}"
,
//
url:"{:U('home/Repwd/repwdhandle')}",
data
:
"phone="
+
phone
+
"&code="
+
code
,
//
data:"phone="+phone+"&code="+code,
dataType
:
"json"
,
//
dataType:"json",
success
:
function
(
data
){
//
success:function(data){
var
data
=
getResponseData
(
data
);
//
var data = getResponseData(data);
if
(
data
.
status
==
'1'
)
//
if(data.status =='1')
{
//
{
$
(
".s"
).
removeClass
(
"on"
);
//
$(".s").removeClass("on");
$
(
".second"
).
addClass
(
"on"
);
//
$(".second").addClass("on");
$
(
".verify"
).
css
(
"display"
,
"none"
);
//
$(".verify").css("display", "none");
$
(
".reset"
).
css
(
"display"
,
"block"
);
//
$(".reset").css("display", "block");
$
(
"#phonecode"
).
val
(
code
);
//
$("#phonecode").val(code);
}
//
}
else
{
//
else {
ui
.
error
(
data
.
info
);
//
ui.error(data.info);
}
//
}
}
//
}
});
//
});
}
//
}
function
okPhonepwd
()
{
//
function okPhonepwd() {
phone
=
$
(
'#rephoneval'
).
val
();
//
phone = $('#rephoneval').val();
code
=
$
(
'#repverval'
).
val
();
//
code = $('#repverval').val();
pwd
=
$
(
'#ppwd'
).
val
();
//
pwd = $('#ppwd').val();
pwds
=
$
(
'#ppwds'
).
val
();
//
pwds = $('#ppwds').val();
if
(
!
pwd
)
{
//
if (!pwd) {
ui
.
error
(
"请输入新密码"
);
//
ui.error("请输入新密码");
return
;
//
return;
}
//
}
if
(
!
pwds
)
{
//
if (!pwds) {
ui
.
error
(
"请输入确认密码"
);
//
ui.error("请输入确认密码");
return
;
//
return;
}
//
}
if
(
pwd
!=
pwds
)
{
//
if (pwd != pwds) {
ui
.
error
(
"新密码与确认密码请保持一致"
);
//
ui.error("新密码与确认密码请保持一致");
return
;
//
return;
}
//
}
$
.
ajax
({
//
$.ajax({
type
:
"POST"
,
//
type: "POST",
url
:
"{:U('home/Repwd/repwdhandle')}"
,
//
url: "{:U('home/Repwd/repwdhandle')}",
data
:
"phone="
+
phone
+
"&code="
+
code
+
"&pwd="
+
pwd
+
"&repwd="
+
pwds
,
//
data: "phone=" + phone + "&code=" + code + "&pwd=" + pwd + "&repwd=" + pwds,
dataType
:
"json"
,
//
dataType: "json",
success
:
function
(
data
)
{
//
success: function (data) {
var
data
=
getResponseData
(
data
);
//
var data = getResponseData(data);
if
(
data
.
status
==
'1'
)
{
//
if (data.status == '1') {
$
(
".s"
).
removeClass
(
"on"
);
//
$(".s").removeClass("on");
$
(
".third"
).
addClass
(
"on"
);
//
$(".third").addClass("on");
$
(
".reset"
).
css
(
"display"
,
"none"
);
//
$(".reset").css("display", "none");
$
(
".completebox"
).
css
(
"display"
,
"block"
);
//
$(".completebox").css("display", "block");
}
else
{
//
} else {
ui
.
error
(
data
.
info
);
//
ui.error(data.info);
return
;
//
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