// 统一下单接口获取sign(签名)
paysignjsapi: function (appid, attach, body, mch_id, nonce_str, notify_url, openid, out_trade_no, spbill_create_ip, total_fee, trade_type, key) {
var self = this;
//加密签名
wx.request({
url: 'http://localhost:8080/XinXingWXApi/wxXcxApi/Md5Encrypt.do',
method: 'GET',
data: {
appid: appid,
attach: attach,
body: body,
mch_id: mch_id,
nonce_str: nonce_str,
notify_url: notify_url,
openid: openid,
out_trade_no: out_trade_no,
spbill_create_ip: spbill_create_ip,
total_fee: total_fee,
trade_type: trade_type,
key: key
},
//统一下单
success: function (res) {
var sign = res.data.strMd5
var formData = "<xml>"
formData += "<appid>" + appid + "</appid>" //appid
|