Commit 341987ab by liimin

优化代码结构,当track为false时,不初始化埋点

1 parent d3c5a12c
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<span class="title">请选择登录商户号</span> <span class="title">请选择登录商户号</span>
<GLScroll class="login-merchants-scroll"> <GLScroll class="login-merchants-scroll">
<div class="item-wrap"> <div class="item-wrap">
<div class="merchant-item" v-for="merchant in merchants" :key="merchant.merchantId" @click.stop="loginChoose(merchant)"> <div class="merchant-item" v-for="merchant in merchants" :key="merchant.uuid || merchant.id" @click.stop="loginChoose(merchant)">
<i class="i i-dot"></i> <i class="i i-dot"></i>
<div class="merchant-info"> <div class="merchant-info">
<div class="merchant-item-name">{{ merchant.merchantName }}</div> <div class="merchant-item-name">{{ merchant.merchantName }}</div>
...@@ -212,11 +212,9 @@ export default { ...@@ -212,11 +212,9 @@ export default {
const { code, message, menus, sessionData } = await this.permission(Object.assign({ pw: md5(this.loginForm.password) }, merchant)) const { code, message, menus, sessionData } = await this.permission(Object.assign({ pw: md5(this.loginForm.password) }, merchant))
if (code == response.code_success_value) { if (code == response.code_success_value) {
const { defaultPath } = await this.login(menus) const { defaultPath } = await this.login(menus)
sessionData.defaultPath = defaultPath Object.assign(sessionData, { defaultPath, loginpath: location.pathname, track })
sessionData.loginpath = location.pathname
sessionData.track = track
this.setSession(sessionData) this.setSession(sessionData)
this.setTracker(sessionData) track && this.setTracker(sessionData)
this.storeConfig() this.storeConfig()
const path = helper.locationPath() const path = helper.locationPath()
const redirect = path?.get('redirect') const redirect = path?.get('redirect')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!