|
wex5如何引入plugin.http.request (plugin.http.request) 这个插件,我引入后报错plugin is not defined- define(function(require){
- var $ = require("jquery");
- var justep = require("$UI/system/lib/justep");
-
-
-
- var Model = function(){
- this.callParent();
- };
- Model.prototype.button4Click = function(event){
- var httpReq = new plugin.HttpRequest();
- var tel = this.comp("tel").get("value");
- alert(tel);
- /*$.ajax({
- type : "GET",
- url : "http://localhost:8081/logistics/mobile/userMobile/regcode",
- data : {phoneNumber:tel},
- dataType : "JSON",
- success : function(data){
- alert(data.msg);
- }
- });*/
- httpReq.getJSON("http://localhost:8081/logistics/mobile/userMobile/regcode", {"phoneNumber":tel}, function(data){
- alert(data.msg);
- });
- };
- return Model;
- });
复制代码
|
|