@discuzq/sdk
Version:
discuz dsk
35 lines (28 loc) • 886 B
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.TencentCaptcha = void 0;
exports.toTCaptcha = toTCaptcha;
var _tcaptcha = _interopRequireDefault(require("./tcaptcha"));
// 小程序使用
function toTCaptcha(appId, onSuccess) {
if (wx && wx.navigateToMiniProgram) {
return wx.navigateToMiniProgram({
appId: 'wx5a3a7366fd07e119',
path: '/pages/captcha/index',
envVersion: 'develop',
extraData: {
appId: appId // 您申请的验证码的 appId
},
success: function success() {
typeof onSuccess === 'function' && onSuccess();
},
fail: function fail() {}
});
}
} // h5使用
var _window = window,
TencentCaptcha = _window.TencentCaptcha;
exports.TencentCaptcha = TencentCaptcha;