content-provider.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615
  1. {template 'common/header'}
  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('advertisement/content-provider/account_list');}">流量主</a>
  5. </li>
  6. <li{if $do == 'content_provider'} class="active"{/if}><a href="{php echo url('advertisement/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('advertisement/content-provider/account_list');}">流量管理</a>
  44. {elseif $flow_master_info['status'] != 4}
  45. <a href="{php echo url('advertisement/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('advertisement/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('advertisement/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="advertisement">
  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. <div class="link-group">
  265. <a href="{php echo url('advertisement/content-provider/flow_control', array('uniacid' => $account['uniacid']))}">
  266. {if IMS_FAMILY == 'v' ||$uni['flow_setting_enable'] == 2}
  267. 设置
  268. {elseif $uni['flow_setting_enable'] == 1}
  269. 开通广告联盟
  270. {/if}
  271. </a>
  272. </div>
  273. </td>
  274. </tr>
  275. {/loop}
  276. {/loop}
  277. </tbody>
  278. </table>
  279. </div>
  280. </div>
  281. <div class="text-right">{$pager}</div>
  282. {/if}
  283. {if $do == 'flow_control'}
  284. <div class="panel panel-default">
  285. <div class="panel-heading">公众号信息</div>
  286. <div class="panel-body">
  287. <table class="table table-hover">
  288. <thead>
  289. <tr>
  290. <th class="row-hover">公众号<i></i></th>
  291. <th style="width:300px;">标签<i></i></th>
  292. {if !empty($commission_show)}
  293. <th style="width:150px;">累计金额<i></i></th>
  294. {/if}
  295. <th style="width:200px;">管理</th>
  296. </tr>
  297. </thead>
  298. <tbody>
  299. <tr>
  300. <td>
  301. <div class="col-xs-12 col-sm-12 col-md-2 col-lg-1">
  302. <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'" />
  303. </div>
  304. <div class="col-xs-12 col-sm-12 col-md-4 col-lg-5 item" style="font-size:16px;">
  305. {$current_account['name']}
  306. <br>
  307. <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>
  308. </div>
  309. </td>
  310. <td>{if $current_uniaccount['enable'] == 2 && !empty($current_uniaccount['current_tags_str'])}{$current_uniaccount['current_tags_str']}{elseif empty($current_uniaccount)}未设置{/if}</td>
  311. {if !empty($commission_show)}
  312. <td>{if !empty($current_uniaccount)}{$current_uniaccount['amount']}{else}0{/if}元</td>
  313. {/if}
  314. <td>
  315. <div class="link-group">
  316. {if IMS_FAMILY != 'v'}
  317. {if empty($current_uniaccount['enable']) || $current_uniaccount['enable'] == 1}
  318. <a href="#ad-tags" data-toggle="modal">开通</a>
  319. {elseif $current_uniaccount['enable'] == 2}
  320. <a href="javascript:;" class="btn btn-danger js-stop-provider" data-uniacid="{$_GPC['uniacid']}">停止</a>
  321. <a href="#ad-tags" data-toggle="modal">设置</a>
  322. {/if}
  323. {else}
  324. <a href="#ad-tags" data-toggle="modal">设置</a>
  325. {/if}
  326. </div>
  327. </td>
  328. </tr>
  329. </tbody>
  330. </table>
  331. </div>
  332. </div>
  333. {if IMS_FAMILY != 'v' && $current_uniaccount['enable'] == 2}
  334. <div class="panel panel-default">
  335. <div class="panel-heading">
  336. 应用信息
  337. <span class="pull-right" style="display:none;">
  338. <a href="">批量设置</a>
  339. </span>
  340. </div>
  341. <div class="panel-body">
  342. <div class="row">
  343. {if !empty($modulelist_available)}
  344. {loop $modulelist_available $list}
  345. <div class="col-xs-3" style="padding:20px;">
  346. <div class="col-xs-2">
  347. <img src="{$list['icon']}" width="48" height="48" class="img-rounded">
  348. </div>
  349. <div class="col-xs-6">
  350. {$list['title']}
  351. <br>
  352. <span class="help-block">广告类型:
  353. {if $list['flow_setting']['enable'] == 2 && !empty($list['flow_setting']['ad_types'])}
  354. {loop $list['flow_setting']['ad_types'] $ad_types}
  355. {$ad_types}
  356. {/loop}
  357. {else}
  358. 未开通
  359. {/if}
  360. </span>
  361. </div>
  362. <div class="col-xs-4">
  363. <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']}'>
  364. {if $list['flow_setting']['enable'] == 2 && !empty($list['flow_setting']['ad_types'])}
  365. 设置
  366. {else}
  367. 开通
  368. {/if}
  369. </a>
  370. </div>
  371. </div>
  372. {/loop}
  373. {else}
  374. <div class="col-xs-3" style="padding:20px;">暂无可用应用</div>
  375. {/if}
  376. </div>
  377. </div>
  378. </div>
  379. {/if}
  380. <div class="modal fade" id="ad-tags">
  381. <div class="modal-dialog">
  382. <div class="modal-content">
  383. <div class="modal-body" style="text-align:left;">
  384. <table class="table tb" style="min-width:568px;">
  385. <thead>
  386. <tr>
  387. <th style="width: 50px;" class="text-center">选择</th>
  388. <th>标签</th>
  389. </tr>
  390. </thead>
  391. <tbody>
  392. {if !empty($tag_list)}
  393. {loop $tag_list $tags}
  394. <tr>
  395. <td colspan="2">
  396. <label class="label label-info">{$tags['title']}</label>
  397. </td>
  398. </tr>
  399. {loop $tags['items'] $key $items}
  400. <tr>
  401. <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>
  402. <td><label for="chk_tag_{$key}" style="font-weight:normal;" class="name">{$items}</label></td>
  403. </tr>
  404. {/loop}
  405. {/loop}
  406. {/if}
  407. </tbody>
  408. </table>
  409. </div>
  410. <div class="modal-footer">
  411. <div class="pull-left js-select-tag-error"></div>
  412. <input type="hidden" name="tag-select">
  413. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  414. <button type="button" class="btn btn-primary js-select-tags" data-uniacid="{$_GPC['uniacid']}">确定</button>
  415. </div>
  416. </div>
  417. </div>
  418. </div>
  419. <div class="modal fade" id="ad-types">
  420. <div class="modal-dialog">
  421. <div class="modal-content">
  422. <div class="modal-body" style="text-align:left;">
  423. <table class="table tb" style="min-width:568px;">
  424. <thead>
  425. <tr>
  426. <th style="width: 50px;" class="text-center">选择</th>
  427. <th>类型</th>
  428. </tr>
  429. </thead>
  430. <tbody class="js-types-show">
  431. </tbody>
  432. </table>
  433. </div>
  434. <div class="modal-footer">
  435. <input type="hidden" name="type-select">
  436. <input type="hidden" name="module_name">
  437. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  438. <button type="button" class="btn btn-primary js-select-types" data-dismiss="modal" data-uniacid="{$_GPC['uniacid']}" data-module_name>确定</button>
  439. </div>
  440. </div>
  441. </div>
  442. </div>
  443. <script>
  444. $(function() {
  445. $('#ad-types').on('hidden.bs.modal', function () {
  446. $('#ad-types input[type="checkbox"]').prop('checked', false);
  447. });
  448. cloud_module_support_str = '{$cloud_module_support_str}';
  449. cloud_module_support_str = $.parseJSON(cloud_module_support_str);
  450. })
  451. $(document).on('click', '.js-type-setting', function() {
  452. var module_name = $(this).data('module_name');
  453. var uniacid = $(this).data('uniacid');
  454. var ad_types = $(this).data('ad_types');
  455. html = '';
  456. for (var i in cloud_module_support_str[module_name].ad_types) {
  457. html += '<tr>';
  458. html += '<td class="text-center">';
  459. html += '<input type="checkbox" id="chk_type_'+ i +'" name="typeids[]" data-name="' + cloud_module_support_str[module_name].ad_types[i] + '" value="'+ i +'"></td>';
  460. html += '<td><label for="chk_type_'+ i +'" style="font-weight:normal;" class="name">' +
  461. cloud_module_support_str[module_name].ad_types[i] + '</label></td></tr>';
  462. }
  463. $('.js-types-show').html(html);
  464. $('.js-select-types').data('module_name', module_name);
  465. $.post("{php echo url('advertisement/content-provider/ad_type_get')}", {'module_name' : module_name, 'uniacid' : uniacid}, function(data) {
  466. data = $.parseJSON(data);
  467. if (data.message.errno == 0) {
  468. for (var i in data.message.message) {
  469. $('#chk_type_' + i).prop('checked', true);
  470. }
  471. } else {
  472. util.message(data.message.message, '', 'error');
  473. }
  474. });
  475. });
  476. $(document).on('click', 'input[name="tagids[]"]', function() {
  477. checks = $('input[name="tagids[]"]:checked');
  478. if (checks.length > 0) {
  479. $('.js-select-tag-error').html('');
  480. }
  481. })
  482. $('.js-select-tags').click(function(){
  483. var chks = $('input[name="tagids[]"]:checked');
  484. var tagids = [];
  485. var uniacid = $(this).data('uniacid');
  486. if (chks) {
  487. $.each(chks, function(){
  488. tagids.push($(this).val());
  489. });
  490. $('input[name=tag-select]').val(tagids.join('@'));
  491. } else {
  492. $('input[name=tag-select]').val('');
  493. }
  494. if (tagids.length == 0) {
  495. $('.js-select-tag-error').html('请至少选择一个标签');
  496. return;
  497. } else {
  498. $('.js-select-tag-error').html('');
  499. $(this).attr('data-dismiss', 'modal');
  500. $.post("{php echo url('advertisement/content-provider/flow_control')}", {'type' : 'tags', 'tagids' : tagids, 'enable' : 2, 'uniacid' : uniacid}, function(data) {
  501. data = $.parseJSON(data);
  502. if (data.message.errno == 0) {
  503. util.message(data.message.message, data.redirect, 'success');
  504. } else {
  505. util.message(data.message.message, data.redirect, 'error');
  506. }
  507. });
  508. }
  509. });
  510. $('.js-select-types').click(function(){
  511. var chks = $('input[name="typeids[]"]:checked');
  512. var typeids = [];
  513. var module_name = $(this).data('module_name');
  514. var uniacid = $(this).data('uniacid');
  515. if (chks) {
  516. $.each(chks, function(){
  517. typeids.push($(this).val());
  518. });
  519. $('input[name=type-select]').val(typeids.join('@'));
  520. } else {
  521. $('input[name=type-select]').val('');
  522. }
  523. $.post("{php echo url('advertisement/content-provider/flow_control')}", {'type' : 'types', 'typeids' : typeids, 'enable' : 2, 'module_name' : module_name, 'uniacid' : uniacid}, function(data) {
  524. data = $.parseJSON(data);
  525. if (data.message.errno == 0) {
  526. util.message(data.message.message, data.redirect, 'success');
  527. } else {
  528. util.message(data.message.message, data.redirect, 'error');
  529. }
  530. });
  531. });
  532. $(document).on('click', '.js-stop-provider', function() {
  533. var uniacid = $(this).data('uniacid');
  534. $.post("{php echo url('advertisement/content-provider/flow_control')}", {'type' : 'tags', 'enable' : 1, 'uniacid' : uniacid}, function(data) {
  535. data = $.parseJSON(data);
  536. if (data.message.errno == 0) {
  537. util.message(data.message.message, data.redirect, 'success');
  538. } else {
  539. util.message(data.message.message, data.redirect, 'error');
  540. }
  541. });
  542. });
  543. </script>
  544. {/if}
  545. {if $do == 'finance_info'}
  546. <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin: 10px -1em 1em 0px;">
  547. <div class="navbar-header">
  548. <a class="navbar-brand" href="{php echo url('advertisement/content-provider/finance_info')}">数据统计</a>
  549. <ul class="nav navbar-nav navbar-right">
  550. <li {if $_GPC['type'] == 1}class="active"{/if}><a href="{php echo url('advertisement/content-provider/finance_info', array('type' => '1'))}">今日</a></li>
  551. <li {if $_GPC['type'] == 2}class="active"{/if}><a href="{php echo url('advertisement/content-provider/finance_info', array('type' => '2'))}">昨日</a></li>
  552. <form class="navbar-form navbar-left" role="search" id="form1">
  553. <input name="c" value="system" type="hidden">
  554. <input name="a" value="content_provider" type="hidden">
  555. <input name="do" value="finance_info" type="hidden">
  556. {php echo tpl_form_field_daterange('datelimit', array('start' => date('Y-m-d', $params['starttime']),'end' => date('Y-m-d', $params['endtime'])))}
  557. </form>
  558. </ul>
  559. </div>
  560. </nav>
  561. <div class="panel panel-default">
  562. <div class="panel-heading">账户流水</div>
  563. <div class="panel-body">
  564. <table class="table table-hover">
  565. <thead>
  566. <tr>
  567. <th>时间</th>
  568. <th>广告曝光度</th>
  569. <th>广告点击量</th>
  570. <th>收入金额</th>
  571. </tr>
  572. </thead>
  573. <tbody>
  574. {loop $finance_items $item}
  575. <tr>
  576. <td>
  577. {$item['extra_date']}
  578. </td>
  579. <td>
  580. {$item['view']}
  581. </td>
  582. <td>
  583. {$item['click']}
  584. </td>
  585. <td>
  586. {$item['amount']}元
  587. </td>
  588. </tr>
  589. {/loop}
  590. </tbody>
  591. </table>
  592. </div>
  593. </div>
  594. <div class="text-right">{$pager}</div>
  595. <script>
  596. require(['jquery', 'daterangepicker'], function(c, $) {
  597. $(function() {
  598. $('.daterange').on('apply.daterangepicker', function(ev, picker) {
  599. $('#form1')[0].submit();
  600. });
  601. });
  602. });
  603. </script>
  604. {/if}
  605. {if $do == 'content_provider'}
  606. <iframe src="{$iframe}" marginheight="0" marginwidth="0" frameborder="0" width="100%" style="height:1800px;" scrolling="no" allowTransparency="true"></iframe>
  607. {/if}
  608. </div>
  609. {template 'common/footer'}