From 5db887bff3c4d7e8e32d366b1485e776b7d5484b Mon Sep 17 00:00:00 2001 From: shenhan000 Date: Mon, 31 Mar 2025 14:32:52 +0800 Subject: [PATCH] update --- app/components/Authentication.vue | 76 +-- app/components/PictureList.vue | 2 +- app/components/WechatLoginQr.vue | 4 +- app/components/publishModel/CreateModels.vue | 272 +++++---- app/components/publishModel/EditVersion.vue | 36 +- app/components/publishModel/UploadImg.vue | 4 + app/pages/gold-detail/index.vue | 152 +++-- app/pages/login-success.vue | 197 ++++++ app/pages/member-center/index.vue | 321 ++++++---- app/pages/model-details/[id].vue | 424 ++++++++----- app/pages/order-management/index.vue | 44 +- app/pages/personal-center/index.vue | 607 ++++++++++--------- app/pages/publish-model/index.vue | 3 +- app/pages/wallet/index.vue | 248 ++++---- app/pages/workflow-details/[id].vue | 215 ++++--- app/stores/user.ts | 2 +- app/utils/request.ts | 41 +- assets/img/encryption.png | Bin 0 -> 463 bytes nuxt.config.ts | 9 +- package.json | 4 +- 20 files changed, 1607 insertions(+), 1054 deletions(-) create mode 100644 app/pages/login-success.vue create mode 100644 assets/img/encryption.png diff --git a/app/components/Authentication.vue b/app/components/Authentication.vue index 6cb095e..79617e1 100644 --- a/app/components/Authentication.vue +++ b/app/components/Authentication.vue @@ -1,11 +1,11 @@ - + diff --git a/app/components/publishModel/EditVersion.vue b/app/components/publishModel/EditVersion.vue index 4d02df3..68899b1 100644 --- a/app/components/publishModel/EditVersion.vue +++ b/app/components/publishModel/EditVersion.vue @@ -110,9 +110,7 @@ const originalBtnList = ref([ value: 0, }, ]); -function handleIsFree(index: number, value: number) { - localForm.value.modelVersionList[index].isFree = value; -} + async function nextStep() { for (let i = 0; i < localForm.value.modelVersionList.length; i++) { if ( @@ -329,37 +327,7 @@ function handledeleteFile(item:any){ --> -
-
付费设置
-
-
- {{ subItem.label }} -
-
-
- 选择会员专属或会员下载视为您已经阅读 - 《会员模型许可协议》 - 并同意其中条款 -
-
-
会员下载模型
-
- 下载模型需购买会员,在线生图对所有人开放,无生图次数限制;会员下载的模型版本生成图片默认可商用。 -
-
-
+
许可范围
diff --git a/app/components/publishModel/UploadImg.vue b/app/components/publishModel/UploadImg.vue index 4265a13..c31fef8 100644 --- a/app/components/publishModel/UploadImg.vue +++ b/app/components/publishModel/UploadImg.vue @@ -57,6 +57,10 @@ async function handlePublish() { } } + if(param.modelProduct.isFree === 1){ + param.modelProduct.productPrice = 0 + } + if (type === 'add') { try { const res = await request.post('/model/insert', param) diff --git a/app/pages/gold-detail/index.vue b/app/pages/gold-detail/index.vue index 06e1de3..9aa64fa 100644 --- a/app/pages/gold-detail/index.vue +++ b/app/pages/gold-detail/index.vue @@ -1,10 +1,10 @@ @@ -656,7 +753,7 @@ async function handelDown(){ font-weight: 700; font-size: 24px !important; } -.n-tabs-tab--active{ +.n-tabs-tab--active { font-size: 24px !important; } // .n-tabs.n-tabs--line-type .n-tabs-tab.n-tabs-tab--active, .n-tabs.n-tabs--bar-type .n-tabs-tab.n-tabs-tab--active{ @@ -668,8 +765,11 @@ async function handelDown(){ height: 4px; background: linear-gradient(90deg, #173eff 0%, #1b7dff 100%); border-radius: 2px; - transition: left 0.2s var(--n-bezier), max-width 0.2s var(--n-bezier), - opacity 0.3s var(--n-bezier), background-color 0.3s var(--n-bezier); + transition: + left 0.2s var(--n-bezier), + max-width 0.2s var(--n-bezier), + opacity 0.3s var(--n-bezier), + background-color 0.3s var(--n-bezier); } .original { margin: 2px 0; @@ -685,4 +785,26 @@ async function handelDown(){ border-radius: 4px; transform: skew(-10deg); } +.product-price { + position: absolute; + top: -11px; + right: -1px; + flex-shrink: 0; + width: -moz-fit-content; + width: fit-content; + height: 24px; + padding: 0 8px; + color: #fff; + font-weight: 500; + font-size: 12px; + line-height: 24px; + text-align: center; + background: no-repeat 50% / 100% 100%; + background: linear-gradient(90deg, #ff7d1f, #ff2056 49.5%, #ff3773); + box-shadow: inset 0 -1px 0 0 rgba(234, 62, 26, 0.2); + border-top-left-radius: 8px; + border-bottom-right-radius: 8px; + border-top-right-radius: 2px; + border-bottom-left-radius: 2px; +} diff --git a/app/pages/order-management/index.vue b/app/pages/order-management/index.vue index b9c4227..a56402f 100644 --- a/app/pages/order-management/index.vue +++ b/app/pages/order-management/index.vue @@ -1,5 +1,5 @@ -->
-
邀请列表
+
+ 邀请列表 +
总收益: {{ invitationList.totalAmount }}
-
头像
-
邀请人购买数量
-
邀请人名字
+
+ 头像 +
+
+ 邀请人购买数量 +
+
+ 邀请人名字 +
- + +
+
+ {{ item.count }} +
+
+ {{ item.user.userName }}
-
{{ item.count }}
-
{{ item.user.userName }}
@@ -925,15 +968,15 @@ const closeBindingModal = () =>{
-
-
- 扫码绑定 +
+
+ 扫码绑定 +
+ +
+ 请用手机支付宝扫码 +
- -
- 请用手机支付宝扫码 -
-
+import { isAmount } from '@/utils/index.ts' +import { Close } from '@vicons/ionicons5' +import { ref } from 'vue' + +const activeTab = ref('withdrawDetail') +const showWalletModal = ref(false) +function showModal() { + showWalletModal.value = true +} +const message = useMessage() +function closeWalletModal() { + showWalletModal.value = false + needWalletNum.value = 0 +} +// const allDetailList = ref([]); +// 获取可提现金额 +const integralGold = ref({}) +async function getIntegralGold() { + try { + const res = await request.post('/personalCenter/getPointAndWallet') + if (res.code === 200) { + integralGold.value = res.data + } + } + catch (err) { + console.log(err) + } +} +getIntegralGold() + +// 提现操作 +const needWalletNum = ref(0) +async function handleWallet() { + if (isAmount(needWalletNum.value)) { + if (needWalletNum.value > integralGold.value.wallet) + return message.warning('可提现金额不足') + try { + const res = await request.get(`/ali/pay/fetch?amount=${needWalletNum.value}`) + if (res.code === 200) { + message.success('提现成功!') + closeWalletModal() + location.reload() + // getIntegralGold() + } + } + catch (err) { + console.log(err) + } + } + else { + message.warning('请输入正确的金额') + } +} + +// 获取累计收入金额 +const totalAmount = ref(0) +async function getTotalAmount() { + try { + const res = await request.get('/invitation/totalAmount') + if (res.code === 200) { + totalAmount.value = res.data + } + } + catch (err) { + console.log(err) + } +} +getTotalAmount() + +// 获取提现明细列表 +const withdrawFinished = ref(false) +const withdrawDetailList = ref([]) +const withdrawParams = ref({ + pageNum: 1, + pageSize: 10, +}) +async function getWithdrawDetail() { + try { + if (withdrawFinished.value) + return + const res = await request.post('/invitation/withdrawalRecord', withdrawParams.value) + if (res.code === 200) { + if (withdrawParams.value.pageNum === 1) { + withdrawDetailList.value = res.rows + } + else { + withdrawDetailList.value = [...withdrawDetailList.value, ...res.rows] + } + // 判断是否加载完所有数据 + if (withdrawDetailList.value.length >= res.total) { + withdrawFinished.value = true + } + withdrawParams.value.pageNum++ + } + } + catch (err) { + console.log(err) + } +} +getWithdrawDetail() + + - -