Commit 413c9d40b3f30ef027e5654276541b1885e3273a
1 parent
5e79c056
公告详情
Showing
2 changed files
with
10 additions
and
5 deletions
src/api/notify/index.ts
| @@ -19,7 +19,11 @@ export const notifyList = async ( params: any ) => { | @@ -19,7 +19,11 @@ export const notifyList = async ( params: any ) => { | ||
| 19 | * @function notifyDetail | 19 | * @function notifyDetail |
| 20 | */ | 20 | */ |
| 21 | export const notifyDetail = async ( params: any ) => { | 21 | export const notifyDetail = async ( params: any ) => { |
| 22 | - let res: any = await request.get( '/notify/getNotify', {params} ) | 22 | + let res: any = await request({ |
| 23 | + method: 'get', | ||
| 24 | + url: '/notify/getNotify', | ||
| 25 | + params: params | ||
| 26 | + }) | ||
| 23 | return res | 27 | return res |
| 24 | } | 28 | } |
| 25 | 29 |
src/views/notify/edit.vue
| @@ -13,7 +13,7 @@ let form = reactive({ | @@ -13,7 +13,7 @@ let form = reactive({ | ||
| 13 | title: "", | 13 | title: "", |
| 14 | status: null, | 14 | status: null, |
| 15 | oId: store?.family?.loginStore()?.organizationId, | 15 | oId: store?.family?.loginStore()?.organizationId, |
| 16 | - neighborHoodId: null, | 16 | + neighborHoodId: 0, |
| 17 | neighborHoodName: "", | 17 | neighborHoodName: "", |
| 18 | id: null, | 18 | id: null, |
| 19 | content: "", | 19 | content: "", |
| @@ -137,13 +137,14 @@ const getNeighborhoods = async (pageSize: number = 20) => { | @@ -137,13 +137,14 @@ const getNeighborhoods = async (pageSize: number = 20) => { | ||
| 137 | } | 137 | } |
| 138 | }; | 138 | }; |
| 139 | onMounted(() => { | 139 | onMounted(() => { |
| 140 | - getNeighborhoods(); | 140 | + getNeighborhoods() |
| 141 | if (JSON.stringify(useRoute().query) === "{}") { | 141 | if (JSON.stringify(useRoute().query) === "{}") { |
| 142 | form.dataType = "add"; | 142 | form.dataType = "add"; |
| 143 | } else { | 143 | } else { |
| 144 | form.dataType = useRoute().query.dataType; | 144 | form.dataType = useRoute().query.dataType; |
| 145 | - form.data = useRoute().query; | ||
| 146 | - form.data.neighborHoodId = ~~useRoute().query.neighborHoodId; | 145 | + notifyDetail({id: useRoute().query.id}).then(res => { |
| 146 | + form.data = res.data.data | ||
| 147 | + }) | ||
| 147 | } | 148 | } |
| 148 | }); | 149 | }); |
| 149 | </script> | 150 | </script> |