diff --git a/src/api/cn-coach-spider.js b/src/api/cn-coach-spider.js new file mode 100644 index 0000000..5082b50 --- /dev/null +++ b/src/api/cn-coach-spider.js @@ -0,0 +1,9 @@ +import {mande} from "mande"; + +const cnCoachSpider = mande('/api/v1/spider/cn/coach') + +export const GetCNCoachSpiderGlobalCalculate = ()=> cnCoachSpider.get("global/calculate") +export const DeleteCNCoachSpiderGlobalCalculate = (id)=> cnCoachSpider.delete(`global/calculate/u/${id}`) +export const SaveCNCoachSpiderGlobalCalculate = (data)=> cnCoachSpider.post("global/calculate",data) +export const DeleteCNCoachSpiderCalculate = (id)=> cnCoachSpider.delete(`calculate/u/${id}`) +export const SaveCNCoachSpiderCalculate = (data)=> cnCoachSpider.post("calculate",data) \ No newline at end of file diff --git a/src/constants/website.js b/src/constants/website.js index bb37a2f..677410a 100644 --- a/src/constants/website.js +++ b/src/constants/website.js @@ -1,7 +1,8 @@ export const WEBSITES = { UNKNOWN: 0, US_COACH_OUTLET: 1, - CN_COACH: 2 + CN_COACH_OUTLET: 2, + CN_COACH: 3 } export const WEBSITE_OPTIONS = [ @@ -16,5 +17,9 @@ export const WEBSITE_OPTIONS = [ { label: '中国coach', value: WEBSITES.CN_COACH + }, + { + label: '中国coach outlet', + value: WEBSITES.CN_COACH_OUTLET } ] \ No newline at end of file diff --git a/src/routers/index.js b/src/routers/index.js index dae0c03..8688c6c 100644 --- a/src/routers/index.js +++ b/src/routers/index.js @@ -20,6 +20,11 @@ const routes = [ name: 'cn-coach', component: ()=>import('@/views/Product/CNCoachOutlet.vue') }, + { + path: '/cn-coach-outlet', + name: 'cn-coach-outlet', + component: ()=>import('@/views/Product/CNCoachOutlet.vue') + }, { path: '/pusher', name: 'pusher', diff --git a/src/views/Product/CNCoachOutlet.vue b/src/views/Product/CNCoachOutlet.vue index 50f3750..364565a 100644 --- a/src/views/Product/CNCoachOutlet.vue +++ b/src/views/Product/CNCoachOutlet.vue @@ -2,6 +2,7 @@
+ 查看优惠设置
@@ -19,9 +20,9 @@ - - @@ -65,7 +79,7 @@
历史价格
{{moment(h.createdAt).format('YYYY-MM-DD HH:mm:ss')}}
-
¥{{h.usPrice}}
+
¥{{h.originalPrice}}
得物价格(CNY)
@@ -81,19 +95,61 @@
+ + diff --git a/src/views/Product/Calculate.vue b/src/views/Product/Calculate.vue index db57674..714389a 100644 --- a/src/views/Product/Calculate.vue +++ b/src/views/Product/Calculate.vue @@ -52,7 +52,7 @@ const props = defineProps({ default: ()=>{} } }) -const emit = defineEmits(['update:visible']) +const emit = defineEmits(['update:visible', 'ok']) const open = computed({ get() { if(props.visible){ @@ -107,6 +107,7 @@ const save = ()=>{ props.save(modal.data.calculate).then(res=>{ open.value = false message.success('保存成功') + emit('ok') }).catch(err=>{ console.log(err) message.error('保存失败') diff --git a/src/views/Product/USCoachOutlet.vue b/src/views/Product/USCoachOutlet.vue index 41515e4..0f8b039 100644 --- a/src/views/Product/USCoachOutlet.vue +++ b/src/views/Product/USCoachOutlet.vue @@ -139,14 +139,16 @@