123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <table class="table">
- <thead>
- <th>选择</th>
- <th>粉丝昵称</th>
- <th>
- <div class="input-group">
- <input name="nickname" class="form-control" value="{$_GPC['nickname']}">
- <span class="input-group-btn">
- <button type="button" id="search" class="btn btn-default">搜索</button>
- </span>
- </div>
- </th>
- </thead>
- <tbody>
- {loop $fans $fan}
- {if !empty($fan['nickname'])}
- <tr>
- <td>
- <input name="openids" type="checkbox" value="{$fan['openid']}"{if in_array($fan['openid'], $check_fans)}checked{/if}></label>
- </td>
- <td>{$fan['nickname']}</td>
- <td></td>
- </tr>
- {/if}
- </tbody>
- {/loop}
- </table>
- {$pager}
- <script>
- require(['jquery'], function($) {
- $('[name="openids"]').click(function() {
- if ($(this).prop('checked')) {
- openids.push($(this).val());
- } else {
- delete openids[openids.indexOf($(this).val())];
- }
- var openid = new Array;
- var i = 0;
- for (var val in openids) {
- if (openids[val] != '') {
- openid[i] = openids[val];
- i++;
- }
- }
- openids = openid;
- document.cookie = 'fans_openids'+'{$_W['uniacid']}'+ '= '+JSON.stringify(openids);
- openidnum.html(openids.length);
- });
- $('.pagination a').click(function() {
- var page = $(this).attr('page');
- showFans(page, $('[name="nickname"]').val());
- });
- $('#search').click(function() {
- showFans(1, $('[name="nickname"]').val());
- });
- });
-
- </script>
-
|