Skip to content

Commit

Permalink
Merge pull request #18 from mxihan/master
Browse files Browse the repository at this point in the history
客服系统单独分开,在config.php统一设定
  • Loading branch information
NimaQu authored Apr 1, 2018
2 parents 4dc82cd + 02123fc commit 3998ae7
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 75 deletions.
4 changes: 3 additions & 1 deletion app/Services/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ public static function getPublicConfig()
"enable_analytics_code" => self::get("enable_analytics_code"),
"enable_donate" => self::get("enable_donate"),
"enable_telegram" => self::get("enable_telegram"),
"payment_system" => self::get("payment_system")
"payment_system" => self::get("payment_system"),
"enable_crisp" => self::get("enable_crisp"),
"crisp_id" => self::get("crisp_id")
];
}

Expand Down
5 changes: 5 additions & 0 deletions config/.config.php.example
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,11 @@ $System_Config['sendgrid_key'] = '';
$System_Config['sendgrid_sender'] = '';


#客服系统
$System_Config['enable_crisp']='false';
$System_Config['crisp_id']='null';


#支付系统

#取值 codepay,doiampay,paymentwall,zfbjk,spay,f2fpay,yftpay,none
Expand Down
1 change: 1 addition & 0 deletions resources/views/material/crisp.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<literal><script type="text/javascript"> window.$crisp=[];window.CRISP_WEBSITE_ID="{$config["crisp_id"]}";(function(){ d=document;s=d.createElement("script"); s.src="https://client.crisp.chat/l.js"; s.async=1;d.getElementsByTagName("head")[0].appendChild(s);})(); </script></literal>
16 changes: 9 additions & 7 deletions resources/views/material/header.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
<link href="/theme/material/css/base.min.css" rel="stylesheet">
<link href="/theme/material/css/project.min.css" rel="stylesheet">
<link href="/theme/material/css/icon.css" rel="stylesheet">

<!-- favicon -->
<!-- ... -->
</head>
<style>
.divcss5{ position:fixed; bottom:0;}
</style>
<style>
.divcss5{ position:fixed; bottom:0;}
</style>
<body class="page-brand">
<header class="header header-transparent header-waterfall ui-header">
<ul class="nav nav-list pull-left">
Expand All @@ -26,7 +26,7 @@
</a>
</li>
</ul>
<ul class="nav nav-list pull-right">
<li class="dropdown margin-right">
<a class="dropdown-toggle padding-left-no padding-right-no" data-toggle="dropdown">
Expand Down Expand Up @@ -57,7 +57,7 @@
</li>
</ul>
{/if}
</li>
</ul>
</header>
Expand All @@ -84,7 +84,7 @@
<li>
<a href="/password/reset"><i class="icon icon-lg">security</i>&nbsp;重置密码</a>
</li>
<li>
<div class="divcss5">
<img src="/images/Ambassador-menu.png" width="230" height="300"/>
Expand All @@ -95,3 +95,5 @@
</div>
</div>
</nav>
{if $config["enable_crisp"] == 'true'}{include file='crisp.tpl'}{/if}
Loading

0 comments on commit 3998ae7

Please sign in to comment.