Ufida.T.SA.Client.AbstractVoucherController.fn.extend({
init: function (opt) {
this.base(opt);
//全局使用,不能删除
this.voucherAjaxhelperClass = SVCAction;
},
OnEnterRowHandler: function (param) {
alert("正常执行");//这段代码正常执行弹出提示
var svcode = SVCAction.PickSVCode();//下面这句SVCAction.PickSVCode();出错,不能成功执行(一直研究不出问题原因,请求帮助!)
alert(svcode);//不执行
this.base(param)
}
});
SVCAction_class = function () { };
Object.extend(SVCAction_class.prototype, Object.extend(new AjaxPro.AjaxClass(), {
PickSVCode: function () {
return this.invoke("PickSVCode", {}, this.PickSVCode.getArguments().slice(0));
},
url: '/WebSite/App/chanjet/Sample.UIPExtend/EveryCreative.T.SVC.UIP.SVCAction,EveryCreative.T.SVC.UIP.ashx'
//类文件EveryCreative.T.SVC.UIP.dll,放在了“D:\Chanjet\TPlusStd\WebSite\App\chanjet\Sample.UIPExtend”文件夹中
}));
SVCAction = new SVCAction_class();
/*
生成文件:EveryCreative.T.SVC.UIP.dll
类名:SVCAction
以下是cs类文件源码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Ufida.T.EAP.Aop;
using System.IO;
namespace EveryCreative.T.SVC.UIP
{
[AjaxPro.AjaxNamespace("SVCAction")]
public class SVCAction
{
public SVCAction()
{
}
[AjaxPro.AjaxMethod]
public string PickSVCode()
{
string svcode = "PickSVCode";
return svcode;
}
}
}
*/
自己F12看控制台报什么错误,应该是ajaxpro没配置好
参考:ajaxpro使用总结
数据为获取,或者代码格式问题,整体代码未运行到那一步。