应用开发

This commit is contained in:
devil_gong 2019-04-16 15:57:17 +08:00
parent fa409ffebb
commit ffd81783b3
5 changed files with 18 additions and 6 deletions

View File

@ -50,6 +50,7 @@
var __default_theme__ = '{{$default_theme}}';
var __modal_login_url__ = '{{:Url("index/user/modallogininfo")}}';
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}};
</script>

View File

@ -265,7 +265,16 @@ class Pets extends Controller
$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');
}
}

View File

@ -1,7 +1,7 @@
{{include file="public/header" /}}
{{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 /}}
<div class="table-no"><i class="am-icon-warning"></i> 参数有误</div>
{{/if}}
@ -17,7 +17,7 @@
{
// 丢失地址-地图展示
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']}});
map.centerAndZoom(point, level);

View File

@ -73,6 +73,7 @@ form.form-validation #map {
/**
* 帮助页面
*/
.pets-help #help-map {
height: 80vh;
#help-map {
width: 100%;
height: 100vh;
}

View File

@ -7,7 +7,8 @@ $(function()
var lat = parseFloat($(this).data('lat'));
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');
}
});