Explorar o código

Merge branch 'master' of http://154.209.4.10:3001/tt0101/zhunong-h5

tt0101 hai 1 semana
pai
achega
f8df5c69d5
Modificáronse 1 ficheiros con 6 adicións e 11 borrados
  1. 6 11
      src/api/home.js

+ 6 - 11
src/api/home.js

@@ -27,14 +27,9 @@ export const getChongInfo = (params) => request({ url: "index/get_chong_info", m
 // 党员申请 
 export const applyDangyuan = (data) => request({ url: "user/apply_dangyuan", method: "post", data,loading:true });
 // 参与退休计划 
-export function joinRetirement(data) {
-  const formData = new FormData();
-  formData.append('type', data);
-  
-  return request({
-    url: '/user/join_retirement',
-    method: 'post',
-    data: formData,
-    loading: true
-  })
-}
+export const joinRetirement = (type) => request({ 
+  url: "/user/join_retirement", 
+  method: "post", 
+  data: new URLSearchParams({ type }),
+  headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+});