<?php
use xh\library\url;
use xh\unity\cog;
use xh\library\model;
use xh\unity\userCog;

$id=$_GET['id'];
$key=$_GET['channel_id'];
$rmb=$_GET['rmb'];
$time=$_GET['time'];
$ua=URL_ROOT."/";

?>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="msapplication-tap-highlight" content="no">
    <!-- CORE CSS-->    
  
    <link rel="icon" href="/favicon.ico" />
    <link href="<?php echo URL_VIEW;?>static/css/materialize.min.css" type="text/css" rel="stylesheet" media="screen,projection">
    <link href="<?php echo URL_VIEW;?>static/css/style.min.css" type="text/css" rel="stylesheet" media="screen,projection">
    <!-- Custome CSS-->    
    <link href="<?php echo URL_VIEW;?>static/css/custom/custom.min.css" type="text/css" rel="stylesheet" media="screen,projection">
    <link href="<?php echo URL_VIEW;?>static/css/newstyle.css" type="text/css" rel="stylesheet" media="screen,projection">
    <!-- INCLUDED PLUGIN CSS ON THIS PAGE -->
    <link href="<?php echo URL_VIEW;?>static/js/plugins/perfect-scrollbar/perfect-scrollbar.css" type="text/css" rel="stylesheet" media="screen,projection">
    <link href="<?php echo URL_VIEW;?>static/js/plugins/jvectormap/jquery-jvectormap.css" type="text/css" rel="stylesheet" media="screen,projection">
    <link href="<?php echo URL_VIEW;?>static/js/plugins/chartist-js/chartist.min.css" type="text/css" rel="stylesheet" media="screen,projection">
    <link href="<?php echo URL_VIEW;?>static/js/plugins/sweetalert/sweetalert.css" type="text/css" rel="stylesheet" media="screen,projection">
  
  
  
<link href="<?php echo URL_VIEW;?>/static/tun/backend.min.css" type="text/css" rel="stylesheet">
<script src="<?php echo URL_VIEW;?>/static/tun/jquery.min.js"></script>
<script src="<?php echo URL_VIEW;?>/static/tun/bootstrap.min.js"></script>
<script src="<?php echo URL_VIEW;?>/static/tun/common.js"></script>
<script src="<?php echo URL_VIEW;?>/static/tun/reqrcode.js"></script>
<link href="<?php echo URL_VIEW;?>/static/tun/base_cwn.css" type="text/css" rel="stylesheet">
 <link rel="stylesheet" href="<?php echo URL_VIEW;?>/static/layui/css/layui.css"  media="all">
  <script src="<?php echo URL_VIEW;?>/static/layui/layui.js" charset="utf-8"></script>

</head>


<!--element js-->
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="https://unpkg.com/element-ui@2.4.11/lib/index.js"></script>
<link rel="stylesheet" href="https://unpkg.com/element-ui@2.4.11/lib/theme-chalk/index.css">
<!--element js-->
<style>
    #code-list{width:650px;margin-top:10px;}
    #code-list li{float:left;margin:5px;width:120px;}
    #code-list li p img{max-width:100%;}
    #code-list li input{width:60px;border:1px solid #999999;height:25px;line-height:25px;}
    .input-group .input-group-addon .btn{text-align: left;}
    .qrcode-url a{display:inline-block;width:100px;background:#ebcdcd;color:#b94a48;padding:5px;text-align:center;}
    .input-group-addon, .input-group-btn, .input-group .form-control{display:inline-block;}
  
 
.layui-upload-img{width: 92px; height: 92px; margin: 0 10px 10px 0;}

</style>




<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="alert alert-info-light">
           请在APP获取UID及cookie后进行整理<br>
    </div>
        <div class="alert alert-danger-light">
          <font size=5 color=red>txt文件名字应为你的设备KEyid命名  格式一定以|分割并换行</font>
         <br> <font size=5 color=red>例如：123 456  677 566  两个数据 Txt文件里应为 123|456 换行 677|566</font>
    </div>
  
  



    <div class="form-group">
    	
      <label class="control-label col-xs-12 col-sm-2">'请选择整理好的微博收款UID以及cookie'</label>
      <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <div class="input-group-addon no-border no-padding">
   
                  <div class="layui-upload">
  <button type="button" class="layui-btn" id="test2">选择文件</button> 
  <button type="button" class="layui-btn" id="test9">开始上传</button>




</div>



  



                    <ul id="code-list">

                    </ul>
                </div>
                <span class="msg-box n-right" for="c-qrcode"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-qrcode">

            </ul>
        </div>
    </div>

</form>

</div>













<script>

  

  
 layui.use('upload', function(){
  var upload = layui.upload;  


  
 //多文件上传
  upload.render({
    elem: '#test2'
    ,url: '/weibo/index.php?key=<?php echo $key; ?>'
    ,multiple: true
    ,auto: false
    ,bindAction: '#test9'
    ,before: function(obj){
    }
    ,done: function(res){
      if(res['code']==1){

      //上传完毕
     var imgpath=encodeURI(res['src']);

 //提交二维码 

//var key=<?php echo WEB_QQ; ?>; 
  
   var id='<?php echo $id; ?>';
   var key='<?php echo $key; ?>';
   var siyue='<?php echo $time; ?>';

 $.get("<?php echo url::s('index/alipay/wxAdd',"id=");?>" + id + '&key='+key, function(resulat){
                      if(resulat.code == '200'){
                        	layer.msg(resulat.msg);

                          
                      }else{
                        layer.msg(resulat.msg);

                      }
                 
                 
                 
                  });  

 

  
 	layer.msg('上传成功请等待系统自动配置'); 
  
  
$("#proimg").attr('src',imgpath);
$("#inputimg").val(imgpath);

  
      }else{
layer.msg('上传失败');
}
    
   } 
   
 
  });





  
  
  
  

    }); 
    
    

  
  
    
    
    
    
    
    
    
    
    
    
    
 
  
</script>

