Commit 553d04cf by 张卓

埋点导购员

parent fdcd6b7b
...@@ -136,6 +136,7 @@ import couponPopup from '@/components/couponPopup.vue' ...@@ -136,6 +136,7 @@ import couponPopup from '@/components/couponPopup.vue'
import NewUser from "../../components/newCustomer/newUser"; import NewUser from "../../components/newCustomer/newUser";
import NewPolite from "../../components/newCustomer/newPolite"; import NewPolite from "../../components/newCustomer/newPolite";
import { setTabBarActive, checkTabbarPage,themeColor } from "../../utils/mayi.js"; import { setTabBarActive, checkTabbarPage,themeColor } from "../../utils/mayi.js";
import indexApi from "@/api/index.js";
import { throttle, concatUrl } from "../../utils/index.js" import { throttle, concatUrl } from "../../utils/index.js"
const app = getApp(); const app = getApp();
...@@ -237,6 +238,38 @@ export default { ...@@ -237,6 +238,38 @@ export default {
data: JSON.stringify(options) data: JSON.stringify(options)
}); });
} }
if(options.scene){
//新二维码扫码进入
wx.nextTick(() => {
indexApi.getShareSceneRecord(options.scene).then(res=>{
if(res.data.code == '200'){
this.page = res.data.data.pageUri;
let paramsObj = JSON.parse(res.data.data.scene);
wx.setStorageSync('attractingCustomerChannelId',paramsObj.attractingCustomerChannelId);
wx.setStorageSync(this.$store.state.mixid+'storeId',paramsObj.storeId);
wx.setStorageSync(this.$store.state.mixid+'sellerId',paramsObj.sellerId);
console.log(res.data.data)
console.log(wx.getStorageSync("openid"))
console.log(333333)
if(wx.getStorageSync("openid")) {
indexApi.addRecord(
{
attractingCustomersChannelId: paramsObj.attractingCustomerChannelId,
miniOpenId: wx.getStorageSync("openid"),
registerFlag: 1,
newRegisterFlag: 0,
}
).then(ele=>{
//清空引客渠道id
wx.setStorageSync('attractingCustomerChannelId','');
})
}
}
}).catch((err)=>{
})
});
}
Object.assign(this.$data, this.$options.data()); Object.assign(this.$data, this.$options.data());
if (options.from && options.from == "logout") { if (options.from && options.from == "logout") {
//来自用户登出 //来自用户登出
......
...@@ -204,6 +204,7 @@ export default { ...@@ -204,6 +204,7 @@ export default {
let paramsObj = JSON.parse(res.data.data.scene); let paramsObj = JSON.parse(res.data.data.scene);
wx.setStorageSync('attractingCustomerChannelId',paramsObj.attractingCustomerChannelId); wx.setStorageSync('attractingCustomerChannelId',paramsObj.attractingCustomerChannelId);
wx.setStorageSync(this.$store.state.mixid+'storeId',paramsObj.storeId); wx.setStorageSync(this.$store.state.mixid+'storeId',paramsObj.storeId);
wx.setStorageSync(this.$store.state.mixid+'sellerId',paramsObj.sellerId);
console.log(res.data.data) console.log(res.data.data)
console.log(wx.getStorageSync("openid")) console.log(wx.getStorageSync("openid"))
console.log(333333) console.log(333333)
......
...@@ -402,6 +402,7 @@ export default { ...@@ -402,6 +402,7 @@ export default {
city: this.userInfo.city, city: this.userInfo.city,
otherPhone: 0, otherPhone: 0,
storeId: wx.getStorageSync(this.$store.state.mixid+'storeId') || '', storeId: wx.getStorageSync(this.$store.state.mixid+'storeId') || '',
sellerId: wx.getStorageSync(this.$store.state.mixid+'sellerId') || '',
articleId: wx.getStorageSync(this.$store.state.mixid+"articleId") || '', articleId: wx.getStorageSync(this.$store.state.mixid+"articleId") || '',
customerSourceType: wx.getStorageSync(this.$store.state.mixid+"articleId")?8:'', customerSourceType: wx.getStorageSync(this.$store.state.mixid+"articleId")?8:'',
customerSourceId: wx.getStorageSync(this.$store.state.mixid+"articleId") || '' customerSourceId: wx.getStorageSync(this.$store.state.mixid+"articleId") || ''
...@@ -469,6 +470,10 @@ export default { ...@@ -469,6 +470,10 @@ export default {
if(wx.getStorageSync(this.$store.state.mixid+'storeId')) { if(wx.getStorageSync(this.$store.state.mixid+'storeId')) {
query.storeId = wx.getStorageSync(this.$store.state.mixid+'storeId') query.storeId = wx.getStorageSync(this.$store.state.mixid+'storeId')
} }
//埋点导购员
if(wx.getStorageSync(this.$store.state.mixid+'sellerId')) {
query.sellerId = wx.getStorageSync(this.$store.state.mixid+'sellerId')
}
//绑定手机号 //绑定手机号
wx.navigateTo({ wx.navigateTo({
url: `../index/main?from=login&backpath=/login/wxRegister&params=${encodeURIComponent( url: `../index/main?from=login&backpath=/login/wxRegister&params=${encodeURIComponent(
......
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