sth
This commit is contained in:
parent
78623550ba
commit
b27654d765
|
|
@ -57,9 +57,14 @@ class Worker extends Backend
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//设置过滤方法
|
//设置过滤方法
|
||||||
$this->request->filter(['strip_tags', 'trim']);
|
$this->request->filter(['strip_tags', 'trim']);
|
||||||
if (false === $this->request->isAjax()) {
|
if (false === $this->request->isAjax()) {
|
||||||
|
$appkey = config('map.baidu_app_key');
|
||||||
|
$this->assign('mapkey',$appkey);
|
||||||
return $this->view->fetch();
|
return $this->view->fetch();
|
||||||
}
|
}
|
||||||
//如果发送的来源是 Selectpage,则转发到 Selectpage
|
//如果发送的来源是 Selectpage,则转发到 Selectpage
|
||||||
|
|
|
||||||
|
|
@ -255,7 +255,7 @@
|
||||||
<script>
|
<script>
|
||||||
window.initMap = function () {
|
window.initMap = function () {
|
||||||
const map = new BMapGL.Map("bar-chart");
|
const map = new BMapGL.Map("bar-chart");
|
||||||
map.centerAndZoom(new BMapGL.Point(104.0665, 30.5728), 7);
|
map.centerAndZoom(new BMapGL.Point(104.0665, 30.5728), 6);
|
||||||
map.enableScrollWheelZoom(true);
|
map.enableScrollWheelZoom(true);
|
||||||
|
|
||||||
map.addEventListener('tilesloaded', function () {
|
map.addEventListener('tilesloaded', function () {
|
||||||
|
|
@ -332,5 +332,5 @@
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak=UQjHtbQQoDQRpAE5QLGFvC8exM6rcu69&callback=initMap"></script>
|
<script src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak={$mapkey}&callback=initMap"></script>
|
||||||
|
|
||||||
|
|
|
||||||
5
application/extra/map.php
Normal file
5
application/extra/map.php
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'baidu_app_key' => 'UQjHtbQQoDQRpAE5QLGFvC8exM6rcu69'
|
||||||
|
];
|
||||||
Loading…
Reference in New Issue
Block a user