修改 nacos-federation 插件,实现 接口请求基地址从 配置中心获取,并注入到环境变量中
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {defineComponent} from 'vue'
|
||||
import { defineComponent } from 'vue'
|
||||
|
||||
export default defineComponent({
|
||||
setup() {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
|
||||
export const productRouter: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: '/Products',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {product} from '@domains/product/di/productModule';
|
||||
import {ProductType} from '@domains/product/domain/type/ProductType';
|
||||
import {defineComponent, onMounted, reactive} from 'vue'
|
||||
import {useRoute} from 'vue-router'
|
||||
import { product } from '@domains/product/di/productModule';
|
||||
import { ProductType } from '@domains/product/domain/type/ProductType';
|
||||
import { defineComponent, onMounted, reactive } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
interface storeType {
|
||||
item: ProductType
|
||||
@@ -36,13 +36,13 @@ export default defineComponent({
|
||||
return () => (
|
||||
<div class="ProductDetail">
|
||||
<h1>商品领域模块 - 商品详情页面</h1>
|
||||
<hr />
|
||||
<p>商品id:{state.id}</p>
|
||||
{state.item.name}
|
||||
<hr/>
|
||||
<p>商品id:{ state.id }</p>
|
||||
{ state.item.name }
|
||||
<ul>
|
||||
{
|
||||
Object.entries(state.item).map(([key, value]) =>
|
||||
<li>{key}: {value}</li>
|
||||
Object.entries(state.item).map(([ key, value ]) =>
|
||||
<li>{ key }: { value }</li>
|
||||
)
|
||||
}
|
||||
</ul>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {defineComponent, onMounted, reactive} from 'vue'
|
||||
import {useRouter} from 'vue-router';
|
||||
import {product} from '@domains/product/di/productModule';
|
||||
import {ProductType} from '@domains/product/domain/type/ProductType';
|
||||
import { defineComponent, onMounted, reactive } from 'vue'
|
||||
import { useRouter } from 'vue-router';
|
||||
import { product } from '@domains/product/di/productModule';
|
||||
import { ProductType } from '@domains/product/domain/type/ProductType';
|
||||
|
||||
interface storeType {
|
||||
list: Array<ProductType>
|
||||
@@ -30,18 +30,18 @@ export default defineComponent({
|
||||
return () => (
|
||||
<div class="ProductList">
|
||||
<h1>商品领域模块 - 商品列表页面3</h1>
|
||||
<hr />
|
||||
<hr/>
|
||||
<h2>从Deno 后端 加载的数据,点击进详情</h2>
|
||||
<ul>
|
||||
{
|
||||
state.list.map(item =>
|
||||
<li key={item.id} onClick={() => {
|
||||
<li key={ item.id } onClick={ () => {
|
||||
router.push({
|
||||
name: 'ProductDetail',
|
||||
query: { id: item.id }
|
||||
});
|
||||
}}>
|
||||
{item.id} | {item.name} | ¥{item.price}
|
||||
} }>
|
||||
{ item.id } | { item.name } | ¥{ item.price }
|
||||
</li>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user