8.15提交
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// #ifdef MP-WEIXIN
|
||||
const client_type="M"
|
||||
// #endif
|
||||
// #ifdef APP-IOS
|
||||
const client_type="I"
|
||||
// #endif
|
||||
// #ifdef APP-ANDROID
|
||||
const client_type="A"
|
||||
// #endif
|
||||
export default client_type
|
||||
+7
-5
@@ -1,16 +1,18 @@
|
||||
let BASE_URL=''
|
||||
if(process.env.UNI_PLATFORM =="h5"){
|
||||
if (window.location.href.indexOf('//casedata.igandan.com')>-1){
|
||||
BASE_URL='https://prod-casedata.igandan.com/api'
|
||||
BASE_URL='https://wx.igandan.com/gdhome_api'
|
||||
}else{
|
||||
BASE_URL='https://dev-casedata.igandan.com/api'
|
||||
BASE_URL='https://dev-wx.igandan.com/gdhome_api'
|
||||
}
|
||||
}else{
|
||||
}else if(process.env.UNI_PLATFORM =="mp-weixin"){
|
||||
const { envVersion } = uni.getAccountInfoSync().miniProgram;
|
||||
if (envVersion == "release") {
|
||||
BASE_URL='https://prod-casedata.igandan.com/api'
|
||||
BASE_URL='https://app.igandan.com/app'
|
||||
}else{
|
||||
BASE_URL='https://dev-casedata.igandan.com/api'
|
||||
BASE_URL='https://dev-app.igandan.com/app'
|
||||
}
|
||||
}else{
|
||||
BASE_URL='https://dev-app.igandan.com/app'
|
||||
}
|
||||
export default BASE_URL
|
||||
+1
-1
@@ -26,7 +26,7 @@ function navTo(obj) {
|
||||
if(process.env.UNI_PLATFORM =="h5"){
|
||||
uni.navigateTo(obj)
|
||||
}else if(process.env.UNI_PLATFORM =="mp-weixin"){
|
||||
const pages = getCurrentPages();
|
||||
const pages = getCurrentPages();
|
||||
let len = pages.length;
|
||||
console.log(len)
|
||||
if (len >=10) {
|
||||
|
||||
+6
-8
@@ -8,11 +8,8 @@
|
||||
* @createTime: 2024-7-22 15:05:06
|
||||
*/
|
||||
import BASE_URL from "./config.js";
|
||||
//import host from "@/utils/host";
|
||||
//import {msg} from "./util.js"
|
||||
//const BASE_URL=host+"/api"
|
||||
export const request = (url, data = {}, method = 'post', loading = false, contentType =
|
||||
'application/x-www-form-urlencoded') => {
|
||||
'application/json',extraHeader={}) => {
|
||||
if (loading) {
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
@@ -45,11 +42,10 @@ export const request = (url, data = {}, method = 'post', loading = false, conten
|
||||
let timestamp = Date.now();
|
||||
uni.request({
|
||||
data,
|
||||
url: url.indexOf('http') != -1 ? url : encodeURI(BASE_URL + url + "?timestamp=" +
|
||||
timestamp),
|
||||
url: url.indexOf('http') != -1 ? url : encodeURI(BASE_URL + url),
|
||||
method: method,
|
||||
sslVerify: false,
|
||||
header: url.indexOf('/manager/getSignature4bing') == -1 ? header : {},
|
||||
header:{...header,...extraHeader},
|
||||
timeout: 10000,
|
||||
success: async (res) => {
|
||||
var Authorization_token = res.header.Authorization;
|
||||
@@ -64,7 +60,9 @@ export const request = (url, data = {}, method = 'post', loading = false, conten
|
||||
if (loading) {
|
||||
uni.hideLoading();
|
||||
};
|
||||
if (res.data.code == 200){
|
||||
if(url.indexOf('manager/getSystemTimeStamp')!=-1){
|
||||
e(res)
|
||||
}else if (res.data.code == 200){
|
||||
e(res)
|
||||
}else if (res.data.code == 401 || res.data.code == 403 || res.data.code ==
|
||||
405 || res.data.code == 406) {
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
function sortObj(obj){
|
||||
// 获取所有键并排序
|
||||
var keysSorted = Object.keys(obj).sort();
|
||||
// 创建新的空对象用于保存排序后的结果
|
||||
var sortedObj = {};
|
||||
// 根据排序后的键从原始JSON对象中提取值
|
||||
for (var i = 0; i < keysSorted.length; i++) {
|
||||
var key = keysSorted[i];
|
||||
sortedObj[key] = obj[key];
|
||||
}
|
||||
|
||||
return sortedObj
|
||||
console.log(sortedObj); // 输出排序后的JSON对象
|
||||
}
|
||||
export default sortObj
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
const version="3.6.0"
|
||||
export default version
|
||||
Reference in New Issue
Block a user