diff --git a/src/api/provider.js b/src/api/provider.js
index 871f53a..c7de50d 100644
--- a/src/api/provider.js
+++ b/src/api/provider.js
@@ -42,6 +42,14 @@ export const FetchProviderArticles = (providerId)=>{
return provider.post(`/${providerId}/pull`)
}
-export const FetchProviderArticle = (providerArticle)=>{
- return provider.post(`/${providerArticle.providerId}/fetch/${providerArticle.id}`)
+export const FetchProviderArticlePrice = (providerArticle)=>{
+ return provider.post(`/${providerArticle.providerId}/price/fetch/${providerArticle.id}`)
+}
+
+export const FetchProviderArticleAts = (providerArticle)=>{
+ return provider.post(`/${providerArticle.providerId}/ats/fetch/${providerArticle.skuID}`)
+}
+
+export const FetchProviderArticleDetail = (pid)=>{
+ return provider.post(`/${providerArticle.providerId}/detail/fetch/${pid}`)
}
\ No newline at end of file
diff --git a/src/componse/provider-article/provider-article-panel.vue b/src/componse/provider-article/provider-article-panel.vue
index e33d307..a8d9590 100644
--- a/src/componse/provider-article/provider-article-panel.vue
+++ b/src/componse/provider-article/provider-article-panel.vue
@@ -8,7 +8,9 @@
- {{header}}
+
+ {{header}}
+
@@ -22,17 +24,25 @@
当前售价:$ {{provider.cost.originalPrice || '-'}}
-
-
+
+
+
+
{{provider.cost.calMark}}
-
- 当前到手价:¥ {{provider.cost.finalPrice || '-'}}
-
-
当前到手价:¥ {{provider.cost.finalPrice || '-'}}
-
-
立即拉取
+
+
当前到手价:¥ {{provider.cost.finalPrice || '-'}}
+
+
拉取价格
+
+
+
当前到手价:¥ {{provider.cost.finalPrice || '-'}}
+
拉取价格
+
+
+
库存:{{provider.ast }}
+
拉取库存
@@ -112,7 +122,7 @@ import { use } from 'echarts/core'
import { LineChart } from 'echarts/charts'
import { GridComponent, TitleComponent, TooltipComponent, LegendComponent } from 'echarts/components'
import { CanvasRenderer } from 'echarts/renderers'
-import {FetchProviderArticle} from "@/api/provider.js";
+import {FetchProviderArticleAts, FetchProviderArticlePrice} from "@/api/provider.js";
use([GridComponent, LineChart, CanvasRenderer, TitleComponent , TooltipComponent, LegendComponent ])
@@ -156,7 +166,7 @@ const fetchLoading = ref(false)
// 拉取单个商品价格
const fetchArticle = (pArticle) => {
fetchLoading.value = true
- FetchProviderArticle(pArticle).then(res=>{
+ FetchProviderArticlePrice(pArticle).then(res=>{
if(res.code !== 200){
message.error(`拉取失败:${res.msg}`)
}else {
@@ -167,8 +177,28 @@ const fetchArticle = (pArticle) => {
console.log(err)
}).finally(()=>{
fetchLoading.value = false
+ emits('fetched')
})
}
+
+const fetchArticleAts = (pArticle) => {
+ fetchLoading.value = true
+ FetchProviderArticleAts(pArticle).then(res=>{
+ if(res.code !== 200){
+ message.error(`拉取失败:${res.msg}`)
+ }else {
+ message.success('拉取成功')
+ }
+ }).catch(err => {
+ message.error('拉取失败')
+ console.log(err)
+ }).finally(()=>{
+ fetchLoading.value = false
+ emits('fetched')
+ })
+}
+
+const emits = defineEmits(['fetched'])
diff --git a/src/css/base.css b/src/css/base.css
index 12456aa..7e97590 100644
--- a/src/css/base.css
+++ b/src/css/base.css
@@ -8,4 +8,8 @@ html,body,#app {
::-webkit-scrollbar {
width: 0;
background: transparent;
+}
+
+.ant-collapse-header{
+ align-items: center !important;
}
\ No newline at end of file
diff --git a/src/main.js b/src/main.js
index e83a210..ed8bf3c 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,6 +1,6 @@
import { createApp } from 'vue'
-import './css/base.css'
import App from './App.vue'
+import './css/base.css'
import 'virtual:uno.css'
import router from "@/routers/index.js";
diff --git a/src/views/article/detail.vue b/src/views/article/detail.vue
index 2256c40..1419837 100644
--- a/src/views/article/detail.vue
+++ b/src/views/article/detail.vue
@@ -51,7 +51,10 @@
+ :provider="item" :provider-dict="dict.providers"
+ :open="openTabKey.indexOf(item.providerId) > -1"
+ @fetched="load"
+ >
diff --git a/vite.config.js b/vite.config.js
index 8af953f..784e6a9 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -35,36 +35,36 @@ export default defineConfig({
ws: true,
},
'/api/v2/sellers': {
- target: 'http://localhost:8081/',
- // target: 'http://192.168.31.55:2280/',
+ // target: 'http://localhost:8081/',
+ target: 'https://ht.timerzz.com:20443/',
changeOrigin: true,
secure: false,
ws: true,
},
'/api/v2/seller': {
- target: 'http://localhost:8083/',
- // target: 'http://192.168.31.55:2280/',
+ // target: 'http://localhost:8083/',
+ target: 'https://ht.timerzz.com:20443/',
changeOrigin: true,
secure: false,
ws: true,
},
'/api/v2/providers': {
target: 'http://localhost:8080/',
- // target: 'http://192.168.31.55:2280/',
+ // target: 'https://ht.timerzz.com:20443/',
changeOrigin: true,
secure: false,
ws: true,
},
'/api/v2/provider': {
target: 'http://172.21.195.130:8082/',
- // target: 'http://192.168.31.55:2280/',
+ // target: 'https://ht.timerzz.com:20443/',
changeOrigin: true,
secure: false,
ws: true,
},
'/api/v2/articles': {
+ // target: 'https://ht.timerzz.com:20443/',
target: 'http://localhost:8085/',
- // target: 'http://192.168.31.55:2280/',
changeOrigin: true,
secure: false,
ws: true,