rock_wxgzh_xcyuser.php 2.3 KB

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