rock_wxgzh_xcyuser.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. }
  50. var c={
  51. refresh:function(){
  52. a.reload();//刷新列表的方法
  53. },
  54. search:function(){
  55. var s=get('key_{rand}').value;
  56. a.setparams({key:s},true);
  57. }
  58. };
  59. js.initbtn(c); //这个是将上面的方法绑定到对应按钮上
  60. });
  61. </script>
  62. <div>
  63. <table width="100%"><tr>
  64. <td nowrap>
  65. <button class="btn btn-default" click="refresh" type="button"><i class="icon-refresh"></i> 刷新</button> &nbsp;
  66. </td>
  67. <td width="95%" align="left">
  68. <div class="input-group" style="width:220px;">
  69. <input class="form-control" id="key_{rand}" placeholder="昵称/城市/省份">
  70. <span class="input-group-btn">
  71. <button class="btn btn-default" click="search" type="button"><i class="icon-search"></i></button>
  72. </span>
  73. </div>
  74. </td>
  75. <td align="right" nowrap>
  76. </td>
  77. </tr>
  78. </table>
  79. </div>
  80. <div class="blank10"></div>
  81. <div id="veiw_{rand}"></div>