瀏覽代碼

2024.12.26 - 修改人脉请求patch -> post

GuYun-D 3 月之前
父節點
當前提交
71d3f98f61
共有 2 個文件被更改,包括 24 次插入24 次删除
  1. 4 4
      src/api/rm-bank/index.js
  2. 20 20
      src/views/rm-bank/activity/components/ActivityModal.vue

+ 4 - 4
src/api/rm-bank/index.js

@@ -51,7 +51,7 @@ export function getClubDetailApi(params) {
 export function patchClubMemberIsAdminApi(params) {
   return request({
     url: '/people-bank-club-member/patchClubMemberIsAdmin',
-    method: 'PATCH',
+    method: 'POST',
     params
   })
 }
@@ -88,7 +88,7 @@ export function getActivityDetailApi(params) {
 export function editMemberApi(data) {
   return request({
     url: '/people-bank-member/patchMember',
-    method: 'PATCH',
+    method: 'POST',
     data
   })
 }
@@ -115,7 +115,7 @@ export function deleteActivityApi(params) {
 export function patchPeopleBankActivitiesByIdApi(data) {
   return request({
     url: '/people-bank-activities/patchPeopleBankActivitiesById',
-    method: 'PATCH',
+    method: 'POST',
     data
   })
 }
@@ -133,7 +133,7 @@ export function getMemberByMemberIdApi(params) {
 export function patchClubMemberApi(data) {
   return request({
     url: '/people-bank-club-member/patchClubMember',
-    method: 'PATCH',
+    method: 'POST',
     data
   })
 }

+ 20 - 20
src/views/rm-bank/activity/components/ActivityModal.vue

@@ -252,25 +252,6 @@ export default {
   },
   methods: {
     show(row) {
-      this.resetDialog()
-      if (row) {
-        const activitiesAddress = row.activitiesAddress !== DEFAULT_ACTIVITY_ADDRESS ? row.activitiesAddress : ''
-        let activitiesAddressTemp = ''
-        let activitiesDetailAddressTemp = ''
-        if (activitiesAddress) {
-          activitiesAddressTemp = (activitiesAddress.split(' ')[0] || '').replace('undefined', '')
-          activitiesDetailAddressTemp = (activitiesAddress.split(' ')[1] || '').replace('undefined', '')
-          this.selectAddressLabel = (activitiesAddress.split(' ')[0] || '').replace('undefined', '')
-        }
-        Object.assign(this.activityForm.activities, row, {
-          activitiesAddress: activitiesAddressTemp,
-          activitiesDetailAddress: activitiesDetailAddressTemp,
-          id: row.id,
-          typeEnum: getTypeEnumByValue(Number(row.type)),
-          stateEnum: getStateEnumByValue(Number(row.state))
-        })
-        this.handleChangeTypeState()
-      }
       this.activityVisible = true
       setTimeout(this.calcSwiperHeight)
       // 拦截editor的图片上传 转码 -> 服务器上传
@@ -278,6 +259,25 @@ export default {
       this.$nextTick(() => {
         interceptQuillImageUpload(this, this.editorCustomOptions)
         this.stopObserver = listenEditorContentHeightChange(this, this.calcSwiperHeight)
+        this.resetDialog()
+        if (row) {
+          const activitiesAddress = row.activitiesAddress !== DEFAULT_ACTIVITY_ADDRESS ? row.activitiesAddress : ''
+          let activitiesAddressTemp = ''
+          let activitiesDetailAddressTemp = ''
+          if (activitiesAddress) {
+            activitiesAddressTemp = (activitiesAddress.split(' ')[0] || '').replace('undefined', '')
+            activitiesDetailAddressTemp = (activitiesAddress.split(' ')[1] || '').replace('undefined', '')
+            this.selectAddressLabel = (activitiesAddress.split(' ')[0] || '').replace('undefined', '')
+          }
+          Object.assign(this.activityForm.activities, row, {
+            activitiesAddress: activitiesAddressTemp,
+            activitiesDetailAddress: activitiesDetailAddressTemp,
+            id: row.id,
+            typeEnum: getTypeEnumByValue(Number(row.type)),
+            stateEnum: getStateEnumByValue(Number(row.state))
+          })
+          this.handleChangeTypeState()
+        }
       })
     },
 
@@ -330,7 +330,7 @@ export default {
     resetDialog() {
       this.activityForm = getDefaultActivityForm()
       this.currentStep = 0
-      this.$refs.elCarouselRef.setActiveItem('step-one')
+      this.$refs.elCarouselRef && this.$refs.elCarouselRef.setActiveItem('step-one')
       this.$refs.activityModalFormRef.clearValidate()
       this.$refs.activityNextModalFormRef.clearValidate()
       this.$refs.activityModalFormRef.resetFields()