rock_wxgzh_user.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php if(!defined('HOST'))die('not access');?>
  2. <script >
  3. $(document).ready(function(){
  4. var a = $('#veiw_{rand}').bootstable({
  5. tablename:'wouser',fanye:true,
  6. modedir:'{mode}:{dir}',
  7. storebeforeaction:'wouser_before',
  8. columns:[{
  9. text:'头像',dataIndex:'headimgurl',renderer:function(v){
  10. return '<img src="'+v+'" width="40">';
  11. }
  12. },{
  13. text:'微信昵称',dataIndex:'nickname'
  14. },{
  15. text:'openid',dataIndex:'openid'
  16. },{
  17. text:'性别',dataIndex:'sex',sortable:true,renderer:function(v){
  18. if(v=='1')v='男';
  19. if(v=='2')v='女';
  20. return v;
  21. }
  22. },{
  23. text:'国家',dataIndex:'country'
  24. },{
  25. text:'省份',dataIndex:'province',sortable:true
  26. },{
  27. text:'城市',dataIndex:'city',sortable:true
  28. },{
  29. text:'授权时间',dataIndex:'adddt',sortable:true
  30. },{
  31. text:'操作时间',dataIndex:'optdt',sortable:true
  32. },{
  33. text:'ID',dataIndex:'id',sortable:true
  34. }],
  35. itemclick:function(){
  36. btn(false);
  37. },
  38. beforeload:function(){
  39. btn(true);
  40. }
  41. });
  42. //编辑和删除按钮可用状态切换
  43. function btn(bo){
  44. }
  45. var c={
  46. refresh:function(){
  47. a.reload();//刷新列表的方法
  48. },
  49. search:function(){
  50. var s=get('key_{rand}').value;
  51. a.setparams({key:s},true);
  52. }
  53. };
  54. js.initbtn(c); //这个是将上面的方法绑定到对应按钮上
  55. });
  56. </script>
  57. <div>
  58. <table width="100%"><tr>
  59. <td nowrap>
  60. <button class="btn btn-default" click="refresh" type="button"><i class="icon-refresh"></i> 刷新</button> &nbsp;
  61. </td>
  62. <td width="80%">
  63. <div class="input-group" style="width:220px;">
  64. <input class="form-control" id="key_{rand}" placeholder="昵称/城市/省份">
  65. <span class="input-group-btn">
  66. <button class="btn btn-default" click="search" type="button"><i class="icon-search"></i></button>
  67. </span>
  68. </div>
  69. </td>
  70. <td align="right" nowrap>
  71. <button class="btn btn-default" id="fstest_{rand}" disabled click="testcs" type="button">测试发模板消息</button>
  72. </td>
  73. </tr>
  74. </table>
  75. </div>
  76. <div class="blank10"></div>
  77. <div id="veiw_{rand}"></div>
粤ICP备19079148号