Authored by 李奇
Committed by 李奇

YB_SC_ORD事件上报添加

... ... @@ -9,6 +9,9 @@ import orderService from '../orderService'
import {getImgUrl} from '../../../utils';
import router from '../../../router/index.js'
import { prePay } from '../../order/wxpay.js'
import Yas from '../../../utils/yas';
let yas;
Page({
... ... @@ -22,8 +25,7 @@ Page({
unCheckImage: '../../../assets/images/unselect@2x.png',
},
onLoad: function (option) {
console.log(option)
yas = new Yas(this);
this.setData({
skup: option && option.skup ? option.skup : '',
product_id: option && option.product_id ? option.product_id : '',
... ... @@ -114,10 +116,13 @@ Page({
api.buyerSubmit(skup,channelNo,addressId, () => wx.hideLoading())
.then(data => {
if (data && data.orderCode) {
//todo:待处理微信数据分析上报,订单生成
// wx.reportAnalytics(eventName, data)
let orderCode = data.orderCode;
let productId = data.productId ? data.productId : '';
let params = {
RPD_SKUP: skup,
ORD_NUM: orderCode + ''
};
yas.report('YB_SC_ORD', params);
prePay(productId, orderCode, 0);
}
})
... ... @@ -130,9 +135,9 @@ Page({
},
chooseAddress: function(){
let addressId = this.data.address ? this.data.address.address_id : ''
let params = {
... ...