Commit 26f28a2a authored by v-yuchenglong's avatar v-yuchenglong

update:商品图片上传问题

parent 68b81e77
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</template> </template>
<script> <script>
import { GOODS_URI } from "../../../../../server/config"; // import { GOODS_URI } from "../../../../../server/config";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { getCookie } from "@/utils/util"; import { getCookie } from "@/utils/util";
...@@ -286,7 +286,7 @@ export default { ...@@ -286,7 +286,7 @@ export default {
picUrlList: [], picUrlList: [],
picUploadList: [], // 上传详情图片列表 picUploadList: [], // 上传详情图片列表
isShowPopver: false, // 是否展示图片框 isShowPopver: false, // 是否展示图片框
uploadUrl: `${GOODS_URI}/ksy/ks3apiunencrypt/ks3api_upload`, // 金山云上传地址 uploadUrl: `/api`, // 金山云上传地址
hideUpload: false, hideUpload: false,
limitCount: 1, limitCount: 1,
...@@ -429,7 +429,7 @@ export default { ...@@ -429,7 +429,7 @@ export default {
marketing_name: this.editInfo.marketing_name, marketing_name: this.editInfo.marketing_name,
marketing_type: "4", marketing_type: "4",
ota_id: this.commodityForm.business1, ota_id: this.commodityForm.business1,
op_cur_user: getCookie('username'), op_cur_user: getCookie("username"),
// op_cur_user: store.state.userInfo.email, // op_cur_user: store.state.userInfo.email,
goods_sku_id: goodsSkuID, goods_sku_id: goodsSkuID,
}); });
...@@ -466,9 +466,11 @@ export default { ...@@ -466,9 +466,11 @@ export default {
// 添加修改商品 // 添加修改商品
async commodity(type, val) { async commodity(type, val) {
this.$refs.picUpload && this.$refs.picUpload.clearFiles && this.$refs.picUpload.clearFiles(); this.$refs.picUpload &&
this.$refs.picUpload.clearFiles &&
this.$refs.picUpload.clearFiles();
this.picUrlList = []; this.picUrlList = [];
this.picStr = '' this.picStr = "";
this.addCommodityPopup = true; this.addCommodityPopup = true;
this.commodityForm = {}; this.commodityForm = {};
...@@ -497,7 +499,7 @@ export default { ...@@ -497,7 +499,7 @@ export default {
marketing_type: "4", marketing_type: "4",
price: this.commodityForm.price, price: this.commodityForm.price,
ota_id: this.commodityForm.business1, ota_id: this.commodityForm.business1,
op_cur_user: getCookie('username'), op_cur_user: getCookie("username"),
}); });
if (res.code == 0) { if (res.code == 0) {
ElMessage.success({ ElMessage.success({
...@@ -596,13 +598,13 @@ export default { ...@@ -596,13 +598,13 @@ export default {
this.comTableData = newVal; this.comTableData = newVal;
}, },
picUrlList: function () { picUrlList: function () {
if(this.picUrlList.length >= this.limitCount) { if (this.picUrlList.length >= this.limitCount) {
this.hideUpload = true this.hideUpload = true;
}else { } else {
this.hideUpload = false this.hideUpload = false;
}
} }
}, },
},
created() { created() {
this.getBusinessListMet(); this.getBusinessListMet();
}, },
......
...@@ -7,6 +7,15 @@ module.exports = { ...@@ -7,6 +7,15 @@ module.exports = {
publicPath: isDev ? "/" : "/dist", publicPath: isDev ? "/" : "/dist",
configureWebpack: { configureWebpack: {
devServer: { devServer: {
proxy: {
'/api': {
target: `http://bp-test.ini.yidian-inc.com/ksy/ks3apiunencrypt/ks3api_upload`,
changeOrigin: true,
pathRewrite: {
'^/api': ''
}
},
},
proxy: "http://127.0.0.1:8055", //http://localhost:8055 proxy: "http://127.0.0.1:8055", //http://localhost:8055
hot: true, hot: true,
disableHostCheck: true, disableHostCheck: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment