|
|
@@ -34,6 +34,8 @@ const stripOAuthCodeFromUrl = () => {
|
|
|
const externalUserid = ref('');
|
|
|
const unionidValue = ref('');
|
|
|
const ownerId = ref('');
|
|
|
+const internalUserGetPopupVisible = ref(false);
|
|
|
+const internalUserGetJsonText = ref('');
|
|
|
|
|
|
const applyVisitorFromSyncResult = (result: Awaited<ReturnType<typeof syncExternalVisitorProfile>>) => {
|
|
|
externalUserid.value = result.externalUserId
|
|
|
@@ -84,6 +86,10 @@ const bootstrapWithCode = async (code: string) => {
|
|
|
throw new Error('identity incomplete')
|
|
|
}
|
|
|
applyVisitorFromSyncResult(result)
|
|
|
+ if (result.internalUserRaw) {
|
|
|
+ internalUserGetJsonText.value = JSON.stringify(result.internalUserRaw, null, 2)
|
|
|
+ internalUserGetPopupVisible.value = true
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
const cacheLooksUsable = (cached: WecomVisitorProfile | null): cached is WecomVisitorProfile =>
|
|
|
@@ -151,6 +157,13 @@ const getQuestionPage = () => {
|
|
|
</navigator>
|
|
|
</view>
|
|
|
<img class="box_bg_bottom" src="@/assets/bg_bottom.png" alt="" srcset="">
|
|
|
+
|
|
|
+ <van-popup v-model:show="internalUserGetPopupVisible" round closeable class="user-get-popup">
|
|
|
+ <view class="user-get-popup__header">user/get 返回</view>
|
|
|
+ <scroll-view scroll-y class="user-get-popup__content">
|
|
|
+ <text selectable class="user-get-popup__json">{{ internalUserGetJsonText }}</text>
|
|
|
+ </scroll-view>
|
|
|
+ </van-popup>
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
@@ -236,4 +249,36 @@ const getQuestionPage = () => {
|
|
|
width: 100%;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.user-get-popup {
|
|
|
+ width: 88vw;
|
|
|
+ max-height: 75vh;
|
|
|
+ padding: 20px 16px 16px;
|
|
|
+ box-sizing: border-box;
|
|
|
+
|
|
|
+ &__header {
|
|
|
+ margin-bottom: 12px;
|
|
|
+ padding-right: 24px;
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+
|
|
|
+ &__content {
|
|
|
+ max-height: 60vh;
|
|
|
+ background: #f7f8fa;
|
|
|
+ border-radius: 8px;
|
|
|
+ padding: 12px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
+
|
|
|
+ &__json {
|
|
|
+ display: block;
|
|
|
+ white-space: pre-wrap;
|
|
|
+ word-break: break-all;
|
|
|
+ font-size: 12px;
|
|
|
+ line-height: 1.6;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|