| | |
| | | </div> |
| | | </div> |
| | | </FormItem> |
| | | <FormItem label="商品标签"> |
| | | <span v-for="(item ,index) in goodsTag" :key="index"> |
| | | {{index === goodsTag.length - 1 ? item.tagName: item.tagName +"," }} |
| | | </span> |
| | | |
| | | </FormItem> |
| | | </div> |
| | | <h4>商品交易信息</h4> |
| | | <div class="form-item-view"> |
| | |
| | | </template> |
| | | <script> |
| | | import { getGoodsDetail } from "@/api/goods"; |
| | | import {getGoodSTagById} from "@/api/goods-tag" |
| | | import {getSts} from '@/api/file' |
| | | export default { |
| | | name: "goodsDetail", |
| | | data() { |
| | | return { |
| | | goodsTag:[], |
| | | goods: {}, // 商品信息 |
| | | previewGoodsPicture: "", // 预览图片 |
| | | goodsPictureVisible: false, // 预览图片模态框 |
| | |
| | | }, |
| | | mounted() { |
| | | this.initGoods(this.$route.query.id); |
| | | this.getGoodSTagById(this.$route.query.id); |
| | | |
| | | }, |
| | | methods: { |
| | | getGoodSTagById(id){ |
| | | getGoodSTagById(id).then(res =>{ |
| | | if (res.code === 200){ |
| | | this.goodsTag = res.data; |
| | | } |
| | | }) |
| | | }, |
| | | // 初始化数据,获取商品详情 |
| | | initGoods(id) { |
| | | getGoodsDetail(id).then((res) => { |