105 lines
2.6 KiB
TypeScript
105 lines
2.6 KiB
TypeScript
![]() |
import { UserLanguage } from '@/utils/const';
|
|||
|
import { request } from '@/utils/request.ts';
|
|||
|
export function getTemplateDetailByCode(templateCode: string) {
|
|||
|
return request({
|
|||
|
url: '/api/sys/template/getTemplateDetailByCode',
|
|||
|
method: 'GET',
|
|||
|
data: {
|
|||
|
qcc_language: UserLanguage,
|
|||
|
templateCode
|
|||
|
}
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
export function getCountryList() {
|
|||
|
return request({
|
|||
|
url: '/api/common/getCountry',
|
|||
|
method: 'GET'
|
|||
|
});
|
|||
|
}
|
|||
|
export function getStateList(pid: string) {
|
|||
|
return request({
|
|||
|
url: `/api/common/getStates?pid=${pid}`,
|
|||
|
method: 'GET'
|
|||
|
});
|
|||
|
}
|
|||
|
export function getCityList(pid: string) {
|
|||
|
return request({
|
|||
|
url: `/api/common/getCity?pid=${pid}`,
|
|||
|
method: 'GET'
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
/**
|
|||
|
* 查询mt账户列表
|
|||
|
* GET /app/common/mt/login
|
|||
|
* 接口ID:194898720
|
|||
|
* 接口地址:https://app.apifox.com/link/project/4728063/apis/api-194898720
|
|||
|
* @return
|
|||
|
*/
|
|||
|
export function getMtLoginList() {
|
|||
|
return request({
|
|||
|
url: '/api/app/common/mt/login',
|
|||
|
method: 'GET'
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
export function imgUpload(res: any) {
|
|||
|
// const formData = new FormData();
|
|||
|
// formData.append('file', file);
|
|||
|
return new Promise((resolve, reject) => {
|
|||
|
uni.uploadFile({
|
|||
|
url: '/api/ossUpload/imgUpload',
|
|||
|
name: 'file',
|
|||
|
filePath: res.tempFilePaths[0],
|
|||
|
success: function (res) {
|
|||
|
resolve(JSON.parse(res.data));
|
|||
|
},
|
|||
|
fail: function (err) {
|
|||
|
reject(err);
|
|||
|
}
|
|||
|
});
|
|||
|
});
|
|||
|
// return request({
|
|||
|
// url: '/api/ossUpload/imgUpload',
|
|||
|
// method: 'POST',
|
|||
|
// header: {
|
|||
|
// 'content-type': 'multipart/form-data'
|
|||
|
// },
|
|||
|
// data: formData
|
|||
|
// });
|
|||
|
}
|
|||
|
|
|||
|
export function getDictByCode(dict_code: string) {
|
|||
|
return request({ url: `/api/app/common/getDictByCode?dict_code=${dict_code}&qcc_language=${UserLanguage}`, method: 'GET' });
|
|||
|
}
|
|||
|
|
|||
|
export function getImgPath() {
|
|||
|
return request({ url: '/api/app/common/getImgPath', method: 'GET' });
|
|||
|
}
|
|||
|
|
|||
|
export function getFilePath() {
|
|||
|
return request({ url: '/api/app/common/getFilePath', method: 'GET' });
|
|||
|
}
|
|||
|
|
|||
|
/**
|
|||
|
* 查询出金转账配置(querySys)
|
|||
|
* GET /app/common/querySys
|
|||
|
* 接口ID:205933296
|
|||
|
* 接口地址:https://app.apifox.com/link/project/4728063/apis/api-205933296
|
|||
|
* @return
|
|||
|
*/
|
|||
|
export function getSys() {
|
|||
|
return request({ url: '/api/app/common/querySys', method: 'GET' });
|
|||
|
}
|
|||
|
|
|||
|
export function getMtServers(data: { qcc_language: string; server_type: string }) {
|
|||
|
return request({ url: '/api/app/common/mt/server', method: 'GET', data });
|
|||
|
}
|
|||
|
export function getCustomerMtLoginList(data: Record<string, any>) {
|
|||
|
return request({ url: '/api/app/capital/getMtLoginList', method: 'GET', data });
|
|||
|
}
|
|||
|
|
|||
|
export function getMtGroup(data: { qcc_mt_server: [string, number] }) {
|
|||
|
return request({ url: '/api/app/common/getMtGroup', method: 'GET', data });
|
|||
|
}
|