Commit 0d2f4deb authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 9183be10
......@@ -63,13 +63,7 @@
var that = this;
var obj = tt.getLaunchOptionsSync()
var channel = 'mints' // 渠道
var clueToken = '' // 归因参数
var adId = '' // 计划id
var advertiserId = '' // 账号id
var reqId = '' // 请求id
var promotionId = '' // aid
var projectId = '';
var channel = 'douyin' // 渠道
var tips2 = ''; // 投放测试标记
var product_type = ''; //自有产品
var zs_channel = ''; // 自有渠道
......@@ -80,67 +74,14 @@
var remark1 = ''; // 预留
var remark2 = ''; // 预留
var remark3 = ''; // 预留
var mid1 = "";
var mid2 = "";
var mid3 = "";
var mid4 = "";
var mid5 = "";
var thirdParam = "";
var album_id = "";
var episode_id = "";
zs_os = wx.getSystemInfoSync().platform;
// 判断渠道来源
if (obj.query.clue_token ?? '' != '') {
// 头条渠道参数
channel = 'tt'
clueToken = obj.query.clue_token ?? ''
adId = obj.query.ad_id ?? ''
advertiserId = obj.query.advertiser_id ?? ''
reqId = obj.query.req_id ?? ''
promotionId = obj.query.promotion_id ?? ''
projectId = obj.query.project_id ?? ''
tips2 = obj.query.tips2 ?? ''
product_type = obj.query.product_type ?? ''
zs_channel = obj.query.zs_channel ?? ''
vedio_id = obj.query.vedio_id ?? ''
free_index = obj.query.free_index ?? ''
remark1 = obj.query.remark1 ?? ''
remark2 = obj.query.remark2 ?? ''
remark3 = obj.query.remark3 ?? ''
vedio_index = obj.query.vedio_index ?? ''
mid1 = obj.query.mid1 ?? ''
mid2 = obj.query.mid2 ?? ''
mid3 = obj.query.mid3 ?? ''
mid4 = obj.query.mid4 ?? ''
mid5 = obj.query.mid5 ?? ''
} else if (obj.query.ksChannel ?? '' != '') {
// 快手渠道参数
channel = 'kuaishou'
adId = obj.query.ksUnitId ?? '' //组id
advertiserId = obj.query.ksSiteAccountId ?? '' //账户id
clueToken = obj.query.callback ?? '' //快手归因参数
reqId = obj.query.ksCampaignId ?? '' //计划id
promotionId = obj.query.ksPageId ?? '' //落地页id
tips2 = obj.query.tips2 ?? ''
projectId = obj.query.ksCreativeId ?? '' //创意id
product_type = obj.query.product_type ?? ''
zs_channel = obj.query.zs_channel ?? ''
vedio_id = obj.query.vedio_id ?? ''
remark1 = obj.query.remark1 ?? ''
remark2 = obj.query.remark2 ?? ''
remark3 = obj.query.remark3 ?? ''
vedio_index = obj.query.vedio_index ?? ''
free_index = obj.query.free_index ?? ''
} else {
// 自有渠道
}
thirdParam = JSON.stringify(obj.query);
album_id = obj.query.tt_album_id ?? ''
episode_id = obj.query.tt_episode_id ?? ''
var album_id = obj.query.tt_album_id ?? '';
var episode_id = obj.query.tt_episode_id ?? '';
uni.setStorage({
key: 'tt_album_id',
data: album_id
......@@ -148,9 +89,29 @@
uni.setStorage({
key: 'tt_episode_id',
data: episode_id
});
});
zs_os = wx.getSystemInfoSync().platform;
tips2 = obj.query.tips2 ?? ''
product_type = obj.query.product_type ?? ''
zs_channel = obj.query.zs_channel ?? ''
vedio_id = obj.query.vedio_id ?? ''
free_index = obj.query.free_index ?? ''
remark1 = obj.query.remark1 ?? ''
remark2 = obj.query.remark2 ?? ''
remark3 = obj.query.remark3 ?? ''
vedio_index = obj.query.vedio_index ?? ''
mid1 = obj.query.mid1 ?? ''
mid2 = obj.query.mid2 ?? ''
mid3 = obj.query.mid3 ?? ''
mid4 = obj.query.mid4 ?? ''
mid5 = obj.query.mid5 ?? ''
// 抖音feed页参数
thirdParam = JSON.stringify(obj.query);
// 打印渠道参数
if (this.tips1 == 'mints_vedio' || tips2 == 'mints_vedio') {
this.slotParam = JSON.stringify(obj.query);
......@@ -166,14 +127,8 @@
url: '/user/ttLogin',
data: {
channel: channel,
clueToken: clueToken,
code: res.code,
anonymousCode: res.anonymousCode,
adId: adId,
advertiserId: advertiserId,
reqId: reqId,
promotionId: promotionId,
projectId: projectId,
productType: product_type,
vedioId: vedio_id,
remark1: remark1,
......@@ -186,7 +141,7 @@
mid2: mid2,
mid3: mid3,
mid4: mid4,
mid5: mid5,
mid5: mid5,
thirdParam: thirdParam,
zsChannel: zs_channel
},
......
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