From d65d40e6c72038c2c965e84b36dd4e9ec69bd77a Mon Sep 17 00:00:00 2001
From: huliyong <2783385703@qq.com>
Date: Mon, 26 May 2025 20:34:07 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=88=86=E4=BA=AB?=
=?UTF-8?q?=E5=AE=A1=E6=A0=B8=E8=AE=A1=E6=95=B0=E5=8A=9F=E8=83=BD=E5=B9=B6?=
=?UTF-8?q?=E4=BC=98=E5=8C=96=E6=BF=80=E6=B4=BB=E5=BC=B9=E7=AA=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 在config.js中将环境切换为dev并更新API基础URL
- 在index.vue中添加queryShareCount方法获取分享审核通过的记录数
- 在sharing.js中添加queryShareCount API接口
- 优化popupActivate.vue的代码格式和过期代理提示逻辑
---
api/model/sharing.js | 134 ++++++++++++++-------------
components/center/popupActivate.vue | 178 +++++++++++++++++-------------------
config.js | 6 +-
pages/index/index.vue | 27 +++++-
4 files changed, 180 insertions(+), 165 deletions(-)
diff --git a/api/model/sharing.js b/api/model/sharing.js
index 8e51c42..4210882 100644
--- a/api/model/sharing.js
+++ b/api/model/sharing.js
@@ -1,7 +1,7 @@
const api = {
- /**
- * 获取个人分享记录详情
- */
+ /**
+ * 获取个人分享记录详情
+ */
getShareInfo: {
url: '/fen/getShareInfo',
method: 'GET',
@@ -13,122 +13,130 @@ const api = {
addLogShareInfo: {
url: '/fen/addLog',
method: 'POST',
- limit : 500,
- showLoading : true,
+ limit: 500,
+ showLoading: true,
},
- /**
- * 删除分享记录
- */
+ /**
+ * 删除分享记录
+ */
deleteLog: {
url: '/fen/deleteLog',
method: 'POST',
- auth: true,
- limit : 500,
- showLoading : true,
+ auth: true,
+ limit: 500,
+ showLoading: true,
},
- /**
- * 增加或者修改个人分享
- */
+ /**
+ * 增加或者修改个人分享
+ */
saveOrUpdateShare: {
url: '/fen/saveOrUpdateShare',
method: 'POST',
- auth: true,
- limit : 500,
- showLoading : true,
+ auth: true,
+ limit: 500,
+ showLoading: true,
},
- /**
- * 获取视频分享记录详情
- */
+ /**
+ * 获取视频分享记录详情
+ */
getVideoShareInfo: {
url: '/fen/getVideoShareInfo',
method: 'GET',
debounce: 500,
},
- /**
- * 增加或者修改视频分享
- */
+ /**
+ * 增加或者修改视频分享
+ */
saveOrUpdateVideoShare: {
url: '/fen/saveOrUpdateVideoShare',
method: 'POST',
- auth: true,
- limit : 500,
- showLoading : true,
+ auth: true,
+ limit: 500,
+ showLoading: true,
},
- /**
- * 获取群分享记录详情
- */
+ /**
+ * 获取群分享记录详情
+ */
getGroupShareInfo: {
url: '/fen/getGroupShareInfo',
method: 'GET',
debounce: 500,
},
- /**
- * 增加或者修改群分享
- */
+ /**
+ * 增加或者修改群分享
+ */
saveOrUpdateGroupShare: {
url: '/fen/saveOrUpdateGroupShare',
method: 'POST',
- auth: true,
- limit : 500,
- showLoading : true,
+ auth: true,
+ limit: 500,
+ showLoading: true,
},
- /**
- * 获取文章分享记录详情
- */
+ /**
+ * 获取文章分享记录详情
+ */
getArticleShareInfo: {
url: '/fen/getArticleShareInfo',
method: 'GET',
debounce: 500,
},
- /**
- * 增加或者修改文章分享
- */
+ /**
+ * 增加或者修改文章分享
+ */
saveOrUpdateArticleShare: {
url: '/fen/saveOrUpdateArticleShare',
method: 'POST',
- auth: true,
- limit : 500,
- showLoading : true,
+ auth: true,
+ limit: 500,
+ showLoading: true,
},
- /**
- * 获取分享记录列表带分页
- */
+ /**
+ * 获取分享记录列表带分页
+ */
getSharePage: {
url: '/fen/getSharePage',
method: 'GET',
auth: true,
},
- /**
- * 校验个人转发是否达标
- */
+ /**
+ * 校验个人转发是否达标
+ */
checkShare: {
url: '/fen/checkShare',
method: 'POST',
- showLoading : true,
+ showLoading: true,
},
- /**
- * 校验视频转发是否达标
- */
+ /**
+ * 校验视频转发是否达标
+ */
checkVideoShare: {
url: '/fen/checkVideoShare',
method: 'POST',
- showLoading : true,
+ showLoading: true,
},
- /**
- * 校验群转发是否达标
- */
+ /**
+ * 校验群转发是否达标
+ */
checkGroupShare: {
url: '/fen/checkGroupShare',
method: 'POST',
- showLoading : true,
+ showLoading: true,
},
- /**
- * 校验文章转发是否达标
- */
+ /**
+ * 校验文章转发是否达标
+ */
checkArticleShare: {
url: '/fen/checkArticleShare',
method: 'POST',
- showLoading : true,
+ showLoading: true,
+ },
+ /**
+ * 查询当前用户分享审核通过的记录条数
+ */
+ queryShareCount: {
+ url: '/fen/queryShareCount',
+ method: 'GET',
+ showLoading: true,
},
}
diff --git a/components/center/popupActivate.vue b/components/center/popupActivate.vue
index 4fb4ca4..62954c2 100644
--- a/components/center/popupActivate.vue
+++ b/components/center/popupActivate.vue
@@ -1,121 +1,111 @@
-
-
-
-
+
+
+
+
-
+
-
-
-
-
-
+
+
+
+
-
-
-
+
\ No newline at end of file
diff --git a/config.js b/config.js
index dd5b3a7..b151ff1 100644
--- a/config.js
+++ b/config.js
@@ -8,16 +8,16 @@ import uvUI from '@/uni_modules/uv-ui-tools'
Vue.use(uvUI);
// 当前环境
-const type = 'prod'
+const type = 'dev'
// 环境配置
const config = {
dev : {
- baseUrl : 'http://h5.xzaiyp.top/fission-star-api',
+ baseUrl : 'http://h5.xzaiyp.top/lbx-api',
},
test : {
- baseUrl : 'https://fission-star-api.hhlm1688.com/fission-star-api',
+ baseUrl : 'https://fission-star-api.hhlm1688.com/lbx-api',
},
prod : {
baseUrl : 'https://www.liebianxing.site/lbx-api',
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 73dc4bd..44f6886 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -13,7 +13,7 @@
-
+
@@ -59,6 +59,7 @@
// path: '/pages_order/sharing/video?id=1922875315630133249'
// },
],
+ count : 0,
}
},
computed: {
@@ -94,12 +95,21 @@
if (uni.getStorageSync('token') && !this.userInfo?.id) {
this.$store.commit('getUserInfo')
+ this.queryShareCount()
}
},
onShow() {
- this.getMsg()
},
methods: {
+ queryShareCount(){
+ this.$fetch('queryShareCount')
+ .then(result => {
+ if(result > 0){
+ this.count = result
+ this.$refs.popupAuditMsgRef.open()
+ }
+ })
+ },
onClick(url) {
if (!uni.getStorageSync('token')) {
uni.navigateTo({
@@ -112,11 +122,18 @@
this.$refs.popupActivate.open()
return
}
+
+ if(this.$dayjs(this.userInfo.endTime).isBefore(this.$dayjs())){
+ uni.showToast({
+ title: '代理已过期',
+ icon: 'none'
+ })
+ this.$refs.popupActivate.open(true)
+ return
+ }
+
this.$utils.navigateTo(url)
},
- getMsg(){
- this.$refs.popupAuditMsgRef.open()
- },
},
}