zoujiandong 43abd1f3d6 222
2025-07-30 13:58:39 +08:00

28 lines
694 B
JavaScript

"use strict";
const common_vendor = require("../common/vendor.js");
function auth() {
return new Promise((resolve, reject) => {
common_vendor.index.login({
provider: "weixin",
//使用微信登录
onlyAuthorize: true,
//不弹出授权页面,直接进入微信登录流程
success(res) {
if (res.errMsg == "login:ok") {
resolve(res.code);
} else {
common_vendor.index.showToast({
title: res.errMsg,
icon: "error"
});
}
},
fail(err) {
reject(err);
}
});
});
}
exports.auth = auth;
//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/auth.js.map