Commit 39ed4a8e by 姜鹏凯

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

1 parent 7d33ff72
......@@ -465,7 +465,12 @@
-->
<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>
<!-- 上传精度条 -->
......
......@@ -73,10 +73,12 @@
if (data) {
api.getDetail(data.id).then((res) => {
this.form = res.data
let arr = this.form.attachments.split(',')
arr.forEach((dd) => {
this.fileList.push({ url: dd })
})
if (this.form.attachments) {
let arr = this.form.attachments.split(',')
arr.forEach((dd) => {
this.fileList.push({ url: dd })
})
}
})
} else {
this.form = JSON.parse(JSON.stringify(defaultForm))
......@@ -237,10 +239,12 @@
<PhoneTemplate>
<div class="phone-content">
<el-image
v-if="form.picture"
class="commodity-img commodity-thumb"
style="width: 100%; height: 100px;"
style="width: 100%;"
:src="form.picture"
></el-image>
<div v-else class="commodity-img commodity-thumb"></div>
<div class="price">¥{{ form.price }}</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>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!