feat: 优化部分代码,新增审核商品视频
parent
71f61461ce
commit
2c32088f4c
|
@ -72,6 +72,14 @@
|
||||||
</Modal>
|
</Modal>
|
||||||
</div>
|
</div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
<FormItem label="商品视频">
|
||||||
|
<video
|
||||||
|
v-if="goods.goodsVideo"
|
||||||
|
controls
|
||||||
|
class="player"
|
||||||
|
:src="goods.goodsVideo"
|
||||||
|
/>
|
||||||
|
</FormItem>
|
||||||
<FormItem label="商品规格">
|
<FormItem label="商品规格">
|
||||||
<Table :columns="skuColumn" :data="skuData">
|
<Table :columns="skuColumn" :data="skuData">
|
||||||
<template slot="showImage" slot-scope="scope">
|
<template slot="showImage" slot-scope="scope">
|
||||||
|
|
|
@ -199,6 +199,7 @@
|
||||||
<Icon type="ios-cloud-upload" size="102" style="color: #3399ff"></Icon>
|
<Icon type="ios-cloud-upload" size="102" style="color: #3399ff"></Icon>
|
||||||
<h2>选择或拖拽文件上传</h2>
|
<h2>选择或拖拽文件上传</h2>
|
||||||
</div>
|
</div>
|
||||||
|
<Spin fix v-if="spinShow"></Spin>
|
||||||
</Upload>
|
</Upload>
|
||||||
<Button @click="exportGoods" type="text" style="color: red">下载导入模板</Button>
|
<Button @click="exportGoods" type="text" style="color: red">下载导入模板</Button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -222,13 +223,14 @@ import {
|
||||||
} from "@/api/goods";
|
} from "@/api/goods";
|
||||||
import { baseUrl } from "@/libs/axios.js";
|
import { baseUrl } from "@/libs/axios.js";
|
||||||
import * as API_Shop from "@/api/shops";
|
import * as API_Shop from "@/api/shops";
|
||||||
import Cookies from "js-cookie";
|
|
||||||
import {uploadGoodsExcel} from "../../../api/goods";
|
import {uploadGoodsExcel} from "../../../api/goods";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "goods",
|
name: "goods",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
spinShow:false,
|
||||||
accessToken: {}, // 验证token
|
accessToken: {}, // 验证token
|
||||||
importModal: false,
|
importModal: false,
|
||||||
action: baseUrl + "/goods/import/import", // 上传接口
|
action: baseUrl + "/goods/import/import", // 上传接口
|
||||||
|
@ -546,15 +548,11 @@ export default {
|
||||||
async upload() {
|
async upload() {
|
||||||
let fd = new FormData();
|
let fd = new FormData();
|
||||||
fd.append("files", this.file);
|
fd.append("files", this.file);
|
||||||
|
this.spinShow = false
|
||||||
let res = await uploadGoodsExcel(fd);
|
let res = await uploadGoodsExcel(fd);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.stepList.map((item) => {
|
this.spinShow = true
|
||||||
item.checked = false;
|
|
||||||
this.$Message.success("导入成功")
|
this.$Message.success("导入成功")
|
||||||
this.importModal = false
|
|
||||||
});
|
|
||||||
|
|
||||||
this.stepList[2].checked = true;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
openImportGoods(){
|
openImportGoods(){
|
||||||
|
|
Loading…
Reference in New Issue