|
@@ -45,6 +45,7 @@
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
import { useI18n } from '/@/hooks/web/useI18n';
|
|
|
import { useUserStore } from '/@/store/modules/user';
|
|
|
+ import { data as CascaderData, getCode } from '/@/utils/cascaderData';
|
|
|
|
|
|
import {
|
|
|
brandTypeListApi,
|
|
@@ -56,7 +57,6 @@
|
|
|
brandUpdateApi,
|
|
|
// LiveSceneDeleteApi,
|
|
|
} from '/@/api/scene/live';
|
|
|
- import { data as CascaderData } from '/@/utils/cascaderData';
|
|
|
|
|
|
import { useScript } from '/@/hooks/web/useScript';
|
|
|
const A_MAP_URL = 'https://webapi.amap.com/maps?v=2.0&key=e661b00bdf2c44cccf71ef6070ef41b8';
|
|
@@ -115,7 +115,7 @@
|
|
|
// address: '权晖花园21栋',
|
|
|
lng: 120.262337,
|
|
|
lat: 30.178285,
|
|
|
- location: ['33', '3301', '330109'],
|
|
|
+ location: ['浙江省', '杭州市', '滨江区'],
|
|
|
province: '浙江省',
|
|
|
city: '杭州市',
|
|
|
district: '萧山区',
|
|
@@ -231,8 +231,9 @@
|
|
|
isLeaf: (record) => {
|
|
|
return !(record.levelType < 3);
|
|
|
},
|
|
|
- onChange: (data) => {
|
|
|
+ onChange: (data, a, b, c, d, e, f) => {
|
|
|
try {
|
|
|
+ console.log('data', data, 'a,b,c', a, b, c, d, e, f);
|
|
|
let location: string[] = data;
|
|
|
// [a,b,c].map(ele => {
|
|
|
// return ele && ele.code
|
|
@@ -490,15 +491,14 @@
|
|
|
const getTitle = computed(() => (!unref(isUpdate) ? '新增直播间' : '编辑直播间'));
|
|
|
|
|
|
async function handleMapSearch() {
|
|
|
+ console.log('detailAddr', detailAddr.value, defaultAddress);
|
|
|
if (detailAddr.value?.length > 0) {
|
|
|
+ let searchCity = getCode(defaultAddress.location);
|
|
|
const AMap = (window as any).AMap;
|
|
|
AMap.plugin('AMap.Geocoder', function () {
|
|
|
const geocoder = new AMap.Geocoder({
|
|
|
// city 指定进行编码查询的城市,支持传入城市名、adcode 和 citycode
|
|
|
- city:
|
|
|
- defaultAddress.location[2] ||
|
|
|
- defaultAddress.location[1] ||
|
|
|
- defaultAddress.location[0],
|
|
|
+ city: searchCity[2] || searchCity[1] || searchCity[0],
|
|
|
// adcode: defaultAddress.location[2],
|
|
|
// citycode: '0571',
|
|
|
});
|