Authored by htoooth

fix unity_type

... ... @@ -52,8 +52,8 @@ App({
}
this.globalData.systemInfo = sysInfo;
if (options && options.query && options.query.unionType) {
this.updateUnionType(options.query.unionType);
if (options && options.query && options.query.union_type) {
this.updateUnionType(options.query.union_type);
}
let timestamp = new Date().getTime() + '';
... ... @@ -259,7 +259,7 @@ App({
let timeS = new Date().getTime() + '';
this.globalData.unionType = unionType;
this.globalData.union_type = unionType;
this.globalData.unionTypeTime = timeS;
wx.setStorage({
key: 'unionTypeTime',
... ... @@ -278,7 +278,7 @@ App({
* 时效7天
*/
try {
let value = this.checkUnionType(this.globalData.unionType, this.globalData.unionTypeTime);
let value = this.checkUnionType(this.globalData.union_type, this.globalData.unionTypeTime);
if (!value) {
let unionType = wx.getStorageSync('unionType');
... ...
... ... @@ -15,7 +15,7 @@ export default class yas {
res: '', // 屏幕大小
osv: '', // 系统版本
ak: 'yoholimit_mp',
ch: this.app.globalData.unionType,
ch: this.app.globalData.union_type,
udid: this.app.globalData.udid
};
... ...
... ... @@ -156,12 +156,6 @@ Page(Object.assign({
});
yas = new Yas(app); // 实例化埋点
// 必须这样做
let route = 'pages/product/detail/detail';
yas.pageOpenReport(null, {
PAGE_PATH: query.unionType ? `${route}?union_type=${query.unionType}` : route
});
this.initActionSheet();
... ... @@ -194,8 +188,8 @@ Page(Object.assign({
let originUid = parseInt(json.originUid ? json.originUid : '0', 10);
let originUnionID = json.originUnionID ? json.originUnionID : '';
if (json.unionType) {
app.updateUnionType(json.unionType);
if (json.union_type) {
app.updateUnionType(json.union_type);
}
this.setData({
... ... @@ -260,7 +254,7 @@ Page(Object.assign({
return {
title: params.TITLE, // 分享标题
desc: params.DESC, // 分享描述
path: `/pages/product/detail/detail?limitProductCode=${this.data.limitProductCode}&originUid=${app.getUid()}&originUnionID=${app.getUnionID()}&unionType=${app.getUserUnionType()}`,
path: `/pages/product/detail/detail?limitProductCode=${this.data.limitProductCode}&originUid=${app.getUid()}&originUnionID=${app.getUnionID()}&union_type=${app.getUserUnionType()}`,
imageUrl: this.data.snapData.default_image,
success: function() {},
fail: function() {}
... ... @@ -364,7 +358,7 @@ Page(Object.assign({
originUid: app.getUid(),
limitProductCode: this.data.limitProductCode,
originUnionID: app.getUnionID(),
unionType: app.getUserUnionType()
union_type: app.getUserUnionType()
};
let product_qrCode = config.domains.api + `/wechat/miniapp/img-check.jpg?param=${JSON.stringify(params)}&miniapp_type=4&miniQrType=11`; // eslint-disable-line
... ...
... ... @@ -61,8 +61,7 @@ Page(Object.assign({
product_name: '',
product_qrCode: '',
product_skn: '',
limitProductCode: 0,
unionType: 0
limitProductCode: 0
},
test_uid: [349709, // 测试用
500030924,
... ... @@ -284,7 +283,7 @@ Page(Object.assign({
let path = `/pages/product/detail/detail?limitProductCode=${this.data.shareInfo.limitProductCode}`;
if (this.data.userInfo.isDrawline) {
path = `/pages/product/detail/detail?limitProductCode=${this.data.shareInfo.limitProductCode}&originUid=${app.getUid()}&originUnionID=${app.getUnionID()}&unionType=${app.getUserUnionType()}`; // eslint-disable-line
path = `/pages/product/detail/detail?limitProductCode=${this.data.shareInfo.limitProductCode}&originUid=${app.getUid()}&originUnionID=${app.getUnionID()}&union_type=${app.getUserUnionType()}`; // eslint-disable-line
}
let params = {
FROM: res.from,
... ...
... ... @@ -37,8 +37,7 @@ Page(Object.assign({
product_name: '',
product_qrCode: '',
product_skn: '',
limitProductCode: '',
unionType: ''
limitProductCode: ''
},
bgStyle: [ // 排队图片
'../../static/images/limit/queue_bg_1.png',
... ... @@ -192,7 +191,7 @@ Page(Object.assign({
SHARE_RESUIL: 0,
TITLE: decodeURIComponent(this.data.shareInfo.product_name),
DESC: '我在有货限定频道发现一个不错的商品赶快来看看吧!',
PATH: `/pages/product/detail/detail?limitProductCode=${this.data.shareInfo.limitProductCode}&originUid=${app.getUid()}&originUnionID=${app.getUnionID()}&unionType=${app.getUserUnionType()}`, // eslint-disable-line
PATH: `/pages/product/detail/detail?limitProductCode=${this.data.shareInfo.limitProductCode}&originUid=${app.getUid()}&originUnionID=${app.getUnionID()}&union_type=${app.getUserUnionType()}`, // eslint-disable-line
IMG: decodeURIComponent(this.data.shareInfo.default_image)
};
... ...
... ... @@ -74,7 +74,7 @@
"id": 5,
"name": "情详页-好友助力",
"pathName": "pages/product/detail/detail",
"query": "limitProductCode=2018062815591248&unionType=10007",
"query": "limitProductCode=2018062815591248&union_type=10007",
"scene": "1037",
"referrerInfo": {
"appId": "wx084ab813d88c594b",
... ... @@ -96,7 +96,7 @@
"id": 7,
"name": "分享卡片进入小程序-好友助力-被分享者进入",
"pathName": "pages/product/detail/detail",
"query": "limitProductCode=2018062815591248&originUid=15075136&unionType=108472",
"query": "limitProductCode=2018062815591248&originUid=15075136&union_type=108472",
"scene": "1037",
"referrerInfo": {
"appId": "wx084ab813d88c594b",
... ...