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
9c5c33c3
Commit
9c5c33c3
authored
Mar 24, 2020
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自定义返回按钮
parent
5c5b4991
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
5 deletions
+29
-5
src/components/livedModel/livedControls.vue
+7
-0
src/pages/lived/index.vue
+10
-5
src/utils/index.js
+12
-0
No files found.
src/components/livedModel/livedControls.vue
View file @
9c5c33c3
...
...
@@ -116,6 +116,7 @@ export default {
imgAni
:
false
,
//给点赞元素加动画
getBottom
:
0
,
//动态绑定输入框位置
loadingShare
:
false
,
isClick
:
true
,
};
},
components
:
{
...
...
@@ -276,6 +277,11 @@ export default {
},
// 点击发送留言
toSend
()
{
if
(
this
.
isClick
){
this
.
isClick
=
false
;
setTimeout
(()
=>
{
this
.
isClick
=
true
;
},
300
);
console
.
log
(
"点击按钮-------------------200"
);
if
(
this
.
sendVal
==
""
)
{
this
.
getFocus
=
true
;
...
...
@@ -289,6 +295,7 @@ export default {
}
}
}
}
};
</
script
>
...
...
src/pages/lived/index.vue
View file @
9c5c33c3
...
...
@@ -7,7 +7,7 @@
<!-- 直播展示层 -->
<div
class=
"liveModel"
v-if=
"liveNoticeInfo.liveBroadcastState>-1"
>
<!-- 自定义返回按钮 -->
<div
class=
"customBack flex"
>
<div
class=
"customBack flex"
:style=
"
{'top':navTop*2+'rpx','height':(navHeight*2-2)+'rpx'}"
>
<div
class=
"backIcon"
>
<img
@
click=
"back"
...
...
@@ -73,7 +73,7 @@
</
template
>
<
script
type=
"text/ecmascript-6"
>
import
{
serialize
,
getQueryVariable
,
DFSImg
}
from
"@/utils/index"
;
import
{
serialize
,
getQueryVariable
,
DFSImg
,
getNavbarInfo
}
from
"@/utils/index"
;
import
live
from
"@/api/live"
;
import
notStarted
from
"@/components/livedModel/notStarted"
;
import
livedControls
from
"@/components/livedModel/livedControls"
;
...
...
@@ -109,7 +109,9 @@ export default {
params
:
{},
userId
:
""
,
hasInvitationStatus
:
0
,
// 邀请资格:0-不能够邀请下级,1-能够邀请下级
spokesmanObj
:
{}
//分销员信息
spokesmanObj
:
{},
//分销员信息
navTop
:
0
,
navHeight
:
0
,
};
},
components
:
{
...
...
@@ -118,8 +120,12 @@ export default {
livedIsEnded
},
computed
:
{},
created
()
{},
onLoad
(
options
)
{
getNavbarInfo
(
res
=>
{
console
.
log
(
res
,
'--------------------125'
)
this
.
navTop
=
res
.
navTop
this
.
navHeight
=
res
.
navHeight
});
wx
.
getNetworkType
({
success
:
function
(
res
)
{
if
(
res
.
networkType
!=
"wifi"
)
{
...
...
@@ -497,7 +503,6 @@ img {
z-index
:
1
;
.customBack
{
position
:
absolute
;
top
:
30px
;
left
:
12px
;
width
:
70%
;
z-index
:
2
;
...
...
src/utils/index.js
View file @
9c5c33c3
...
...
@@ -77,3 +77,15 @@ export function DFSImg(path, w, h) { //
return
baseImg
[
Math
.
floor
(
Math
.
random
()
*
100
)
%
baseImg
.
length
]
+
path
;
}
}
// 获取Navbar高度
export
function
getNavbarInfo
(
fn
)
{
let
menuInfo
=
wx
.
getMenuButtonBoundingClientRect
();
//右上角胶囊信息
wx
.
getSystemInfo
({
success
:
(
res
)
=>
{
fn
({
navTop
:
res
.
statusBarHeight
,
//状态栏高度
navHeight
:
res
.
statusBarHeight
+
menuInfo
.
height
+
(
menuInfo
.
top
-
res
.
statusBarHeight
)
*
2
//导航栏高度
})
}
})
}
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