Commit 413c9d40b3f30ef027e5654276541b1885e3273a

Authored by 杨泽宇
1 parent 5e79c056

公告详情

src/api/notify/index.ts
... ... @@ -19,7 +19,11 @@ export const notifyList = async ( params: any ) => {
19 19 * @function notifyDetail
20 20 */
21 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 27 return res
24 28 }
25 29  
... ...
src/views/notify/edit.vue
... ... @@ -13,7 +13,7 @@ let form = reactive({
13 13 title: "",
14 14 status: null,
15 15 oId: store?.family?.loginStore()?.organizationId,
16   - neighborHoodId: null,
  16 + neighborHoodId: 0,
17 17 neighborHoodName: "",
18 18 id: null,
19 19 content: "",
... ... @@ -137,13 +137,14 @@ const getNeighborhoods = async (pageSize: number = 20) => {
137 137 }
138 138 };
139 139 onMounted(() => {
140   - getNeighborhoods();
  140 + getNeighborhoods()
141 141 if (JSON.stringify(useRoute().query) === "{}") {
142 142 form.dataType = "add";
143 143 } else {
144 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 150 </script>
... ...