[更新邀请码]
This commit is contained in:
@@ -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'
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user