|
@@ -40,7 +40,7 @@
|
|
|
<view class="two_3" v-if="is_open">
|
|
|
<view class="left">请选择收货地址</view>
|
|
|
<view class="right" @tap="toAddress">
|
|
|
- <text>{{data.address||''}}</text>
|
|
|
+ <text>{{address.address||''}}</text>
|
|
|
<u-icon name="arrow-right" size="18"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -68,7 +68,7 @@
|
|
|
<script setup lang="ts">
|
|
|
import { getCurrentInstance, ref } from 'vue';
|
|
|
//该依赖已内置不需要单独安装
|
|
|
- import { onLoad } from "@dcloudio/uni-app";
|
|
|
+ import { onShow, onLoad } from "@dcloudio/uni-app";
|
|
|
// 请求接口
|
|
|
const $api = getCurrentInstance()?.appContext.config.globalProperties.$api;
|
|
|
const $config = getCurrentInstance()?.appContext.config.globalProperties.$config;
|
|
@@ -80,6 +80,7 @@
|
|
|
const info = ref({});
|
|
|
// 材料表单
|
|
|
const form = ref({});
|
|
|
+ const address = ref({});
|
|
|
// 申请表单
|
|
|
const data = ref({
|
|
|
user: user.value?._id,
|
|
@@ -95,10 +96,22 @@
|
|
|
uni.setNavigationBarTitle({
|
|
|
title: options && options.name || '公证详情'
|
|
|
});
|
|
|
+ });
|
|
|
+ onShow(async () => {
|
|
|
+ uni.$on('id', async function (data) {
|
|
|
+ if (data) await searchAddres(data)
|
|
|
+ })
|
|
|
await searchUser();
|
|
|
await searchOther();
|
|
|
await search();
|
|
|
- })
|
|
|
+ });
|
|
|
+ // 地址
|
|
|
+ const searchAddres = async (id) => {
|
|
|
+ let arr = await $api(`address/${id}`, 'GET')
|
|
|
+ if (arr.errcode == '0') {
|
|
|
+ address.value = arr.data
|
|
|
+ }
|
|
|
+ };
|
|
|
// 用户信息
|
|
|
const searchUser = async () => {
|
|
|
user.value = uni.getStorageSync('user');
|
|
@@ -245,6 +258,11 @@
|
|
|
padding: 3vw;
|
|
|
background-color: var(--mainColor);
|
|
|
font-size: var(--font14Size);
|
|
|
+
|
|
|
+ .right {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|