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
033b5557
Commit
033b5557
authored
Apr 01, 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
9d2024a7
291b6430
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
118 additions
and
48 deletions
+118
-48
src/components/bottomCont.vue
+83
-0
src/components/content/information/index.vue
+5
-5
src/components/tabbarPage.vue
+5
-0
src/pages/home/index.vue
+3
-1
src/pages/index/index.vue
+6
-11
static/nativeComponents/SharePopup/index.js
+0
-2
static/nativeComponents/TimeLimitedDiscount/activityListItem/index.wxml
+1
-1
static/nativeComponents/TimeLimitedDiscount/index.js
+1
-1
static/nativeComponents/custom-tab-bar/index.js
+11
-25
static/nativeComponents/custom-tab-bar/index.json
+3
-1
static/nativeComponents/custom-tab-bar/index.wxml
+0
-1
No files found.
src/components/bottomCont.vue
View file @
033b5557
...
...
@@ -19,6 +19,10 @@
>
{{
this
.
$store
.
state
.
sceneModule
.
songCopyright
.
some
(
item
=>
item
==
shopInfo
.
shopCode
)?
'送颂科技提供技术支持'
:
'小工蚁(上股交N板企业300258)提供平台服务'
}}
</p>
-->
</div>
<div
class=
"height7"
></div>
<div
class=
"hide-wrap"
v-if=
"showHideWrap"
@
click=
"showActionSheet"
>
<i
class=
"ant-fenlei-line"
style=
"font-size:22px"
></i>
</div>
</div>
</
template
>
...
...
@@ -30,18 +34,82 @@ export default {
shopInfo
:
{
logoUrl
:
''
},
showVConsole
:
0
,
showHideWrap
:
false
,
};
},
created
(){
this
.
shopInfo
=
this
.
mpApp
.
globalData
.
shopInfo
this
.
shopInfo
.
logoUrl
=
DFSImg
(
this
.
shopInfo
.
logoUrl
,
400
,
400
)
console
.
log
(
this
.
shopInfo
,
'mpapp123'
)
if
(
wx
.
getStorageSync
(
'workBox'
)){
this
.
showHideWrap
=
true
}
},
onLoad
()
{
},
onShow
(){
},
methods
:{
showVConsoles
(){
this
.
showVConsole
++
;
if
(
this
.
showVConsole
>=
10
)
{
this
.
showVConsole
=
0
;
wx
.
setStorageSync
(
'workBox'
,
'1'
)
this
.
showHideWrap
=
true
}
},
showActionSheet
(){
let
vm
=
this
wx
.
showActionSheet
({
itemList
:
[
'复制页面路径'
,
'隐藏工具箱'
],
success
(
res
)
{
console
.
log
(
res
.
tapIndex
)
if
(
res
.
tapIndex
==
0
){
vm
.
copyUrl
()
}
else
if
(
res
.
tapIndex
==
1
){
vm
.
hideUtils
()
}
},
fail
(
res
)
{
console
.
log
(
res
.
errMsg
)
}
})
},
copyUrl
(){
let
pages
=
getCurrentPages
()
let
currentPage
=
pages
[
pages
.
length
-
1
]
let
route
=
currentPage
.
route
let
options
=
currentPage
.
options
console
.
log
(
route
,
options
,
'currentPage'
)
let
query
=
''
for
(
let
attr
in
options
){
query
=
attr
+
'='
+
options
[
attr
]
+
'&'
}
let
href
=
'/'
+
route
if
(
query
){
href
+=
'?'
+
query
}
console
.
log
(
query
)
wx
.
setClipboardData
({
data
:
href
,
success
(
res
)
{
}
})
},
hideUtils
(){
this
.
showHideWrap
=
false
wx
.
removeStorageSync
(
'workBox'
,
'1'
)
}
}
}
</
script
>
...
...
@@ -84,4 +152,19 @@ export default {
height
:
50px
;
}
}
.hide-wrap
{
width
:
40px
!important
;
height
:
40px
;
border-radius
:
50%
;
background-color
:
white
;
position
:
fixed
;
bottom
:
100px
;
right
:
20px
;
z-index
:
999
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
box-shadow
:
rgba
(
0
,
0
,
0
,
0.5
)
0px
0px
5px
;
font-size
:
20px
;
}
</
style
>
src/components/content/information/index.vue
View file @
033b5557
...
...
@@ -339,15 +339,15 @@ export default {
if
(
val
==
1
)
{
// 分类
query
=
{
c
ategor
yName
:
this
.
classifName
,
c
lassif
yName
:
this
.
classifName
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
6
,
articleStatus
:
1
,
};
if
(
query
.
c
ategor
yName
==
""
||
query
.
c
ategor
yName
==
null
||
query
.
c
ategor
yName
==
"null"
query
.
c
lassif
yName
==
""
||
query
.
c
lassif
yName
==
null
||
query
.
c
lassif
yName
==
"null"
)
{
this
.
initQuery
();
if
(
!
this
.
render
)
{
...
...
src/components/tabbarPage.vue
View file @
033b5557
...
...
@@ -50,9 +50,14 @@ export default {
onLoad
(
options
)
{
let
ss
=
wx
.
getStorageSync
(
"sessionid"
);
this
.
ss
=
ss
?
`&sessionid=
${
ss
}
`
:
""
;
if
(
!
ss
)
{
this
.
params
+=
this
.
params
.
includes
(
"logOut"
)
?
""
:
"&logOut=true"
;
}
if
(
wx
.
getStorageSync
(
"workBox"
)){
this
.
params
+=
`&workBox=
${
wx
.
getStorageSync
(
"workBox"
)}
`
}
// tabbar 跳转
let
homeIndex
=
checkTabbarPage
(
"/"
);
homeIndex
!=
0
&&
homeIndex
==
this
.
index
&&
(
this
.
index
=
0
);
...
...
src/pages/home/index.vue
View file @
033b5557
...
...
@@ -105,7 +105,6 @@
<apply-sucess-entry></apply-sucess-entry>
</div>
<!-- 底部栏 -->
{{
active
}}
<custom-tab-bar
class=
"custom-tab-bar"
:selected=
"active"
></custom-tab-bar>
</div>
</
template
>
...
...
@@ -238,6 +237,8 @@ export default {
this
.
getSpokesmanInit
(
options
)
}
else
{
let
footerVal
=
{...
app
.
globalData
.
footerVal
};
console
.
log
(
'"分销员中心"'
,
footerVal
)
if
(
footerVal
.
componentData
)
{
footerVal
.
componentData
.
list
.
forEach
(
res
=>
{
if
(
res
.
link
.
name
==
"分销员中心"
||
res
.
link
.
name
==
"分销商中心"
)
{
res
.
show
=
false
...
...
@@ -246,6 +247,7 @@ export default {
app
.
globalData
.
footerVal
=
footerVal
;
this
.
$mp
.
page
.
selectComponent
(
".custom-tab-bar"
).
init
();
}
}
// 来源
if
(
options
.
from
==
"logout"
)
{
//来自用户登出
...
...
src/pages/index/index.vue
View file @
033b5557
...
...
@@ -77,8 +77,14 @@ export default {
},
onLoad
(
options
)
{
this
.
options
=
options
;
Object
.
assign
(
this
.
$data
,
this
.
$options
.
data
());
if
(
wx
.
getStorageSync
(
"workBox"
)){
this
.
params
+=
`&workBox=
${
wx
.
getStorageSync
(
"workBox"
)}
`
}
let
op
=
wx
.
getStorageSync
(
"openid"
)
if
(
op
)
{
this
.
params
+=
'&open_id='
+
wx
.
getStorageSync
(
"openid"
);
...
...
@@ -309,17 +315,6 @@ export default {
this
.
init
();
},
onShow
(){
let
ss
=
wx
.
getStorageSync
(
"sessionid"
);
if
(
ss
&&
!
this
.
params
.
includes
(
"sessionid"
))
{
this
.
params
+=
`&sessionid=
${
ss
}
`
}
console
.
log
(
this
.
getTabBar
,
'312'
)
if
(
typeof
this
.
getTabBar
===
'function'
&&
this
.
getTabBar
())
{
this
.
getTabBar
().
setData
({
selected
:
this
.
index
})
}
},
methods
:
{
init
()
{
...
...
static/nativeComponents/SharePopup/index.js
View file @
033b5557
...
...
@@ -59,12 +59,10 @@ const componentOptions = {
},
showPopup
()
{
this
.
setData
({
showPop
:
true
});
this
.
getTabBar
().
setData
({
show
:
false
});
},
onClose
()
{
this
.
setData
({
showPop
:
false
});
this
.
getTabBar
().
setData
({
show
:
true
});
},
cancel
()
{
this
.
onClose
();
...
...
static/nativeComponents/TimeLimitedDiscount/activityListItem/index.wxml
View file @
033b5557
...
...
@@ -4,7 +4,7 @@
{{datas.singleItemActivityName}}
</view>
<view class="cover">
<image
mode="center
" src="{{datas.singleItemActivityCoverImage}}"></image>
<image
mode="aspectFit
" src="{{datas.singleItemActivityCoverImage}}"></image>
</view>
<view class="countDown flex" wx:if="{{countDownShow}}">
<van-count-down
...
...
static/nativeComponents/TimeLimitedDiscount/index.js
View file @
033b5557
...
...
@@ -232,7 +232,7 @@ const componentOptions = {
new
Date
(
item
.
endTime
.
replace
(
/-/g
,
"/"
)).
getTime
()
-
new
Date
().
getTime
();
item
.
singleItemActivityCoverImage
=
DFSImg
(
item
.
singleItemActivityCoverImage
,
400
,
400
item
.
singleItemActivityCoverImage
,
400
,
400
,
1
);
item
.
isStart
=
new
Date
(
item
.
startTime
.
replace
(
/-/g
,
"/"
)).
getTime
()
>
...
...
static/nativeComponents/custom-tab-bar/index.js
View file @
033b5557
const
app
=
getApp
();
Component
({
properties
:{
selected
:{
type
:
Number
,
default
:
-
1
properties
:
{
selected
:
{
type
:
Number
,
default
:
-
1
}
},
data
:
{
// selected: -1,
color
:
"#7A7E83"
,
selectedColor
:
"#3cc51f"
,
list
:
[
...
...
@@ -32,10 +32,9 @@ Component({
});
};
}
this
.
setData
({
mmm
:
Math
.
ceil
(
app
.
globalData
.
footerVal
.
componentData
.
list
.
length
/
2
-
1
),
selected
:
this
.
data
.
active
});
// this.setData({
// mmm: Math.ceil(app.globalData.footerVal.componentData.list.length / 2 - 1)
// });
},
attached
()
{
this
.
init
()
...
...
@@ -54,16 +53,14 @@ Component({
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
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
&&
...
...
@@ -78,19 +75,8 @@ Component({
},
switchTab
(
e
)
{
const
{
index
}
=
e
.
currentTarget
.
dataset
;
if
(
index
==
this
.
data
.
selected
)
return
app
.
$themeToLink
(
this
.
data
.
list
[
index
][
"link"
],
1
);
},
toPage
(
data
,
index
)
{
// 跳转
if
(
data
.
link
==
"/"
)
{
wx
.
switchTab
({
url
:
"/pages/home/main"
});
}
else
{
wx
.
switchTab
({
url
:
`/pages/tabBar
${
index
}
/main`
});
}
}
}
});
static/nativeComponents/custom-tab-bar/index.json
View file @
033b5557
{
"component"
:
true
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
static/nativeComponents/custom-tab-bar/index.wxml
View file @
033b5557
...
...
@@ -13,7 +13,6 @@
data-index="{{index}}"
bindtap="switchTab"
>
<!-- {{index}}{{selected}}--{{Math.ceil(5/2-1)}}--{{mm}} -->
<!-- &&componentData['styleSelectionNum']==1 -->
<!-- 图标 -->
<view class="item {{index == selected ? 'current' : ''}}">
...
...
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