vaecebyZ 1 rok pred
rodič
commit
366fffe3b6

+ 18 - 8
src/views/operationManage/goodsManage/goodsDetail.vue

@@ -52,10 +52,10 @@
             <el-cascader
               class="item-width-300"
               v-model="setQuery.goodsCateId"
-              show-all-levels
+              :show-all-levels="false"
+              placeholder=""
               :options="typeOptions"
-              :props="{ value: 'id', label: 'cateName', children: 'child' }"
-              clearable
+              :props="{ value: 'id', label: 'cateName', children: 'child', emitPath: false }"
             ></el-cascader>
           </el-form-item>
 
@@ -735,9 +735,21 @@ export default Vue.extend({
     getData() {
       getData().then((res) => {
         if (res.state == "Success") {
-          this.typeOptions = res.content;
+          this.typeOptions = res.content.map(e=>{
+            try{
+              e.child.map(
+              r=>{
+                delete r.child
+                return r
+              }
+            )
+            }catch(e){
+              console.log(e);
+            }
+            return e
+          });
         }
-      });
+      })
     },
     // 规则
     getRuleList() {
@@ -764,9 +776,7 @@ export default Vue.extend({
         this.loading = false;
         if (res.state == "Success") {
           this.setQuery = res.content;
-          this.setQuery.goodsCateId = this.setQuery.goodsCateId
-            .split(",")
-            .map((item) => Number(item));
+          this.setQuery.goodsCateId = Number(this.setQuery.goodsCateId);
             // 初始化购买设置
             if (!this.setQuery.goodsSets.length) {
                 this.setQuery.goodsSets = [];

+ 7 - 7
vue.config.js

@@ -45,13 +45,13 @@ module.exports = {
     },
     //	反向代理
     proxy: {
-      '^/api/zswl-cloud-shop': {
-        target: 'http://g3710170f8.zicp.fun/',//代理
-        changeOrigin: true,//是否跨域
-        pathRewrite: {
-          '^/api/zswl-cloud-shop': ''
-        }
-      },
+      // '^/api/zswl-cloud-shop': {
+      //   target: 'http://g3710170f8.zicp.fun/',//代理
+      //   changeOrigin: true,//是否跨域
+      //   pathRewrite: {
+      //     '^/api/zswl-cloud-shop': ''
+      //   }
+      // },
       '^/api': {
         // target: 'http://192.168.110.153:9002/',//代理
         target: url.BASE_URL,//代理