hookehuyr

购物车支付字段修改-Bob需求

......@@ -124,7 +124,7 @@
/>
</div>
<div>
<!-- <div>
<label class="block text-sm text-gray-600 mb-1">电子邮箱</label>
<input
v-model="formData.receive_email"
......@@ -132,10 +132,11 @@
class="w-full px-3 py-2 border border-gray-200 rounded-lg text-sm"
placeholder="请输入您的邮箱(选填)"
/>
</div>
</div> -->
<div>
<label class="block text-sm text-gray-600 mb-1">联系地址 <span class="text-red-500">*</span></label>
<!-- <label class="block text-sm text-gray-600 mb-1">联系地址 <span class="text-red-500">*</span></label> -->
<label class="block text-sm text-gray-600 mb-1">联系地址</label>
<input
v-model="formData.receive_address"
type="text"
......@@ -321,9 +322,9 @@ const handleSubmit = async (e) => {
if (!formData.value.receive_phone?.trim()) {
throw new Error('请输入手机号码')
}
if (!formData.value.receive_address?.trim()) {
throw new Error('请输入联系地址')
}
// if (!formData.value.receive_address?.trim()) {
// throw new Error('请输入联系地址')
// }
if (!formData.value.pay_type) {
throw new Error('请选择支付方式')
}
......@@ -340,6 +341,7 @@ const handleSubmit = async (e) => {
if (result.success) {
orderId.value = result.orderId || ''
orderComplete.value = true
// TODO: 生成orderid, 并跳转到支付页面
} else {
throw new Error(result.message || '支付失败,请重试')
}
......