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
0491deda
Commit
0491deda
authored
Aug 13, 2024
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat: 优化绑定导购、门店
parent
8638651d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
9 deletions
+13
-9
src/api/index.js
+1
-0
src/api/shop.js
+0
-7
src/main.js
+7
-1
src/pages/home/index.vue
+5
-1
No files found.
src/api/index.js
View file @
0491deda
...
...
@@ -92,6 +92,7 @@ console.log(process.env,'-----------------config------')
uploadFile
(
data
)
{
return
requestPOST
(
`
${
process
.
env
.
OLSHOP_URL
}
/common/uploadFile`
,
data
)
},
// 商城二维码分配组织或跟进人
allocation
(
data
)
{
return
requestPOST
(
`
${
process
.
env
.
OLSHOP_URL
}
/user/allocation`
,
data
)
},
...
...
src/api/shop.js
View file @
0491deda
...
...
@@ -101,11 +101,4 @@ export default {
data
);
},
// 商城二维码分配组织或跟进人
ShopCodeDistributionOrg
(
data
)
{
return
requestPOST
(
`
${
process
.
env
.
OLSHOP_URL
}
/user/allocation`
,
data
);
},
};
src/main.js
View file @
0491deda
...
...
@@ -197,7 +197,7 @@ let viewPageList = []; // 两个参数 上一个页面、当前页面
* 全局页面切换监听
*/
wx
.
onAppRoute
(
res
=>
{
console
.
log
(
res
,
'--res'
)
console
.
log
(
'onAppRoute->'
,
res
);
let
whetherToForceLogin
=
mpApp
.
globalData
.
shopInfo
&&
mpApp
.
globalData
.
shopInfo
.
whetherToForceLogin
||
0
log
.
info
(
"wx.onAppRoute"
,
res
,
mpApp
.
globalData
.
shopInfo
,
whetherToForceLogin
,
wx
.
getStorageSync
(
'sessionid'
),
res
.
path
!=
"pages/login/main"
);
console
.
log
(
res
,
mpApp
.
globalData
.
shopInfo
,
whetherToForceLogin
,
wx
.
getStorageSync
(
'sessionid'
),
res
.
path
!=
"pages/login/main"
,
'---------wx.onAppRoute'
)
...
...
@@ -257,6 +257,12 @@ wx.onAppRoute(res => {
mpBehavior
.
trackPageView
(
trackPageViewQuery
);
trackPageLeave
(
res
);
})
// 加绑定关系
if
(
wx
.
getStorageSync
(
'sessionid'
))
{
indexApi
.
allocation
({
isCover
:
false
,
});
}
})
/**
* 页面访问时长埋点
...
...
src/pages/home/index.vue
View file @
0491deda
...
...
@@ -617,6 +617,10 @@ export default {
console
.
log
(
"refreshInit--------2"
)
this
.
refreshInit
();
wx
.
removeStorageSync
(
"firstView"
);
// 重新进店移除导购相关参数
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'
)
...
...
@@ -1282,7 +1286,7 @@ export default {
ShopCodeDistributionOrg
()
{
let
setGuideEmployeeId
=
wx
.
getStorageSync
(
this
.
$store
.
state
.
mixid
+
'setGuideEmployeeId'
);
if
(
setGuideEmployeeId
)
{
shop
.
ShopCodeDistributionOrg
({
indexApi
.
allocation
({
isCover
:
false
,
employeeId
:
setGuideEmployeeId
});
...
...
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