Commit 39ed4a8e by 姜鹏凯

商品中心优化&&路由调整

1 parent 7d33ff72
...@@ -465,7 +465,12 @@ ...@@ -465,7 +465,12 @@
--> -->
<slot> <slot>
<i v-if="!loading && !fileUrlWatch" class="el-icon-plus uploader-icon upload-action"></i> <template v-if="multiple">
<i v-if="limit !== fileListWatch.length" class="el-icon-plus uploader-icon upload-action"></i>
</template>
<template v-else>
<i v-if="!loading && !fileUrlWatch" class="el-icon-plus uploader-icon upload-action"></i>
</template>
<transition> <transition>
<!-- 上传精度条 --> <!-- 上传精度条 -->
......
...@@ -73,10 +73,12 @@ ...@@ -73,10 +73,12 @@
if (data) { if (data) {
api.getDetail(data.id).then((res) => { api.getDetail(data.id).then((res) => {
this.form = res.data this.form = res.data
let arr = this.form.attachments.split(',') if (this.form.attachments) {
arr.forEach((dd) => { let arr = this.form.attachments.split(',')
this.fileList.push({ url: dd }) arr.forEach((dd) => {
}) this.fileList.push({ url: dd })
})
}
}) })
} else { } else {
this.form = JSON.parse(JSON.stringify(defaultForm)) this.form = JSON.parse(JSON.stringify(defaultForm))
...@@ -237,10 +239,12 @@ ...@@ -237,10 +239,12 @@
<PhoneTemplate> <PhoneTemplate>
<div class="phone-content"> <div class="phone-content">
<el-image <el-image
v-if="form.picture"
class="commodity-img commodity-thumb" class="commodity-img commodity-thumb"
style="width: 100%; height: 100px;" style="width: 100%;"
:src="form.picture" :src="form.picture"
></el-image> ></el-image>
<div v-else class="commodity-img commodity-thumb"></div>
<div class="price">¥{{ form.price }}</div> <div class="price">¥{{ form.price }}</div>
<div class="content">{{ form.describe }}</div> <div class="content">{{ form.describe }}</div>
<el-image v-for="(item, index) in fileList" class="commodity-img" :src="item.url" :key="index"></el-image> <el-image v-for="(item, index) in fileList" class="commodity-img" :src="item.url" :key="index"></el-image>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!