From a60e2911cc89f67b3e66fc4452b90e7fd847e259 Mon Sep 17 00:00:00 2001
From: Fox-33 <1466778434@qq.com>
Date: Thu, 27 Mar 2025 16:09:27 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5;?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/model/info.js | 18 +++++
api/model/vip.js | 20 +++++
components/center/popupActivate.vue | 33 +++++---
components/config/loginPopup.vue | 120 +++++++++++++++++++++++++++++
config.js | 2 +-
pages/index/center.vue | 48 ++++++------
pages/index/index.vue | 21 ++++-
pages/index/record.vue | 1 +
pages_order/mine/sharing.vue | 6 +-
pages_order/mine/team.vue | 136 +++++++++------------------------
pages_order/mine/wallet.vue | 77 ++++++-------------
pages_order/mine/withdraw.vue | 45 +++++++----
pages_order/record/articleSharing.vue | 2 +-
pages_order/record/groupSharing.vue | 2 +-
pages_order/record/personalSharing.vue | 2 +-
pages_order/record/videoSharing.vue | 6 +-
pages_order/sharing/article.vue | 34 ++++++++-
pages_order/sharing/group.vue | 35 +++++++--
pages_order/sharing/personal.vue | 37 +++++++--
pages_order/sharing/video.vue | 40 ++++++++--
store/store.js | 25 +++++-
21 files changed, 468 insertions(+), 242 deletions(-)
create mode 100644 components/config/loginPopup.vue
diff --git a/api/model/info.js b/api/model/info.js
index f61c5d6..48e8776 100644
--- a/api/model/info.js
+++ b/api/model/info.js
@@ -9,6 +9,24 @@ const api = {
method: 'GET',
auth: true,
},
+ /**
+ * 获取我的钱包数据信息-钱包流水列表
+ */
+ getWalletList: {
+ url: '/info/getWalletList',
+ method: 'GET',
+ auth: true,
+ },
+ /**
+ * 提现
+ */
+ openMoney: {
+ url: '/fen/openMoney',
+ method: 'POST',
+ auth: true,
+ limit : 500,
+ showLoading : true,
+ },
}
export default api
\ No newline at end of file
diff --git a/api/model/vip.js b/api/model/vip.js
index afb0619..4b99bc1 100644
--- a/api/model/vip.js
+++ b/api/model/vip.js
@@ -2,6 +2,26 @@
// vip相关接口
const api = {
+ getUserInfoVip: {
+ url: '/info/getUserInfoVip',
+ method: 'GET',
+ auth: true,
+ },
+ getUserInfoVipList: {
+ url: '/info/getUserInfoVipList',
+ method: 'GET',
+ auth: true,
+ },
+ /**
+ * 激活
+ */
+ openVip: {
+ url: '/fen/openVip',
+ method: 'POST',
+ auth: true,
+ limit : 500,
+ showLoading : true,
+ },
}
export default api
\ No newline at end of file
diff --git a/components/center/popupActivate.vue b/components/center/popupActivate.vue
index 707087a..bbaf60c 100644
--- a/components/center/popupActivate.vue
+++ b/components/center/popupActivate.vue
@@ -20,7 +20,7 @@
-
-
+
+
-
-
+
@@ -33,11 +32,11 @@
-
+
代理商权益
- 将于{{ agentDeadline }}到期
+ 将于{{ $dayjs(userInfoVip.vip_time).format('YYYY年M月D日') () }}到期
@@ -54,7 +53,6 @@
-
@@ -75,7 +73,6 @@
我的钱包
-
@@ -129,9 +126,9 @@
-
-
-
+
@@ -153,38 +150,34 @@
tabber,
popupActivate,
},
- computed: {
- ...mapState(['userInfo']),
- },
data() {
return {
- // todo: agent => role
- isAgent: false,
- agentDeadline: '2025年12月31日',
-
notice: '',
mixinsListApi : 'getNews',
}
},
+ computed: {
+ ...mapState(['userInfo', 'userInfoVip']),
+ role() {
+ return this.userInfo.role
+ }
+ },
onShow() {
this.fetchNotice()
- this.getData()
- },
- onLoad() {
- if (uni.getStorageSync('token') && !this.userInfo?.id) {
- this.$store.commit('getUserInfo')
- }
+ this.$store.commit('getUserInfo')
+ this.$store.commit('getUserInfoVip')
},
methods: {
async fetchNotice() {
try {
- this.notice = await this.$fetch('getNotice', { id })
+ // todo: check
+ this.notice = (await this.$fetch('getNotice'))?.[0]?.title
} catch (err) {
}
},
onActivate() {
- this.$refs.popupActivate.open(this.isAgent)
+ this.$refs.popupActivate.open(this.role)
},
getDesc(str) {
if (!str) {
@@ -389,8 +382,11 @@
position: fixed;
right: 29rpx;
bottom: 312rpx;
- width: 149rpx;
- height: 158rpx;
+
+ .icon {
+ width: 149rpx;
+ height: 158rpx;
+ }
}
\ No newline at end of file
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 5f7ee94..be61e9c 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -61,7 +61,26 @@
onShow() {
this.fetchBg()
},
- onLoad() {
+ onLoad(option) {
+ const { state, shareId } = option
+
+ if (shareId) {
+ uni.setStorageSync('shareId', shareId)
+ }
+
+ if (state) {
+ uni.setStorageSync('state', state)
+ }
+
+ if (shareId && !uni.getStorageSync('token')) {
+
+ uni.navigateTo({
+ url: '/pages_order/auth/wxLogin'
+ })
+
+ return
+ }
+
if (uni.getStorageSync('token') && !this.userInfo?.id) {
this.$store.commit('getUserInfo')
}
diff --git a/pages/index/record.vue b/pages/index/record.vue
index 97547de..4566ebe 100644
--- a/pages/index/record.vue
+++ b/pages/index/record.vue
@@ -139,6 +139,7 @@
1: '../../static/image/record/pass.png', // 已通过
2: '../../static/image/record/fail.png', // 未通过
},
+ // todo
sliderBgUrl: 'https://thumbnail0.baidupcs.com/thumbnail/5128034cfj9ac619ca072da4706a6c90?fid=3983569511-250528-294545550145327&time=1742536800&rt=sh&sign=FDTAER-DCb740ccc5511e5e8fedcff06b081203-iqtAvQatpPXXyCeN8GEAHhPMHEM%3D&expires=8h&chkv=0&chkbd=0&chkpc=&dp-logid=8764190582084176609&dp-callid=0&file_type=0&size=c850_u580&quality=100&vuk=-&ft=video',
mixinsListApi : 'getSharePage',
}
diff --git a/pages_order/mine/sharing.vue b/pages_order/mine/sharing.vue
index 95a7d76..806d8da 100644
--- a/pages_order/mine/sharing.vue
+++ b/pages_order/mine/sharing.vue
@@ -37,7 +37,11 @@
methods: {
async fetchQrCode() {
try {
- this.wxCodeImage = await this.$fetch('getQrCode')
+ const url = (await this.$fetch('getQrCode'))?.url
+
+ this.wxCodeImage = this.$config.aliOss.url + url
+
+ console.log('--wxCodeImage', this.wxCodeImage)
this.draw()
} catch (err) {
diff --git a/pages_order/mine/team.vue b/pages_order/mine/team.vue
index f2c6eb9..bca2f21 100644
--- a/pages_order/mine/team.vue
+++ b/pages_order/mine/team.vue
@@ -6,16 +6,15 @@
我的推荐人
-
-
+
- 裂变星1号
- {{ `ID:${12345678}` }}
+ {{ userInfoVip.pidInfo.nickName }}
+ {{ `ID:${userInfoVip.pidInfo.id}` }}
手机号
- 15234567891
+ {{ userInfoVip.pidInfo.phone }}
@@ -23,21 +22,20 @@
-
- 100
+ {{ userInfoVip.user_sum }}
推荐总人数(人)
直接推荐(人)
- 90
+ {{ userInfoVip.j_sum }}
间接推荐(人)
- 10
+ {{ userInfoVip.z_sum }}
@@ -75,18 +73,18 @@
-
+
{{ item.nickName }}
- {{ item.roleName }}
+ {{ getRoleDesc(item.role) }}
- {{ item.createTime }}
- {{ item.createDate }}
+ {{ $dayjs(item.createTime).format('HH:mm:ss') }}
+ {{ $dayjs(item.createDate).format('YYYY-MM-DD') }}
@@ -95,9 +93,12 @@