|
@@ -10,9 +10,8 @@
|
|
</route>
|
|
</route>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
-import useRequest from '../../hooks/useRequest'
|
|
|
|
import dayjs from 'dayjs'
|
|
import dayjs from 'dayjs'
|
|
-import { getCircles, scanCodeCheckPaper } from '../../core/libs/requests'
|
|
|
|
|
|
+import { getDeignerPointsActivities, scanCodeCheckPaper } from '../../core/libs/requests'
|
|
import SectionHeading from '@designer-hub/app/src/components/section-heading.vue'
|
|
import SectionHeading from '@designer-hub/app/src/components/section-heading.vue'
|
|
import Card from '@designer-hub/app/src/components/card.vue'
|
|
import Card from '@designer-hub/app/src/components/card.vue'
|
|
import { merchantPageHeaderBg, scanIcon, bookIcon } from '@designer-hub/assets/src/svgs'
|
|
import { merchantPageHeaderBg, scanIcon, bookIcon } from '@designer-hub/assets/src/svgs'
|
|
@@ -20,8 +19,8 @@ import { useUserStore } from '../../store'
|
|
import { storeToRefs } from 'pinia'
|
|
import { storeToRefs } from 'pinia'
|
|
import { qrCodeString2Object, requestToast } from '@designer-hub/app/src/core/utils/common'
|
|
import { qrCodeString2Object, requestToast } from '@designer-hub/app/src/core/utils/common'
|
|
import { QrCodeBusinessType } from '../../core/libs/enums'
|
|
import { QrCodeBusinessType } from '../../core/libs/enums'
|
|
-import NavbarEvo from '@/components/navbar-evo.vue'
|
|
|
|
import { useRouter } from '../../composables/router'
|
|
import { useRouter } from '../../composables/router'
|
|
|
|
+import PageHelperEvo from '@/components/page-helper-evo.vue'
|
|
|
|
|
|
defineOptions({
|
|
defineOptions({
|
|
name: 'Home',
|
|
name: 'Home',
|
|
@@ -29,81 +28,8 @@ defineOptions({
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
const userStore = useUserStore()
|
|
const userStore = useUserStore()
|
|
const { isLogined, userInfo } = storeToRefs(userStore)
|
|
const { isLogined, userInfo } = storeToRefs(userStore)
|
|
-// 测试 uni API 自动引入
|
|
|
|
-const { data } = useRequest(async () => ({ code: 0, msg: '', data: {} }) as IResData<any>, {
|
|
|
|
- initialData: {
|
|
|
|
- banners: [],
|
|
|
|
- hots: [
|
|
|
|
- {
|
|
|
|
- id: 1,
|
|
|
|
- title: '日本研学·东京艺术大学游学',
|
|
|
|
- img: '',
|
|
|
|
- start: dayjs('2024-07-15').toDate(),
|
|
|
|
- end: dayjs('2024-08-10').toDate(),
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: 1,
|
|
|
|
- title: '日本研学·东京艺术大学游学',
|
|
|
|
- img: '',
|
|
|
|
- start: dayjs('2024-07-15').toDate(),
|
|
|
|
- end: dayjs('2024-08-10').toDate(),
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- dynamics: [
|
|
|
|
- {
|
|
|
|
- author: {
|
|
|
|
- avatar: 'https://via.placeholder.com/35x35',
|
|
|
|
- nickname: '苏小萌',
|
|
|
|
- level: '0',
|
|
|
|
- },
|
|
|
|
- content: '用心做好设计,为客户创造美好家居环境',
|
|
|
|
- images: ['https://via.placeholder.com/165x220'],
|
|
|
|
- tags: ['意大利游学设计班'],
|
|
|
|
- shares: 0,
|
|
|
|
- comments: 0,
|
|
|
|
- likes: 0,
|
|
|
|
- createdAt: dayjs('2024-07-15').toDate(),
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- author: {
|
|
|
|
- avatar: 'https://via.placeholder.com/35x35',
|
|
|
|
- nickname: '苏小萌',
|
|
|
|
- level: '0',
|
|
|
|
- },
|
|
|
|
- content: '用心做好设计,为客户创造美好家居环境',
|
|
|
|
- images: ['https://via.placeholder.com/220x165'],
|
|
|
|
- tags: ['意大利游学设计班'],
|
|
|
|
- shares: 0,
|
|
|
|
- comments: 0,
|
|
|
|
- likes: 0,
|
|
|
|
- createdAt: dayjs('2024-07-15').toDate(),
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- author: {
|
|
|
|
- avatar: 'https://via.placeholder.com/35x35',
|
|
|
|
- nickname: '苏小萌',
|
|
|
|
- level: '0',
|
|
|
|
- },
|
|
|
|
- content: '用心做好设计,为客户创造美好家居环境',
|
|
|
|
- images: [
|
|
|
|
- 'https://via.placeholder.com/104x104',
|
|
|
|
- 'https://via.placeholder.com/104x204',
|
|
|
|
- 'https://via.placeholder.com/204x104',
|
|
|
|
- ],
|
|
|
|
- tags: ['意大利游学设计班'],
|
|
|
|
- shares: 0,
|
|
|
|
- comments: 0,
|
|
|
|
- likes: 0,
|
|
|
|
- createdAt: dayjs('2024-07-15').toDate(),
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- studyTour: null,
|
|
|
|
- },
|
|
|
|
-})
|
|
|
|
-const { data: circlesData, run } = useRequest(() => getCircles({}), { initialData: { list: [] } })
|
|
|
|
const orderAmount = ref()
|
|
const orderAmount = ref()
|
|
const pointsAmount = computed(() => orderAmount.value * 10)
|
|
const pointsAmount = computed(() => orderAmount.value * 10)
|
|
-console.log(data.value)
|
|
|
|
const toDesigner = () => {
|
|
const toDesigner = () => {
|
|
uni.navigateTo({ url: '/pages/designer/index' })
|
|
uni.navigateTo({ url: '/pages/designer/index' })
|
|
}
|
|
}
|
|
@@ -133,11 +59,13 @@ const handle2Settlement = () => {
|
|
const toAddReporting = () => {
|
|
const toAddReporting = () => {
|
|
uni.navigateTo({ url: '/pages/home/merchant/add-reporting-information' })
|
|
uni.navigateTo({ url: '/pages/home/merchant/add-reporting-information' })
|
|
}
|
|
}
|
|
-onShow(async () => {})
|
|
|
|
|
|
+onShow(async () => {
|
|
|
|
+ await Promise.all([])
|
|
|
|
+})
|
|
onLoad(() => {
|
|
onLoad(() => {
|
|
console.log(isLogined.value)
|
|
console.log(isLogined.value)
|
|
if (!isLogined.value) {
|
|
if (!isLogined.value) {
|
|
- // uni.reLaunch({ url: '/pages/login/index' })
|
|
|
|
|
|
+ uni.reLaunch({ url: '/pages/login/index' })
|
|
}
|
|
}
|
|
})
|
|
})
|
|
onShareAppMessage(() => ({}))
|
|
onShareAppMessage(() => ({}))
|
|
@@ -233,27 +161,36 @@ onShareAppMessage(() => ({}))
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
<SectionHeading title="设计师最新动态" path="" custom-class="mb-5"></SectionHeading>
|
|
<SectionHeading title="设计师最新动态" path="" custom-class="mb-5"></SectionHeading>
|
|
- <div class="flex flex-col gap-4">
|
|
|
|
- <template
|
|
|
|
- v-for="{ title, date } of [
|
|
|
|
- { title: '苏小萌报名了日本设计游学', date: new Date() },
|
|
|
|
- { title: '苏小萌报名了骑行活动', date: new Date() },
|
|
|
|
- { title: '苏小萌获取imola16000积分', date: new Date() },
|
|
|
|
- ]"
|
|
|
|
- :key="title"
|
|
|
|
- >
|
|
|
|
- <Card>
|
|
|
|
- <div class="text-black/90 text-sm font-normal font-['PingFang_SC'] leading-none">
|
|
|
|
- {{ title }}
|
|
|
|
- </div>
|
|
|
|
- <div
|
|
|
|
- class="mt-3 text-black/30 text-xs font-normal font-['PingFang_SC'] leading-none"
|
|
|
|
|
|
+ <PageHelperEvo
|
|
|
|
+ :request="getDeignerPointsActivities"
|
|
|
|
+ :query="{ brokerId: userInfo.userId }"
|
|
|
|
+ >
|
|
|
|
+ <template #default="{ source }">
|
|
|
|
+ <div class="flex flex-col gap-4">
|
|
|
|
+ <template
|
|
|
|
+ v-for="{ title, date } of [
|
|
|
|
+ { title: '苏小萌报名了日本设计游学', date: new Date() },
|
|
|
|
+ { title: '苏小萌报名了骑行活动', date: new Date() },
|
|
|
|
+ { title: '苏小萌获取imola16000积分', date: new Date() },
|
|
|
|
+ ]"
|
|
|
|
+ :key="title"
|
|
>
|
|
>
|
|
- {{ dayjs(date).format('YYYY-MM-DD hh:mm') }}
|
|
|
|
- </div>
|
|
|
|
- </Card>
|
|
|
|
|
|
+ <Card>
|
|
|
|
+ <div
|
|
|
|
+ class="text-black/90 text-sm font-normal font-['PingFang_SC'] leading-none"
|
|
|
|
+ >
|
|
|
|
+ {{ title }}
|
|
|
|
+ </div>
|
|
|
|
+ <div
|
|
|
|
+ class="mt-3 text-black/30 text-xs font-normal font-['PingFang_SC'] leading-none"
|
|
|
|
+ >
|
|
|
|
+ {{ dayjs(date).format('YYYY-MM-DD hh:mm') }}
|
|
|
|
+ </div>
|
|
|
|
+ </Card>
|
|
|
|
+ </template>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
- </div>
|
|
|
|
|
|
+ </PageHelperEvo>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|