123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- @extends('admin/layout')
- @section('header')
- <link href="{{asset('css/plugins/switchery/switchery.css')}}" rel="stylesheet">
- @endsection
- @section('content')
- <body class="gray-bg">
- <div class="wrapper wrapper-content animated fadeInRight">
- <iframe
- src="https://rank.yinqingli.cn/report/keyword/id--{{md5($site->old_id??0)}}--sortby--google_rank--is_customer--1.html"
- frameborder="0" width="100%" height="800px">
- </iframe>
- </div>
- </body>
- @endsection
- @section('footer')
- <script src="{{asset('js/plugins/switchery/switchery.js')}}"></script>
- <script>
- var jsSwitch = document.querySelector(".js-switch");
- new Switchery(jsSwitch, {color: "#1AB394", size: 'small'});
- var openIndex;
- var units = {
- import: function () {
- var str = '<div class="ibox-content" id="importLayer">' +
- '<form class="form-horizontal">' +
- '<div class="form-group">' +
- '<label class="col-sm-3 control-label">请选择excel文件:</label>' +
- '<div class="col-sm-6">' +
- '<input type="file" id="excel_file" class="form-control">' +
- '<input type="hidden" id="excel_path">' +
- '</div>' +
- '<div class="col-sm-2"><button class="btn btn-info" type="button" onclick="units.fileUpload()">上传</button></div>' +
- '</div>' +
- ' <div class="form-group">' +
- '<div class="col-sm-6 col-sm-offset-3">' +
- '<a href="{{asset('keyword.xlsx')}}">请下载导入模板</a>' +
- '</div>' +
- '</div>' +
- '</form>' +
- '</div>';
- openIndex = layer.open({
- type: 1,
- content: str,
- area: ['60%', '30%'],
- // btn: ['导入', '取消'],
- title: '导入关键词',
- yes: function (index, layero) {
- {{--var data = {excel_path: $("#excel_path").val(), siteId: "{{$siteId}}"};--}}
- {{--var config = {--}}
- {{--url: '/admin/rank/keyword/import',--}}
- {{--type: 'post',--}}
- {{--data: data,--}}
- {{--success: function (result) {--}}
- {{--layer.msg(result.message, {icon: 6, time: 1500}, function () {--}}
- {{--layer.close(openIndex);--}}
- {{--});--}}
- {{--}--}}
- {{--};--}}
- {{--tips.ajax(config);--}}
- }
- });
- },
- fileUpload: function () {
- var config = {
- url: '/admin/tool/excel-upload'
- };
- config.success = function (result) {
- // $("#excel_path").val(result.data.file_url);
- // layer.msg(result.message, {icon: 6, time: 1500});
- var data = {excel_path: result.data.file_url, siteId: "{{$siteId}}"};
- var config = {
- url: '/admin/rank/keyword/import',
- type: 'post',
- data: data,
- success: function (result) {
- layer.msg(result.message, {icon: 6, time: 1500}, function () {
- layer.close(openIndex);
- window.location.reload();
- });
- }
- };
- tips.ajax(config);
- };
- tips.fileUpload($("#excel_file"), config);
- },
- add: function () {
- layer.open({
- type: 2,
- content: ['/admin/rank/site/{{$siteId}}/keyword-save'],
- area: ['80%', '90%'],
- title: '添加关键词'
- });
- },
- clear: function () {
- layer.confirm('您确定要清空全部关键词吗?', {icon: 3, title: '清空'}, function () {
- var config = {
- url: '/admin/rank/site/{{$siteId}}/keyword/all',
- type: 'delete'
- };
- tips.ajax(config);
- });
- },
- save: function () {
- var config = {
- type: 'put',
- url: '/admin/rank/allow-rank/{{$site->old_id??0}}',
- data: {isAllow: jsSwitch.checked ? 1 : 0, number: $("#cloud_type").val()}
- };
- tips.ajax(config);
- }
- {{--allowRank: function (_this) {--}}
- {{--if (_this.checked) {--}}
- {{--}--}}
- {{--var config = {--}}
- {{--type: 'put',--}}
- {{--url: '/admin/rank/allow-rank/{{$site->old_id??0}}',--}}
- {{--data: {isAllow: _this.checked ? 1 : 0}--}}
- {{--};--}}
- {{--tips.ajax(config);--}}
- {{--}--}}
- };
- </script>
- @endsection
|