From cc17749a0c4e8e2e4c36a96cf41dbdd553d56e6e Mon Sep 17 00:00:00 2001
From: 13405411873 <1994398261@qq.com>
Date: Thu, 8 May 2025 18:07:19 +0800
Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/components/notice-index.vue | 9 +++------
pages/login.vue | 11 +++++------
pages/mine/coupon/my-coupon.vue | 13 ++++---------
pages/mine/member/member-card.vue | 5 +++--
pages/mine/mine-index.vue | 14 +++++++-------
utils/common.js | 22 +++++++++++-----------
6 files changed, 33 insertions(+), 41 deletions(-)
diff --git a/pages/components/notice-index.vue b/pages/components/notice-index.vue
index a91a6cb..7698c54 100644
--- a/pages/components/notice-index.vue
+++ b/pages/components/notice-index.vue
@@ -229,7 +229,7 @@
focus: false,
queryParams: {
pageNum: 1,
- pageSize: 10,
+ pageSize: 30,
//排序方式:new-最新;money-高奖励;
sortBy: "",
//品牌置换--只要有值代表查品牌置换
@@ -418,6 +418,7 @@
this.queryParams.feeDown = null
this.queryParams.fansDown = null
this.queryParams.fansUp = null
+ this.queryParams.cityId = null
},
// 关闭窗口
closeDrawer(e) {
@@ -447,10 +448,6 @@
} else if ('最新' == item) {
//最新
- //鉴权
- if (!await this.checkIfHasRights(rightsCode.highNewNotice)) {
- return
- }
this.queryParams.sortBy = "new"
} else if ('急招' == item) {
@@ -1010,4 +1007,4 @@
.text-color {
color: #929292 !important;
}
-
\ No newline at end of file
+
diff --git a/pages/login.vue b/pages/login.vue
index f60c069..45d40bc 100644
--- a/pages/login.vue
+++ b/pages/login.vue
@@ -83,11 +83,9 @@
if (params.canBack) {
this.canBack = params.canBack
}
- },
- created() {
-
this.wxLogin()
},
+
methods: {
/**
* 同意
@@ -120,7 +118,7 @@
}
})
},
- wxLogin() {
+ async wxLogin() {
let that = this
uni.login({
provider: 'weixin',
@@ -135,11 +133,12 @@
})
},
//微信授权登录
- getPhone(e) {
+ async getPhone(e) {
if (!this.ifAgree) {
toast("请先阅读并同意《隐私协议》《用户服务协议》")
return
}
+ let ok = await this.wxLogin()
console.log("微信小程序发起授权登录")
this.$modal.loading("登录中...")
uni.checkSession({
@@ -315,4 +314,4 @@
}
}
}
-
\ No newline at end of file
+
diff --git a/pages/mine/coupon/my-coupon.vue b/pages/mine/coupon/my-coupon.vue
index 68f43d9..f205c6b 100644
--- a/pages/mine/coupon/my-coupon.vue
+++ b/pages/mine/coupon/my-coupon.vue
@@ -30,16 +30,11 @@
- 购买
-
+
-
-
- 查看《急招券购买协议》
-
-
+
@@ -116,7 +111,7 @@
pageNum: 1,
pageSize: 10,
orderType: '02',
- isPay:'1',
+ isPay: '1',
userId: null,
},
total: 0,
@@ -132,7 +127,7 @@
this.initCoupon();
this.initOrder()
//获取url中的search
- if (location.search) {
+ if (location && location.search) {
let search = location.search.slice(1);
let arr = search.split("&");
let result = {};
diff --git a/pages/mine/member/member-card.vue b/pages/mine/member/member-card.vue
index f6aee2b..aae2a4f 100644
--- a/pages/mine/member/member-card.vue
+++ b/pages/mine/member/member-card.vue
@@ -33,7 +33,8 @@
- 立即开通
+
+
@@ -616,4 +617,4 @@
}
}
}
-
\ No newline at end of file
+
diff --git a/pages/mine/mine-index.vue b/pages/mine/mine-index.vue
index 268f6ec..bdf82e5 100644
--- a/pages/mine/mine-index.vue
+++ b/pages/mine/mine-index.vue
@@ -59,10 +59,10 @@
-
+
积分{{userInfo.pointsBalance||'0'}}
- 赚积分{{item.unicode}}
+ 去提现{{item.unicode}}
@@ -85,17 +85,17 @@
-
+
-
-
+
+
@@ -904,4 +904,4 @@
}
}
}
-
\ No newline at end of file
+
diff --git a/utils/common.js b/utils/common.js
index c29abd4..f812428 100644
--- a/utils/common.js
+++ b/utils/common.js
@@ -44,18 +44,18 @@ export function hasRights(code) {
setJSONData(constant.userRightsKey, res.data)
//取用户当前身份
let userType = getStrData(constant.userTypeKey)
- let userRights = {}
- if (constant.bz == userType) {
- //博主
- userRights = getJSONData(constant.userRightsKey)['bz']
- } else {
- //通告主
- userRights = getJSONData(constant.userRightsKey)['tgz']
- }
+ let bzRights = {}
+ let tgzRights = {}
+ //博主
+ bzRights = getJSONData(constant.userRightsKey)['bz']
+ //通告主
+ tgzRights = getJSONData(constant.userRightsKey)['tgz']
//默认无权限
let rtnData = false
- if (userRights.hasOwnProperty(code)) {
- rtnData = userRights[code]
+ if (bzRights.hasOwnProperty(code)) {
+ rtnData = bzRights[code]
+ } else if (tgzRights.hasOwnProperty(code)) {
+ rtnData = tgzRights[code]
}
console.log(rtnData, 51);
resolve(rtnData)
@@ -225,4 +225,4 @@ export function getTextByIdentityType(key) {
*/
export function formatNumberWithCommas(number) {
return new Intl.NumberFormat().format(number);
-}
\ No newline at end of file
+}