1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477 |
- @extends('admin/site/side_layout')
- @section('header_extend')
- <style>
- .ul-content {
- margin: 0;
- padding: 0;
- list-style-type: none;
- }
- .ul-content li {
- padding: 20px 10px 10px;
- display: none;
- }
- .ul-content .active {
- display: block;
- }
- .my-input {
- padding: 4px 2px;
- width: 100%;
- }
- .my-table {
- width: 100%;
- }
- .my-table td {
- border: 1px solid #E5E6E7;
- padding: 8px;
- }
- .my-table tr td:last-child {
- cursor: pointer;
- text-align: center;
- }
- .you-table {
- width: 100%;
- }
- .you-table td {
- padding: 8px;
- }
- .you-table tr td:last-child {
- width: 80px;
- cursor: pointer;
- text-align: center;
- }
- .you-table2 {
- width: 100%;
- }
- .you-table2 td {
- padding: 8px;
- }
- .you-table2 tr td:last-child {
- width: 180px;
- }
- .subInput {
- box-sizing: border-box;
- width: 92%;
- border: 1px dashed #999;
- padding: 4px 2px;
- margin-right: 5px;
- }
- .radio-label,
- .radio-check {
- display: inline-block;
- position: relative;
- }
- .radio-label input[type="checkbox"] {
- appearance: none; /*清楚默认样式*/
- -webkit-appearance: none;
- /* opacity: 0; */
- outline: none;
- position: absolute;
- z-index: 2;
- width: 6px;
- height: 6px;
- top: 10px;
- left: 10px;
- border-radius: 50%;
- background: #b4b4b4;
- }
- .radio-label label {
- display: inline-block;
- min-width: 50px;
- height: 24px;
- line-height: 24px;
- text-align: center;
- padding-right: 10px;
- border-radius: 5px;
- padding-left: 25px;
- color: #fff;
- background-color: #c9c9c9;
- }
- .radio-label input[type="checkbox"]:checked {
- opacity: 0;
- }
- .radio-label input[type="checkbox"]:checked + label {
- color: #fff;
- background-color: #3597db;
- }
- .radio-label input[type="checkbox"]:checked + label::after {
- content: "";
- position: absolute;
- left: 12px;
- top: 5px;
- width: 5px;
- height: 12px;
- border-right: 1px solid #fff;
- border-bottom: 1px solid #fff;
- transform: rotate(45deg);
- }
- </style>
- @endsection
- @section('right')
- @hasAuth('sites-report-edit')
- <div style="padding-bottom: 20px; position:relative; left:-50px;">
- <button type="button" class="btn btn-info" onclick="utils.promoteReport()" style="margin-left: 50px">推广月报({{$webmasterAccount}})
- </button>
- <button type="button" class="btn btn-success" onclick="utils.clearLastMonthData()" style="margin-left: 10px;">清除上月数据</button>
- <button type="button" class="btn btn-success"
- style="border-radius:2px;" onclick="window.open('https://rank.yinqingli.cn/admincp/webmaster/oauth');"><span
- class="glyphicon glyphicon-film"></span> webmaster(Hina点我)</button>
- <button type="button" class="btn btn-success"
- style="border-radius:2px;"
- onclick="window.open('http://rank.yinqingli.cn/admincp/webmaster/oauth2');"><span
- class="glyphicon glyphicon-film"></span> webmaste(Tommy Ru点我)</button>
- <button type="button" class="btn btn-success" onclick="utils.promoteAfresh()">重新生成</button>
- <button type="button" class="btn btn-success" onclick="utils.pushReport()">推送App</button>
- <div class="input-group" style="margin-left: 10px;display: inline-block;">
- <input type="text" placeholder="请输入推送的手机号" class="input-md form-control"
- name="mobile" id="mobile" style="width: 150px;display: inline-block" value="{{$mobile}}">
- <span class="input-group-btn" style="display: inline-block">
- <button type="button" class="btn btn-md btn-success" onclick="utils.pushMessage()"> 推送短信</button>
- </span>
- </div>
- </div>
- @endHasAuth
- {{--@php $scope=true; @endphp--}}
- <ul class="nav nav-tabs">
- <li class="active"><a href="#">优化师数据分析</a></li>
- <li><a href="#">着陆页优化</a></li>
- <li><a href="#">社交推广</a></li>
- <li><a href="#">网站修改汇总</a></li>
- <li id="seoItemLi"><a href="#">引擎力seo</a></li>
- <li><a href="#">工作规划</a></li>
- <li><a href="#">月报反馈</a></li>
- </ul>
- <ul class="ul-content">
- <li class="active">
- <h1 style="font-size: 20px;font-weight: 600">固定话术</h1>
- <table class="my-table">
- <caption style="font-size: 20px;font-weight: 600">一、数据增长</caption>
- <thead>
- <tr>
- <td>
- 内容
- </td>
- @if($scope)
- <td onclick="utils.addOptimizeDataScope(1)" style="width: 140px">
- 添加
- </td>
- @else
- <td>
- 操作
- </td>
- @endif
- </tr>
- </thead>
- <tbody id="optimizeDataScopeBody1">
- @foreach($optimizeDataScopeList1 as $item)
- <tr>
- <td>
- <input style="border-style: none" type="text" value="{{$item}}" class="my-input" name="optimizeDataScopeText">
- </td>
- <td>
- {{--<input type="checkbox" name="optimizeDataScopeCheck" style="margin-right: 5px">--}}
- <a href="javascript:;" onclick="utils.addTo('{{$item}}')"
- style="padding-right: 20px">追加</a>
- @if($scope)
- <a href="javascript:;" onclick="utils.delOptimizeDataScope(this)">删除</a>
- @endif
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- <table class="my-table">
- <caption style="font-size: 20px;font-weight: 600">二、数据有波动</caption>
- <thead>
- <tr>
- <td>
- 内容
- </td>
- @if($scope)
- <td onclick="utils.addOptimizeDataScope(2)" style="width: 140px">
- 添加
- </td>
- @else
- <td>
- 操作
- </td>
- @endif
- </tr>
- </thead>
- <tbody id="optimizeDataScopeBody2">
- @foreach($optimizeDataScopeList2 as $item)
- <tr>
- <td>
- <input style="border-style: none" type="text" value="{{$item}}" class="my-input" name="optimizeDataScopeText">
- </td>
- <td>
- {{--<input type="checkbox" name="optimizeDataScopeCheck" style="margin-right: 5px">--}}
- <a href="javascript:;" onclick="utils.addTo('{{$item}}')"
- style="padding-right: 20px">追加</a>
- @if($scope)
- <a href="javascript:;" onclick="utils.delOptimizeDataScope(this)">删除</a>
- @endif
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- <table class="my-table">
- <caption style="font-size: 20px;font-weight: 600">三、优化效果慢,效果差</caption>
- <thead>
- <tr>
- <td>
- 内容
- </td>
- @if($scope)
- <td onclick="utils.addOptimizeDataScope(3)" style="width: 140px">
- 添加
- </td>
- @else
- <td>
- 操作
- </td>
- @endif
- </tr>
- </thead>
- <tbody id="optimizeDataScopeBody3">
- @foreach($optimizeDataScopeList3 as $item)
- <tr>
- <td>
- <input style="border-style: none" type="text" value="{{$item}}" class="my-input" name="optimizeDataScopeText">
- </td>
- <td>
- {{--<input type="checkbox" name="optimizeDataScopeCheck" style="margin-right: 5px">--}}
- <a href="javascript:;" onclick="utils.addTo('{{$item}}')"
- style="padding-right: 20px">追加</a>
- @if($scope)
- <a href="javascript:;" onclick="utils.delOptimizeDataScope(this)">删除</a>
- @endif
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- <table class="my-table">
- <caption style="font-size: 20px;font-weight: 600">四、常规选项</caption>
- <thead>
- <tr>
- <td>
- 内容
- </td>
- @if($scope)
- <td onclick="utils.addOptimizeDataScope(4)" style="width: 140px">
- 添加
- </td>
- @else
- <td>
- 操作
- </td>
- @endif
- </tr>
- </thead>
- <tbody id="optimizeDataScopeBody4">
- @foreach($optimizeDataScopeList4 as $item)
- <tr>
- <td>
- <input style="border-style: none" type="text" value="{{$item}}" class="my-input" name="optimizeDataScopeText">
- </td>
- <td>
- {{--<input type="checkbox" name="optimizeDataScopeCheck" style="margin-right: 5px">--}}
- <a href="javascript:;" onclick="utils.addTo('{{$item}}')"
- style="padding-right: 20px">追加</a>
- @if($scope)
- <a href="javascript:;" onclick="utils.delOptimizeDataScope(this)">删除</a>
- @endif
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- @if($scope)
- <button type="button" class="btn btn-success" style="margin: 10px 0"
- onclick="utils.saveOptimizeDataScope()">保存
- </button>
- @endif
- <div style="font-size: 20px;font-weight: 600;margin-top: 20px">数据分析
- </div>
- <table class="you-table">
- <thead>
- <tr>
- <td></td>
- <td style="font-size: 18px;font-weight: 600" onclick="utils.addOptimizeData()">添加</td>
- </tr>
- </thead>
- <tbody>
- @foreach($optimizeDataList as $item)
- <tr>
- <td><input style="border-style: none" type="text" class="my-input" value="{{$item->content}}"></td>
- <td class="you-del">删除</td>
- </tr>
- @endforeach
- </tbody>
- </table>
- <div style="padding: 10px">
- <button class="btn btn-success" type="button" onclick="utils.save()">保存</button>
- </div>
- <br>
- <div style="font-size: 20px;font-weight: 600;margin-top: 20px">优化师总结
- </div>
- {{--<textarea rows="5" style="width:100%; padding: 10px" id="summary">{{$summary}}</textarea>--}}
- <textarea name="content" rows="5" class="form-control" id="summary">{{$summary}}</textarea>
- <div style="padding: 10px">
- <button class="btn btn-success" type="button" onclick="utils.saveSummary()">保存</button>
- </div>
- </li>
- <li>
- <div style="font-size: 20px;font-weight: 600;margin-top: 20px">着陆页
- </div>
- <table class="you-table2">
- <thead>
- <tr>
- <td></td>
- <td style="font-size: 18px;font-weight: 600;cursor: pointer" onclick="utils.addUrl(this)">添加</td>
- </tr>
- </thead>
- <tbody id="landPageTBody">
- @foreach($landPageList as $item)
- <tr>
- <td>
- <input style="border-style: none" type="text" class="my-input" value="{{$item->content}}" data-id="{{$item->id}}">
- <div style="padding: 10px 0 5px 50px" class="sub-content">
- @foreach($item->sub_list??[] as $v)
- <div style="margin-bottom: 5px">
- <input style="border-style: none" type="text" class="subInput" value="{{$v}}">
- <button class="btn btn-sm" onclick="utils.delContent(this)">删除
- </button>
- </div>
- @endforeach
- </div>
- </td>
- <td style="vertical-align: top">
- <button type="button" class="btn btn-sm" style="margin-right: 5px"
- onclick="utils.delUrl(this)">
- 删除
- </button>
- <button type="button" class="btn btn-sm btn-success" onclick="utils.addContent(this)">添加内容
- </button>
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- <div style="padding: 10px">
- <button class="btn btn-success" type="button" onclick="utils.landPageSave()">保存</button>
- <button class="btn btn-default" type="button"
- onclick="utils.clearLandPage()">清空
- </button>
- </div>
- </li>
- <li>
- <form>
- @php
- $fbDataList=$socialList['facebook']['data_list']??[];
- $lkDataList=$socialList['linkedIn']['data_list']??[];
- $twDataList=$socialList['twitter']['data_list']??[];
- $pinDataList=$socialList['pin']['data_list']??[];
- $insDataList=$socialList['ins']['data_list']??[];
- $youtubeDataList=$socialList['youtube']['data_list']??[];
- @endphp
- {{--<hr class="line">--}}
- <div class="form-group">
- {{-- <label class="control-label"><input type="checkbox" name="facebook_hide" @if(($socialList['facebook']['hide']??null)==1) checked @endif >是否隐藏
- </label>--}}
- <div class="radio-label">
- <input type="checkbox" id="color1" name="facebook_hide"
- @if(($socialList['facebook']['hide']??null)==1) checked @endif >
- <label for="color1">Facebook 是否隐藏</label>
- </div>
- <div class="input-group">
- @foreach($threeMonth as $inx=>$val)
- <span class="input-group-addon">{{date('Y年n月', strtotime($val . '01')) }}</span>
- <input type="number" class="form-control" title=""
- name="facebook"
- value="{{$fbDataList[$inx]??''}}">
- @endforeach
- </div>
- </div>
- <div class="form-group">
- {{-- <label class="control-label">linkedIn <input type="checkbox" name="linkedIn_hide" @if(($socialList['linkedIn']['hide']??null)==1) checked @endif>是否隐藏
- </label>--}}
- <div class="radio-label">
- <input type="checkbox" id="color2" name="linkedIn_hide"
- @if(($socialList['linkedIn']['hide']??null)==1) checked @endif>
- <label for="color2">LinkedIn 是否隐藏</label>
- </div>
- <div class="input-group">
- @foreach($threeMonth as $inx=>$val)
- <span class="input-group-addon">{{date('Y年n月', strtotime($val . '01')) }}</span>
- <input type="number" class="form-control"
- name="linkedIn" title=""
- value="{{$lkDataList[$inx]??''}}">
- @endforeach
- </div>
- </div>
- <div class="form-group">
- {{-- <label class="control-label">twitter <input type="checkbox" name="twitter_hide" @if(($socialList['twitter']['hide']??null)==1) checked @endif>是否隐藏
- </label>--}}
- <div class="radio-label">
- <input type="checkbox" id="color3" name="twitter_hide"
- @if(($socialList['twitter']['hide']??null)==1) checked @endif>
- <label for="color3">Twitter 是否隐藏</label>
- </div>
- <div class="input-group">
- @foreach($threeMonth as $inx=>$val)
- <span class="input-group-addon">{{date('Y年n月', strtotime($val . '01')) }}</span>
- <input type="number" class="form-control"
- name="twitter" title=""
- value="{{$twDataList[$inx]??''}}">
- @endforeach
- </div>
- </div>
- <div class="form-group">
- {{-- <label class="control-label">pin <input type="checkbox" name="pin_hide" @if(($socialList['pin']['hide']??null)==1) checked @endif>是否隐藏
- </label>--}}
- <div class="radio-label">
- <input type="checkbox" id="color4" name="pin_hide"
- @if(($socialList['pin']['hide']??null)==1) checked @endif>
- <label for="color4">Pinterest 是否隐藏</label>
- </div>
- <div class="input-group">
- @foreach($threeMonth as $inx=>$val)
- <span class="input-group-addon">{{date('Y年n月', strtotime($val . '01')) }}</span>
- <input type="number" class="form-control"
- name="pin" title=""
- value="{{$pinDataList[$inx]??''}}">
- @endforeach
- </div>
- </div>
- <div class="form-group">
- {{-- <label class="control-label">Instagram <input type="checkbox" name="ins_hide" @if(($socialList['ins']['hide']??null)==1) checked @endif>是否隐藏
- </label>--}}
- <div class="radio-label">
- <input type="checkbox" id="color5" name="ins_hide"
- @if(($socialList['ins']['hide']??null)==1) checked @endif>
- <label for="color5">Instagram 是否隐藏</label>
- </div>
- <div class="input-group">
- @foreach($threeMonth as $inx=>$val)
- <span class="input-group-addon">{{date('Y年n月', strtotime($val . '01')) }}</span>
- <input type="number" class="form-control"
- name="ins" title=""
- value="{{$insDataList[$inx]??''}}">
- @endforeach
- </div>
- </div>
- <div class="form-group">
- {{-- <label class="control-label">youtube <input type="checkbox" name="youtube_hide" @if(($socialList['youtube']['hide']??null)==1) checked @endif>是否隐藏
- </label>--}}
- <div class="radio-label">
- <input type="checkbox" id="color6" name="youtube_hide"
- @if(($socialList['youtube']['hide']??null)==1) checked @endif>
- <label for="color6">YouTube 是否隐藏</label>
- </div>
- <div class="input-group">
- @foreach($threeMonth as $inx=>$val)
- <span class="input-group-addon">{{date('Y年n月', strtotime($val . '01')) }}</span>
- <input type="number" class="form-control"
- name="youtube" title=""
- value="{{$youtubeDataList[$inx]??''}}">
- @endforeach
- </div>
- </div>
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <button class="btn btn-primary" type="button"
- onclick="utils.socialSave();">
- 保存
- </button>
- <button class="btn btn-primary" type="button"
- onclick="utils.socialStatistics();">
- 自动统计
- </button>
- </div>
- </form>
- </li>
- <li>
- <table class="my-table">
- <thead>
- <tr>
- <td>修改诉求</td>
- <td style="width: 200px">修改时间</td>
- <td style="width: 60px" onclick="utils.addModifyGather()">添加</td>
- </tr>
- </thead>
- <tbody id="modifyGatherTBody">
- @foreach($modifyGatherList as $item)
- <tr>
- <td>
- <input style="border-style: none" type="text" class="my-input" name="content" value="{{$item->content}}"
- data-id="{{$item->id}}">
- </td>
- <td>
- <input style="border-style: none" class="my-input" style="width: 180px" name="date" onclick="utils.bindDate(this)"
- value="{{$item->modify_date}}">
- </td>
- <td onclick="utils.delModifyGather(this)">
- 删除
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- <button class="btn btn-success" type="button" style="margin-top: 20px"
- onclick="utils.saveModifyGather()">保存
- </button>
- <button class="btn btn-info" type="button" style="margin-top: 20px"
- onclick="utils.clearModifyGather()">清空
- </button>
- </li>
- <li>
- <table class="my-table">
- <caption style="font-size: 20px;font-weight: 600">固定选项</caption>
- <thead>
- <tr>
- <td>
- 内容
- </td>
- <td onclick="utils.addSeoItemScope()" style="width: 140px">
- 添加
- </td>
- </tr>
- </thead>
- <tbody id="seoItemScopeBody">
- @foreach($seoItemScopeList as $item)
- <tr>
- <td>
- <input style="border-style: none" type="text" class="my-input" name="seoItemInput" value="{{$item->content}}">
- <input type="hidden" name="seoItemId" value="{{$item->id}}">
- </td>
- <td>
- <a href="javascript:;" style="margin-left: 5px" onclick="utils.delSeoItemScope(this)">删除</a>
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- @if($scope)
- <button type="button" class="btn btn-success" style="margin: 10px 0"
- onclick="utils.saveSeoItemScope()">保存
- </button>
- @endif
- <div>
- @php $checkedList=$seoItemSingle->checked_list??[] @endphp
- @foreach($seoItemScopeList as $item)
- {{--<div style="margin: 5px;background-color: #fff5d4;padding: 5px;display: inline-block">--}}
- {{--<input type="checkbox" name="seo_item" value="{{$item->id}}"--}}
- {{--@if(in_array($item->id,$checkedList)) checked @endif> {{$item->content}}--}}
- {{--</div>--}}
- <div style="margin: 5px;background-color: #fff5d4;padding: 5px;display: inline-block">
- <input type="checkbox" name="seo_item" value="{{$item->id}}"
- checked> {{$item->content}}
- </div>
- @endforeach
- </div>
- <button class="btn btn-success" type="button" style="margin-top: 20px"
- onclick="utils.saveSeo()">保存
- </button>
- </li>
- <li>
- <table class="my-table">
- <caption style="font-size: 20px;font-weight: 600">固定话语</caption>
- <thead>
- <tr>
- <td>
- 内容
- </td>
- <td style="width: 140px">
- <input type="checkbox" id="checkboxAddAll"><span onclick="utils.addPlanScope()">添加</span>
- </td>
- </tr>
- </thead>
- <tbody id="planScopeBody">
- @foreach($planScopeList as $item)
- <tr>
- <td><input style="border-style: none" type="text" class="my-input" name="planScopeInput" value="{{$item->content}}">
- </td>
- <td>
- <input type="checkbox" name="planScopeCheckbox">
- <a href="javascript:;" style="margin-left: 5px"
- onclick="utils.delPlanScope(this)">删除</a>
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- @if($scope)
- <button type="button" class="btn btn-success" style="margin: 10px 0"
- onclick="utils.savePlanScope()">保存
- </button>
- @endif
- <table class="my-table">
- <theead>
- <tr>
- <td>内容</td>
- <td onclick="utils.addPlan()" style="width: 60px">添加</td>
- </tr>
- </theead>
- <tbody id="plan">
- @foreach($plan->content_list??[] as $item)
- <tr>
- <td>
- <textarea name="content" rows="2" class="form-control">{{$item['content']}}</textarea>
- </td>
- <td onclick="utils.delPlan(this)">
- 删除
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- <button type="button" class="btn btn-primary" name="file_upload"
- style="float: left;margin-top: 5px;margin-right:10px;" onclick="utils.triggerFile()">
- 文件上传
- </button>
- <input type="file" value="" style="display: none" name="uploadFile" id="uploadFile"
- onchange="utils.fileUpload(this)">
- <div id="fileDiv">
- @if(!empty($plan->file_path))
- <div class="input-group input-group-sm"
- style="width: 180px;padding-top:5px;float:left;">
- <span class="input-group-addon"><span
- class="glyphicon glyphicon-remove" onclick="utils.removeFile(this)"></span></span>
- <input type="text" class="form-control" id="file_name" title=""
- value="{{$plan->file_name??''}}">
- <input type="hidden" class="form-control" id="file_path" value="{{$plan->file_path??''}}">
- </div>
- @endif
- </div>
- <button class="btn btn-success" type="button" style="margin-top: 5px"
- onclick="utils.savePlan()">保存
- </button>
- </li>
- <li>
- <table class="my-table">
- <thead>
- <tr>
- <td style="width: 120px">月份</td>
- <td style="width: 100px">工作评分</td>
- <td style="text-align: left">客户建议</td>
- </tr>
- </thead>
- <tbody>
- @foreach($feedbackList as $item)
- <tr>
- <td>{{$item->ym}}</td>
- <td>{{$item->score}}</td>
- <td style="text-align: left">{{$item->advice}}</td>
- </tr>
- @endforeach
- </tbody>
- </table>
- </li>
- </ul>
- @endsection
- @section('footer_extend')
- <script src="{{asset('js/plugins/layDate-v5.0.9/laydate/laydate.js')}}"></script>
- <script>
- $('#checkboxAddAll').click(function () {
- var checkedOfAll = $("#checkboxAddAll").prop("checked");
- $("input[name='planScopeCheckbox']").prop("checked", checkedOfAll);
- });
- $(function () {
- $("[name=date]").trigger('click'); //触发laydate绑定
- });
- var utils = {
- triggerFile: function () { //文件上传
- $("#uploadFile").trigger('click');
- },
- fileUpload: function (_this) {
- var config = {
- url: '/admin/tool/upload'
- };
- config.success = function (result) {
- layer.msg(result.message, {icon: 6, time: 1500});
- $("#fileDiv").html(utils.makeFileHtml(result.data.original_name, result.data.file_url));
- };
- tips.fileUpload(_this, config);
- },
- makeFileHtml: function (fileTitle, fileVal) {
- if (!fileTitle) {
- fileTitle = '';
- }
- if (!fileVal) {
- fileVal = '';
- }
- return '<div class="input-group input-group-sm" style="width: 180px;padding-top:5px;float:left;">' +
- '<span class="input-group-addon"><span class="glyphicon glyphicon-remove" onclick="utils.removeFile(this)"></span></span>' +
- '<input type="text" class="form-control" id="file_name" value="' + fileTitle + '">' +
- '<input type="hidden" class="form-control" id="file_path" value="' + fileVal + '">' +
- '</div>';
- },
- removeFile: function (_this) {
- $(_this).parent().parent().remove();
- },
- delOptimizeDataScope: function (_this) {
- $(_this).parent().parent().remove();
- },
- addOptimizeDataScope: function (id) {
- var str = '<tr>' +
- '<td>' +
- '<input style="border-style: none" type="text" value="" class="my-input" name="optimizeDataScopeText">' +
- '</td>' +
- '<td>' +
- '<a href="javascript:;" onclick="utils.addTo()" style="padding-right: 20px">追加</a>' +
- '<a href="javascript:;" onclick="utils.delOptimizeDataScope(this)">删除</a>' +
- '</td>' +
- '</tr>';
- $("#optimizeDataScopeBody" + id).append(str);
- },
- addOptimizeData: function () {
- var checkedScope = [];
- $("#optimizeDataScopeBody tr").find("[name=optimizeDataScopeCheck]:checked").each(function () {
- checkedScope.push($(this).parent().prev().find("input").val())
- });
- utils.addHtml("");
- /* if (checkedScope.length > 0) {
- for (var i = 0; i < checkedScope.length; i++) {
- utils.addHtml(checkedScope[i]);
- }
- } else {
- utils.addHtml("");
- }*/
- },
- addTo: function (text = '') {
- utils.addHtml(text);
- },
- saveOptimizeDataScope: function () {
- var dataList1 = [];
- $("#optimizeDataScopeBody1").find("[name=optimizeDataScopeText]").each(function () {
- var val = $(this).val();
- if (val.length > 0) {
- dataList1.push(val)
- }
- });
- var dataList2 = [];
- $("#optimizeDataScopeBody2").find("[name=optimizeDataScopeText]").each(function () {
- var val = $(this).val();
- if (val.length > 0) {
- dataList2.push(val)
- }
- });
- var dataList3 = [];
- $("#optimizeDataScopeBody3").find("[name=optimizeDataScopeText]").each(function () {
- var val = $(this).val();
- if (val.length > 0) {
- dataList3.push(val)
- }
- });
- var dataList4 = [];
- $("#optimizeDataScopeBody4").find("[name=optimizeDataScopeText]").each(function () {
- var val = $(this).val();
- if (val.length > 0) {
- dataList4.push(val)
- }
- });
- var ajaxConfig = {
- url: '/admin/promote-report-optimize-data-scope-save',
- type: 'post',
- data: {
- dataList1: dataList1,
- dataList2: dataList2,
- dataList3: dataList3,
- dataList4: dataList4,
- }
- };
- tips.ajax(ajaxConfig);
- window.location.reload();
- },
- bindDate: function (that) {
- var routeTime = {
- type: 'date',
- elem: that
- };
- laydate.render(routeTime);
- },
- addHtml: function (text) {
- var str = '<tr>' +
- '<td><input type="text" class="my-input" value="' + text + '"></td>' +
- '<td class="you-del">删除</td>' +
- '</tr>';
- $(".you-table tbody").append(str);
- },
- save: function () {
- var dataList = [];
- $(".you-table tbody").find("input").each(function () {
- var val = $(this).val();
- if (val.length > 0) {
- dataList.push(val)
- }
- });
- var ajaxConfig = {
- url: '/admin/promote-report-save/sites/' + "{{$siteId}}",
- type: 'post',
- data: {
- dataList: dataList
- }
- };
- tips.ajax(ajaxConfig);
- },
- saveSummary: function () {
- var summary = $('#summary').val();
- var ajaxConfig = {
- url: '/admin/promote-report-summary-save/sites/' + "{{$siteId}}",
- type: 'post',
- data: {summary: summary}
- };
- tips.ajax(ajaxConfig);
- },
- contentHtml: function (val) {
- return '<div style="margin-bottom: 5px"><input type="text" value="' + val + '"' +
- ' class="subInput">' +
- '<button class="btn btn-sm" onclick="utils.delContent(this)">删除</button></div>';
- },
- addUrl: function () {
- var str = '<tr>' +
- '<td>' +
- '<input type="text" class="my-input" value="">' +
- '<div style="padding: 10px 0 5px 50px" class="sub-content">' +
- '<div style="margin-bottom: 5px">' +
- '<input type="text" class="subInput" value="(1) 关键词植入">' +
- '<button class="btn btn-sm" onclick="utils.delContent(this)">删除</button>' +
- '</div>' +
- '<div style="margin-bottom: 5px">' +
- '<input type="text" class="subInput" value="(2) 锚文本优化">' +
- '<button class="btn btn-sm" onclick="utils.delContent(this)">删除</button>' +
- '</div>' +
- '<div style="margin-bottom: 5px">' +
- '<input type="text" class="subInput" value="(3) 图片ALT标签优化">' +
- '<button class="btn btn-sm" onclick="utils.delContent(this)">删除</button>' +
- '</div>' +
- '<div style="margin-bottom: 5px">' +
- '<input type="text" class="subInput" value="(4) Summary重写">' +
- '<button class="btn btn-sm" onclick="utils.delContent(this)">删除</button>' +
- '</div>' +
- '</div>' +
- '</td>' +
- '<td style="vertical-align: top">' +
- '<button type="button" class="btn btn-sm" style="margin-right: 5px" onclick="utils.delUrl(this)">' +
- '删除' +
- '</button>' +
- '<button type="button" class="btn btn-sm btn-success" onclick="utils.addContent(this)">添加内容' +
- '</button>' +
- '</td>' +
- '</tr>';
- $(".you-table2 tbody").append(str);
- },
- delUrl: function (_this) {
- $(_this).parent().parent().remove()
- },
- addContent: function (_this) {
- // var textList = [];
- // $("[name=selectCheckbox]:checked").each(function () {
- // textList.push($(this).parent().prev().find("[name=landPageInput]").val());
- // });
- var htmlStr = '';
- // if (textList.length > 0) {
- // for (var i = 0; i < textList.length; i++) {
- // htmlStr = utils.contentHtml(textList[i]);
- // $(_this).parent().prev().find(".sub-content").append(htmlStr)
- // }
- //
- // } else {
- htmlStr = utils.contentHtml('');
- $(_this).parent().prev().find(".sub-content").append(htmlStr)
- // }
- },
- delContent: function (_this) {
- $(_this).parent().remove()
- },
- // addLandPageScope: function () {
- // var str = '<tr>' +
- // '<td><input type="text" class="my-input" name="landPageInput" value=""></td>' +
- // '<td>' +
- // '<input type="checkbox" name="selectCheckbox">' +
- // '<a href="javascript:;" style="margin-left: 5px" onclick="utils.delLandPageScope(this)">删除</a>' +
- // '</td>' +
- // '</tr>';
- // $("#landPageScopeBody").append(str)
- // },
- //
- // delLandPageScope: function (_this) {
- // $(_this).parent().parent().remove()
- // },
- //
- // saveLandPageScope: function () {
- // var dataList = [];
- // $("#landPageScopeBody").find("[name=landPageInput]").each(function () {
- // var val = $(this).val();
- // if (val.length > 0) {
- // dataList.push(val)
- // }
- // });
- // var ajaxConfig = {
- // url: '/admin/promote-report-land-page-scope-save',
- // type: 'post',
- // data: {
- // dataList: dataList
- // }
- // };
- // tips.ajax(ajaxConfig);
- // },
- clearLandPage: function () {
- layer.confirm('是否清空着陆页?', {icon: 3, title: '提示'}, function () {
- var ajaxConfig = {
- url: '/admin/promote-report-land-page-clear/sites/' + "{{$siteId}}",
- type: 'DELETE',
- success: function (result) {
- layer.msg(result.message, {icon: 6, time: 1500}, function () {
- //$("#modifyGatherTBody").html();
- window.location.reload();
- });
- }
- };
- tips.ajax(ajaxConfig);
- });
- },
- landPageSave: function () {
- var dataList = [];
- var errMsg = '';
- $(".you-table2 tbody").find(".my-input").each(function () {
- var val = $(this).val();
- var id = $(this).data('id');
- if (!id) {
- id = 0;
- }
- if (val.length > 0) {
- var subList = [];
- $(this).next().find(".subInput").each(function () {
- var subVal = $(this).val();
- if (subVal.length > 0) {
- subList.push(subVal)
- } else {
- errMsg += '子项不能为空<br>';
- }
- });
- dataList.push({content: val, subList: subList, id: id})
- } else {
- errMsg += '着陆页不能为空<br>';
- }
- });
- if (errMsg !== '') {
- layer.alert(errMsg, {icon: 5});
- return;
- }
- var ajaxConfig = {
- url: '/admin/promote-report-land-page-save/sites/' + "{{$siteId}}",
- type: 'post',
- data: {
- dataList: dataList
- },
- success: function (result) {
- var resultDataList = result.data;
- var html = '';
- for (var i = 0; i < resultDataList.length; i++) {
- var top = '<tr>\n' +
- ' <td>\n' +
- ' <input type="text" class="my-input" value="' + resultDataList[i]['content'] + '" data-id="' + resultDataList[i]['id'] + '">\n' +
- ' <div style="padding: 10px 0 5px 50px" class="sub-content">';
- var subList = resultDataList[i]['sub_list'];
- var sub = '';
- for (var j = 0; j < subList.length; j++) {
- sub += ' <div style="margin-bottom: 5px">\n' +
- ' <input type="text" class="subInput" value="' + subList[j] + '">' +
- ' <button class="btn btn-sm" onclick="utils.delContent(this)">删除\n' +
- ' </button>\n' +
- ' </div>';
- }
- var bottom = ' </div>\n' +
- ' </td>' +
- ' <td style="vertical-align: top">\n' +
- ' <button type="button" class="btn btn-sm" style="margin-right: 5px"\n' +
- ' onclick="utils.delUrl(this)">\n' +
- ' 删除\n' +
- ' </button>\n' +
- ' <button type="button" class="btn btn-sm btn-success" onclick="utils.addContent(this)">添加内容\n' +
- ' </button>\n' +
- ' </td>\n' +
- ' </tr>';
- html += top + sub + bottom
- }
- $("#landPageTBody").html(html);
- layer.msg("操作成功", {icon: 6, time: 1500});
- }
- };
- tips.ajax(ajaxConfig);
- },
- socialSave: function () {
- var facebook = [], twitter = [], linkedIn = [], pin = [], ins = [], youtube = [];
- $("[name=facebook]").each(function () {
- facebook.push($(this).val())
- });
- $("[name=linkedIn]").each(function () {
- linkedIn.push($(this).val())
- });
- $("[name=twitter]").each(function () {
- twitter.push($(this).val())
- });
- $("[name=pin]").each(function () {
- pin.push($(this).val())
- });
- $("[name=ins]").each(function () {
- ins.push($(this).val())
- });
- $("[name=youtube]").each(function () {
- youtube.push($(this).val())
- });
- var ajaxConfig = {
- url: '/admin/promote-report-social-save/sites/' + "{{$siteId}}",
- type: 'post',
- data: {
- facebook: facebook,
- linkedIn: linkedIn,
- twitter: twitter,
- pin: pin,
- ins: ins,
- youtube: youtube,
- facebookHide: $("[name=facebook_hide]").prop('checked') ? 1 : 0,
- linkedInHide: $("[name=linkedIn_hide]").prop('checked') ? 1 : 0,
- twitterHide: $("[name=twitter_hide]").prop('checked') ? 1 : 0,
- pinHide: $("[name=pin_hide]").prop('checked') ? 1 : 0,
- insHide: $("[name=ins_hide]").prop('checked') ? 1 : 0,
- youtubeHide: $("[name=youtube_hide]").prop('youtube_hide') ? 1 : 0,
- }
- };
- tips.ajax(ajaxConfig);
- },
- socialStatistics: function () {
- layer.confirm('是否开始自动统计?', {icon: 3, title: '提示'}, function () {
- var ajaxConfig = {
- url: '/admin/socialStatistics/socialStatistics/' + "{{$siteId}}",
- type: 'get',
- data: {},
- success: function (result) {
- layer.msg(result.message, {icon: 6, time: 1500});
- window.location.reload();
- }
- };
- tips.ajax(ajaxConfig);
- });
- },
- addModifyGather: function () {
- var str = '<tr>' +
- '<td>' +
- '<input type="text" class="my-input" name="content">' +
- '</td>' +
- '<td>' +
- '<input type="text" class="my-input" style="width: 180px" name="date" onclick="utils.bindDate(this)">' +
- '</td>' +
- '<td onclick="utils.delModifyGather(this)">删除</td>' +
- '</tr>';
- $("#modifyGatherTBody").append(str);
- $("[name=date]").trigger("click");
- },
- delModifyGather: function (_this) {
- $(_this).parent().remove();
- },
- clearModifyGather: function () {
- layer.confirm('是否清空汇总?', {icon: 3, title: '提示'}, function () {
- var ajaxConfig = {
- url: '/admin/promote-year-seo-item-clear/sites/' + "{{$siteId}}",
- type: 'DELETE',
- success: function (result) {
- //$("#modifyGatherTBody").html('');
- layer.msg(result.message, {icon: 6, time: 1500});
- window.location.reload();
- }
- };
- tips.ajax(ajaxConfig);
- });
- },
- saveModifyGather: function () {
- var dataList = [];
- $("#modifyGatherTBody tr").each(function () {
- var content = $(this).find("[name=content]").val();
- var id = $(this).find("[name=content]").data('id');
- if (!id) {
- id = 0;
- }
- var date = $(this).find("[name=date]").val();
- if (content && date) {
- dataList.push({
- id: id,
- content: content,
- modify_date: date
- })
- }
- });
- var ajaxConfig = {
- url: '/admin/promote-report-modify-gather-save/sites/' + "{{$siteId}}",
- type: 'post',
- data: {dataList: dataList},
- success: function (result) {
- var resultDataList = result.data;
- var html = '';
- for (var i = 0; i < resultDataList.length; i++) {
- html += '<tr>' +
- '<td>' +
- '<input type="text" class="my-input" name="content" value="' + resultDataList[i]['content'] + '" data-id="' + resultDataList[i]['id'] + '">' +
- '</td>' +
- '<td>' +
- '<input class="my-input" style="width: 180px" name="date" onclick="utils.bindDate(this)" value="' + resultDataList[i]['modify_date'] + '">' +
- '</td>' +
- '<td onclick="utils.delModifyGather(this)">删除</td>' +
- '</tr>';
- }
- $('#modifyGatherTBody').html(html);
- layer.msg("操作成功", {icon: 6, time: 1500});
- }
- };
- tips.ajax(ajaxConfig);
- },
- addSeoItemScope: function () {
- var str = '<tr>' +
- '<td><input type="text" class="my-input" name="seoItemInput" value=""> <input type="hidden" name="seoItemId" value="0">' +
- ' </td>' +
- ' <td>' +
- ' <a href="javascript:;" style="margin-left: 5px" onclick="utils.delSeoItemScope(this)">删除</a>' +
- ' </td>' +
- '</tr>';
- $("#seoItemScopeBody").append(str)
- },
- delSeoItemScope: function (_this) {
- $(_this).parent().parent().remove()
- },
- saveSeoItemScope: function () {
- var dataList = [];
- $("#seoItemScopeBody tr").each(function () {
- var seoItemInput = $(this).find("[name=seoItemInput]").val();
- var seoItemId = $(this).find("[name=seoItemId]").val();
- if (seoItemInput.length > 0) {
- dataList.push({
- content: seoItemInput,
- seoItemId: seoItemId
- })
- }
- });
- var ajaxConfig = {
- url: '/admin/promote-report-seo-item-scope-save',
- type: 'post',
- data: {
- dataList: dataList
- },
- success: function (result) {
- var config = {
- url: "/admin/promote-report-seo-item-scope",
- success: function (result) {
- var resultDataList = result.data;
- var str = '';
- for (var i = 0; i < resultDataList.length; i++) {
- str += '<tr>' +
- '<td><input type="text" class="my-input" name="seoItemInput" value="' + resultDataList[i]['content'] + '"> <input type="hidden" name="seoItemId" value="' + resultDataList[i]['id'] + '">' +
- ' </td>' +
- ' <td>' +
- ' <a href="javascript:;" style="margin-left: 5px" onclick="utils.delSeoItemScope(this)">删除</a>' +
- ' </td>' +
- '</tr>';
- }
- $("#seoItemScopeBody").html(str);
- layer.msg("操作成功", {icon: 6, time: 1500});
- }
- };
- tips.ajax(config)
- }
- };
- tips.ajax(ajaxConfig);
- },
- saveSeo: function () {
- var checkedItems = [];
- $("[name=seo_item]:checked").each(function () {
- checkedItems.push($(this).val())
- });
- console.log(checkedItems);
- var ajaxConfig = {
- url: '/admin/promote-report-seo-item-save/sites/' + "{{$siteId}}",
- type: 'post',
- data: {checked_list: checkedItems}
- };
- tips.ajax(ajaxConfig);
- },
- addPlanScope: function () {
- var str = '<tr>' +
- '<td><input style="border-style: none" type="text" class="my-input" name="planScopeInput" value="">' +
- '</td>' +
- '<td>' +
- '<input type="checkbox" name="planScopeCheckbox">' +
- '<a href="javascript:;" style="margin-left: 5px" onclick="utils.delPlanScope(this)">删除</a>' +
- '</td>' +
- '</tr>';
- $("#planScopeBody").append(str);
- },
- delPlanScope: function (_this) {
- $(_this).parent().parent().remove();
- },
- savePlanScope: function () {
- var dataList = [];
- $("#planScopeBody tr").find("[name=planScopeInput]").each(function () {
- var val = $(this).val();
- if (val.length > 0) {
- dataList.push(val)
- }
- });
- var ajaxConfig = {
- url: '/admin/promote-report-plan-scope-save',
- type: 'post',
- data: {
- dataList: dataList
- }
- };
- tips.ajax(ajaxConfig);
- },
- planHtml: function (val) {
- var str = '<tr><td>' +
- '<textarea name="content" rows="2" class="form-control">' + val + '</textarea>' +
- '</td>' +
- '<td onclick="utils.delPlan(this)">' +
- '删除' +
- '</td></tr>';
- $("#plan").append(str)
- },
- addPlan: function () {
- var scopeList = [];
- $("#planScopeBody tr").find("[name=planScopeCheckbox]:checked").each(function () {
- scopeList.push($(this).parent().prev().find("[name=planScopeInput]").val())
- });
- console.log(scopeList);
- if (scopeList.length > 0) {
- for (var i = 0; i < scopeList.length; i++) {
- utils.planHtml(scopeList[i]);
- }
- } else {
- utils.planHtml("")
- }
- },
- delPlan: function (_this) {
- $(_this).parent().remove()
- },
- savePlan: function () {
- var dataList = [];
- $("#plan tr").each(function () {
- var content = $(this).find("[name=content]").val();
- if (content) {
- dataList.push({
- content: content
- })
- }
- });
- var ajaxConfig = {
- url: '/admin/promote-report-plan-save/sites/' + "{{$siteId}}",
- type: 'post',
- data: {
- dataList: dataList,
- file_name: $("#file_name").val(),
- file_path: $("#file_path").val()
- }
- };
- tips.ajax(ajaxConfig);
- },
- promoteReport: function () {
- window.open('https://rank.yinqingli.cn/pr/report?projectId=' + "{{base64_encode($oldId)}}");
- },
- promoteAfresh: function () {
- window.open('https://rank.yinqingli.cn/pr/report?noCache=1&projectId=' + "{{base64_encode($oldId)}}");
- },
- clearLastMonthData: function () {
- var ajaxConfig = {
- url: '/admin/site/clearLastMonthData/{{$siteId}}',
- type: 'get',
- success: function () {
- layer.msg('操作成功', {
- icon: 1,
- time: 1500 //2秒关闭(如果不配置,默认是3秒)
- }, function () {
- window.location.reload()
- });
- }
- };
- tips.ajax(ajaxConfig);
- },
- pushReport: function () {
- var ajaxConfig = {
- url: '/admin/site/pushMessage/{{$siteId}}',
- type: 'get',
- success: function () {
- layer.msg('操作成功', {
- icon: 1,
- time: 1500 //2秒关闭(如果不配置,默认是3秒)
- }, function () {
- window.location.reload()
- });
- }
- };
- tips.ajax(ajaxConfig);
- },
- pushMessage: function () {
- var mobile = $('#mobile').val();
- layer.confirm('确定推送吗?', {icon: 3, title: '推送短信'}, function (index, layero) {
- layer.close(index);
- tips.ajax({
- url: '/admin/articles/push-mobile-message',
- type: 'put',
- data: {mobile: mobile, type: 2,siteId:'{{$siteId}}'},
- tableRefresh: '#table'
- });
- });
- },
- };
- $(".nav-tabs>li").click(function () {
- var index = $(this).index();
- $(this).addClass("active");
- $(this).siblings().removeClass("active");
- $(".ul-content>li").eq(index).addClass("active").siblings().removeClass("active")
- });
- $(document).on('click', '.you-del', function () {
- $(this).parent().remove();
- });
- </script>
- @endsection
|