|
|
@@ -1,5 +1,5 @@
|
|
|
-import { api_schoolAreaDetail, api_schoolAreaList, api_sysAreaQueryAllProvince, api_userBeneficiarySave, api_userBeneficiaryUpdate } from "../../api/new";
|
|
|
-import { debounce, GRADE_ENUM } from "../../utils/util";
|
|
|
+import { api_schoolAreaDetail, api_schoolAreaList, api_sysAreaQueryAllProvince, api_trackPointLog, api_userBeneficiarySave, api_userBeneficiaryUpdate } from "../../api/new";
|
|
|
+import { debounce, formatTime, GRADE_ENUM } from "../../utils/util";
|
|
|
|
|
|
|
|
|
const classList: any = [];
|
|
|
@@ -622,6 +622,20 @@ Page({
|
|
|
return ''
|
|
|
}
|
|
|
},
|
|
|
+ // 进行埋点
|
|
|
+ onTrackPoint(options: { openId: string, elementName: string, extParams?: string }) {
|
|
|
+ const traceId = wx.getStorageSync("traceId");
|
|
|
+ const deviceInfo = wx.getDeviceInfo();
|
|
|
+ api_trackPointLog({
|
|
|
+ traceId,
|
|
|
+ openId: options.openId,
|
|
|
+ elementName: options.elementName,
|
|
|
+ deviceInfo: deviceInfo.brand + '_' + deviceInfo.model + '_' + deviceInfo.system + '_' + deviceInfo.platform,
|
|
|
+ appName: "音乐数字AI",
|
|
|
+ extParams: options.extParams || '',
|
|
|
+ clickTime: formatTime(new Date(), '-') // 点击时间
|
|
|
+ })
|
|
|
+ },
|
|
|
/** 最终提交 */
|
|
|
async onSubmit() {
|
|
|
try {
|
|
|
@@ -666,6 +680,23 @@ Page({
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ // 埋点
|
|
|
+ const openId = wx.getStorageSync("openId")
|
|
|
+ this.onTrackPoint({
|
|
|
+ openId,
|
|
|
+ elementName: '添加购买人',
|
|
|
+ extParams: JSON.stringify({
|
|
|
+ id: params.userBeneficiaryId || '',
|
|
|
+ phone: params.phone,
|
|
|
+ name: params.name,
|
|
|
+ gender: params.gender,
|
|
|
+ currentGradeNum: params.currentGradeNum,
|
|
|
+ currentClass: params.currentClass,
|
|
|
+ schoolAreaId: params.schoolAreaId,
|
|
|
+ defaultStatus: false
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
const pages = getCurrentPages();
|
|
|
const prevPage = pages[pages.length - 2]; // 获取上一个页面实例
|
|
|
if (params.userBeneficiaryId) {
|