ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
1.可以下载参考后台(下载密码:9pfm): [后台代码下载](https://pan.baidu.com/s/1jmDqIA1YqO-QBZ5De5jlPQ) 2.其中前端页面代码feedback-list.html展示 ~~~ <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <meta name="renderer" content="webkit|ie-comp|ie-stand"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,member-scalable=no" /> <meta http-equiv="Cache-Control" content="no-siteapp" /> <!--[if lt IE 9]> <script type="text/javascript" src="lib/html5.js"></script> <script type="text/javascript" src="lib/respond.min.js"></script> <script type="text/javascript" src="lib/PIE_IE678.js"></script> <![endif]--> <link href="css/H-ui.min.css" rel="stylesheet" type="text/css" /> <link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" /> <link href="lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" /> <!--[if IE 6]> <script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script> <script>DD_belatedPNG.fix('*');</script> <![endif]--> <title>自定义菜单</title> </head> <body> <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 自定义菜单 <span class="c-gray en">&gt;</span> 自定义菜单 <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav> <div class="pd-20"> <div class="text-c"> 日期范围: <input type="text" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}'})" id="datemin" class="input-text Wdate" style="width:120px;"> - <input type="text" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d'})" id="datemax" class="input-text Wdate" style="width:120px;"> <input type="text" class="input-text" style="width:250px" placeholder="输入关键词" id="" name=""> <button type="submit" class="btn btn-success radius" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜意见</button> </div> <form action="weixin.php" method="post" > <div class="cl pd-5 bg-1 bk-gray mt-20"><input name="do_submit" class="btn btn-danger radius" type="submit" /> <span class="r">共有数据:<strong>891</strong> 条</span> &nbsp;&nbsp;&nbsp;<span style="color:red;">注意一级菜单最多只能设置三个、二级菜单最多只能设置五个、无需设置的菜单为空就好(益达么么哒)</span></div> (特别注意: &nbsp;添加菜单时从第一个往第二个添加、不可跨级添加) <div class="mt-20"> <table class="table table-border table-bordered table-hover table-bg table-sort"> <thead> <tr class="text-c"> <th width="25">序号</th> <th width="60">一级菜单</th> <th width="60">二级菜单</th> <th>菜单类型--填写值</th> </tr> </thead> <tbody> <tr class="text-c"> <td>1</td> <td><input type="text" class="input-text" style="width:150px" placeholder="不超过5个字" id="" name="menu0"> <br /><input type="radio" name="menu0_box" value="click"/>关键词回复<input type="radio" name="menu0_box" value="view" checked/>链接回复 <input type="text" class="input-text" style="width:150px" placeholder="值" id="" name="menu0_0"> </td> <td width="300"> 1<input type="text" class="input-text" style="width:150px" placeholder="不超过7个字" id="" name="menu0_menu0"><br /> 2<input type="text" class="input-text" style="width:150px" placeholder="不超过7个字" id="" name="menu0_menu1"><br /> 3<input type="text" class="input-text" style="width:150px" placeholder="不超过7个字" id="" name="menu0_menu2"><br /> 4<input type="text" class="input-text" style="width:150px" placeholder="不超过7个字" id="" name="menu0_menu3"><br /> 5<input type="text" class="input-text" style="width:150px" placeholder="不超过7个字" id="" name="menu0_menu4"><br /> </td> <td> 1<input type="radio" name="menu0_menu0_box0" value="click"/>关键词回复<input type="radio" name="menu0_menu0_box0" value="view" checked/>链接回复&nbsp;&nbsp;<input type="text" class="input-text" style="width:200px" placeholder="" id="" name="menu0_menu0_name0" ><br /> 2<input type="radio" name="menu0_menu0_box1" value="click"/>关键词回复<input type="radio" name="menu0_menu0_box1" value="view" checked/>链接回复&nbsp;&nbsp;<input type="text" class="input-text" style="width:200px" placeholder="" id="" name="menu0_menu0_name1" ><br /> 3<input type="radio" name="menu0_menu0_box2" value="click"/>关键词回复<input type="radio" name="menu0_menu0_box2" value="view" checked/>链接回复&nbsp;&nbsp;<input type="text" class="input-text" style="width:200px" placeholder="" id="" name="menu0_menu0_name2" ><br /> 4<input type="radio" name="menu0_menu0_box3" value="click"/>关键词回复<input type="radio" name="menu0_menu0_box3" value="view" checked/>链接回复&nbsp;&nbsp;<input type="text" class="input-text" style="width:200px" placeholder="" id="" name="menu0_menu0_name3" ><br /> 5<input type="radio" name="menu0_menu0_box4" value="click"/>关键词回复<input type="radio" name="menu0_menu0_box4" value="view" checked/>链接回复&nbsp;&nbsp;<input type="text" class="input-text" style="width:200px" placeholder="" id="" name="menu0_menu0_name4" ><br /> </td> </tr> <tr class="text-c"> <td>2</td> <td><input type="text" class="input-text" style="width:150px" placeholder="不超过5个字" id="" name="menu1"> <br /><input type="radio" name="menu1_box" value="click"/>关键词回复<input type="radio" name="menu1_box" value="view" checked/>链接回复 <input type="text" class="input-text" style="width:150px" placeholder="值" id="" name="menu1_1"> </td> <td width="300"> 1<input type="text" class="input-text" style="width:150px" placeholder="不超过7个字" id="" name="menu1_menu0"><br /> 2<input type="text" class="input-text" style="width:150px" placeholder="不超过7个字" id="" name="menu1_menu1"><br /> 3<input type="text" class="input-text" style="width:150px" placeholder="不超过7个字" id="" name="menu1_menu2"><br /> 4<input type="text" class="input-text" style="width:150px" placeholder="不超过7个字" id="" name="menu1_menu3"><br /> 5<input type="text" class="input-text" style="width:150px" placeholder="不超过7个字" id="" name="menu1_menu4"><br /> </td> <td> 1<input type="radio" name="menu1_menu0_box0" value="click"/>关键词回复<input type="radio" name="menu1_menu0_box0" value="view" checked/>链接回复&nbsp;&nbsp;<input type="text" class="input-text" style="width:200px" placeholder="" id="" name="menu1_menu0_name0" ><br /> 2<input type="radio" name="menu1_menu0_box1" value="click"/>关键词回复<input type="radio" name="menu1_menu0_box1" value="view" checked/>链接回复&nbsp;&nbsp;<input type="text" class="input-text" style="width:200px" placeholder="" id="" name="menu1_menu0_name1" ><br /> 3<input type="radio" name="menu1_menu0_box2" value="click"/>关键词回复<input type="radio" name="menu1_menu0_box2" value="view" checked/>链接回复&nbsp;&nbsp;<input type="text" class="input-text" style="width:200px" placeholder="" id="" name="menu1_menu0_name2" ><br /> 4<input type="radio" name="menu1_menu0_box3" value="click"/>关键词回复<input type="radio" name="menu1_menu0_box3" value="view" checked/>链接回复&nbsp;&nbsp;<input type="text" class="input-text" style="width:200px" placeholder="" id="" name="menu1_menu0_name3" ><br /> 5<input type="radio" name="menu1_menu0_box4" value="click"/>关键词回复<input type="radio" name="menu1_menu0_box4" value="view" checked/>链接回复&nbsp;&nbsp;<input type="text" class="input-text" style="width:200px" placeholder="" id="" name="menu1_menu0_name4" ><br /> </td> </tr> <tr class="text-c"> <td>3</td> <td><input type="text" class="input-text" style="width:150px" placeholder="不超过5个字" id="" name="menu2"> <br /><input type="radio" name="menu2_box" value="click"/>关键词回复<input type="radio" name="menu2_box" value="view" checked/>链接回复 <input type="text" class="input-text" style="width:150px" placeholder="值" id="" name="menu2_2"> </td> <td width="300"> 1<input type="text" class="input-text" style="width:150px" placeholder="不超过7个字" id="" name="menu2_menu0"><br /> 2<input type="text" class="input-text" style="width:150px" placeholder="不超过7个字" id="" name="menu2_menu1"><br /> 3<input type="text" class="input-text" style="width:150px" placeholder="不超过7个字" id="" name="menu2_menu2"><br /> 4<input type="text" class="input-text" style="width:150px" placeholder="不超过7个字" id="" name="menu2_menu3"><br /> 5<input type="text" class="input-text" style="width:150px" placeholder="不超过7个字" id="" name="menu2_menu4"><br /> </td> <td> 1<input type="radio" name="menu2_menu0_box0" value="click"/>关键词回复<input type="radio" name="menu2_menu0_box0" value="view" checked/>链接回复&nbsp;&nbsp;<input type="text" class="input-text" style="width:200px" placeholder="" id="" name="menu2_menu0_name0" ><br /> 2<input type="radio" name="menu2_menu0_box1" value="click"/>关键词回复<input type="radio" name="menu2_menu0_box1" value="view" checked/>链接回复&nbsp;&nbsp;<input type="text" class="input-text" style="width:200px" placeholder="" id="" name="menu2_menu0_name1" ><br /> 3<input type="radio" name="menu2_menu0_box2" value="click"/>关键词回复<input type="radio" name="menu2_menu0_box2" value="view" checked/>链接回复&nbsp;&nbsp;<input type="text" class="input-text" style="width:200px" placeholder="" id="" name="menu2_menu0_name2" ><br /> 4<input type="radio" name="menu2_box3" value="click"/>关键词回复<input type="radio" name="menu2_menu0_box3" value="view" checked/>链接回复&nbsp;&nbsp;<input type="text" class="input-text" style="width:200px" placeholder="" id="" name="menu2_menu0_name3" ><br /> 5<input type="radio" name="menu2_menu0_box4" value="click"/>关键词回复<input type="radio" name="menu2_menu0_box4" value="view" checked/>链接回复&nbsp;&nbsp;<input type="text" class="input-text" style="width:200px" placeholder="" id="" name="menu2_menu0_name4" ><br /> </td> </tr> </tbody> </table> </form> </div> </div> <script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script> <script type="text/javascript" src="lib/layer/1.9.3/layer.js"></script> <script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script> <script type="text/javascript" src="lib/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script> <script type="text/javascript" src="js/H-ui.js"></script> <script type="text/javascript" src="js/H-ui.admin.js"></script> <script type="text/javascript"> /*用户-启用*/ function member_start(obj,id){ layer.confirm('确认要启用吗?',function(index){ $(obj).parents("tr").find(".td-manage").prepend('<a style="text-decoration:none" onClick="member_stop(this,id)" href="javascript:;" title="停用"><i class="Hui-iconfont">&#xe631;</i></a>'); $(obj).parents("tr").find(".td-status").html('<span class="label label-success radius">已启用</span>'); $(obj).remove(); layer.msg('已启用!',{icon: 6,time:1000}); }); } /*用户-编辑*/ function member_edit(title,url,id,w,h){ layer_show(title,url,w,h); } /*密码-修改*/ function change_password(title,url,id,w,h){ layer_show(title,url,w,h); } /*用户-删除*/ function member_del(obj,id){ layer.confirm('确认要更新吗?',function(index){ $(obj).parents("tr").remove(); var ob=layer.msg('已更新!',{icon:1,time:1000}); }); } </script> </body> </html> ~~~ 后台weixin.php页面展示: ~~~ <?php function http_curl($url,$data=null){ //1.初始化,创建一个新cURL资源 $ch = curl_init(); //2.设置URL和相应的选项 curl_setopt($ch, CURLOPT_URL, $url); //下面两个是php5.6版本需加上才能实现 curl_setopt($ch,CURLOPT_SAFE_UPLOAD, FALSE); curl_setopt($ch,CURLOPT_SSL_VERIFYHOST, FALSE); //curl_setopt($ch, CURLOPT_HEADER, 0); if(!empty($data)){ curl_setopt($ch,CURLOPT_POST,1); curl_setopt($ch,CURLOPT_POSTFIELDS,$data); } curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,false);//测试号写上这个是跳过SSL证书检查,返回结果才不会null; curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);//禁止curl资源直接输出 //3.抓取URL并把它传递给浏览器 $opt=curl_exec($ch); //4.关闭cURL资源,并且释放系统资源 curl_close($ch); return $opt; } function get_token(){ $appid="wx165112bf167af76c"; $secret="c65b22bfcf03fdd98504eac299701b03"; $url="https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={$appid}&secret={$secret}"; $json=http_curl($url); $result=json_decode($json); return $result->access_token; } $token=get_token(); var_dump($_POST); ?> ~~~ 注意点(测试号及php5.6在weixin.php中不要忘): ![](https://box.kancloud.cn/166dc990872733e37523c135b6a89e13_454x75.png) ![](https://box.kancloud.cn/c6657f0510fb87e00a9df1e74231f4ea_797x50.png) 结果前端展示 ![](https://box.kancloud.cn/26e583068547b4e18f9a0cf791788120_1463x812.png) 提交结果展示 ![](https://box.kancloud.cn/711beadec4f90db699f26ddcf2662c33_1920x414.png) 即完成了数据的提交并展示