|
@@ -1,32 +1,61 @@
|
|
|
<script setup lang="ts">
|
|
|
import TabbarEvo from '@/components/tabbar-evo.vue'
|
|
|
-import { home, homeActive, mine, mineActive, publish } from '../core/libs/svgs'
|
|
|
import { currRoute } from '../utils'
|
|
|
import { defaultThemeVars } from '../core/themes/default'
|
|
|
import DataForm from '@designer-hub/app/src/components/data-form.vue'
|
|
|
+import { useUserStore } from '../store'
|
|
|
+import { storeToRefs } from 'pinia'
|
|
|
+import {
|
|
|
+ addBlue,
|
|
|
+ channelTabbarHome,
|
|
|
+ channelTabbarHomeActive,
|
|
|
+ channelTabbarMine,
|
|
|
+ channelTabbarMineActive,
|
|
|
+} from '@designer-hub/assets/src'
|
|
|
|
|
|
+const userStore = useUserStore()
|
|
|
+const { userInfo, isChannel, isMerchant } = storeToRefs(userStore)
|
|
|
const publishState = ref(false)
|
|
|
-const items = [
|
|
|
- {
|
|
|
- title: '首页',
|
|
|
- iconPath: home,
|
|
|
- selectedIconPath: homeActive,
|
|
|
- path: '/pages/home/index',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '发布',
|
|
|
- iconPath: publish,
|
|
|
- selectedIconPath: publish,
|
|
|
- path: '/pages/publish/index',
|
|
|
- hiddenTitle: true,
|
|
|
- },
|
|
|
- {
|
|
|
- title: '我的',
|
|
|
- iconPath: mine,
|
|
|
- selectedIconPath: mineActive,
|
|
|
- path: '/pages/mine/index',
|
|
|
- },
|
|
|
-]
|
|
|
+const items = computed(() => {
|
|
|
+ if (isChannel.value) {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ title: '首页',
|
|
|
+ iconPath: channelTabbarHome,
|
|
|
+ selectedIconPath: channelTabbarHomeActive,
|
|
|
+ path: '/pages/home/index',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '发布',
|
|
|
+ iconPath: addBlue,
|
|
|
+ selectedIconPath: addBlue,
|
|
|
+ path: '/pages/publish/index',
|
|
|
+ hiddenTitle: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '我的',
|
|
|
+ iconPath: channelTabbarMine,
|
|
|
+
|
|
|
+ selectedIconPath: channelTabbarMineActive,
|
|
|
+ path: '/pages/mine/index',
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ title: '首页',
|
|
|
+ iconPath: channelTabbarHome,
|
|
|
+ selectedIconPath: channelTabbarHomeActive,
|
|
|
+ path: '/pages/home/index',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '我的',
|
|
|
+ iconPath: channelTabbarMine,
|
|
|
+ selectedIconPath: channelTabbarMineActive,
|
|
|
+ path: '/pages/mine/index',
|
|
|
+ },
|
|
|
+ ]
|
|
|
+})
|
|
|
const schema = ref({
|
|
|
user: {
|
|
|
type: 'TextField',
|
|
@@ -61,14 +90,7 @@ const handleTabbarItemClick = (path: string) => {
|
|
|
}
|
|
|
uni.switchTab({ url: path })
|
|
|
}
|
|
|
-const toPublishMoment = () => {
|
|
|
- uni.navigateTo({ url: '/pages/publish/moment/index' })
|
|
|
- publishState.value = false
|
|
|
-}
|
|
|
-const toPublishCase = () => {
|
|
|
- uni.navigateTo({ url: '/pages/publish/cases/index' })
|
|
|
- publishState.value = false
|
|
|
-}
|
|
|
+onMounted(async () => {})
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -90,40 +112,6 @@ const toPublishCase = () => {
|
|
|
<div><wd-button block :round="false">提交</wd-button></div>
|
|
|
</view>
|
|
|
</wd-action-sheet>
|
|
|
- <!-- <div
|
|
|
- v-if="publishState"
|
|
|
- class="bg-white/80 backdrop-blur-[100px] fixed top-0 left-0 right-0 bottom-0 z-1"
|
|
|
- >
|
|
|
- <div class="w-full h-full flex flex-col justify-around px-7 box-border">
|
|
|
- <div class="text-black/40 text-3xl font-normal font-['PingFang SC'] leading-[45px]">
|
|
|
- 发布记录,
|
|
|
- <br />
|
|
|
- 成为更好的自己!
|
|
|
- </div>
|
|
|
- <div class="flex flex-col">
|
|
|
- <div class="flex justify-around">
|
|
|
- <div class="flex flex-col items-center" @click="toPublishMoment">
|
|
|
- <wd-img :src="iconCamera" width="66" mode="widthFix"></wd-img>
|
|
|
- <div class="text-black text-sm font-normal font-['PingFang SC'] leading-[21px]">
|
|
|
- 个人动态
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="flex flex-col items-center" @click="toPublishCase">
|
|
|
- <wd-img :src="iconWallet" width="66" mode="widthFix"></wd-img>
|
|
|
- <div class="text-black text-sm font-normal font-['PingFang SC'] leading-[21px]">
|
|
|
- 设计案例
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <wd-button
|
|
|
- custom-class="mt-15"
|
|
|
- type="icon"
|
|
|
- icon="close"
|
|
|
- @click="publishState = false"
|
|
|
- ></wd-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div> -->
|
|
|
<wd-toast />
|
|
|
<wd-message-box />
|
|
|
</wd-config-provider>
|