Commit d97ea346febaf54dd963dea44b229a4d331d6cd3

Authored by boyang
2 parents eeea666a 334aae92
nuxt.config.ts
@@ -50,8 +50,8 @@ export default defineNuxtConfig({ @@ -50,8 +50,8 @@ export default defineNuxtConfig({
50 nitro: { 50 nitro: {
51 devProxy: { 51 devProxy: {
52 "/shop": { 52 "/shop": {
53 - target: "http://47.89.254.121:8002/shop", // 线上代理地址  
54 - // target: "http://127.0.0.1:8002/shop", 53 + //target: "http://47.89.254.121:8002/shop", // 线上代理地址
  54 + target: "http://127.0.0.1:8002/shop",
55 // target: process.env.BASE_URL || 'http://39.108.227.113:8002/shop', // 目标接口域名 55 // target: process.env.BASE_URL || 'http://39.108.227.113:8002/shop', // 目标接口域名
56 changeOrigin: true, // 表示是否跨域 56 changeOrigin: true, // 表示是否跨域
57 }, 57 },
@@ -65,8 +65,8 @@ export default defineNuxtConfig({ @@ -65,8 +65,8 @@ export default defineNuxtConfig({
65 // 该配置用于服务端请求转发 65 // 该配置用于服务端请求转发
66 routeRules: { 66 routeRules: {
67 "/shop/**": { 67 "/shop/**": {
68 - proxy: "http://47.89.254.121:8002/shop/**",  
69 - // proxy: "http://127.0.0.1:8002/shop/**", 68 + //proxy: "http://47.89.254.121:8002/shop/**",
  69 + proxy: "http://127.0.0.1:8002/shop/**",
70 // proxy: process.env.BASE_URL || 'http://39.108.227.113:8002/shop/**' 70 // proxy: process.env.BASE_URL || 'http://39.108.227.113:8002/shop/**'
71 }, 71 },
72 72
pages/products/index.vue
@@ -103,7 +103,7 @@ @@ -103,7 +103,7 @@
103 style="height: auto" 103 style="height: auto"
104 > 104 >
105 <h3 style="color: red" v-if="item.price"> 105 <h3 style="color: red" v-if="item.price">
106 - ${{ item.price }} 106 + ${{ item.price }} - ${{ item.maxPrice }}
107 </h3> 107 </h3>
108 <h4 class="item-name">{{ item.name }}</h4> 108 <h4 class="item-name">{{ item.name }}</h4>
109 </v-card-text> 109 </v-card-text>