2025-07-09
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
<div class="fn-flex fn-flex-column" style="min-height:100vh;">
|
||||
<div class="fn-flex-item pt30">
|
||||
<div class="box-shadow-darkGray inner10 ulib-r20 pb30">
|
||||
<van-field label="手机号" input-align="right" v-model="form.mobile" readonly/>
|
||||
<van-field label="姓名" input-align="right" placeholder="请输入姓名" v-model="form.name" :rules="[{ required: true, message: '请输入姓名' }]"/>
|
||||
<!-- 购车城市 -->
|
||||
<van-field label="购车城市" :border="false" input-align="right" placeholder="请选择购车城市" v-model="form.city" name="area" readonly
|
||||
@@ -126,6 +127,7 @@ const subsidyId = ref(route.params.id || route.query.id || '');
|
||||
|
||||
// 表单数据
|
||||
const form = reactive({
|
||||
mobile: '',
|
||||
name: '',
|
||||
city: '',
|
||||
cityId: '',
|
||||
@@ -169,11 +171,21 @@ onMounted( async() => {
|
||||
showToast('缺少补贴ID参数');
|
||||
console.warn('补贴ID未找到,请检查路由参数');
|
||||
}
|
||||
await getGuideInfo()
|
||||
await getGuideInfo();
|
||||
await getMobile(subsidyId.value);
|
||||
});
|
||||
|
||||
// API方法定义
|
||||
|
||||
const getMobile = async (subsidyId) => {
|
||||
try {
|
||||
const response = await api.get('/auto/ucenter/couponDetail', { id:subsidyId });
|
||||
if (response.code === 200) {
|
||||
form.mobile = response.data.mobile;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
};
|
||||
/**
|
||||
* 获取门店列表
|
||||
* @param {number} cityId - 城市ID
|
||||
|
||||
Reference in New Issue
Block a user