修改打包方式去除版本控制打包,修改app文件名称根据配置文件请求地址判断
This commit is contained in:
@@ -16,8 +16,8 @@ var env = ''; // 运行环境
|
|||||||
var DD = d.getDate() >= 10 ? d.getDate() : '0' + d.getDate()
|
var DD = d.getDate() >= 10 ? d.getDate() : '0' + d.getDate()
|
||||||
var h = d.getHours() >= 10 ? d.getHours() : '0' + d.getHours()
|
var h = d.getHours() >= 10 ? d.getHours() : '0' + d.getHours()
|
||||||
var mm = d.getMinutes() >= 10 ? d.getMinutes() : '0' + d.getMinutes()
|
var mm = d.getMinutes() >= 10 ? d.getMinutes() : '0' + d.getMinutes()
|
||||||
version = yy + MM + DD + h + mm
|
// version = yy + MM + DD + h + mm
|
||||||
versionPath = distPath + '/' + version
|
// versionPath = distPath + '/' + version
|
||||||
})()
|
})()
|
||||||
|
|
||||||
// 编译
|
// 编译
|
||||||
|
|||||||
10
src/config/index.js
Normal file
10
src/config/index.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
export const testUrl='video-admin';
|
||||||
|
export const productUrl='dj-admin';
|
||||||
|
|
||||||
|
// const baseUrl = "http://192.168.1.15:8100/sqx_fast/"
|
||||||
|
const baseUrl = "https://video.hnsiyao.cn/sqx_fast/"
|
||||||
|
// const baseUrl = "https://dj-api.hnsiyao.cn/sqx_fast/"
|
||||||
|
|
||||||
|
export default{
|
||||||
|
baseUrl
|
||||||
|
}
|
||||||
@@ -4,12 +4,13 @@ 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'
|
||||||
|
import config from '@/config/index.js'
|
||||||
export const entryName = '短剧13.2系统';
|
export const entryName = '短剧13.2系统';
|
||||||
|
|
||||||
|
|
||||||
|
const baseUrl = config.baseUrl
|
||||||
// const baseUrl = "http://192.168.1.15:8100/sqx_fast/"
|
// const baseUrl = "http://192.168.1.15:8100/sqx_fast/"
|
||||||
const baseUrl = "https://video.hnsiyao.cn/sqx_fast/"
|
// const baseUrl = "https://video.hnsiyao.cn/sqx_fast/"
|
||||||
// const baseUrl = "https://dj-api.hnsiyao.cn/sqx_fast/"
|
// const baseUrl = "https://dj-api.hnsiyao.cn/sqx_fast/"
|
||||||
|
|
||||||
// const $urlMap={
|
// const $urlMap={
|
||||||
|
|||||||
@@ -250,6 +250,8 @@
|
|||||||
import { getUUID } from "@/utils";
|
import { getUUID } from "@/utils";
|
||||||
import OSS from "@/utils/oss-upload.js";
|
import OSS from "@/utils/oss-upload.js";
|
||||||
import { $getCredentials } from "@/api/oss.js";
|
import { $getCredentials } from "@/api/oss.js";
|
||||||
|
import config from "@/config/index.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -402,8 +404,10 @@ export default {
|
|||||||
console.log(data);
|
console.log(data);
|
||||||
const date = new Date();
|
const date = new Date();
|
||||||
const houzhui = "." + data.name.substr(data.name.lastIndexOf(".") + 1);
|
const houzhui = "." + data.name.substr(data.name.lastIndexOf(".") + 1);
|
||||||
const name = "app/" + "test-duanju" + houzhui;
|
const isTest=config.baseUrl.includes('dj-api.hnsiyao.cn')?false:true
|
||||||
// const name = "app/" + "sy-duanju" + houzhui;
|
const appName=isTest?'test-duanju':'sy-duanju'
|
||||||
|
const name = "app/" + appName + houzhui;
|
||||||
|
console.log(name);
|
||||||
const fileRes = await this.ossClient.partUpload(name, data.raw, (p) => {
|
const fileRes = await this.ossClient.partUpload(name, data.raw, (p) => {
|
||||||
this.percentage = Math.floor(p * 100);
|
this.percentage = Math.floor(p * 100);
|
||||||
console.log(this.percentage);
|
console.log(this.percentage);
|
||||||
|
|||||||
Reference in New Issue
Block a user