@@ -18,7 +18,7 @@
"dev:quickapp-webview-union": "uni -p quickapp-webview-union",
"build:app": "uni build -p app",
"build:custom": "uni build -p",
- "build:h5": "uni build",
+ "build:h5": "rimraf dist && uni build",
"build:h5:ssr": "uni build --ssr",
"build:mp-alipay": "uni build -p mp-alipay",
"build:mp-baidu": "uni build -p mp-baidu",
@@ -1,9 +1,10 @@
// 应用全局配置
export default {
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
- // baseUrl: 'http://localhost:8080/prod-api',
- baseUrl: "http://172.16.120.165:13200/prod-api",
+ baseUrl: import.meta.env.MODE=== "production" ? "http://mobile.usky.cn:8099/prod-api" : "http://172.16.120.165:13200/prod-api",
+ // baseUrl: "http://mobile.usky.cn:8099/prod-api",
websiteUrl: "https://qhome.usky.cn",
+ // NODE_ENV=devlopment
// 应用信息
appInfo: {
// 应用名称
@@ -150,16 +150,7 @@
},
"devServer" : {
"https" : false,
- "proxy" : {
- "/system" : {
- "target" : "http://172.16.120.165:13200/prod-api",
- "changeOrigin" : true,
- "secure" : false,
- "pathRewrite" : {
- "^/system" : "/system"
- }
+ "proxy" : {}
"sdkConfigs" : {
"maps" : {
@@ -8,7 +8,7 @@
<script setup>
import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
-import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance } from "vue";
+import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs } from "vue";
const data = reactive({
title: "",
@@ -6,7 +6,7 @@
const props = defineProps({
// 数据
@@ -25,7 +25,7 @@ import { getUserProfile } from "@/api/system/user";
import { updateUserProfile } from "@/api/system/user";
user: {
@@ -91,7 +91,7 @@
-import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, watch } from "vue";
+import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, watch, toRefs } from "vue";
id: "",
@@ -10,6 +10,26 @@ export default defineConfig(({ mode, command }) => {
host: true, //指定服务器
open: true, //自动打开浏览器
port: 8080, //启动端口
+ proxy: {
+ "/dev-api": {
+ target: "http://172.16.120.165:13200",
+ ws: true,
+ changeOrigin: true,
+ pathRewrite: {
+ "^/api": "",
+ },
+ //rewrite: (p) => p.replace(/^\/dev-api/, '')
+ "/prod-api": {
+ target: "http://mobile.usky.cn:8099",
plugins: [uni()],
resolve: {