提交 b2bc9d1a 编写于 作者: tao.wu's avatar tao.wu

no message

上级 865e7d1c
......@@ -83,6 +83,7 @@
<script>
import fetch from '@/utils/fetch'
import { envConfig } from '@/utils/env-config'
import { getQiniuToken, submitFeedback } from '@/utils/patients/patientsapi'
export default {
data(){
......@@ -131,7 +132,7 @@
this.$message.warning(`最多上传${this.imgLimit}张图片`);
return;
}
this.GET('/file/image/token').then((res) => {
getQiniuToken().then((res) => {
if(res.code=='000000'){
this.imgToken = res.data.token;
}else{
......@@ -156,15 +157,7 @@
contact_information: this.form.contact,
url: this.urlString,
};
fetch({
url: 'https://dev-api.yunqueyi.com/web/companys/feedback',
method: 'POST',
data,
headers:{
noSysCode: true,
"Content-Type": 'application/json'
}
}).then(res=>{
submitFeedback(data).then(res=>{
this.dialogFormVisible = false;
this.innerVisible = true;
})
......
......@@ -10,7 +10,7 @@ export const envConfig = {
// baseUrl: 'https://test1-sc.yunqueyi.com/',
//baseUrl: 'https://uat-sc.yunqueyi.com/',
baseUrl: 'https://dev-sc.yunqueyi.com/',
saasUrl: 'https://dev.yunqueyi.com',
apiUrl: 'https://dev-api.yunqueyi.com/',
qiniuFileUrl: "https://dev-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
qiniuImgUrl: "https://test1-file.yunqueyi.com",
......@@ -21,7 +21,7 @@ export const envConfig = {
},
dev: {
baseUrl: 'https://dev-sc.yunqueyi.com/',
saasUrl: 'https://dev.yunqueyi.com',
apiUrl: 'https://dev-api.yunqueyi.com/',
qiniuFileUrl: "https://dev-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
qiniuImgUrl: "https://test1-file.yunqueyi.com",
......@@ -32,7 +32,7 @@ export const envConfig = {
},
test: {
baseUrl: 'https://test1-sc.yunqueyi.com/',
saasUrl: 'https://test1.yunqueyi.com',
apiUrl: 'https://test1-api.yunqueyi.com/',
qiniuFileUrl: "https://test1-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
qiniuImgUrl: "https://test1-file.yunqueyi.com",
......@@ -43,7 +43,7 @@ export const envConfig = {
},
uat: {
baseUrl: 'https://uat-sc.yunqueyi.com/',
saasUrl: 'https://uat.yunqueyi.com',
apiUrl: 'https://uat-api.yunqueyi.com/',
qiniuFileUrl: "https://uat-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://video.yunqueyi.com", // 视频
qiniuImgUrl: "https://files.yunqueyi.com",
......@@ -54,7 +54,7 @@ export const envConfig = {
},
pro: {
baseUrl: 'https://sc.yunqueyi.com/',
saasUrl: 'https://api.yunqueyi.com',
apiUrl: 'https://api.yunqueyi.com/',
qiniuFileUrl: "https://sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://video.yunqueyi.com",
qiniuImgUrl: "https://files.yunqueyi.com",
......
......@@ -177,6 +177,11 @@ export function getSaasDomain(url) {
return getConfigByEnvType('saasDomainUrl') + url
}
// 获取saas端api域名地址
export function getSaasApiDomain(url) {
return getConfigByEnvType('apiUrl') + url
}
// 根据不同环境,生成URL
function getConfigByEnvType(urlType) {
return envConfig[process.env.BUILD_ENV][urlType]
......
import fetch from '../fetch';
import { getBaseUrl, getSaasDomain } from '@/utils/index'
import { getBaseUrl, getSaasDomain, getSaasApiDomain } from '@/utils/index'
const headers = {
......@@ -16,4 +16,28 @@ export const getDiseasesList = (params) => {
})
};
// 获取七牛上传token
export const getQiniuToken = (params) => {
return fetch({
headers,
url: getBaseUrl(`file/image/token`),
method: 'get',
params: params,
})
};
// 意见反馈 getSaasApiDomain
export const submitFeedback = (data) => {
return fetch({
headers: {
noSysCode: true,
"Content-Type": 'application/json'
},
url: getSaasApiDomain(`web/companys/feedback`),
method: 'post',
data: data,
})
};
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册