冲突合并
This commit is contained in:
commit
f807f2ca31
|
|
@ -2,7 +2,7 @@
|
||||||
"version" : "1.0",
|
"version" : "1.0",
|
||||||
"configurations" : [
|
"configurations" : [
|
||||||
{
|
{
|
||||||
"playground" : "custom",
|
"playground" : "standard",
|
||||||
"type" : "uni-app:app-android"
|
"type" : "uni-app:app-android"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,10 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, ref } from 'vue'
|
import { onMounted, reactive, ref } from 'vue'
|
||||||
import { appLoginAPI, getUserInfoAPI } from '@/services/index.js'
|
import { appLoginAPI, getUserInfoAPI } from '@/services/index.js'
|
||||||
import { useMemberStore } from '@/stores'
|
import { useMemberStore } from '@/stores'
|
||||||
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
const memberStore = useMemberStore()
|
const memberStore = useMemberStore()
|
||||||
|
|
||||||
// 登录参数
|
// 登录参数
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import { http } from '@/utils/http'
|
||||||
* 登录接口
|
* 登录接口
|
||||||
*/
|
*/
|
||||||
export const appLoginAPI = (data) => {
|
export const appLoginAPI = (data) => {
|
||||||
|
console.log('999')
|
||||||
return http({
|
return http({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: '/auth/login',
|
url: '/auth/login',
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,7 @@ import { useMemberStore } from '@/stores'
|
||||||
* baseURL 设置请求ip地址和端口
|
* baseURL 设置请求ip地址和端口
|
||||||
*/
|
*/
|
||||||
const ENV = process.env.NODE_ENV
|
const ENV = process.env.NODE_ENV
|
||||||
const baseURL = ENV === 'development' ? 'http://192.168.2.76:18080' : '***'
|
export const baseURL = ENV === 'development' ? 'http://192.168.2.246:18080' : '***'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* httpInterceptor 分别拦截 request 和 uploadFile 请求
|
* httpInterceptor 分别拦截 request 和 uploadFile 请求
|
||||||
*/
|
*/
|
||||||
|
|
@ -66,6 +65,11 @@ export const http = (options) => {
|
||||||
url: '/pages/login/index',
|
url: '/pages/login/index',
|
||||||
})
|
})
|
||||||
reject(res)
|
reject(res)
|
||||||
|
} else if (res.data.code === 500) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: `${res.data.msg}`,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
} else if (res.statusCode === 401) {
|
} else if (res.statusCode === 401) {
|
||||||
// 2. 401 表示token过期 去往登录页重新登录
|
// 2. 401 表示token过期 去往登录页重新登录
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,8 @@ export default defineConfig({
|
||||||
proxy: {
|
proxy: {
|
||||||
// 在此处编写代理规则
|
// 在此处编写代理规则
|
||||||
'/api': {
|
'/api': {
|
||||||
target: 'http://192.168.2.76:18080',
|
// target: 'http://192.168.2.76:18080',
|
||||||
|
target: 'http://localhost:18080',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => {
|
rewrite: (path) => {
|
||||||
return path.replace(/\/api/, '')
|
return path.replace(/\/api/, '')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue