|
|
@@ -49,6 +49,12 @@ use yii\helpers\Url;
|
|
|
<span onclick="modifyPwd()" class="input-group-addon">提交</span>
|
|
|
</div>
|
|
|
<div class="hr-line-dashed"></div>
|
|
|
+ <div class="input-group">
|
|
|
+ <span class="input-group-addon">修改MT4交易密码</span>
|
|
|
+ <input id="modifyMtPwd" type="text" class="form-control">
|
|
|
+ <span onclick="modifyMtPwd()" class="input-group-addon">提交</span>
|
|
|
+ </div>
|
|
|
+ <div class="hr-line-dashed"></div>
|
|
|
<div class="table-responsive">
|
|
|
<table class="table table-bordered">
|
|
|
<!--
|
|
|
@@ -246,5 +252,41 @@ use yii\helpers\Url;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // mt4交易密码的函数
|
|
|
+ function modifyMtPwd(){
|
|
|
+ var pwd=$("#modifyMtPwd").val();
|
|
|
+ var reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{7,16}$/;
|
|
|
+ if(!reg.test(pwd)){
|
|
|
+ toastr.error('密码必须包含大小写和数字', "提示");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(pwd.length>0){
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: "<?= Url::to(['modify-mtpwd']) ?>",
|
|
|
+ data: {
|
|
|
+ pwd:pwd,
|
|
|
+ id:'<?= $member['id'] ?>'
|
|
|
+ },
|
|
|
+ dataType: "json",
|
|
|
+ beforeSend: function() {},
|
|
|
+ success: function(data) {
|
|
|
+
|
|
|
+ if(data.isSuccess){
|
|
|
+ toastr.success(data.msg, "提示");
|
|
|
+ }else{
|
|
|
+ toastr.error(data.msg, "提示");
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ complete: function(XMLHttpRequest, textStatus) {
|
|
|
+ $("#modifyMtPwd").val("");
|
|
|
+ },
|
|
|
+ error: function() {}
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
</script>
|
|
|
<?php $this->endBlock();?>
|