mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-12-02 20:10:30 +08:00
应用开发
This commit is contained in:
parent
fa409ffebb
commit
ffd81783b3
@ -50,6 +50,7 @@
|
|||||||
var __default_theme__ = '{{$default_theme}}';
|
var __default_theme__ = '{{$default_theme}}';
|
||||||
var __modal_login_url__ = '{{:Url("index/user/modallogininfo")}}';
|
var __modal_login_url__ = '{{:Url("index/user/modallogininfo")}}';
|
||||||
var __attachment_host__ = '{{$attachment_host}}';
|
var __attachment_host__ = '{{$attachment_host}}';
|
||||||
|
var __seo_url_suffix__ = '{{:MyC("home_seo_url_html_suffix", "html", true)}}';
|
||||||
var __user_id__ = {{if empty($user['id'])}}0{{else /}}{{$user.id}}{{/if}};
|
var __user_id__ = {{if empty($user['id'])}}0{{else /}}{{$user.id}}{{/if}};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -265,7 +265,16 @@ class Pets extends Controller
|
|||||||
$this->assign('is_footer', 0);
|
$this->assign('is_footer', 0);
|
||||||
|
|
||||||
// 参数
|
// 参数
|
||||||
$this->assign('params', input());
|
$params = input();
|
||||||
|
if(!empty($params['lng']))
|
||||||
|
{
|
||||||
|
$params['lng'] = base64_decode($params['lng']);
|
||||||
|
}
|
||||||
|
if(!empty($params['lat']))
|
||||||
|
{
|
||||||
|
$params['lat'] = base64_decode($params['lat']);
|
||||||
|
}
|
||||||
|
$this->assign('params', $params);
|
||||||
return $this->fetch('../../../plugins/view/petscms/pets/helpmap');
|
return $this->fetch('../../../plugins/view/petscms/pets/helpmap');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{{include file="public/header" /}}
|
{{include file="public/header" /}}
|
||||||
|
|
||||||
{{if !empty($params['lng']) and !empty($params['lat']) and $params['lng'] gt 0 and $params['lat'] gt 0}}
|
{{if !empty($params['lng']) and !empty($params['lat']) and $params['lng'] gt 0 and $params['lat'] gt 0}}
|
||||||
<div id="help-map" style="width: 100%; height: 100vh;"></div>
|
<div id="help-map"></div>
|
||||||
{{else /}}
|
{{else /}}
|
||||||
<div class="table-no"><i class="am-icon-warning"></i> 参数有误</div>
|
<div class="table-no"><i class="am-icon-warning"></i> 参数有误</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
@ -17,7 +17,7 @@
|
|||||||
{
|
{
|
||||||
// 丢失地址-地图展示
|
// 丢失地址-地图展示
|
||||||
var map = new BMap.Map("help-map", {enableMapClick:false});
|
var map = new BMap.Map("help-map", {enableMapClick:false});
|
||||||
var level = $('#help-map').data('level') || 16;
|
var level = 17;
|
||||||
var point = new BMap.Point({{$params['lng']}}, {{$params['lat']}});
|
var point = new BMap.Point({{$params['lng']}}, {{$params['lat']}});
|
||||||
map.centerAndZoom(point, level);
|
map.centerAndZoom(point, level);
|
||||||
|
|
||||||
|
@ -73,6 +73,7 @@ form.form-validation #map {
|
|||||||
/**
|
/**
|
||||||
* 帮助页面
|
* 帮助页面
|
||||||
*/
|
*/
|
||||||
.pets-help #help-map {
|
#help-map {
|
||||||
height: 80vh;
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
}
|
}
|
@ -7,7 +7,8 @@ $(function()
|
|||||||
var lat = parseFloat($(this).data('lat'));
|
var lat = parseFloat($(this).data('lat'));
|
||||||
if(lng > 0 && lat > 0)
|
if(lng > 0 && lat > 0)
|
||||||
{
|
{
|
||||||
var url = UrlFieldReplace('lat', lat, UrlFieldReplace('lng', lng, $('.pets-help').data('url')));
|
// 数据base64避免特殊字符
|
||||||
|
var url = UrlFieldReplace('lat', window.btoa(lat), UrlFieldReplace('lng', window.btoa(lng), $('.pets-help').data('url')));
|
||||||
ModalLoad(url, '地图', 'plugins-petscms-popup-modal-help');
|
ModalLoad(url, '地图', 'plugins-petscms-popup-modal-help');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user