修改 oss 地址
This commit is contained in:
22244
package-lock.json
generated
Normal file
22244
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -70,8 +70,8 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.url = fileRes.replace(
|
this.url = fileRes.replace(
|
||||||
"https://djvideo.oss-cn-shanghai.aliyuncs.com/",
|
"https://sy-duanju.oss-cn-nanjing.aliyuncs.com/",
|
||||||
"https://duanju.hnsiyao.cn/"
|
"https://short-video.hnsiyao.cn/"
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
onFileSubmit(data) {
|
onFileSubmit(data) {
|
||||||
|
|||||||
@@ -3,14 +3,15 @@ import axios from 'axios'
|
|||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
import qs from 'qs'
|
import qs from 'qs'
|
||||||
import merge from 'lodash/merge'
|
import merge from 'lodash/merge'
|
||||||
import { clearLoginInfo } from '@/utils'
|
import {clearLoginInfo} from '@/utils'
|
||||||
|
|
||||||
export const entryName = '短剧13.2系统';
|
export const entryName = '短剧13.2系统';
|
||||||
const $urlMap={
|
// const $urlMap={
|
||||||
local:'http://192.168.1.15:8100/sqx_fast/',
|
// local:'http://192.168.1.15:8100/sqx_fast/',
|
||||||
product:'https://video.hnsiyao.cn/sqx_fast/',
|
// product:'https://video.hnsiyao.cn/sqx_fast/',
|
||||||
test:'https://video.hnsiyao.cn/sqx_fast/',
|
// test:'https://video.hnsiyao.cn/sqx_fast/',
|
||||||
}
|
// }
|
||||||
const $env='product'
|
// const $env='product'
|
||||||
const http = axios.create({
|
const http = axios.create({
|
||||||
timeout: 1000 * 300,
|
timeout: 1000 * 300,
|
||||||
// withCredentials: true,
|
// withCredentials: true,
|
||||||
@@ -24,9 +25,10 @@ const http = axios.create({
|
|||||||
*/
|
*/
|
||||||
http.interceptors.request.use(config => {
|
http.interceptors.request.use(config => {
|
||||||
config.headers['token'] = Vue.cookie.get('token') // 请求头带上token
|
config.headers['token'] = Vue.cookie.get('token') // 请求头带上token
|
||||||
config.baseURL = $urlMap[$env]
|
// config.baseURL = $urlMap[$env]
|
||||||
const arr=config.url.split('sqx_fast/')
|
const arr = config.url.split('sqx_fast/')
|
||||||
config.url= $urlMap[$env]+(arr.length>=2?arr[1]:arr[0])
|
config.url = "https://video.hnsiyao.cn/sqx_fast/" + (arr.length >= 2 ? arr[1] : arr[0])
|
||||||
|
// config.url = "https://video.hnsiyao.cn/sqx_fast/"
|
||||||
return config
|
return config
|
||||||
}, error => {
|
}, error => {
|
||||||
return Promise.reject(error)
|
return Promise.reject(error)
|
||||||
@@ -38,7 +40,7 @@ http.interceptors.request.use(config => {
|
|||||||
http.interceptors.response.use(response => {
|
http.interceptors.response.use(response => {
|
||||||
if (response.data && response.data.code === 401) { // 401, token失效
|
if (response.data && response.data.code === 401) { // 401, token失效
|
||||||
clearLoginInfo()
|
clearLoginInfo()
|
||||||
router.push({ name: 'login' })
|
router.push({name: 'login'})
|
||||||
}
|
}
|
||||||
return response
|
return response
|
||||||
}, error => {
|
}, error => {
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ const $headers = {
|
|||||||
"Access-Control-Allow-Origin": "*"
|
"Access-Control-Allow-Origin": "*"
|
||||||
};
|
};
|
||||||
const $config = {
|
const $config = {
|
||||||
region: "oss-cn-shanghai",
|
region: "oss-cn-nanjing",
|
||||||
accessKeyId: "",
|
accessKeyId: "",
|
||||||
accessKeySecret: "",
|
accessKeySecret: "",
|
||||||
bucket: "djvideo"
|
bucket: "sy-duanju"
|
||||||
}
|
}
|
||||||
import { Notification } from 'element-ui'
|
import { Notification } from 'element-ui'
|
||||||
function urlConversion(path) {
|
function urlConversion(path) {
|
||||||
|
|||||||
@@ -2164,8 +2164,8 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.url = fileRes.replace(
|
this.url = fileRes.replace(
|
||||||
"https://djvideo.oss-cn-shanghai.aliyuncs.com/",
|
"https://sy-duanju.oss-cn-nanjing.aliyuncs.com/",
|
||||||
"https://duanju.hnsiyao.cn/"
|
"https://short-video.hnsiyao.cn/"
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
onVideoFileSubmit(data) {
|
onVideoFileSubmit(data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user