2023-01-06 16:00:15 +08:00
|
|
|
import axios from 'axios'
|
|
|
|
|
// import qs from 'qs'
|
|
|
|
|
// import message from '@/components/public/message/src'
|
|
|
|
|
import router from '@/router/index'
|
2024-03-28 15:11:57 +08:00
|
|
|
import {getCookie,clonAllCookie} from '@/tool/cookie'
|
2023-01-06 16:00:15 +08:00
|
|
|
// import cookie from '@/tools/cookie.js'
|
|
|
|
|
|
|
|
|
|
axios.defaults.timeout = 60000; //响应时间
|
2023-07-26 15:54:34 +08:00
|
|
|
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'; //配置请求头
|
|
|
|
|
axios.defaults.headers.post["Content-Type"] = "application/json";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
axios.defaults.headers.post['lang'] = 'en'; //配置语言请求头
|
2023-01-06 16:00:15 +08:00
|
|
|
axios.defaults.withCredentials = true; //跨域携带cookie
|
|
|
|
|
import { message } from 'ant-design-vue';
|
2024-06-17 14:10:25 +08:00
|
|
|
import store from '@/store';
|
2023-08-05 12:52:56 +08:00
|
|
|
// if(process.env.NODE_ENV == "development"){
|
|
|
|
|
// axios.defaults.baseURL = ""; //配置接口地址
|
|
|
|
|
// }else{
|
|
|
|
|
// axios.defaults.baseURL = process.env.VUE_APP_BASE_URL; //配置接口地址
|
|
|
|
|
// }
|
2023-10-11 17:34:14 +08:00
|
|
|
// let httpIp
|
|
|
|
|
// if(process.env.NODE_ENV == 'development'){
|
|
|
|
|
// httpIp = 'http://192.168.1.12:10086'
|
|
|
|
|
// }else{
|
|
|
|
|
// httpIp = ''
|
|
|
|
|
// }
|
2024-02-19 09:38:47 +08:00
|
|
|
let httpIp = process.env.NODE_ENV == 'development' ? "" : "";
|
2024-07-08 09:42:21 +08:00
|
|
|
// let httpIp = process.env.NODE_ENV == 'development' ? "https://192.168.1.8:10086" : "";
|
2024-01-26 14:43:20 +08:00
|
|
|
|
2024-07-08 09:42:21 +08:00
|
|
|
axios.defaults.baseURL = httpIp; //配置接口地址
|
2024-04-25 15:08:45 +08:00
|
|
|
// console.log(axios.defaults.baseURL);
|
2024-07-08 16:43:36 +08:00
|
|
|
axios.defaults.baseURL = process.env.VUE_APP_BASE_URL; //配置接口地址
|
2024-01-26 14:43:20 +08:00
|
|
|
|
2024-06-17 09:39:01 +08:00
|
|
|
// 创建取消令牌
|
2024-06-17 14:10:25 +08:00
|
|
|
const CancelToken = axios.CancelToken;
|
|
|
|
|
const source = CancelToken.source();
|
2023-09-12 10:11:27 +08:00
|
|
|
// console.log(process.env.VUE_APP_BASE_URL);
|
2025-04-23 09:39:24 +08:00
|
|
|
const filterHttpsUrl = ['/api/portfolio/page','/api/portfolio/detail','/api/account/preLogin','/api/account/schoolLogin','/api/account/enterpriseLogin']
|
2023-01-06 16:00:15 +08:00
|
|
|
//POST传参序列化(添加请求拦截器)
|
|
|
|
|
axios.interceptors.request.use((config) => {
|
|
|
|
|
//在发送请求之前做某件事
|
2024-06-17 14:10:25 +08:00
|
|
|
// config.cancelToken = source.token
|
2023-01-06 16:00:15 +08:00
|
|
|
if(config.method === 'post' || config.method === 'put' || config.method === 'delete'){
|
|
|
|
|
// config.data = qs.stringify(config.data);
|
|
|
|
|
// config.data = JSON.stringify(config.data);
|
|
|
|
|
}
|
2024-01-17 17:52:40 +08:00
|
|
|
// config.headers.Authorization = 'Bearer-eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiIyIiwic3ViIjoie1wiaWRcIjoyLFwidXNlcm5hbWVcIjpcImxpcnNcIn0iLCJpYXQiOjE2NjU3NDEwODcsImlzcyI6IkRXSiIsImF1dGhvcml0aWVzIjoiW10iLCJleHAiOjE2NzQzODEwODd9.ShM9R_NNFD7oo1OvxrEgg7PFeWinOuAKkuInUCMQupp66s64Hhv8tN0Wwr83nIN4rHPqtn95wmd4msWcvaFYJA';
|
2024-12-19 17:59:00 +08:00
|
|
|
if(filterHttpsUrl.indexOf(config.url) == -1){
|
|
|
|
|
config.headers.Authorization = getCookie('token');
|
|
|
|
|
}else{
|
|
|
|
|
config.headers.Authorization = '';
|
|
|
|
|
}
|
2023-01-06 16:00:15 +08:00
|
|
|
return config;
|
|
|
|
|
},(error) =>{
|
|
|
|
|
return Promise.reject(error);
|
|
|
|
|
});
|
2024-06-17 09:39:01 +08:00
|
|
|
let isLoginTime = false
|
2025-04-16 10:43:54 +08:00
|
|
|
const binaryToUrl = (binary,type = 'application/octet-stream',res)=>{
|
|
|
|
|
let blob = new Blob([binary], {'content-type':res.headers['content-type']});
|
2025-04-01 15:25:15 +08:00
|
|
|
let url = URL.createObjectURL(blob);
|
|
|
|
|
return url
|
|
|
|
|
}
|
2023-01-06 16:00:15 +08:00
|
|
|
//返回状态判断(添加响应拦截器)
|
|
|
|
|
axios.interceptors.response.use((res) =>{
|
2023-10-11 17:34:14 +08:00
|
|
|
// if(res.data.data == null){
|
|
|
|
|
// message.warning(res.data.errMsg)
|
|
|
|
|
// return Promise.reject(res.data);
|
|
|
|
|
// }else
|
2025-04-01 15:25:15 +08:00
|
|
|
if(res.config.env.binary){
|
2025-04-16 10:43:54 +08:00
|
|
|
let url = binaryToUrl(res.data,res.config.env.binaryType,res)
|
2025-04-01 15:25:15 +08:00
|
|
|
return Promise.resolve({url,data:res.data})
|
|
|
|
|
}
|
2023-10-11 17:34:14 +08:00
|
|
|
if (res.data) {
|
2024-04-24 13:36:27 +08:00
|
|
|
if (res.data.errCode === 0) {
|
2023-10-11 17:34:14 +08:00
|
|
|
// message.error(res.data.errMsg)
|
2023-01-06 16:00:15 +08:00
|
|
|
return Promise.resolve(res.data.data);
|
2023-11-16 17:23:17 +08:00
|
|
|
} else if(res.data.errCode === 1){
|
2023-11-20 09:47:10 +08:00
|
|
|
message.warning(res.data.errMsg)
|
2023-01-06 16:00:15 +08:00
|
|
|
return Promise.reject(res.data);
|
2023-11-16 17:23:17 +08:00
|
|
|
} else if(res.data.errCode === 2){
|
|
|
|
|
return Promise.reject(res.data);
|
|
|
|
|
}else if(res.data.errCode === -1){
|
|
|
|
|
message.error(res.data.errMsg)
|
|
|
|
|
return Promise.reject(res.data);
|
|
|
|
|
}
|
2023-10-11 17:34:14 +08:00
|
|
|
|
2023-01-06 16:00:15 +08:00
|
|
|
} else {
|
2023-11-16 17:23:17 +08:00
|
|
|
if (res.data.errCode === 0) {
|
|
|
|
|
message.warning(res.data.errMsg)
|
|
|
|
|
return Promise.reject(res.data);
|
|
|
|
|
} else if(res.data.errCode === 1){
|
2023-11-20 09:47:10 +08:00
|
|
|
message.warning(res.data.errMsg)
|
2023-11-16 17:23:17 +08:00
|
|
|
return Promise.reject(res.data);
|
|
|
|
|
} else if(res.data.errCode === 2){
|
|
|
|
|
return Promise.reject(res.data);
|
|
|
|
|
}else if(res.data.errCode === -1){
|
|
|
|
|
message.error(res.data.errMsg)
|
|
|
|
|
return Promise.reject(res.data);
|
|
|
|
|
}
|
2023-01-06 16:00:15 +08:00
|
|
|
}
|
|
|
|
|
}, function(error) {
|
2024-01-16 10:40:36 +08:00
|
|
|
if(error?.response?.status === 401 && router.currentRoute._value.name != 'setIdentification'){//如果是记录浏览器页面就不跳转login
|
2024-09-28 10:45:06 +08:00
|
|
|
// return
|
2024-08-13 09:36:13 +08:00
|
|
|
clonAllCookie()
|
2024-06-17 09:39:01 +08:00
|
|
|
if(!isLoginTime){
|
|
|
|
|
isLoginTime = true
|
2024-07-29 17:30:24 +08:00
|
|
|
let isSystemUserRouteList = ['/Square']//如果是这两个页面就无需跳转未登录页
|
|
|
|
|
let sSystemUser = false
|
|
|
|
|
for (let index = 0; index < isSystemUserRouteList.length; index++) {
|
|
|
|
|
if(router.currentRoute.value.path.indexOf(isSystemUserRouteList[index]) > -1){
|
|
|
|
|
sSystemUser = true
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(!sSystemUser){
|
2024-12-19 13:47:55 +08:00
|
|
|
router.replace('/')
|
2024-07-29 17:30:24 +08:00
|
|
|
}
|
2024-06-26 17:26:31 +08:00
|
|
|
message.warning('Please login and try again~')
|
2024-12-18 17:38:43 +08:00
|
|
|
store.commit('createDetail')
|
2025-04-09 14:09:19 +08:00
|
|
|
store.commit('createProbject')
|
2024-06-17 09:39:01 +08:00
|
|
|
setTimeout(()=>[
|
|
|
|
|
isLoginTime = false
|
|
|
|
|
],2000)
|
|
|
|
|
}
|
2024-06-17 14:10:25 +08:00
|
|
|
// source.cancel('取消后续接口调用');
|
2023-01-06 16:00:15 +08:00
|
|
|
return Promise.reject()
|
|
|
|
|
}
|
|
|
|
|
let data_new = error?.response?.data
|
2023-11-16 17:23:17 +08:00
|
|
|
// message.error(data_new?.errMsg || 'Error: server exception')
|
2023-01-06 16:00:15 +08:00
|
|
|
return Promise.reject(data_new);
|
|
|
|
|
});
|
|
|
|
|
export const Https = {
|
|
|
|
|
httpUrls: {
|
|
|
|
|
interfaceUrl: '',
|
2024-12-11 16:26:36 +08:00
|
|
|
parseGoogleCredential:'/api/third/party/parseGoogleCredential',//谷歌登录注册
|
|
|
|
|
parseWeChatCode:'/api/third/party/parseWeChatCode',//微信登录
|
2023-01-06 16:00:15 +08:00
|
|
|
accountIsLogin:'/api/account/isLogin', //判断用户是否登录
|
2023-09-25 10:09:00 +08:00
|
|
|
accountLogin:`/api/account/login`, //账号密码登录接口
|
2025-04-16 10:43:54 +08:00
|
|
|
organizationNameSearch:`/api/account/organizationNameSearch`, //查询学校或者企业版名字
|
2024-01-31 15:10:45 +08:00
|
|
|
getUserLanguage:`/api/account/getUserLanguage`, //获取当前用户语言
|
|
|
|
|
changeUserLanguage:`/api/account/changeUserLanguage`, //切换用户当前语言
|
2024-08-23 10:19:02 +08:00
|
|
|
uploadAvatar:`/api/account/uploadAvatar`, //修改头像
|
2025-01-07 17:15:28 +08:00
|
|
|
editUserName:`/api/account/editUserName`, //修改用户名
|
2025-01-13 11:27:04 +08:00
|
|
|
updateUserInfo:`/api/account/updateUserInfo`, //修改国家职业
|
2024-12-11 16:26:36 +08:00
|
|
|
accountDetail:`/api/account/getAccountDetail`, //用户详细信息
|
2023-11-09 16:55:20 +08:00
|
|
|
|
2023-11-20 17:37:32 +08:00
|
|
|
trialUserLogout:`/account/trialUserLogout`, //试用用户退出登录接口
|
2023-12-13 16:09:17 +08:00
|
|
|
completeGuidancet:`/api/account/completeGuidance`, //用户指引结束
|
2024-01-05 14:12:03 +08:00
|
|
|
|
2024-01-15 17:05:55 +08:00
|
|
|
getExpiredTime:`/api/account/getExpiredTime`, //获取用户到期时间
|
|
|
|
|
|
|
|
|
|
addNoLoginRequired:`/api/third/party/addNoLoginRequired`, //机房用户注册
|
|
|
|
|
deleteNoLoginRequired:`/api/third/party/deleteNoLoginRequired`, //机房用户注销
|
|
|
|
|
noLoginRequired:`api/account/noLoginRequired`, //机房用户登录
|
|
|
|
|
existNoLoginRequired:`/api/third/party/existNoLoginRequired`, //获取唯一标识是否存在
|
2024-01-17 17:52:40 +08:00
|
|
|
|
|
|
|
|
deleteNoLoginRequiredNew:`/api/third/party/deleteNoLoginRequiredNew`, //机房用户注销
|
|
|
|
|
addNoLoginRequiredNew:`api/third/party/addNoLoginRequiredNew`, //机房用户注册
|
2024-09-13 11:28:09 +08:00
|
|
|
updateNoLoginRequiredNew:`api/third/party/updateNoLoginRequiredNew`, //机房用户更新
|
2024-01-17 17:52:40 +08:00
|
|
|
|
|
|
|
|
endpoint:`api/third/party/your-secured-endpoint`, //获取唯一标识是否存在
|
2023-12-13 16:09:17 +08:00
|
|
|
|
2024-01-05 14:12:03 +08:00
|
|
|
|
2024-06-17 09:39:01 +08:00
|
|
|
designWorksRegister:'/api/account/designWorksRegister', //注册
|
|
|
|
|
designWorksRegisterCode:'/api/account/designWorksRegisterCode', //注册
|
|
|
|
|
|
2024-01-15 17:05:55 +08:00
|
|
|
|
2023-01-06 16:00:15 +08:00
|
|
|
preLogin:'/api/account/preLogin',//预先登入
|
2025-04-23 09:39:24 +08:00
|
|
|
schoolLogin:'/api/account/schoolLogin',//学校管理员登录
|
|
|
|
|
enterpriseLogin:'/api/account/enterpriseLogin',//企业管理员登录
|
2023-09-25 10:09:00 +08:00
|
|
|
accountSendEmail:`/api/account/sendEmail`, //发送邮件
|
2023-01-06 16:00:15 +08:00
|
|
|
accountResetPwd:'/api/account/resetPwd', //忘记密码修改
|
|
|
|
|
accountLogout:'/api/account/logout',//登出
|
|
|
|
|
accountBindEmail:'/api/account/bindEmail', //绑定邮箱
|
2024-12-18 17:38:43 +08:00
|
|
|
bindGoogle:'/api/account/bindGoogle', //绑定谷歌
|
|
|
|
|
bindWeChat:'/api/account/bindWeChat', //绑定微信
|
|
|
|
|
unbindGoogle:`/api/account/unbindGoogle`, //取消绑定谷歌
|
|
|
|
|
unbindWeChat:'/api/account/unbindWeChat', //取消绑定微信
|
2023-01-06 16:00:15 +08:00
|
|
|
elementGeneratePrint:'/api/element/generatePrint', //生成印花
|
|
|
|
|
elementSavePrint:'/api/element/savePrint',//保存印花
|
|
|
|
|
getRgbByTcx:'/api/element/getRgbByTcx', // 通过hsv值获取潘通信息
|
|
|
|
|
getRgbByHsv:'/api/element/getRgbByHsv', //通过hsv值获取潘通信息
|
2024-02-21 09:32:32 +08:00
|
|
|
designCollection:`/api/design/designCollection`, //设计 Conllection
|
2023-10-11 17:34:14 +08:00
|
|
|
reDesignCollection:`/api/design/reDesignCollection`,//重新设计 Conllection
|
2023-01-06 16:00:15 +08:00
|
|
|
countDesignProcess:'/api/design/countDesignProcess', //统计design进度
|
2024-12-11 16:26:36 +08:00
|
|
|
getDesignResult:'/api/design/getDesignResult', //查询design结果
|
2025-01-07 17:15:28 +08:00
|
|
|
designSort:`/api/design/sort`, //design排序
|
2024-12-11 16:26:36 +08:00
|
|
|
|
2023-10-11 17:34:14 +08:00
|
|
|
designProcess:`/api/design/designProcess`, //统计design进度
|
2023-12-14 12:09:29 +08:00
|
|
|
designGetModel:`/api/design/getModel`, //导出获取模特链接
|
2024-02-19 09:38:47 +08:00
|
|
|
|
|
|
|
|
//充值相关
|
|
|
|
|
productList:`/api/product/list`, //获取商品列表
|
2024-02-29 17:16:51 +08:00
|
|
|
payAlipay:`/api/ali-pay/trade/page/pay`, //支付宝确认支付
|
2024-05-28 16:00:26 +08:00
|
|
|
payAlipayHK:`/api/alipay-hk/createOrder`, //香港支付宝确认支付
|
2024-07-17 16:20:26 +08:00
|
|
|
payStripe:`/api/stripe/createOrder`, //Stripe支付
|
2024-02-29 17:16:51 +08:00
|
|
|
payPaypal:`/api/paypal/trade`, //paypal确认支付
|
2024-03-08 11:19:33 +08:00
|
|
|
getCredits:`/api/credits/getCredits`, //查询用户积分
|
2024-12-18 17:38:43 +08:00
|
|
|
|
|
|
|
|
cancelSubscription:`/api/stripe/cancelSubscription`, //取消订阅
|
2024-03-08 11:19:33 +08:00
|
|
|
|
2024-02-19 09:38:47 +08:00
|
|
|
orderInfoList:`/api/order-info/list`, //查询订单列表
|
2024-03-15 17:23:25 +08:00
|
|
|
getCreditsDetail:`/api/credits/getCreditsDetail`, //查询积分列表
|
2024-02-29 17:16:51 +08:00
|
|
|
tradeRefundAlipay:`/api/ali-pay/trade/refund`, //支付宝退款
|
|
|
|
|
tradeRefundPaypal:`/api/paypal/trade/refund`, //paypal退款
|
|
|
|
|
|
2024-02-19 09:38:47 +08:00
|
|
|
tradeQuery:`/api/ali-pay/trade/query/{orderNo}`, //查询订单状态
|
2023-10-11 17:34:14 +08:00
|
|
|
|
2023-09-25 10:09:00 +08:00
|
|
|
getRgbByHsvBatch:`/api/element/getRgbByHsvBatch`, //通过hsv值数组批量获取潘通信息
|
2023-10-11 17:34:14 +08:00
|
|
|
designLike:`/api/design/like`, //Design Like
|
|
|
|
|
designDislike: `/api/design/dislike`, //Design Dislike
|
|
|
|
|
queryUserGroup:`/api/history/queryUserGroup`, //History用户分页分组列表
|
|
|
|
|
deleteUserGroup:`/api/history/deleteUserGroup`, //History删除用户分组
|
|
|
|
|
updateUserGroupName:`/api/history/updateUserGroupName`, //History修改用户分组名
|
|
|
|
|
historyChoose:`/api/history/choose`, //History choose
|
2023-09-25 10:09:00 +08:00
|
|
|
getDesignDetail:`/api/design/detail/getDetail`,//查询design详情
|
2024-09-25 11:07:49 +08:00
|
|
|
designSingleWithGradient:`/api/design/detail/designSingleWithGradient`,//查询需要更新mask列表
|
2023-01-06 16:00:15 +08:00
|
|
|
getNextSysElement:'/api/design/detail/getNextSysElement',//切换系统的element
|
|
|
|
|
detailPrintDot:'/api/design/detail/printDot',//print打点预览
|
2023-09-25 10:09:00 +08:00
|
|
|
designSingle:`/api/design/detail/designSingle`,//单个design
|
2023-10-11 17:34:14 +08:00
|
|
|
queryLibraryPage:`/api/library/queryLibraryPage`,//Library分页列表
|
|
|
|
|
libraryUpload:`/api/library/upload`, // Library文件上传
|
|
|
|
|
setSketchLibrary:`/api/library/updateLibraryLevel2Type`, // Library文件上传
|
|
|
|
|
|
2023-11-09 10:16:18 +08:00
|
|
|
queryClassification:`/api/classification/queryClassification`,//标签类别查询
|
|
|
|
|
saveOrUpdate:`/api/classification/saveOrUpdate`,//标签类别新增修改
|
2023-11-09 13:49:10 +08:00
|
|
|
classificationDelete:`/api/classification/delete`,//标签类别新增修改
|
2023-11-13 17:33:41 +08:00
|
|
|
relationLibrary:`/api/classification/relationLibrary`,//标签类别新增修改
|
2023-11-16 09:44:53 +08:00
|
|
|
getRelClassificationIdList:`/api/classification/getRelClassificationIdList`,//标签类别新增修改
|
2024-01-04 14:51:57 +08:00
|
|
|
getRelPublicClassificationIdList:`/api/classification/getRelPublicClassificationIdList`,//多选获取公共标签
|
|
|
|
|
editRelPublicClassificationIdList:`/api/classification/editRelPublicClassificationIdList`,//多选修改公共标签
|
2023-11-16 09:44:53 +08:00
|
|
|
|
2025-04-01 15:25:15 +08:00
|
|
|
//模块化
|
|
|
|
|
saveOrUpdate:`/api/project/saveOrUpdate`,//模块化新增修改
|
|
|
|
|
getModuleContent:`/api/project/getModuleContent`,//获取模块内容
|
|
|
|
|
saveModuleContent:`/api/project/saveModuleContent`,//储存模块内容
|
|
|
|
|
historyProject:`/api/project/page`,//项目记录
|
2025-04-09 14:09:19 +08:00
|
|
|
projectDetail:`/api/project/delete`,//删除项目
|
2025-04-01 15:25:15 +08:00
|
|
|
//3d
|
|
|
|
|
threeDPage:`/api/project/threeDPage`,
|
|
|
|
|
downloadZip:`/api/project/downloadZip`,//下载zip
|
|
|
|
|
getThreeDSize:`/api/project/getThreeDSize`,//下载列表
|
|
|
|
|
getLayoutDetail:`/api/project/getLayoutDetail`,//获取3d详情
|
|
|
|
|
getThreeDGlb:`/api/project/getThreeDGlb`,
|
|
|
|
|
selectHistoryProject:`/api/project/choose`,//选择项目
|
|
|
|
|
getMannequinDetail:`/api/project/getMannequinDetail`,//模块化查看模特点位
|
|
|
|
|
modifyProportion:`/api/generate/modifyProportion`,//模特拉伸
|
2025-04-09 14:09:19 +08:00
|
|
|
addSysModelToLib:`/api/library/addSysModelToLib`,
|
2025-04-01 15:25:15 +08:00
|
|
|
poselikeOrDisike:`/api/generate/likeOrDislike`,//postTransform like
|
2025-04-09 14:09:19 +08:00
|
|
|
getAllPose:`/api/generate/getAllPose`,//获取动作
|
|
|
|
|
|
|
|
|
|
|
2025-04-01 15:25:15 +08:00
|
|
|
|
|
|
|
|
//拼贴
|
|
|
|
|
genSketchRecon:`/api/generate/genSketchRecon`,
|
|
|
|
|
saveReconCanvas:`/api/generate/saveReconCanvas`,
|
|
|
|
|
|
|
|
|
|
//动作变换
|
|
|
|
|
poseTransform:`/api/generate/poseTransform`,
|
|
|
|
|
poseTransformResult:`/api/generate/poseTransformResult`,
|
2023-11-09 10:16:18 +08:00
|
|
|
|
2023-01-06 16:00:15 +08:00
|
|
|
batchUpdateLibraryName:'/api/library/batchUpdateLibraryName',//Library修改用户文件名
|
|
|
|
|
batchDeleteLibrary:'/api/library/batchDeleteLibrary',//删除library
|
|
|
|
|
queryLibraryTopAndBottomPage:'/api/library/queryLibraryTopAndBottomPage',//Library分页列表(查询top和bottom)
|
|
|
|
|
saveOrEditTemplatePoint:'/api/library/saveOrEditTemplatePoint',//保存或者编辑template打点
|
|
|
|
|
libraryModelsDot:'/api/library/modelsDot',//Models打点预览
|
2023-10-11 17:34:14 +08:00
|
|
|
chatStreamTest:`/api/python/chatStream`,//机器人助力
|
|
|
|
|
pictureLikeOrUnLike:`/api/python/pictureLikeOrUnLike`,//机器人生成图喜欢
|
|
|
|
|
getBloodBars:`/api/python/getBloodBars`,//机器人血条
|
2024-05-22 10:45:52 +08:00
|
|
|
//工作空间
|
2024-01-26 14:43:20 +08:00
|
|
|
workspaceDetail:`/api/workspace/detail`,//用户习惯详情
|
2023-10-11 17:34:14 +08:00
|
|
|
workspaceenumValues:`/api/workspace/enumValues`,//getSex
|
2023-09-25 10:09:00 +08:00
|
|
|
|
2024-01-26 14:43:20 +08:00
|
|
|
workspaceRemove:`/api/workspace/remove`,//删除用户习惯详情
|
|
|
|
|
workspacesaveOrUpdate:`/api/workspace/saveOrUpdate`,//修改用户习惯详情
|
|
|
|
|
getMannequins:`/api/workspace/getMannequins`,//模特
|
2024-05-22 10:45:52 +08:00
|
|
|
getStyleList:`/api/workspace/styleList`,//获取所有风格列表
|
2023-09-25 10:09:00 +08:00
|
|
|
|
2024-01-26 14:43:20 +08:00
|
|
|
workspaceList:`/api/workspace/list`,
|
2023-08-21 10:55:39 +08:00
|
|
|
sketchAndPrintGenerate:'/api/generate/sketchAndPrint',//sketchGenerate生成图片
|
2024-01-21 14:47:41 +08:00
|
|
|
|
|
|
|
|
generatePrepare:'/api/generate/prepare',//开始生成generate图片
|
|
|
|
|
generateStopWaiting:'/api/generate/stopWaiting',//取消生成
|
|
|
|
|
generateResult:'/api/generate/result',//获取生成结果
|
2023-09-12 10:11:27 +08:00
|
|
|
generateLike:'/api/generate/like',//喜欢ganerate图片
|
2023-09-25 10:09:00 +08:00
|
|
|
generateDislike:'/api/generate/dislike',//喜欢ganerate图片
|
2024-09-25 11:07:49 +08:00
|
|
|
imageToSketch:'/api/generate/imageToSketch',//成品图转为线稿
|
|
|
|
|
modifySketch:'/api/generate/modifySketch',//修改画布内容并且储存
|
|
|
|
|
|
2023-10-11 17:34:14 +08:00
|
|
|
elementUpload:`/api/element/upload`,//上传图片
|
2025-04-16 10:43:54 +08:00
|
|
|
imageSegmentation:`/api/element/imageSegmentation`,//分割衣服
|
|
|
|
|
|
|
|
|
|
|
2024-01-26 14:43:20 +08:00
|
|
|
// oldHis:`/oldHis/history/queryUserGroup`,//上传图片
|
2023-11-24 16:18:44 +08:00
|
|
|
sketchBoardsBoundingBox:`/api/design/sketchBoardsBoundingBox`,//裁剪sketch图片
|
2023-12-14 17:41:11 +08:00
|
|
|
|
|
|
|
|
trialOrderList:`/api/account/trialOrderList`,//获取审批列表
|
|
|
|
|
switchIsAutoApproval:`/api/account/switchIsAutoApproval`,//切换是否自动审批
|
2023-12-15 16:38:55 +08:00
|
|
|
getIsAutoApproval:`/api/account/getIsAutoApproval`,//获取是否自动审批
|
2023-12-14 17:41:11 +08:00
|
|
|
trialOrderApproval:`/api/account/trialOrderApproval`,//通过审批
|
2023-12-15 16:38:55 +08:00
|
|
|
trialOrderRefuse:`/api/account/trialOrderRefuse`,//拒绝审批
|
|
|
|
|
|
2024-07-29 17:30:24 +08:00
|
|
|
//管理员接口
|
2024-03-08 11:19:33 +08:00
|
|
|
//查询所有试用用户
|
2024-08-05 16:15:43 +08:00
|
|
|
inquiryGetTrial:`/api/inquiry/getTrial`,//查询所有试用用户
|
2025-01-13 11:27:04 +08:00
|
|
|
getCities:`/api/inquiry/getCities`,//获取所有付款订单使用的国家
|
2024-08-05 16:15:43 +08:00
|
|
|
getUserInfo:`/api/inquiry/getUserInfo`,//查询所有用户
|
2025-01-10 15:26:10 +08:00
|
|
|
queryTransaction:`/api/inquiry/queryTransaction`,//查询交易记录
|
2025-01-25 12:37:50 +08:00
|
|
|
queryTransactionDownload:`/api/inquiry/queryTransaction/download`,//导出交易记录
|
2025-04-16 10:43:54 +08:00
|
|
|
createCoupon:`/api/stripe/createCoupon`,//创建优惠码
|
|
|
|
|
updatePromCodeInfo:`/api/stripe/updatePromCodeInfo`,//修改优惠码
|
|
|
|
|
getAllCoupons:`/api/stripe/getAllCoupons`,//查询优惠码列表
|
|
|
|
|
checkCoupon:`/api/stripe/checkCoupon`,//根据优惠码获取结算后的金额
|
|
|
|
|
|
2025-04-23 09:39:24 +08:00
|
|
|
//云生成
|
|
|
|
|
designCloud:`/api/design/designCloud`,//创建云生成
|
|
|
|
|
cloudPage:`/api/design/cloudPage`,//创建云生成
|
|
|
|
|
getDesignCloudResult:`/api/design/getDesignCloudResult`,//查询这条云生成记录的所有内容
|
|
|
|
|
|
2025-04-16 10:43:54 +08:00
|
|
|
//企业版教育版管理员页面
|
|
|
|
|
subAccountList:`/api/account/subAccountList`,//查询子账号
|
|
|
|
|
addOrUpdateSubAccount:`/api/account/addOrUpdateSubAccount`,//添加子账号
|
|
|
|
|
deleteSubAccount:`/api/account/deleteSubAccount`,//删除子账号
|
|
|
|
|
subAccountImportExcelDownload:`/api/account/subAccountImportExcelDownload`,//批量添加模板下载模板
|
|
|
|
|
subAccountImport:`/api/account/subAccountImport`,//模板导入
|
|
|
|
|
getGenerateFrequency:`/api/inquiry/getGenerateFrequency`,//积分使用详情
|
|
|
|
|
getAllGenerateFuncName:`/api/inquiry/getAllGenerateFuncName`,//获取所有generate类型
|
|
|
|
|
|
2024-03-08 11:19:33 +08:00
|
|
|
//查询某个时间内design点击次数
|
|
|
|
|
getDesignStatistic:`/api/inquiry/getDesignStatistic`,//拒绝审批
|
2024-07-29 17:30:24 +08:00
|
|
|
getAllQuestionnaire:`/api/inquiry/getAllQuestionnaire`,//拒绝审批
|
2024-08-05 16:15:43 +08:00
|
|
|
getActiveUserFunc:`/api/inquiry/getActiveUserFunc`,//获取各模块功能
|
|
|
|
|
recentActiveUser:`/api/inquiry/recentActiveUser`,//获取近期活跃用户
|
|
|
|
|
recentActiveUserChart:`/api/inquiry/recentActiveUserChart`,//获取近期活跃用户图表数据
|
|
|
|
|
recentNewUser:`/api/inquiry/recentNewUser`,//获取近期新增用户
|
|
|
|
|
recentNewUserChart:`/api/inquiry/recentNewUserChart`,//获取新增用户图表
|
|
|
|
|
trialUserCountry:`/api/inquiry/trialUserCountry`,//试用用户国家-城市分布
|
|
|
|
|
conversionRate:`/api/inquiry/conversionRate`,//试用用户国家-城市分布
|
|
|
|
|
getAllUserId:`/api/inquiry/getAllUserId`,//获取所有用户id和Name
|
|
|
|
|
adminAddUser:`/api/inquiry/addUser`,//添加用户
|
|
|
|
|
modifyUser:`/api/inquiry/modifyUser`,//修改用户
|
2024-08-19 10:36:46 +08:00
|
|
|
publishSysMessage:`/api/message/publishSysMessage`,//发布系统任务
|
2024-12-18 17:38:43 +08:00
|
|
|
//affiliate接口
|
|
|
|
|
viewsIncrease:`/api/affiliate/viewsIncrease`,//增加访问量
|
|
|
|
|
affiliateRegistration:`/api/affiliate/registration`,//affiliate注册
|
|
|
|
|
personalCenter:`/api/affiliate/personalCenter`,//affiliate个人中心
|
|
|
|
|
affiliateList:`/api/affiliate/list`,//affiliate审批列表
|
|
|
|
|
getEachAffiliateGeneratedRevenue:`/api/affiliate/getEachAffiliateGeneratedRevenue`,//affiliate每个用户根据日期查询收益
|
|
|
|
|
affiliateApproval:`/api/affiliate/approval`,//affiliate同意 审批
|
|
|
|
|
getPersonalMonthlyIncome:`/api/affiliate/getPersonalMonthlyIncome`,//affiliate图表接口
|
2024-08-19 10:36:46 +08:00
|
|
|
|
2024-03-26 15:45:32 +08:00
|
|
|
getTasksList:`/api/tasks/getList`,//获取w为执行完的所有任务
|
|
|
|
|
getTasksHistory:`/api/tasks/getAllTask`,//获取所有任务列表
|
2024-03-22 12:01:11 +08:00
|
|
|
prepareForSR:`/api/python/prepareForSR`,//超分
|
|
|
|
|
|
2024-03-21 10:49:21 +08:00
|
|
|
|
2024-05-16 17:14:22 +08:00
|
|
|
//作品广场
|
|
|
|
|
publish:`/api/portfolio/publish`,//发布作品到作品广场
|
|
|
|
|
getPorfolio:`/api/portfolio/page`,//查询作品广场
|
|
|
|
|
getPorfolioDetail:`/api/portfolio/detail`,//查询作品广场作品详情
|
|
|
|
|
setPorfolioChoose:`/api/portfolio/choose`,//二次创作
|
2024-06-17 09:39:01 +08:00
|
|
|
portfolioLike:`/api/portfolio/like`,//作品广场点赞
|
|
|
|
|
portfolioNoLike:`/api/portfolio/unlike`,//作品广场取消点赞
|
|
|
|
|
portfolioComment:`/api/portfolio/comment`,//作品广场评论
|
|
|
|
|
portfolioCommentPage:`/api/portfolio/commentPage`,//作品广场评论列表
|
2024-06-26 17:26:31 +08:00
|
|
|
commentDelete:`/api/portfolio/commentDelete`,//删除评论
|
|
|
|
|
porfolioDelete:`/api/portfolio/delete`,//删除作品
|
2024-08-19 10:36:46 +08:00
|
|
|
porfolioFollow:`/api/portfolio/follow`,//删除作品
|
|
|
|
|
porfolioFollow:`/api/portfolio/follow`,//关注
|
|
|
|
|
porfolioCancelFollow:`/api/portfolio/cancelFollow`,//取消关注
|
|
|
|
|
porfolioGetFolloweeList:`/api/portfolio/getFolloweeList`,//获取关注列表
|
|
|
|
|
porfolioGetFollowerList:`/api/portfolio/getFollowerList`,//获取粉丝列表
|
2024-06-26 17:26:31 +08:00
|
|
|
|
2024-06-17 09:39:01 +08:00
|
|
|
//product生成
|
|
|
|
|
toProduct:`/api/history/toProduct`,//开始生成
|
|
|
|
|
toProductImageResult:`/api/history/toProductImageResult`,//获取结果
|
|
|
|
|
toProductImageElementUpload:`/api/history/toProductImageElementUpload`,//上传
|
|
|
|
|
productImageLike:`/api/history/productImageLike`,//like生成结果
|
|
|
|
|
productImageUnLike:`/api/history/productImageUnLike`,//取消like生成结果
|
|
|
|
|
productImageLikeList:`/api/history/productImageLikeList`,//like生成结果
|
|
|
|
|
|
2024-06-26 17:26:31 +08:00
|
|
|
//打光
|
|
|
|
|
relight:`/api/history/relight`,//开始生成
|
|
|
|
|
relightResult:`/api/history/relightResult`,//开始生成
|
|
|
|
|
|
2024-06-17 09:39:01 +08:00
|
|
|
//保存画布
|
|
|
|
|
canvasElementUpload:`/api/history/canvasElementUpload`,//画布上传临时图片
|
|
|
|
|
exportSave:`/api/history/exportSave`,//保存画布
|
|
|
|
|
exportSearch:`/api/history/exportSearch`,//保存画布
|
2024-05-22 10:45:52 +08:00
|
|
|
|
2024-07-29 17:30:24 +08:00
|
|
|
//活动
|
|
|
|
|
activity:`/api/account/activity`,
|
2024-06-20 10:36:45 +08:00
|
|
|
|
2025-04-01 15:25:15 +08:00
|
|
|
//bradDNA
|
|
|
|
|
brandLogoUpload:`/api/history/brandLogoUpload`,//上传bradDNA
|
|
|
|
|
brandDNAGenerate:`/api/history/brandDNAGenerate`,//上传bradDNA
|
|
|
|
|
brandDNAUpload:`/api/history/brandDNAUpload`,//上传DNA图片
|
2025-04-09 14:09:19 +08:00
|
|
|
getInitializeProgress:`/api/history/getInitializeProgress`,//获取brand进度
|
|
|
|
|
brandDNADelete:`/api/history/brandDNADelete`,//删除brandDna
|
2025-04-01 15:25:15 +08:00
|
|
|
|
|
|
|
|
brandDNAPage:`/api/history/brandDNAPage`,//brand列表
|
|
|
|
|
brandDNASaveOrUpdate:`/api/history/brandDNASaveOrUpdate`,//提交个人信息
|
2025-04-09 14:09:19 +08:00
|
|
|
productImageInitialize:`/api/history/productImageInitialize`,//产品识别
|
2024-06-20 10:36:45 +08:00
|
|
|
//调查问卷
|
|
|
|
|
questionnaire:`/api/account/questionnaire`,//保存画布
|
2024-08-19 10:36:46 +08:00
|
|
|
|
|
|
|
|
//消息系统
|
|
|
|
|
getUnreadCount:`/api/message/getUnreadCount`,//获取未读消息
|
|
|
|
|
setReadStatus:`/api/message/setReadStatus`,//设置消息已读
|
|
|
|
|
getHistoryNotification:`/api/message/getHistoryNotification`,//获取历史消息
|
|
|
|
|
oneClickRead:`/api/message/oneClickRead`,//全部设为已读
|
2024-08-23 10:19:02 +08:00
|
|
|
personalHomepage:`/api/account/personalHomepage`,//获取个人主页信息
|
2024-08-19 10:36:46 +08:00
|
|
|
|
2023-01-06 16:00:15 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
axiosGet(url,config) {
|
|
|
|
|
return new Promise((resolve, reject) => {
|
2024-06-17 09:39:01 +08:00
|
|
|
if(isLoginTime) {
|
|
|
|
|
resolve('')
|
|
|
|
|
return
|
|
|
|
|
}
|
2023-01-06 16:00:15 +08:00
|
|
|
axios.get(url,config).then(response => {
|
|
|
|
|
resolve(response)
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
reject(error)
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
axiosPut(url, data) {
|
|
|
|
|
return new Promise((resolve, reject) => {
|
2024-06-17 09:39:01 +08:00
|
|
|
if(isLoginTime) {
|
|
|
|
|
resolve('')
|
|
|
|
|
return
|
|
|
|
|
}
|
2023-01-06 16:00:15 +08:00
|
|
|
axios.put(url, data).then(response => {
|
|
|
|
|
resolve(response)
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
reject(error)
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
axiosPost(url, data,config) {
|
|
|
|
|
return new Promise((resolve, reject) => {
|
2024-06-17 09:39:01 +08:00
|
|
|
if(isLoginTime) {
|
|
|
|
|
resolve('')
|
|
|
|
|
return
|
|
|
|
|
}
|
2023-01-06 16:00:15 +08:00
|
|
|
axios.post(url, data,config).then(response => {
|
|
|
|
|
resolve(response)
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
reject(error)
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
axiosDelete(url, newData) {
|
|
|
|
|
return new Promise((resolve, reject) => {
|
2024-06-17 09:39:01 +08:00
|
|
|
if(isLoginTime) {
|
|
|
|
|
resolve('')
|
|
|
|
|
return
|
|
|
|
|
}
|
2023-01-06 16:00:15 +08:00
|
|
|
axios.delete(url,{data:newData}).then(response => {
|
|
|
|
|
resolve(response)
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
reject(error)
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|