| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- @extends('layouts.base')
- @section('title', trans('基础设置'))
- @section('content')
- <div class="w1200 m0a">
- <div class="rightlist">
- <form action="" method="post" class="form-horizontal" id="form1">
- <div class="panel panel-info">
- <div class="panel panel-default">
- <div class="panel-body">
- <div class="tab-content">
- <div class="tab-pane active" id="tab_baseset">
- <div class="panel-heading">基础设置</div>
- <div class="panel-body">
- <div class="form-group">
- <label class="col-xs-12 col-sm-3 col-md-2 control-label">开启插件</label>
- <div class="col-sm-2 col-xs-6">
- <input class="mui-switch mui-switch-animbg" id="fight_groups_success_message" type="checkbox" @if($set['is_open'] == 1) checked @endif onclick="message_default()"/>
- </div>
- </div>
- <div>
- <label class="col-xs-12 col-sm-3 col-md-2 control-label">新旧域名替换</label>
- <input type="text" autocomplete="off" id="oldurl" placeholder="请输入旧域名 不加http://或https://" class="el-input__inner" style="width:30rem;margin-right: 1rem;">
- <input type="text" autocomplete="off" id="newurl" placeholder="请输入新域名 不加http://或https://" class="el-input__inner" style="width: 30rem;margin-right: 1rem;">
- <button type="button" class="el-button el-button--primary" onclick="urlReplace()"><span>替换</span></button>
- <span data-boldtype="0" style="font-family:SourceHanSansSC; font-weight:400; font-size:14px; color:rgb(194, 194, 194); font-style:normal; letter-spacing:0px; margin-top: 5px; line-height:21px; text-decoration:none;margin-left: 8rem;display: flex">已联系客服更换域名后,若装修图片丢失,请在此处进行新旧域名更换。注意:未更换域名谨慎操作!!!</span>
- </div>
- <div id="ckt_set" style="margin-top: 10px">
- <div>
- <label class="col-xs-12 col-sm-3 col-md-2 control-label">图片智能设计设置</label>
- <input type="text" placeholder="请输入YQappId" class="el-input__inner" name="ckt[yun_app_id]" value="{{ $set['yun_app_id'] }}" style="width: 50%;margin-top: 10px;">
- </div>
- <div>
- <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
- <input type="text" placeholder="请输入YQsecret" class="el-input__inner" name="ckt[yun_app_secret]" value="{{ $set['yun_app_secret'] }}" style="width: 50%;margin-top: 10px;">
- </div>
- <div>
- <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
- <input type="text" placeholder="请输入appId" class="el-input__inner" name="ckt[app_id]" value="{{ $set['app_id'] }}" style="width: 50%;margin-top: 10px;">
- </div>
- <div>
- <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
- <input type="text" placeholder="请输入user_flag" class="el-input__inner" name="ckt[user_flag]" value="{{ $set['user_flag'] }}" style="width: 50%;margin-top: 10px;">
- <button type="button" class="el-button el-button--primary" onclick="cktSet()"><span>提交</span></button>
- </div>
- <span data-boldtype="0" style="font-family:SourceHanSansSC; font-weight:400; font-size:14px; color:rgb(194, 194, 194); font-style:normal; letter-spacing:0px; line-height:21px; text-decoration:none;margin-left: 8rem;display: flex">每一个企业ID可获得版权授权,请勿将账号转借给其他企业使用,请确认您使用的是否为本公司授权的企业ID,如不是将涉及侵权并承担法律责任。授权请联系客服!</span>
- <div>
- <span data-boldtype="0" style="font-family:SourceHanSansSC; font-weight:400; font-size:14px; color:rgb(194, 194, 194); font-style:normal; letter-spacing:0px; line-height:21px; text-decoration:none;margin-left: 8rem;display: flex">到期时间:{{$set['yun_form']['expireDate']}}</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </form>
- </div>
- </div>
- <script type="text/javascript">
- $('.js-clip').each(function () {
- util.clip(this, $(this).attr('data-url'));
- });
- </script>
- <script>
- function message_default()
- {
- var url_open = "{!! yzWebUrl('plugin.decorate.admin.decorate-set.open') !!}"
- if ($('#fight_groups_success_message').is(':checked'))
- {
- //开
- $.post(url_open,'is_open=1',function(data){
- if (data.result == 1) {
- showPopover($('#fight_groups_success_message'),"开启成功")
- } else {
- showPopover($('#fight_groups_success_message'),"开启失败")
- $('#fight_groups_success_message').attr("checked",false);
- }
- }, "json");
- } else {
- //关
- $.post(url_open,'is_open=2',function(data){
- showPopover($('#fight_groups_success_message'),"关闭成功")
- }, "json");
- }
- }
- function urlReplace()
- {
- var newUrl = $('#newurl').val();
- var oldUrl = $('#oldurl').val();
- var url = "{!! yzWebUrl('plugin.decorate.admin.decorate-set.url-replace') !!}"
- $.post(url,'oldDomain='+oldUrl+'&newDomain='+newUrl,function(data){
- // if (data.result == 1) {
- alert(data.msg);
- // } else {
- // alert('');
- // }
- }, "json");
- }
- function cktSet() {
- let modal = $('#ckt_set');
- data = {
- "yun_app_id": modal.find(':input[name="ckt[yun_app_id]"]').val(),
- "yun_app_secret": modal.find(':input[name="ckt[yun_app_secret]"]').val(),
- "app_id": modal.find(':input[name="ckt[app_id]"]').val(),
- "user_flag": modal.find(':input[name="ckt[user_flag]"]').val(),
- };
- post_data = {
- "ckt": data,
- };
- $.ajax({
- type: 'POST',
- url: "{!! yzWebUrl('plugin.decorate.admin.decorate-set.cktSet') !!}",
- data: post_data,
- success: function(result) {
- if (result['result'] == 1) {
- alert(result['msg']);
- window.location = location;
- } else {
- alert(result['msg']);
- }
- }
- });
- }
- function showPopover(target, msg) {
- target.attr("data-original-title", msg);
- $('[data-toggle="tooltip"]').tooltip();
- target.tooltip('show');
- target.focus();
- //2秒后消失提示框
- setTimeout(function () {
- target.attr("data-original-title", "");
- target.tooltip('hide');
- }, 2000
- );
- }
- </script>
- @endsection
|