index.blade.php 61 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477
  1. @extends('admin/site/side_layout')
  2. @section('header_extend')
  3. <style>
  4. .ul-content {
  5. margin: 0;
  6. padding: 0;
  7. list-style-type: none;
  8. }
  9. .ul-content li {
  10. padding: 20px 10px 10px;
  11. display: none;
  12. }
  13. .ul-content .active {
  14. display: block;
  15. }
  16. .my-input {
  17. padding: 4px 2px;
  18. width: 100%;
  19. }
  20. .my-table {
  21. width: 100%;
  22. }
  23. .my-table td {
  24. border: 1px solid #E5E6E7;
  25. padding: 8px;
  26. }
  27. .my-table tr td:last-child {
  28. cursor: pointer;
  29. text-align: center;
  30. }
  31. .you-table {
  32. width: 100%;
  33. }
  34. .you-table td {
  35. padding: 8px;
  36. }
  37. .you-table tr td:last-child {
  38. width: 80px;
  39. cursor: pointer;
  40. text-align: center;
  41. }
  42. .you-table2 {
  43. width: 100%;
  44. }
  45. .you-table2 td {
  46. padding: 8px;
  47. }
  48. .you-table2 tr td:last-child {
  49. width: 180px;
  50. }
  51. .subInput {
  52. box-sizing: border-box;
  53. width: 92%;
  54. border: 1px dashed #999;
  55. padding: 4px 2px;
  56. margin-right: 5px;
  57. }
  58. .radio-label,
  59. .radio-check {
  60. display: inline-block;
  61. position: relative;
  62. }
  63. .radio-label input[type="checkbox"] {
  64. appearance: none; /*清楚默认样式*/
  65. -webkit-appearance: none;
  66. /* opacity: 0; */
  67. outline: none;
  68. position: absolute;
  69. z-index: 2;
  70. width: 6px;
  71. height: 6px;
  72. top: 10px;
  73. left: 10px;
  74. border-radius: 50%;
  75. background: #b4b4b4;
  76. }
  77. .radio-label label {
  78. display: inline-block;
  79. min-width: 50px;
  80. height: 24px;
  81. line-height: 24px;
  82. text-align: center;
  83. padding-right: 10px;
  84. border-radius: 5px;
  85. padding-left: 25px;
  86. color: #fff;
  87. background-color: #c9c9c9;
  88. }
  89. .radio-label input[type="checkbox"]:checked {
  90. opacity: 0;
  91. }
  92. .radio-label input[type="checkbox"]:checked + label {
  93. color: #fff;
  94. background-color: #3597db;
  95. }
  96. .radio-label input[type="checkbox"]:checked + label::after {
  97. content: "";
  98. position: absolute;
  99. left: 12px;
  100. top: 5px;
  101. width: 5px;
  102. height: 12px;
  103. border-right: 1px solid #fff;
  104. border-bottom: 1px solid #fff;
  105. transform: rotate(45deg);
  106. }
  107. </style>
  108. @endsection
  109. @section('right')
  110. @hasAuth('sites-report-edit')
  111. <div style="padding-bottom: 20px; position:relative; left:-50px;">
  112. <button type="button" class="btn btn-info" onclick="utils.promoteReport()" style="margin-left: 50px">推广月报({{$webmasterAccount}})
  113. </button>
  114. <button type="button" class="btn btn-success" onclick="utils.clearLastMonthData()" style="margin-left: 10px;">清除上月数据</button>
  115. <button type="button" class="btn btn-success"
  116. style="border-radius:2px;" onclick="window.open('https://rank.yinqingli.cn/admincp/webmaster/oauth');"><span
  117. class="glyphicon glyphicon-film"></span> webmaster(Hina点我)</button>
  118. <button type="button" class="btn btn-success"
  119. style="border-radius:2px;"
  120. onclick="window.open('http://rank.yinqingli.cn/admincp/webmaster/oauth2');"><span
  121. class="glyphicon glyphicon-film"></span> webmaste(Tommy Ru点我)</button>
  122. <button type="button" class="btn btn-success" onclick="utils.promoteAfresh()">重新生成</button>
  123. <button type="button" class="btn btn-success" onclick="utils.pushReport()">推送App</button>
  124. <div class="input-group" style="margin-left: 10px;display: inline-block;">
  125. <input type="text" placeholder="请输入推送的手机号" class="input-md form-control"
  126. name="mobile" id="mobile" style="width: 150px;display: inline-block" value="{{$mobile}}">
  127. <span class="input-group-btn" style="display: inline-block">
  128. <button type="button" class="btn btn-md btn-success" onclick="utils.pushMessage()"> 推送短信</button>
  129. </span>
  130. </div>
  131. </div>
  132. @endHasAuth
  133. {{--@php $scope=true; @endphp--}}
  134. <ul class="nav nav-tabs">
  135. <li class="active"><a href="#">优化师数据分析</a></li>
  136. <li><a href="#">着陆页优化</a></li>
  137. <li><a href="#">社交推广</a></li>
  138. <li><a href="#">网站修改汇总</a></li>
  139. <li id="seoItemLi"><a href="#">引擎力seo</a></li>
  140. <li><a href="#">工作规划</a></li>
  141. <li><a href="#">月报反馈</a></li>
  142. </ul>
  143. <ul class="ul-content">
  144. <li class="active">
  145. <h1 style="font-size: 20px;font-weight: 600">固定话术</h1>
  146. <table class="my-table">
  147. <caption style="font-size: 20px;font-weight: 600">一、数据增长</caption>
  148. <thead>
  149. <tr>
  150. <td>
  151. 内容
  152. </td>
  153. @if($scope)
  154. <td onclick="utils.addOptimizeDataScope(1)" style="width: 140px">
  155. 添加
  156. </td>
  157. @else
  158. <td>
  159. 操作
  160. </td>
  161. @endif
  162. </tr>
  163. </thead>
  164. <tbody id="optimizeDataScopeBody1">
  165. @foreach($optimizeDataScopeList1 as $item)
  166. <tr>
  167. <td>
  168. <input style="border-style: none" type="text" value="{{$item}}" class="my-input" name="optimizeDataScopeText">
  169. </td>
  170. <td>
  171. {{--<input type="checkbox" name="optimizeDataScopeCheck" style="margin-right: 5px">--}}
  172. <a href="javascript:;" onclick="utils.addTo('{{$item}}')"
  173. style="padding-right: 20px">追加</a>
  174. @if($scope)
  175. <a href="javascript:;" onclick="utils.delOptimizeDataScope(this)">删除</a>
  176. @endif
  177. </td>
  178. </tr>
  179. @endforeach
  180. </tbody>
  181. </table>
  182. <table class="my-table">
  183. <caption style="font-size: 20px;font-weight: 600">二、数据有波动</caption>
  184. <thead>
  185. <tr>
  186. <td>
  187. 内容
  188. </td>
  189. @if($scope)
  190. <td onclick="utils.addOptimizeDataScope(2)" style="width: 140px">
  191. 添加
  192. </td>
  193. @else
  194. <td>
  195. 操作
  196. </td>
  197. @endif
  198. </tr>
  199. </thead>
  200. <tbody id="optimizeDataScopeBody2">
  201. @foreach($optimizeDataScopeList2 as $item)
  202. <tr>
  203. <td>
  204. <input style="border-style: none" type="text" value="{{$item}}" class="my-input" name="optimizeDataScopeText">
  205. </td>
  206. <td>
  207. {{--<input type="checkbox" name="optimizeDataScopeCheck" style="margin-right: 5px">--}}
  208. <a href="javascript:;" onclick="utils.addTo('{{$item}}')"
  209. style="padding-right: 20px">追加</a>
  210. @if($scope)
  211. <a href="javascript:;" onclick="utils.delOptimizeDataScope(this)">删除</a>
  212. @endif
  213. </td>
  214. </tr>
  215. @endforeach
  216. </tbody>
  217. </table>
  218. <table class="my-table">
  219. <caption style="font-size: 20px;font-weight: 600">三、优化效果慢,效果差</caption>
  220. <thead>
  221. <tr>
  222. <td>
  223. 内容
  224. </td>
  225. @if($scope)
  226. <td onclick="utils.addOptimizeDataScope(3)" style="width: 140px">
  227. 添加
  228. </td>
  229. @else
  230. <td>
  231. 操作
  232. </td>
  233. @endif
  234. </tr>
  235. </thead>
  236. <tbody id="optimizeDataScopeBody3">
  237. @foreach($optimizeDataScopeList3 as $item)
  238. <tr>
  239. <td>
  240. <input style="border-style: none" type="text" value="{{$item}}" class="my-input" name="optimizeDataScopeText">
  241. </td>
  242. <td>
  243. {{--<input type="checkbox" name="optimizeDataScopeCheck" style="margin-right: 5px">--}}
  244. <a href="javascript:;" onclick="utils.addTo('{{$item}}')"
  245. style="padding-right: 20px">追加</a>
  246. @if($scope)
  247. <a href="javascript:;" onclick="utils.delOptimizeDataScope(this)">删除</a>
  248. @endif
  249. </td>
  250. </tr>
  251. @endforeach
  252. </tbody>
  253. </table>
  254. <table class="my-table">
  255. <caption style="font-size: 20px;font-weight: 600">四、常规选项</caption>
  256. <thead>
  257. <tr>
  258. <td>
  259. 内容
  260. </td>
  261. @if($scope)
  262. <td onclick="utils.addOptimizeDataScope(4)" style="width: 140px">
  263. 添加
  264. </td>
  265. @else
  266. <td>
  267. 操作
  268. </td>
  269. @endif
  270. </tr>
  271. </thead>
  272. <tbody id="optimizeDataScopeBody4">
  273. @foreach($optimizeDataScopeList4 as $item)
  274. <tr>
  275. <td>
  276. <input style="border-style: none" type="text" value="{{$item}}" class="my-input" name="optimizeDataScopeText">
  277. </td>
  278. <td>
  279. {{--<input type="checkbox" name="optimizeDataScopeCheck" style="margin-right: 5px">--}}
  280. <a href="javascript:;" onclick="utils.addTo('{{$item}}')"
  281. style="padding-right: 20px">追加</a>
  282. @if($scope)
  283. <a href="javascript:;" onclick="utils.delOptimizeDataScope(this)">删除</a>
  284. @endif
  285. </td>
  286. </tr>
  287. @endforeach
  288. </tbody>
  289. </table>
  290. @if($scope)
  291. <button type="button" class="btn btn-success" style="margin: 10px 0"
  292. onclick="utils.saveOptimizeDataScope()">保存
  293. </button>
  294. @endif
  295. <div style="font-size: 20px;font-weight: 600;margin-top: 20px">数据分析
  296. </div>
  297. <table class="you-table">
  298. <thead>
  299. <tr>
  300. <td></td>
  301. <td style="font-size: 18px;font-weight: 600" onclick="utils.addOptimizeData()">添加</td>
  302. </tr>
  303. </thead>
  304. <tbody>
  305. @foreach($optimizeDataList as $item)
  306. <tr>
  307. <td><input style="border-style: none" type="text" class="my-input" value="{{$item->content}}"></td>
  308. <td class="you-del">删除</td>
  309. </tr>
  310. @endforeach
  311. </tbody>
  312. </table>
  313. <div style="padding: 10px">
  314. <button class="btn btn-success" type="button" onclick="utils.save()">保存</button>
  315. </div>
  316. <br>
  317. <div style="font-size: 20px;font-weight: 600;margin-top: 20px">优化师总结
  318. </div>
  319. {{--<textarea rows="5" style="width:100%; padding: 10px" id="summary">{{$summary}}</textarea>--}}
  320. <textarea name="content" rows="5" class="form-control" id="summary">{{$summary}}</textarea>
  321. <div style="padding: 10px">
  322. <button class="btn btn-success" type="button" onclick="utils.saveSummary()">保存</button>
  323. </div>
  324. </li>
  325. <li>
  326. <div style="font-size: 20px;font-weight: 600;margin-top: 20px">着陆页
  327. </div>
  328. <table class="you-table2">
  329. <thead>
  330. <tr>
  331. <td></td>
  332. <td style="font-size: 18px;font-weight: 600;cursor: pointer" onclick="utils.addUrl(this)">添加</td>
  333. </tr>
  334. </thead>
  335. <tbody id="landPageTBody">
  336. @foreach($landPageList as $item)
  337. <tr>
  338. <td>
  339. <input style="border-style: none" type="text" class="my-input" value="{{$item->content}}" data-id="{{$item->id}}">
  340. <div style="padding: 10px 0 5px 50px" class="sub-content">
  341. @foreach($item->sub_list??[] as $v)
  342. <div style="margin-bottom: 5px">
  343. <input style="border-style: none" type="text" class="subInput" value="{{$v}}">
  344. <button class="btn btn-sm" onclick="utils.delContent(this)">删除
  345. </button>
  346. </div>
  347. @endforeach
  348. </div>
  349. </td>
  350. <td style="vertical-align: top">
  351. <button type="button" class="btn btn-sm" style="margin-right: 5px"
  352. onclick="utils.delUrl(this)">
  353. 删除
  354. </button>
  355. <button type="button" class="btn btn-sm btn-success" onclick="utils.addContent(this)">添加内容
  356. </button>
  357. </td>
  358. </tr>
  359. @endforeach
  360. </tbody>
  361. </table>
  362. <div style="padding: 10px">
  363. <button class="btn btn-success" type="button" onclick="utils.landPageSave()">保存</button>
  364. <button class="btn btn-default" type="button"
  365. onclick="utils.clearLandPage()">清空
  366. </button>
  367. </div>
  368. </li>
  369. <li>
  370. <form>
  371. @php
  372. $fbDataList=$socialList['facebook']['data_list']??[];
  373. $lkDataList=$socialList['linkedIn']['data_list']??[];
  374. $twDataList=$socialList['twitter']['data_list']??[];
  375. $pinDataList=$socialList['pin']['data_list']??[];
  376. $insDataList=$socialList['ins']['data_list']??[];
  377. $youtubeDataList=$socialList['youtube']['data_list']??[];
  378. @endphp
  379. {{--<hr class="line">--}}
  380. <div class="form-group">
  381. {{-- <label class="control-label"><input type="checkbox" name="facebook_hide" @if(($socialList['facebook']['hide']??null)==1) checked @endif >是否隐藏
  382. </label>--}}
  383. <div class="radio-label">
  384. <input type="checkbox" id="color1" name="facebook_hide"
  385. @if(($socialList['facebook']['hide']??null)==1) checked @endif >
  386. <label for="color1">Facebook 是否隐藏</label>
  387. </div>
  388. <div class="input-group">
  389. @foreach($threeMonth as $inx=>$val)
  390. <span class="input-group-addon">{{date('Y年n月', strtotime($val . '01')) }}</span>
  391. <input type="number" class="form-control" title=""
  392. name="facebook"
  393. value="{{$fbDataList[$inx]??''}}">
  394. @endforeach
  395. </div>
  396. </div>
  397. <div class="form-group">
  398. {{-- <label class="control-label">linkedIn <input type="checkbox" name="linkedIn_hide" @if(($socialList['linkedIn']['hide']??null)==1) checked @endif>是否隐藏
  399. </label>--}}
  400. <div class="radio-label">
  401. <input type="checkbox" id="color2" name="linkedIn_hide"
  402. @if(($socialList['linkedIn']['hide']??null)==1) checked @endif>
  403. <label for="color2">LinkedIn 是否隐藏</label>
  404. </div>
  405. <div class="input-group">
  406. @foreach($threeMonth as $inx=>$val)
  407. <span class="input-group-addon">{{date('Y年n月', strtotime($val . '01')) }}</span>
  408. <input type="number" class="form-control"
  409. name="linkedIn" title=""
  410. value="{{$lkDataList[$inx]??''}}">
  411. @endforeach
  412. </div>
  413. </div>
  414. <div class="form-group">
  415. {{-- <label class="control-label">twitter <input type="checkbox" name="twitter_hide" @if(($socialList['twitter']['hide']??null)==1) checked @endif>是否隐藏
  416. </label>--}}
  417. <div class="radio-label">
  418. <input type="checkbox" id="color3" name="twitter_hide"
  419. @if(($socialList['twitter']['hide']??null)==1) checked @endif>
  420. <label for="color3">Twitter 是否隐藏</label>
  421. </div>
  422. <div class="input-group">
  423. @foreach($threeMonth as $inx=>$val)
  424. <span class="input-group-addon">{{date('Y年n月', strtotime($val . '01')) }}</span>
  425. <input type="number" class="form-control"
  426. name="twitter" title=""
  427. value="{{$twDataList[$inx]??''}}">
  428. @endforeach
  429. </div>
  430. </div>
  431. <div class="form-group">
  432. {{-- <label class="control-label">pin <input type="checkbox" name="pin_hide" @if(($socialList['pin']['hide']??null)==1) checked @endif>是否隐藏
  433. </label>--}}
  434. <div class="radio-label">
  435. <input type="checkbox" id="color4" name="pin_hide"
  436. @if(($socialList['pin']['hide']??null)==1) checked @endif>
  437. <label for="color4">Pinterest 是否隐藏</label>
  438. </div>
  439. <div class="input-group">
  440. @foreach($threeMonth as $inx=>$val)
  441. <span class="input-group-addon">{{date('Y年n月', strtotime($val . '01')) }}</span>
  442. <input type="number" class="form-control"
  443. name="pin" title=""
  444. value="{{$pinDataList[$inx]??''}}">
  445. @endforeach
  446. </div>
  447. </div>
  448. <div class="form-group">
  449. {{-- <label class="control-label">Instagram <input type="checkbox" name="ins_hide" @if(($socialList['ins']['hide']??null)==1) checked @endif>是否隐藏
  450. </label>--}}
  451. <div class="radio-label">
  452. <input type="checkbox" id="color5" name="ins_hide"
  453. @if(($socialList['ins']['hide']??null)==1) checked @endif>
  454. <label for="color5">Instagram 是否隐藏</label>
  455. </div>
  456. <div class="input-group">
  457. @foreach($threeMonth as $inx=>$val)
  458. <span class="input-group-addon">{{date('Y年n月', strtotime($val . '01')) }}</span>
  459. <input type="number" class="form-control"
  460. name="ins" title=""
  461. value="{{$insDataList[$inx]??''}}">
  462. @endforeach
  463. </div>
  464. </div>
  465. <div class="form-group">
  466. {{-- <label class="control-label">youtube <input type="checkbox" name="youtube_hide" @if(($socialList['youtube']['hide']??null)==1) checked @endif>是否隐藏
  467. </label>--}}
  468. <div class="radio-label">
  469. <input type="checkbox" id="color6" name="youtube_hide"
  470. @if(($socialList['youtube']['hide']??null)==1) checked @endif>
  471. <label for="color6">YouTube 是否隐藏</label>
  472. </div>
  473. <div class="input-group">
  474. @foreach($threeMonth as $inx=>$val)
  475. <span class="input-group-addon">{{date('Y年n月', strtotime($val . '01')) }}</span>
  476. <input type="number" class="form-control"
  477. name="youtube" title=""
  478. value="{{$youtubeDataList[$inx]??''}}">
  479. @endforeach
  480. </div>
  481. </div>
  482. <div class="hr-line-dashed"></div>
  483. <div class="form-group">
  484. <button class="btn btn-primary" type="button"
  485. onclick="utils.socialSave();">
  486. 保存
  487. </button>
  488. <button class="btn btn-primary" type="button"
  489. onclick="utils.socialStatistics();">
  490. 自动统计
  491. </button>
  492. </div>
  493. </form>
  494. </li>
  495. <li>
  496. <table class="my-table">
  497. <thead>
  498. <tr>
  499. <td>修改诉求</td>
  500. <td style="width: 200px">修改时间</td>
  501. <td style="width: 60px" onclick="utils.addModifyGather()">添加</td>
  502. </tr>
  503. </thead>
  504. <tbody id="modifyGatherTBody">
  505. @foreach($modifyGatherList as $item)
  506. <tr>
  507. <td>
  508. <input style="border-style: none" type="text" class="my-input" name="content" value="{{$item->content}}"
  509. data-id="{{$item->id}}">
  510. </td>
  511. <td>
  512. <input style="border-style: none" class="my-input" style="width: 180px" name="date" onclick="utils.bindDate(this)"
  513. value="{{$item->modify_date}}">
  514. </td>
  515. <td onclick="utils.delModifyGather(this)">
  516. 删除
  517. </td>
  518. </tr>
  519. @endforeach
  520. </tbody>
  521. </table>
  522. <button class="btn btn-success" type="button" style="margin-top: 20px"
  523. onclick="utils.saveModifyGather()">保存
  524. </button>
  525. <button class="btn btn-info" type="button" style="margin-top: 20px"
  526. onclick="utils.clearModifyGather()">清空
  527. </button>
  528. </li>
  529. <li>
  530. <table class="my-table">
  531. <caption style="font-size: 20px;font-weight: 600">固定选项</caption>
  532. <thead>
  533. <tr>
  534. <td>
  535. 内容
  536. </td>
  537. <td onclick="utils.addSeoItemScope()" style="width: 140px">
  538. 添加
  539. </td>
  540. </tr>
  541. </thead>
  542. <tbody id="seoItemScopeBody">
  543. @foreach($seoItemScopeList as $item)
  544. <tr>
  545. <td>
  546. <input style="border-style: none" type="text" class="my-input" name="seoItemInput" value="{{$item->content}}">
  547. <input type="hidden" name="seoItemId" value="{{$item->id}}">
  548. </td>
  549. <td>
  550. <a href="javascript:;" style="margin-left: 5px" onclick="utils.delSeoItemScope(this)">删除</a>
  551. </td>
  552. </tr>
  553. @endforeach
  554. </tbody>
  555. </table>
  556. @if($scope)
  557. <button type="button" class="btn btn-success" style="margin: 10px 0"
  558. onclick="utils.saveSeoItemScope()">保存
  559. </button>
  560. @endif
  561. <div>
  562. @php $checkedList=$seoItemSingle->checked_list??[] @endphp
  563. @foreach($seoItemScopeList as $item)
  564. {{--<div style="margin: 5px;background-color: #fff5d4;padding: 5px;display: inline-block">--}}
  565. {{--<input type="checkbox" name="seo_item" value="{{$item->id}}"--}}
  566. {{--@if(in_array($item->id,$checkedList)) checked @endif> {{$item->content}}--}}
  567. {{--</div>--}}
  568. <div style="margin: 5px;background-color: #fff5d4;padding: 5px;display: inline-block">
  569. <input type="checkbox" name="seo_item" value="{{$item->id}}"
  570. checked> {{$item->content}}
  571. </div>
  572. @endforeach
  573. </div>
  574. <button class="btn btn-success" type="button" style="margin-top: 20px"
  575. onclick="utils.saveSeo()">保存
  576. </button>
  577. </li>
  578. <li>
  579. <table class="my-table">
  580. <caption style="font-size: 20px;font-weight: 600">固定话语</caption>
  581. <thead>
  582. <tr>
  583. <td>
  584. 内容
  585. </td>
  586. <td style="width: 140px">
  587. <input type="checkbox" id="checkboxAddAll"><span onclick="utils.addPlanScope()">添加</span>
  588. </td>
  589. </tr>
  590. </thead>
  591. <tbody id="planScopeBody">
  592. @foreach($planScopeList as $item)
  593. <tr>
  594. <td><input style="border-style: none" type="text" class="my-input" name="planScopeInput" value="{{$item->content}}">
  595. </td>
  596. <td>
  597. <input type="checkbox" name="planScopeCheckbox">
  598. <a href="javascript:;" style="margin-left: 5px"
  599. onclick="utils.delPlanScope(this)">删除</a>
  600. </td>
  601. </tr>
  602. @endforeach
  603. </tbody>
  604. </table>
  605. @if($scope)
  606. <button type="button" class="btn btn-success" style="margin: 10px 0"
  607. onclick="utils.savePlanScope()">保存
  608. </button>
  609. @endif
  610. <table class="my-table">
  611. <theead>
  612. <tr>
  613. <td>内容</td>
  614. <td onclick="utils.addPlan()" style="width: 60px">添加</td>
  615. </tr>
  616. </theead>
  617. <tbody id="plan">
  618. @foreach($plan->content_list??[] as $item)
  619. <tr>
  620. <td>
  621. <textarea name="content" rows="2" class="form-control">{{$item['content']}}</textarea>
  622. </td>
  623. <td onclick="utils.delPlan(this)">
  624. 删除
  625. </td>
  626. </tr>
  627. @endforeach
  628. </tbody>
  629. </table>
  630. <button type="button" class="btn btn-primary" name="file_upload"
  631. style="float: left;margin-top: 5px;margin-right:10px;" onclick="utils.triggerFile()">
  632. 文件上传
  633. </button>
  634. <input type="file" value="" style="display: none" name="uploadFile" id="uploadFile"
  635. onchange="utils.fileUpload(this)">
  636. <div id="fileDiv">
  637. @if(!empty($plan->file_path))
  638. <div class="input-group input-group-sm"
  639. style="width: 180px;padding-top:5px;float:left;">
  640. <span class="input-group-addon"><span
  641. class="glyphicon glyphicon-remove" onclick="utils.removeFile(this)"></span></span>
  642. <input type="text" class="form-control" id="file_name" title=""
  643. value="{{$plan->file_name??''}}">
  644. <input type="hidden" class="form-control" id="file_path" value="{{$plan->file_path??''}}">
  645. </div>
  646. @endif
  647. </div>
  648. <button class="btn btn-success" type="button" style="margin-top: 5px"
  649. onclick="utils.savePlan()">保存
  650. </button>
  651. </li>
  652. <li>
  653. <table class="my-table">
  654. <thead>
  655. <tr>
  656. <td style="width: 120px">月份</td>
  657. <td style="width: 100px">工作评分</td>
  658. <td style="text-align: left">客户建议</td>
  659. </tr>
  660. </thead>
  661. <tbody>
  662. @foreach($feedbackList as $item)
  663. <tr>
  664. <td>{{$item->ym}}</td>
  665. <td>{{$item->score}}</td>
  666. <td style="text-align: left">{{$item->advice}}</td>
  667. </tr>
  668. @endforeach
  669. </tbody>
  670. </table>
  671. </li>
  672. </ul>
  673. @endsection
  674. @section('footer_extend')
  675. <script src="{{asset('js/plugins/layDate-v5.0.9/laydate/laydate.js')}}"></script>
  676. <script>
  677. $('#checkboxAddAll').click(function () {
  678. var checkedOfAll = $("#checkboxAddAll").prop("checked");
  679. $("input[name='planScopeCheckbox']").prop("checked", checkedOfAll);
  680. });
  681. $(function () {
  682. $("[name=date]").trigger('click'); //触发laydate绑定
  683. });
  684. var utils = {
  685. triggerFile: function () { //文件上传
  686. $("#uploadFile").trigger('click');
  687. },
  688. fileUpload: function (_this) {
  689. var config = {
  690. url: '/admin/tool/upload'
  691. };
  692. config.success = function (result) {
  693. layer.msg(result.message, {icon: 6, time: 1500});
  694. $("#fileDiv").html(utils.makeFileHtml(result.data.original_name, result.data.file_url));
  695. };
  696. tips.fileUpload(_this, config);
  697. },
  698. makeFileHtml: function (fileTitle, fileVal) {
  699. if (!fileTitle) {
  700. fileTitle = '';
  701. }
  702. if (!fileVal) {
  703. fileVal = '';
  704. }
  705. return '<div class="input-group input-group-sm" style="width: 180px;padding-top:5px;float:left;">' +
  706. '<span class="input-group-addon"><span class="glyphicon glyphicon-remove" onclick="utils.removeFile(this)"></span></span>' +
  707. '<input type="text" class="form-control" id="file_name" value="' + fileTitle + '">' +
  708. '<input type="hidden" class="form-control" id="file_path" value="' + fileVal + '">' +
  709. '</div>';
  710. },
  711. removeFile: function (_this) {
  712. $(_this).parent().parent().remove();
  713. },
  714. delOptimizeDataScope: function (_this) {
  715. $(_this).parent().parent().remove();
  716. },
  717. addOptimizeDataScope: function (id) {
  718. var str = '<tr>' +
  719. '<td>' +
  720. '<input style="border-style: none" type="text" value="" class="my-input" name="optimizeDataScopeText">' +
  721. '</td>' +
  722. '<td>' +
  723. '<a href="javascript:;" onclick="utils.addTo()" style="padding-right: 20px">追加</a>' +
  724. '<a href="javascript:;" onclick="utils.delOptimizeDataScope(this)">删除</a>' +
  725. '</td>' +
  726. '</tr>';
  727. $("#optimizeDataScopeBody" + id).append(str);
  728. },
  729. addOptimizeData: function () {
  730. var checkedScope = [];
  731. $("#optimizeDataScopeBody tr").find("[name=optimizeDataScopeCheck]:checked").each(function () {
  732. checkedScope.push($(this).parent().prev().find("input").val())
  733. });
  734. utils.addHtml("");
  735. /* if (checkedScope.length > 0) {
  736. for (var i = 0; i < checkedScope.length; i++) {
  737. utils.addHtml(checkedScope[i]);
  738. }
  739. } else {
  740. utils.addHtml("");
  741. }*/
  742. },
  743. addTo: function (text = '') {
  744. utils.addHtml(text);
  745. },
  746. saveOptimizeDataScope: function () {
  747. var dataList1 = [];
  748. $("#optimizeDataScopeBody1").find("[name=optimizeDataScopeText]").each(function () {
  749. var val = $(this).val();
  750. if (val.length > 0) {
  751. dataList1.push(val)
  752. }
  753. });
  754. var dataList2 = [];
  755. $("#optimizeDataScopeBody2").find("[name=optimizeDataScopeText]").each(function () {
  756. var val = $(this).val();
  757. if (val.length > 0) {
  758. dataList2.push(val)
  759. }
  760. });
  761. var dataList3 = [];
  762. $("#optimizeDataScopeBody3").find("[name=optimizeDataScopeText]").each(function () {
  763. var val = $(this).val();
  764. if (val.length > 0) {
  765. dataList3.push(val)
  766. }
  767. });
  768. var dataList4 = [];
  769. $("#optimizeDataScopeBody4").find("[name=optimizeDataScopeText]").each(function () {
  770. var val = $(this).val();
  771. if (val.length > 0) {
  772. dataList4.push(val)
  773. }
  774. });
  775. var ajaxConfig = {
  776. url: '/admin/promote-report-optimize-data-scope-save',
  777. type: 'post',
  778. data: {
  779. dataList1: dataList1,
  780. dataList2: dataList2,
  781. dataList3: dataList3,
  782. dataList4: dataList4,
  783. }
  784. };
  785. tips.ajax(ajaxConfig);
  786. window.location.reload();
  787. },
  788. bindDate: function (that) {
  789. var routeTime = {
  790. type: 'date',
  791. elem: that
  792. };
  793. laydate.render(routeTime);
  794. },
  795. addHtml: function (text) {
  796. var str = '<tr>' +
  797. '<td><input type="text" class="my-input" value="' + text + '"></td>' +
  798. '<td class="you-del">删除</td>' +
  799. '</tr>';
  800. $(".you-table tbody").append(str);
  801. },
  802. save: function () {
  803. var dataList = [];
  804. $(".you-table tbody").find("input").each(function () {
  805. var val = $(this).val();
  806. if (val.length > 0) {
  807. dataList.push(val)
  808. }
  809. });
  810. var ajaxConfig = {
  811. url: '/admin/promote-report-save/sites/' + "{{$siteId}}",
  812. type: 'post',
  813. data: {
  814. dataList: dataList
  815. }
  816. };
  817. tips.ajax(ajaxConfig);
  818. },
  819. saveSummary: function () {
  820. var summary = $('#summary').val();
  821. var ajaxConfig = {
  822. url: '/admin/promote-report-summary-save/sites/' + "{{$siteId}}",
  823. type: 'post',
  824. data: {summary: summary}
  825. };
  826. tips.ajax(ajaxConfig);
  827. },
  828. contentHtml: function (val) {
  829. return '<div style="margin-bottom: 5px"><input type="text" value="' + val + '"' +
  830. ' class="subInput">' +
  831. '<button class="btn btn-sm" onclick="utils.delContent(this)">删除</button></div>';
  832. },
  833. addUrl: function () {
  834. var str = '<tr>' +
  835. '<td>' +
  836. '<input type="text" class="my-input" value="">' +
  837. '<div style="padding: 10px 0 5px 50px" class="sub-content">' +
  838. '<div style="margin-bottom: 5px">' +
  839. '<input type="text" class="subInput" value="(1) 关键词植入">' +
  840. '<button class="btn btn-sm" onclick="utils.delContent(this)">删除</button>' +
  841. '</div>' +
  842. '<div style="margin-bottom: 5px">' +
  843. '<input type="text" class="subInput" value="(2) 锚文本优化">' +
  844. '<button class="btn btn-sm" onclick="utils.delContent(this)">删除</button>' +
  845. '</div>' +
  846. '<div style="margin-bottom: 5px">' +
  847. '<input type="text" class="subInput" value="(3) 图片ALT标签优化">' +
  848. '<button class="btn btn-sm" onclick="utils.delContent(this)">删除</button>' +
  849. '</div>' +
  850. '<div style="margin-bottom: 5px">' +
  851. '<input type="text" class="subInput" value="(4) Summary重写">' +
  852. '<button class="btn btn-sm" onclick="utils.delContent(this)">删除</button>' +
  853. '</div>' +
  854. '</div>' +
  855. '</td>' +
  856. '<td style="vertical-align: top">' +
  857. '<button type="button" class="btn btn-sm" style="margin-right: 5px" onclick="utils.delUrl(this)">' +
  858. '删除' +
  859. '</button>' +
  860. '<button type="button" class="btn btn-sm btn-success" onclick="utils.addContent(this)">添加内容' +
  861. '</button>' +
  862. '</td>' +
  863. '</tr>';
  864. $(".you-table2 tbody").append(str);
  865. },
  866. delUrl: function (_this) {
  867. $(_this).parent().parent().remove()
  868. },
  869. addContent: function (_this) {
  870. // var textList = [];
  871. // $("[name=selectCheckbox]:checked").each(function () {
  872. // textList.push($(this).parent().prev().find("[name=landPageInput]").val());
  873. // });
  874. var htmlStr = '';
  875. // if (textList.length > 0) {
  876. // for (var i = 0; i < textList.length; i++) {
  877. // htmlStr = utils.contentHtml(textList[i]);
  878. // $(_this).parent().prev().find(".sub-content").append(htmlStr)
  879. // }
  880. //
  881. // } else {
  882. htmlStr = utils.contentHtml('');
  883. $(_this).parent().prev().find(".sub-content").append(htmlStr)
  884. // }
  885. },
  886. delContent: function (_this) {
  887. $(_this).parent().remove()
  888. },
  889. // addLandPageScope: function () {
  890. // var str = '<tr>' +
  891. // '<td><input type="text" class="my-input" name="landPageInput" value=""></td>' +
  892. // '<td>' +
  893. // '<input type="checkbox" name="selectCheckbox">' +
  894. // '<a href="javascript:;" style="margin-left: 5px" onclick="utils.delLandPageScope(this)">删除</a>' +
  895. // '</td>' +
  896. // '</tr>';
  897. // $("#landPageScopeBody").append(str)
  898. // },
  899. //
  900. // delLandPageScope: function (_this) {
  901. // $(_this).parent().parent().remove()
  902. // },
  903. //
  904. // saveLandPageScope: function () {
  905. // var dataList = [];
  906. // $("#landPageScopeBody").find("[name=landPageInput]").each(function () {
  907. // var val = $(this).val();
  908. // if (val.length > 0) {
  909. // dataList.push(val)
  910. // }
  911. // });
  912. // var ajaxConfig = {
  913. // url: '/admin/promote-report-land-page-scope-save',
  914. // type: 'post',
  915. // data: {
  916. // dataList: dataList
  917. // }
  918. // };
  919. // tips.ajax(ajaxConfig);
  920. // },
  921. clearLandPage: function () {
  922. layer.confirm('是否清空着陆页?', {icon: 3, title: '提示'}, function () {
  923. var ajaxConfig = {
  924. url: '/admin/promote-report-land-page-clear/sites/' + "{{$siteId}}",
  925. type: 'DELETE',
  926. success: function (result) {
  927. layer.msg(result.message, {icon: 6, time: 1500}, function () {
  928. //$("#modifyGatherTBody").html();
  929. window.location.reload();
  930. });
  931. }
  932. };
  933. tips.ajax(ajaxConfig);
  934. });
  935. },
  936. landPageSave: function () {
  937. var dataList = [];
  938. var errMsg = '';
  939. $(".you-table2 tbody").find(".my-input").each(function () {
  940. var val = $(this).val();
  941. var id = $(this).data('id');
  942. if (!id) {
  943. id = 0;
  944. }
  945. if (val.length > 0) {
  946. var subList = [];
  947. $(this).next().find(".subInput").each(function () {
  948. var subVal = $(this).val();
  949. if (subVal.length > 0) {
  950. subList.push(subVal)
  951. } else {
  952. errMsg += '子项不能为空<br>';
  953. }
  954. });
  955. dataList.push({content: val, subList: subList, id: id})
  956. } else {
  957. errMsg += '着陆页不能为空<br>';
  958. }
  959. });
  960. if (errMsg !== '') {
  961. layer.alert(errMsg, {icon: 5});
  962. return;
  963. }
  964. var ajaxConfig = {
  965. url: '/admin/promote-report-land-page-save/sites/' + "{{$siteId}}",
  966. type: 'post',
  967. data: {
  968. dataList: dataList
  969. },
  970. success: function (result) {
  971. var resultDataList = result.data;
  972. var html = '';
  973. for (var i = 0; i < resultDataList.length; i++) {
  974. var top = '<tr>\n' +
  975. ' <td>\n' +
  976. ' <input type="text" class="my-input" value="' + resultDataList[i]['content'] + '" data-id="' + resultDataList[i]['id'] + '">\n' +
  977. ' <div style="padding: 10px 0 5px 50px" class="sub-content">';
  978. var subList = resultDataList[i]['sub_list'];
  979. var sub = '';
  980. for (var j = 0; j < subList.length; j++) {
  981. sub += ' <div style="margin-bottom: 5px">\n' +
  982. ' <input type="text" class="subInput" value="' + subList[j] + '">' +
  983. ' <button class="btn btn-sm" onclick="utils.delContent(this)">删除\n' +
  984. ' </button>\n' +
  985. ' </div>';
  986. }
  987. var bottom = ' </div>\n' +
  988. ' </td>' +
  989. ' <td style="vertical-align: top">\n' +
  990. ' <button type="button" class="btn btn-sm" style="margin-right: 5px"\n' +
  991. ' onclick="utils.delUrl(this)">\n' +
  992. ' 删除\n' +
  993. ' </button>\n' +
  994. ' <button type="button" class="btn btn-sm btn-success" onclick="utils.addContent(this)">添加内容\n' +
  995. ' </button>\n' +
  996. ' </td>\n' +
  997. ' </tr>';
  998. html += top + sub + bottom
  999. }
  1000. $("#landPageTBody").html(html);
  1001. layer.msg("操作成功", {icon: 6, time: 1500});
  1002. }
  1003. };
  1004. tips.ajax(ajaxConfig);
  1005. },
  1006. socialSave: function () {
  1007. var facebook = [], twitter = [], linkedIn = [], pin = [], ins = [], youtube = [];
  1008. $("[name=facebook]").each(function () {
  1009. facebook.push($(this).val())
  1010. });
  1011. $("[name=linkedIn]").each(function () {
  1012. linkedIn.push($(this).val())
  1013. });
  1014. $("[name=twitter]").each(function () {
  1015. twitter.push($(this).val())
  1016. });
  1017. $("[name=pin]").each(function () {
  1018. pin.push($(this).val())
  1019. });
  1020. $("[name=ins]").each(function () {
  1021. ins.push($(this).val())
  1022. });
  1023. $("[name=youtube]").each(function () {
  1024. youtube.push($(this).val())
  1025. });
  1026. var ajaxConfig = {
  1027. url: '/admin/promote-report-social-save/sites/' + "{{$siteId}}",
  1028. type: 'post',
  1029. data: {
  1030. facebook: facebook,
  1031. linkedIn: linkedIn,
  1032. twitter: twitter,
  1033. pin: pin,
  1034. ins: ins,
  1035. youtube: youtube,
  1036. facebookHide: $("[name=facebook_hide]").prop('checked') ? 1 : 0,
  1037. linkedInHide: $("[name=linkedIn_hide]").prop('checked') ? 1 : 0,
  1038. twitterHide: $("[name=twitter_hide]").prop('checked') ? 1 : 0,
  1039. pinHide: $("[name=pin_hide]").prop('checked') ? 1 : 0,
  1040. insHide: $("[name=ins_hide]").prop('checked') ? 1 : 0,
  1041. youtubeHide: $("[name=youtube_hide]").prop('youtube_hide') ? 1 : 0,
  1042. }
  1043. };
  1044. tips.ajax(ajaxConfig);
  1045. },
  1046. socialStatistics: function () {
  1047. layer.confirm('是否开始自动统计?', {icon: 3, title: '提示'}, function () {
  1048. var ajaxConfig = {
  1049. url: '/admin/socialStatistics/socialStatistics/' + "{{$siteId}}",
  1050. type: 'get',
  1051. data: {},
  1052. success: function (result) {
  1053. layer.msg(result.message, {icon: 6, time: 1500});
  1054. window.location.reload();
  1055. }
  1056. };
  1057. tips.ajax(ajaxConfig);
  1058. });
  1059. },
  1060. addModifyGather: function () {
  1061. var str = '<tr>' +
  1062. '<td>' +
  1063. '<input type="text" class="my-input" name="content">' +
  1064. '</td>' +
  1065. '<td>' +
  1066. '<input type="text" class="my-input" style="width: 180px" name="date" onclick="utils.bindDate(this)">' +
  1067. '</td>' +
  1068. '<td onclick="utils.delModifyGather(this)">删除</td>' +
  1069. '</tr>';
  1070. $("#modifyGatherTBody").append(str);
  1071. $("[name=date]").trigger("click");
  1072. },
  1073. delModifyGather: function (_this) {
  1074. $(_this).parent().remove();
  1075. },
  1076. clearModifyGather: function () {
  1077. layer.confirm('是否清空汇总?', {icon: 3, title: '提示'}, function () {
  1078. var ajaxConfig = {
  1079. url: '/admin/promote-year-seo-item-clear/sites/' + "{{$siteId}}",
  1080. type: 'DELETE',
  1081. success: function (result) {
  1082. //$("#modifyGatherTBody").html('');
  1083. layer.msg(result.message, {icon: 6, time: 1500});
  1084. window.location.reload();
  1085. }
  1086. };
  1087. tips.ajax(ajaxConfig);
  1088. });
  1089. },
  1090. saveModifyGather: function () {
  1091. var dataList = [];
  1092. $("#modifyGatherTBody tr").each(function () {
  1093. var content = $(this).find("[name=content]").val();
  1094. var id = $(this).find("[name=content]").data('id');
  1095. if (!id) {
  1096. id = 0;
  1097. }
  1098. var date = $(this).find("[name=date]").val();
  1099. if (content && date) {
  1100. dataList.push({
  1101. id: id,
  1102. content: content,
  1103. modify_date: date
  1104. })
  1105. }
  1106. });
  1107. var ajaxConfig = {
  1108. url: '/admin/promote-report-modify-gather-save/sites/' + "{{$siteId}}",
  1109. type: 'post',
  1110. data: {dataList: dataList},
  1111. success: function (result) {
  1112. var resultDataList = result.data;
  1113. var html = '';
  1114. for (var i = 0; i < resultDataList.length; i++) {
  1115. html += '<tr>' +
  1116. '<td>' +
  1117. '<input type="text" class="my-input" name="content" value="' + resultDataList[i]['content'] + '" data-id="' + resultDataList[i]['id'] + '">' +
  1118. '</td>' +
  1119. '<td>' +
  1120. '<input class="my-input" style="width: 180px" name="date" onclick="utils.bindDate(this)" value="' + resultDataList[i]['modify_date'] + '">' +
  1121. '</td>' +
  1122. '<td onclick="utils.delModifyGather(this)">删除</td>' +
  1123. '</tr>';
  1124. }
  1125. $('#modifyGatherTBody').html(html);
  1126. layer.msg("操作成功", {icon: 6, time: 1500});
  1127. }
  1128. };
  1129. tips.ajax(ajaxConfig);
  1130. },
  1131. addSeoItemScope: function () {
  1132. var str = '<tr>' +
  1133. '<td><input type="text" class="my-input" name="seoItemInput" value=""> <input type="hidden" name="seoItemId" value="0">' +
  1134. ' </td>' +
  1135. ' <td>' +
  1136. ' <a href="javascript:;" style="margin-left: 5px" onclick="utils.delSeoItemScope(this)">删除</a>' +
  1137. ' </td>' +
  1138. '</tr>';
  1139. $("#seoItemScopeBody").append(str)
  1140. },
  1141. delSeoItemScope: function (_this) {
  1142. $(_this).parent().parent().remove()
  1143. },
  1144. saveSeoItemScope: function () {
  1145. var dataList = [];
  1146. $("#seoItemScopeBody tr").each(function () {
  1147. var seoItemInput = $(this).find("[name=seoItemInput]").val();
  1148. var seoItemId = $(this).find("[name=seoItemId]").val();
  1149. if (seoItemInput.length > 0) {
  1150. dataList.push({
  1151. content: seoItemInput,
  1152. seoItemId: seoItemId
  1153. })
  1154. }
  1155. });
  1156. var ajaxConfig = {
  1157. url: '/admin/promote-report-seo-item-scope-save',
  1158. type: 'post',
  1159. data: {
  1160. dataList: dataList
  1161. },
  1162. success: function (result) {
  1163. var config = {
  1164. url: "/admin/promote-report-seo-item-scope",
  1165. success: function (result) {
  1166. var resultDataList = result.data;
  1167. var str = '';
  1168. for (var i = 0; i < resultDataList.length; i++) {
  1169. str += '<tr>' +
  1170. '<td><input type="text" class="my-input" name="seoItemInput" value="' + resultDataList[i]['content'] + '"> <input type="hidden" name="seoItemId" value="' + resultDataList[i]['id'] + '">' +
  1171. ' </td>' +
  1172. ' <td>' +
  1173. ' <a href="javascript:;" style="margin-left: 5px" onclick="utils.delSeoItemScope(this)">删除</a>' +
  1174. ' </td>' +
  1175. '</tr>';
  1176. }
  1177. $("#seoItemScopeBody").html(str);
  1178. layer.msg("操作成功", {icon: 6, time: 1500});
  1179. }
  1180. };
  1181. tips.ajax(config)
  1182. }
  1183. };
  1184. tips.ajax(ajaxConfig);
  1185. },
  1186. saveSeo: function () {
  1187. var checkedItems = [];
  1188. $("[name=seo_item]:checked").each(function () {
  1189. checkedItems.push($(this).val())
  1190. });
  1191. console.log(checkedItems);
  1192. var ajaxConfig = {
  1193. url: '/admin/promote-report-seo-item-save/sites/' + "{{$siteId}}",
  1194. type: 'post',
  1195. data: {checked_list: checkedItems}
  1196. };
  1197. tips.ajax(ajaxConfig);
  1198. },
  1199. addPlanScope: function () {
  1200. var str = '<tr>' +
  1201. '<td><input style="border-style: none" type="text" class="my-input" name="planScopeInput" value="">' +
  1202. '</td>' +
  1203. '<td>' +
  1204. '<input type="checkbox" name="planScopeCheckbox">' +
  1205. '<a href="javascript:;" style="margin-left: 5px" onclick="utils.delPlanScope(this)">删除</a>' +
  1206. '</td>' +
  1207. '</tr>';
  1208. $("#planScopeBody").append(str);
  1209. },
  1210. delPlanScope: function (_this) {
  1211. $(_this).parent().parent().remove();
  1212. },
  1213. savePlanScope: function () {
  1214. var dataList = [];
  1215. $("#planScopeBody tr").find("[name=planScopeInput]").each(function () {
  1216. var val = $(this).val();
  1217. if (val.length > 0) {
  1218. dataList.push(val)
  1219. }
  1220. });
  1221. var ajaxConfig = {
  1222. url: '/admin/promote-report-plan-scope-save',
  1223. type: 'post',
  1224. data: {
  1225. dataList: dataList
  1226. }
  1227. };
  1228. tips.ajax(ajaxConfig);
  1229. },
  1230. planHtml: function (val) {
  1231. var str = '<tr><td>' +
  1232. '<textarea name="content" rows="2" class="form-control">' + val + '</textarea>' +
  1233. '</td>' +
  1234. '<td onclick="utils.delPlan(this)">' +
  1235. '删除' +
  1236. '</td></tr>';
  1237. $("#plan").append(str)
  1238. },
  1239. addPlan: function () {
  1240. var scopeList = [];
  1241. $("#planScopeBody tr").find("[name=planScopeCheckbox]:checked").each(function () {
  1242. scopeList.push($(this).parent().prev().find("[name=planScopeInput]").val())
  1243. });
  1244. console.log(scopeList);
  1245. if (scopeList.length > 0) {
  1246. for (var i = 0; i < scopeList.length; i++) {
  1247. utils.planHtml(scopeList[i]);
  1248. }
  1249. } else {
  1250. utils.planHtml("")
  1251. }
  1252. },
  1253. delPlan: function (_this) {
  1254. $(_this).parent().remove()
  1255. },
  1256. savePlan: function () {
  1257. var dataList = [];
  1258. $("#plan tr").each(function () {
  1259. var content = $(this).find("[name=content]").val();
  1260. if (content) {
  1261. dataList.push({
  1262. content: content
  1263. })
  1264. }
  1265. });
  1266. var ajaxConfig = {
  1267. url: '/admin/promote-report-plan-save/sites/' + "{{$siteId}}",
  1268. type: 'post',
  1269. data: {
  1270. dataList: dataList,
  1271. file_name: $("#file_name").val(),
  1272. file_path: $("#file_path").val()
  1273. }
  1274. };
  1275. tips.ajax(ajaxConfig);
  1276. },
  1277. promoteReport: function () {
  1278. window.open('https://rank.yinqingli.cn/pr/report?projectId=' + "{{base64_encode($oldId)}}");
  1279. },
  1280. promoteAfresh: function () {
  1281. window.open('https://rank.yinqingli.cn/pr/report?noCache=1&projectId=' + "{{base64_encode($oldId)}}");
  1282. },
  1283. clearLastMonthData: function () {
  1284. var ajaxConfig = {
  1285. url: '/admin/site/clearLastMonthData/{{$siteId}}',
  1286. type: 'get',
  1287. success: function () {
  1288. layer.msg('操作成功', {
  1289. icon: 1,
  1290. time: 1500 //2秒关闭(如果不配置,默认是3秒)
  1291. }, function () {
  1292. window.location.reload()
  1293. });
  1294. }
  1295. };
  1296. tips.ajax(ajaxConfig);
  1297. },
  1298. pushReport: function () {
  1299. var ajaxConfig = {
  1300. url: '/admin/site/pushMessage/{{$siteId}}',
  1301. type: 'get',
  1302. success: function () {
  1303. layer.msg('操作成功', {
  1304. icon: 1,
  1305. time: 1500 //2秒关闭(如果不配置,默认是3秒)
  1306. }, function () {
  1307. window.location.reload()
  1308. });
  1309. }
  1310. };
  1311. tips.ajax(ajaxConfig);
  1312. },
  1313. pushMessage: function () {
  1314. var mobile = $('#mobile').val();
  1315. layer.confirm('确定推送吗?', {icon: 3, title: '推送短信'}, function (index, layero) {
  1316. layer.close(index);
  1317. tips.ajax({
  1318. url: '/admin/articles/push-mobile-message',
  1319. type: 'put',
  1320. data: {mobile: mobile, type: 2,siteId:'{{$siteId}}'},
  1321. tableRefresh: '#table'
  1322. });
  1323. });
  1324. },
  1325. };
  1326. $(".nav-tabs>li").click(function () {
  1327. var index = $(this).index();
  1328. $(this).addClass("active");
  1329. $(this).siblings().removeClass("active");
  1330. $(".ul-content>li").eq(index).addClass("active").siblings().removeClass("active")
  1331. });
  1332. $(document).on('click', '.you-del', function () {
  1333. $(this).parent().remove();
  1334. });
  1335. </script>
  1336. @endsection