@extends('vip.layouts')
@section('content')

<form class="layui-form" action="{{ url()->full() }}" id="submitForm" name="submitForm" method="post" eventType="eventAjaxForm">
{!! csrf_field() !!}
  <div class="layui-form-item">
<label>修改登录密码</label>
</div>
  <div class="layui-form-item">
    <label class="layui-form-label">会员</label>
    <div class="layui-input-block">
      <input type="text" name="loginname" required  lay-verify="required" autocomplete="off" class="layui-input" value="{{isset($data['account'])?$data['account']:''}}" disabled="disabled">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">登陆密码</label>
    <div class="layui-input-block">
    <input type="password" name="password"   lay-verify="" autocomplete="off" class="layui-input" value="">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">确认密码</label>
    <div class="layui-input-block">
      <input type="password" name="repassword"   lay-verify="" autocomplete="off" class="layui-input" value="">
    </div>
  </div>

  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="submitForm">立即提交</button>
    </div>
  </div>
</form>

<form class="layui-form" action="{{ url()->full() }}&pwdtype=1" id="paySubmitForm" name="paySubmitForm" method="post" eventType="eventAjaxForm">
{!! csrf_field() !!}
<div class="layui-form-item">
<label >修改支付密码</label>
</div>
  <div class="layui-form-item">
    <label class="layui-form-label">会员</label>
    <div class="layui-input-block">
      <input type="text" name="loginname" required  lay-verify="required" autocomplete="off" class="layui-input" value="{{isset($data['account'])?$data['account']:''}}" disabled="disabled">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">支付密码</label>
    <div class="layui-input-block">
    <input type="password" name="password"   lay-verify="" autocomplete="off" class="layui-input" value="">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">确认密码</label>
    <div class="layui-input-block">
      <input type="password" name="repassword"   lay-verify="" autocomplete="off" class="layui-input" value="">
    </div>
  </div>

  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="submitForm">立即提交</button>
    </div>
  </div>
</form>

@if($data['arootid']==1)
<form class="layui-form" action="{{ url()->full() }}&pwdtype=2" id="paySubmitForm" name="paySubmitForm" method="post" eventType="eventAjaxForm">
{!! csrf_field() !!}
<div class="layui-form-item">
<label >修改会员代理父级</label>
</div>
  <div class="layui-form-item">
    <label class="layui-form-label">会员</label>
    <div class="layui-input-block">
      <input type="text" name="loginname" required  lay-verify="required" autocomplete="off" class="layui-input" value="{{isset($data['account'])?$data['account']:''}}" disabled="disabled">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">父级邀请码</label>
    <div class="layui-input-block">
    <input type="text" name="invite"   lay-verify="" autocomplete="off" class="layui-input" value="{{isset($data['invite'])?$data['invite']:''}}">
    </div>
  </div>

  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="submitForm">立即提交</button>
    </div>
  </div>
</form>
@endif

<form class="layui-form" action="{{ url()->full()}}" id="remark" name="remark" method="post" eventType="eventAjaxForm">
{!! csrf_field() !!}
<div class="layui-form-item">
<label >修改用户信息备注</label>
</div>
  <div class="layui-form-item">
    <label class="layui-form-label">会员信息备注</label>

    <div class="layui-input-block">
      <input type="hidden" name="status_type" value="1">
      <textarea type="text" name="remark" required style="width: 450px;height: 80px;" lay-verify="required" autocomplete="off" class="layui-input" value="" >{{isset($data['remark'])?$data['remark']:''}}</textarea>
    </div>
    <div class="layui-input-block">
      <input type="radio" name="status" value="1" title="启用" @if($data['status']=='1') checked @endif>
      <input type="radio" name="status" value="2" title="禁用" @if($data['status']=='2') checked @endif>

    </div>
  </div>

  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="submitForm">立即提交</button>
    </div>
  </div>
</form>

<script>
//Demo
layui.use(['form'], function(){
  var form = layui.form;

  //监听提交
  form.on('submit(submitForm)', function(data){
    return true;
  });
  form.on('submit(paySubmitForm)', function(data){
    return true;
  });
   form.on('submit(remark)', function(data){
    return true;
  });
});

function cbFormSuccess(data){
	layer.alert(data.msg,{},function(){
		var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
		parent.layer.close(index);
		window.history.go(-1);

	});
}
</script>
@endsection
