feat: 修改网点api地址以及回填内容

This commit is contained in:
2026-07-14 14:22:03 +08:00
parent f065197d75
commit 74a4f25ebd
3 changed files with 46 additions and 9 deletions
+9 -6
View File
@@ -13,7 +13,7 @@
<view class="store-cent-left">
<view class="store-name">{{ item.name }}</view>
<view class="store-address line1">
{{ item.areaName }}{{ ', ' + item.detailAddress }}
{{ item.district }}{{ ', ' + item.description }}
</view>
</view>
<view class="row-right ss-flex-col ss-col-center">
@@ -55,7 +55,7 @@
</template>
<script setup>
import DeliveryApi from '@/sheep/api/trade/delivery';
import StoreApi from '@/sheep/api/trade/store';
import { onMounted, reactive } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import sheep from '@/sheep';
@@ -119,7 +119,7 @@
latitude: Number(e.latitude),
longitude: Number(e.longitude),
name: e.name,
address: `${e.areaName}-${e.detailAddress}`,
address: `${e.district}-${e.description}`,
});
} else {
// #endif
@@ -127,7 +127,7 @@
latitude: Number(e.latitude),
longitude: Number(e.longitude),
name: e.name,
address: `${e.areaName}-${e.detailAddress}`,
address: `${e.district}-${e.description}`,
success: function () {
console.log('success');
},
@@ -154,16 +154,19 @@
if (state.loading || state.loaded) {
return;
}
const hasLocation = !!(state.user_latitude && state.user_longitude);
state.loading = true;
const { data, code } = await DeliveryApi.getDeliveryPickUpStoreList({
const { data, code } = await StoreApi.getStoreListByLocation({
latitude: state.user_latitude,
longitude: state.user_longitude,
});
if (code !== 0) {
state.loading = false;
return;
}
state.loading = false;
state.storeList = data;
state.loaded = hasLocation;
state.storeList = Array.isArray(data) ? data : [];
};
onMounted(() => {