Authored by yyq

add form id

... ... @@ -14,21 +14,6 @@ export default {
},
/**
* 微信支付成功上报
* @param params
* @returns {*}
*/
wechatPayAddFormId(param) {
return api.get({
url: '',
data: {
...param,
method: 'wechat.formId.add'
}
});
},
/**
* 支付成功确认
* @param params
* @returns {*}
... ...
import orderModel from '../../../models/home/order';
import commonModel from '../../../models/common';
import orderHandle from './order-handle';
import Yas from '../../../common/yas';
... ... @@ -91,6 +92,15 @@ Page({
return `${this.fill2(hr)}:${this.fill2(min)}:${this.fill2(sec)}`;
},
submitFormId(e) {
//上报formID
commonModel.addWechatFormId({
order_code: this.orderCode,
openId: app.getOpenID(),
miniapp_type: app.getMiniappType(),
formId: e.detail.formId
});
},
cancelOrder() {
orderHandle.cancelOrder(this.orderCode);
},
... ...
... ... @@ -91,6 +91,8 @@ page {
text-align: center;
box-sizing: border-box;
display: inline-block;
vertical-align: top;
padding: 0;
}
.bottom-options .red-btn {
... ...
import payModel from '../models/pay/pay';
import commonModel from '../models/common';
import Yas from '../common/yas';
const PAYMENT_CODE = '45';
... ... @@ -102,12 +103,11 @@ function wechatPay(order, callback) {
prepareID = prepareID.slice(10);
//上报formID
payModel.paySuccessConfirm({
commonModel.addWechatFormId({
order_code: orderCode,
openId: app.getOpenID(),
miniapp_type: app.getMiniappType(),
formId: prepareID,
method: 'wechat.formId.add',
formType: 'pay',
});
}
... ...