Commit 6514a4b9 by chenhui

小程序订阅消息埋点

parent c849cf29
...@@ -8,10 +8,5 @@ export default { ...@@ -8,10 +8,5 @@ export default {
return requestPOST1( return requestPOST1(
`${process.env.OLSHOP_URL}/pay/payment_cancel?orderSn=${options}` `${process.env.OLSHOP_URL}/pay/payment_cancel?orderSn=${options}`
); );
},
sendMiniSubscribeMessage(orderSn) {
return requestPOST1(
`${process.env.OLSHOP_URL}/pay/sendMiniSubscribeMessage?orderSn=${orderSn}`
);
} }
}; };
\ No newline at end of file
...@@ -53,16 +53,16 @@ export default { ...@@ -53,16 +53,16 @@ export default {
payData.success = res => { payData.success = res => {
console.log("支付成功", res, this.options); console.log("支付成功", res, this.options);
// TODO 小程序订阅消息埋点-支付成功 nnEVpqCfNzkj07oIlF3X2Ms8sdzCjkCpqYWGKNiZK2g // TODO 小程序订阅消息埋点
const orderSn = this.options.orderSn; const orderSn = this.options.orderSn;
try { try {
wx.requestSubscribeMessage({ wx.requestSubscribeMessage({
      tmplIds: [       tmplIds: [
        'CdnNUqNZRyQLfdH376ptwSBPwt7pJA5QWjcQ426_XyE'         '10xLnJqIXoMx4Cqb8Q_oC6cD4aKqU4pAu3_lSDNRILA',
'X4W6WgC-Mq58SUwUwsCOIORDFFYfZFR0uFcafxgXBls'
      ],       ],
      success(res) {       success(res) {
        console.log("message success response: ", res);         console.log("message success response: ", res);
wxPay.sendMiniSubscribeMessage(orderSn);
      },       },
fail(res) { fail(res) {
        console.log("message fail response: ", res)         console.log("message fail response: ", res)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment