Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
bb5b7cee
Commit
bb5b7cee
authored
Aug 28, 2024
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat: 绑定导购优化
parent
73d5915b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
14 deletions
+15
-14
src/App.vue
+7
-0
src/main.js
+7
-6
src/pages/home/index.vue
+0
-5
src/pages/index/index.vue
+1
-3
No files found.
src/App.vue
View file @
bb5b7cee
...
...
@@ -366,6 +366,13 @@ export default {
});
}
// 加绑定关系
console
.
log
(
'main-allocation->'
)
if
(
wx
.
getStorageSync
(
'sessionid'
))
{
indexApi
.
allocation
({
isCover
:
false
,
});
}
}
})
.
catch
((
err
)
=>
{});
...
...
src/main.js
View file @
bb5b7cee
...
...
@@ -180,6 +180,13 @@ function getThemePage({ mixid, shopid, offlineShopCode }) {
mpApp
.
indexBgCallBack
(
data
)
}
}
// 加绑定关系
console
.
log
(
'main-allocation->'
)
if
(
wx
.
getStorageSync
(
'sessionid'
))
{
indexApi
.
allocation
({
isCover
:
false
,
});
}
}
})
.
catch
((
err
)
=>
{});
...
...
@@ -257,12 +264,6 @@ wx.onAppRoute(res => {
mpBehavior
.
trackPageView
(
trackPageViewQuery
);
trackPageLeave
(
res
);
})
// 加绑定关系
if
(
wx
.
getStorageSync
(
'sessionid'
))
{
indexApi
.
allocation
({
isCover
:
false
,
});
}
})
/**
* 页面访问时长埋点
...
...
src/pages/home/index.vue
View file @
bb5b7cee
...
...
@@ -425,7 +425,6 @@ export default {
// 每次切换门店都删除导购数据
wx
.
removeStorageSync
(
this
.
$store
.
state
.
mixid
+
'setGuideEmployeeId'
);
wx
.
removeStorageSync
(
this
.
$store
.
state
.
mixid
+
'guide_QRCodeType'
);
wx
.
removeStorageSync
(
this
.
$store
.
state
.
mixid
+
'temp_QRCodeType'
);
}
else
{
this
.
reloadPage
=
false
;
}
...
...
@@ -483,7 +482,6 @@ export default {
// 不是导购进入移除参数
wx
.
removeStorageSync
(
this
.
$store
.
state
.
mixid
+
'setGuideEmployeeId'
);
wx
.
removeStorageSync
(
this
.
$store
.
state
.
mixid
+
'guide_QRCodeType'
);
wx
.
removeStorageSync
(
this
.
$store
.
state
.
mixid
+
'temp_QRCodeType'
);
}
if
(
paramsObj
.
QRCodeType
)
{
wx
.
setStorageSync
(
this
.
$store
.
state
.
mixid
+
'guide_QRCodeType'
,
paramsObj
.
QRCodeType
);
...
...
@@ -529,7 +527,6 @@ export default {
// 每次退出登录都删除导购数据
wx
.
removeStorage
({
key
:
this
.
$store
.
state
.
mixid
+
'setGuideEmployeeId'
});
wx
.
removeStorage
({
key
:
this
.
$store
.
state
.
mixid
+
'guide_QRCodeType'
});
wx
.
removeStorage
({
key
:
this
.
$store
.
state
.
mixid
+
'temp_QRCodeType'
});
}
this
.
options
=
wx
.
getStorageSync
(
"becomeInfo"
);
this
.
changeLocation
=
options
.
changeLocation
||
''
...
...
@@ -564,7 +561,6 @@ export default {
// 每次退出登录都删除导购数据
wx
.
removeStorage
({
key
:
this
.
$store
.
state
.
mixid
+
'setGuideEmployeeId'
});
wx
.
removeStorage
({
key
:
this
.
$store
.
state
.
mixid
+
'guide_QRCodeType'
});
wx
.
removeStorage
({
key
:
this
.
$store
.
state
.
mixid
+
'temp_QRCodeType'
});
}
// 获取页面数据
if
(
this
.
mpApp
.
globalData
.
pageList
&&
!
this
.
reloadPage
)
{
...
...
@@ -620,7 +616,6 @@ export default {
// 重新进店移除导购相关参数
wx
.
removeStorage
({
key
:
this
.
$store
.
state
.
mixid
+
'setGuideEmployeeId'
});
wx
.
removeStorage
({
key
:
this
.
$store
.
state
.
mixid
+
'guide_QRCodeType'
});
wx
.
removeStorage
({
key
:
this
.
$store
.
state
.
mixid
+
'temp_QRCodeType'
});
return
;
};
console
.
log
(
'home-methods-reloadEnterShopRule'
)
...
...
src/pages/index/index.vue
View file @
bb5b7cee
...
...
@@ -336,7 +336,6 @@ export default {
// 每次退出登录都删除导购数据
wx
.
removeStorage
({
key
:
this
.
$store
.
state
.
mixid
+
'setGuideEmployeeId'
});
wx
.
removeStorage
({
key
:
this
.
$store
.
state
.
mixid
+
'guide_QRCodeType'
});
wx
.
removeStorage
({
key
:
this
.
$store
.
state
.
mixid
+
'temp_QRCodeType'
});
}
else
if
(
options
.
from
&&
options
.
from
==
"address"
)
{
log
.
info
(
'options.from == "address"'
)
// 来自小程序地址页面
...
...
@@ -382,7 +381,6 @@ export default {
// 非导购方式进入移除本地缓存
wx
.
removeStorageSync
(
this
.
$store
.
state
.
mixid
+
'setGuideEmployeeId'
);
wx
.
removeStorageSync
(
this
.
$store
.
state
.
mixid
+
'guide_QRCodeType'
);
wx
.
removeStorageSync
(
this
.
$store
.
state
.
mixid
+
'temp_QRCodeType'
);
}
wx
.
setStorageSync
(
'attractingCustomerChannelId'
,
paramsObj
.
attractingCustomerChannelId
);
wx
.
setStorageSync
(
this
.
$store
.
state
.
mixid
+
'storeId'
,
paramsObj
.
storeId
);
...
...
@@ -542,7 +540,7 @@ export default {
init
()
{
console
.
log
(
'index-init'
,
this
.
mpApp
.
globalData
.
pageList
);
if
(
!
this
.
mpApp
.
globalData
.
pageList
)
{
this
.
getThemePage
();
//
this.getThemePage();
}
// 获取小程序开启的订阅消息配置
shop
.
getWxMiniSubscribeMessageConfig
().
then
(
res
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment