用这个也没用....这是插件里面的js
var WxPay = (function (_super) {
__extends(WxPay, _super);
function WxPay() {
return _super !== null && _super.apply(this, arguments) || this;
}
WxPay.prototype.execute = function () {
// Get setings
var commandSettings = this.CommandParam;
var APPID = commandSettings.APPID;
var MCHID = commandSettings.MCHID;
var KEY = commandSettings.KEY;
var APPSECRET = commandSettings.APPSECRET;
var NotifyUrl = commandSettings.NotifyUrl;
var productId = commandSettings.productId;
var productIdtext = this.evaluateFormula(productId);
var totalF = commandSettings.totalF;
var totalFtext = this.evaluateFormula(totalF);
var title = commandSettings.title;
var titletext = this.evaluateFormula(title);
var data = {
APPID: APPID,
MCHID: MCHID,
KEY: KEY,
APPSECRET: APPSECRET,
NotifyUrl: NotifyUrl,
productId: productIdtext,
totalF: totalFtext,
title: titletext
};
//发送请求到服务器
// Forguncy.Helper.post("customapi/wxpayapi/nativepay", data, function (d) { alert(d);});
$.post(Forguncy.ForguncyData.ForguncyRoot + 'customapi/wxpayapi/nativepay', data, function (res) {
alert(res);
})
};
return WxPay;
}(Forguncy.CommandBase));
// Key format is "Namespace.ClassName, AssemblyName"
Forguncy.CommandFactory.registerCommand("WxPay.WxPay, WxPay", WxPay); |