[更新邀请码]

This commit is contained in:
2023-07-07 19:04:26 +08:00
parent 12a63a423d
commit 9b9adef49f
70 changed files with 10722 additions and 3175 deletions

View File

@@ -1,14 +1,15 @@
/**
* 手太欠
* 愿这世界都如故事里一样 美好而动人~
*/
*/
import store from '@/store'
import store from '@/store'
// 基础配置
const config = {
apiUrl : 'http://debt.douhuofalv.com/api/', // 正式环境
const config = {
// apiUrl : 'http://debt.douhuofalv.com/api/', // 备份环境
apiUrl : 'http://api.xchengwh9.cn/api/', // 正式环境
timeout : 60000
}
@@ -28,13 +29,13 @@ const request = (parameter, hideLoding) => {
config.header = {
'Accept': 'application/json',
'Authorization': store.getters.getToken || ''
}
// 加载提示
if(!hideLoding) uni.showLoading({
title: '加载中',
mask : true
});
}
// 加载提示
if(!hideLoding) uni.showLoading({
title: '加载中',
mask : true
});
// 请求实例
return new Promise((resolve, reject) => {
@@ -69,7 +70,7 @@ const request = (parameter, hideLoding) => {
}
// 文件上传
const uploading = (paths, driver) => {
const uploading = (paths, driver) => {
uni.showLoading({
title: '上传中',
@@ -81,13 +82,13 @@ const uploading = (paths, driver) => {
'Authorization': store.getters.getToken || ''
}
// 上传图片
return new Promise((resolve, reject) => {
return new Promise((resolve, reject) => {
uni.uploadFile({
url : config.apiUrl + 'storage/uploads',
files : paths,
header : config.header || {},
header : config.header || {},
formData: driver || {},
success : res=>{
success : res=>{
if(res.statusCode === 200){
uni.hideLoading()
let updData = JSON.parse(res.data)
@@ -143,10 +144,10 @@ const loginHint = () => {
content: '您的登录信息已过期,请重新登录',
confirmColor: '#8b64fd',
showCancel:false,
success: res=> {
success: res=> {
loginHintState = false
if (res.confirm) uni.reLaunch({
url:'/pages/index/index'
if (res.confirm) uni.reLaunch({
url:'/pages/index/index'
})
}
})

View File

@@ -1,67 +1,77 @@
/**
* 手太欠
* 愿这世界都如故事里一样 美好而动人~
*/
import { request } from '../index'
// 计算前置接口
const Init = (data) => {
return request({
url : 'init',
data: data
})
}
// 开始计算
const Debt = (data) => {
return request({
url : 'debt',
method: 'POST',
data: data
})
}
// 完善用户信息
const Info = (data) => {
return request({
url : 'userinfo',
method: 'POST',
data: data
})
}
// 查看结果
const Lists = (data) => {
return request({
url : 'lists',
data: data
})
}
// 客户管理
const Clients = (data) => {
return request({
url : 'clients',
data: data
})
}
// 删除结果
const logDel = (log_id) => {
return request({
url : 'debt/' + log_id,
method: 'DELETE'
})
}
export {
Init,
Debt,
Info,
Lists,
Clients,
logDel
}
*/
import { request } from '../index'
// 计算前置接口
const Init = (data) => {
return request({
url : 'init',
data: data
})
}
// 开始计算
const Debt = (data) => {
return request({
url : 'debt',
method: 'POST',
data: data
})
}
// 完善用户信息
const Info = (data) => {
return request({
url : 'userinfo',
method: 'POST',
data: data
})
}
// 查看结果
const Lists = (data) => {
return request({
url : 'lists',
data: data
})
}
// 客户管理
const Clients = (data) => {
return request({
url : 'clients',
data: data
})
}
// 删除结果
const logDel = (log_id) => {
return request({
url : 'debt/' + log_id,
method: 'DELETE'
})
}
// 测试获取第一个用户的token
const userTest = () => {
return request({
url : 'user/auth/official/test',
method: 'POST'
})
}
export {
Init,
Debt,
Info,
Lists,
Clients,
logDel,
userTest
}