Leon 1 gadu atpakaļ
vecāks
revīzija
d8a2441dca

+ 1 - 0
src/features/trackTimeDuration/components/IndexConsole.tsx

@@ -446,6 +446,7 @@ export default function IndexConsole(props: { record: any, count: number }) {
                     refreshDayNight()
 
                     if (process.env.TARO_ENV == 'weapp') {
+                        debugger
                         if (permission.wxPubFollow) {
                             showAlert({
                                 title: t('feature.track_time_duration.reminders.fast_end_title'),

+ 4 - 1
src/pages/clock/Clock.tsx

@@ -53,6 +53,7 @@ import showAlert from "@/components/basic/Alert";
 import { APP_VERSION, WX_VERSION } from "@/services/http/api";
 import { wxPubFollow } from "@/services/permission";
 import { repeat } from "lodash";
+import { setWXFollow } from "@/store/permission";
 
 const utc = require('dayjs/plugin/utc')
 const timezone = require('dayjs/plugin/timezone')
@@ -304,7 +305,9 @@ export default function Page() {
             checkAuthorized();
             //检查用户是否添加过小程序
             checkAddToMini();
-            wxPubFollow({ force_refresh: true });
+            wxPubFollow({ force_refresh: true }).then(res => {
+                dispatch(setWXFollow((res as any).wx_pub_followed));
+            })
 
 
 

+ 1 - 0
src/services/http/request.ts

@@ -90,6 +90,7 @@ export async function request<T>(param: RequestParam): Promise<T> {
         header['X-Timestamp'] = new Date().getTime()
         if (token.length > 0) {
             header['Authorization'] = `Bearer ${token}`;
+            // header['Authorization'] = 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJhY2NvdW50Iiwic3ViIjoiMjU0YjFjM2YxMWMzODk0ZjlmNjYyNGJiZDQ1N2ZjOWMiLCJpc3MiOiJmYXN0Iiwibmlja25hbWUiOiJCb3l1IiwidHlwIjoiQmVhcmVyIiwic2Vzc2lvbl9zdGF0ZSI6IjYwOWVjMDgyYzgxMTZjNGYwNGIxZjIwNDYyYjFlZjk5IiwiZXhwIjoxNzQ4MzE0NzU5LCJpYXQiOjE3MTY3Nzg3NTl9.HRE1b8bTzElV_I_nlz5LC0P3bweLPOSQipAdiiRb1Mk';
             // header['Authorization'] = 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJhY2NvdW50Iiwic3ViIjoiMjZkOGE1YTg0MDMyYmExN2Q4NDk3MTlkNTljNGY1NzgiLCJpc3MiOiJmYXN0Iiwibmlja25hbWUiOiJCSyIsInR5cCI6IkJlYXJlciIsInNlc3Npb25fc3RhdGUiOiI1ZDU2NTkzYmNjNWFmNzM0OWNlZTMwZjlkNGYzMWIyMCIsImV4cCI6MTc0ODE3MDg5NSwiaWF0IjoxNzE2NjM0ODk1fQ.uaRm2vSNCX8fkFS63Oe-WNWIDHG_cRM-nQ5EGyUMaBg';
         }