Refactor API requests and update component imports
This commit is contained in:
@ -54,9 +54,9 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive, ref } from 'vue'
|
||||
import { resetPassoword } from '@/api/login/index'
|
||||
import { sendSms } from '@/api/common/index'
|
||||
import useUserStore from '@/store/user'
|
||||
import { resetPassoword } from '~/api/login/index'
|
||||
import { sendSms } from '~/api/common/index'
|
||||
import useUserStore from '~/store/user'
|
||||
const userStore = useUserStore()
|
||||
|
||||
const activeName = ref('修改密码')
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ProjectHistoryResVO } from '@/api/personal-center/types'
|
||||
import type { ProjectHistoryResVO } from '~/api/personal-center/types'
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
const modelValue = defineModel<ProjectHistoryResVO[]>('modelValue', {
|
||||
|
||||
@ -9,15 +9,15 @@
|
||||
<div class="text-14px text-[#333333] font-normal my-10px!">by {{ scope.row?.ownedUserIdInfo?.nickName }}</div>
|
||||
<div class="flex items-center">
|
||||
<div class="flex items-center">
|
||||
<img src="@/assets/images/look.png" alt="" srcset="" class="h-17px" />
|
||||
<img src="~/assets/images/look.png" alt="" srcset="" class="h-17px" />
|
||||
<span class="ml-4px">{{ scope.row.previewPoint }}</span>
|
||||
</div>
|
||||
<div class="ml-13px flex items-center">
|
||||
<img src="@/assets/images/add.png" alt="" srcset="" class="h-23px" />
|
||||
<img src="~/assets/images/add.png" alt="" srcset="" class="h-23px" />
|
||||
<span class="ml-4px">{{ scope.row.hotPoint }}</span>
|
||||
</div>
|
||||
<div class="ml-13px flex items-center">
|
||||
<img src="@/assets/images/chat.png" alt="" srcset="" class="h-17px" />
|
||||
<img src="~/assets/images/chat.png" alt="" srcset="" class="h-17px" />
|
||||
<span class="ml-4px">{{ scope.row.commentsPoint }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -35,7 +35,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ProjectHistoryResVO } from '@/api/personal-center/types'
|
||||
import type { ProjectHistoryResVO } from '~/api/personal-center/types'
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
const modelValue = defineModel<ProjectHistoryResVO[]>('modelValue', {
|
||||
|
||||
@ -10,15 +10,15 @@
|
||||
<div class="text-14px text-[#333333] font-normal my-10px!">{{ scope.row?.ownedUserIdInfo?.nickName }}</div>
|
||||
<div class="flex items-center">
|
||||
<div class="flex items-center">
|
||||
<img src="@/assets/images/look.png" alt="" srcset="" class="h-17px" />
|
||||
<img src="~/assets/images/look.png" alt="" srcset="" class="h-17px" />
|
||||
<span class="ml-4px">{{ scope.rowpreviewPoint || 0 }}</span>
|
||||
</div>
|
||||
<div class="ml-13px flex items-center">
|
||||
<img src="@/assets/images/add.png" alt="" srcset="" class="h-23px" />
|
||||
<img src="~/assets/images/add.png" alt="" srcset="" class="h-23px" />
|
||||
<span class="ml-4px">{{ scope.row.hotPoint || 0 }}</span>
|
||||
</div>
|
||||
<div class="ml-13px flex items-center">
|
||||
<img src="@/assets/images/chat.png" alt="" srcset="" class="h-17px" />
|
||||
<img src="~/assets/images/chat.png" alt="" srcset="" class="h-17px" />
|
||||
<span class="ml-4px">{{ scope.row.commentsPoint || 0 }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -42,11 +42,11 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
import KlTabBar from '@/components/kl-tab-bar/v2/index.vue'
|
||||
import { PageResultProjectMemberFavoritesRespVO } from '@/api/personal-center/types'
|
||||
import { deleteProject } from '@/api/drawe-detail/index'
|
||||
import KlTabBar from '~/components/kl-tab-bar/v2/index.vue'
|
||||
import type { PageResultProjectMemberFavoritesRespVO } from '~/api/personal-center/types'
|
||||
import { deleteProject } from '~/api/drawe-detail/index'
|
||||
import dayjs from 'dayjs'
|
||||
import { useMessage } from '@/utils/useMessage'
|
||||
import { useMessage } from '~/utils/useMessage'
|
||||
const message = useMessage()
|
||||
|
||||
const type = defineModel<number | string>('type', {
|
||||
|
||||
@ -128,10 +128,10 @@
|
||||
import { throttle } from 'lodash'
|
||||
import { ref, computed, onMounted, nextTick } from 'vue'
|
||||
import { Picture, Position, Sunrise, Search, Loading } from '@element-plus/icons-vue'
|
||||
import { upload } from '@/api/common'
|
||||
import { sendSingleChat, conversationList, getChatDetail, clearUnreadMessage } from '@/api/channel/index'
|
||||
import { chatMessagesReq, msgType, PageResultSessionRespVO, PageResultMessageRespVO } from '@/api/channel/types'
|
||||
import useUserStore from '@/store/user'
|
||||
import { upload } from '~/api/common'
|
||||
import { sendSingleChat, conversationList, getChatDetail, clearUnreadMessage } from '~/api/channel/index'
|
||||
import type { chatMessagesReq, msgType, PageResultSessionRespVO, PageResultMessageRespVO } from '~/api/channel/types'
|
||||
import useUserStore from '~/store/user'
|
||||
const userStore = useUserStore()
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
|
||||
@ -23,11 +23,11 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive } from 'vue'
|
||||
// import { accDiv } from '@/utils/utils'
|
||||
// import { accDiv } from '~/utils/utils'
|
||||
import dayjs from 'dayjs'
|
||||
import { bizTypeMap } from '@/enum/index'
|
||||
import { getWalletRechargeRecordPage } from '@/api/pay/index'
|
||||
import { AppPayWalletRechargeRespVO } from '@/api/pay/types'
|
||||
import { bizTypeMap } from '~/enum/index'
|
||||
import { getWalletRechargeRecordPage } from '~/api/pay/index'
|
||||
import type { AppPayWalletRechargeRespVO } from '~/api/pay/types'
|
||||
|
||||
const result = reactive({
|
||||
data: [] as AppPayWalletRechargeRespVO[],
|
||||
|
||||
@ -38,13 +38,13 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch, onMounted } from 'vue'
|
||||
import { listWalletRechargePackage, submitPayOrder, getPayStatus } from '@/api/pay/index'
|
||||
import { accDiv } from '@/utils/utils'
|
||||
import { listWalletRechargePackage, submitPayOrder, getPayStatus } from '~/api/pay/index'
|
||||
import { accDiv } from '~/utils/utils'
|
||||
import { Close } from '@element-plus/icons-vue'
|
||||
import type { AppPayWalletPackageRespVO } from '@/api/pay/types'
|
||||
import type { AppPayWalletPackageRespVO } from '~/api/pay/types'
|
||||
// @ts-ignore
|
||||
import QrcodeVue from 'qrcode.vue'
|
||||
import useUserStore from '@/store/user'
|
||||
import useUserStore from '~/store/user'
|
||||
const userStore = useUserStore()
|
||||
|
||||
const props = defineProps({
|
||||
|
||||
@ -10,15 +10,15 @@
|
||||
<div class="text-14px text-[#333333] font-normal my-10px!">{{ dayjs(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}</div>
|
||||
<div class="flex items-center">
|
||||
<div class="flex items-center">
|
||||
<img src="@/assets/images/look.png" alt="" srcset="" class="h-17px" />
|
||||
<img src="~/assets/images/look.png" alt="" srcset="" class="h-17px" />
|
||||
<span class="ml-4px">{{ scope.row.previewPoint }}</span>
|
||||
</div>
|
||||
<div class="ml-13px flex items-center">
|
||||
<img src="@/assets/images/add.png" alt="" srcset="" class="h-23px" />
|
||||
<img src="~/assets/images/add.png" alt="" srcset="" class="h-23px" />
|
||||
<span class="ml-4px">{{ scope.row.hotPoint }}</span>
|
||||
</div>
|
||||
<div class="ml-13px flex items-center">
|
||||
<img src="@/assets/images/chat.png" alt="" srcset="" class="h-17px" />
|
||||
<img src="~/assets/images/chat.png" alt="" srcset="" class="h-17px" />
|
||||
<span class="ml-4px">{{ scope.row.commentsPoint }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -43,11 +43,11 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
|
||||
import { offShelf, deleteResource } from '@/api/personal-center'
|
||||
import { offShelf, deleteResource } from '~/api/personal-center'
|
||||
|
||||
import KlTabBar from '@/components/kl-tab-bar/v2/index.vue'
|
||||
import KlTabBar from '~/components/kl-tab-bar/v2/index.vue'
|
||||
import dayjs from 'dayjs'
|
||||
import { useMessage } from '@/utils/useMessage'
|
||||
import { useMessage } from '~/utils/useMessage'
|
||||
const message = useMessage()
|
||||
|
||||
const type = defineModel<number | string>('type', {
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, onUnmounted } from 'vue'
|
||||
import * as echarts from 'echarts'
|
||||
import { getRecentIncomeAndActive, getResourceDistribution } from '@/api/personal-center/index'
|
||||
import { getRecentIncomeAndActive, getResourceDistribution } from '~/api/personal-center/index'
|
||||
|
||||
const incomeChartRef = ref<HTMLElement>()
|
||||
const activeChartRef = ref<HTMLElement>()
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
<div class="ml-29px">
|
||||
<div class="flex items-center">
|
||||
<span class="text-20px text-[#333333] font-normal">Hi,{{ userStore.userInfoRes.nickname }}</span>
|
||||
<img v-if="userStore.userInfoRes.vipLevel === 1" src="@/assets/svg/vip.svg" alt="" class="relative top-2px ml-5px" />
|
||||
<img v-if="userStore.userInfoRes.vipLevel === 2" src="@/assets/svg/svip.svg" alt="" class="relative top-2px ml-5px" />
|
||||
<img v-if="userStore.userInfoRes.vipLevel === 1" src="~/assets/svg/vip.svg" alt="" class="relative top-2px ml-5px" />
|
||||
<img v-if="userStore.userInfoRes.vipLevel === 2" src="~/assets/svg/svip.svg" alt="" class="relative top-2px ml-5px" />
|
||||
<div
|
||||
class="ml-18px h-30px w-80px cursor-pointer border border-[#1A65FF] rounded-15px border-solid text-center text-14px text-[#1A65FF] font-normal line-height-30px"
|
||||
@click="handleClick"
|
||||
@ -15,19 +15,19 @@
|
||||
</div>
|
||||
<div class="mt-20px flex items-center text-14px text-[#333333] font-normal">
|
||||
<div class="flex items-center">
|
||||
<img src="@/assets/images/cad_0 (1).png" alt="" srcset="" />
|
||||
<img src="~/assets/images/cad_0 (1).png" alt="" srcset="" />
|
||||
<span class="ml-4px">我的积分: {{ userStaticInfo?.pointCount || 0 }}</span>
|
||||
</div>
|
||||
<div class="ml-37px flex items-center">
|
||||
<img src="@/assets/images/cad_0 (2).png" alt="" srcset="" />
|
||||
<img src="~/assets/images/cad_0 (2).png" alt="" srcset="" />
|
||||
<span class="ml-4px">我的收藏: {{ userStaticInfo?.followCount || 0 }}</span>
|
||||
</div>
|
||||
<div class="ml-37px flex items-center">
|
||||
<img src="@/assets/images/cad_0 (3).png" alt="" srcset="" />
|
||||
<img src="~/assets/images/cad_0 (3).png" alt="" srcset="" />
|
||||
<span class="ml-4px">我的发布: {{ userStaticInfo?.projectCount || 0 }}</span>
|
||||
</div>
|
||||
<div class="ml-37px flex items-center">
|
||||
<img src="@/assets/images/cad_0 (4).png" alt="" srcset="" />
|
||||
<img src="~/assets/images/cad_0 (4).png" alt="" srcset="" />
|
||||
<span class="ml-4px">我的下载: {{ userStaticInfo?.downloadCount || 0 }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -36,8 +36,8 @@
|
||||
<div class="mt-30px flex items-center justify-around">
|
||||
<div class="flex items-center">
|
||||
<div class="relative">
|
||||
<img src="@/assets/images/info_1 (3).png" alt="" srcset="" />
|
||||
<img src="@/assets/images/info_1 (4).png" alt="" srcset="" class="absolute left-18px top-18px" />
|
||||
<img src="~/assets/images/info_1 (3).png" alt="" srcset="" />
|
||||
<img src="~/assets/images/info_1 (4).png" alt="" srcset="" class="absolute left-18px top-18px" />
|
||||
</div>
|
||||
<div class="ml-18px">
|
||||
<div class="flex items-center">
|
||||
@ -49,8 +49,8 @@
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<div class="relative">
|
||||
<img src="@/assets/images/info_1 (5).png" alt="" srcset="" />
|
||||
<img src="@/assets/images/info_1 (6).png" alt="" srcset="" class="absolute left-18px top-22px" />
|
||||
<img src="~/assets/images/info_1 (5).png" alt="" srcset="" />
|
||||
<img src="~/assets/images/info_1 (6).png" alt="" srcset="" class="absolute left-18px top-22px" />
|
||||
</div>
|
||||
<div class="ml-18px">
|
||||
<div>
|
||||
@ -61,8 +61,8 @@
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<div class="relative">
|
||||
<img src="@/assets/images/info_1 (1).png" alt="" srcset="" />
|
||||
<img src="@/assets/images/info_1 (2).png" alt="" srcset="" class="absolute left-20px top-18px" />
|
||||
<img src="~/assets/images/info_1 (1).png" alt="" srcset="" />
|
||||
<img src="~/assets/images/info_1 (2).png" alt="" srcset="" class="absolute left-20px top-18px" />
|
||||
</div>
|
||||
<div class="ml-18px">
|
||||
<div>
|
||||
@ -78,15 +78,15 @@
|
||||
<div class="title">快捷入口</div>
|
||||
<div class="mt-20px flex items-center">
|
||||
<div class="info_item cursor-pointer" @click="handleClickPush('/upnew/drawe')">
|
||||
<img src="@/assets/images/fabu_2 (3).png" alt="" srcset="" />
|
||||
<img src="~/assets/images/fabu_2 (3).png" alt="" srcset="" />
|
||||
<div class="mt-10px">发布资源</div>
|
||||
</div>
|
||||
<div class="info_item ml-31px cursor-pointer" @click="handleClickPush('/communication/channel')">
|
||||
<img src="@/assets/images/fabu_2 (1).png" alt="" srcset="" />
|
||||
<img src="~/assets/images/fabu_2 (1).png" alt="" srcset="" />
|
||||
<div class="mt-10px">交流频道</div>
|
||||
</div>
|
||||
<div class="info_item ml-31px cursor-pointer" @click="handleService">
|
||||
<img src="@/assets/images/fabu_2 (2).png" alt="" srcset="" />
|
||||
<img src="~/assets/images/fabu_2 (2).png" alt="" srcset="" />
|
||||
<div class="mt-10px">消息</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -102,12 +102,12 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { getUserStatistics } from '@/api/personal-center/index'
|
||||
import { UserStatisticsCountRespVO } from '@/api/personal-center/types'
|
||||
import { getUserStatistics } from '~/api/personal-center/index'
|
||||
import type { UserStatisticsCountRespVO } from '~/api/personal-center/types'
|
||||
import Message from './components/message.vue'
|
||||
import InfoEcharts from './info-echarts.vue'
|
||||
import Pay from './components/pay.vue'
|
||||
import useUserStore from '@/store/user'
|
||||
import useUserStore from '~/store/user'
|
||||
const userStore = useUserStore()
|
||||
|
||||
// 路由跳转
|
||||
@ -136,7 +136,7 @@
|
||||
if (!path) {
|
||||
return
|
||||
}
|
||||
window.open(path, '_blank')
|
||||
navigateTo(path)
|
||||
}
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div class="flex items-center justify-between border-b-1px border-b-[#eeeeee] border-b-solid pb-18px">
|
||||
<div class="text-16px text-[#333333] font-normal">个人资料</div>
|
||||
<div class="flex items-center">
|
||||
<!-- <img src="@/assets/images/fans.png" alt="" srcset="" /> -->
|
||||
<!-- <img src="~/assets/images/fans.png" alt="" srcset="" /> -->
|
||||
<span class="ml-8px text-14px text-[#333333] font-normal"></span>
|
||||
</div>
|
||||
</div>
|
||||
@ -118,13 +118,13 @@
|
||||
</div>
|
||||
<div class="flex flex-col justify-center text-14px text-[#333333] font-normal">
|
||||
<div class="mt-30px flex items-center">
|
||||
<img src="@/assets/images/qq-v2.png" alt="" srcset="" class="h-35px w-34px" />
|
||||
<img src="~/assets/images/qq-v2.png" alt="" srcset="" class="h-35px w-34px" />
|
||||
<div class="ml-19px">QQ</div>
|
||||
<div class="ml-100px flex items-center"><div class="w-90px">QQ昵称:</div><div class="w-180px">xxx</div></div>
|
||||
<div class="btn">绑定</div>
|
||||
</div>
|
||||
<div class="mt-30px flex items-center">
|
||||
<img src="@/assets/images/weixin-v2.png" alt="" srcset="" class="h-35px w-34px" />
|
||||
<img src="~/assets/images/weixin-v2.png" alt="" srcset="" class="h-35px w-34px" />
|
||||
<div class="ml-19px">微信</div>
|
||||
<div class="ml-95px flex items-center"><div class="w-90px">微信昵称:</div><div class="w-180px">xxx</div></div>
|
||||
<div class="btn">绑定</div>
|
||||
@ -137,10 +137,10 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import { tree, upload } from '@/api/common/index'
|
||||
import { keywords } from '@/api/upnew/index'
|
||||
import { userExtend, getUserInfo, updateUserExtend } from '@/api/personal-center/index.ts'
|
||||
import { UserExtendSaveReqVO } from '@/api/personal-center/types'
|
||||
import { tree, upload } from '~/api/common/index'
|
||||
import { keywords } from '~/api/upnew/index'
|
||||
import { userExtend, getUserInfo, updateUserExtend } from '~/api/personal-center/index'
|
||||
import type { UserExtendSaveReqVO } from '~/api/personal-center/types'
|
||||
import verifyDialog from './verify-dialog.vue'
|
||||
const userFormRef = ref()
|
||||
|
||||
|
||||
@ -33,14 +33,14 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
|
||||
import { getContentPage, getUserToolBoxPage, getUserFavoritePage, getOwnContentPage } from '@/api/personal-center/index'
|
||||
// import { ProjectHistoryResVO } from '@/api/personal-center/types'
|
||||
import { getContentPage, getUserToolBoxPage, getUserFavoritePage, getOwnContentPage } from '~/api/personal-center/index'
|
||||
// import { ProjectHistoryResVO } from '~/api/personal-center/types'
|
||||
|
||||
import uploadTable from './components/upload-table.vue'
|
||||
import downloadTable from './components/download-table.vue'
|
||||
import favoriteTable from './components/favorite-table.vue'
|
||||
import browseTable from './components/browse-table.vue'
|
||||
import useUserStore from '@/store/user'
|
||||
import useUserStore from '~/store/user'
|
||||
const userStore = useUserStore()
|
||||
|
||||
const activeName = ref('我的上传')
|
||||
|
||||
@ -39,8 +39,8 @@
|
||||
import { ref } from 'vue'
|
||||
import Pay from './components/pay.vue'
|
||||
import PayRecords from './components/pay-records.vue'
|
||||
import { getUserStatistics } from '@/api/personal-center/index'
|
||||
import { UserStatisticsCountRespVO } from '@/api/personal-center/types'
|
||||
import { getUserStatistics } from '~/api/personal-center/index'
|
||||
import type { UserStatisticsCountRespVO } from '~/api/personal-center/types'
|
||||
|
||||
const activeTab = ref('purchase')
|
||||
// const currentMonth = ref('2025.03')
|
||||
|
||||
@ -38,8 +38,8 @@
|
||||
import { ref, reactive } from 'vue'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import { getUserAuthInfo, createUserAuthInfo, updateUserAuthInfo } from '@/api/personal-center/index.ts'
|
||||
import { UserAuthInfoRespVO } from '@/api/personal-center/types'
|
||||
import { getUserAuthInfo, createUserAuthInfo, updateUserAuthInfo } from '~/api/personal-center/index'
|
||||
import type { UserAuthInfoRespVO } from '~/api/personal-center/types'
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const formRef = ref<FormInstance>()
|
||||
|
||||
Reference in New Issue
Block a user