diff --git a/public/icons/constellation/constellation_icon_bg_large.webp b/public/icons/constellation/constellation_icon_bg_large.webp new file mode 100644 index 0000000..3b2e575 Binary files /dev/null and b/public/icons/constellation/constellation_icon_bg_large.webp differ diff --git a/public/icons/constellation/constellation_icon_bg_medium.webp b/public/icons/constellation/constellation_icon_bg_medium.webp new file mode 100644 index 0000000..fd12787 Binary files /dev/null and b/public/icons/constellation/constellation_icon_bg_medium.webp differ diff --git a/public/icons/constellation/constellation_un.png b/public/icons/constellation/constellation_un.png new file mode 100644 index 0000000..d0606bc Binary files /dev/null and b/public/icons/constellation/constellation_un.png differ diff --git a/public/icons/constellation/starSign__back.png b/public/icons/constellation/starSign__back.png new file mode 100644 index 0000000..357b1dd Binary files /dev/null and b/public/icons/constellation/starSign__back.png differ diff --git a/public/icons/constellation/starSign__icon.png b/public/icons/constellation/starSign__icon.png new file mode 100644 index 0000000..68a8a9a Binary files /dev/null and b/public/icons/constellation/starSign__icon.png differ diff --git a/public/icons/constellation/xingzuo_right.png b/public/icons/constellation/xingzuo_right.png new file mode 100644 index 0000000..c8ee37c Binary files /dev/null and b/public/icons/constellation/xingzuo_right.png differ diff --git a/src/GlobalModal.tsx b/src/GlobalModal.tsx index fcdb320..9dcc468 100644 --- a/src/GlobalModal.tsx +++ b/src/GlobalModal.tsx @@ -99,7 +99,6 @@ export default defineComponent(() => { ) const compo = selected.modal - console.log(compo) return })() ) : null} diff --git a/src/layout/background/BackgroundSwtich.tsx b/src/layout/background/BackgroundSwtich.tsx index ccedaa6..a3d0997 100644 --- a/src/layout/background/BackgroundSwtich.tsx +++ b/src/layout/background/BackgroundSwtich.tsx @@ -59,7 +59,6 @@ export default defineComponent(() => { const sortBy = ref<'hotNum' | 'time'>('hotNum') onMounted(() => { request('GET', '/api/app/backgroundTypes').then((res) => { - console.log(res) typeList.value = res selectType.value = res[0].id }) @@ -71,7 +70,6 @@ export default defineComponent(() => { wallpaperList.value = [] request('GET', `/api/app/backgrounds?typeId=${e[0]}&sort=${sortBy.value}`).then( (res) => { - console.log(res) wallpaperList.value = res } ) @@ -220,7 +218,6 @@ export default defineComponent(() => {
{ - console.log(index) if (index === 2) { if (!userStore.isLogin) { diff --git a/src/utils/UploadAndCut.tsx b/src/utils/UploadAndCut.tsx index 9696307..bc6226e 100644 --- a/src/utils/UploadAndCut.tsx +++ b/src/utils/UploadAndCut.tsx @@ -25,7 +25,6 @@ export default defineComponent({ const file = target.files?.[0] target.value = '' - console.log(file?.name); if (!file) return // upload(file).then(res => { diff --git a/src/widgets/constellation/Large.tsx b/src/widgets/constellation/Large.tsx index b83de91..81e92bb 100644 --- a/src/widgets/constellation/Large.tsx +++ b/src/widgets/constellation/Large.tsx @@ -1,9 +1,86 @@ import { defineComponent } from 'vue' +import { useConstellationStore, zodiacMap } from './useConstellationStore' +import dayjs from 'dayjs' +import StarCicle from './starCicle' export default defineComponent(() => { + const store = useConstellationStore() + return () => ( -
- large +
+
+ + 今日运势 + {dayjs().format('YYYY.MM.DD')} + +
+
+ + + + {zodiacMap.get(store.state.selectCode)} + + +
+
+
+ 幸运颜色: + + {store.data?.today.lucky_color} + +
+
+ 速配星座: + + {store.data?.today.grxz} + +
+
+ 今日提醒: + + {store.data?.today.day_notice} + +
+
+
+
+
+ +
+
) }) diff --git a/src/widgets/constellation/Middle.tsx b/src/widgets/constellation/Middle.tsx index 53edc23..f08d1f0 100644 --- a/src/widgets/constellation/Middle.tsx +++ b/src/widgets/constellation/Middle.tsx @@ -1,10 +1,60 @@ import { defineComponent } from 'vue' +import StarCicle from './starCicle' +import { useConstellationStore, zodiacMap } from './useConstellationStore' +import dayjs from 'dayjs' export default defineComponent(() => { - + const store = useConstellationStore() return () => ( -
- middle +
+
+
+ + + {dayjs().format('YYYY.MM.DD')} + + + {zodiacMap.get(store.state.selectCode)} + + +
+
+ +
+
+ {store.data?.today.day_notice} +
+
+
) }) diff --git a/src/widgets/constellation/Modal.tsx b/src/widgets/constellation/Modal.tsx index 444f624..a2958cc 100644 --- a/src/widgets/constellation/Modal.tsx +++ b/src/widgets/constellation/Modal.tsx @@ -1,6 +1,7 @@ import { defineComponent, ref } from 'vue' import { useConstellationStore, zodiacDateMap, zodiacMap } from './useConstellationStore' import dayjs from 'dayjs' +import clsx from 'clsx' export default defineComponent(() => { const store = useConstellationStore() @@ -13,6 +14,9 @@ export default defineComponent(() => { background: `url('/bg/xingzuo_bg.png')`, backgroundSize: '100% 100%' }} + onClick={() => { + open.value = false + }} >
{ { + onClick={(e) => { open.value = true + e.stopPropagation() }} > {open.value && (
+ { + page.value = (page.value % 2) + 1 + }} + class={clsx( + 'absolute top-1/2 -translate-y-1/2 hover:scale-110 duration-150 w-10 cursor-pointer', + page.value === 1 ? 'right-5' : 'left-5 rotate-180 ' + )} + src="/icons/constellation/xingzuo_right.png" + >
{Array.from(zodiacMap) - .filter((_, index) => index < page.value * 6) + .filter((_, index) => index < page.value * 6 && index >= (page.value - 1) * 6) .map(([key, value]) => (
{ {Array.from({ length: 5 }).map((_, index) => ( index + (store.data?.today.exponents.zonghe.star || 0) > index ? '/icons/stared.png' : '/icons/starun.png' } diff --git a/src/widgets/constellation/Small.tsx b/src/widgets/constellation/Small.tsx index bf0a763..b4c4562 100644 --- a/src/widgets/constellation/Small.tsx +++ b/src/widgets/constellation/Small.tsx @@ -3,12 +3,25 @@ import { defineComponent } from 'vue' export default defineComponent(() => { return () => (
- + +
+
+ 游戏折扣 +
+ 立即查看 +
+ +
+
+
+
) }) + diff --git a/src/widgets/constellation/starCicle.tsx b/src/widgets/constellation/starCicle.tsx new file mode 100644 index 0000000..f98340a --- /dev/null +++ b/src/widgets/constellation/starCicle.tsx @@ -0,0 +1,54 @@ +import { ConfigProvider, Progress } from 'ant-design-vue' +import { defineComponent } from 'vue' + +export default defineComponent({ + name: 'StarCicle', + props: { + star: { + type: Number, + default: 1 + }, + type: { + type: String, + default: '综合运势' + }, + size: { + type: Number, + default: 80 + } + }, + setup(props) { + return () => ( +
+ + +
+ {props.type} +
+
+ ) + } +}) diff --git a/src/widgets/constellation/useConstellationStore.ts b/src/widgets/constellation/useConstellationStore.ts index a121a85..f0cca09 100644 --- a/src/widgets/constellation/useConstellationStore.ts +++ b/src/widgets/constellation/useConstellationStore.ts @@ -85,7 +85,7 @@ export const zodiacMap = new Map([ [107, "天秤座"], [108, "天蝎座"], [109, "射手座"], - [110, "魔羯座"], + [110, "摩羯座"], [111, "水瓶座"], [112, "双鱼座"] ]); diff --git a/src/widgets/discount/Modal.tsx b/src/widgets/discount/Modal.tsx index 4006149..3b84059 100644 --- a/src/widgets/discount/Modal.tsx +++ b/src/widgets/discount/Modal.tsx @@ -10,10 +10,8 @@ export default defineComponent(() => { const handleScroll = () => { const container = containerRef.value - console.log(container) if (container.scrollTop + container.clientHeight >= container.scrollHeight - 50) { - console.log('到底了') store.getNews() } diff --git a/src/widgets/gameNews/Modal.tsx b/src/widgets/gameNews/Modal.tsx index 9450d42..3bfa829 100644 --- a/src/widgets/gameNews/Modal.tsx +++ b/src/widgets/gameNews/Modal.tsx @@ -10,10 +10,8 @@ export default defineComponent(() => { const handleScroll = () => { const container = containerRef.value - console.log(container) if (container.scrollTop + container.clientHeight >= container.scrollHeight - 50) { - console.log('到底了') store.getNews() } diff --git a/src/widgets/video/useVideoStore.tsx b/src/widgets/video/useVideoStore.tsx index 67969b9..6e2bb3b 100644 --- a/src/widgets/video/useVideoStore.tsx +++ b/src/widgets/video/useVideoStore.tsx @@ -1,8 +1,15 @@ -import { defineStore } from "pinia"; +import useLayoutStore from '@/layout/useLayoutStore' +import { defineStore } from 'pinia' +import { computed, ref, watch } from 'vue' export default defineStore('video', () => { - - return { - + const videoList = ref([]) + const layout = useLayoutStore() + watch( + () => layout.state.current, + (val) => { + console.log('videoList', val) } -}) \ No newline at end of file + ) + return {} +})