Compare commits

...

21 Commits

Author SHA1 Message Date
a12afc6bc1 优化kl-card-picture组件文本颜色样式 2025-10-16 23:09:12 +08:00
ae57f28357 优化排行榜组件并添加全局错误处理 2025-10-16 22:40:19 +08:00
3265c00fba feat: 启用排行榜组件并优化微信登录参数 2025-10-16 20:13:58 +08:00
ab92461635 优化微信扫码登录openId字段命名 2025-10-15 22:49:48 +08:00
3c6ed5a72c 优化微信扫码登录功能及token获取逻辑 2025-10-15 22:40:23 +08:00
9e225417a6 优化微信扫码登录功能实现 2025-10-15 22:27:12 +08:00
94f1828620 优化微信扫码登录组件UI及交互 2025-10-14 22:15:46 +08:00
58d3f2e890 feat: 添加微信授权成功通知功能 2025-10-14 08:58:36 +08:00
5baae7652f feat: 添加微信扫码登录功能 2025-10-13 23:03:55 +08:00
3f3ea878b9 优化提现手续费动态配置 2025-10-08 22:22:54 +08:00
89f3b9679d 优化交易中心UI展示 2025-10-08 21:16:07 +08:00
b0e5244a79 feat: 统一路由路径规范 2025-10-08 21:12:51 +08:00
f8176abaad 优化收益展示字段及数值 2025-10-08 20:50:30 +08:00
575f6fa2f1 优化VIP价格显示及移除工具函数 2025-10-08 20:39:51 +08:00
5ee69038fa 优化聊天页面UI及API接口调用 2025-09-30 22:20:07 +08:00
2bc5a11946 优化热门绘画组件查询参数处理 2025-09-29 09:37:36 +08:00
b23a85b9ec 优化首页组件代码及调试信息 2025-09-29 09:12:34 +08:00
f2c4d14007 feat: sosososs 2025-09-27 21:59:11 +08:00
82b6f4d63b feat: sosososs 2025-09-27 20:36:51 +08:00
d995ac2b37 feat: sosososs 2025-09-27 19:57:02 +08:00
01392a6329 feat: sosososs 2025-09-27 19:18:52 +08:00
31 changed files with 549 additions and 102 deletions

View File

@ -64,7 +64,7 @@ export const getChannelDetail = (params: { id: string }) => {
* @return {Promise}
*/
export const postscommentpage = (params: { postsId: string; pageNo: number; pageSize: number }) => {
return useFetchRequest.get<IResponse<PageResultPostsCommentRespVO>>('/prod-api/app-api/business/posts-comment/page', { query: params })
return useDollarFetchRequest.get<IResponse<PageResultPostsCommentRespVO>>('/prod-api/app-api/business/posts-comment/page', { query: params })
}
/**
* 创建帖子评论

View File

@ -28,13 +28,17 @@ export const loginByMobile = (params: { mobile: string; code: string; socialCode
* 发送邮箱验证码
*/
export const sendEmailCode = (data: { email: string }) => {
return useDollarFetchRequest.post<IResponse<any>>('/prod-api/app-api/member/auth/send-email-code?email=' + data.email, {},{
return useDollarFetchRequest.post<IResponse<any>>(
'/prod-api/app-api/member/auth/send-email-code?email=' + data.email,
{},
{
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json, text/plain, */*',
Accept: 'application/json, text/plain, */*',
'Access-Control-Allow-Origin-Type': '*',
},
}
})
)
}
/**
@ -50,3 +54,10 @@ export const loginByEmail = (params: { email: string; code: string }) => {
export const resetPassword = (params: { password: string; code: string }) => {
return useDollarFetchRequest.put<IResponse<boolean>>('/prod-api/app-api/member/user/update-password', params)
}
/**
* 授权成功通知后台
*/
export const notifyAuthSuccess = (params: { code: string; state: string }) => {
return useDollarFetchRequest.get<IResponse<any>>('/prod-api/app-api/member/auth/wx-login-url', { query: params })
}

View File

@ -43,7 +43,7 @@ export const listWalletRechargePackage = () => {
* 获取支付状态
*/
export const getPayStatus = (params: { id: number }) => {
return useDollarFetchRequest.get<IResponse<PayOrderRespVO>>('/prod-api/app-api/pay/order/get', {query:params})
return useDollarFetchRequest.get<IResponse<PayOrderRespVO>>('/prod-api/app-api/pay/order/get', { query: params })
}
/**
@ -55,7 +55,7 @@ export const getTokenByCode = (params: { type: number; code: string; state: stri
/**
* 社交快捷登录,使用 code 授权码
*/
export const socialLoginByCode = (params: { type: number; code: string; state: string }) => {
export const socialLoginByCode = (params: { type?: number; code?: string; state?: string; openId?: string; sceneStr?: string }) => {
return useDollarFetchRequest.post<
IResponse<{
accessToken: string
@ -71,5 +71,5 @@ export const socialLoginByCode = (params: { type: number; code: string; state: s
* 获得钱包充值记录分页
*/
export const getWalletRechargeRecordPage = (params: { pageNo: number; pageSize: number }) => {
return useDollarFetchRequest.get<IResponse<PageResultAppPayWalletRechargeRespVO>>('/prod-api/app-api/pay/wallet-transaction/page', {query:params})
return useDollarFetchRequest.get<IResponse<PageResultAppPayWalletRechargeRespVO>>('/prod-api/app-api/pay/wallet-transaction/page', { query: params })
}

View File

@ -164,3 +164,35 @@ export const cancelSocialBind = (params: { type: number; openid: string }) => {
export const userLogout = () => {
return useDollarFetchRequest.del<IResponse<boolean>>('/prod-api/app-api/member/user/unregister-user', {})
}
/**
* 获取钱包配置
*/
export const getWalletConfig = () => {
return useDollarFetchRequest.get<
IResponse<{
rechargeRate: number
commissionRate: number
withdrawRateOfRecharge: number
withdrawRateOfEarn: number
}>
>('/prod-api/app-api/pay/wallet/get-config', {})
}
/**
* 微信登录二维码链接
*/
export const getLoginQrcode = () => {
return useDollarFetchRequest.get<IResponse<{ sceneStr: string; qrCodeUrl: string }>>('/prod-api/app-api/member/auth/wx-login-url', {})
}
/***
* member/auth/checkScanStatus
* 检查扫码登录状态
*/
export const checkScanStatus = (params: { sceneStr: string }) => {
return useDollarFetchRequest.get<IResponse<{ status: string; openId: string | null; message: string }>>('/prod-api/app-api/member/auth/checkScanStatus', {
query: params,
})
}

View File

@ -155,6 +155,7 @@ export interface UserStatisticsCountRespVO {
currencyCount: number
previewCount: number
revenueCount: number
revenueBalance: number
}
export interface PageResultProjectMemberFavoritesRespVO {

View File

@ -11,7 +11,7 @@
<img v-if="props.itemInfo.source === 1" src="~/assets/images/yuan.png" alt="" srcset="" class="mr-[2px] w-[20px] relative bottom-[-4px]" />
{{ props.itemInfo.title }}
</div>
<div class="mt-[8px] text-[15px] text-[#999999] font-normal">by {{ props.itemInfo?.ownedUserIdInfo?.nickName }}</div>
<div class="mt-[8px] text-[15px] text-[#666] font-normal">by {{ props.itemInfo?.ownedUserIdInfo?.nickName }}</div>
<div class="mt-[4px] text-[13px] text-[#999999] font-normal">{{ dayjs(props.itemInfo.createTime).format('YYYY-MM-DD HH:mm:ss') }}</div>
</div>
<div><img :src="props.itemInfo?.ownedUserIdInfo?.avatar" alt="" srcset="" class="h-[40px] w-[40px] rd-[50%]" /></div>

View File

@ -62,12 +62,12 @@
// 用户中心
const handleUserCenter = () => {
navigateTo('/personal-Center/info')
navigateTo('/personal-center/info')
}
// 消息中心
const handleMessageCenter = () => {
navigateTo('/personal-Center/message-center')
navigateTo('/personal-center/message-center')
}
</script>
<style scoped>

View File

@ -168,7 +168,7 @@
userStore.logout()
userStore.$reset()
} else if (command === '个人中心') {
navigateTo('/personal-Center/info')
navigateTo('/personal-center/info')
}
}

View File

@ -11,7 +11,7 @@
<!-- <div class="vip-card-subtitle">中小微企业</div> -->
</div>
<div class="vip-card-price">
<span class="price">{{ accDiv(item.payPrice || 0, 100) }}</span>
<span class="price">{{ item.payPrice }}</span>
<span class="per">/1</span>
</div>
<ul class="vip-card-features">
@ -36,7 +36,7 @@
<script setup lang="ts">
import { ref, watch, onMounted } from 'vue'
import { listVip, submitPayOrder, getPayStatus } from '~/api/pay/index'
import { accDiv } from '~/utils/utils'
// import { accDiv } from '~/utils/utils'
import { Close } from '@element-plus/icons-vue'
import type { AppPayWalletPackageRespVO } from '~/api/pay/types'
// @ts-ignore

View File

@ -0,0 +1,62 @@
<template>
<el-dialog v-model="dialogVisible" title="提现申请" width="600" :before-close="handleClose">
<el-form :model="form" label-width="80px">
<el-form-item label="收款账户" prop="amount">
<el-input v-model="form.amount" placeholder="微信手机账号" />
<div class="text-12px color-#A8ABB2">*仅支持微信收款用户需在微信[收付款>向手机号转账>手机号收款设置]开启收款开关*</div>
</el-form-item>
<el-form-item label="提现类型" prop="amount">
<el-radio-group v-model="form.amount">
<el-radio :label="1">收益提现</el-radio>
<el-radio :label="2">全部提现</el-radio>
</el-radio-group>
<div class="text-12px color-#A8ABB2">*收益提现将收益金币提现全部提现可将充值金币提现*</div>
</el-form-item>
<el-form-item label="提现金额" prop="amount">
<div class="flex items-center">
<el-input-number v-model="form.amount" :controls="false" :min="0" placeholder="请输入提现金额" class="w-150px!" />
<div class="ml-10px">[可提现金币数<span class="text-red">1200</span>=<span class="text-red">120</span> ]</div>
</div>
<div class="text-12px color-#A8ABB2">*提现金币比例10金币=1元最低提现额度100元*</div>
</el-form-item>
</el-form>
<div class="text-12px color-red">
提示:收益金币提现正常收取平台手续费{{ walletConfig?.withdrawRateOfEarn }}%如需将充值金币提现选择全部提现选项因涉及充值赠送金额将收取{{ walletConfig?.withdrawRateOfRecharge }}%高额手续费如果恶意套利提现将提现审核不通过!
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="dialogVisible = false"> 立即申请 </el-button>
</div>
</template>
</el-dialog>
</template>
<script setup lang="ts">
import { getWalletConfig } from '~/api/personal-center/index'
const dialogVisible = defineModel('modelValue', {
default: false,
})
const form = reactive({
amount: 0,
})
const handleClose = (done: () => void) => {
done()
}
const walletConfig = ref<{
rechargeRate: number
commissionRate: number
withdrawRateOfRecharge: number
withdrawRateOfEarn: number
}>()
onMounted(() => {
getWalletConfig().then((res) => {
walletConfig.value = res.data
})
})
</script>
<style lang="scss" scoped></style>

99
components/wx.vue Normal file
View File

@ -0,0 +1,99 @@
<!-- 二维码弹窗 -->
<template>
<div>
<el-dialog title="微信登录" v-model="visible" width="30%" :close-on-click-modal="false" :close-on-press-escape="false" @before-close="close">
<qrcode-vue :value="qrcode" :size="300" :margin="2" colorDark="#2c3e50" colorLight="#f8f9fa" errorCorrectionLevel="H" />
<!-- 扫码状态 -->
<div class="text-center">
<span>{{ checkLoginStatus }}</span>
</div>
</el-dialog>
</div>
</template>
<script setup lang="ts">
import useUserStore from '~/stores/user'
import { getLoginQrcode, checkScanStatus } from '~/api/personal-center/index'
import QrcodeVue from 'qrcode.vue'
const store = useUserStore()
const visible = defineModel('visible', {
default: false,
})
const checkLoginStatus = computed(() => {
const type = {
EXPIRED: '已过期',
CONFIRMED: '已确认',
SCANNED: '已扫码',
WAITING: '等待扫码',
SUCCESS: '登录成功',
}
if (checkLoginInfo.value) {
return type[checkLoginInfo.value.status as keyof typeof type]
}
return '微信扫码登录'
})
const qrcode = ref('')
const sceneStr = ref('')
const timer = ref<any>()
const getQrcode = async () => {
// 获取二维码
const res = await getLoginQrcode()
if (res.code === 0) {
const jsonurl = res.data.qrCodeUrl
const qrCodeUrl = jsonurl ? JSON.parse(jsonurl) : ''
if (qrCodeUrl?.qrCodeUrl) {
qrcode.value = qrCodeUrl.qrCodeUrl
sceneStr.value = res.data.sceneStr
// 轮询检查扫码状态
getCheckScanStatus()
}
}
}
const checkLoginInfo = ref<{ status: string; openId: string | null; message: string }>()
const getCheckScanStatus = async () => {
// 轮询检查扫码状态
timer.value = setInterval(async () => {
const response = await checkScanStatus({ sceneStr: sceneStr.value })
if (response.code === 0) {
checkLoginInfo.value = response.data
if (checkLoginInfo.value.status === 'SCANNED') {
// 登录
await store.getTokenV2({ openId: checkLoginInfo.value.openId as string, sceneStr: sceneStr.value })
// 扫码成功
visible.value = false
clearInterval(timer.value)
} else if (checkLoginInfo.value.status === 'EXPIRED') {
// 二维码过期
clearInterval(timer.value)
// 重新获取二维码
getQrcode()
}
}
}, 5000)
}
const close = () => {
visible.value = false
qrcode.value = ''
}
onMounted(() => {
// 获取二维码
getQrcode()
})
// 关闭定时器
onUnmounted(() => {
clearInterval(timer.value)
})
</script>
<style lang="scss" scoped>
:deep(.el-dialog__body) {
text-align: center !important;
}
</style>

View File

@ -1,18 +1,20 @@
import { useFetch } from '#app'
import type { UseFetchOptions } from '#app'
import { isArray } from '~/utils/utils'
import useUserStore from '~/stores/user'
const useServerRequest = async <T>(url: string, opts?: UseFetchOptions<T, unknown>) => {
const token = useToken()
const runtimeConfig = useRuntimeConfig()
const userStore = useUserStore()
const defaultOptions: UseFetchOptions<unknown> = {
baseURL: runtimeConfig.public.apiBase,
onRequest({ options }) {
options.headers = options.headers || {}
if (token.value) {
options.headers.set('Authorization', `Bearer ${token.value}`)
if (token.value || userStore.token) {
options.headers.set('Authorization', `Bearer ${token.value || userStore.token}`)
}
},
onResponse({ response }) {

20
layouts/success.vue Normal file
View File

@ -0,0 +1,20 @@
<template>
<div class="layout-wrap">
<div class="flex flex-1 flex-col">
<slot></slot>
</div>
</div>
</template>
<script lang="ts" setup></script>
<style lang="scss" scoped>
.layout-wrap {
flex: 1;
display: flex;
flex-direction: column;
background-color: #fbfcff;
width: 100%;
margin: auto;
}
</style>

View File

@ -0,0 +1,139 @@
<template>
<div class="auth-success-container">
<!-- 顶部成功图标 -->
<div class="success-icon">
<svg width="80" height="80" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="40" cy="40" r="40" fill="#4CD964" />
<path d="M25 40L35 50L55 30" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</div>
<!-- 标题和描述 -->
<div class="text-content">
<h1 class="title">授权成功</h1>
<p class="desc">
您已完成微信授权<br />
请返回电脑端继续操作
</p>
</div>
<!-- 倒计时提示 -->
<!-- <div class="countdown" v-if="countdown > 0">
<p>页面将在 {{ countdown }} 秒后自动关闭</p>
</div> -->
<!-- 底部按钮 -->
<!-- <div class="btn-group">
<button class="close-btn" @click="closePage">立即关闭</button>
</div> -->
</div>
</template>
<script setup lang="ts">
import { notifyAuthSuccess } from '~/api/login/index'
import { ref, onMounted } from 'vue'
import { useRoute } from 'vue-router'
const route = useRoute()
definePageMeta({
layout: 'success',
})
onMounted(() => {
notifyAuthSuccess({ code: route.query.code as string, state: route.query.state as string }).then(() => {
console.log('Notified backend of auth success')
})
})
</script>
<style scoped>
.auth-success-container {
min-height: 100vh;
box-sizing: border-box;
padding: 20px;
background-color: #f5f7fa;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.success-icon {
margin-bottom: 30px;
animation: pop 0.5s ease-out;
}
@keyframes pop {
0% {
transform: scale(0.8);
opacity: 0;
}
70% {
transform: scale(1.1);
}
100% {
transform: scale(1);
opacity: 1;
}
}
.text-content {
text-align: center;
margin-bottom: 40px;
}
.title {
font-size: 24px;
font-weight: 600;
color: #333;
margin: 0 0 15px 0;
}
.desc {
font-size: 16px;
color: #666;
line-height: 1.6;
margin: 0;
}
.countdown {
margin-bottom: 50px;
color: #999;
font-size: 14px;
}
.btn-group {
width: 100%;
max-width: 300px;
}
.close-btn {
width: 100%;
height: 48px;
background-color: #07c160;
color: white;
border: none;
border-radius: 24px;
font-size: 16px;
font-weight: 500;
cursor: pointer;
transition: background-color 0.3s;
}
.close-btn:hover {
background-color: #06b355;
}
/* 适配小屏手机 */
@media (max-width: 320px) {
.title {
font-size: 22px;
}
.desc {
font-size: 15px;
}
.close-btn {
height: 44px;
font-size: 15px;
}
}
</style>

View File

@ -13,15 +13,15 @@
</div>
<div class="mt-[19px] flex items-center justify-between">
<div class="flex items-center">
<img src="~/assets/images/look.png" alt="" srcset="" class="mr-[4px] h-[17px]" />
<img src="~/assets/images/look.png" alt="" srcset="" class="mr-[4px] h-[14px]" />
<span class="text-[#666666]">{{ channelDetail?.likeNum || 0 }}人赞过</span>
<div class="ml-[16px] flex items-center">
<img src="~/assets/images/add.png" alt="" class="mr-[4px] h-[23px]" />
<img src="~/assets/images/add.png" alt="" class="mr-[4px] h-[20px]" />
<span class="text-[#666666]">{{ channelDetail?.commentNum || 0 }}评论</span>
</div>
</div>
<div class="ml-[16px] flex items-center">
<img src="~/assets/images/chat.png" alt="" srcset="" class="mr-[4px] h-[17px]" />
<img src="~/assets/images/chat.png" alt="" srcset="" class="mr-[4px] h-[14px]" />
<span class="text-[#666666]">{{ channelDetail?.browseNum || 0 }}人看过</span>
</div>
</div>
@ -104,7 +104,6 @@
const channelId = computed(() => route.params.channelId as string)
const pageNo = computed(() => Number(route.params.pageNo))
console.log(channelId.value, pageNo.value)
// const channelDetail = ref<TGetChannelPostsRes>()
// const commentList = reactive<PageResultPostsCommentRespVO>({

View File

@ -11,14 +11,14 @@
<div
class="box-border h-[60px] w-[1019px] flex items-center justify-between border border-[#EEEEEE] rounded-[12px] border-solid bg-[#FFFFFF] px-[27px] py-[24px]"
>
<div class="text-[20px] text-[#333333] font-normal"> {{ detail?.title }}</div>
<div class="text-[16px] text-[#333333] font-normal"> {{ detail?.title }}</div>
<div class="flex items-center">
<img :src="detail?.ownedUserIdInfo?.avatar" alt="" srcset="" class="h-[30px] w-[30px] rd-[50%]" />
<span class="ml-[12px] color-[#999999]">by {{ detail?.ownedUserIdInfo?.nickName }}</span>
</div>
</div>
<div class="ml-[23px] flex flex-1 text-[18px] text-[#FFFFFF] font-normal">
<div class="ml-[23px] flex flex-1 text-[16px] text-[#FFFFFF] font-normal">
<div class="h-[60px] w-[160px] flex cursor-pointer items-center justify-center rounded-[8px] bg-[#1A65FF]" @click="handleDownload">
<img src="~/assets/images/download.png" alt="" srcset="" class="mr-[4px] h-[22px] w-[27px]" />
{{ detail?.points === 0 ? '免费下载' : '立即下载' }}
@ -45,16 +45,16 @@
<div>
<ThumBnail :data="detail?.coverImages" :type="detail?.type"></ThumBnail>
</div>
<div class="mb-[20px] mt-[34px] flex items-center text-[16px] text-[#333333] font-normal">
<div class="h-[24px] w-[4px] rounded-[1px] bg-[#1A65FF]"></div><span class="ml-[10px]">{{ detail?.title }}描述</span></div
<div class="mb-[20px] mt-[34px] flex items-center text-[14px] text-[#333333] font-normal">
<div class="h-[20px] w-[4px] rounded-[1px] bg-[#1A65FF]"></div><span class="ml-[10px]">{{ detail?.title }}描述</span></div
>
<div
class="box-border min-h-[90px] w-[1019px] border border-[#EEEEEE] rounded-[6px] border-solid bg-[#FFFFFF] pa-[24px] text-[14px] text-[#333333] font-normal"
>
{{ detail?.description }}
</div>
<div id="section1" class="mb-[20px] mt-[34px] flex items-center text-[16px] text-[#333333] font-normal">
<div class="h-[24px] w-[4px] rounded-[1px] bg-[#1A65FF]"></div><span class="ml-[10px]">{{ detail?.title }}附件</span></div
<div id="section1" class="mb-[20px] mt-[34px] flex items-center text-[14px] text-[#333333] font-normal">
<div class="h-[20px] w-[4px] rounded-[1px] bg-[#1A65FF]"></div><span class="ml-[10px]">{{ detail?.title }}附件</span></div
>
<div class="box-border w-[1019px] border border-[#EEEEEE] rounded-[6px] border-solid bg-[#FFFFFF] pa-[24px]">
<div class="border-b-[1px] border-b-[#eee] border-b-solid p-b-[10px]">
@ -86,8 +86,8 @@
</div>
</div>
<!-- 关联项目 -->
<div class="mb-[20px] mt-[34px] flex items-center text-[16px] text-[#333333] font-normal">
<div class="h-[24px] w-[4px] rounded-[1px] bg-[#1A65FF]"></div
<div class="mb-[20px] mt-[34px] flex items-center text-[14px] text-[#333333] font-normal">
<div class="h-[20px] w-[4px] rounded-[1px] bg-[#1A65FF]"></div
><span class="ml-[10px]">关联{{ detail?.type === 1 ? '图纸' : detail?.type === 2 ? '文本' : '模型' }}</span></div
>
<el-row :gutter="20">
@ -97,8 +97,8 @@
</el-row>
<el-empty v-if="!detail?.relationDraws?.length" description="暂无数据"></el-empty>
<!-- 关联模型 -->
<div class="mb-[20px] mt-[34px] flex items-center text-[16px] text-[#333333] font-normal">
<div class="h-[24px] w-[4px] rounded-[1px] bg-[#1A65FF]"></div
<div class="mb-[20px] mt-[34px] flex items-center text-[14px] text-[#333333] font-normal">
<div class="h-[20px] w-[4px] rounded-[1px] bg-[#1A65FF]"></div
><span class="ml-[10px]">相关{{ detail?.type === 1 ? '图纸' : detail?.type === 2 ? '文本' : '模型' }}推荐</span></div
>
<el-row :gutter="20">
@ -163,8 +163,8 @@
<div class="mt-[20px] h-[1px] w-[336px] rounded-[1px] bg-[#EEEEEE]"></div>
<div class="mt-[20px] flex items-center">
<div class="h-[24px] w-[4px] rounded-[1px] bg-[#1A65FF]"></div>
<span class="ml-[10px] text-[16px]">最新发布</span>
<div class="h-[20px] w-[4px] rounded-[1px] bg-[#1A65FF]"></div>
<span class="ml-[10px] text-[14px]">最新发布</span>
</div>
<div class="mt-[10px]">
<div

View File

@ -10,8 +10,8 @@
<div class="swiper-button-prev"></div>
</div>
</div>
<div class="mb-[20px] mt-[34px] flex items-center text-[16px] text-[#333333] font-normal">
<div class="h-[24px] w-[4px] rounded-[1px] bg-[#1A65FF]"></div>
<div class="mb-[20px] mt-[34px] flex items-center text-[14px] text-[#333333] font-normal">
<div class="h-[20px] w-[4px] rounded-[1px] bg-[#1A65FF]"></div>
<span class="ml-[10px]">{{ props.type === 1 ? '图纸' : props.type === 2 ? '文本' : '模型' }}</span>
</div>
<div class="box-border h-[126px] w-[1019px] border border-[#EEEEEE] rounded-[6px] border-solid bg-[#FFFFFF] pa-[23px]">

View File

@ -79,7 +79,7 @@
<div class="text-[15px] color-[#999]">{{ dayjs(item.createTime).format('MM-DD') }}</div>
</div>
<!-- 暂无数据 -->
<el-empty v-if="!newDrawList.length" description="暂无数据"></el-empty>
<el-empty v-if="!newDrawList?.length" description="暂无数据"></el-empty>
</div>
</div>
</div>

View File

@ -64,7 +64,7 @@
</div>
<div v-if="!isLogin" class="mt-[30px] flex justify-between px-[20px]">
<img src="~/assets/images/qq-v2.png" alt="QQ登录" class="social-icon" @click="handleLoginQQ" />
<img src="~/assets/images/weixin-v2.png" alt="微信登录" class="social-icon" @click="handleLoginWechat" />
<img src="~/assets/images/weixin-v2.png" alt="微信登录" class="social-icon" @click="handleLoginWechatV2" />
<img src="~/assets/images/email-v2.png" alt="邮箱登录" class="social-icon" @click="handleLoginEmail" />
<img src="~/assets/images/phone-v2.png" alt="手机登录" class="social-icon" @click="handleLoginPhone" />
</div>
@ -73,6 +73,9 @@
<img src="~/assets/images/sign.png" alt="签到奖励" class="bonus-image" />
</div>
</div>
<!-- wx二维码弹窗 -->
<wx v-model:visible="visible" v-if="visible" />
</template>
<script setup lang="ts">
@ -90,6 +93,12 @@
return !!userStore.token
})
// 打开微信二维码
const visible = ref<boolean>(false)
const handleLoginWechatV2 = () => {
visible.value = true
}
// 获取用户统计信息
const userStaticInfo = ref<UserStatisticsCountRespVO>()
const fetchUserStatistics = async () => {

View File

@ -44,7 +44,6 @@
}
const { data: noticeList } = await getNoticeList()
console.log(noticeList)
</script>
<style scoped lang="scss">

View File

@ -155,7 +155,7 @@
const all = [{ id: '0', name: '全部分类', children: [] }]
if (Array.isArray(res.data) && res.data?.length > 0) {
const total = [...res.data, ...all]
// query.projectTypeDay = total[0]?.id || ''
query.projectTypeDay = total[0]?.id || ''
// query.projectType = total[0]!.children?.[0]?.id || ''
return total
}
@ -206,10 +206,10 @@
// }
const handleHover = (item: ProjectDictNodeVO) => {
query.projectTypeDay = item.id || ''
if (item.name === '全部分类') return
query.projectTypeDay = item.id || ''
// projectTypeListChildren.value = item.children || []
query.projectType = item.children?.[0].id || ''
// query.projectType = item.id || ''
// 热门数据
getHotTop()
}

View File

@ -44,8 +44,6 @@
const sideMenu = ref()
const menuItemRefs = ref<HTMLElement[]>([])
// const menuItems = ref<ProjectDictNodeVO[]>([]);
// 等待数据加载完成再进行渲染 :courseData 对data进行别名赋值
const {
data: menuItems,
@ -64,9 +62,6 @@
})
const showSubMenu = (index: number) => {
// if (menuItems.value.length === index + 1) {
// return
// }
activeIndex.value = index
const dom = menuItemRefs.value[index].getBoundingClientRect()
console.log(dom)
@ -78,21 +73,6 @@
}
const handleSubmenuClick = (primary: ProjectDictNodeVO) => {
// const normal = { id: "0", name: "图纸库", isChildren: false };
// const level = [primary, secondary, tertiary]
// .filter(Boolean)
// .map((item) => ({
// id: item?.id,
// name: item?.name,
// isChildren: item?.children?.length ? false : true,
// }));
// if (primary?.id === "0") {
// level[0].name = "图纸库";
// } else {
// level.unshift(normal);
// }
// navigateTo(`/drawe?level=${JSON.stringify(level)}`)
navigateTo(`/drawe/${primary.id}/1/12/-1`)
}

View File

@ -4,9 +4,9 @@
<div
class="left mt-[25px] box-border h-[370px] w-[260px] border border-[#EEEEEE] rounded-[4px] border-solid bg-[#FFFFFF] text-[15px] text-[#333333] font-medium"
>
<nuxt-link to="/personal-Center/info" class="flex items-center justify-between py-[14px]">
<nuxt-link to="/personal-center/info" class="flex items-center justify-between py-[14px]">
<div class="flex items-center pl-[20px]">
<img v-if="route.path.startsWith('/personal-Center/info')" src="~/assets/images/user3.png" alt="" srcset="" class="h-[20px]" />
<img v-if="route.path.startsWith('/personal-center/info')" src="~/assets/images/user3.png" alt="" srcset="" class="h-[20px]" />
<img v-else src="~/assets/images/个人.png" alt="" srcset="" class="h-[20px]" />
<span class="ml-[10px]">个人中心</span>
</div>
@ -15,9 +15,9 @@
</div>
</nuxt-link>
<!-- <nuxt-link to="/personal-Center/personal-profile" class="flex items-center justify-between py-[14px]">
<!-- <nuxt-link to="/personal-center/personal-profile" class="flex items-center justify-between py-[14px]">
<div class="flex items-center pl-[20px]">
<img v-if="!route.path.startsWith('/personal-Center/personal-profile')" src="~/assets/images/user_zl.png" alt="" srcset="" class="h-[16px]" />
<img v-if="!route.path.startsWith('/personal-center/personal-profile')" src="~/assets/images/user_zl.png" alt="" srcset="" class="h-[16px]" />
<img v-else src="~/assets/images/个人资料 (1).png" alt="" srcset="" class="h-[16px]" />
<span class="ml-[10px]">个人资料</span>
</div>
@ -25,9 +25,9 @@
<el-icon><ArrowRight /></el-icon>
</div>
</nuxt-link>
<nuxt-link to="/personal-Center/account-security" class="flex items-center justify-between py-[14px]">
<nuxt-link to="/personal-center/account-security" class="flex items-center justify-between py-[14px]">
<div class="flex items-center pl-[20px]">
<img v-if="!route.path.startsWith('/personal-Center/account-security')" src="~/assets/images/account.png" alt="" srcset="" class="h-[20px]" />
<img v-if="!route.path.startsWith('/personal-center/account-security')" src="~/assets/images/account.png" alt="" srcset="" class="h-[20px]" />
<img v-else src="~/assets/images/账户安全.png" alt="" srcset="" class="h-[20px]" />
<span class="ml-[14px]">账户与安全</span>
</div>
@ -35,9 +35,9 @@
<el-icon><ArrowRight /></el-icon>
</div>
</nuxt-link> -->
<nuxt-link to="/personal-Center/account-management" class="flex items-center justify-between py-[14px]">
<nuxt-link to="/personal-center/account-management" class="flex items-center justify-between py-[14px]">
<div class="flex items-center pl-[20px]">
<img v-if="!route.path.startsWith('/personal-Center/account-management')" src="~/assets/images/account.png" alt="" srcset="" class="h-[20px]" />
<img v-if="!route.path.startsWith('/personal-center/account-management')" src="~/assets/images/account.png" alt="" srcset="" class="h-[20px]" />
<img v-else src="~/assets/images/账户安全.png" alt="" srcset="" class="h-[20px]" />
<span class="ml-[14px]">账户管理</span>
</div>
@ -45,9 +45,9 @@
<el-icon><ArrowRight /></el-icon>
</div>
</nuxt-link>
<nuxt-link to="/personal-Center/resource-center" class="flex items-center justify-between py-[14px]">
<nuxt-link to="/personal-center/resource-center" class="flex items-center justify-between py-[14px]">
<div class="flex items-center pl-[20px]">
<img v-if="!route.path.startsWith('/personal-Center/resource-center')" src="~/assets/images/ziyuan.png" alt="" srcset="" class="h-[18px]" />
<img v-if="!route.path.startsWith('/personal-center/resource-center')" src="~/assets/images/ziyuan.png" alt="" srcset="" class="h-[18px]" />
<img v-else src="~/assets/images/资源.png" alt="" srcset="" class="h-[18px]" />
<span class="ml-[12px]">资源中心</span>
</div>
@ -55,9 +55,9 @@
<el-icon><ArrowRight /></el-icon>
</div>
</nuxt-link>
<nuxt-link to="/personal-Center/trading-center" class="flex items-center justify-between py-[14px]">
<nuxt-link to="/personal-center/trading-center" class="flex items-center justify-between py-[14px]">
<div class="flex items-center pl-[20px]">
<img v-if="!route.path.startsWith('/personal-Center/trading-center')" src="~/assets/images/pay.png" alt="" srcset="" class="h-[20px]" />
<img v-if="!route.path.startsWith('/personal-center/trading-center')" src="~/assets/images/pay.png" alt="" srcset="" class="h-[20px]" />
<img v-else src="~/assets/images/交易管理.png" alt="" srcset="" class="h-[20px]" />
<span class="ml-[12px]">交易记录</span>
</div>
@ -65,9 +65,9 @@
<el-icon><ArrowRight /></el-icon>
</div>
</nuxt-link>
<nuxt-link to="/personal-Center/message-center" class="flex items-center justify-between py-[14px]">
<nuxt-link to="/personal-center/message-center" class="flex items-center justify-between py-[14px]">
<div class="flex items-center pl-[20px]">
<img v-if="!route.path.startsWith('/personal-Center/message-center')" src="~/assets/images/message.png" alt="" srcset="" class="h-[18px]" />
<img v-if="!route.path.startsWith('/personal-center/message-center')" src="~/assets/images/message.png" alt="" srcset="" class="h-[18px]" />
<img v-else src="~/assets/images/消息.png" alt="" srcset="" class="h-[18px]" />
<span class="ml-[14px]">消息通知</span>
</div>

View File

@ -17,7 +17,14 @@
<!-- 分页 -->
<div class="pagination mt-15px">
<el-pagination v-model:current-page="query.pageNo" :page-size="10" :total="result.total" background layout="prev, pager, next, jumper" />
<el-pagination
v-model:current-page="query.pageNo"
:page-size="10"
:total="result.total"
background
layout="prev, pager, next, jumper"
@current-change="handeClickCurrent"
/>
</div>
</template>
@ -51,6 +58,12 @@
}
}
getTradeRecords()
// 点击分页
const handeClickCurrent = (pageNo: number) => {
query.pageNo = pageNo
getTradeRecords()
}
</script>
<style lang="scss" scoped>
:deep(.el-pagination) {

View File

@ -11,12 +11,12 @@
<!-- <div class="vip-card-subtitle">中小微企业</div> -->
</div>
<div class="vip-card-price">
<span class="price">{{ accDiv(item.payPrice || 0, 100) }}</span>
<span class="price">{{ item.payPrice }}</span>
<!-- <span class="per">/1</span> -->
</div>
<ul class="vip-card-features">
<li
>赠送<span class="color-red">{{ accDiv(item.bonusPrice || 0, 100) }}</span></li
>赠送<span class="color-red">{{ item.bonusPrice }}</span></li
>
<!-- <li>1. {{ item.profile }}</li>
<li
@ -39,7 +39,7 @@
<script setup lang="ts">
import { ref, watch, onMounted } from 'vue'
import { listWalletRechargePackage, submitPayOrder, getPayStatus } from '~/api/pay/index'
import { accDiv } from '~/utils/utils'
// import { accDiv } from '~/utils/utils'
import { Close } from '@element-plus/icons-vue'
import type { AppPayWalletPackageRespVO } from '~/api/pay/types'
// @ts-ignore

View File

@ -125,7 +125,7 @@
fetchUserStatistics()
const handleClick = () => {
router.push({ path: '/personal-Center/account-management' })
router.push({ path: '/personal-center/account-management' })
}
const payVisible = ref(false)

View File

@ -1,7 +1,8 @@
<template>
<div class="account-balance">
<!-- 余额展示区域 -->
<div class="balance-section">
<div class="balance-section flex h-206px!">
<div>
<div class="balance-title">
<span>我的金币</span>
<el-tag size="small" type="primary">资产和使用</el-tag>
@ -9,10 +10,34 @@
<div class="balance-amount">{{ userStaticInfo?.currencyCount || 0 }}</div>
<div class="balance-actions">
<el-button type="primary" @click="handlePay">充值</el-button>
<el-button>提现</el-button>
<el-button type="danger" @click="handleWithdraw">提现</el-button>
<el-button type="warning">兑换</el-button>
</div>
<div class="balance-tip">提示最低提现金额100 一元=10金币</div>
</div>
<el-divider direction="vertical" class="h-100%! mx-30px!" border-style="dashed"></el-divider>
<div>
<div class="balance-title">
<span>我的收益</span>
<el-tag size="small" type="primary">收益金币数额展示</el-tag>
</div>
<div class="balance-amount">{{ userStaticInfo?.revenueBalance || 0 }}</div>
<div class="balance-actions">
<!-- <el-button type="primary" @click="handlePay">充值</el-button>
<el-button>提现</el-button> -->
</div>
<!-- <div class="balance-tip">提示最低提现金额100 一元=10金币</div> -->
</div>
</div>
<!-- 广告海报swiper -->
<el-carousel height="150px" class="rounded-[8px] rounded-[6px] border border-solid border-[#eeeeee] box-borders mb-20px">
<el-carousel-item>
<el-image src="https://static.tuxixi.net/tuxixi_banner3.png" alt="" class="w-100%" fit="contain" />
</el-carousel-item>
<el-carousel-item>
<el-image src="https://static.tuxixi.net/tuxixi_banner2.jpg" alt="" class="w-100%" fit="cover" />
</el-carousel-item>
</el-carousel>
<!-- 交易记录区域 -->
<div class="transaction-section">
@ -32,8 +57,14 @@
</div> -->
</div>
</div>
<!-- 提示 -->
<div class="color-red pa-10px text-13px">
温馨提示交易未到账紧急联系客服,金币为虚拟积分不支持退款,但支持高额手续费提现抵制恶性充值提现操作金币使用没有时间限制,平台作品交易仅供学习参考,用于商业用途请与原作者联系!
</div>
<!-- 充值弹窗 -->
<Pay v-if="payVisible" v-model="payVisible" @refresh="fetchUserStatistics"></Pay>
<!-- 提现弹窗 -->
<Withdraw v-if="withdrawVisible" v-model="withdrawVisible"></Withdraw>
</div>
</template>
@ -60,6 +91,12 @@
payVisible.value = true
// router.push({ path: '/personal/trading/center' })
}
const withdrawVisible = ref(false)
const handleWithdraw = () => {
withdrawVisible.value = true
// router.push({ path: '/personal/trading/center' })
}
</script>
<style scoped>

View File

@ -11,14 +11,14 @@
<div
class="box-border h-[60px] w-[1019px] flex items-center justify-between border border-[#EEEEEE] rounded-[12px] border-solid bg-[#FFFFFF] px-[27px] py-[24px]"
>
<div class="text-[20px] text-[#333333] font-normal"> {{ detail?.title }}</div>
<div class="text-[16px] text-[#333333] font-normal"> {{ detail?.title }}</div>
<div class="flex items-center">
<img :src="detail?.ownedUserAvatar" alt="" srcset="" class="h-[30px] w-[30px] rd-[50%]" />
<span class="ml-[8px] color-[#999999]">by {{ detail?.ownedUserName }}</span>
</div>
</div>
<div class="ml-[23px] flex flex-1 text-[18px] text-[#FFFFFF] font-normal">
<div class="ml-[23px] flex flex-1 text-[16px] text-[#FFFFFF] font-normal">
<div class="h-[60px] w-[160px] flex cursor-pointer items-center justify-center rounded-[8px] bg-[#1A65FF]" @click="handleDownload">
<img src="~/assets/images/download.png" alt="" srcset="" class="mr-[4px] h-[22px] w-[27px]" />
{{ detail?.points === 0 ? '免费下载' : '立即下载' }}
@ -45,16 +45,16 @@
<div>
<ThumBnail :data="detail?.coverImages"></ThumBnail>
</div>
<div class="mb-[20px] mt-[34px] flex items-center text-[16px] text-[#333333] font-normal">
<div class="h-[24px] w-[4px] rounded-[1px] bg-[#1A65FF]"></div><span class="ml-[10px]">工具使用介绍</span></div
<div class="mb-[20px] mt-[34px] flex items-center text-[14px] text-[#333333] font-normal">
<div class="h-[20px] w-[4px] rounded-[1px] bg-[#1A65FF]"></div><span class="ml-[10px]">工具使用介绍</span></div
>
<div
class="box-border min-h-[90px] w-[1019px] border border-[#EEEEEE] rounded-[6px] border-solid bg-[#FFFFFF] pa-[24px] text-[14px] text-[#333333] font-normal"
>
{{ detail?.description }}
</div>
<div id="section1" class="mb-[20px] mt-[34px] flex items-center text-[16px] text-[#333333] font-normal">
<div class="h-[24px] w-[4px] rounded-[1px] bg-[#1A65FF]"></div><span class="ml-[10px]">工具文件</span></div
<div id="section1" class="mb-[20px] mt-[34px] flex items-center text-[14px] text-[#333333] font-normal">
<div class="h-[20px] w-[4px] rounded-[1px] bg-[#1A65FF]"></div><span class="ml-[10px]">工具文件</span></div
>
<div class="box-border w-[1019px] border border-[#EEEEEE] rounded-[6px] border-solid bg-[#FFFFFF] pa-[24px]">
<div class="border-b-[1px] border-b-[#eee] border-b-solid p-b-[10px]"> 包含的文件 </div>
@ -137,8 +137,8 @@
<div class="mt-[20px] h-[1px] w-[336px] rounded-[1px] bg-[#EEEEEE]"></div>
<div class="mt-[20px] flex items-center">
<div class="h-[24px] w-[4px] rounded-[1px] bg-[#1A65FF]"></div>
<span class="ml-[10px] text-[16px]">最新发布</span>
<div class="h-[20px] w-[4px] rounded-[1px] bg-[#1A65FF]"></div>
<span class="ml-[10px] text-[14px]">最新发布</span>
</div>
<div class="mt-[10px]">
<div

View File

@ -10,8 +10,8 @@
<div class="swiper-button-prev"></div>
</div>
</div>
<div class="mb-[20px] mt-[34px] flex items-center text-[16px] text-[#333333] font-normal">
<div class="h-[24px] w-[4px] rounded-[1px] bg-[#1A65FF]"></div>
<div class="mb-[20px] mt-[34px] flex items-center text-[14px] text-[#333333] font-normal">
<div class="h-[20px] w-[4px] rounded-[1px] bg-[#1A65FF]"></div>
<span class="ml-[10px]">工具截图</span>
</div>
<div class="box-border h-[126px] w-[1019px] border border-[#EEEEEE] rounded-[6px] border-solid bg-[#FFFFFF] pa-[23px]">

11
plugins/error-handler.ts Normal file
View File

@ -0,0 +1,11 @@
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.config.errorHandler = (error, instance, info) => {
// 处理错误,例如发送报告到服务
console.log(error)
}
// 也可以这样做
// nuxtApp.hook('vue:error', (error, instance, info) => {
// // 处理错误,例如发送报告到服务
// })
})

View File

@ -99,6 +99,39 @@ export default defineStore('useUserStore', {
console.error('getToken error:', error)
}
},
async getTokenV2(row: any) {
const app = useNuxtApp()
try {
const res = await socialLoginByCode({
openId: row.openId,
sceneStr: row.sceneStr,
type: 32
})
const { code, data } = res
if (code === 0) {
// 打开登录界面
if (!data.accessToken) {
ElMessage.error('因你未绑定手机号,请先绑定手机号')
app.$openLogin('verify', row.code, row.type, row.state)
} else {
refreshToken.setToken(data.accessToken, data.refreshToken)
refreshToken.setUserId(data.userId.toString())
// refreshToken.setUserName(loginForm.mobile)
this.setToken(data.accessToken)
this.setUserId(data.userId.toString())
// userStore.setUserName(loginForm.mobile)
this.setRefreshToken(data.refreshToken)
// 获取信息
await this.getUserInfo()
}
} else {
console.error('获取token失败:', res.msg)
}
} catch (error) {
console.error('getToken error:', error)
}
},
},
persist: import.meta.client && {
key: 'tuxixi-store',