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 {
...
@@ -116,6 +116,7 @@ export default {
imgAni
:
false
,
//给点赞元素加动画
imgAni
:
false
,
//给点赞元素加动画
getBottom
:
0
,
//动态绑定输入框位置
getBottom
:
0
,
//动态绑定输入框位置
loadingShare
:
false
,
loadingShare
:
false
,
isClick
:
true
,
};
};
},
},
components
:
{
components
:
{
...
@@ -276,6 +277,11 @@ export default {
...
@@ -276,6 +277,11 @@ export default {
},
},
// 点击发送留言
// 点击发送留言
toSend
()
{
toSend
()
{
if
(
this
.
isClick
){
this
.
isClick
=
false
;
setTimeout
(()
=>
{
this
.
isClick
=
true
;
},
300
);
console
.
log
(
"点击按钮-------------------200"
);
console
.
log
(
"点击按钮-------------------200"
);
if
(
this
.
sendVal
==
""
)
{
if
(
this
.
sendVal
==
""
)
{
this
.
getFocus
=
true
;
this
.
getFocus
=
true
;
...
@@ -289,6 +295,7 @@ export default {
...
@@ -289,6 +295,7 @@ export default {
}
}
}
}
}
}
}
};
};
</
script
>
</
script
>
...
...
src/pages/lived/index.vue
View file @
9c5c33c3
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<!-- 直播展示层 -->
<!-- 直播展示层 -->
<div
class=
"liveModel"
v-if=
"liveNoticeInfo.liveBroadcastState>-1"
>
<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"
>
<div
class=
"backIcon"
>
<img
<img
@
click=
"back"
@
click=
"back"
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
</
template
>
</
template
>
<
script
type=
"text/ecmascript-6"
>
<
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
live
from
"@/api/live"
;
import
notStarted
from
"@/components/livedModel/notStarted"
;
import
notStarted
from
"@/components/livedModel/notStarted"
;
import
livedControls
from
"@/components/livedModel/livedControls"
;
import
livedControls
from
"@/components/livedModel/livedControls"
;
...
@@ -109,7 +109,9 @@ export default {
...
@@ -109,7 +109,9 @@ export default {
params
:
{},
params
:
{},
userId
:
""
,
userId
:
""
,
hasInvitationStatus
:
0
,
// 邀请资格:0-不能够邀请下级,1-能够邀请下级
hasInvitationStatus
:
0
,
// 邀请资格:0-不能够邀请下级,1-能够邀请下级
spokesmanObj
:
{}
//分销员信息
spokesmanObj
:
{},
//分销员信息
navTop
:
0
,
navHeight
:
0
,
};
};
},
},
components
:
{
components
:
{
...
@@ -118,8 +120,12 @@ export default {
...
@@ -118,8 +120,12 @@ export default {
livedIsEnded
livedIsEnded
},
},
computed
:
{},
computed
:
{},
created
()
{},
onLoad
(
options
)
{
onLoad
(
options
)
{
getNavbarInfo
(
res
=>
{
console
.
log
(
res
,
'--------------------125'
)
this
.
navTop
=
res
.
navTop
this
.
navHeight
=
res
.
navHeight
});
wx
.
getNetworkType
({
wx
.
getNetworkType
({
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
networkType
!=
"wifi"
)
{
if
(
res
.
networkType
!=
"wifi"
)
{
...
@@ -497,7 +503,6 @@ img {
...
@@ -497,7 +503,6 @@ img {
z-index
:
1
;
z-index
:
1
;
.customBack
{
.customBack
{
position
:
absolute
;
position
:
absolute
;
top
:
30px
;
left
:
12px
;
left
:
12px
;
width
:
70%
;
width
:
70%
;
z-index
:
2
;
z-index
:
2
;
...
...
src/utils/index.js
View file @
9c5c33c3
...
@@ -77,3 +77,15 @@ export function DFSImg(path, w, h) { //
...
@@ -77,3 +77,15 @@ export function DFSImg(path, w, h) { //
return
baseImg
[
Math
.
floor
(
Math
.
random
()
*
100
)
%
baseImg
.
length
]
+
path
;
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