diff --git a/manifest.json b/manifest.json index 8cdda79..f645895 100644 --- a/manifest.json +++ b/manifest.json @@ -71,13 +71,13 @@ "amap" : { "__platform__" : [ "ios", "android" ], "appkey_ios" : "0b9be2631525ee5e218ac26d333f215c", - "appkey_android" : "39854b629c421d511a0697f2ae3b18f6" + "appkey_android" : "9d1e62050f8558a082f7aa3ad5bb3c68" } }, "maps" : { "amap" : { "appkey_ios" : "0b9be2631525ee5e218ac26d333f215c", - "appkey_android" : "39854b629c421d511a0697f2ae3b18f6" + "appkey_android" : "9d1e62050f8558a082f7aa3ad5bb3c68" } }, "ad" : {}, @@ -223,6 +223,15 @@ } } } + }, + "sdkConfigs" : { + "maps" : { + "amap" : { + "key" : "6033c97e67bf2e9ceac306e1a3fa35f8", + "securityJsCode" : "0547b69252ef0ed14e11f5c4ac152f07", + "serviceHost" : "" + } + } } }, "mp-alipay" : { diff --git a/pages/shopSetUp/index.vue b/pages/shopSetUp/index.vue index afca7b0..b1567ca 100644 --- a/pages/shopSetUp/index.vue +++ b/pages/shopSetUp/index.vue @@ -28,10 +28,10 @@ 门店详细地址 {{ vdata.shopInfo.address }} - + 允许打包 @@ -122,7 +122,10 @@ import { forIn } from 'lodash'; const uploadImg = ref() const phone = ref(null) const vdata = reactive({ - shopInfo: {}, + shopInfo: { + status: 2, + isUseVip: 0, + }, extendList: [], registerTypeList: [ {name: "先付费", value: "munchies"}, @@ -142,6 +145,7 @@ const vdata = reactive({ }) onMounted(() => { shopExtend(); + }) onShow(() => { @@ -304,11 +308,10 @@ let switchChange = ( type ) => { id : vdata.shopInfo.id, } switch ( type ){ - case "isUseVip": + case "address": params.lng = vdata.shopInfo.lng; params.lat = vdata.shopInfo.lat; params.address = vdata.shopInfo.address; - params.isUseVip = vdata.shopInfo.isUseVip; break; case "status": params.status = vdata.shopInfo.status; @@ -341,15 +344,26 @@ let switchChange = ( type ) => { */ let showMap = () => { // 本地 测试选择 - // return test(); - // 打开地图 && 获取省市县 - uni.chooseLocation().then((res) => { - console.log(res); - vdata.shopInfo.lng = res.longitude.toFixed(6); // IOS 小程序中: 经纬度12位。 - vdata.shopInfo.lat = res.latitude.toFixed(6); - vdata.shopInfo.address = res.name; - switchChange('address') - }); + // 打开地图 + + uni.chooseLocation({ + // type: 'wgs84', + success: function (res) { + + vdata.shopInfo.lng = res.longitude.toFixed(6); // IOS 小程序中: 经纬度12位。 + vdata.shopInfo.lat = res.latitude.toFixed(6); + vdata.shopInfo.address = res.name; + switchChange('address') + }, + fail: function(err) { + uni.showToast({ + title:err, + icon:'error' + }) + } + }) + + } @@ -372,6 +386,8 @@ let showMap = () => { color: #333333; display: flex; align-items: center; + flex-shrink: 0; + margin-right: 20rpx; .tableFee { width: 186rpx; height: 54rpx;