|
@@ -13,6 +13,7 @@ Page({
|
|
|
console.log("返回界面3:");
|
|
|
}
|
|
|
},
|
|
|
+ webCount: 0,
|
|
|
|
|
|
// qrcodeUrl: "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20250328100356565128956.png",
|
|
|
qrcodeUrl: "",
|
|
@@ -107,7 +108,20 @@ Page({
|
|
|
qrcodeUrl: url
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
+ bindload(e) {
|
|
|
+ console.log("webview加载完成:", e);
|
|
|
+ // 当做是加载成功了
|
|
|
+ this.data.webCount++;
|
|
|
+ if (this.data.webCount > 3) {
|
|
|
+ const pages = getCurrentPages();
|
|
|
+ if (pages.length < 2) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const prevPage = pages[pages.length - 2];
|
|
|
+ // 修改授权
|
|
|
+ prevPage.getAuthStatus(true);
|
|
|
+ }
|
|
|
+ },
|
|
|
handleWebviewMessage(e) {
|
|
|
// e.detail.data 是网页 postMessage 发送的数据数组
|
|
|
console.log('收到 web-view 消息:', e);
|