安全中心

master
sunke 5 years ago
parent 3d8ed52daf
commit 372ec046d0

@ -0,0 +1,320 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace Home\Controller;
use Think\Controller;
use Base\Repository\PromoteRepository;
/**
* 扩展控制器
* 用于调度各个扩展的URL访问需求
*/
class SafeController extends BaseController{
public function setSafeIndex() {
$id = get_pid();
$safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd')->find();
if(empty($safePwd['second_pwd'])) {
return $this->display();
}else {
return $this->display("verifySafePwd");
}
}
public function setSafePassword() {
$password = $_REQUEST['password'];
$confirmpassword = $_REQUEST['confirm_password'];
if($password == "") {
$this->error("新密码不能为空");
}
if($confirmpassword == "") {
$this->error("确认密码不能为空");
}
if($password !== $confirmpassword) {
$this->error("两次密码不一致,请确认!");
}
$this->checkPaswwordFormat($confirmpassword);
$data['second_pwd'] = $this->think_ucenter_md5($confirmpassword, UC_AUTH_KEY);
$id = get_pid();
$updateRs = M("promote","tab_")->where(['id'=>$id])->save($data);
if($updateRs) {
$this->success("安全密码设置成功");
}
}
public function think_ucenter_md5($str, $key = 'ThinkUCenter')
{
return '' === $str ? '' : md5(sha1($str) . $key);
}
public function checkPaswwordFormat($confirmpwd) {
if(strlen($confirmpwd) < 6 || strlen($confirmpwd) > 24) {
$this->error("密码至少6位数,最多24位");
}
if(preg_match("/^\d*$/",$confirmpwd))
{
$this->error("密码必须包含字母,强度:弱");
}
if(preg_match("/^[a-z]*$/i",$confirmpwd))
{
$this->error("密码必须包含数字,强度:中");
}
if(!preg_match("/^[a-z\d]*$/i",$confirmpwd))
{
$this->error("密码只能包含数字和字母,强度:强");
}
}
public function modifyPwdIndex() {
if($_POST) {
$oldpwd = $_POST['oldpwd'];
$safepwd = $_POST['safepwd'];
if(empty($oldpwd)) {
$this->error("旧密码不能为空");
}
if(empty($safepwd)) {
$this->error("安全密码不能为空");
}
$id = get_pid();
$safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd')->find();
if($safePwd['second_pwd'] == $this->think_ucenter_md5($oldpwd, UC_AUTH_KEY)){
$data['second_pwd'] = $this->think_ucenter_md5($safepwd, UC_AUTH_KEY);
$updateRs = M("promote","tab_")->where(['id'=>$id])->save($data);
if($updateRs) {
$this->success("修改成功");
}else {
$this->error("修改失败,请重新操作");
}
}
else {
$this->error('旧密码错误,请确认');
}
}
$this->display();
}
public function verifySafePwd() {
if($_POST) {
$password = $_POST['safepwd'];
if($password == "" || $password == NULL) {
$this->error("密码不能为空");
}
$id = get_pid();
$safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd')->find();
if($safePwd['second_pwd'] == $this->think_ucenter_md5($password, UC_AUTH_KEY)){
$this->success("登陆成功,即将跳转",U('modifyPwdIndex'));
}
else {
$this->error('密码错误,请重新输入密码');
}
}
$this->display();
}
//修改登陆密码
public function modifyLoginPassword() {
if($_POST) {
$oldpwd = $_POST['oldpwd'];
$newpwd = $_POST['newpwd'];
$id = get_pid();
$pwd = M('promote','tab_')->where(['id'=>$id])->field('password')->find();
$password = $pwd["password"];
if($oldpwd != "0" && empty($oldpwd)) {
$this->error("旧密码不能为空");
return false;
}
if($newpwd != "0" && empty($newpwd)) {
$this->error("新密码不能为空");
return false;
}
if($this->think_ucenter_md5($oldpwd, UC_AUTH_KEY) !== $password) {
$this->error("请输入正确旧密码");
return false;
}
$this->checkPaswwordFormat($newpwd);
$data['password'] = $this->think_ucenter_md5($newpwd, UC_AUTH_KEY);
$updateRs = M('promote','tab_')->where(['id'=>$id])->save($data);
if($updateRs) {
$this->success("修改成功");
}else {
$this->error("修改失败");
return false;
}
}
$this->display();
}
//修改用户信息
public function modifyBaseInfo() {
if($_POST) {
$username = $_REQUEST['username']; //真实姓名
$id_card = $_REQUEST["id_card"]; //身份证号码
$tel = $_REQUEST['tel'];
$address = $_REQUEST['s_province'].$_REQUEST['s_city'].$_REQUEST['s_county']; //省市县
$contactAddress = $_REQUEST['address']; //具体地址
// $userAddress = $address.'('.$contactAddress.')';
$userAddress[0] = $_REQUEST['s_province'].','.$_REQUEST['s_city'].','.$_REQUEST['s_county'];
$userAddress[1] = $contactAddress;
$email = $_REQUEST['email'];
$account_type = $_REQUEST['account_type']; //账户类型
$bank_name = $_REQUEST["bank_name"]; //开户银行
$bank_account = $_REQUEST['bank_account']; //银行账户名
$bank_card = $_REQUEST['bank_card']; //银行账号
$idcarpic = $_REQUEST['idcarpic'];
$businesspic = $_REQUEST['businesspic'];
$agreementpic = $_REQUEST['agreementpic'];
if(empty($_REQUEST['agree'])) {
$this->error("请先认真阅读协议,然后勾选协议");
return false;
}
if(empty($username)) {
$this->error("真实姓名不能为空");
return false;
}
if(empty($tel)) {
$this->error("手机号码不能为空");
return false;
}
$pattern = "/^1[3|5|7|8]\\d{9}$/i";
if(!preg_match($pattern, $tel)) {
$this->error("手机号码格式不合法");
return false;
}
if(empty($id_card)) {
$this->error("身份证号码不能为空");
return false;
}
if(empty($idcarpic)) {
$this->error("身份证证件照不能为空");
return false;
}
if(!is_idcard($id_card)) {
$this->error('证件号码错误');
return false;
}
if(empty($address)) {
$this->error("城市地址不能为空");
return false;
}
if(empty($contactAddress)) {
$this->error("联系地址不能为空");
}
if(empty($email)) {
$this->error("邮箱不能为空");
return false;
}
$patternemail = "/^([0-9A-Za-z\\-_\\.]+)@([0-9a-z]+\\.[a-z]{2,3}(\\.[a-z]{2})?)$/i";
if (!preg_match($patternemail, $email)) {
$this->error('邮箱地址错误');
return false;
}
if(empty($account_type)) {
$this->error("账户类型不能为空");
return false;
}
if(empty($bank_name)) {
$this->error("开户银行不能为空");
return false;
}
if(empty($bank_account)) {
$this->error("银行户名不能为空");
return false;
}
$bank_account_pattern = "/^[\x{4e00}-\x{9fa5}]{2,}$/u";
if (!preg_match($bank_account_pattern, $bank_account)) {
$this->error('银行卡开户人姓名错误');
return false;
}
if(empty($bank_card)) {
$this->error("卡号不能为空");
return false;
}
$bank_card_pattern = "/^\d{10,19}$/u";
if (!preg_match($bank_card_pattern, $bank_card)) {
$this->error('卡号格式错误');
return false;
}
$id = get_pid();
$data["real_name"] = $username;
$data['mobile_phone'] = $tel;
$data['idcard'] = $id_card;
$data['address'] = json_encode($userAddress,FALSE);
$data['email'] = $email;
$data['account_type'] = $account_type;
$data['bank_name'] = $bank_name;
$data['bank_account'] = $bank_account;
$data['bank_card'] = $bank_card;
$data['idcarpic'] = $idcarpic;
$data['businesspic'] = $businesspic;
$data['agreementpic'] = $agreementpic;
if($account_type == "公司") {
$data['account_type'] = 1;
}else {
$data['account_type'] = 2;
}
$updateRs = M("promote","tab_")->where(['id'=>$id])->save($data);
if($updateRs) {
$this->success("更新信息成功");
}else {
$this->error("更新信息失败");
}
}else {
$id = get_PID();
$result = M("promote","tab_")->where(['id'=>$id])->select();
$promoteInfo = $result[0];
$idcarpic = $promoteInfo['idcarpic'];
$businesspic = $promoteInfo['businesspic'];
$agreementpic = $promoteInfo['agreementpic'];
$account_type = $promoteInfo['account_type'];
$address = $promoteInfo["address"];
if(!empty($idcarpic)) {
$idcarpicArr = explode(',', $idcarpic);
$str = '';
foreach ($idcarpicArr as $key => $value) {
$promoteInfo['valuedata'][$key] =$value;
}
}
if(!empty($businesspic)) {
$businesspicArr = explode(',', $businesspic);
$str = '';
foreach ($businesspicArr as $key1 => $value1) {
$promoteInfo['valuedata1'][$key1] =$value1;
}
}
if(!empty($agreementpic)) {
$agreementpicArr = explode(',', $agreementpic);
$str = '';
foreach ($agreementpicArr as $key2 => $value2) {
$promoteInfo['valuedata2'][$key2] =$value2;
}
}
if($account_type == 1) {
$promoteInfo['complanystatus'] = true;
$promoteInfo['personalstatus'] = false;
}else {
$promoteInfo['personalstatus'] = true;
$promoteInfo['complanystatus'] = false;
}
if(!empty(json_decode($address))) {
$addressArr = explode(',', json_decode($address)[0]);
$promoteInfo['addressdata'] = $addressArr;
}
$promoteInfo['address'] = json_decode($address);
$this->assign('promoteinfo', $promoteInfo);
}
$this->display();
}
}

@ -92,9 +92,14 @@
<a href="{:U('Apply/feature')}" class="<if condition='CONTROLLER_NAME eq Apply and (ACTION_NAME eq feature or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">资料专区</a>
<?php endif;?>
</div>
<?php if($isOpenQuery):?>
<div class="subNav jssubNav"><i class="prev_icon icon_fenbao"></i><span>安全管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<!-- <a href="{:U('Apply/app_index')}" class="<if condition='CONTROLLER_NAME eq Apply and ACTION_NAME eq app_index '>active</if> ">APP列表</a>-->
<a href="{:U('Download/index')}" class="<if condition='CONTROLLER_NAME eq Download and (ACTION_NAME eq index or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">下载日志管理</a>
<a href="{:U('Safe/modifyloginpassword')}" class="<if condition='CONTROLLER_NAME eq Safe and (ACTION_NAME eq modifyloginpassword or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">修改登录密码</a>
<a href="{:U('Safe/setSafeIndex')}" class="<if condition='CONTROLLER_NAME eq Safe and (ACTION_NAME eq setSafeIndex or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">设置安全密码</a>
<a href="{:U('Safe/modifyBaseInfo')}" class="<if condition='CONTROLLER_NAME eq Safe and (ACTION_NAME eq modifyBaseInfo or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">用户基本信息</a>
</div>
<div class="subNav jssubNav"><i class="prev_icon icon_fenbao"></i><span>测试资源</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<a href="{:U('TestResource/index')}" class="<if condition='CONTROLLER_NAME eq TestResource and (ACTION_NAME eq index or ACTION_NAME eq add or ACTION_NAME eq apply ) '>active</if> ">测试资源申请</a>

@ -0,0 +1,826 @@
<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/account.css" rel="stylesheet" >
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
<link rel="stylesheet" type="text/css" href="__STATIC__/webuploader/webuploader.css" media="all">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript" src="__STATIC__/webuploader/webuploader.js"></script>
<!-- <script type="text/javascript" src="__STATIC__/webuploader/webuploader.inc.js"></script> -->
<script type="text/javascript" src="__STATIC__/webuploader/webuploader.before.js"></script>
<style>.notice_tip {padding-left:20px;color:#999;font-size:12px;}
.formtxt{display:inline-block;width:232px;}
.trunk-list .table2 .r .qrcodeboxwrap {padding-left:0;padding-right:20px;padding-bottom:20px;}
.qrcodebox img {width:100px;height:100px;}
.qrcodebox p {font-size:12px;margin:0;color:#666;}
.qrcodebox p span{color:red;}
.qrcodeboxwrap~.notice_tip{vertical-align:top;display:inline-block;margin-top:20px;}
.mail_suffix {position: absolute;
top: 43px;
border: 1px solid rgb(229,229,229);
border-radius: 2px;
color: #666;
font-size: 11px;
width: 230px;
padding: 0 10px;
line-height: 1.4;
z-index: 1;
background: #FFF;
height: 200px;
overflow: hidden;
overflow-y: auto;}
.mail_suffix li {
padding: 2px 0;
cursor: pointer;
}
.mail_suffix li:first-child {padding-top:4px;}
.mail_suffix li:last-child{padding-bottom:4px;}
#tab{
margin-top:10px;
height:46px;display:flex;
justify-content: space-between;
align-items: center;
background: #ecf4f5;
width:100%;
}
</style>
</block>
<block name="body" >
<script type="text/javascript" src="__STATIC__/provincecityarea/area1.js" ></script>
<div class="page-list normal_list promote-base_info-form" style="min-height:120vh">
<div class="trunk-title">
<img src="__IMG__/20180207/icon_normal_zhanghu.png">
<span class="title_main">资质认证</span>
</div>
<div class="trunk-content article">
<div class="trunk-list baseInfo">
<!-- <div style="" id="tab">
<span style="padding-left:20px;color:#26c7dbd4" >注意:密码必须由字母与数字组合</span>
</div>-->
<form action="{:U('Safe/modifyBaseInfo')}" novalidate="novalidate" method="post" class="paw_info">
<table class="table2" style="margin-top:20px;margin-left:30px;width:100%" >
<tr>
<td class="l" style="font-size:17px">真实姓名:</td>
<td class="r"><input type="text" class="input txt" name="username" id="password" style="width:430px" placeholder="{$promoteinfo['real_name']}" value="{$promoteinfo['real_name']}">
<span id="password_tip"></span></td>
</tr>
<tr>
<td class="l">身份证号码:</td>
<td class="r"><input type="text" class="input txt" name="id_card" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['idcard']}" value="{$promoteinfo['idcard']}">
<span id="confirm_password_tip"></span></td>
</tr>
<tr>
<td class="l">身份证证件:</td>
<td class="r">
<input type="hidden" name="idcarpic" id="cover_id_{$field.name}" value="{$promoteinfo['idcarpic']}"/>
<div id="uploader-demo" >
<div id="idpic">
<div class="webuploader-pick" style="line-height:30px;" onclick="">上传证件</div>
</div>
<div id="idpicList" class="uploader-list" style="display: flex;"></div>
</td>
</tr>
<tr>
<td class="l" colspan="5">
<div style="" id="tab">
<span style="padding-left:20px;color:#26c7dbd4" >提醒请上传身份证正反面图片为jpg、png格式(不超过2M)</span>
</div>
</td>
</tr>
<tr>
<td class="l">营业执照:</td>
<td class="r">
<input type="hidden" name="businesspic" id="cover_id_{$field.name}" value="{$promoteinfo['businesspic']}"/>
<div id="uploader-demo" >
<div id="businesspic">
<div class="webuploader-pick" style="line-height:30px" onclick="">上传执照</div>
</div>
<div id="businesspicList" class="uploader-list" style="display: flex;"></div>
</td>
</tr>
<tr>
<td class="l" colspan="5">
<div style="" id="tab">
<span style="padding-left:20px;color:#26c7dbd4" >*如果是公司请上传营业执照</span>
</div>
</td>
</tr>
<tr>
<td class="l" style="margin-top:20px">合作合同:</td>
<td class="r">
<input type="hidden" name="agreementpic" id="cover_id_{$field.name}" value="{$promoteinfo['agreementpic']}"/>
<div id="uploader-demo" >
<div id="agreementpic">
<div class="webuploader-pick" style="line-height:30px" onclick="">上传合同</div>
</div>
<div id="agreementpicList" class="uploader-list" style="display: flex;"></div>
</td>
</tr>
<tr>
<td class="l" colspan="5">
<div style="" id="tab">
<span style="padding-left:20px;color:#26c7dbd4" >*须上传平台与贵公司(工作室)签署的合作合同</span>
</div>
</td>
</tr>
<!-- <tr>
<td class="l"></td>
<td class="r">
<input type="hidden" name="id" value="{$data.id}">
<input type="submit" class="tj btn ajax-post" value="保存" style="width:200px" title="" target-form="paw_info">
</td>
</tr>-->
<tr>
<td class="l" colspan="5">
<div class="tab" style=" color: #6a7082;border-bottom: 1px solid #E0E7F1;margin-top:70px;width:100%;display: flex;justify-content: space-between;align-items: center;height:40px">
<span class="title_main" style="font-size:16px;font-weight: 600">结算信息</span>
</div>
</td>
</tr>
<tr >
<td class="l" colspan="5" >
<div style="" id="tab">
<span style="padding-left:20px;color:#26c7dbd4" >*提醒!请确认开户行信息,如果与实际不符,有可能出现打款到账延时例子中国工商银行XX省XX市XXX支行</span>
</div>
</td>
</tr>
<tr style="margin-top:50px">
<td class="l">电话:</td>
<td class="r"><input type="text" class="input txt" name="tel" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['mobile_phone']}" value="{$promoteinfo['mobile_phone']}">
<span id="confirm_password_tip"></span></td>
</tr>
<tr>
<td class="l"><span class="req">*</span>联系地址:</td>
<td class="r ">
<div class="info areainfo">
<div>
<select id="s_province" name="s_province" class="areaselect1 select_gallery" style="width: 90px;"></select>  
<select id="s_city" name="s_city" class="areaselect2 select_gallery" style="width: 120px;"></select>  
<select id="s_county" name="s_county" class="areaselect3 select_gallery" style="width: 90px;"></select>
<input type="text" class="input txt" name="address" id="confirm_password" style="width:430px;margin-left:20px" placeholder="{$promoteinfo['address'][1]}" value="{$promoteinfo['address'][1]}">
<script type="text/javascript" >
var pro="{:$promoteinfo['addressdata']['0']}";
var city="{:$promoteinfo['addressdata']['1']}";
var are="{:$promoteinfo['addressdata']['2']}";
_init_area(pro,city,are);</script>
</div>
<div id="show"></div>
</div>
<script type="text/javascript">
var Gid = document.getElementById ;
var showArea = function(){
Gid('show').innerHTML = "<h3>省" + Gid('s_province').value + " - 市" +
Gid('s_city').value + " - 县/区" +
Gid('s_county').value + "</h3>"
}
Gid('s_county').setAttribute('onchange','showArea()');
</script>
<span id="bank_area_tip"></span>
</td>
</tr>
<tr>
<td class="l">邮箱:</td>
<td class="r"><input type="text" class="input txt" name="email" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['email']}" value="{$promoteinfo['email']}">
<span id="confirm_password_tip"></span></td>
</tr>
<tr>
<td class="l">账户类型:</td>
<td class="r"><input type="radio" class="input txt" name="account_type" value="公司" checked="{$promoteinfo['complanystatus']}">公司<input type="radio" class="input txt" style="margin-left:20px" name="account_type" value="个人" checked="{$promoteinfo['personlastatus']}">个人
<span id="confirm_password_tip"></span></td>
</tr>
<tr>
<td class="l">开户银行:</td>
<td class="r"><input type="text" class="input txt" name="bank_name" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['bank_name']}" value="{$promoteinfo['bank_name']}">
<span id="confirm_password_tip"></span></td>
</tr>
<tr>
<td class="l">银行账户名:</td>
<td class="r"><input type="text" class="input txt" name="bank_account" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['bank_account']}" value="{$promoteinfo['bank_account']}">
<span id="confirm_password_tip"></span></td>
</tr>
<tr>
<td class="l">银行账号:</td>
<td class="r"><input type="text" class="input txt" name="bank_card" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['bank_card']}" value="{$promoteinfo['bank_card']}">
<span id="confirm_password_tip"></span></td>
</tr>
<tr>
<td class="l"></td>
<td class="r"><input type="checkbox" class="input txt" style="margin-left:20px" name="agree" >我已仔细阅读,并同意<a href="#"><span style="color:#26c7dbd4">《游戏推广服务框架协议》</span></a>
<span id="confirm_password_tip"></span></td>
</tr>
<tr>
<td class="l"></td>
<td class="r">
<input type="hidden" name="id" value="{$data.id}">
<input type="submit" class="tj btn ajax-post" value="保存" style="width:200px" title="" target-form="paw_info">
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</block>
<block name="script">
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/mail_suffix.js"></script>
<script type="text/javascript" src="__STATIC__/bank.js"></script>
<script type="text/javascript">
var ajaxurl="{:U('Account/getArea')}";
function loadArea(areaId,areaType) {
$.post(ajaxurl,{'areaId':areaId},function(data){
if(areaType=='city'){
$('#'+areaType).html('<option value="-1">市/县</option>');
$('#district').html('<option value="-1">镇/区</option>');
}else if(areaType=='district'){
$('#'+areaType).html('<option value="-1">镇/区</option>');
}
if(areaType!='null'){
$.each(data,function(no,items){
$('#'+areaType).append('<option value="'+items.area_id+'">'+items.area_name+'</option>');
});
}
});
}
var tot="";
$("#province").change(function() {
tot+=$("#province").val();
});
$("#city").change(function() {
tot+=","+$("#city").val()
});
$("#district").change(function() {
tot+=","+$("#district").val()
});
$(".btn").click(function() {
$("#town").val(tot);
});
function add_mail_suffix(that) {
var suffix = $(that).data('suffix');
var input = $(that).closest('.mail_suffix').prev();
if(input.attr('data-mail').length>0) {
input.val(input.attr('data-mail')+suffix);
}
}
$(function() {
$('.tab td').on('click',function() {
var that = $(this);
$('.tabpan').removeClass('current');
that.siblings().removeClass('current');
that.addClass('current');
$('.tabpan').eq(that.index()).addClass('current');
return false;
});
$(".select_gallery").select2();
$('#email').focus(function () {
var val = $.trim($(this).val());
if(val) {
var index = val.indexOf('@');
if(index>-1){
var suffix = val.substring(index);
val = val.substring(0,index);
$(this).val(val).attr('data-suffix',suffix).attr('data-mail',val);
}
}
var html = '<ul class="mail_suffix">';
for(var item in mail_suffix) {
html += '<li onclick="add_mail_suffix(this)" data-suffix="'+mail_suffix[item]+'">'+mail_suffix[item]+'</li>';
}
html += '</ul>';
$(this).after(html);
$('body').click(function (event) {
var e = event || window.event;
var target = e.target || e.srcElement;
if($(target).attr('id') != 'email' && $(target).attr('class') != 'mail_suffix') {
$('.mail_suffix').remove();
}
return false;
});
return false;
}).blur(function (event) {
var e = event || window.event;
var target = e.target || e.srcElement;
var that = $(this);
if($(target).attr('id') == 'email' && $(target).attr('class') == 'mail_suffix') {
$('.mail_suffix').remove();
}
if(that.attr('data-mail')) {
var data_mail_index = that.attr('data-mail').indexOf('@');
if(data_mail_index>-1){
var data_mail = that.attr('data-mail');
that.val(data_mail);
that.attr('data-mail',data_mail.substring(0,data_mail_index));
that.attr('data-suffix',data_mail.substring(data_mail_index));
} else {
that.val(that.attr('data-mail')+that.attr('data-suffix'));
}
}
return false;
}).keyup(function () {
var val = $.trim($(this).val());
if(val.length>64) {val = val.substr(0,64);$(this).val(val);}
$(this).attr('data-mail',val);
return false;
});
var data_bank_name = '{$data.bank_name}';
var bank_name = '<option value="">请选择收款银行</option>';console.log(bank);
for(var bn in bank) {
if(data_bank_name == bank[bn]) {
bank_name += '<option value="'+bank[bn]+'" selected>'+bank[bn]+'</option>';
} else {
bank_name += '<option value="'+bank[bn]+'">'+bank[bn]+'</option>';
}
}
$('#bank_name').html(bank_name).select2();
AF.users.account_edit(1429);
AF.users.account_content_edit(1429);
_init_area();
_reset_area('','','');
});
</script>
<script type="text/javascript">
var uploaderImgidpic = WebUploader.create({
// 选完文件后,是否自动上传。
auto: true,
// swf文件路径
swf: '__STATIC__/webuploader/Uploader.swf',
// 文件接收服务端。
server: "{:U('File/uploadPicture',array('session_id'=>session_id(),'flag'=>true))}",
// 选择文件的按钮。可选。
// 内部根据当前运行是创建可能是input元素也可能是flash.
pick: {
id:'#idpic',
multiple:true
},
// dnd: false,
paste: document.body,
accept: {
title: '图片',
extensions: 'png,gif,jpg,jpeg,bmp',
mimeTypes: '.png,.gif,.jpg,.jpeg,.bmp',
},
// 不压缩image, 默认如果是jpeg文件上传前会压缩一把再上传
resize: false,
disableGlobalDnd: true,
fileNumLimit:5,
threads:5,
thumb:true,
compress:false,
prepareNextFile: true,
formData: function(){return $.extend(true, {}, userInfo);},
chunked:false,
duplicate: true
});
var imgListidpicData = [];
<?php if (!empty($promoteinfo['valuedata'])) :?>
var html = '';
$('#idpicList').css('margin-top','10px');
<?php foreach ($promoteinfo['valuedata'] as $value1) { ?>
<?php $value1 = (int)$value1; ?>
imgListidpicData.push(<?=$value1?>);
html += '<div id="' + <?=$value1?> + '" class="item flooring_page_img_box" style="margin-right: 10px;">';
html += '<a href="javascript:;"><img src="<?=get_cover($value1,"path")?>" style="width: 100px;height: 100px;cursor: move;"></a>';
html += '<h4 class="info" style="text-align: center;">';
html += '<a href="javascript:;" class="jsdelzip table_click" style="float:none;display:inline-block;" img-id="' + <?=$value1?> + '">删除</a>';
html += '</h4>';
html += '<div class="progress progress-striped active" style="display: none;">';
html += '<div class="progress-bar" role="progressbar" style="width: 100%;">100%</div>';
html += '</div>';
html += '</div>';
<?php }?>
$('#idpicList').html(html);
$('#idpicList').children().children('h4').children('.jsdelzip').on('click', function() {
var thisId = $(this).attr('img-id');
$(this).parent().parent().remove();
$.each(imgListidpicData,function(index, item) {
if (thisId == item) {
imgListidpicData.splice(index,1);
return false;
}
});
console.log('9999999')
console.log(imgListidpicData)
setidpicVal();
});
<?php endif ;?>
var thisIndex1 = 0;
var imgidpicList = $("#idpicList");
uploaderImgidpic.on( 'fileQueued', function( file ) {
var html = '';
html += '<div id="' + file.id + '" class="item" style="margin-right: 10px;">';
html += '<a href="javascript:;"><img src="" style="width: 100px;height: 100px;cursor: move;"></a>';
html += '<h4 class="info">' + file.name + '</h4>';
html += '<p class="state">等待上传...</p>';
html += '</div>';
imgidpicList.append(html);
imgidpicList.css('margin-top','10px');
var img1 = imgidpicList.children('#'+file.id).find('img');
uploaderImgidpic.makeThumb(file, function (error, src) {
if (error) {
return;
}
img1.attr('src', src);
}, 300, 300);
});
// 文件上传过程中创建进度条实时显示。
uploaderImgidpic.on( 'uploadProgress', function( file, percentage ) {
var $li = $( '#'+file.id ),
$percent = $li.find('.progress .progress-bar');
// 避免重复创建
if ( !$percent.length ) {
$percent = $('<div class="progress progress-striped active">' +
'<div class="progress-bar" role="progressbar" style="width: 0%">' +
'</div>' +
'</div>').appendTo( $li ).find('.progress-bar');
}
$li.find('p.state').text('上传中');
$percent.css( 'width', percentage * 100 + '%' );
$percent.text( (percentage * 100).toFixed(0) + '%' );
});
uploaderImgidpic.on( 'uploadSuccess', function( file , response) {
imgListidpicData.push(Number(response.id));
setidpicVal();
$( '#'+file.id ).find('p.state').text('已上传').fadeOut(800);
//alert(JSON.stringify(response));
$('#'+file.id).find('h4.info').append('<a href="javascript:;" class="jsdelzip table_click" style="float:none;display:inline-block;margin-left:10px;">删除</a>');
$('#'+file.id).find('.jsdelzip').on('click',function() {
uploaderImgidpic.removeFile( file.id );
$('#'+file.id).remove();
$.each(imgListidpicData,function(index, item) {
if (response.id == item) {
imgListidpicData.splice(index,1);
return false;
}
});
setidpicVal();
console.log(imgListidpicData);
return false;
});
});
function setidpicVal()
{
var idpic = '';
$.each(imgListidpicData,function(index, item) {
idpic += item + ',';
});
idpic = idpic.substring(0, idpic.length - 1);
$('input[name=idcarpic]').val(idpic);
}
</script>
<script>
var uploaderImgbusinesspic = WebUploader.create({
// 选完文件后,是否自动上传。
auto: true,
// swf文件路径
swf: '__STATIC__/webuploader/Uploader.swf',
// 文件接收服务端。
server: "{:U('File/uploadPicture',array('session_id'=>session_id(),'flag'=>true))}",
// 选择文件的按钮。可选。
// 内部根据当前运行是创建可能是input元素也可能是flash.
pick: {
id:'#businesspic',
multiple:true
},
// dnd: false,
paste: document.body,
accept: {
title: '图片',
extensions: 'png,gif,jpg,jpeg,bmp',
mimeTypes: '.png,.gif,.jpg,.jpeg,.bmp',
},
// 不压缩image, 默认如果是jpeg文件上传前会压缩一把再上传
resize: false,
disableGlobalDnd: true,
fileNumLimit:5,
threads:5,
thumb:true,
compress:false,
prepareNextFile: true,
formData: function(){return $.extend(true, {}, userInfo);},
chunked:false,
duplicate: true
});
var imgListbusinesspicData = [];
<?php if (!empty($promoteinfo['valuedata1'])) :?>
var html = '';
$('#businesspicList').css('margin-top','10px');
<?php foreach ($promoteinfo['valuedata1'] as $value1) { ?>
<?php $value1 = (int)$value1; ?>
imgListbusinesspicData.push(<?=$value1?>);
html += '<div id="' + <?=$value1?> + '" class="item flooring_page_img_box" style="margin-right: 10px;">';
html += '<a href="javascript:;"><img src="<?=get_cover($value1,"path")?>" style="width: 100px;height: 100px;cursor: move;"></a>';
html += '<h4 class="info" style="text-align: center;">';
html += '<a href="javascript:;" class="jsdelzip table_click" style="float:none;display:inline-block;" img-id="' + <?=$value1?> + '">删除</a>';
html += '</h4>';
html += '<div class="progress progress-striped active" style="display: none;">';
html += '<div class="progress-bar" role="progressbar" style="width: 100%;">100%</div>';
html += '</div>';
html += '</div>';
<?php }?>
$('#businesspicList').html(html);
$('#businesspicList').children().children('h4').children('.jsdelzip').on('click', function() {
var thisId = $(this).attr('img-id');
$(this).parent().parent().remove();
$.each(imgListbusinesspicData,function(index, item) {
if (thisId == item) {
imgListbusinesspicData.splice(index,1);
return false;
}
});
console.log('9999999')
console.log(imgListbusinesspicData)
setbusinesspicVal();
});
<?php endif ;?>
var thisIndex1 = 0;
var imgbusinesspicList = $("#businesspicList");
uploaderImgbusinesspic.on( 'fileQueued', function( file ) {
var html = '';
html += '<div id="' + file.id + '" class="item" style="margin-right: 10px;">';
html += '<a href="javascript:;"><img src="" style="width: 100px;height: 100px;cursor: move;"></a>';
html += '<h4 class="info">' + file.name + '</h4>';
html += '<p class="state">等待上传...</p>';
html += '</div>';
imgbusinesspicList.append(html);
imgbusinesspicList.css('margin-top','10px');
var img1 = imgbusinesspicList.children('#'+file.id).find('img');
uploaderImgbusinesspic.makeThumb(file, function (error, src) {
if (error) {
return;
}
img1.attr('src', src);
}, 300, 300);
});
// 文件上传过程中创建进度条实时显示。
uploaderImgbusinesspic.on( 'uploadProgress', function( file, percentage ) {
var $li = $( '#'+file.id ),
$percent = $li.find('.progress .progress-bar');
// 避免重复创建
if ( !$percent.length ) {
$percent = $('<div class="progress progress-striped active">' +
'<div class="progress-bar" role="progressbar" style="width: 0%">' +
'</div>' +
'</div>').appendTo( $li ).find('.progress-bar');
}
$li.find('p.state').text('上传中');
$percent.css( 'width', percentage * 100 + '%' );
$percent.text( (percentage * 100).toFixed(0) + '%' );
});
uploaderImgbusinesspic.on( 'uploadSuccess', function( file , response) {
imgListbusinesspicData.push(Number(response.id));
setbusinesspicVal();
$( '#'+file.id ).find('p.state').text('已上传').fadeOut(800);
//alert(JSON.stringify(response));
$('#'+file.id).find('h4.info').append('<a href="javascript:;" class="jsdelzip table_click" style="float:none;display:inline-block;margin-left:10px;">删除</a>');
$('#'+file.id).find('.jsdelzip').on('click',function() {
uploaderImgbusinesspic.removeFile( file.id );
$('#'+file.id).remove();
$.each(imgListbusinesspicData,function(index, item) {
if (response.id == item) {
imgListbusinesspicData.splice(index,1);
return false;
}
});
setbusinesspicVal();
console.log(imgListbusinesspicData);
return false;
});
});
function setbusinesspicVal()
{
var businesspic = '';
$.each(imgListbusinesspicData,function(index, item) {
businesspic += item + ',';
});
businesspic = businesspic.substring(0, businesspic.length - 1);
$('input[name=businesspic]').val(businesspic);
}
</script>
<script>
var uploaderImgagreementpic = WebUploader.create({
// 选完文件后,是否自动上传。
auto: true,
// swf文件路径
swf: '__STATIC__/webuploader/Uploader.swf',
// 文件接收服务端。
server: "{:U('File/uploadPicture',array('session_id'=>session_id(),'flag'=>true))}",
// 选择文件的按钮。可选。
// 内部根据当前运行是创建可能是input元素也可能是flash.
pick: {
id:'#agreementpic',
multiple:true
},
// dnd: false,
paste: document.body,
accept: {
title: '图片',
extensions: 'png,gif,jpg,jpeg,bmp',
mimeTypes: '.png,.gif,.jpg,.jpeg,.bmp',
},
// 不压缩image, 默认如果是jpeg文件上传前会压缩一把再上传
resize: false,
disableGlobalDnd: true,
fileNumLimit:5,
threads:5,
thumb:true,
compress:false,
prepareNextFile: true,
formData: function(){return $.extend(true, {}, userInfo);},
chunked:false,
duplicate: true
});
var imgListagreementpicData = [];
<?php if (!empty($promoteinfo['valuedata2'])) :?>
var html = '';
$('#agreementpicList').css('margin-top','10px');
<?php foreach ($promoteinfo['valuedata2'] as $value1) { ?>
<?php $value1 = (int)$value1; ?>
imgListagreementpicData.push(<?=$value1?>);
html += '<div id="' + <?=$value1?> + '" class="item flooring_page_img_box" style="margin-right: 10px;">';
html += '<a href="javascript:;"><img src="<?=get_cover($value1,"path")?>" style="width: 100px;height: 100px;cursor: move;"></a>';
html += '<h4 class="info" style="text-align: center;">';
html += '<a href="javascript:;" class="jsdelzip table_click" style="float:none;display:inline-block;" img-id="' + <?=$value1?> + '">删除</a>';
html += '</h4>';
html += '<div class="progress progress-striped active" style="display: none;">';
html += '<div class="progress-bar" role="progressbar" style="width: 100%;">100%</div>';
html += '</div>';
html += '</div>';
<?php }?>
$('#agreementpicList').html(html);
$('#agreementpicList').children().children('h4').children('.jsdelzip').on('click', function() {
var thisId = $(this).attr('img-id');
$(this).parent().parent().remove();
$.each(imgListagreementpicData,function(index, item) {
if (thisId == item) {
imgListagreementpicData.splice(index,1);
return false;
}
});
console.log('9999999')
console.log(imgListagreementpicData)
setagreementpicVal();
});
<?php endif ;?>
var thisIndex1 = 0;
var imgagreementpicList = $("#agreementpicList");
uploaderImgagreementpic.on( 'fileQueued', function( file ) {
var html = '';
html += '<div id="' + file.id + '" class="item" style="margin-right: 10px;">';
html += '<a href="javascript:;"><img src="" style="width: 100px;height: 100px;cursor: move;"></a>';
html += '<h4 class="info">' + file.name + '</h4>';
html += '<p class="state">等待上传...</p>';
html += '</div>';
imgagreementpicList.append(html);
imgagreementpicList.css('margin-top','10px');
var img1 = imgagreementpicList.children('#'+file.id).find('img');
uploaderImgagreementpic.makeThumb(file, function (error, src) {
if (error) {
return;
}
img1.attr('src', src);
}, 300, 300);
});
// 文件上传过程中创建进度条实时显示。
uploaderImgagreementpic.on( 'uploadProgress', function( file, percentage ) {
var $li = $( '#'+file.id ),
$percent = $li.find('.progress .progress-bar');
// 避免重复创建
if ( !$percent.length ) {
$percent = $('<div class="progress progress-striped active">' +
'<div class="progress-bar" role="progressbar" style="width: 0%">' +
'</div>' +
'</div>').appendTo( $li ).find('.progress-bar');
}
$li.find('p.state').text('上传中');
$percent.css( 'width', percentage * 100 + '%' );
$percent.text( (percentage * 100).toFixed(0) + '%' );
});
uploaderImgagreementpic.on( 'uploadSuccess', function( file , response) {
imgListagreementpicData.push(Number(response.id));
setagreementpicVal();
$( '#'+file.id ).find('p.state').text('已上传').fadeOut(800);
//alert(JSON.stringify(response));
$('#'+file.id).find('h4.info').append('<a href="javascript:;" class="jsdelzip table_click" style="float:none;display:inline-block;margin-left:10px;">删除</a>');
$('#'+file.id).find('.jsdelzip').on('click',function() {
uploaderImgagreementpic.removeFile( file.id );
$('#'+file.id).remove();
$.each(imgListagreementpicData,function(index, item) {
if (response.id == item) {
imgListagreementpicData.splice(index,1);
return false;
}
});
setagreementpicVal();
console.log(imgListagreementpicData);
return false;
});
});
function setagreementpicVal()
{
var agreementpic = '';
$.each(imgListagreementpicData,function(index, item) {
agreementpic += item + ',';
});
agreementpic = agreementpic.substring(0, agreementpic.length - 1);
$('input[name=agreementpic]').val(agreementpic);
}
</script>
</block>

@ -0,0 +1,223 @@
<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/account.css" rel="stylesheet" >
<style>.notice_tip {padding-left:20px;color:#999;font-size:12px;}
.formtxt{display:inline-block;width:232px;}
.trunk-list .table2 .r .qrcodeboxwrap {padding-left:0;padding-right:20px;padding-bottom:20px;}
.qrcodebox img {width:100px;height:100px;}
.qrcodebox p {font-size:12px;margin:0;color:#666;}
.qrcodebox p span{color:red;}
.qrcodeboxwrap~.notice_tip{vertical-align:top;display:inline-block;margin-top:20px;}
.mail_suffix {position: absolute;
top: 43px;
border: 1px solid rgb(229,229,229);
border-radius: 2px;
color: #666;
font-size: 11px;
width: 230px;
padding: 0 10px;
line-height: 1.4;
z-index: 1;
background: #FFF;
height: 200px;
overflow: hidden;
overflow-y: auto;}
.mail_suffix li {
padding: 2px 0;
cursor: pointer;
}
.mail_suffix li:first-child {padding-top:4px;}
.mail_suffix li:last-child{padding-bottom:4px;}
#tab{
margin-top:30px;
border-left:3px solid #26C7DB;
height:46px;display:flex;
justify-content: space-between;
align-items: center;
background: #ecf4f5;
}
</style>
</block>
<block name="body">
<script type="text/javascript" src="__STATIC__/provincecityarea/area1.js" ></script>
<div class="page-list normal_list promote-base_info-form">
<div class="trunk-title">
<img src="__IMG__/20180207/icon_normal_zhanghu.png">
<span class="title_main">修改登录密码</span>
</div>
<div class="trunk-content article">
<div class="trunk-list baseInfo">
<div style="" id="tab">
<span style="padding-left:20px;color:#26c7dbd4" >注意:密码必须由字母与数字组合</span>
</div>
<form action="{:U('Safe/modifyLoginPassword')}" novalidate="novalidate" method="post" class="paw_info">
<table class="table2" style="margin-top:20px;margin-left:30px">
<tr>
<td class="l" style="font-size:17px">旧密码:</td>
<td class="r"><input type="password" class="input txt" name="oldpwd" id="password" style="width:430px" placeholder="旧密码">
<span id="password_tip"></span></td>
</tr>
<tr>
<td class="l">新密码:</td>
<td class="r"><input type="password" class="input txt" name="newpwd" id="confirm_password" style="width:430px" placeholder="新密码">
<span id="confirm_password_tip"></span></td>
</tr>
<tr>
<td class="l"></td>
<td class="r">
<input type="hidden" name="id" value="{$data.id}">
<input type="submit" class="tj btn ajax-post" value="保存" style="width:200px" title="" target-form="paw_info">
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</block>
<block name="script">
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/mail_suffix.js"></script>
<script type="text/javascript" src="__STATIC__/bank.js"></script>
<script type="text/javascript">
var ajaxurl="{:U('Account/getArea')}";
function loadArea(areaId,areaType) {
$.post(ajaxurl,{'areaId':areaId},function(data){
if(areaType=='city'){
$('#'+areaType).html('<option value="-1">市/县</option>');
$('#district').html('<option value="-1">镇/区</option>');
}else if(areaType=='district'){
$('#'+areaType).html('<option value="-1">镇/区</option>');
}
if(areaType!='null'){
$.each(data,function(no,items){
$('#'+areaType).append('<option value="'+items.area_id+'">'+items.area_name+'</option>');
});
}
});
}
var tot="";
$("#province").change(function() {
tot+=$("#province").val();
});
$("#city").change(function() {
tot+=","+$("#city").val()
});
$("#district").change(function() {
tot+=","+$("#district").val()
});
$(".btn").click(function() {
$("#town").val(tot);
});
function add_mail_suffix(that) {
var suffix = $(that).data('suffix');
var input = $(that).closest('.mail_suffix').prev();
if(input.attr('data-mail').length>0) {
input.val(input.attr('data-mail')+suffix);
}
}
$(function() {
$('.tab td').on('click',function() {
var that = $(this);
$('.tabpan').removeClass('current');
that.siblings().removeClass('current');
that.addClass('current');
$('.tabpan').eq(that.index()).addClass('current');
return false;
});
$(".select_gallery").select2();
$('#email').focus(function () {
var val = $.trim($(this).val());
if(val) {
var index = val.indexOf('@');
if(index>-1){
var suffix = val.substring(index);
val = val.substring(0,index);
$(this).val(val).attr('data-suffix',suffix).attr('data-mail',val);
}
}
var html = '<ul class="mail_suffix">';
for(var item in mail_suffix) {
html += '<li onclick="add_mail_suffix(this)" data-suffix="'+mail_suffix[item]+'">'+mail_suffix[item]+'</li>';
}
html += '</ul>';
$(this).after(html);
$('body').click(function (event) {
var e = event || window.event;
var target = e.target || e.srcElement;
if($(target).attr('id') != 'email' && $(target).attr('class') != 'mail_suffix') {
$('.mail_suffix').remove();
}
return false;
});
return false;
}).blur(function (event) {
var e = event || window.event;
var target = e.target || e.srcElement;
var that = $(this);
if($(target).attr('id') == 'email' && $(target).attr('class') == 'mail_suffix') {
$('.mail_suffix').remove();
}
if(that.attr('data-mail')) {
var data_mail_index = that.attr('data-mail').indexOf('@');
if(data_mail_index>-1){
var data_mail = that.attr('data-mail');
that.val(data_mail);
that.attr('data-mail',data_mail.substring(0,data_mail_index));
that.attr('data-suffix',data_mail.substring(data_mail_index));
} else {
that.val(that.attr('data-mail')+that.attr('data-suffix'));
}
}
return false;
}).keyup(function () {
var val = $.trim($(this).val());
if(val.length>64) {val = val.substr(0,64);$(this).val(val);}
$(this).attr('data-mail',val);
return false;
});
var data_bank_name = '{$data.bank_name}';
var bank_name = '<option value="">请选择收款银行</option>';console.log(bank);
for(var bn in bank) {
if(data_bank_name == bank[bn]) {
bank_name += '<option value="'+bank[bn]+'" selected>'+bank[bn]+'</option>';
} else {
bank_name += '<option value="'+bank[bn]+'">'+bank[bn]+'</option>';
}
}
$('#bank_name').html(bank_name).select2();
AF.users.account_edit(1429);
AF.users.account_content_edit(1429);
_init_area();
_reset_area('','','');
});
</script>
</block>

@ -0,0 +1,211 @@
<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/account.css" rel="stylesheet" >
<style>.notice_tip {padding-left:20px;color:#999;font-size:12px;}
.formtxt{display:inline-block;width:232px;}
.trunk-list .table2 .r .qrcodeboxwrap {padding-left:0;padding-right:20px;padding-bottom:20px;}
.qrcodebox img {width:100px;height:100px;}
.qrcodebox p {font-size:12px;margin:0;color:#666;}
.qrcodebox p span{color:red;}
.qrcodeboxwrap~.notice_tip{vertical-align:top;display:inline-block;margin-top:20px;}
.mail_suffix {position: absolute;
top: 43px;
border: 1px solid rgb(229,229,229);
border-radius: 2px;
color: #666;
font-size: 11px;
width: 230px;
padding: 0 10px;
line-height: 1.4;
z-index: 1;
background: #FFF;
height: 200px;
overflow: hidden;
overflow-y: auto;}
.mail_suffix li {
padding: 2px 0;
cursor: pointer;
}
.mail_suffix li:first-child {padding-top:4px;}
.mail_suffix li:last-child{padding-bottom:4px;}
</style>
</block>
<block name="body">
<script type="text/javascript" src="__STATIC__/provincecityarea/area1.js" ></script>
<div class="page-list normal_list promote-base_info-form">
<div class="trunk-title">
<span class="title_main">修改安全密码</span>
</div>
<div class="trunk-content article">
<div class="trunk-list baseInfo">
<span style="margin-top:50px;font-size:15px;color:#26c7db85">为了保证您的账户安全,提现和转账等操作需要使用安全密码进行确认(请不要和登陆密码一样)</span>
<form action="{:U('Safe/modifypwdindex')}" novalidate="novalidate" method="post" class="paw_info">
<table class="table2" style="margin-top:30px;margin-left:50px" >
<tr>
<td class="l">旧密码:</td>
<td class="r"><input type="password" class="input txt" name="oldpwd" id="oldpwd" style="width:430px" placeholder="旧密码">
<span id="confirm_password_tip"></span></td>
</tr>
<tr>
<td class="l">安全密码:</td>
<td class="r"><input type="password" class="input txt" name="safepwd" id="confirm_password" style="width:430px" placeholder="请输入要设置的安全密码">
<span id="confirm_password_tip"></span></td>
</tr>
<tr>
<td class="l"></td>
<td class="r">
<input type="hidden" name="id" value="{$data.id}">
<input type="submit" class="tj btn ajax-post" value="保存" style="width:200px" title="" target-form="paw_info">
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</block>
<block name="script">
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/mail_suffix.js"></script>
<script type="text/javascript" src="__STATIC__/bank.js"></script>
<script type="text/javascript">
var ajaxurl="{:U('Account/getArea')}";
function loadArea(areaId,areaType) {
$.post(ajaxurl,{'areaId':areaId},function(data){
if(areaType=='city'){
$('#'+areaType).html('<option value="-1">市/县</option>');
$('#district').html('<option value="-1">镇/区</option>');
}else if(areaType=='district'){
$('#'+areaType).html('<option value="-1">镇/区</option>');
}
if(areaType!='null'){
$.each(data,function(no,items){
$('#'+areaType).append('<option value="'+items.area_id+'">'+items.area_name+'</option>');
});
}
});
}
var tot="";
$("#province").change(function() {
tot+=$("#province").val();
});
$("#city").change(function() {
tot+=","+$("#city").val()
});
$("#district").change(function() {
tot+=","+$("#district").val()
});
$(".btn").click(function() {
$("#town").val(tot);
});
function add_mail_suffix(that) {
var suffix = $(that).data('suffix');
var input = $(that).closest('.mail_suffix').prev();
if(input.attr('data-mail').length>0) {
input.val(input.attr('data-mail')+suffix);
}
}
$(function() {
$('.tab td').on('click',function() {
var that = $(this);
$('.tabpan').removeClass('current');
that.siblings().removeClass('current');
that.addClass('current');
$('.tabpan').eq(that.index()).addClass('current');
return false;
});
$(".select_gallery").select2();
$('#email').focus(function () {
var val = $.trim($(this).val());
if(val) {
var index = val.indexOf('@');
if(index>-1){
var suffix = val.substring(index);
val = val.substring(0,index);
$(this).val(val).attr('data-suffix',suffix).attr('data-mail',val);
}
}
var html = '<ul class="mail_suffix">';
for(var item in mail_suffix) {
html += '<li onclick="add_mail_suffix(this)" data-suffix="'+mail_suffix[item]+'">'+mail_suffix[item]+'</li>';
}
html += '</ul>';
$(this).after(html);
$('body').click(function (event) {
var e = event || window.event;
var target = e.target || e.srcElement;
if($(target).attr('id') != 'email' && $(target).attr('class') != 'mail_suffix') {
$('.mail_suffix').remove();
}
return false;
});
return false;
}).blur(function (event) {
var e = event || window.event;
var target = e.target || e.srcElement;
var that = $(this);
if($(target).attr('id') == 'email' && $(target).attr('class') == 'mail_suffix') {
$('.mail_suffix').remove();
}
if(that.attr('data-mail')) {
var data_mail_index = that.attr('data-mail').indexOf('@');
if(data_mail_index>-1){
var data_mail = that.attr('data-mail');
that.val(data_mail);
that.attr('data-mail',data_mail.substring(0,data_mail_index));
that.attr('data-suffix',data_mail.substring(data_mail_index));
} else {
that.val(that.attr('data-mail')+that.attr('data-suffix'));
}
}
return false;
}).keyup(function () {
var val = $.trim($(this).val());
if(val.length>64) {val = val.substr(0,64);$(this).val(val);}
$(this).attr('data-mail',val);
return false;
});
var data_bank_name = '{$data.bank_name}';
var bank_name = '<option value="">请选择收款银行</option>';console.log(bank);
for(var bn in bank) {
if(data_bank_name == bank[bn]) {
bank_name += '<option value="'+bank[bn]+'" selected>'+bank[bn]+'</option>';
} else {
bank_name += '<option value="'+bank[bn]+'">'+bank[bn]+'</option>';
}
}
$('#bank_name').html(bank_name).select2();
AF.users.account_edit(1429);
AF.users.account_content_edit(1429);
_init_area();
_reset_area('','','');
});
</script>
</block>

@ -0,0 +1,212 @@
<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/account.css" rel="stylesheet" >
<style>.notice_tip {padding-left:20px;color:#999;font-size:12px;}
.formtxt{display:inline-block;width:232px;}
.trunk-list .table2 .r .qrcodeboxwrap {padding-left:0;padding-right:20px;padding-bottom:20px;}
.qrcodebox img {width:100px;height:100px;}
.qrcodebox p {font-size:12px;margin:0;color:#666;}
.qrcodebox p span{color:red;}
.qrcodeboxwrap~.notice_tip{vertical-align:top;display:inline-block;margin-top:20px;}
.mail_suffix {position: absolute;
top: 43px;
border: 1px solid rgb(229,229,229);
border-radius: 2px;
color: #666;
font-size: 11px;
width: 230px;
padding: 0 10px;
line-height: 1.4;
z-index: 1;
background: #FFF;
height: 200px;
overflow: hidden;
overflow-y: auto;}
.mail_suffix li {
padding: 2px 0;
cursor: pointer;
}
.mail_suffix li:first-child {padding-top:4px;}
.mail_suffix li:last-child{padding-bottom:4px;}
</style>
</block>
<block name="body">
<script type="text/javascript" src="__STATIC__/provincecityarea/area1.js" ></script>
<div class="page-list normal_list promote-base_info-form">
<div class="trunk-title">
<img src="__IMG__/20180207/icon_normal_zhanghu.png">
<span class="title_main">设置安全密码</span>
</div>
<div class="trunk-content article">
<div class="trunk-list baseInfo">
<form action="{:U('Safe/setSafePassword')}" novalidate="novalidate" method="post" class="paw_info">
<table class="table2" style="margin-top:50px;margin-left:50px">
<tr>
<td class="l" style="font-size:17px">新密码:</td>
<td class="r"><input type="password" class="input txt" name="password" id="password" style="width:430px" placeholder="新密码">
<span id="password_tip"></span></td>
</tr>
<tr>
<td class="l">确认密码:</td>
<td class="r"><input type="password" class="input txt" name="confirm_password" id="confirm_password" style="width:430px" placeholder="确认密码">
<span id="confirm_password_tip"></span></td>
</tr>
<tr>
<td class="l"></td>
<td class="r">
<input type="hidden" name="id" value="{$data.id}">
<input type="submit" class="tj btn ajax-post" value="保存" style="width:200px" title="" target-form="paw_info">
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</block>
<block name="script">
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/mail_suffix.js"></script>
<script type="text/javascript" src="__STATIC__/bank.js"></script>
<script type="text/javascript">
var ajaxurl="{:U('Account/getArea')}";
function loadArea(areaId,areaType) {
$.post(ajaxurl,{'areaId':areaId},function(data){
if(areaType=='city'){
$('#'+areaType).html('<option value="-1">市/县</option>');
$('#district').html('<option value="-1">镇/区</option>');
}else if(areaType=='district'){
$('#'+areaType).html('<option value="-1">镇/区</option>');
}
if(areaType!='null'){
$.each(data,function(no,items){
$('#'+areaType).append('<option value="'+items.area_id+'">'+items.area_name+'</option>');
});
}
});
}
var tot="";
$("#province").change(function() {
tot+=$("#province").val();
});
$("#city").change(function() {
tot+=","+$("#city").val()
});
$("#district").change(function() {
tot+=","+$("#district").val()
});
$(".btn").click(function() {
$("#town").val(tot);
});
function add_mail_suffix(that) {
var suffix = $(that).data('suffix');
var input = $(that).closest('.mail_suffix').prev();
if(input.attr('data-mail').length>0) {
input.val(input.attr('data-mail')+suffix);
}
}
$(function() {
$('.tab td').on('click',function() {
var that = $(this);
$('.tabpan').removeClass('current');
that.siblings().removeClass('current');
that.addClass('current');
$('.tabpan').eq(that.index()).addClass('current');
return false;
});
$(".select_gallery").select2();
$('#email').focus(function () {
var val = $.trim($(this).val());
if(val) {
var index = val.indexOf('@');
if(index>-1){
var suffix = val.substring(index);
val = val.substring(0,index);
$(this).val(val).attr('data-suffix',suffix).attr('data-mail',val);
}
}
var html = '<ul class="mail_suffix">';
for(var item in mail_suffix) {
html += '<li onclick="add_mail_suffix(this)" data-suffix="'+mail_suffix[item]+'">'+mail_suffix[item]+'</li>';
}
html += '</ul>';
$(this).after(html);
$('body').click(function (event) {
var e = event || window.event;
var target = e.target || e.srcElement;
if($(target).attr('id') != 'email' && $(target).attr('class') != 'mail_suffix') {
$('.mail_suffix').remove();
}
return false;
});
return false;
}).blur(function (event) {
var e = event || window.event;
var target = e.target || e.srcElement;
var that = $(this);
if($(target).attr('id') == 'email' && $(target).attr('class') == 'mail_suffix') {
$('.mail_suffix').remove();
}
if(that.attr('data-mail')) {
var data_mail_index = that.attr('data-mail').indexOf('@');
if(data_mail_index>-1){
var data_mail = that.attr('data-mail');
that.val(data_mail);
that.attr('data-mail',data_mail.substring(0,data_mail_index));
that.attr('data-suffix',data_mail.substring(data_mail_index));
} else {
that.val(that.attr('data-mail')+that.attr('data-suffix'));
}
}
return false;
}).keyup(function () {
var val = $.trim($(this).val());
if(val.length>64) {val = val.substr(0,64);$(this).val(val);}
$(this).attr('data-mail',val);
return false;
});
var data_bank_name = '{$data.bank_name}';
var bank_name = '<option value="">请选择收款银行</option>';console.log(bank);
for(var bn in bank) {
if(data_bank_name == bank[bn]) {
bank_name += '<option value="'+bank[bn]+'" selected>'+bank[bn]+'</option>';
} else {
bank_name += '<option value="'+bank[bn]+'">'+bank[bn]+'</option>';
}
}
$('#bank_name').html(bank_name).select2();
AF.users.account_edit(1429);
AF.users.account_content_edit(1429);
_init_area();
_reset_area('','','');
});
</script>
</block>

@ -0,0 +1,205 @@
<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/account.css" rel="stylesheet" >
<style>.notice_tip {padding-left:20px;color:#999;font-size:12px;}
.formtxt{display:inline-block;width:232px;}
.trunk-list .table2 .r .qrcodeboxwrap {padding-left:0;padding-right:20px;padding-bottom:20px;}
.qrcodebox img {width:100px;height:100px;}
.qrcodebox p {font-size:12px;margin:0;color:#666;}
.qrcodebox p span{color:red;}
.qrcodeboxwrap~.notice_tip{vertical-align:top;display:inline-block;margin-top:20px;}
.mail_suffix {position: absolute;
top: 43px;
border: 1px solid rgb(229,229,229);
border-radius: 2px;
color: #666;
font-size: 11px;
width: 230px;
padding: 0 10px;
line-height: 1.4;
z-index: 1;
background: #FFF;
height: 200px;
overflow: hidden;
overflow-y: auto;}
.mail_suffix li {
padding: 2px 0;
cursor: pointer;
}
.mail_suffix li:first-child {padding-top:4px;}
.mail_suffix li:last-child{padding-bottom:4px;}
</style>
</block>
<block name="body">
<script type="text/javascript" src="__STATIC__/provincecityarea/area1.js" ></script>
<div class="page-list normal_list promote-base_info-form">
<div class="trunk-title">
<span class="title_main">安全密码</span>
</div>
<div class="trunk-content article">
<div class="trunk-list baseInfo">
<form action="{:U('Safe/verifySafePwd')}" novalidate="novalidate" method="post" class="paw_info">
<table class="table2" style="margin-top:50px;margin-left:50px">
<tr>
<td class="l">安全密码:</td>
<td class="r"><input type="password" class="input txt" name="safepwd" id="confirm_password" style="width:430px" placeholder="安全密码">
<span id="confirm_password_tip"></span></td>
</tr>
<tr>
<td class="l"></td>
<td class="r">
<input type="hidden" name="id" value="{$data.id}">
<input type="submit" class="tj btn ajax-post" value="保存" style="width:200px" title="" target-form="paw_info">
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</block>
<block name="script">
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/mail_suffix.js"></script>
<script type="text/javascript" src="__STATIC__/bank.js"></script>
<script type="text/javascript">
var ajaxurl="{:U('Account/getArea')}";
function loadArea(areaId,areaType) {
$.post(ajaxurl,{'areaId':areaId},function(data){
if(areaType=='city'){
$('#'+areaType).html('<option value="-1">市/县</option>');
$('#district').html('<option value="-1">镇/区</option>');
}else if(areaType=='district'){
$('#'+areaType).html('<option value="-1">镇/区</option>');
}
if(areaType!='null'){
$.each(data,function(no,items){
$('#'+areaType).append('<option value="'+items.area_id+'">'+items.area_name+'</option>');
});
}
});
}
var tot="";
$("#province").change(function() {
tot+=$("#province").val();
});
$("#city").change(function() {
tot+=","+$("#city").val()
});
$("#district").change(function() {
tot+=","+$("#district").val()
});
$(".btn").click(function() {
$("#town").val(tot);
});
function add_mail_suffix(that) {
var suffix = $(that).data('suffix');
var input = $(that).closest('.mail_suffix').prev();
if(input.attr('data-mail').length>0) {
input.val(input.attr('data-mail')+suffix);
}
}
$(function() {
$('.tab td').on('click',function() {
var that = $(this);
$('.tabpan').removeClass('current');
that.siblings().removeClass('current');
that.addClass('current');
$('.tabpan').eq(that.index()).addClass('current');
return false;
});
$(".select_gallery").select2();
$('#email').focus(function () {
var val = $.trim($(this).val());
if(val) {
var index = val.indexOf('@');
if(index>-1){
var suffix = val.substring(index);
val = val.substring(0,index);
$(this).val(val).attr('data-suffix',suffix).attr('data-mail',val);
}
}
var html = '<ul class="mail_suffix">';
for(var item in mail_suffix) {
html += '<li onclick="add_mail_suffix(this)" data-suffix="'+mail_suffix[item]+'">'+mail_suffix[item]+'</li>';
}
html += '</ul>';
$(this).after(html);
$('body').click(function (event) {
var e = event || window.event;
var target = e.target || e.srcElement;
if($(target).attr('id') != 'email' && $(target).attr('class') != 'mail_suffix') {
$('.mail_suffix').remove();
}
return false;
});
return false;
}).blur(function (event) {
var e = event || window.event;
var target = e.target || e.srcElement;
var that = $(this);
if($(target).attr('id') == 'email' && $(target).attr('class') == 'mail_suffix') {
$('.mail_suffix').remove();
}
if(that.attr('data-mail')) {
var data_mail_index = that.attr('data-mail').indexOf('@');
if(data_mail_index>-1){
var data_mail = that.attr('data-mail');
that.val(data_mail);
that.attr('data-mail',data_mail.substring(0,data_mail_index));
that.attr('data-suffix',data_mail.substring(data_mail_index));
} else {
that.val(that.attr('data-mail')+that.attr('data-suffix'));
}
}
return false;
}).keyup(function () {
var val = $.trim($(this).val());
if(val.length>64) {val = val.substr(0,64);$(this).val(val);}
$(this).attr('data-mail',val);
return false;
});
var data_bank_name = '{$data.bank_name}';
var bank_name = '<option value="">请选择收款银行</option>';console.log(bank);
for(var bn in bank) {
if(data_bank_name == bank[bn]) {
bank_name += '<option value="'+bank[bn]+'" selected>'+bank[bn]+'</option>';
} else {
bank_name += '<option value="'+bank[bn]+'">'+bank[bn]+'</option>';
}
}
$('#bank_name').html(bank_name).select2();
AF.users.account_edit(1429);
AF.users.account_content_edit(1429);
_init_area();
_reset_area('','','');
});
</script>
</block>
Loading…
Cancel
Save