| | |
| | | @selected="selected" |
| | | exist-address-title="选择地址" |
| | | > |
| | | <template #bottom> |
| | | <template #bottom v-if="!infiniteLoadingProps?.flattenListData?.length"> |
| | | <div class="select-address-bottom"> |
| | | <nut-button type="primary" @click="goSelectAddress">新增地址</nut-button> |
| | | <nut-button type="primary" @click="goAddAddress">新增地址</nut-button> |
| | | </div> |
| | | </template> |
| | | </nut-address> |
| | |
| | | form.selectAddressVisible = true; |
| | | } |
| | | |
| | | function goAddAddress() { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.editAddress}`, |
| | | }); |
| | | } |
| | | |
| | | const selected = (prevExistAdd, nowExistAdd, arr) => { |
| | | form.addressId = nowExistAdd.id; |
| | | }; |
| | |
| | | specPrice: spec.value.price ?? 0, |
| | | specNumber: specNumber, |
| | | addressId: form.addressId, |
| | | name: detail.value.name, |
| | | name: selectedAddress.value.name, |
| | | contactPhoneNumber: selectedAddress.value.contactPhoneNumber, |
| | | provinceCode: selectedAddress.value.provinceCode, |
| | | provinceContent: selectedAddress.value.provinceContent, |
| | |
| | | } catch (error) { |
| | | } finally { |
| | | Taro.redirectTo({ |
| | | url: `${RouterPath.serciceDetail}?id=${id}`, |
| | | url: `${RouterPath.mineOrderDetail}?id=${orderId}`, |
| | | }); |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .select-address-bottom { |
| | | display: flex; |
| | | justify-content: center; |
| | | padding: 40px 0; |
| | | } |
| | | } |
| | | </style> |