ソースを参照

修改整体pv统计位置

guessPrice
suizhijia 5年前
コミット
86bf67de12
2個のファイルの変更11行の追加7行の削除
  1. +11
    -2
      496_dongfengqichen/app.js
  2. +0
    -5
      496_dongfengqichen/pages/index/index.js

+ 11
- 2
496_dongfengqichen/app.js ファイルの表示

//app.js //app.js
App({ App({
onLaunch: function () {
onLaunch: function (options) {
console.log(options);
if (options.query && options.query.scene) {
var source = decodeURIComponent(options.query.scene).split("=");
this.globalData.sceneSource = source[1];
}else{
this.globalData.sceneSource = options.scene
}
// 展示本地存储能力 // 展示本地存储能力
var openid = wx.getStorageSync('openid') || ""; var openid = wx.getStorageSync('openid') || "";
if (!openid) { if (!openid) {
this.wxLogin(); this.wxLogin();
} else { } else {
this.globalData.openid = openid; this.globalData.openid = openid;
this.addAppEnter();
this.getBuyState(); this.getBuyState();
} }
var entered = wx.getStorageSync('entered'); var entered = wx.getStorageSync('entered');
entered:false, entered:false,
authenticationStatus:null, authenticationStatus:null,
skipType:null, skipType:null,
sceneSource:'0',
sceneSource:'',
addPageEnterState:{ addPageEnterState:{
index:false, index:false,
luckyStar:false, luckyStar:false,
if (!userInfoData) { if (!userInfoData) {
this.getUserInfo(); this.getUserInfo();
} }
this.addAppEnter();
this.getBuyState(); this.getBuyState();
} else { } else {
wx.showToast({ wx.showToast({

+ 0
- 5
496_dongfengqichen/pages/index/index.js ファイルの表示

onLoad: function (options) { onLoad: function (options) {
if (app.globalData.isFirstLogin) { if (app.globalData.isFirstLogin) {
console.log("第一次进入"); console.log("第一次进入");
if (options.scene) {
var source = decodeURIComponent(options.scene).split("=");
app.globalData.sceneSource = source[1];
}
app.addAppEnter();
wx.reportAnalytics('event_source_launch', { wx.reportAnalytics('event_source_launch', {
source: options.source ? options.source :0 source: options.source ? options.source :0
}); });

読み込み中…
キャンセル
保存