Init Repo

This commit is contained in:
root
2019-09-06 23:53:10 +08:00
commit f0ef89dfbb
7905 changed files with 914138 additions and 0 deletions

View File

@ -0,0 +1,27 @@
{extend name="default/base" /}
{block name="title"}账户安全 - {__block__}{/block}
{block name="css"}
<link rel="stylesheet" href="__WECHAT__/css/security.css?v={$v}">
{/block}
{block name="header"}
{php}$Title = "账户安全"{/php}
{include file="default/header" /}
{/block}
{block name="main"}
<section class="ui-container">
<ul class="ui-list ui-list-text ui-list-link wst-se-l">
<li class="line" onclick="javascript:inLogin();">
<span class="pay"></span><h5 class="ui-nowrap">{if($user['loginPwd']==0)}设置{else}修改{/if}登录密码</h5></a>
</li>
<li class="line" onclick="javascript:inPay();">
<span class="pay"></span><h5 class="ui-nowrap">{if($user['payPwd']==0)}设置{else}修改{/if}支付密码</h5></a>
</li>
<li onclick="javascript:inPhone();">
<span class="phone"></span><h5 class="ui-nowrap">{if($user['userPhone']==0)}绑定{else}修改{/if}手机号码</h5>
</li>
</ul>
</section>
{/block}
{block name="js"}
<script type='text/javascript' src='__WECHAT__/users/security/security.js?v={$v}'></script>
{/block}

View File

@ -0,0 +1,334 @@
var time = 0;
var isSend = false;
$(document).ready(function(){
WST.initFooter('user');
});
//修改登录密码
function inLogin(){
location.href = WST.U('wechat/users/editLoginPass');
}
function editLogin(type){
if(type==1){
var orloginPwd = $('#orloginPwd').val();
if(orloginPwd==''){
WST.msg('原密码不能为空','info');
$('#orloginPwd').focus();
return false;
}
}
var loginPwd = $('#loginPwd').val();
var cologinPwd = $('#cologinPwd').val();
if(loginPwd==''){
WST.msg('新密码不能为空','info');
$('#loginPwd').focus();
return false;
}
if(cologinPwd==''){
WST.msg('确认密码不能为空','info');
$('#cologinPwd').focus();
return false;
}
if(loginPwd.length < 6){
WST.msg('请输入6位以上数字或者字母密码','info');
$('#cologinPwd').focus();
return false;
}
if(cologinPwd!=loginPwd){
WST.msg('确认密码不一致','info');
$('#cologinPwd').focus();
return false;
}
if(window.conf.IS_CRYPTPWD==1){
var public_key=$('#key').val();
var exponent="10001";
var rsa = new RSAKey();
rsa.setPublic(public_key, exponent);
if(type==1)var orloginPwd = rsa.encrypt(orloginPwd);
var loginPwd = rsa.encrypt(loginPwd);
}
WST.load('设置中···');
var param = {};
param.type = type;
if(type==1)param.oldPass = orloginPwd;
param.newPass = loginPwd;
$('#modifyPwd').addClass("active").attr('disabled', 'disabled');
$.post(WST.U('wechat/users/editloginPwd'), param, function(data){
var json = WST.toJson(data);
if( json.status == 1 ){
WST.msg(json.msg,'success');
setTimeout(function(){
location.href = WST.U('wechat/users/security');
},2000);
}else{
WST.msg(json.msg,'warn');
$('#modifyPwd').removeAttr('disabled').removeClass("active");
}
WST.noload();
data = json = null;
});
}
//修改支付密码
function inPay(){
location.href = WST.U('wechat/users/editPayPass');
}
function editPay(type){
if(type==1){
var orpayPwd = $('#orpayPwd').val();
if(orpayPwd==''){
WST.msg('原密码不能为空','info');
$('#orpayPwd').focus();
return false;
}
}
var payPwd = $('#payPwd').val();
var copayPwd = $('#copayPwd').val();
if(payPwd==''){
WST.msg('新密码不能为空','info');
$('#payPwd').focus();
return false;
}
if(copayPwd==''){
WST.msg('确认密码不能为空','info');
$('#copayPwd').focus();
return false;
}
if(payPwd.length !=6){
WST.msg('请输入6位数字密码','info');
$('#copayPwd').focus();
return false;
}
if(copayPwd!=payPwd){
WST.msg('确认密码不一致','info');
$('#copayPwd').focus();
return false;
}
if(window.conf.IS_CRYPTPWD==1){
var public_key=$('#key').val();
var exponent="10001";
var rsa = new RSAKey();
rsa.setPublic(public_key, exponent);
if(type==1)var orpayPwd = rsa.encrypt(orpayPwd);
var payPwd = rsa.encrypt(payPwd);
}
WST.load('设置中···');
var param = {};
param.type = type;
if(type==1)param.oldPass = orpayPwd;
param.newPass = payPwd;
$('#modifyPwd').addClass("active").attr('disabled', 'disabled');
$.post(WST.U('wechat/users/editpayPwd'), param, function(data){
var json = WST.toJson(data);
if( json.status == 1 ){
WST.msg(json.msg,'success');
setTimeout(function(){
location.href = WST.U('wechat/users/security');
},2000);
}else{
WST.msg(json.msg,'warn');
$('#modifyPwd').removeAttr('disabled').removeClass("active");
}
WST.noload();
data = json = null;
});
}
//找回支付密码
function backpayCode(){
if(WST.conf.SMS_VERFY==1){
var smsVerfy = $('#smsVerfy').val();
if(smsVerfy ==''){
WST.msg('请输入验证码','info');
$('#smsVerfy').focus();
return false;
}
}
var param = {};
param.smsVerfy = smsVerfy;
if(isSend)return;
isSend = true;
$.post(WST.U('wechat/users/backpayCode'), param, function(data){
var json = WST.toJson(data);
if( json.status == 1 ){
WST.msg(json.msg,'success');
time = 120;
$('#obtain').attr('disabled', 'disabled').html('120秒获取');
var task = setInterval(function(){
time--;
$('#obtain').html(''+time+"秒获取");
if(time==0){
isSend = false;
clearInterval(task);
$('#obtain').removeAttr('disabled').html("重新发送");
}
},1000);
}else{
WST.msg(json.msg,'warn');
WST.getVerify("#verifyImg");
isSend = false;
}
data = json = null;
});
}
function backPaypwd(type){
if(type==1){
var payPwd = $('#payPwd').val();
var copayPwd = $('#copayPwd').val();
if(payPwd==''){
WST.msg('新密码不能为空','info');
$('#payPwd').focus();
return false;
}
if(copayPwd==''){
WST.msg('确认密码不能为空','info');
$('#copayPwd').focus();
return false;
}
if(payPwd.length !=6){
WST.msg('请输入6位数字密码','info');
$('#copayPwd').focus();
return false;
}
if(copayPwd!=payPwd){
WST.msg('确认密码不一致','info');
$('#copayPwd').focus();
return false;
}
if(window.conf.IS_CRYPTPWD==1){
var public_key=$('#key').val();
var exponent="10001";
var rsa = new RSAKey();
rsa.setPublic(public_key, exponent);
var payPwd = rsa.encrypt(payPwd);
}
WST.load('设置中···');
var param = {};
param.newPass = payPwd;
$('#modifyPwd').addClass("active").attr('disabled', 'disabled');
$.post(WST.U('wechat/users/resetbackPay'), param, function(data){
var json = WST.toJson(data);
if( json.status == 1 ){
WST.msg(json.msg,'success');
setTimeout(function(){
location.href = WST.U('wechat/users/security');
},2000);
}else{
WST.msg(json.msg,'warn');
$('#modifyPwd').removeAttr('disabled').removeClass("active");
}
WST.noload();
data = json = null;
});
}else{
var phoneCode = $('#phoneCode').val();
if(phoneCode==''){
WST.msg('请输入短信验证码','info');
$('#phoneCode').focus();
return false;
}
var param = {};
param.phoneCode = phoneCode;
$('#modifyPhone').addClass("active").attr('disabled', 'disabled');
$.post(WST.U('wechat/users/verifybackPay'), param, function(data){
var json = WST.toJson(data);
if( json.status == 1 ){
WST.msg(json.msg,'success');
setTimeout(function(){
location.href = WST.U('wechat/users/backPayPass');
},2000);
}else{
WST.msg(json.msg,'warn');
$('#modifyPhone').removeAttr('disabled').removeClass("active");
}
data = json = null;
});
}
}
//修改手机
function inPhone(){
location.href = WST.U('wechat/users/editPhone');
}
//发送短信
function obtainCode(type){
if(type==0){
var userPhone = $('#userPhone').val();
if(userPhone ==''){
WST.msg('请输入手机号码','info');
$('#userPhone').focus();
return false;
}
}
if(WST.conf.SMS_VERFY==1){
var smsVerfy = $('#smsVerfy').val();
if(smsVerfy ==''){
WST.msg('请输入验证码','info');
$('#smsVerfy').focus();
return false;
}
}
var param = {};
param.userPhone = userPhone;
param.smsVerfy = smsVerfy;
if(isSend)return;
isSend = true;
$.post(WST.U('wechat/users/'+((type==0)?"sendCodeTie":"sendCodeEdit")), param, function(data){
var json = WST.toJson(data);
if( json.status == 1 ){
WST.msg(json.msg,'success');
time = 120;
$('#obtain').attr('disabled', 'disabled').html('120秒获取');
var task = setInterval(function(){
time--;
$('#obtain').html(''+time+"秒获取");
if(time==0){
isSend = false;
clearInterval(task);
$('#obtain').removeAttr('disabled').html("重新发送");
}
},1000);
}else{
WST.msg(json.msg,'warn');
WST.getVerify("#verifyImg");
isSend = false;
}
data = json = null;
});
}
//修改手机号码
function editPhone(type){
if(type==0){
var userPhone = $('#userPhone').val();
if(userPhone==''){
WST.msg('手机号码不能为空','info');
$('#userPhone').focus();
return false;
}
}
var phoneCode = $('#phoneCode').val();
if(phoneCode==''){
WST.msg('请输入短信验证码','info');
$('#phoneCode').focus();
return false;
}
var param = {};
param.phoneCode = phoneCode;
$('#modifyPhone').addClass("active").attr('disabled', 'disabled');
$.post(WST.U('wechat/users/'+((type==0)?"phoneEdit":"phoneEdito")), param, function(data){
var json = WST.toJson(data);
if( json.status == 1 ){
WST.msg(json.msg,'success');
if(type==0){
setTimeout(function(){
location.href = WST.U('wechat/users/security');
},2000);
}else{
setTimeout(function(){
location.href = WST.U('wechat/users/editPhoneo');
},2000);
}
}else{
WST.msg(json.msg,'warn');
$('#modifyPhone').removeAttr('disabled').removeClass("active");
}
data = json = null;
});
}

View File

@ -0,0 +1,64 @@
{extend name="default/base" /}
{block name="title"}找回支付密码 - {__block__}{/block}
{block name="css"}
<link rel="stylesheet" href="__WECHAT__/css/security.css?v={$v}">
{/block}
{block name="header"}
{php}$Title = "找回支付密码"{/php}
{include file="default/header" /}
{/block}
{block name="footer"}
{/* 大加载 */}
<div class="ui-loading-block" id="Loadl">
<div class="ui-loading-cnt">
<i class="ui-loading-bright"></i>
<p id="j-Loadl">正在加载中...</p>
</div>
</div>
{if($user['phoneType']==1)}
<div class="wst-se-footer">
<button id="modifyPhone" type="button" class="button" onclick="javascript:backPaypwd({$user['backType']});">{if($user['backType']==0)}下一步{else}确定{/if}</button>
</div>
{else}
<div class="wst-se-footer">
<button id="modifyPhone" type="button" class="button" onclick="javascript:inPhone();">去绑定手机号码</button>
</div>
{/if}
{/block}
{block name="main"}
<input type="hidden" value="{:WSTConf('CONF.pwdModulusKey')}" id="key" autocomplete="off">
<section class="ui-container">
{if($user['backType']==1)}
<div class="wst-se-pay">
<div class="pay"><input id="payPwd" type="password" placeholder="新密码" maxlength="6"></div>
<div class="pay"><input id="copayPwd" type="password" placeholder="确认密码" maxlength="6"></div>
</div>
{else}
{if($user['phoneType']==1)}
<div class="wst-se-pay">
<div class="phone">您绑定的手机号码为:{$user['userPhone']}</div>
{if(WSTConf('CONF.smsVerfy')==1)}
<div class="verify">
<input id="smsVerfy" type="text" placeholder="输入验证码" maxlength="10">
<img id='verifyImg' src="{:url('wechat/users/getVerify')}" onclick='javascript:WST.getVerify("#verifyImg")'>
</div>
{/if}
<div class="verify">
<input id="phoneCode" type="text" placeholder="输入短信验证码" maxlength="8">
<button id="obtain" type="button" class="ui-btn-primary" onclick="javascript:backpayCode()">获取验证码</button>
</div>
</div>
{else}
<ul class="ui-row-flex wst-flexslp ui-whitespace">
<li class="ui-col ui-flex ui-flex-pack-center">
<p>对不起,你还未绑定手机号码,请去绑定手机号码。</p>
</li>
</ul>
{/if}
{/if}
</section>
{/block}
{block name="js"}
<script type="text/javascript" src="__STATIC__/js/rsa.js"></script>
<script type='text/javascript' src='__WECHAT__/users/security/security.js?v={$v}'></script>
{/block}

View File

@ -0,0 +1,35 @@
{extend name="default/base" /}
{block name="title"}{if($user['loginPwd']==1)}修改{else}设置{/if}登录密码 - {__block__}{/block}
{block name="css"}
<link rel="stylesheet" href="__WECHAT__/css/security.css?v={$v}">
{/block}
{block name="header"}
{php}$user['loginPwd']==1?$Title = "修改登录密码":$Title = "设置登录密码"{/php}
{include file="default/header" /}
{/block}
{block name="footer"}
{/* 大加载 */}
<div class="ui-loading-block" id="Loadl">
<div class="ui-loading-cnt">
<i class="ui-loading-bright"></i>
<p id="j-Loadl">正在加载中...</p>
</div>
</div>
<div class="wst-se-footer">
<button id="modifyPwd" type="button" class="button" onclick="javascript:editLogin({$user['loginPwd']});">确定</button>
</div>
{/block}
{block name="main"}
<input type="hidden" value="{:WSTConf('CONF.pwdModulusKey')}" id="key" autocomplete="off">
<section class="ui-container">
<div class="wst-se-pay">
{if($user['loginPwd']==1)}<div class="pay"><input id="orloginPwd" type="password" placeholder="原密码"></div>{/if}
<div class="pay"><input id="loginPwd" type="password" placeholder="新密码"></div>
<div class="pay"><input id="cologinPwd" type="password" placeholder="确认密码"></div>
</div>
</section>
{/block}
{block name="js"}
<script type="text/javascript" src="__STATIC__/js/rsa.js"></script>
<script type='text/javascript' src='__WECHAT__/users/security/security.js?v={$v}'></script>
{/block}

View File

@ -0,0 +1,36 @@
{extend name="default/base" /}
{block name="title"}{if($user['payPwd']==1)}修改{else}设置{/if}支付密码 - {__block__}{/block}
{block name="css"}
<link rel="stylesheet" href="__WECHAT__/css/security.css?v={$v}">
{/block}
{block name="header"}
{php}$user['payPwd']==1?$Title = "修改支付密码":$Title = "设置支付密码"{/php}
{include file="default/header" /}
{/block}
{block name="footer"}
{/* 大加载 */}
<div class="ui-loading-block" id="Loadl">
<div class="ui-loading-cnt">
<i class="ui-loading-bright"></i>
<p id="j-Loadl">正在加载中...</p>
</div>
</div>
<div class="wst-se-footer">
<button id="modifyPwd" type="button" class="button" onclick="javascript:editPay({$user['payPwd']});">确定</button>
</div>
{/block}
{block name="main"}
<input type="hidden" value="{:WSTConf('CONF.pwdModulusKey')}" id="key" autocomplete="off">
<section class="ui-container">
<div class="wst-se-pay">
{if($user['payPwd']==1)}<div class="pay"><input id="orpayPwd" type="password" placeholder="原密码" maxlength="6"></div>{/if}
<div class="pay"><input id="payPwd" type="password" placeholder="新密码" maxlength="6"></div>
<div class="pay"><input id="copayPwd" type="password" placeholder="确认密码" maxlength="6"></div>
</div>
{if($user['payPwd']==1)}<p class="wst-se-back"><a href="{:url('wechat/users/backPayPass')}">忘记支付密码?</a></p>{/if}
</section>
{/block}
{block name="js"}
<script type="text/javascript" src="__STATIC__/js/rsa.js"></script>
<script type='text/javascript' src='__WECHAT__/users/security/security.js?v={$v}'></script>
{/block}

View File

@ -0,0 +1,45 @@
{extend name="default/base" /}
{block name="title"}{if($user['phoneType']==1)}修改{else}绑定{/if}手机号码 - {__block__}{/block}
{block name="css"}
<link rel="stylesheet" href="__WECHAT__/css/security.css?v={$v}">
{/block}
{block name="header"}
{php}$user['phoneType']==1?$Title = "修改手机号码":$Title = "绑定手机号码"{/php}
{include file="default/header" /}
{/block}
{block name="footer"}
{/* 大加载 */}
<div class="ui-loading-block" id="Loadl">
<div class="ui-loading-cnt">
<i class="ui-loading-bright"></i>
<p id="j-Loadl">正在加载中...</p>
</div>
</div>
<div class="wst-se-footer">
<button id="modifyPhone" type="button" class="button" onclick="javascript:editPhone({$user['phoneType']});">{if($user['phoneType']==1)}下一步{else}确定{/if}</button>
</div>
{/block}
{block name="main"}
<section class="ui-container">
<div class="wst-se-pay">
{if($user['phoneType']==1)}
<div class="phone">您绑定的手机号码为:{$user['userPhone']}</div>
{else}
<div class="pay"><input id="userPhone" type="tel" placeholder="手机号码"></div>
{/if}
{if(WSTConf('CONF.smsVerfy')==1)}
<div class="verify">
<input id="smsVerfy" type="text" placeholder="输入验证码" maxlength="10">
<img id='verifyImg' src="{:url('wechat/users/getVerify')}" onclick='javascript:WST.getVerify("#verifyImg")'>
</div>
{/if}
<div class="verify">
<input id="phoneCode" type="text" placeholder="输入短信验证码" maxlength="8">
<button id="obtain" type="button" class="ui-btn-primary" onclick="javascript:obtainCode({$user['phoneType']})">获取验证码</button>
</div>
</div>
</section>
{/block}
{block name="js"}
<script type='text/javascript' src='__WECHAT__/users/security/security.js?v={$v}'></script>
{/block}