| | |
| | | <template slot="goodsSlot" slot-scope="{ row }"> |
| | | <div style="margin: 5px 0px; height: 80px; display: flex"> |
| | | <div style=""> |
| | | <img |
| | | <img v-if="row.original" |
| | | :src="row.original" |
| | | style="height: 60px; margin-top: 1px; width: 60px" |
| | | /> |
| | | <video v-else |
| | | :src="row.goodsVideo" style="height: 60px; margin-top: 1px; width: 60px" |
| | | /> |
| | | </div> |
| | | |
| | |
| | | |
| | | <script> |
| | | import { getGoodsListData, upGoods, lowGoods } from "@/api/goods"; |
| | | import {getSts} from '@/api/file' |
| | | import vueQr from "vue-qr"; |
| | | export default { |
| | | components: { |
| | |
| | | this.loading = false; |
| | | if (res.success) { |
| | | this.data = res.result.records; |
| | | getSts().then(res => { |
| | | const endpoint = res.data.endpoint |
| | | this.data.forEach(item => { |
| | | if (item.goodsVideo != null && item.goodsVideo.indexOf('http')===-1) { |
| | | item.goodsVideo = endpoint + '/' + item.goodsVideo; |
| | | } |
| | | if (item.original !=null && item.original.indexOf('http') ===-1) { |
| | | item.original = endpoint + '/' + item.original; |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | this.total = res.result.total; |
| | | } |
| | | }); |