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
+3 -3
View File
@@ -10,7 +10,7 @@
/>
<view
class="item font-color"
:class="[state.deliveryType === '2' ? 'on' : 'on2', props.theme == '2' ? 'c0' : '']"
:class="[state.deliveryType === 2 ? 'on' : 'on2', props.theme == '2' ? 'c0' : '']"
@tap="switchDeliveryType(2)"
v-if="state.isPickUp"
/>
@@ -53,7 +53,7 @@
<!-- 情况二:门店的选择 -->
<view
class="address flex flex-wrap flex-center ss-row-between"
v-if="state.deliveryType === '2'"
v-if="state.deliveryType === 2"
@tap="onSelectAddress"
:class="{ 'bg24 c0': props.theme == '2' }"
>
@@ -63,7 +63,7 @@
<text class="phone">{{ state.pickUpInfo.phone }}</text>
</view>
<view class="line1">
{{ state.pickUpInfo.areaName }}{{ ', ' + state.pickUpInfo.detailAddress }}
{{ state.pickUpInfo.district }}{{ ', ' + state.pickUpInfo.description }}
</view>
</view>
<view class="addressCon" v-else>
+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(() => {