224 lines
4.6 KiB
Plaintext
224 lines
4.6 KiB
Plaintext
<template>
|
|
<view class="wrap__giftPanel" v-if="popupVisible">
|
|
<view class="wrapgift-mask" @tap="close"></view>
|
|
<view class="pop__ui_child anim-footer">
|
|
<view class="more-box p-0-20" @tap.stop="">
|
|
<scroll-view scroll-x="true" class="category_list">
|
|
<view class="category_item" v-for="(item,index) in listData" :key='index' @click="img_index = index"
|
|
:class="img_index == index?'active':''">
|
|
<view class="category_item-active-after" v-if="img_index == index"></view>
|
|
<text class="white f28">{{item.name}}</text>
|
|
</view>
|
|
</scroll-view>
|
|
<scroll-view scroll-x="true" class="more-box-list" v-if="listData[img_index]&&listData[img_index].list">
|
|
<view class="more-box-list-item" :class="bg_index==index?'more-box-list-item-active':''"
|
|
v-for="(item,index) in listData[img_index].list" :key="index"
|
|
@click="selectBg(item.link,index)">
|
|
<image class="more-box-list-image" :src="item.link" mode="aspectFill"></image>
|
|
</view>
|
|
</scroll-view>
|
|
<view class="d-b-c f-d-i foot-box">
|
|
<text class="grayD f22" @tap="reset">重置</text>
|
|
<text class="grayD f22">选择背景</text>
|
|
<!-- #ifndef APP-PLUS -->
|
|
<text class="grayD f22 icon iconfont icon-tijiaochenggong" @tap="close"></text>
|
|
<!-- #endif -->
|
|
<!-- #ifdef APP-PLUS -->
|
|
<text class="icon iconfont icon-lizhirenyuan i-btntool more-icont" @tap="close"></text>
|
|
<!-- #endif -->
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
img_index: 0,
|
|
popupVisible: false,
|
|
type: 0,
|
|
listData: [],
|
|
bg_index: -1
|
|
}
|
|
},
|
|
beforeCreate() {
|
|
// #ifdef APP-PLUS
|
|
const domModule = weex.requireModule('dom')
|
|
domModule.addRule('fontFace', {
|
|
fontFamily: "iconfont",
|
|
'src': "url('" + getApp().config.font_url + "')"
|
|
});
|
|
console.log(getApp().config.font_url);
|
|
// #endif
|
|
},
|
|
methods: {
|
|
show() {
|
|
this.popupVisible = true;
|
|
this.getData();
|
|
},
|
|
getData() {
|
|
let self = this;
|
|
getApp()._get('live.RoomApply/imageInfo', {}, (res) => {
|
|
self.listData = res.data.list;
|
|
|
|
})
|
|
},
|
|
close() {
|
|
this.$emit('close');
|
|
this.popupVisible = false;
|
|
},
|
|
selectBg(e, i) {
|
|
console.log('selectBg');
|
|
this.bg_index = i;
|
|
this.$emit('liveSet', e);
|
|
},
|
|
reset() {
|
|
this.img_index = 0;
|
|
this.bg_index = -1;
|
|
this.$emit('liveSet', '');
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.iconfont {
|
|
font-family: iconfont;
|
|
}
|
|
|
|
.nlv_borT {
|
|
border-color: #ebebeb;
|
|
border-style: solid;
|
|
border-top-width: 1upx;
|
|
}
|
|
|
|
.wrapgift-mask {
|
|
background-color: #000;
|
|
opacity: .1;
|
|
position: fixed;
|
|
left: 0;
|
|
right: 0;
|
|
top: 0;
|
|
bottom: 0;
|
|
z-index: 201910;
|
|
}
|
|
|
|
.pop__ui_child {
|
|
background-color: #fbfbfb;
|
|
border-top-left-radius: 12px;
|
|
border-top-right-radius: 12px;
|
|
font-size: 14px;
|
|
overflow: hidden;
|
|
position: fixed;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
z-index: 201911;
|
|
}
|
|
|
|
.foot-box {
|
|
height: 84rpx;
|
|
line-height: 84rpx;
|
|
border-top: 1rpx solid rgba(255, 255, 255, .1);
|
|
padding: 0 23rpx;
|
|
}
|
|
|
|
.foot-box .icon.iconfont {
|
|
font-size: 22rpx;
|
|
color: #DDDDDD;
|
|
}
|
|
|
|
.more-box {
|
|
background: rgba(0, 0, 0, .85);
|
|
width: 750rpx;
|
|
position: fixed;
|
|
bottom: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
z-index: 9999;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.more-box-list {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: flex-start;
|
|
flex-wrap: nowrap;
|
|
overflow-x: auto;
|
|
padding: 25rpx 0 53rpx 0;
|
|
}
|
|
|
|
.more-box-list-item {
|
|
width: 152rpx;
|
|
height: 194rpx;
|
|
border-radius: 10rpx;
|
|
flex-shrink: 0;
|
|
margin-right: 47rpx;
|
|
border: 3rpx solid;
|
|
border-color: rgba(0, 0, 0, 0);
|
|
padding: 6rpx;
|
|
}
|
|
|
|
.more-box-list-item-active {
|
|
border: 3rpx solid #8AE4F0;
|
|
border-color: $dominant-color;
|
|
}
|
|
|
|
.more-box-list-image {
|
|
width: 137rpx;
|
|
height: 179rpx;
|
|
border-radius: 10rpx;
|
|
}
|
|
|
|
.more-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
width: 72rpx;
|
|
color: #FFFFFF;
|
|
}
|
|
|
|
.wrap__giftPanel {
|
|
z-index: 100;
|
|
}
|
|
|
|
.category_list {
|
|
display: flex;
|
|
justify-content: flex-start;
|
|
align-items: center;
|
|
flex-direction: row;
|
|
flex-wrap: nowrap;
|
|
height: 95rpx;
|
|
border-bottom: 1rpx solid rgba(255, 255, 255, .1);
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.category_item {
|
|
flex-shrink: 0;
|
|
margin: 0 64rpx;
|
|
font-size: 28rpx;
|
|
color: #DDDDDD;
|
|
height: 95rpx;
|
|
line-height: 95rpx;
|
|
position: relative;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.category_item-active-after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: 1rpx;
|
|
left: 0;
|
|
width: 32rpx;
|
|
height: 5rpx;
|
|
background: #DDDDDD;
|
|
border-radius: 3rpx;
|
|
}
|
|
</style>
|