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() - }, }, }