人人商城

content-provider.html 23KB

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