Authored by yyq

report formid

import api from '../common/api';
export default {
/**
* 添加微信模版消息FormId
* @param params
* @returns {*}
*/
addWechatFormId(param) {
return api.get({
data: {
...param,
method: 'wechat.formId.add'
}
});
},
}
... ...
import ensureModel from '../../../models/cart/ensure';
import addressModel from '../../../models/home/address';
import payModel from '../../../models/pay/pay';
import commonModel from '../../../models/common';
import wechatAddressUtil from '../../../utils/wechat-address';
import { wechatPay } from '../../../utils/wechat-pay';
import Yas from '../../../common/yas';
... ... @@ -356,8 +356,9 @@ Page({
ORDER_TYPE: 102 // 101购物车下单,102立即购买下单
});
//上报formID
payModel.paySuccessConfirm({
commonModel.addWechatFormId({
order_code: data.order_code,
openId: app.getOpenID(),
miniapp_type: app.getMiniappType(),
... ...
... ... @@ -47,6 +47,7 @@ Page({
goodsList: data.order_goods || [],
promotionList: data.promotion_formulas || [],
paymentAmount: data.payment_amount,
attribute: data.attribute,
links: data.links
});
}
... ...
... ... @@ -31,14 +31,17 @@
<text>剩余 {{payLeftTime}}</text>
</view>
<view class="right-block">
<block wx:for="{{links}}" wx:for-item="link" wx:key="unique">
<view wx:if="{{link === 'closeOrder'}}" class="option-btn" catchtap="cancelOrder">取消订单</view>
<view wx:if="{{link === 'buyNow'}}" class="option-btn red-btn" catchtap="payNow">立即付款</view>
<view wx:if="{{link === 'delOrder'}}" class="option-btn" catchtap="deleteOrder">删除订单</view>
<view wx:if="{{link === 'getExpress'}}" class="option-btn" catchtap="viewExpress">查看物流</view>
<view wx:if="{{link === 'confirm'}}" class="option-btn red-btn" catchtap="confirmOrder">确认收货</view>
<view wx:if="{{link === 'refundApply'}}" class="option-btn" catchtap="refundNow">申请退款</view>
</block>
<view wx:if="{{attribute == 9}}" class="only-app-tips">*此订单只能在APP端操作</view>
<form bindsubmit="submitFormId" report-submit='true'>
<block wx:for="{{links}}" wx:for-item="link" wx:key="unique">
<button wx:if="{{link === 'closeOrder'}}" formType="submit" class="option-btn" catchtap="cancelOrder">取消订单</button>
<view wx:if="{{link === 'buyNow'}}" class="option-btn red-btn" catchtap="payNow">立即付款</view>
<view wx:if="{{link === 'delOrder'}}" class="option-btn" catchtap="deleteOrder">删除订单</view>
<view wx:if="{{link === 'getExpress'}}" class="option-btn" catchtap="viewExpress">查看物流</view>
<button wx:if="{{link === 'confirm'}}" formType="submit" class="option-btn red-btn" catchtap="confirmOrder">确认收货</button>
<button wx:if="{{link === 'refundApply'}}" formType="submit" class="option-btn" catchtap="refundNow">申请退款</button>
</block>
</form>
</view>
</view>
</view>
... ...
... ... @@ -72,6 +72,12 @@ page {
float: right;
}
.bottom-options .only-app-tips {
line-height: 60rpx;
font-size: 28rpx;
color: #444;
}
.bottom-options .option-btn {
width: 140rpx;
height: 60rpx;
... ...