Sun 3 лет назад
Родитель
Сommit
912b49da03

+ 1 - 1
src/views/business/goods/add.vue

@@ -10,7 +10,7 @@
         </el-col>
         <el-col :span="23">
           <el-form-item label="商品主图:" prop="picUrl">
-            <Upload v-model="mainPicUrl" :limit="8" />
+            <Upload v-model="mainPicUrl" :limit="10" />
             <br>
             <div class="tip">支持jpg、png格式上传,建议使用尺寸800x800像素以上、大小不超过1M的正方形图片;</div>
           </el-form-item>

+ 1 - 1
src/views/business/goods/index.vue

@@ -81,7 +81,7 @@
       <el-table-column fixed="right" align="right" label="操作" width="140">
         <template slot-scope="{row}">
           <!-- <el-button v-hasPermi="['business:goods:query']" type="text">查看</el-button> -->
-          <el-button v-if="JSON.parse(row.status).value === 'init'" v-hasPermi="['business:goods:edit']" type="text" @click="$router.push('/goods/edit?id=' + row.goodsId)">编辑</el-button>
+          <el-button v-hasPermi="['business:goods:edit']" type="text" @click="$router.push('/goods/edit?id=' + row.goodsId)">编辑</el-button>
           <el-button v-if="JSON.parse(row.status).value === 'off' || JSON.parse(row.status).value === 'init'" v-hasPermi="['business:goods:on']" type="text" @click="setStatus(row, 'on')">上架</el-button>
           <el-button v-if="JSON.parse(row.status).value === 'on'" v-hasPermi="['business:goods:off']" type="text" @click="setStatus(row, 'off')">下架</el-button>
           <el-button v-if="JSON.parse(row.status).value === 'init'" v-hasPermi="['business:coupon:remove']" class="del" type="text" @click="del(row)">删除</el-button>

+ 5 - 4
src/views/business/ticket/create.vue

@@ -219,15 +219,16 @@
         />
         <el-table-column label="商品ID" prop="goodsId" />
         <el-table-column label="商品图片">
-          <template slot-scope="scope">
-            <div>
+          <template slot-scope="{row}">
+            <div v-if="row.picUrl">
               <el-image
                 style="width: 100px; height: 100px"
-                :src="scope.row.picUrl"
-                :preview-src-list="[scope.row.picUrl]"
+                :src="row.picUrl.split(',')[0]"
+                :preview-src-list="row.picUrl.split(',')"
               >
               </el-image>
             </div>
+            <p v-else>-</p>
           </template>
         </el-table-column>
         <el-table-column label="商品名称" prop="title" min-width="85" />