313392073 5 lat temu
rodzic
commit
ff36f9fb43
3 zmienionych plików z 417 dodań i 242 usunięć
  1. 7 2
      page/demo.html
  2. 6 2
      page/user/workorderProblem.html
  3. 404 238
      page/user/workordertx.html

+ 7 - 2
page/demo.html

@@ -281,10 +281,15 @@
                         window.location.href = '/AdminUsers/From?id=' + data.id
                     }
                 });
-
             })
 
-
+            restuserid
+            restusername
+            restphone
+            restaccountnumber
+            restusername_a
+            resttype
+            adone
         </script>
 
     </div>

+ 6 - 2
page/user/workorderProblem.html

@@ -389,6 +389,9 @@
                     table.render({
                         elem: '#tables',
                         // url: '', //获取数据的接口
+                        where: {
+                            typed:$('input[name="type"]:checked').val(),
+                        },
                         data: [
                             {
                                 id: 1,
@@ -487,11 +490,10 @@
                                 createtime: '2020-04-20',
                             },
                         ],
-                        title: '用户数据表',
+                        title: '问题工单列表',
                         cellMinWidth: 120,
                         cols: params,
                         page: true,
-                        limit: 17,
                         id: 'searchReload',
                         height: 'full-175'
                     })
@@ -535,6 +537,7 @@
                 });
                 
                 $('#searchbtn').on('click', function(){
+                    var typed = $('input[name="type"]:checked').val() //状态筛选
                     var userid = $.trim($('#restuserid').val());
                     var type = $.trim($('#resttype').val());
                     if(userid == '' && type == 0) {
@@ -547,6 +550,7 @@
                             curr: 1 
                         },
                         where: {
+                            typed:typed,
                             userid:userid,
                             type:type
                         }

+ 404 - 238
page/user/workordertx.html

@@ -219,46 +219,74 @@
             <div class="layadmin-tabsbody-item layui-show">
                 <div class="layui-card layadmin-header">
                     <div class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
-                       
                         <a lay-href="/">主页</a>
                         <span lay-separator="">/</span>
-                        <a>
-                            <cite>预测师申请列表</cite>
-                        </a>
+                        <a>提现列表</a>
                         <span lay-separator="">/</span>
                         <a href="javascript:history.back(-1)">返回</a>
                     </div>
-                    <div class="main">
+                    <div class="main billcb problems">
+                        <div class="layui-elem-quote">
+                            <div class="layui-form layui-inline">
+                                <input type="radio" name="type" value="1" title="待提现列表" checked="" lay-filter="typeRadio">
+                                <input type="radio" name="type" value="2" title="已提现列表" lay-filter="typeRadio">
+                            </div>
+                        </div>
                         <div class="searchbox">
-                            <a href="./workorderlist.html" class="layui-btn">预测师列表</a>
+                            <span>用户编码:</span>
+                            <div class="layui-inline" style="width: auto">
+                                <input class="layui-input" name="restuserid" id="restuserid" autocomplete="off">
+                            </div>
+                            <span class="searchname">账户名:</span>
+                            <div class="layui-inline" style="width: auto">
+                                <input class="layui-input" name="restusername" id="restusername" autocomplete="off">
+                            </div>
                             <span class="searchname">电话号码:</span>
-                            <div class="layui-inline">
-                              <input class="layui-input" name="restphone" id="restphone" autocomplete="off">
+                            <div class="layui-inline" style="width: auto">
+                                <input class="layui-input" name="restphone" id="restphone" autocomplete="off">
                             </div>
-                            <span class="searchname">昵称:</span>
-                            <div class="layui-inline">
-                                <input class="layui-input" name="restnickname" id="restnickname" autocomplete="off">
+                            <span class="searchname">提现账号:</span>
+                            <div class="layui-inline" style="width: auto">
+                                <input class="layui-input" name="restaccountnumber" id="restaccountnumber" autocomplete="off">
                             </div>
-                            <span class="searchname">彩种类型:</span>
+                            <span id="adone">
+                                <span class="searchname">处理人员:</span>
+                                <div class="layui-inline" style="width: auto">
+                                    <input class="layui-input" name="restusername_a" id="restusername_a" autocomplete="off">
+                                </div>
+                            </span>
+                            <span class="searchname">提现类型:</span>
                             <div class="layui-form layui-inline">
-                                <select name="restcztype" lay-filter="restcztype" id="restcztype">
-                                    <option value="0">请选择彩种</option>
-                                    <option value="1">福彩3D</option>
-                                    <option value="2">排列三</option>
-                                    <option value="3">双色球</option>
-                                    <option value="4">大乐透</option>
+                                <select name="resttype" lay-filter="resttype" id="resttype">
+                                    <option value="0">请选择提现类型</option>
+                                    <option value="1">银行卡</option>
+                                    <option value="2">支付宝</option>
+                                    <option value="3">微信</option>
                                 </select>
                             </div>
                             <button class="layui-btn" data-type="reload" id="searchbtn">搜索</button>
                         </div>
+                        <!-- 图片放大的 -->
+                        <ul class="layer_notice" style="display: none;">
+                            <img src="" alt="" id="actimg" class="actimg">
+                        </ul>
                         <table class="layui-hide" id="tables" lay-filter="tables"></table>
                         <script type="text/html" id="bar">
-                            <a class="layui-btn layui-btn-xs" lay-event="edit">通过</a>
-                            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">拒绝</a>
+                            <a class="layui-btn layui-btn-sm" lay-event="edit">处理</a>
                         </script>
                         <div class="layui-row" id="popUpdateTest" style="display:none;">
                             <div class="layui-col-md10">
                                 <form class="layui-form layui-from-pane" lay-filter="formData" style="margin-top:20px">
+                                    <div class="layui-form-item layui-form-text">
+                                        <label class="layui-form-label">回执单</label>
+                                        <div class="layui-input-block">
+                                            <input type="file" id="chooseImage" accept="image/gif,image/jpeg,image/jpg,image/png" name="file" onchange="filechange(event)" />
+                                            <span class="img-box" id="img-box" style="width: 100%;border: 1px #dddddd dashed">
+                                                <img src="../../img/upload.png" id="img-pre" alt="">
+                                            </span>
+                                            <input type="hidden" id="url" name="url" value="">
+                                        </div>
+                                    </div>
                                     <div class="layui-form-item">
                                         <label class="layui-form-label">处理回复</label>
                                         <div class="layui-input-block">
@@ -284,250 +312,388 @@
     <script src="../../js/jquery.js"></script>
     <script src="../../js/common.js"></script>
     <script type="text/javascript">
-        layui.use(['element','table', 'form','laydate'], function () {
-            var element = layui.element, 
+        layui.use(['element', 'table', 'form'], function () {
+            var element = layui.element,
                 table = layui.table,
-                form = layui.form,
-                laydate = layui.laydate;
-                laydate.render({
-                    elem: '#createtime',
-                    value: new Date()
-                });
-            table.render({
-                elem: '#tables',
-                // url: '', //获取数据的接口
-                data: [
-                    {
-                        id:1,
-                        name: '哈哈哈',
-                        nickname: '哈哈哈哈哈',
-                        logo: 'https://www.55128.cn/static/images/logo-1.png',
-                        cztype: 1,
-                        createtime: '2020-04-20',
-                        phone:'13458563587',
-                        describes:'今天天气不错!',
-                        status:1,
-                    },
-                    {
-                        id:2,
-                        name: '哈哈哈0',
-                        nickname: '哈哈哈哈哈',
-                        logo: 'https://www.55128.cn/static/images/logo-1.png',
-                        cztype: 2,
-                        createtime: '2020-04-20',
-                        phone:'13458563587',
-                        describes:'今天天气不错!',
-                        status:1,
-                    },
-                    {
-                        id:3,
-                        name: '哈哈哈2',
-                        nickname: '哈哈哈哈哈',
-                        logo: 'https://www.55128.cn/static/images/logo-1.png',
-                        cztype: 3,
-                        createtime: '2020-04-20',
-                        phone:'13458563587',
-                        describes:'今天天气不错!',
-                        status:1,
-                    },
-                    {
-                        id:4,
-                        name: '哈哈哈3',
-                        nickname: '哈哈哈哈哈',
-                        logo: 'https://www.55128.cn/static/images/logo-1.png',
-                        cztype: 4,
-                        createtime: '2020-04-20',
-                        phone:'13458563587',
-                        describes:'今天天气不错!',
-                        status:1,
-                    },
-                    {
-                        id:5,
-                        name: '哈哈哈',
-                        nickname: '哈哈哈哈哈',
-                        logo: 'https://www.55128.cn/static/images/logo-1.png',
-                        cztype: 1,
-                        createtime: '2020-04-20',
-                        phone:'13458563587',
-                        describes:'今天天气不错!',
-                        status:1,
-                    },
-                    {
-                        id:6,
-                        name: '哈哈哈0',
-                        nickname: '哈哈哈哈哈',
-                        logo: 'https://www.55128.cn/static/images/logo-1.png',
-                        cztype: 2,
-                        createtime: '2020-04-20',
-                        phone:'13458563587',
-                        describes:'今天天气不错!',
-                        status:1,
-                    },
-                    {
-                        id:7,
-                        name: '哈哈哈2',
-                        nickname: '哈哈哈哈哈',
-                        logo: 'https://www.55128.cn/static/images/logo-1.png',
-                        cztype: 3,
-                        createtime: '2020-04-20',
-                        phone:'13458563587',
-                        describes:'今天天气不错!',
-                        status:1,
-                    },
-                    {
-                        id:8,
-                        name: '哈哈哈3',
-                        nickname: '哈哈哈哈哈',
-                        logo: 'https://www.55128.cn/static/images/logo-1.png',
-                        cztype: 4,
-                        createtime: '2020-04-20',
-                        phone:'13458563587',
-                        describes:'今天天气不错!',
-                        status:1,
-                    },
-                    {
-                        id:1,
-                        name: '哈哈哈',
-                        nickname: '哈哈哈哈哈',
-                        logo: 'https://www.55128.cn/static/images/logo-1.png',
-                        cztype: 1,
-                        createtime: '2020-04-20',
-                        phone:'13458563587',
-                        describes:'今天天气不错!',
-                        status:1,
-                    },
-                    {
-                        id:2,
-                        name: '哈哈哈0',
-                        nickname: '哈哈哈哈哈',
-                        logo: 'https://www.55128.cn/static/images/logo-1.png',
-                        cztype: 2,
-                        createtime: '2020-04-20',
-                        phone:'13458563587',
-                        describes:'今天天气不错!',
-                        status:1,
-                    },
-                ],
-                title: '用户数据表',
-                cellMinWidth: 120,
-                cols: [[
-                    { title: 'ID',align: 'center',type:'numbers'},
-                    {
-                        field: 'logo', title: '头像', templet: function (res) {
-                            return "<img class='headpic' src='" + res.logo + "'>"
+                form = layui.form;
+            //根据不同的选择  渲染不同得表格
+            form.on('radio(typeRadio)', function (data) {
+                if (data.value == 1) {
+                    $("#adone").hide()
+                    $("#restuserid").val('');
+                    $("#restusername").val('');
+                    $("#restphone").val('');
+                    $("#restaccountnumber").val('');
+                    $("#restusername_a").val('');
+                    $("#resttype").val(0);
+                    form.render("select");
+                    tableRender(cols1)
+                }
+                if (data.value == 2) {
+                    $("#adone").show()
+                    $("#restuserid").val('');
+                    $("#restusername").val('');
+                    $("#restphone").val('');
+                    $("#restaccountnumber").val('');
+                    $("#restusername_a").val('');
+                    $("#resttype").val(0);
+                    form.render("select");
+                    tableRender(cols2)
+                }
+            });
+            //待处理
+            var cols1 = [[
+                { title: 'ID',align: 'center',type:'numbers'},
+                { field: 'userid', title: '用户编码'},
+                { field: 'accountname', title: '账号户主名称'},
+                { field: 'accountphone', title: '电话号码'},
+                { field: 'accountnumber', title: '账户号码'},
+                { field: 'money', title: '提现金额'},
+                { field: 'type', title: '提现类型', templet: function (res) {
+                        var str = '';
+                        switch (res['type']) {
+                            case 1:
+                                str = '银行卡';
+                                break;
+                            case 2:
+                                str = '支付宝';
+                                break;
+                            case 3:
+                                str = '微信';
+                                break;
                         }
-                    },
-                    { field: 'nickname', title: '昵称'},
-                    { field: 'phone', title: '电话号码'},
-                    {
-                        field: 'cztype', title: '彩种类型', templet: function (res) {
-                            var str = '';
-                            switch (res.cztype) {
-                                case 1:
-                                    str = '福彩3D';
-                                    break;
-                                case 2:
-                                    str = '排列三'
-                                    break;
-                                case 3:
-                                    str = '双色球'
-                                    break;
-                                case 4:
-                                    str = '大乐透'
-                                    break;
-                            }
-                            return str
+                        return str
+                    }
+                },
+                { field: 'status', title: '提现状态', templet: function (res) {
+                        var str = '';
+                        switch (res['status']) {
+                            case 1:
+                                str = '新提交';
+                                break;
+                            case 2:
+                                str = '已解决';
+                                break;
+                            case 3:
+                                str = '打款失败';
+                                break;
                         }
-                    },
-                    { field: 'describes', title: '描述'},
-                    { field: 'createtime', title: '申请时间',templet: function (res) {
-                            return formatDate(res.createtime)
+                        return str
+                    }
+                },
+                { field: 'createtime', title: '申请时间',templet: function (res) {
+                        return formatDate(res.createtime)
+                    }
+                },
+                { fixed: 'right', title: '操作', toolbar: '#bar' }
+            ]]
+            // 已提现
+            var cols2 = [[
+                { title: 'ID',align: 'center',type:'numbers'},
+                { field: 'userid', title: '用户编码'},
+                { field: 'accountname', title: '账号户主名称'},
+                { field: 'accountphone', title: '电话号码'},
+                { field: 'accountnumber', title: '账户号码'},
+                { field: 'money', title: '提现金额'},
+                { field: 'type', title: '提现类型', templet: function (res) {
+                        var str = '';
+                        switch (res['type']) {
+                            case 1:
+                                str = '银行卡';
+                                break;
+                            case 2:
+                                str = '支付宝';
+                                break;
+                            case 3:
+                                str = '微信';
+                                break;
+                        }
+                        return str
+                    }
+                },
+                { field: 'status', title: '提现状态', templet: function (res) {
+                        var str = '';
+                        switch (res['status']) {
+                            case 1:
+                                str = '新提交';
+                                break;
+                            case 2:
+                                str = '已解决';
+                                break;
+                            case 3:
+                                str = '打款失败';
+                                break;
                         }
+                        return str
+                    }
+                },
+                { field: 'username_a', title: '处理人员'},
+                {
+                    field: 'receipt_a', title: '回执单', templet: function (res) {
+                        return "<img class='headpic' src='" + res.receipt_a + "'>"
+                    }
+                },
+                { field: 'content_a', title: '处理员回复'},
+                { field: 'createtime_a', title: '处理时间',templet: function (res) {
+                        return formatDate(res.createtime_a)
+                    }
+                },
+            ]]
+
+            tableRender(cols1) //默认初始化表格
+            function tableRender(params) {
+                table.render({
+                    elem: '#tables',
+                    // url: '', //获取数据的接口
+                    where: {
+                        typed: $('input[name="type"]:checked').val(),
                     },
-                    { fixed: 'right', title: '操作', toolbar: '#bar' }
-                ]],
-                page: true,
-                limit: 17,
-                id: 'searchReload',
-                height:'full-175'
+                    data: [
+                        {
+                            id: 1,
+                            userid: 1,
+                            content: '哈哈哈哈哈',
+                            img: 'https://tk.55128.cn/Areas/tk/Upload/2020066/A1-3.jpg',
+                            type: 1,
+                            createtime: '2020-04-20',
+                            status: 1,
+                            'username_a': '李果',
+                            'content_a': '已经申请',
+                            'createtime_a': '2020-04-20',
+                        },
+                        {
+                            id: 2,
+                            userid: 2,
+                            content: '哈哈哈哈哈',
+                            img: 'https://www.55128.cn/static/images/logo-1.png',
+                            type: 2,
+                            createtime: '2020-04-20',
+                            status: 1,
+                            'username_a': '李果',
+                            'content_a': '已经申请',
+                            'createtime_a': '2020-04-20',
+                        },
+                        {
+                            id: 3,
+                            userid: 3,
+                            content: '哈哈哈哈哈',
+                            img: 'https://www.55128.cn/static/images/logo-1.png',
+                            type: 3,
+                            createtime: '2020-04-20',
+                            status: 1,
+                            'username_a': '李果',
+                            'content_a': '已经申请',
+                            'createtime_a': '2020-04-20',
+                        },
+                        {
+                            id: 4,
+                            userid: 4,
+                            content: '哈哈哈哈哈',
+                            img: 'https://www.55128.cn/static/images/logo-1.png',
+                            type: 4,
+                            createtime: '2020-04-20',
+                            status: 1,
+                            'username_a': '李果',
+                            'content_a': '已经申请',
+                            'createtime_a': '2020-04-20',
+                        },
+                        {
+                            id: 5,
+                            userid: 5,
+                            content: '哈哈哈哈哈',
+                            img: 'https://www.55128.cn/static/images/logo-1.png',
+                            type: 1,
+                            createtime: '2020-04-20',
+                            status: 1,
+                            'username_a': '李果',
+                            'content_a': '已经申请',
+                            'createtime_a': '2020-04-20',
+                        },
+                        {
+                            id: 6,
+                            userid: 6,
+                            content: '哈哈哈哈哈',
+                            img: 'https://www.55128.cn/static/images/logo-1.png',
+                            type: 2,
+                            createtime: '2020-04-20',
+                            phone: '13458563587',
+                            status: 1,
+                            'createtime_a': '2020-04-20',
+                        },
+                        {
+                            id: 7,
+                            userid: 7,
+                            content: '哈哈哈哈哈',
+                            img: 'https://www.55128.cn/static/images/logo-1.png',
+                            type: 3,
+                            createtime: '2020-04-20',
+                            phone: '13458563587',
+                            status: 1,
+                            'username_a': '李果',
+                            'content_a': '已经申请',
+                            'createtime_a': '2020-04-20',
+                        },
+                        {
+                            id: 8,
+                            userid: 8,
+                            content: '哈哈哈哈哈',
+                            img: 'https://www.55128.cn/static/images/logo-1.png',
+                            type: 4,
+                            status: 1,
+                            'username_a': '李果',
+                            'content_a': '已经申请',
+                            'createtime_a': '2020-04-20',
+                            createtime: '2020-04-20',
+                        },
+                    ],
+                    title: '问题工单列表',
+                    cellMinWidth: 120,
+                    cols: params,
+                    page: true,
+                    id: 'searchReload',
+                    height: 'full-175'
+                })
+            }
+
+            $('body').delegate('.headpic', 'click', function () {
+                var imgurl = $(this).attr('src');
+                $("#actimg").attr('src', imgurl)
+                layer.open({
+                    type: 1,
+                    shade: false,
+                    title: false,
+                    content: $('.layer_notice'),
+                    cancel: function () {
+                        $(".layer_notice").hide()
+                        $(".layui-layer-page").hide()
+                        layer.closeAll()
+                    }
+                });
             })
-            
             form.on('submit(sbtn)', function (data) {
                 $.ajax({
-                    type:'post',
-                    url:'', //拒绝和处理意见的回复
-                    dataType:'json',
-                    data:data.field,
-                    success:function(res) {
-                        if(res.code == 0) {
-                            layer.msg('提交成功',{icon: 6});
-                        }else{
-                            layer.msg("网络错误,请稍后再试", {icon: 5});
+                    type: 'post',
+                    url: '', //处理工单的回复
+                    dataType: 'json',
+                    data: {'receipt_a':data.field.url,'content_a':data.field['content_a'],'id':data.field.id},
+                    success: function (res) {
+                        if (res.code == 0) {
+                            layer.msg('提交成功', { icon: 6 }, function () {
+                                location.reload()
+                            });
+                        } else {
+                            layer.msg("网络错误,请稍后再试", { icon: 5 });
                         }
+                    },
+                    error: function () {
+                        layer.msg("网络错误,请稍后再试", { icon: 5 });
                     }
                 })
                 return false;
             });
-            
-            $('#searchbtn').on('click', function(){
-                var phone = $.trim($('#restphone').val());
-                var nickname = $.trim($('#restnickname').val());
-                var cztype = $.trim($('#restcztype').val());
-                if(name == '' && nickname == '' && cztype == 0 && createtime == '') {
-                    layer.msg("请输入查询条件", {icon: 5});
+
+            $('#searchbtn').on('click', function () {
+                var typed = $('input[name="type"]:checked').val() //状态筛选
+                var userid = $.trim($('#restuserid').val());
+                var accountname = $.trim($('#restusername').val());
+                var accountphone = $.trim($('#restphone').val());
+                var accountnumber = $.trim($('#restaccountnumber').val());
+                var username_a = $.trim($('#restusername_a').val());
+                var type = $.trim($('#resttype').val());
+                if (userid == '' &&  accountname == '' &&  accountphone == '' && accountnumber == '' && username_a == '' && type == 0) {
+                    layer.msg("请输入查询条件", { icon: 5 });
                     return false
                 }
                 table.reload('searchReload', {
-                    url:'',//查询返回的接口
+                    url: '',//查询返回的接口
                     page: {
-                        curr: 1 
+                        curr: 1
                     },
                     where: {
-                        phone: phone,
-                        nickname:nickname,
-                        cztype:cztype
+                        typed: typed,
+                        userid: userid,
+                        accountname:accountname,
+                        accountphone:accountphone,
+                        accountnumber:accountnumber,
+                        username_a:username_a,
+                        type: type
                     }
                 })
             });
+            //处理工单描述
             table.on('tool(tables)', function (obj) {
+                $(".layer_notice").hide()
+                $(".layui-layer-page").hide()
+                layer.closeAll()
                 var data = obj.data;
-                if (obj.event === 'del') {
-                    layer.open({
-                        type: 1,
-                        title: "处理意见编辑",
-                        area: ['420px', '300px'],
-                        shade: 0, 
-                        content: $("#popUpdateTest"),
-                        success: function (layero, index) {
-                            $("#hideid").val(data.id)
-                            $("#content_a").val('')
-                        },
-                        cancel: function(){
-                            $("#popUpdateTest").hide()
-                            layer.closeAll()
-                        }
-                    });
-                } else if (obj.event === 'edit') {
-                    layer.confirm('确定通过此条申请吗?', function (index) {
-                        $.ajax({
-                            url:'', //删除的接口
-                            type:'get',
-                            dataType: "json",
-                            data : "id="+data.id+"&status=1",    
-                            success:function(res) {
-                                if(res.code == 0) {
-                                    layer.msg("同意成功", {icon: 6});
-                                }else{
-                                    layer.msg("网络错误,同意失败", {icon: 5});
-                                }
-                                layer.close(index);
-                            }
-                        })
-                    });
-                }
+                layer.open({
+                    type: 1,
+                    title: "处理工单描述",
+                    area: ['420px', '400px'],
+                    shade: 0,
+                    content: $("#popUpdateTest"),
+                    success: function (layero, index) {
+                        $("#hideid").val(data.id)
+                        $("#content_a").val('')
+                        $("#img-pre").attr('src','../../img/upload.png')
+                    },
+                    cancel: function () {
+                        $("#popUpdateTest").hide()
+                        layer.closeAll()
+                    }
+                });
             });
         })
+        $("#img-box").click(function () {
+            $("#chooseImage").click();
+        })
+        function filechange(obj) {
+            var files = obj.target.files, file;
+            var file = files[0]
+            if (!/image\/\w+/.test(file.type)) {
+                layer.msg("请确保文件为图片类型", {icon: 5});
+                return false;
+            }
+            var maxSize = 2;
+            var filesize = file.size;
+            if (filesize/(1024 * 1024) > maxSize) {
+                layer.msg('上传图片不能大于'+maxSize+'M', {icon: 5});
+                return false;
+            }
+            var reader = new FileReader();
+            reader.readAsDataURL(file);
+            reader.onload = function (e) {
+                dealImage(this.result, { width: 200 }, function (base) {
+                    $("#img-pre").attr("src",base);
+                    base64Upload(base)
+                });
+            
+            }
+        }
+        //上传base64图片
+        function base64Upload(img) {
+            var formData = new FormData();
+            formData.append('base64string',img);
+            $.ajax({
+                type:'post',
+                url: '', //接受图片的地址
+                data: formData,
+                processData: false,
+                cache: false,
+                contentType: false, 
+                success:function(res){
+                    var res = JSON.parse(res);
+                    if (res.code == 0) {
+                        $("#url").val(res.data[0].url) //保存图片地址
+                    } else {
+                        layer.msg('上传失败',{time: 1500});
+                    }
+                },
+                error:function(error){
+                    layer.msg('上传失败',{time: 1500});
+                }
+            })
+        }
     </script>
 </body>
-
 </html>