提交 88290116 编写于 作者: 杨广俊's avatar 杨广俊

浮层

上级 77c6db94
无法预览此类型文件
<template> <template>
<div> <div class="loader">
<img src="" /> <img class="loader-mask" src="../../images/sousuo/sousuo-fc.png" />
<span @click="closeFC" class="loader-btn">我知道了</span>
</div> </div>
</template> </template>
<script>
export default {
methods: {
closeFC() {
this.$emit('closeFC')
}
}
}
</script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '../../style/mixin'; @import '../../style/mixin';
.loader { .loader {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 5;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
&-mask { &-mask {
position: fixed; position: fixed;
top: 0; top: px2rem(64px);
left: 0; left: px2rem(38px);
bottom: 0; bottom: px2rem(64px);
right: 0; right: px2rem(37px);
z-index: 100; width: px2rem(300px);
z-index: 4;
background: rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.5);
} }
svg { &-btn {
display: inline-block;
position: absolute; position: absolute;
top: px2rem(280px); left: px2rem(128px);
left: px2rem(166px); bottom: px2rem(120px);
z-index: 101; height: px2rem(30px);
width: px2rem(120px);
z-index: 6;
text-align: center;
padding-top: px2rem(4px);
font-size: px2rem(15px);
border: 1px solid #fff;
border-radius: px2rem(30px);
color: #fff;
} }
} }
svg path, svg rect{
fill: #fff;
// fill: #449284;
}
</style> </style>
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
<img class="search-container-img" @click="back" src="../images/sousuo/left-arrow-black.png"/> <img class="search-container-img" @click="back" src="../images/sousuo/left-arrow-black.png"/>
<div > <div >
<span class="search-container-img2"><img class="search-container-img" src="../images/sousuo/search-black.png"/></span> <span class="search-container-img2"><img class="search-container-img" src="../images/sousuo/search-black.png"/></span>
<input id="search-input" class="search-container-input" type="search" v-model="searchText" maxlength="100"> <input class="search-container-input" type="search" v-model="searchText" maxlength="100" @focus.prevent="onInputFocus" @blur.prevent="onInputBlur">
<span class="search-container-img3" @click="clearText"><img class="search-container-img" src="../images/sousuo/delete.png"/></span> <span v-show="isOnFocus" class="search-container-img3" @click.prevent="clearText"><img class="search-container-img" src="../images/sousuo/delete.png"/></span>
<span class="search-container-cancle" @click.prevent="search">搜索</span> <span class="search-container-cancle" @click.prevent="search">搜索</span>
</div> </div>
</div> </div>
...@@ -109,6 +109,7 @@ import BackTop from '@/components/common/backTop' ...@@ -109,6 +109,7 @@ import BackTop from '@/components/common/backTop'
export default { export default {
data() { data() {
return { return {
isOnFocus: false,
isShowTop: false, isShowTop: false,
// token: '', // token: '',
navIndex: '0', navIndex: '0',
...@@ -347,6 +348,12 @@ export default { ...@@ -347,6 +348,12 @@ export default {
}, },
clearText() { clearText() {
this.searchText = '' this.searchText = ''
},
onInputFocus() {
this.isOnFocus = true
},
onInputBlur() {
this.isOnFocus = false
} }
}, },
} }
...@@ -436,7 +443,7 @@ export default { ...@@ -436,7 +443,7 @@ export default {
position: absolute; position: absolute;
top: px2rem(9px); top: px2rem(9px);
left: px2rem(274px); left: px2rem(274px);
z-index: 2; z-index: 5;
img { img {
width: px2rem(22px); width: px2rem(22px);
height: px2rem(22px); height: px2rem(22px);
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
<img class="search-container-img" @click="back" src="../images/sousuo/left-arrow-black.png"/> <img class="search-container-img" @click="back" src="../images/sousuo/left-arrow-black.png"/>
<div > <div >
<span class="search-container-img2"><img class="search-container-img" src="../images/sousuo/search-black.png"/></span> <span class="search-container-img2"><img class="search-container-img" src="../images/sousuo/search-black.png"/></span>
<input class="search-container-input" type="search" v-model="searchText" maxlength="100" :placeholder="pSearchText"> <input class="search-container-input" type="search" v-model="searchText" maxlength="100" :placeholder="pSearchText" @focus="onInputFocus" @blur="onInputBlur">
<span class="search-container-img3" @click="clearText"><img class="search-container-img" src="../images/sousuo/delete.png"/></span> <span v-show="isOnFocus" class="search-container-img3" @click="clearText"><img class="search-container-img" src="../images/sousuo/delete.png"/></span>
<span class="search-container-cancle" @click.prevent="search">搜索</span> <span class="search-container-cancle" @click.prevent="search">搜索</span>
</div> </div>
</div> </div>
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
<!-- <div class="mt-100"></div> --> <!-- <div class="mt-100"></div> -->
<HistoryLabels/> <HistoryLabels/>
<HotLabels/> <HotLabels/>
<FirstTimeSS v-show="needShowFirstTime" @closeFC="closeFC"/>
</div> </div>
</template> </template>
...@@ -30,6 +31,7 @@ import SearchHeader from '../components/business/search-header'; ...@@ -30,6 +31,7 @@ import SearchHeader from '../components/business/search-header';
import SplitLine from '../components/business/split-line'; import SplitLine from '../components/business/split-line';
import HistoryLabels from '../components/business/history-labels'; import HistoryLabels from '../components/business/history-labels';
import HotLabels from '../components/business/hot-labels'; import HotLabels from '../components/business/hot-labels';
import FirstTimeSS from '../components/common/first-time-ss';
export default { export default {
data() { data() {
...@@ -37,14 +39,16 @@ export default { ...@@ -37,14 +39,16 @@ export default {
searchText: '', searchText: '',
pSearchText: '', pSearchText: '',
token: '', token: '',
needShowFirstTime: false needShowFirstTime: true,
isOnFocus: false
} }
}, },
components: { components: {
SearchHeader, SearchHeader,
SplitLine, SplitLine,
HistoryLabels, HistoryLabels,
HotLabels HotLabels,
FirstTimeSS
}, },
created(){ created(){
...@@ -63,14 +67,14 @@ export default { ...@@ -63,14 +67,14 @@ export default {
_self.getData() _self.getData()
} }
window.__isFirstTime = function(param) { window.__isFirstTime = function(param) {
if(param.isFirst == 'true') { if(param.isFirst === 'true') {
this.needShowFirstTime = true _self.needShowFirstTime = true
rocNative.setFirstTime({ rocNative.setFirstTime({
projectName: 'YQY_PROJECT_SOUSUO', projectName: 'YQY_PROJECT_SOUSUO',
isFirst: 'false' isFirst: 'false'
}) })
} else { } else {
this.needShowFirstTime = false _self.needShowFirstTime = false
} }
} }
}, },
...@@ -201,7 +205,15 @@ export default { ...@@ -201,7 +205,15 @@ export default {
__funcName: '__isFirstTime' __funcName: '__isFirstTime'
}) })
}, },
onInputFocus() {
this.isOnFocus = true
},
onInputBlur() {
this.isOnFocus = false
},
closeFC() {
this.needShowFirstTime = false
}
}, },
} }
</script> </script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册