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
6dc65aaf
Commit
6dc65aaf
authored
Feb 25, 2021
by
程默
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix test
parent
b7d442ce
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
src/App.vue
+1
-0
src/utils/mayi.js
+14
-12
No files found.
src/App.vue
View file @
6dc65aaf
...
...
@@ -11,6 +11,7 @@ export default {
process
.
env
.
NODE_ENV
==
"development"
||
JSON
.
stringify
(
extConfig
)
==
"{}"
)
{
// extConfig = { mixid: "jordan", shopid: 471 };
extConfig
=
{
mixid
:
"antgood"
,
shopid
:
67
};
}
console
.
log
(
"1444444444"
,
extConfig
.
mixid
);
...
...
src/utils/mayi.js
View file @
6dc65aaf
import
cart
from
"@/api/cart"
// 登录白名单 name
export
const
noLoginList
=
[
"index"
,
"media-video"
,
"goods-goodsInfo"
,
"goods-commodityMenu"
,
"goodsSearch-goodsSearch"
,
"chooseStores"
,
"activty-receivingGift"
,
"activty"
,
"login-register"
,
"login-phoneLogin"
,
"login-authInformation"
,
"login-forgetPassWord"
,
"login-accountLogin"
,
"login-wxRegister"
,
"pay-payList"
,
"comment-evaluateList"
,
"goods-commonProblemList"
,
"article-articlePage"
,
"article-articleList"
,
"goods-posters"
,
"liveBroadcast"
,
"liveBroadcast-list"
,
"personalCenter-coupon-getCoupon"
,
"buyerShow-showDetail"
,
"goods-addGoodsList"
,
"personalCenter-CDkey-exchange"
,
"giftCards-linkReceive"
,
"giftCoupon-preview"
,
"smartForm"
,
"shopCart-shareShopCart"
,
"groupBuying-beInvite"
,
"brandTopics"
,
'personalCenter-spokesmanCenter'
,
'personalCenter-spokesmanCenter-mine-spokesmanHomePage'
,
'liveBroadcast-lived'
,
'personalCenter-spokesmanCenter-mine-getBusinessCard'
,
'changeAdr'
];
// path
export
const
noLoginListPath
=
noLoginList
.
map
(
item
=>
item
.
replace
(
/-/g
,
'/'
))
// 主题色
export
let
themeColor
=
{
"--main-color"
:
"#ffffff"
,
...
...
@@ -19,6 +25,14 @@ export function $themeToLink(data, option) {
// 点击底部栏
if
(
option
)
{
let
parseLink
=
getUrlofLink
(
data
);
let
aa
=
noLoginListPath
.
includes
(
parseLink
.
substr
(
1
))
console
.
log
(
parseLink
,
aa
,
'parseLinkparseLinkparseLink'
,
parseLink
.
substr
(
1
),
noLoginListPath
)
if
(
!
aa
&&
!
wx
.
getStorageSync
(
"sessionid"
))
{
let
url
=
`/pages/login/main?back=
${
parseLink
}
`
;
wx
.
navigateTo
({
url
});
return
}
let
isTabbarIndex
=
checkTabbarPage
(
parseLink
);
// 替换首页位置
isTabbarIndex
=
isTabbarIndex
==
0
?
checkTabbarPage
(
'/'
)
:
isTabbarIndex
...
...
@@ -37,18 +51,6 @@ export function $themeToLink(data, option) {
}
return
}
// 底部导航跳转
// let parseLink=getUrlofLink(data)
// let isTabbarIndex =checkTabbarPage(parseLink )
// if (isTabbarIndex>-1) {
// wx.switchTab({
// url: parseLink == '/' ? '/pages/home/main' : `/pages/tabBar${isTabbarIndex}/main`,
// })
// return
// }
// -----------------
if
(
type
==
0
)
{
//无链接
return
...
...
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