人人商城

content_provider.html 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  1. {template 'common/header-gw'}
  2. <ul class="nav nav-tabs">
  3. <li{if $do == 'finance_info' || $do == 'account_list' || $do == 'display' || $do == 'register_flow' || $do == 'flow_control'} class="active"{/if}>
  4. <a href="{php echo url('system/content_provider/account_list');}">流量主</a>
  5. </li>
  6. <li{if $do == 'content_provider'} class="active"{/if}><a href="{php echo url('system/content_provider/content_provider');}">广告主</a></li>
  7. </ul>
  8. <style>
  9. .nav .nav-tabs-flow {
  10. border-bottom: 1px solid #ddd;
  11. }
  12. .nav-tabs-flow>li {
  13. float: left;
  14. margin-bottom: -1px;
  15. font-size: 12px!important;
  16. }
  17. .nav-tabs-flow>li.active>a, .nav-tabs-flow>li.active>a:hover, .nav-tabs-flow>li.active>a:focus {
  18. color: #555;
  19. background-color: #fff;
  20. border: 1px solid #ddd;
  21. border-bottom-color: transparent;
  22. cursor: default;
  23. font-size: 12px!important;
  24. }
  25. </style>
  26. <div class="clearfix">
  27. {if $do != 'content_provider'}
  28. <div class="alert alert-info">
  29. <div>
  30. <i class="fa fa-info-circle"></i>
  31. 免费用户默认开通流量主服务,如果要进行关闭,请升级为授权版或商业版。
  32. </div>
  33. <div>
  34. <i class="fa fa-info-circle"></i>
  35. 免费用户对公众号进行标签设置后,可以对广告进行分成。
  36. </div>
  37. </div>
  38. {/if}
  39. {if $do != 'content_provider'}
  40. <ul class="nav nav-tabs-flow">
  41. <li{if $do == 'account_list' || $do == 'display' || $do == 'register_flow' || $do == 'flow_control'} class="active"{/if}>
  42. {if $flow_master_info['status'] == 4 || IMS_FAMILY == 'v'}
  43. <a href="{php echo url('system/content_provider/account_list');}">流量管理</a>
  44. {elseif $flow_master_info['status'] != 4}
  45. <a href="{php echo url('system/content_provider/display');}">流量管理</a>
  46. {/if}
  47. </li>
  48. {if !empty($commission_show) || $flow_master_info['status'] == 4}
  49. <li{if $do == 'finance_info'} class="active"{/if}><a href="{php echo url('system/content_provider/finance_info');}">财务信息</a></li>
  50. {/if}
  51. </ul>
  52. {/if}
  53. {if $do == 'display'}
  54. <div class="panel panel-default">
  55. <div class="panel-heading">申请流量主</div>
  56. <div class="panel-body">
  57. <div class="col-xs-7">
  58. <span>流量主: {if empty($flow_master_info['status'])}未申请{else}{$flow_master_info['status_text']}{/if}</span>
  59. {if $flow_master_info['status'] == 3 && !empty($flow_master_info['refuse_reason'])}
  60. <span class="help-block">
  61. <strong class="text-danger">{$flow_master_info['refuse_reason']}</strong>
  62. </span>
  63. {/if}
  64. <span class="help-block">只需简单申请,即可成为流量主,按月获取广告收入。广告资源优质丰富,数据统计精准透明。</span>
  65. </div>
  66. {if is_error($flow_master_info) || (!is_error($flow_master_info) && ($flow_master_info['status'] == 1 || $flow_master_info['status'] == 3))}
  67. <div class="col-xs-5">
  68. <span class="pull-right">
  69. <a class="btn btn-primary" href="{php echo url('system/content_provider/register_flow')}">申请流量主</a>
  70. </span>
  71. </div>
  72. {/if}
  73. </div>
  74. </div>
  75. {/if}
  76. {if $do == 'register_flow'}
  77. <div class="panel panel-default">
  78. <div class="panel-heading">申请流量主</div>
  79. <div class="panel-body">
  80. <form action="" method="post" class="form-horizontal" role="form" enctype="multipart/form-data" id="form1">
  81. <div class="form-group">
  82. <label class="col-xs-12 col-sm-3 col-md-2 control-label">联系人</label>
  83. <div class="col-sm-9 col-xs-12">
  84. <input type="text" name="linkman" id="linkman" class="form-control" autocomplete="off" value="{$flow_master_info['linkman']}" placeholder="请输入联系人" />
  85. <div class="help-block">
  86. 请填写联系人
  87. </div>
  88. </div>
  89. </div>
  90. <div class="form-group">
  91. <label class="col-xs-12 col-sm-3 col-md-2 control-label">电话</label>
  92. <div class="col-sm-9 col-xs-12">
  93. <input type="text" name="mobile" class="form-control" value="{$flow_master_info['mobile']}" autocomplete="off" placeholder="请输入电话" />
  94. <div class="help-block">
  95. 请填写电话
  96. </div>
  97. </div>
  98. </div>
  99. <div class="form-group">
  100. <label class="col-xs-12 col-sm-3 col-md-2 control-label">联系地址</label>
  101. <div class="col-sm-9 col-xs-12">
  102. <input type="text" name="address" class="form-control" value="{$flow_master_info['address']}" autocomplete="off" placeholder="请输入联系地址" />
  103. <div class="help-block">
  104. 请输入联系地址
  105. </div>
  106. </div>
  107. </div>
  108. <div class="form-group">
  109. <label class="col-xs-12 col-sm-3 col-md-2 control-label">身份证上传</label>
  110. <div class="col-sm-9 col-xs-12">
  111. <input type="file" name="id_card_photo">
  112. <div class="help-block">
  113. 请上传身份证
  114. </div>
  115. </div>
  116. </div>
  117. {if !empty($flow_master_info['id_card_photo'])}
  118. <div class="form-group">
  119. <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
  120. <div class="col-sm-9 col-xs-12">
  121. <div class="input-group">
  122. <img src="{$flow_master_info['id_card_photo']}?time={php echo time()}" class="img-responsive img-thumbnail" width="150" />
  123. </div>
  124. </div>
  125. </div>
  126. {/if}
  127. <div class="form-group">
  128. <label class="col-xs-12 col-sm-3 col-md-2 control-label">营业执照上传</label>
  129. <div class="col-sm-9 col-xs-12">
  130. <input type="file" name="business_licence_photo">
  131. <div class="help-block">
  132. 请上传营业执照
  133. </div>
  134. </div>
  135. </div>
  136. {if !empty($flow_master_info['business_licence_photo'])}
  137. <div class="form-group">
  138. <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
  139. <div class="col-sm-9 col-xs-12">
  140. <div class="input-group">
  141. <img src="{$flow_master_info['business_licence_photo']}?time={php echo time()}" class="img-responsive img-thumbnail" width="150" />
  142. </div>
  143. </div>
  144. </div>
  145. {/if}
  146. <div class="form-group">
  147. <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
  148. <div class="col-sm-9 col-xs-12">
  149. <input name="submit" type="submit" value="提交" class="btn btn-primary span2 js-register-flow" />
  150. <input type="hidden" name="token" value="{$_W['token']}" />
  151. </div>
  152. </div>
  153. </form>
  154. </div>
  155. </div>
  156. <script>
  157. require(['filestyle'], function(){
  158. $(".form-group").find(':file').filestyle({buttonText: '上传图片'});
  159. });
  160. $('.js-register-flow').click(function() {
  161. linkman = $('input[name="linkman"]').val();
  162. mobile = $('input[name="mobile"]').val();
  163. address = $('input[name="address"]').val();
  164. if (!linkman) {
  165. util.message('请填写联系人');
  166. return false;
  167. }
  168. if (!mobile) {
  169. util.message('请填写电话');
  170. return false;
  171. }
  172. if (!address) {
  173. util.message('请填写联系地址');
  174. return false;
  175. }
  176. return true;
  177. });
  178. </script>
  179. {/if}
  180. {if $do == 'account_list'}
  181. <div class="panel panel-info">
  182. <div class="panel-heading">筛选</div>
  183. <div class="panel-body">
  184. <form action="./index.php" method="get" role="form" class="form-horizontal">
  185. <input type="hidden" name="c" value="system">
  186. <input type="hidden" name="a" value="content_provider">
  187. <div class="form-group" style="margin-top:20px;margin-left: 40px">
  188. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">搜索</label>
  189. <div class="col-sm-8 col-lg-10 col-xs-12">
  190. <div class="input-group">
  191. <input type="hidden" name="type" value="{$_GPC['type']}">
  192. <input type="hidden" name="expiretime" value="{$_GPC['expiretime']}">
  193. <input type="text" class="form-control {if empty($_GPC['keyword']) && !empty($_GPC['s_uniacid'])}hide{/if}" placeholder="请输入微信公众号名称" name="keyword" id="s_keyword" value="{$_GPC['keyword']}">
  194. <input type="text" class="form-control {if empty($_GPC['s_uniacid'])}hide{/if}" placeholder="请输入微信公众号ID" name="s_uniacid" id="s_uniacid" value="{$_GPC['s_uniacid']}">
  195. <div class="input-group-btn">
  196. <button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
  197. <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
  198. <ul class="dropdown-menu dropdown-menu-right" role="menu">
  199. <li><a href="javascript:;" onclick="$('#s_uniacid').addClass('hide').val('');$('#s_keyword').removeClass('hide');">根据公众号名称搜索</a></li>
  200. <li><a href="javascript:;" onclick="$('#s_uniacid').removeClass('hide');$('#s_keyword').addClass('hide').val('');">根据公众号ID搜索</a></li>
  201. </ul>
  202. </div>
  203. </div>
  204. </div>
  205. </div>
  206. </form>
  207. </div>
  208. </div>
  209. <div class="panel panel-default">
  210. <div class="panel-heading">
  211. 详细数据
  212. </div>
  213. <div class="table-responsive panel-body">
  214. <table class="table table-hover">
  215. <thead>
  216. <tr>
  217. <th class="row-hover">公众号<i></i></th>
  218. <th style="width:300px;">标签<i></i></th>
  219. {if !empty($commission_show)}
  220. <th style="width:100px;">累计金额<i></i></th>
  221. {/if}
  222. <th style="width:100px;">状态<i></i></th>
  223. <th style="width:100px;">管理</th>
  224. </tr>
  225. </thead>
  226. <tbody>
  227. {loop $list $uni}
  228. {loop $uni['details'] $account}
  229. <tr>
  230. <td class="row-hover">
  231. <div class="col-xs-12 col-sm-12 col-md-2 col-lg-1">
  232. <img src="{php echo tomedia('headimg_'.$account['acid'].'.jpg');}?time={php echo time()}" class="" width="50" height="50" onerror="this.src='resource/images/gw-wx.gif'" />
  233. </div>
  234. <div class="col-xs-12 col-sm-12 col-md-4 col-lg-5 item" style="font-size:16px;">
  235. {$account['name']}
  236. <br>
  237. <span class="help-block" style="font-size:13px;">类型:{if $account['level'] == '1'}普通订阅号{elseif $account['level'] == '2'}普通服务号{elseif $account['level'] == '3'}认证订阅号{elseif $account['level'] == '4'}认证服务号/认证媒体/政府订阅号{/if}</span>
  238. </div>
  239. </td>
  240. <td>
  241. {if $uni['flow_setting_enable'] == 2 && !empty($uni['flow_setting'])}
  242. {$uni['flow_setting']['ad_tags_str']}
  243. {else}
  244. 未设置
  245. {/if}
  246. </td>
  247. {if !empty($commission_show)}
  248. <td>
  249. {if !empty($uni['flow_setting']['amount'])}
  250. {$uni['flow_setting']['amount']}
  251. {else}
  252. 0
  253. {/if}
  254. </td>
  255. {/if}
  256. <td>
  257. {if IMS_FAMILY == 'v' || $uni['flow_setting_enable'] == 2}
  258. 已开通
  259. {elseif $uni['flow_setting_enable'] == 1}
  260. 未开通
  261. {/if}
  262. </td>
  263. <td>
  264. <a href="{php echo url('system/content_provider/flow_control', array('uniacid' => $account['uniacid']))}">
  265. {if IMS_FAMILY == 'v' ||$uni['flow_setting_enable'] == 2}
  266. 设置
  267. {elseif $uni['flow_setting_enable'] == 1}
  268. 开通广告联盟
  269. {/if}
  270. </a>
  271. </td>
  272. </tr>
  273. {/loop}
  274. {/loop}
  275. </tbody>
  276. </table>
  277. </div>
  278. </div>
  279. <div class="pull-right">{$pager}</div>
  280. {/if}
  281. {if $do == 'flow_control'}
  282. <div class="panel panel-default">
  283. <div class="panel-heading">公众号信息</div>
  284. <div class="panel-body">
  285. <table class="table table-hover">
  286. <thead>
  287. <tr>
  288. <th class="row-hover">公众号<i></i></th>
  289. <th style="width:300px;">标签<i></i></th>
  290. {if !empty($commission_show)}
  291. <th style="width:150px;">累计金额<i></i></th>
  292. {/if}
  293. <th style="width:200px;">管理</th>
  294. </tr>
  295. </thead>
  296. <tbody>
  297. <tr>
  298. <td>
  299. <div class="col-xs-12 col-sm-12 col-md-2 col-lg-1">
  300. <img src="{php echo tomedia('headimg_'.$current_account['acid'].'.jpg');}?time={php echo time()}" class="" width="50" height="50" onerror="this.src='resource/images/gw-wx.gif'" />
  301. </div>
  302. <div class="col-xs-12 col-sm-12 col-md-4 col-lg-5 item" style="font-size:16px;">
  303. {$current_account['name']}
  304. <br>
  305. <span class="help-block" style="font-size:13px;">类型:{if $current_account['level'] == '1'}普通订阅号{elseif $current_account['level'] == '2'}普通服务号{elseif $current_account['level'] == '3'}认证订阅号{elseif $current_account['level'] == '4'}认证服务号/认证媒体/政府订阅号{/if}</span>
  306. </div>
  307. </td>
  308. <td>{if $current_uniaccount['enable'] == 2 && !empty($current_uniaccount['current_tags_str'])}{$current_uniaccount['current_tags_str']}{elseif empty($current_uniaccount)}未设置{/if}</td>
  309. {if !empty($commission_show)}
  310. <td>{if !empty($current_uniaccount)}{$current_uniaccount['amount']}{else}0{/if}元</td>
  311. {/if}
  312. <td>
  313. {if IMS_FAMILY != 'v'}
  314. {if empty($current_uniaccount['enable']) || $current_uniaccount['enable'] == 1}
  315. <a href="#ad-tags" data-toggle="modal" class="btn btn-primary">开通</a>
  316. {elseif $current_uniaccount['enable'] == 2}
  317. <a href="javascript:;" class="btn btn-danger js-stop-provider" data-uniacid="{$_GPC['uniacid']}">停止</a>
  318. <a href="#ad-tags" data-toggle="modal" class="btn btn-primary">设置</a>
  319. {/if}
  320. {else}
  321. <a href="#ad-tags" data-toggle="modal" class="btn btn-primary">设置</a>
  322. {/if}
  323. </td>
  324. </tr>
  325. </tbody>
  326. </table>
  327. </div>
  328. </div>
  329. {if IMS_FAMILY != 'v' && $current_uniaccount['enable'] == 2}
  330. <div class="panel panel-default">
  331. <div class="panel-heading">
  332. 应用信息
  333. <span class="pull-right" style="display:none;">
  334. <a href="">批量设置</a>
  335. </span>
  336. </div>
  337. <div class="panel-body">
  338. <div class="row">
  339. {if !empty($modulelist_available)}
  340. {loop $modulelist_available $list}
  341. <div class="col-xs-3" style="padding:20px;">
  342. <div class="col-xs-2">
  343. <img src="{$list['icon']}" width="48" height="48" class="img-rounded">
  344. </div>
  345. <div class="col-xs-6">
  346. {$list['title']}
  347. <br>
  348. <span class="help-block">广告类型:
  349. {if $list['flow_setting']['enable'] == 2 && !empty($list['flow_setting']['ad_types'])}
  350. {loop $list['flow_setting']['ad_types'] $ad_types}
  351. {$ad_types}
  352. {/loop}
  353. {else}
  354. 未开通
  355. {/if}
  356. </span>
  357. </div>
  358. <div class="col-xs-4">
  359. <a href="#ad-types" data-toggle="modal" class="js-type-setting" data-module_name="{$list['name']}" data-uniacid="{$_GPC['uniacid']}" data-ad_types='{$list['ad_types']}'>
  360. {if $list['flow_setting']['enable'] == 2 && !empty($list['flow_setting']['ad_types'])}
  361. 设置
  362. {else}
  363. 开通
  364. {/if}
  365. </a>
  366. </div>
  367. </div>
  368. {/loop}
  369. {else}
  370. <div class="col-xs-3" style="padding:20px;">暂无可用应用</div>
  371. {/if}
  372. </div>
  373. </div>
  374. </div>
  375. {/if}
  376. <div class="modal fade" id="ad-tags">
  377. <div class="modal-dialog">
  378. <div class="modal-content">
  379. <div class="modal-body" style="text-align:left;">
  380. <table class="table tb" style="min-width:568px;">
  381. <thead>
  382. <tr>
  383. <th style="width: 50px;" class="text-center">选择</th>
  384. <th>标签</th>
  385. </tr>
  386. </thead>
  387. <tbody>
  388. {if !empty($tag_list)}
  389. {loop $tag_list $tags}
  390. <tr>
  391. <td colspan="2">
  392. <label class="label label-info">{$tags['title']}</label>
  393. </td>
  394. </tr>
  395. {loop $tags['items'] $key $items}
  396. <tr>
  397. <td class="text-center"><input type="checkbox" id="chk_tag_{$key}" name="tagids[]" data-name="{$items}" value="{$key}" {if !empty($current_tags[$key])} checked{/if}></td>
  398. <td><label for="chk_tag_{$key}" style="font-weight:normal;" class="name">{$items}</label></td>
  399. </tr>
  400. {/loop}
  401. {/loop}
  402. {/if}
  403. </tbody>
  404. </table>
  405. </div>
  406. <div class="modal-footer">
  407. <div class="pull-left js-select-tag-error"></div>
  408. <input type="hidden" name="tag-select">
  409. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  410. <button type="button" class="btn btn-primary js-select-tags" data-uniacid="{$_GPC['uniacid']}">确定</button>
  411. </div>
  412. </div>
  413. </div>
  414. </div>
  415. <div class="modal fade" id="ad-types">
  416. <div class="modal-dialog">
  417. <div class="modal-content">
  418. <div class="modal-body" style="text-align:left;">
  419. <table class="table tb" style="min-width:568px;">
  420. <thead>
  421. <tr>
  422. <th style="width: 50px;" class="text-center">选择</th>
  423. <th>类型</th>
  424. </tr>
  425. </thead>
  426. <tbody class="js-types-show">
  427. </tbody>
  428. </table>
  429. </div>
  430. <div class="modal-footer">
  431. <input type="hidden" name="type-select">
  432. <input type="hidden" name="module_name">
  433. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  434. <button type="button" class="btn btn-primary js-select-types" data-dismiss="modal" data-uniacid="{$_GPC['uniacid']}" data-module_name>确定</button>
  435. </div>
  436. </div>
  437. </div>
  438. </div>
  439. <script>
  440. $(function() {
  441. $('#ad-types').on('hidden.bs.modal', function () {
  442. $('#ad-types input[type="checkbox"]').prop('checked', false);
  443. });
  444. cloud_module_support_str = '{$cloud_module_support_str}';
  445. cloud_module_support_str = $.parseJSON(cloud_module_support_str);
  446. })
  447. $(document).on('click', '.js-type-setting', function() {
  448. var module_name = $(this).data('module_name');
  449. var uniacid = $(this).data('uniacid');
  450. var ad_types = $(this).data('ad_types');
  451. html = '';
  452. for (var i in cloud_module_support_str[module_name].ad_types) {
  453. html += '<tr>';
  454. html += '<td class="text-center">';
  455. html += '<input type="checkbox" id="chk_type_'+ i +'" name="typeids[]" data-name="' + cloud_module_support_str[module_name].ad_types[i] + '" value="'+ i +'"></td>';
  456. html += '<td><label for="chk_type_'+ i +'" style="font-weight:normal;" class="name">' +
  457. cloud_module_support_str[module_name].ad_types[i] + '</label></td></tr>';
  458. }
  459. $('.js-types-show').html(html);
  460. $('.js-select-types').data('module_name', module_name);
  461. $.post("{php echo url('system/content_provider/ad_type_get')}", {'module_name' : module_name, 'uniacid' : uniacid}, function(data) {
  462. data = $.parseJSON(data);
  463. if (data.message.errno == 0) {
  464. for (var i in data.message.message) {
  465. $('#chk_type_' + i).prop('checked', true);
  466. }
  467. } else {
  468. util.message(data.message.message, '', 'error');
  469. }
  470. });
  471. });
  472. $(document).on('click', 'input[name="tagids[]"]', function() {
  473. checks = $('input[name="tagids[]"]:checked');
  474. if (checks.length > 0) {
  475. $('.js-select-tag-error').html('');
  476. }
  477. })
  478. $('.js-select-tags').click(function(){
  479. var chks = $('input[name="tagids[]"]:checked');
  480. var tagids = [];
  481. var uniacid = $(this).data('uniacid');
  482. if (chks) {
  483. $.each(chks, function(){
  484. tagids.push($(this).val());
  485. });
  486. $('input[name=tag-select]').val(tagids.join('@'));
  487. } else {
  488. $('input[name=tag-select]').val('');
  489. }
  490. if (tagids.length == 0) {
  491. $('.js-select-tag-error').html('请至少选择一个标签');
  492. return;
  493. } else {
  494. $('.js-select-tag-error').html('');
  495. $(this).attr('data-dismiss', 'modal');
  496. $.post("{php echo url('system/content_provider/flow_control')}", {'type' : 'tags', 'tagids' : tagids, 'enable' : 2, 'uniacid' : uniacid}, function(data) {
  497. data = $.parseJSON(data);
  498. if (data.message.errno == 0) {
  499. util.message(data.message.message, data.redirect, 'success');
  500. } else {
  501. util.message(data.message.message, data.redirect, 'error');
  502. }
  503. });
  504. }
  505. });
  506. $('.js-select-types').click(function(){
  507. var chks = $('input[name="typeids[]"]:checked');
  508. var typeids = [];
  509. var module_name = $(this).data('module_name');
  510. var uniacid = $(this).data('uniacid');
  511. if (chks) {
  512. $.each(chks, function(){
  513. typeids.push($(this).val());
  514. });
  515. $('input[name=type-select]').val(typeids.join('@'));
  516. } else {
  517. $('input[name=type-select]').val('');
  518. }
  519. $.post("{php echo url('system/content_provider/flow_control')}", {'type' : 'types', 'typeids' : typeids, 'enable' : 2, 'module_name' : module_name, 'uniacid' : uniacid}, function(data) {
  520. data = $.parseJSON(data);
  521. if (data.message.errno == 0) {
  522. util.message(data.message.message, data.redirect, 'success');
  523. } else {
  524. util.message(data.message.message, data.redirect, 'error');
  525. }
  526. });
  527. });
  528. $(document).on('click', '.js-stop-provider', function() {
  529. var uniacid = $(this).data('uniacid');
  530. $.post("{php echo url('system/content_provider/flow_control')}", {'type' : 'tags', 'enable' : 1, 'uniacid' : uniacid}, function(data) {
  531. data = $.parseJSON(data);
  532. if (data.message.errno == 0) {
  533. util.message(data.message.message, data.redirect, 'success');
  534. } else {
  535. util.message(data.message.message, data.redirect, 'error');
  536. }
  537. });
  538. });
  539. </script>
  540. {/if}
  541. {if $do == 'finance_info'}
  542. <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin: 10px -1em 1em 0px;">
  543. <div class="navbar-header">
  544. <a class="navbar-brand" href="{php echo url('system/content_provider/finance_info')}">数据统计</a>
  545. <ul class="nav navbar-nav navbar-right">
  546. <li {if $_GPC['type'] == 1}class="active"{/if}><a href="{php echo url('system/content_provider/finance_info', array('type' => '1'))}">今日</a></li>
  547. <li {if $_GPC['type'] == 2}class="active"{/if}><a href="{php echo url('system/content_provider/finance_info', array('type' => '2'))}">昨日</a></li>
  548. <form class="navbar-form navbar-left" role="search" id="form1">
  549. <input name="c" value="system" type="hidden">
  550. <input name="a" value="content_provider" type="hidden">
  551. <input name="do" value="finance_info" type="hidden">
  552. {php echo tpl_form_field_daterange('datelimit', array('start' => date('Y-m-d', $params['starttime']),'end' => date('Y-m-d', $params['endtime'])))}
  553. </form>
  554. </ul>
  555. </div>
  556. </nav>
  557. <div class="panel panel-default">
  558. <div class="panel-heading">账户流水</div>
  559. <div class="panel-body">
  560. <table class="table table-hover">
  561. <thead>
  562. <tr>
  563. <th>时间</th>
  564. <th>广告曝光度</th>
  565. <th>广告点击量</th>
  566. <th>收入金额</th>
  567. </tr>
  568. </thead>
  569. <tbody>
  570. {loop $finance_items $item}
  571. <tr>
  572. <td>
  573. {$item['extra_date']}
  574. </td>
  575. <td>
  576. {$item['view']}
  577. </td>
  578. <td>
  579. {$item['click']}
  580. </td>
  581. <td>
  582. {$item['amount']}元
  583. </td>
  584. </tr>
  585. {/loop}
  586. </tbody>
  587. </table>
  588. </div>
  589. </div>
  590. <div class="pull-right">{$pager}</div>
  591. <script>
  592. require(['jquery', 'daterangepicker'], function(c, $) {
  593. $(function() {
  594. $('.daterange').on('apply.daterangepicker', function(ev, picker) {
  595. $('#form1')[0].submit();
  596. });
  597. });
  598. });
  599. </script>
  600. {/if}
  601. {if $do == 'content_provider'}
  602. <iframe src="{$iframe}" marginheight="0" marginwidth="0" frameborder="0" width="100%" style="height:2000px;" scrolling="no" allowTransparency="true"></iframe>
  603. {/if}
  604. </div>
  605. {template 'common/footer-gw'}