Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
仟微科技
Link Wechat
提交
9d0b72e1
Link Wechat
项目概览
仟微科技
/
Link Wechat
通知
48
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Link Wechat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
9d0b72e1
编写于
6月 15, 2021
作者:
X
xinla
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化:统一系统共用文件上传接口,统一为img的src不是绝对地址的src拼接接口地址
上级
81c4b476
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
39 addition
and
14 deletion
+39
-14
linkwe-ui/src/components/Upload.vue
linkwe-ui/src/components/Upload.vue
+4
-5
linkwe-ui/src/config.js
linkwe-ui/src/config.js
+17
-0
linkwe-ui/src/main.js
linkwe-ui/src/main.js
+17
-8
linkwe-ui/src/utils/request.js
linkwe-ui/src/utils/request.js
+1
-1
未找到文件。
linkwe-ui/src/components/Upload.vue
浏览文件 @
9d0b72e1
...
...
@@ -28,11 +28,10 @@ export default {
data
()
{
return
{
loading
:
false
,
action
:
process
.
env
.
VUE_APP_BASE_API
+
(
this
.
type
==
0
?
'
/wecom/material/uploadimg
'
:
'
/common/uploadFile2Cos
'
),
action
:
process
.
env
.
VUE_APP_BASE_API
+
'
/common/uploadFile2Cos
'
,
// (this.type == 0
// ? '/wecom/material/uploadimg'
// : '/common/uploadFile2Cos'),
headers
:
window
.
CONFIG
.
headers
,
domain
:
process
.
env
.
VUE_APP_BASE_API
,
}
...
...
linkwe-ui/src/config.js
浏览文件 @
9d0b72e1
...
...
@@ -45,4 +45,21 @@ window.CONFIG = {
return
{
Authorization
:
'
Bearer
'
+
getToken
()
}
},
}
// 统一为img的src不是绝对地址的拼接接口地址
document
.
addEventListener
(
'
error
'
,
function
(
e
)
{
let
target
=
e
.
target
let
src
=
target
.
attributes
.
getNamedItem
(
'
src
'
).
value
if
(
target
.
tagName
.
toUpperCase
()
===
'
IMG
'
&&
src
&&
!
src
.
includes
(
'
http
'
)
)
{
target
.
src
=
process
.
env
.
VUE_APP_BASE_API
+
src
}
},
true
)
export
default
window
.
CONFIG
linkwe-ui/src/main.js
浏览文件 @
9d0b72e1
...
...
@@ -67,20 +67,29 @@ Vue.prototype.msgInfo = function(msg) {
import
{
pickerOptions
}
from
'
@/utils/index
'
Vue
.
prototype
.
pickerOptions
=
pickerOptions
import
VideoPlayer
from
'
vue-video-player
'
Vue
.
use
(
VideoPlayer
);
import
AudioPlayer
from
'
@liripeng/vue-audio-player
'
Vue
.
use
(
VideoPlayer
)
import
AudioPlayer
from
'
@liripeng/vue-audio-player
'
import
'
@liripeng/vue-audio-player/lib/vue-audio-player.css
'
Vue
.
use
(
AudioPlayer
)
import
VueAMap
from
'
vue-amap
'
;
import
VueAMap
from
'
vue-amap
'
Vue
.
use
(
VueAMap
)
;
Vue
.
use
(
VueAMap
)
VueAMap
.
initAMapApiLoader
({
key
:
'
32396af00cd726deed804cf5b63ed2d8
'
,
plugin
:
[
'
AMap.Autocomplete
'
,
'
AMap.PlaceSearch
'
,
'
AMap.Scale
'
,
'
AMap.OverView
'
,
'
AMap.ToolBar
'
,
'
AMap.MapType
'
,
'
AMap.PolyEditor
'
,
'
AMap.CircleEditor
'
],
v
:
'
1.4.4
'
});
key
:
'
32396af00cd726deed804cf5b63ed2d8
'
,
plugin
:
[
'
AMap.Autocomplete
'
,
'
AMap.PlaceSearch
'
,
'
AMap.Scale
'
,
'
AMap.OverView
'
,
'
AMap.ToolBar
'
,
'
AMap.MapType
'
,
'
AMap.PolyEditor
'
,
'
AMap.CircleEditor
'
,
],
v
:
'
1.4.4
'
,
})
// 全局组件挂载
Vue
.
component
(
'
Pagination
'
,
Pagination
)
Vue
.
component
(
'
RightToolbar
'
,
RightToolbar
)
...
...
linkwe-ui/src/utils/request.js
浏览文件 @
9d0b72e1
...
...
@@ -10,7 +10,7 @@ const service = axios.create({
// axios中请求配置有baseURL选项,表示请求URL公共部分
baseURL
:
process
.
env
.
NODE_ENV
===
'
development
'
?
process
.
env
.
VUE_APP_BASE_API
?
'
/api
'
:
process
.
env
.
VUE_APP_BASE_API
,
// 超时
timeout
:
10000
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录