高敬炎 2 лет назад
Родитель
Сommit
ce9d869ab5

+ 11 - 1
unimall-admin/src/api/cloud/articleManagement.js

@@ -107,7 +107,17 @@ export function editDict(dict) {
     }
   })
 }
-
+// 查询分类
+export function getDict(id) {
+  return request({
+    method: 'get',
+    params: {
+      _gp: 'admin.unimall.cloudClassifyInfo',
+      _mt: 'get',
+      id:id
+    }
+  })
+}
 // 删除分类
 export function delDict(id) {
   return request({

+ 5 - 2
unimall-admin/src/views/articleManagement/index.vue

@@ -144,7 +144,7 @@
 </template>
 
 <script>
-import { listDict, addDict, listManagement, editDict, delDict, delManagement, addManagement, updateManagement, exportManagement } from "@/api/cloud/articleManagement";
+import { listDict, addDict, getDict, listManagement, editDict, delDict, delManagement, addManagement, updateManagement, exportManagement } from "@/api/cloud/articleManagement";
 
 export default {
   data() {
@@ -210,7 +210,10 @@ export default {
   methods: {
     // 编辑分类
     append(data) {
-      this.dict.id=data.id
+      this.dict=data
+      // getDict(data.id).then(response => {
+
+      // })
       this.title='编辑分类'
       this.opendict=true
         

+ 6 - 16
unimall-admin/src/views/productManagement/index.vue

@@ -153,7 +153,7 @@
                 :rows="4"
                 maxlength="500"
                 placeholder="请输入分类描述"
-                v-model="form.classifyDescribe">
+                v-model="dict.classifyDescribe">
         </el-input>
       </el-form-item>
       <el-form-item label="分类图标">
@@ -165,7 +165,7 @@
           :show-file-list="false"
           :on-success="uploadSuccessHandle"
           :before-upload="onBeforeUpload">
-            <img v-if="form.classifyIcon" :src="form.classifyIcon" class="avatar">
+            <img v-if="dict.classifyIcon" :src="dict.classifyIcon" class="avatar">
             <i v-else class="el-icon-plus avatar-uploader-icon"></i>
         </el-upload>
       </el-form-item>
@@ -178,7 +178,7 @@
           :show-file-list="false"
           :on-success="uploadSuccessHandle1"
           :before-upload="onBeforeUpload1">
-            <img v-if="form.classifyImage" :src="form.classifyImage" class="avatar">
+            <img v-if="dict.classifyImage" :src="dict.classifyImage" class="avatar">
             <i v-else class="el-icon-plus avatar-uploader-icon"></i>
         </el-upload>
       </el-form-item>
@@ -270,13 +270,8 @@ export default {
     // 上传图片了处理图片
     uploadSuccessHandle(e, file) {
         const that = this
-        this.form.classifyIcon = e.url
+        this.dict.classifyIcon = e.url
         this.$forceUpdate()
-        console.log(e,this.editor.getData())
-         
-        
-      
-        console.log(this.form,this.editor)
       },
       onBeforeUpload(file) {
         const isIMAGE = file.type === 'image/jpeg' || 'image/gif' || 'image/png' || 'image/jpg'
@@ -293,13 +288,8 @@ export default {
       // 上传图片了处理图片
       uploadSuccessHandle1(e, file) {
         const that = this
-        this.form.classifyImage = e.url
+        this.dict.classifyImage = e.url
         this.$forceUpdate()
-        console.log(e,this.editor.getData())
-         
-        
-      
-        console.log(this.form,this.editor)
       },
       onBeforeUpload1(file) {
         const isIMAGE = file.type === 'image/jpeg' || 'image/gif' || 'image/png' || 'image/jpg'
@@ -315,7 +305,7 @@ export default {
       },
     // 编辑分类
     append(data) {
-      this.dict.id=data.id
+      this.dict=data
       this.title='编辑分类'
       this.opendict=true