Browse Source

修改参数

wyling 4 năm trước cách đây
mục cha
commit
c83861c23b

+ 2 - 2
src/api/carousel/carousel.js

@@ -39,7 +39,7 @@ export function updateCarousel(data) {
 export function delCarousel(id) {
   return request({
     url: '/pc/homePage/' + id,
-    method: 'delete'
+    method: 'put',
   })
 }
 
@@ -50,4 +50,4 @@ export function exportCarousel(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 1 - 1
src/api/customer/customer.js

@@ -39,7 +39,7 @@ export function updateCustomer(data) {
 export function delCustomer(id) {
   return request({
     url: '/pc/customer/' + id,
-    method: 'delete'
+    method: 'put'
   })
 }
 

+ 7 - 7
src/views/carousel/carousel/index.vue

@@ -36,10 +36,10 @@
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="carouselList" @selection-change="handleSelectionChange"  max-height="650">
+    <el-table v-loading="loading" :data="carouselList" @selection-change="handleSelectionChange" max-height="650">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="主键" width="55" align="center" prop="id" />
-      <el-table-column label="菜单类型" align="center" prop="dataType" :formatter="menuFormat"/>
+      <el-table-column label="菜单类型" align="center" prop="dataType" :formatter="menuFormat" />
       <el-table-column label="活动名称" align="center" prop="pictureName" />
       <el-table-column label="权重" align="center" prop="weight" />
       <el-table-column label="活动海报" width="200" align="center" prop="fileUrl">
@@ -75,7 +75,7 @@
             class="avatar-uploader"
             :action="`${baseUrl}/open-api/common/file`"
             :show-file-list="false"
-            :data="{ fileType: 99 ,remark:'轮播图'}"
+            :data="{ fileType: 99, remark: '轮播图' }"
             name="file"
             :on-success="handleAvatarSuccess"
             drag
@@ -181,11 +181,11 @@ export default {
       },
       // 小程序轮播图事件类型
       cilckTypeOptions: [],
-      cilckTypeFormat:null,
+      cilckTypeFormat: null,
       // 小程序状态开关
       statusOptions: [],
       statusFormat: null,
-       // 菜单类型
+      // 菜单类型
       menuOptions: [],
       menuFormat: null
     }
@@ -260,7 +260,7 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id+'-'+item.type)
+      this.ids = selection.map(item => item.id)
       this.single = selection.length !== 1
       this.multiple = !selection.length
     },
@@ -302,7 +302,7 @@ export default {
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      const ids = row.id+'-'+row.type || this.ids
+      const ids = row.id ? row.id : this.ids
       this.$confirm('是否确认删除轮播图编号为"' + ids + '"的数据项?', '警告', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',