mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-17 16:35:53 +08:00
优化管理端商家端冗余以及配置内容。抽出公共主题颜色、站点标题等内容。分离config中api配置,修改商家发布中拖拽以及控制台出错的bug。
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
<div>
|
||||
<Upload
|
||||
style="display:inline-block;"
|
||||
:action="baseUrl + '/common/upload/file'"
|
||||
:action="commonUrl + '/common/upload/file'"
|
||||
:headers="accessToken"
|
||||
:on-success="handleSuccess"
|
||||
:on-error="handleError"
|
||||
@@ -257,6 +257,7 @@ import {
|
||||
import DPlayer from "dplayer";
|
||||
import config from "@/config";
|
||||
|
||||
import { commonUrl } from "@/libs/axios";
|
||||
var dp;
|
||||
export default {
|
||||
name: "oss-manage",
|
||||
@@ -268,8 +269,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
commonUrl, // 上传文件路径
|
||||
config, // api地址
|
||||
baseUrl: "", // 基础路径
|
||||
selectImage: false, //是否是选择
|
||||
accessToken: {}, // 上传token鉴权
|
||||
loading: false, // 表单加载状态
|
||||
@@ -342,7 +343,7 @@ export default {
|
||||
if (params.row.fileType.includes("image") > 0) {
|
||||
return h("img", {
|
||||
attrs: {
|
||||
src: params.row.url,
|
||||
src: params.row.url || '',
|
||||
alt: "加载图片失败",
|
||||
},
|
||||
style: {
|
||||
@@ -813,10 +814,6 @@ export default {
|
||||
if(!this.isComponent) { // 是组件的话,初始化不调用接口
|
||||
this.init();
|
||||
}
|
||||
this.baseUrl =
|
||||
process.env.NODE_ENV === "development"
|
||||
? this.config.api_dev.common
|
||||
: this.config.api_prod.common;
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user