修改首页样式 && 增加领券传城市信息

This commit is contained in:
lcc
2025-07-30 11:01:16 +08:00
parent aab9f8a9c2
commit 8dc6e80526
3 changed files with 9 additions and 7 deletions
+3 -1
View File
@@ -75,6 +75,7 @@ const props = defineProps({
showPop: { type: Boolean, default: false }, // 控制弹窗的显示和隐藏
coupons: { type: Object, default: () => ({}) }, // 补贴信息
detail: { type: Object, default: () => ({}) }, // 补贴信息
cityInfo: { type: Object, default: () => ({})}, // 城市信息
})
// Ensure slot 'value' is called inside template/render function
const mobile = ref('');
@@ -165,7 +166,8 @@ const bindPostCoupon = async () => {
const result = await api.post('/auto/car/coupon', {
mobile: mobile.value,
code: code.value,
couponId: props.coupons.coupon_id
couponId: props.coupons.coupon_id,
cityId: props.cityInfo.cityId
});
if (result.code === 200) {
+3 -3
View File
@@ -43,7 +43,7 @@
<div>
<ul class="fn-flex fn-flex-wrap">
<li
class="ulib-r10 pl20 pr20 pt10 pb10 mr30 mt15 font-24"
class="ulib-r10 pl15 pr15 pt10 pb10 mt15 font-24"
v-for="(item,index) in carProductLabel"
:key="index"
@click.stop="bindChangeTagList(index,'carProductLabel')"
@@ -56,7 +56,7 @@
<div>
<ul class="fn-flex fn-flex-wrap">
<li
class="ulib-r10 pl20 pr20 pt10 pb10 mr30 mt15 font-24"
class="ulib-r10 pl15 pr15 pt10 pb10 mt15 font-24"
v-for="(item,index) in priceRange"
:key="index"
@click.stop="bindChangeTagList(index,'priceRange')"
@@ -69,7 +69,7 @@
<div>
<ul class="fn-flex fn-flex-wrap">
<li
class="ulib-r10 pl20 pr20 pt10 pb10 mr30 mt15 font-24"
class="ulib-r10 pl15 pr15 pt10 pb10 mt15 font-24"
v-for="(item,index) in productLevel"
:key="index"
@click.stop="bindChangeTagList(index,'productLevel')"
+3 -3
View File
@@ -85,7 +85,7 @@
</div>
</div>
</div>
<PopGetAllowance @update:showPop="handleShowPop" @showStorePop="handleShowStorePop" @success="handleSuccess" :detail="productDetail" :coupons="productDetail.coupons" :show-pop="showPop" />
<PopGetAllowance @update:showPop="handleShowPop" @showStorePop="handleShowStorePop" @success="handleSuccess" :detail="productDetail" :coupons="productDetail.coupons" :cityInfo="cityInfo" :show-pop="showPop" />
<PopStores @update:showPop="handleShowStorePop" :show-pop="showStorePop" :coupons="productDetail.coupons" :id="productDetail.coupons.coupon_id" />
<SideMenu />
</template>
@@ -231,8 +231,8 @@ const cityInfo = ref({
if (location && location.latitude && location.longitude) {
if(localStorage.getItem('cityInfo')){
// cityInfo.value = JSON.parse(localStorage.getItem('cityInfo'));
// console.log('城市信息:', cityInfo.value);
cityInfo.value = JSON.parse(localStorage.getItem('cityInfo'));
console.log('城市信息:', cityInfo.value);
// if (cityInfo.value.cityId) {
// userStore.setCity(cityInfo.value);
// query_data.cityId = cityInfo.value.cityId;