Pārlūkot izejas kodu

chore: 移除 getuserdetail 请求参数调试弹窗

删除首页调用前参数弹窗与同步返回中的对应调试字段,保留 getuserdetail 返回弹窗,避免无关调试信息干扰排查。

Made-with: Cursor
haifeng.zhang 1 nedēļu atpakaļ
vecāks
revīzija
eb1868960f
2 mainītis faili ar 0 papildinājumiem un 31 dzēšanām
  1. 0 16
      src/api/wecom/index.ts
  2. 0 15
      src/pages/home/index.vue

+ 0 - 16
src/api/wecom/index.ts

@@ -335,9 +335,6 @@ export async function syncExternalVisitorProfile(code: string) {
       userInfo,
       externalContact,
       internalUserRaw: undefined,
-      userTicket: undefined,
-      debugAccessToken: undefined,
-      getuserdetailRequestParams: undefined,
     }
   }
 
@@ -346,14 +343,7 @@ export async function syncExternalVisitorProfile(code: string) {
     const internal = await getWecomInternalUser(memberUserId)
     let detailRaw: WecomUserDetailResponse | undefined
     let detailMobile = ''
-    let debugAccessToken = ''
-    let getuserdetailRequestParams: Record<string, string> | undefined
     if (userInfo.user_ticket) {
-      debugAccessToken = getCachedAccessToken()
-      getuserdetailRequestParams = {
-        access_token: debugAccessToken,
-        user_ticket: userInfo.user_ticket,
-      }
       try {
         const detail = await getWecomUserDetail(userInfo.user_ticket)
         detailRaw = detail
@@ -375,9 +365,6 @@ export async function syncExternalVisitorProfile(code: string) {
       userInfo,
       externalContact: null,
       internalUserRaw: detailRaw,
-      userTicket: userInfo.user_ticket || '',
-      debugAccessToken,
-      getuserdetailRequestParams,
     }
   }
 
@@ -387,8 +374,5 @@ export async function syncExternalVisitorProfile(code: string) {
     userInfo,
     externalContact: null,
     internalUserRaw: undefined,
-    userTicket: undefined,
-    debugAccessToken: undefined,
-    getuserdetailRequestParams: undefined,
   }
 }

+ 0 - 15
src/pages/home/index.vue

@@ -34,8 +34,6 @@ const stripOAuthCodeFromUrl = () => {
 const externalUserid = ref('');
 const unionidValue = ref('');
 const ownerId = ref('');
-const getuserdetailRequestPopupVisible = ref(false);
-const getuserdetailRequestJsonText = ref('');
 const internalUserGetPopupVisible = ref(false);
 const internalUserGetJsonText = ref('');
 
@@ -88,12 +86,6 @@ const bootstrapWithCode = async (code: string) => {
     throw new Error('identity incomplete')
   }
   applyVisitorFromSyncResult(result)
-  if (result.getuserdetailRequestParams) {
-    getuserdetailRequestJsonText.value = JSON.stringify({
-      authParams: result.getuserdetailRequestParams,
-    }, null, 2)
-    getuserdetailRequestPopupVisible.value = true
-  }
   if (result.internalUserRaw) {
     internalUserGetJsonText.value = JSON.stringify(result.internalUserRaw, null, 2)
     internalUserGetPopupVisible.value = true
@@ -166,13 +158,6 @@ const getQuestionPage = () => {
     </view>
     <img class="box_bg_bottom" src="@/assets/bg_bottom.png" alt="" srcset="">
 
-    <van-popup v-model:show="getuserdetailRequestPopupVisible" round closeable class="user-get-popup">
-      <view class="user-get-popup__header">getuserdetail 请求参数</view>
-      <scroll-view scroll-y class="user-get-popup__content">
-        <text selectable class="user-get-popup__json">{{ getuserdetailRequestJsonText }}</text>
-      </scroll-view>
-    </van-popup>
-
     <van-popup v-model:show="internalUserGetPopupVisible" round closeable class="user-get-popup">
       <view class="user-get-popup__header">getuserdetail 返回</view>
       <scroll-view scroll-y class="user-get-popup__content">