master
xy 3 years ago
parent 3373b1b0d1
commit 5b3cd3f923

@ -5,3 +5,4 @@ ENV = 'development'
VUE_APP_BASE_API = http://weiyuan-ziliao-test.ali251.langye.net
VUE_APP_UPLOAD_API = http://weiyuan-ziliao-test.ali251.langye.net/api/admin/upload-file
VUE_APP_AUTH_BASE_API = https://sso.szhct.edu.cn/cas/oauth2.0/authorize
VUE_APP_VIEW_API=http://view.ali251.langye.net:8012/onlinePreview

@ -1,7 +1,11 @@
# just a flag
ENV = 'production'
ENV='production'
# base api
VUE_APP_BASE_API = http://weiyuan-ziliao-test.ali251.langye.net
VUE_APP_UPLOAD_API = http://weiyuan-ziliao-test.ali251.langye.net/api/admin/upload-file
VUE_APP_AUTH_BASE_API = https://sso.szhct.edu.cn/cas/oauth2.0/authorize
#VUE_APP_BASE_API=http://192.168.105.242
VUE_APP_BASE_API = https://zlhb.szhct.edu.cn
#VUE_APP_UPLOAD_API=http://192.168.105.242/api/admin/upload-file
VUE_APP_UPLOAD_API = https://zlhb.szhct.edu.cn/api/admin/upload-file
VUE_APP_AUTH_BASE_API=https://sso.szhct.edu.cn/cas/oauth2.0/authorize
#VUE_APP_AUTH_BASE_API = https://zlhb.szhct.edu.cn/cas/oauth2.0/authorize
VUE_APP_VIEW_API=https://zlhbview.szhct.edu.cn/onlinePreview

@ -87,7 +87,6 @@
},
methods: {
handleImgUpload(blobInfo, success, failure) {
console.log("我要上传", blobInfo);
let self = this;
let file = blobInfo.blob();
const isLt2M = file.size / 1024 < 2048;
@ -100,6 +99,7 @@
uploads(formdate).then(res => {
if (res) {
let url = res.url;
console.log(url,333)
success(url); //url
} else {
failure(res.errmsg);

@ -33,7 +33,9 @@ router.beforeEach(async(to, from, next) => {
})
} else {
let redirectUri = encodeURIComponent(window.location.href)
window.location.href = `${process.env.VUE_APP_AUTH_BASE_API}?client_id=d05e4c9d07f705ef&redirect_uri=${redirectUri}&response_type=code&scope=base_api&state=wyd`
let client_id = 'db85478e4dd36937'
//let client_id = 'd05e4c9d07f705ef' dev
window.location.href = `${process.env.VUE_APP_AUTH_BASE_API}?client_id=${client_id}&redirect_uri=${redirectUri}&response_type=code&scope=base_api&state=wyd`
}
}

@ -398,7 +398,7 @@ export default {
res[i._relations.link_with_name] instanceof Array
? res[i._relations.link_with_name].map((i) => {
return {
name: i?.name,
name: i?.original_name,
url: i?.url,
response: i,
};

@ -620,7 +620,7 @@ export default {
prop: i.field,
label: i.name,
width: i.width,
fixed: i.field === 'biaoti' ? 'left' : 'center',
align: i.field === 'biaoti' ? 'left' : 'center',
},
linkOb
);

@ -14,6 +14,7 @@
:before-upload="beforeUpload"
:on-success="onSuccess"
:on-remove="onRemove"
multiple
:on-error="onError">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<el-button style="margin-left: 10px;" size="small" type="success" @click="$refs['upload'].submit()"></el-button>
@ -83,7 +84,13 @@ export default {
watch: {
'form.id_material_fujian_uploads_material_id_relation': {
handler (newVal) {
this.fileList = newVal
this.fileList = newVal.map(i => {
return {
name: i?.original_name,
url: i?.url,
response: i,
}
})
},
deep: true
}

@ -97,7 +97,7 @@ export default {
}).catch(err => this.loading = false)
},
open(e) {
this.codeUri = `http://view.ali251.langye.net:8012/onlinePreview?url=${encodeURIComponent(
this.codeUri = `${process.env.VUE_APP_VIEW_API}?url=${encodeURIComponent(
new Buffer(e.url).toString("base64")
)}`;
@ -166,6 +166,9 @@ export default {
position: relative;
left: 50%;
}
.content {
overflow: scroll;
}
.file {
margin-top: 10px;

@ -250,7 +250,7 @@ export default {
},
methods: {
open (e) {
this.codeUri = `http://view.ali251.langye.net:8012/onlinePreview?url=${encodeURIComponent(new Buffer(e.url).toString('base64'))}`
this.codeUri = `${process.env.VUE_APP_VIEW_API}?url=${encodeURIComponent(new Buffer(e.url).toString('base64'))}`
this.showModal = true
//window.open(`http://view.ali251.langye.net:8012/onlinePreview?url=${codeUri}`)

@ -57,7 +57,7 @@
:command="item"
v-for="item in uploadsList"
>
{{ item.name }}
{{ item.original_name }}
</el-dropdown-item>
</template>
<template v-else>
@ -236,7 +236,7 @@ export default {
},
open(e) {
this.codeUri = `http://view.ali251.langye.net:8012/onlinePreview?url=${encodeURIComponent(
this.codeUri = `${process.env.VUE_APP_VIEW_API}?url=${encodeURIComponent(
new Buffer(e.url).toString("base64")
)}`;

Loading…
Cancel
Save