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
98f4e4b4
Commit
98f4e4b4
authored
Mar 31, 2021
by
程智春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vConsole
parent
32f5173f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
94 additions
and
0 deletions
+94
-0
src/components/bottomCont.vue
+83
-0
src/components/tabbarPage.vue
+5
-0
src/pages/index/index.vue
+6
-0
No files found.
src/components/bottomCont.vue
View file @
98f4e4b4
...
...
@@ -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/tabbarPage.vue
View file @
98f4e4b4
...
...
@@ -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/index/index.vue
View file @
98f4e4b4
...
...
@@ -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"
);
...
...
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