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
cf08618e
Commit
cf08618e
authored
Mar 29, 2021
by
程默
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'nativehome_tst' of
http://code.mayi888.com/chengmo/mayi-mp-shop
into nativehome_tst
parents
33765322
061aa819
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
73 additions
and
47 deletions
+73
-47
src/App.vue
+6
-0
src/pages/home/index.vue
+32
-17
static/nativeComponents/custom-tab-bar/index.js
+34
-30
static/nativeComponents/custom-tab-bar/index.wxml
+1
-0
No files found.
src/App.vue
View file @
cf08618e
...
...
@@ -3,6 +3,7 @@ import shop from "@/api/shop";
import
spokesman
from
"@/api/spokesman"
;
import
{
themeColor
,
checkShowConditionIds
}
from
"@/utils/mayi"
;
import
{
query_isEntry
}
from
"@/utils/mayi_fenxiao"
;
export
default
{
created
()
{
...
...
@@ -167,6 +168,11 @@ export default {
// 显示条件(未处理)
footerVal
.
componentData
.
list
=
footerVal
.
componentData
.
list
.
filter
(
item
=>
item
.
visible
==
undefined
||
item
.
visible
==
1
)
||
[];
footerVal
.
componentData
.
list
.
forEach
(
ele
=>
{
if
(
ele
.
link
.
name
==
"分销员中心"
||
ele
.
link
.
name
==
"分销商中心"
)
{
ele
.
show
=
false
;
}
})
this
.
mpApp
.
globalData
.
footerVal
=
footerVal
;
// app中异步数据回调 底部栏数据
if
(
mpApp
.
footerCallBack
)
{
...
...
src/pages/home/index.vue
View file @
cf08618e
...
...
@@ -233,23 +233,6 @@ export default {
getHomePageQuickAccess
().
then
(
res
=>
{
that
.
showMyCard
=
res
;
})
query_isEntry
().
then
((
data
)
=>
{
//分销弹框信息
app
.
globalData
.
applySucessEntry
=
data
;
console
.
log
(
app
.
globalData
.
applySucessEntry
,
1111112222222222
,
data
)
if
(
data
.
applyRemind
==
"true"
&&
data
.
displayEntry
==
"true"
)
{
that
.
applySucessEntry
=
true
}
else
if
(
data
.
applyRemindByDistributor
==
"true"
&&
data
.
displayEntryByDistributor
==
"true"
)
{
that
.
applySucessEntry
=
true
}
// that.applySucessEntry = res;
})
//获取分销信息
this
.
getSpokesmanInit
(
options
)
// 来源
...
...
@@ -317,6 +300,38 @@ export default {
wx
.
setNavigationBarTitle
({
title
:
app
.
globalData
.
shopInfo
.
shopName
})
wx
.
stopPullDownRefresh
()
query_isEntry
().
then
((
data
)
=>
{
//分销弹框信息
app
.
globalData
.
applySucessEntry
=
data
;
console
.
log
(
app
.
globalData
.
applySucessEntry
,
3333444
)
if
(
data
.
applyRemind
==
"true"
&&
data
.
displayEntry
==
"true"
)
{
this
.
applySucessEntry
=
true
;
}
else
if
(
data
.
applyRemindByDistributor
==
"true"
&&
data
.
displayEntryByDistributor
==
"true"
)
{
this
.
applySucessEntry
=
true
}
let
footerVal
=
{...
app
.
globalData
.
footerVal
};
footerVal
.
componentData
.
list
.
forEach
(
res
=>
{
if
(
res
.
link
.
name
==
"分销员中心"
&&
data
.
displayEntry
==
'true'
)
{
res
.
show
=
true
}
else
if
(
res
.
link
.
name
==
"分销员中心"
&&
data
.
displayEntry
==
'false'
)
{
res
.
show
=
false
}
else
if
(
res
.
link
.
name
==
"分销商中心"
&&
data
.
displayEntryByDistributor
==
'true'
)
{
res
.
show
=
true
}
else
if
(
res
.
link
.
name
==
"分销商中心"
&&
data
.
displayEntryByDistributor
==
'false'
)
{
res
.
show
=
false
}
})
app
.
globalData
.
footerVal
=
footerVal
;
this
.
$mp
.
page
.
selectComponent
(
".custom-tab-bar"
).
init
();
// that.applySucessEntry = res;
})
},
async
getSpokesmanInit
(
extConfig
)
{
//绑定上下级关系
...
...
static/nativeComponents/custom-tab-bar/index.js
View file @
cf08618e
...
...
@@ -38,40 +38,44 @@ Component({
});
},
attached
()
{
let
that
=
this
;
if
(
app
.
globalData
.
footerVal
)
{
let
mm
=
Math
.
ceil
(
app
.
globalData
.
footerVal
.
componentData
.
list
.
length
/
2
-
1
)
==
that
.
data
.
selected
&&
app
.
globalData
.
footerVal
.
componentData
[
"styleSelectionNum"
]
==
1
;
this
.
init
()
},
methods
:
{
init
()
{
let
that
=
this
;
if
(
app
.
globalData
.
footerVal
)
{
let
mm
=
Math
.
ceil
(
app
.
globalData
.
footerVal
.
componentData
.
list
.
length
/
2
-
1
)
==
that
.
data
.
selected
&&
app
.
globalData
.
footerVal
.
componentData
[
"styleSelectionNum"
]
==
1
;
that
.
setData
({
componentData
:
app
.
globalData
.
footerVal
.
componentData
,
list
:
app
.
globalData
.
footerVal
.
componentData
.
list
,
mm
:
mm
});
}
else
{
app
.
footerCallBack
=
function
(
params
)
{
params
.
componentData
.
selectIconColor
=
app
.
globalData
.
footerVal
.
componentData
.
selectIconBackground
==
1
?
'val(--main-color)'
:
params
.
componentData
.
selectIconColor
that
.
setData
({
componentData
:
params
.
componentData
,
list
:
params
.
componentData
.
list
// mm:(Math.ceil(params.componentData.list.length/2-1)==that.data.selected&¶ms.componentData['styleSelectionNum']==1)
componentData
:
app
.
globalData
.
footerVal
.
componentData
,
list
:
app
.
globalData
.
footerVal
.
componentData
.
list
,
mm
:
mm
});
console
.
log
(
this
.
data
.
list
,
1111111132333
)
}
else
{
app
.
footerCallBack
=
function
(
params
)
{
params
.
componentData
.
selectIconColor
=
app
.
globalData
.
footerVal
.
componentData
.
selectIconBackground
==
1
?
'val(--main-color)'
:
params
.
componentData
.
selectIconColor
that
.
setData
({
componentData
:
params
.
componentData
,
list
:
params
.
componentData
.
list
// mm:(Math.ceil(params.componentData.list.length/2-1)==that.data.selected&¶ms.componentData['styleSelectionNum']==1)
});
let
mm
=
Math
.
ceil
(
params
.
componentData
.
list
.
length
/
2
-
1
)
==
that
.
data
.
selected
&&
params
.
componentData
[
"styleSelectionNum"
]
==
1
;
};
}
this
.
setData
({
mm
:
Math
.
ceil
(
this
.
data
.
list
.
length
/
2
-
1
)
==
this
.
data
.
selected
&&
this
.
data
.
componentData
[
"styleSelectionNum"
]
==
1
});
},
methods
:
{
let
mm
=
Math
.
ceil
(
params
.
componentData
.
list
.
length
/
2
-
1
)
==
that
.
data
.
selected
&&
params
.
componentData
[
"styleSelectionNum"
]
==
1
;
};
}
this
.
setData
({
mm
:
Math
.
ceil
(
this
.
data
.
list
.
length
/
2
-
1
)
==
this
.
data
.
selected
&&
this
.
data
.
componentData
[
"styleSelectionNum"
]
==
1
});
},
switchTab
(
e
)
{
const
{
index
}
=
e
.
currentTarget
.
dataset
;
app
.
$themeToLink
(
this
.
data
.
list
[
index
][
"link"
],
1
);
...
...
static/nativeComponents/custom-tab-bar/index.wxml
View file @
cf08618e
...
...
@@ -6,6 +6,7 @@
<view class="tab-bar-border"></view>
<view
wx:for="{{list}}"
wx:if="{{item.show}}"
wx:key="index"
class="tab-bar-item {{(mmm==index&&componentData['styleSelectionNum']==1)?'isItem':''}}"
data-path="{{item.link}}"
...
...
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