激活采集码使用 openRootMode();

This commit is contained in:
Wang Kejun 2023-08-22 17:40:30 +08:00
parent dc3262ada1
commit e0b86af2c5
3 changed files with 5 additions and 15 deletions

View File

@ -1625,7 +1625,7 @@ exports.logout = logout;
function wakeupParasite(params, context) {
var _a;
return tslib_1.__awaiter(this, void 0, void 0, function () {
var id, env, _b, parasite, _c, _d, _e, tokenId, _f, _g, _h;
var id, env, _b, parasite, closeFn, _c, _d, _e, tokenId, _f, _g, _h;
var _j, _k, _l;
return tslib_1.__generator(this, function (_m) {
switch (_m.label) {
@ -1662,6 +1662,7 @@ function wakeupParasite(params, context) {
if (((_a = parasite.user) === null || _a === void 0 ? void 0 : _a.userState) !== 'shadow') {
throw new types_1.OakUserException('此用户已经登录过系统,不允许借用身份');
}
closeFn = context.openRootMode();
if (!!parasite.multiple) return [3 /*break*/, 4];
_d = (_c = context).operate;
_e = ['parasite'];
@ -1704,7 +1705,7 @@ function wakeupParasite(params, context) {
return [4 /*yield*/, loadTokenInfo(tokenId, context)];
case 8:
_m.sent();
// closeFn();
closeFn();
return [2 /*return*/, tokenId];
}
});

View File

@ -1,11 +0,0 @@
<!-- index.wxml -->
<view class="qrcode_view">
<view class="col">
<block wx:if="{{oakLoading}}">
<l-loading show="{{true}}" type="circle"></l-loading>
</block>
<block wx:else>
<image src="{{url}}" mode="aspectFit" class="image" />
</block>
</view>
</view>

View File

@ -1768,7 +1768,7 @@ export async function wakeupParasite<
throw new OakUserException('此用户已经登录过系统,不允许借用身份');
}
// const closeFn = context.openRootMode();
const closeFn = context.openRootMode();
if (!parasite.multiple) {
await context.operate(
'parasite',
@ -1807,6 +1807,6 @@ export async function wakeupParasite<
);
await loadTokenInfo<ED, Cxt>(tokenId, context);
// closeFn();
closeFn();
return tokenId;
}