update: saas版本配置

This commit is contained in:
admin 2024-06-14 09:55:32 +08:00
parent 7f89c108cf
commit 041fb9f51b
3 changed files with 19 additions and 19 deletions

View File

@ -3,7 +3,7 @@ const development = {
// VITE_APP_BASE_URL: 'http://47.100.31.83:8081',
// VITE_APP_BASE_URL: 'https://47.100.31.83:8081',
// appid: '',
VITE_APP_BASE_URL: 'https://cloud.52zaisheng.cn',
VITE_APP_BASE_URL: 'http://cloud.52zaisheng.cn/test/saas',
appid: 'wx9251d74fe0e87028',
}
@ -13,7 +13,7 @@ const test = {
}
const production = {
VITE_APP_BASE_URL: 'https://cloud.52zaisheng.cn',
VITE_APP_BASE_URL: 'http://cloud.52zaisheng.cn/test/saas',
appid: 'wx9251d74fe0e87028',
}

View File

@ -9,7 +9,7 @@
ref="loginForm"
:labelWidth="0"
>
<u-form-item prop="userInfo.dpName" @click="state.isShow = true">
<!-- <u-form-item prop="userInfo.dpName" @click="state.isShow = true">
<u-input
v-model="model1.userInfo.dpName"
:placeholder="`请选择基地名称`"
@ -19,13 +19,11 @@
:disabledColor="''"
:disabled="true"
>
<!-- @change="(e:any) => {handleInput(e, item)}"
@clear="handleClear(item)" -->
</u-input>
<template #right>
<u-icon name="arrow-right" color="#dadbde"></u-icon>
</template>
</u-form-item>
</u-form-item> -->
<u-form-item prop="userInfo.userName">
<u-input
v-model="model1.userInfo.userName"
@ -307,14 +305,14 @@ const state = reactive({
dpObj: {},
});
//
ProfileApi.getDbInfo({}).then((res) => {
if (res.code === 200) {
state.dpList = res.data.map((item: any) => {
return { name: item.dbName, ...item };
});
}
});
// //
// ProfileApi.getDbInfo({}).then((res) => {
// if (res.code === 200) {
// state.dpList = res.data.map((item: any) => {
// return { name: item.dbName, ...item };
// });
// }
// });
</script>
<style lang="scss" scoped>

View File

@ -19,12 +19,8 @@ const obj = {
options.timeout = 10000;
// 拼接完整路径
if (!options.url.startsWith("http")) {
if (options.url.indexOf("/prod/gateway/api/db/getDbInfo") === -1) {
options.url = baseUrl + store.profile.childPath + options.url;
} else {
options.url = baseUrl + options.url;
}
}
// 请求头标识
// 1.小程序唯一标识
// 'source-client' 'miniapp'
@ -36,6 +32,7 @@ const obj = {
if (token) {
options.header["x-userToken"] = token;
}
options.header["code"] = 'hoe-cs';
},
};
// 请求拦截器
@ -182,6 +179,11 @@ export const http = <T>(options: UniApp.RequestOptions) => {
icon: "none",
title: (res1 as Data<T>).message || "请求失败",
});
} else if (res1.code === 500) {
uni.showToast({
icon: "none",
title: (res1 as Data<T>).message || "请求失败",
});
}
resolve(res1 as Data<T>);
} else {