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
8e74d94a
Commit
8e74d94a
authored
Mar 02, 2024
by
侯体倬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导购字段统一,传参优化
parent
d1ec7fc9
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
13 deletions
+13
-13
src/components/tabbarPage.vue
+3
-3
src/pages/home/index.vue
+4
-0
src/pages/index/index.vue
+3
-7
src/utils/request.js
+3
-3
No files found.
src/components/tabbarPage.vue
View file @
8e74d94a
...
...
@@ -80,9 +80,9 @@ export default {
}
// 判断当前是否为导购分享
const
guideEmployeeId
=
wx
.
getStorageSync
(
this
.
$store
.
state
.
mixid
+
'g
uideEmployeeId'
);
if
(
g
uideEmployeeId
)
{
this
.
params
+=
`&setGuideEmployeeId=
${
g
uideEmployeeId
}
`
;
const
setGuideEmployeeId
=
wx
.
getStorageSync
(
this
.
$store
.
state
.
mixid
+
'setG
uideEmployeeId'
);
if
(
setG
uideEmployeeId
)
{
this
.
params
+=
`&setGuideEmployeeId=
${
setG
uideEmployeeId
}
`
;
}
// tabbar 跳转
let
homeIndex
=
checkTabbarPage
(
"/"
);
...
...
src/pages/home/index.vue
View file @
8e74d94a
...
...
@@ -454,6 +454,10 @@ export default {
offlineShopName
:
paramsObj
.
offlineShopName
,
});
}
// 判断是否为导购分享进入
if
(
paramsObj
.
setGuideEmployeeId
)
{
wx
.
setStorageSync
(
this
.
$store
.
state
.
mixid
+
'setGuideEmployeeId'
,
paramsObj
.
setGuideEmployeeId
);
}
this
.
showStoreAddr
=
true
;
wx
.
setStorageSync
(
'attractingCustomerChannelId'
,
sceneObj
.
attractingCustomerChannelId
);
wx
.
setStorageSync
(
this
.
$store
.
state
.
mixid
+
'storeId'
,
sceneObj
.
storeId
);
...
...
src/pages/index/index.vue
View file @
8e74d94a
...
...
@@ -84,9 +84,9 @@ export default {
this
.
params
+=
`&latitude=
${
latitude
}
&longitude=
${
longitude
}
`
}
// 判断当前是否为导购分享
const
guideEmployeeId
=
wx
.
getStorageSync
(
this
.
$store
.
state
.
mixid
+
'g
uideEmployeeId'
);
if
(
g
uideEmployeeId
)
{
this
.
params
+=
`&setGuideEmployeeId=
${
g
uideEmployeeId
}
`
;
const
setGuideEmployeeId
=
wx
.
getStorageSync
(
this
.
$store
.
state
.
mixid
+
'setG
uideEmployeeId'
);
if
(
setG
uideEmployeeId
)
{
this
.
params
+=
`&setGuideEmployeeId=
${
setG
uideEmployeeId
}
`
;
}
console
.
log
(
this
.
link
,
'======='
,
this
.
page
,
'++++++++++++++'
,
this
.
params
,
'************'
)
let
pageUrl1
=
(
this
.
page
.
startsWith
(
'http://'
)
||
this
.
page
.
startsWith
(
'https://'
))?
(
this
.
page
+
this
.
params
)
:
this
.
link
+
this
.
page
+
this
.
params
...
...
@@ -344,10 +344,6 @@ export default {
offlineShopName
:
paramsObj
.
offlineShopName
,
});
}
// 判断是否为导购分享进入
if
(
paramsObj
.
guideEmployeeId
)
{
wx
.
setStorageSync
(
this
.
$store
.
state
.
mixid
+
'guideEmployeeId'
,
paramsObj
.
guideEmployeeId
);
}
wx
.
setStorageSync
(
'attractingCustomerChannelId'
,
paramsObj
.
attractingCustomerChannelId
);
wx
.
setStorageSync
(
this
.
$store
.
state
.
mixid
+
'storeId'
,
paramsObj
.
storeId
);
wx
.
setStorageSync
(
this
.
$store
.
state
.
mixid
+
'sellerId'
,
paramsObj
.
sellerId
);
...
...
src/utils/request.js
View file @
8e74d94a
...
...
@@ -12,9 +12,9 @@ const getRequestHeader = (extraHeader = {}) => {
}
// 判断是否存在导购员 id
const
guideEmployeeId
=
wx
.
getStorageSync
(
store
.
state
.
mixid
+
'g
uideEmployeeId'
);
if
(
g
uideEmployeeId
)
{
BASE_HEADER
[
'Guide-Employee-Id'
]
=
g
uideEmployeeId
;
const
setGuideEmployeeId
=
wx
.
getStorageSync
(
store
.
state
.
mixid
+
'setG
uideEmployeeId'
);
if
(
setG
uideEmployeeId
)
{
BASE_HEADER
[
'Guide-Employee-Id'
]
=
setG
uideEmployeeId
;
}
return
Object
.
assign
(
BASE_HEADER
,
extraHeader
);
...
...
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