guhongwei 5 年之前
父节点
当前提交
827f335ae5
共有 2 个文件被更改,包括 2 次插入7 次删除
  1. 1 1
      src/layout/supermarket/fabu.vue
  2. 1 6
      src/views/supermaket/supermarket.vue

+ 1 - 1
src/layout/supermarket/fabu.vue

@@ -4,7 +4,7 @@
       <el-col :span="24" class="info">
       <el-col :span="24" class="info">
         <el-col :span="24" class="topInfo">
         <el-col :span="24" class="topInfo">
           <el-col :span="21" class="left">{{ title }}</el-col>
           <el-col :span="21" class="left">{{ title }}</el-col>
-          <el-col :span="2" class="btn" @click.native="fabu()"><el-link :underline="false">我要发布</el-link></el-col>
+          <el-col :span="2" class="btn"><el-link :underline="false" @click.native="fabu()">我要发布</el-link></el-col>
           <el-col :span="1" class="more">
           <el-col :span="1" class="more">
             <el-link :underline="false" @click="clickmore"><el-image :src="more"></el-image></el-link>
             <el-link :underline="false" @click="clickmore"><el-image :src="more"></el-image></el-link>
           </el-col>
           </el-col>

+ 1 - 6
src/views/supermaket/supermarket.vue

@@ -182,8 +182,6 @@ export default {
     async searchInfo({ skip = 0, limit = 8, ...info } = {}) {
     async searchInfo({ skip = 0, limit = 8, ...info } = {}) {
       const res = await this.ProductQuery({ skip, limit, ...info });
       const res = await this.ProductQuery({ skip, limit, ...info });
       for (const val of res.data) {
       for (const val of res.data) {
-        console.log(val.totaltype);
-
         if (val.totaltype === '0') {
         if (val.totaltype === '0') {
           var arr = res.data.filter(item => item.totaltype === '0');
           var arr = res.data.filter(item => item.totaltype === '0');
           this.$set(this, `jishuList`, arr);
           this.$set(this, `jishuList`, arr);
@@ -192,13 +190,9 @@ export default {
           var arrs = res.data.filter(item => item.totaltype === '1');
           var arrs = res.data.filter(item => item.totaltype === '1');
           this.$set(this, `chanpinList`, arrs);
           this.$set(this, `chanpinList`, arrs);
           this.$set(this, `chanpinTotal`, arrs.length);
           this.$set(this, `chanpinTotal`, arrs.length);
-          console.log(arrs);
         } else if (val.totaltype === '2') {
         } else if (val.totaltype === '2') {
-          console.log('344');
-
           var arrss = res.data.filter(item => item.totaltype === '2');
           var arrss = res.data.filter(item => item.totaltype === '2');
           this.$set(this, `serviceList`, arrss);
           this.$set(this, `serviceList`, arrss);
-          console.log(arrss);
           this.$set(this, `serveTotal`, arrss.length);
           this.$set(this, `serveTotal`, arrss.length);
         }
         }
       }
       }
@@ -209,6 +203,7 @@ export default {
       this.$set(this, `tableData`, res.data);
       this.$set(this, `tableData`, res.data);
     },
     },
     fabu() {
     fabu() {
+      console.log('闹');
       if (this.user.role == '2' || this.user.role == '3') {
       if (this.user.role == '2' || this.user.role == '3') {
         this.$router.push({ path: '/enterprise/enterprisexuqiu' });
         this.$router.push({ path: '/enterprise/enterprisexuqiu' });
       }
       }