|
我做了一个提示窗口自定义方法
Model.prototype.ShowMessage = function(type,title,message){
var newmw = this.comp("message_win");
newmw.show({
type:type,
title:title,
message:message
});
};
想在这个扫二维码的方法中提示
Model.prototype.ScanClick = function(event){
function onSuccess(result){
var codeText = result.text;
if(codeText.indexOf("http:") > -1){
}else{
this.ShowMessage("OK","提示","提示信息!");
}
}
function onError(error){
justep.Util.hint("扫描失败!");
}
cordova.plugins.barcodeScanner.scan(onSuccess, onError);//执行扫一扫
};
this.ShowMessage("OK","提示","提示信息!");执行到这里提示 undefined is not a function 请大求解
|
|