提交 331e5b04 作者: 龚洪江

Merge branch 'develop'

#请求接口地址
VITE_REQUEST_BASE_URL='https://www.iuav.shop'
#VITE_REQUEST_BASE_URL='https://test.iuav.shop'
#VITE_REQUEST_BASE_URL='https://www.iuav.shop'
VITE_REQUEST_BASE_URL='https://test.iuav.shop'
#VITE_REQUEST_BASE_URL='/api'
#旧版接口地址
#VITE_REQUEST_BASE_URL='https://iuav.mmcuav.cn'
......
......@@ -11,7 +11,7 @@
<script type="module" src="/src/main.tsx"></script>
<script type="text/javascript" >
window._AMapSecurityConfig = {
securityJsCode:'e3e2af73906d447a776b1d5b59e9a046',
securityJsCode:'a5ef394db56bcb1c188a8abd11b2ac0c',
}
</script>
</body>
......
......@@ -14,4 +14,4 @@ patches:
images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin
newTag: 843987a0ad1fd382895fe3cccbd37490f1b36f28
newTag: 076c71a473e24a5f127df294af6ea3eb20b5858c
......@@ -2,6 +2,7 @@
// @ts-nocheck
import AMapLoader from '@amap/amap-jsapi-loader';
import { Component } from 'react';
import { message } from 'antd';
interface MapComponentProps {
onSelectAddress: (e: {
......@@ -45,7 +46,7 @@ class MapComponent extends Component<MapComponentProps> {
// dom渲染成功后进行map对象的创建
componentDidMount() {
AMapLoader.load({
key: '5d75700ddef48d1c3d2de349e3dd260c', // 申请好的Web端开发者Key,首次调用 load 时必填
key: 'd06295f39703d4e8e795cd979c3bd3a1', // 申请好的Web端开发者Key,首次调用 load 时必填
version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
plugins: [], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
})
......@@ -114,7 +115,9 @@ class MapComponent extends Component<MapComponentProps> {
onSearch(keyword: string) {
// 根据关键字进行搜索
this.autoComplete.search(keyword, (status, result) => {
console.log('搜索结果-->', result);
if (result === 'USER_DAILY_QUERY_OVER_LIMIT') {
return message.warning('今日搜索次数已达上限');
}
// 搜索成功时,result即是对应的匹配数据
if (status === 'complete' && result.info === 'OK') {
this.props.onSearchAddress(result.tips);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论