From c3ffadfdedbb7837fc0de30bc16a87486d45a917 Mon Sep 17 00:00:00 2001
From: wangxiaowei <1121133807@qq.com>
Date: Fri, 17 Oct 2025 15:40:03 +0800
Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0=E4=BF=AE=E6=94=B9=E7=99=BB?=
=?UTF-8?q?=E5=BD=95=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/App.vue | 3 ++-
src/api/tea.ts | 15 ++++++++++++
src/hooks/useWeiXin.ts | 2 +-
src/http/alova.ts | 6 +++--
src/pages/index/detail.vue | 13 ++++++----
src/pages/login/mobile.vue | 24 +++++++++----------
src/pages/my/my.vue | 15 ++++--------
.../mescroll-uni/mixins/mescroll-comp.js | 6 ++---
.../mescroll-uni/mixins/mescroll-more.js | 10 ++++----
src/utils/jwexin.ts | 3 ---
10 files changed, 54 insertions(+), 43 deletions(-)
diff --git a/src/App.vue b/src/App.vue
index d0a7234..78fbb31 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -17,7 +17,8 @@
}
// 微信静默授权
- await initJweixinSDK()
+ await snsapiBaseAuthorize()
+ // await initJweixinSDK()
})
onShow((options) => {
console.log('App Show', options)
diff --git a/src/api/tea.ts b/src/api/tea.ts
index 1283054..308c43d 100644
--- a/src/api/tea.ts
+++ b/src/api/tea.ts
@@ -18,3 +18,18 @@ export function getTeaSpecialistDetails(data: ITeaSpecialistDetailsParams) {
}
)
}
+
+/**
+ * 收藏和取消收藏茶艺师
+ */
+export interface ICollectTeaSpecialistParams {
+ id: number
+ user_id: number
+ status: number
+}
+
+export function collectTeaSpecialist(data: ICollectTeaSpecialistParams) {
+ return http.Post('/api/Teamaster/teamasterCollect',
+ data
+ )
+}
\ No newline at end of file
diff --git a/src/hooks/useWeiXin.ts b/src/hooks/useWeiXin.ts
index 0eccb05..0dfe503 100644
--- a/src/hooks/useWeiXin.ts
+++ b/src/hooks/useWeiXin.ts
@@ -58,8 +58,8 @@ export async function snsapiBaseAuthorize() {
if (code == null || code === '' || code == 'undefined' || code == oldCode) {
// 如果没有code,就去请求获取code
- console.log('当前没有code,进入授权页面')
let uri = encodeURIComponent(local)
+ console.log("🚀 ~ 当前没有code,进入授权页面 snsapiBaseAuthorize ~ uri:", uri)
// 设置旧的code为0,避免死循环
uni.setStorageSync('wechatCode',0)
window.location.href =
diff --git a/src/http/alova.ts b/src/http/alova.ts
index ecf9823..268be32 100644
--- a/src/http/alova.ts
+++ b/src/http/alova.ts
@@ -56,8 +56,6 @@ const alovaInstance = createAlova({
}
const { config } = method
- console.log("🚀 ~ config.meta?.ignoreAuth:", config)
-
const ignoreAuth = !config.meta?.ignoreAuth
console.log('ignoreAuth===>', ignoreAuth)
// 处理认证信息 自行处理认证问题
@@ -71,6 +69,10 @@ const alovaInstance = createAlova({
const userStore = useUserStore()
const { token } = userStore.userInfo as unknown as IUserInfo
if (!token) {
+ toast.info('请先登录')
+ setTimeout(() => {
+ uni.switchTab({ url: '/pages/my/my' })
+ }, 500)
throw new Error('[请求错误]:未登录')
}
method.config.headers.token = token;
diff --git a/src/pages/index/detail.vue b/src/pages/index/detail.vue
index 8d1be63..fe87f32 100644
--- a/src/pages/index/detail.vue
+++ b/src/pages/index/detail.vue
@@ -111,7 +111,7 @@
-
+
@@ -270,7 +270,7 @@