熟人页面
This commit is contained in:
parent
bd2ff39713
commit
fe9ce7786e
@ -36,7 +36,7 @@ export default {
|
|||||||
'/find-acquaintance',
|
'/find-acquaintance',
|
||||||
'/service-protocol',
|
'/service-protocol',
|
||||||
'/address-list',
|
'/address-list',
|
||||||
'',
|
'/video-detail',
|
||||||
'',
|
'',
|
||||||
];
|
];
|
||||||
const toDepth = routeDeep.indexOf(to.path)
|
const toDepth = routeDeep.indexOf(to.path)
|
||||||
|
|||||||
@ -36,6 +36,11 @@ export default {
|
|||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => []
|
||||||
},
|
},
|
||||||
|
//用于和slidList绑定,因为一个页面可能有多个slidList,但只有一个indicator组件
|
||||||
|
name: {
|
||||||
|
type: String,
|
||||||
|
default: () => ''
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -48,8 +53,8 @@ export default {
|
|||||||
computed: {},
|
computed: {},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initTabs()
|
this.initTabs()
|
||||||
bus.on('move', this.move)
|
bus.on(this.name + 'move', this.move)
|
||||||
bus.on('end', this.end)
|
bus.on(this.name + 'end', this.end)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeIndex(index) {
|
changeIndex(index) {
|
||||||
@ -95,10 +100,11 @@ export default {
|
|||||||
|
|
||||||
.indicator-ctn {
|
.indicator-ctn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 6rem;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
z-index: 999;
|
z-index: 2;
|
||||||
background: $main-bg;
|
background: $main-bg;
|
||||||
|
|
||||||
.tabs {
|
.tabs {
|
||||||
@ -107,7 +113,7 @@ export default {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
.tab {
|
.tab {
|
||||||
height: 40px;
|
height: 5.5rem;
|
||||||
width: 45%;
|
width: 45%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
21
src/components/Mask.vue
Normal file
21
src/components/Mask.vue
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<template>
|
||||||
|
<div class="Mask"></div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "Mask",
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
.Mask {
|
||||||
|
z-index: 2;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
background: #000000bb;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
29
src/components/NoMore.vue
Normal file
29
src/components/NoMore.vue
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<template>
|
||||||
|
<div class="NoMore">
|
||||||
|
{{ notice }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "NoMore",
|
||||||
|
props: {
|
||||||
|
notice: {
|
||||||
|
type: String,
|
||||||
|
default: '暂时没有更多了'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
@import "../assets/scss/index";
|
||||||
|
|
||||||
|
.NoMore {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
height: 6rem;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: $second-text-color;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="posters">
|
<div class="posters">
|
||||||
<div class="poster-item" v-for="i in list" @click="$nav('/VideoDetail')">
|
<div class="poster-item" v-for="i in list" @click="$nav('/video-detail')">
|
||||||
<img class="poster" src="../assets/img/poster/2.jpg" alt="">
|
<img class="poster" src="../assets/img/poster/2.jpg" alt="">
|
||||||
<div class="num">
|
<div class="num">
|
||||||
<img class="love" src="../assets/img/icon/love.svg" alt="">
|
<img class="love" src="../assets/img/icon/love.svg" alt="">
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<div class="search">
|
<div class="search">
|
||||||
<img src="../assets/img/icon/pause.svg" alt="">
|
<img src="../assets/img/icon/pause.svg" alt="">
|
||||||
<input type="text" :placeholder="placeholder" v-model="value">
|
<input type="text" :placeholder="placeholder" v-model="value">
|
||||||
<img v-if="modelValue.length" class="close" src="../assets/img/icon/close.svg" @click="clear">
|
<img v-if="value.length" class="close" src="../assets/img/icon/close.svg" @click="clear">
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="loading" :style="loadingStyle">AA</div>
|
<div class="loading" :style="loadingStyle">AA</div>
|
||||||
</div>
|
</div>
|
||||||
<slot name="indicator"></slot>
|
|
||||||
<div id="base-slide-list" ref="slideList"
|
<div id="base-slide-list" ref="slideList"
|
||||||
:style="{'flex-direction':'row',marginTop:indicatorFixed?'42px':'0'}"
|
:style="{'flex-direction':'row',marginTop:indicatorFixed?'42px':'0'}"
|
||||||
@touchstart="touchStart($event)"
|
@touchstart="touchStart($event)"
|
||||||
@ -61,6 +60,10 @@ export default {
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: () => 0
|
default: () => 0
|
||||||
},
|
},
|
||||||
|
name: {
|
||||||
|
type: String,
|
||||||
|
default: () => ''
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
toolbarStyle() {
|
toolbarStyle() {
|
||||||
@ -137,7 +140,6 @@ export default {
|
|||||||
await this.checkChildren(true)
|
await this.checkChildren(true)
|
||||||
this.showIndicator && this.initTabs()
|
this.showIndicator && this.initTabs()
|
||||||
this.changeIndex(true)
|
this.changeIndex(true)
|
||||||
console.log(this.$slots.indicator)
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeIndex(init = false, index = null, e) {
|
changeIndex(init = false, index = null, e) {
|
||||||
@ -215,7 +217,7 @@ export default {
|
|||||||
//禁止在最后页面的时候,向右划
|
//禁止在最后页面的时候,向右划
|
||||||
if (this.currentSlideItemIndex === this.slideItems.length - 1 && this.isDrawRight) return
|
if (this.currentSlideItemIndex === this.slideItems.length - 1 && this.isDrawRight) return
|
||||||
|
|
||||||
bus.emit('move', {
|
bus.emit(this.name + 'move', {
|
||||||
x: {distance: this.moveXDistance, isDrawRight: this.isDrawRight},
|
x: {distance: this.moveXDistance, isDrawRight: this.isDrawRight},
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -269,7 +271,7 @@ export default {
|
|||||||
this.resetConfig()
|
this.resetConfig()
|
||||||
this.$attrs['onUpdate:active-index'] && this.$emit('update:active-index', this.currentSlideItemIndex)
|
this.$attrs['onUpdate:active-index'] && this.$emit('update:active-index', this.currentSlideItemIndex)
|
||||||
this.$attrs['onEnd'] && this.$emit('end')
|
this.$attrs['onEnd'] && this.$emit('end')
|
||||||
bus.emit('end', this.currentSlideItemIndex)
|
bus.emit(this.name + 'end', this.currentSlideItemIndex)
|
||||||
},
|
},
|
||||||
resetConfig() {
|
resetConfig() {
|
||||||
this.isCanRightWiping = false
|
this.isCanRightWiping = false
|
||||||
|
|||||||
@ -16,6 +16,8 @@ import store from "./store";
|
|||||||
import globalMethods from './utils/global-methods'
|
import globalMethods from './utils/global-methods'
|
||||||
import SlideRowList from "./components/slide/SlideRowList";
|
import SlideRowList from "./components/slide/SlideRowList";
|
||||||
import SlideColumnList from "./components/slide/SlideColumnList";
|
import SlideColumnList from "./components/slide/SlideColumnList";
|
||||||
|
import Mask from "./components/Mask";
|
||||||
|
import NoMore from "./components/NoMore";
|
||||||
|
|
||||||
const mixin = {
|
const mixin = {
|
||||||
methods: {
|
methods: {
|
||||||
@ -32,6 +34,8 @@ app.component('SlideColumnList', SlideColumnList)
|
|||||||
app.component('SlideItem', SlideItem)
|
app.component('SlideItem', SlideItem)
|
||||||
app.component('Video1', Video)
|
app.component('Video1', Video)
|
||||||
app.component('Footer', Footer)
|
app.component('Footer', Footer)
|
||||||
|
app.component('Mask', Mask)
|
||||||
|
app.component('NoMore', NoMore)
|
||||||
app.mixin(mixin)
|
app.mixin(mixin)
|
||||||
app.use(router)
|
app.use(router)
|
||||||
app.use(store)
|
app.use(store)
|
||||||
|
|||||||
@ -59,12 +59,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div ref="content" style="margin-bottom: 60px;">
|
<div ref="content" style="margin-bottom: 60px;">
|
||||||
<Indicator
|
<Indicator
|
||||||
|
name="videoList"
|
||||||
:fixed="indicatorFixed"
|
:fixed="indicatorFixed"
|
||||||
tabStyleWidth="33%"
|
tabStyleWidth="33%"
|
||||||
:tabTexts="['作品','私密','喜欢']"
|
:tabTexts="['作品','私密','喜欢']"
|
||||||
v-model:active-index="contentIndex">
|
v-model:active-index="contentIndex">
|
||||||
</Indicator>
|
</Indicator>
|
||||||
<SlideRowList
|
<SlideRowList
|
||||||
|
name="videoList"
|
||||||
@end="end"
|
@end="end"
|
||||||
:indicator-fixed="indicatorFixed"
|
:indicator-fixed="indicatorFixed"
|
||||||
v-model:active-index="contentIndex">
|
v-model:active-index="contentIndex">
|
||||||
|
|||||||
@ -1,42 +1,69 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="FindAcquaintance">
|
<div class="FindAcquaintance">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<img src="../../assets/img/icon/back.png" alt="" class="back">
|
<img src="../../assets/img/icon/back.png" alt="" class="back" @click="$back">
|
||||||
<Indicator
|
<Indicator
|
||||||
|
style="width: 50%;"
|
||||||
tabStyleWidth="40%"
|
tabStyleWidth="40%"
|
||||||
:tabTexts="['熟人列表','发现熟人']"
|
:tabTexts="['熟人列表','发现熟人']"
|
||||||
v-model:active-index="currentSlideItemIndex">
|
v-model:active-index="currentSlideItemIndex">
|
||||||
</Indicator>
|
</Indicator>
|
||||||
<img src="../../assets/img/icon/back.png" alt="" class="option">
|
<img src="../../assets/img/icon/back.png" alt="" class="option" @click="moreOptionDialog = true">
|
||||||
</div>
|
</div>
|
||||||
<SlideRowList v-model:active-index="currentSlideItemIndex">
|
<SlideRowList v-model:active-index="currentSlideItemIndex" :style="{opacity : moreOptionDialog ? .5:1}">
|
||||||
<SlideItem>
|
<SlideItem>
|
||||||
<Search class="vue"></Search>
|
<Search placeholder="搜索用户备注或名字" class="mr20p ml20p mt10p"></Search>
|
||||||
|
<div class="title">我的好友(互相关注)</div>
|
||||||
<People v-for="item in list " :people="item"></People>
|
<People v-for="item in list " :people="item"></People>
|
||||||
|
<NoMore></NoMore>
|
||||||
</SlideItem>
|
</SlideItem>
|
||||||
<SlideItem>
|
<SlideItem>
|
||||||
<Search class="vue"></Search>
|
<Search :key="1"></Search>
|
||||||
<Search class="vue" @click="findAddressListDialog = true"></Search>
|
|
||||||
</SlideItem>
|
</SlideItem>
|
||||||
</SlideRowList>
|
</SlideRowList>
|
||||||
<div v-if="findAddressListDialog" class="dialog find-address-list">
|
|
||||||
<div class="content">
|
|
||||||
<div class="body">
|
<transition name="fade">
|
||||||
<div>
|
<div v-if="findAddressListDialog" class="dialog find-address-list" @click="findAddressListDialog = false">
|
||||||
<img src="../../assets/img/icon/head-image.jpeg" alt="">
|
<div class="content" @click.stop="null">
|
||||||
</div>
|
<div class="body">
|
||||||
<span class="title">发现通讯录好友</span>
|
<div>
|
||||||
<span class="desc">
|
<img src="../../assets/img/icon/head-image.jpeg" alt="">
|
||||||
|
</div>
|
||||||
|
<span class="title">发现通讯录好友</span>
|
||||||
|
<span class="desc">
|
||||||
授权通讯录,看看哪些好友在使用抖音。具体使用场景及撤回授权方式详见
|
授权通讯录,看看哪些好友在使用抖音。具体使用场景及撤回授权方式详见
|
||||||
<span class="link" @click="$nav('/service-protocol')">《隐私政策》</span>
|
<span class="link" @click="$nav('/service-protocol')">《隐私政策》</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<div @click="findAddressListDialog = false">暂时不要</div>
|
<div @click="findAddressListDialog = false">暂时不要</div>
|
||||||
<div @click="$nav('/address-list')">发现好友</div>
|
<div @click="$nav('/address-list')">发现好友</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</transition>
|
||||||
|
<transition name="fade">
|
||||||
|
<Mask v-if="moreOptionDialog" @click="moreOptionDialog = false"></Mask>
|
||||||
|
</transition>
|
||||||
|
<transition name="from-bottom">
|
||||||
|
<div class="more-option-dialog" v-if="moreOptionDialog">
|
||||||
|
<div class="row">
|
||||||
|
<span>站外好友口令</span>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<span>扫一扫加好友</span>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="border-bottom: none;">
|
||||||
|
<span>面对面加好友</span>
|
||||||
|
</div>
|
||||||
|
<div class="space"></div>
|
||||||
|
<div class="row" @click="moreOptionDialog = false">
|
||||||
|
取消
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -54,6 +81,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
findAddressListDialog: false,
|
findAddressListDialog: false,
|
||||||
|
moreOptionDialog: true,
|
||||||
indicatorFixed: false,
|
indicatorFixed: false,
|
||||||
currentSlideItemIndex: 1,
|
currentSlideItemIndex: 1,
|
||||||
list: [
|
list: [
|
||||||
@ -85,6 +113,16 @@ export default {
|
|||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import "../../assets/scss/index";
|
@import "../../assets/scss/index";
|
||||||
|
|
||||||
|
.from-bottom-enter-active,
|
||||||
|
.from-bottom-leave-active {
|
||||||
|
transition: transform 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.from-bottom-enter-from,
|
||||||
|
.from-bottom-leave-to {
|
||||||
|
transform: translate3d(0, 50vh, 0);
|
||||||
|
}
|
||||||
|
|
||||||
.FindAcquaintance {
|
.FindAcquaintance {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
@ -93,52 +131,26 @@ export default {
|
|||||||
top: 0;
|
top: 0;
|
||||||
color: white;
|
color: white;
|
||||||
|
|
||||||
.content {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
|
height: 6rem;
|
||||||
|
font-size: 1.4rem;
|
||||||
|
padding: 0 2rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
align-items: center;
|
||||||
|
border-bottom: 1px solid $line-color;
|
||||||
|
|
||||||
.indicator-ctn {
|
img {
|
||||||
width: 50%;
|
height: 2rem;
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
z-index: 999;
|
|
||||||
background: $main-bg;
|
|
||||||
|
|
||||||
.tabs {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
font-weight: bold;
|
|
||||||
|
|
||||||
.tab {
|
|
||||||
height: 40px;
|
|
||||||
width: 45%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
color: gray;
|
|
||||||
transition: color .3s;
|
|
||||||
|
|
||||||
&.active {
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.indicator {
|
|
||||||
height: 2px;
|
|
||||||
background: gold;
|
|
||||||
width: 45%;
|
|
||||||
position: relative;
|
|
||||||
transition: all .3s;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
margin-left: 2rem;
|
||||||
|
margin-top: 2rem;
|
||||||
|
color: $second-text-color;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
.dialog {
|
.dialog {
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
@ -215,5 +227,36 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.more-option-dialog {
|
||||||
|
z-index: 9;
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
max-height: 50vh;
|
||||||
|
overflow: auto;
|
||||||
|
bottom: 0;
|
||||||
|
background: white;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 5px 5px 0 0;
|
||||||
|
|
||||||
|
.space {
|
||||||
|
height: 1rem;
|
||||||
|
background: whitesmoke;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row {
|
||||||
|
font-size: 1.6rem;
|
||||||
|
color: black;
|
||||||
|
background: white;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 1.8rem;
|
||||||
|
width: 100%;
|
||||||
|
//border-bottom: 1px solid ghostwhite;
|
||||||
|
border-bottom: 1px solid gainsboro;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user