fix:商品详情跳转

feat-im-0607-ch
ch 3 years ago
parent c755ff3eb0
commit ead3a017e1

@ -2,3 +2,4 @@ VITE_BASE_URL=/api
VITE_SOCKET_URL=wss://k8s-horse-gateway.mashibing.cn/ws VITE_SOCKET_URL=wss://k8s-horse-gateway.mashibing.cn/ws
#VITE_SOCKET_URL=ws://192.168.10.93:8090/ws #VITE_SOCKET_URL=ws://192.168.10.93:8090/ws
VITE_REQUEST_TIMEOUT=5000 VITE_REQUEST_TIMEOUT=5000
VITE_BROWSER_URL = https://k8s-shop-pc.mashibing.cn

@ -1,3 +1,4 @@
VITE_BASE_URL=https://you-gateway.mashibing.com VITE_BASE_URL=https://you-gateway.mashibing.com
VITE_SOCKET_URL=wss://you-gateway.mashibing.com/ws VITE_SOCKET_URL=wss://you-gateway.mashibing.com/ws
VITE_REQUEST_TIMEOUT=20000 VITE_REQUEST_TIMEOUT=20000
VITE_BROWSER_URL = https://k8s-shop-pc.mashibing.cn

@ -1,3 +1,4 @@
VITE_BASE_URL=https://k8s-horse-gateway.mashibing.cn/ VITE_BASE_URL=https://k8s-horse-gateway.mashibing.cn/
VITE_SOCKET_URL=wss://k8s-horse-gateway.mashibing.cn/ws VITE_SOCKET_URL=wss://k8s-horse-gateway.mashibing.cn/ws
VITE_REQUEST_TIMEOUT=20000 VITE_REQUEST_TIMEOUT=20000
VITE_BROWSER_URL = https://k8s-shop-pc.mashibing.cn

@ -25,7 +25,7 @@
<el-button type="text" @click="$copy(content.id)"></el-button> <el-button type="text" @click="$copy(content.id)"></el-button>
</div> </div>
</template> </template>
<div class="flex"> <div class="flex product" @click="handleProductDetail(content.id)">
<el-image :alt="content.name" height="64px" :src="content.productImageUrl" width="64px" /> <el-image :alt="content.name" height="64px" :src="content.productImageUrl" width="64px" />
<div class="right"> <div class="right">
<div class="name">{{ content.name }}</div> <div class="name">{{ content.name }}</div>
@ -121,6 +121,9 @@
}, },
}); });
}; };
const handleProductDetail = (id) => {
window.open(`${import.meta.env.VITE_BROWSER_URL}/goods/detail/${id}`, '_blank');
};
const handleOrder = (id) => { const handleOrder = (id) => {
router.push({ router.push({
name: 'OrderDetail', name: 'OrderDetail',
@ -148,6 +151,9 @@
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.product {
cursor: pointer;
}
.avatar { .avatar {
margin: 0 @layout-space; margin: 0 @layout-space;
} }

Loading…
Cancel
Save