|
在js调用自己定义的函数报错 is not a functionvar msg = this.payCanteenOrder(orderID, cartData.sum("calcMoney"), orderTime.toString()); --调用
Model.prototype.payCanteenOrder = function(orderID, fPrice, date) {
var self = this;
var msg = "网络错误,请重试";
Baas.sendRequest({
"url" : "/jsptpd/Order",
"action" : "payCanteenOrder",
"async" : false,
"params" : {
orderID : orderID,
price : fPrice,
date : date,
emWorkNo : self._userWorkNo
// 用户工号
},
"success" : function(data) {
if ('success' == data.result) {
msg = 'success';
} else {
msg = data.msg;
}
},
"error" : function(msg, xhr) {
msg += msg;
}
});
return msg;
}
|
|