12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <template>
- <view>
- <view class="screenBox">
- <view class="screenItem" @click="classifyFlag=true">全部分类<i class='iconfont icon-down_icon'></i></view>
- <view class="screenItem">当前在线人数排序<i class='iconfont icon-down_icon'></i></view>
- </view>
- <scroll-view class="rank_container" scroll-y :style="'height:calc(100vh - '+ height+'rpx)'">
- <view class="rank_live_plate">
- <view class="live_plate">
- <view class="live_cover">
- <image src="" mode="widthFix" class="liveImg"></image>
- </view>
- <view class="live_info">
- <view class="liveName">等待交警大队积极</view>
- <view class="user_box">
- <image src="" mode="" class="userImg"></image>
- <view class="userName">静静地斤斤计较简介简单</view>
- </view>
- </view>
- <view class="live_time">开播时间:</view>
- </view>
- <view class="live_data_plate">
- <view class="data_plate_item">
- <view class="data_name_box">
- <text>当前在线人数</text>
- <image src="../../static/img/zuori_icon@2x.png" mode=""></image>
- </view>
- <view class="data">88888</view>
- </view>
- </view>
- </view>
- </scroll-view>
- <classify @close='classifyFlag=false' v-if="classifyFlag" @getData='getChoiceData'></classify>
- </view>
- </template>
-
- <script>
- import classify from "@/components/classify.vue"
- export default {
- props: ['height'],
- components: {
- classify
- },
- data() {
- return {
- classifyFlag: false,
- total: 0,
- page: 1,
- pages: 0,
- pagesize: 20,
- infoList: []
- }
- },
- mounted() {
- this.init(1)
- },
- methods: {
- getChoiceData(data) {
- console.log(data, '分类数据')
- },
- init(page) {
- this.page = page ? page : this.page;
- this.infoList = []
- this.$req(this.$api.onlive, 'get', {
- page: page,
- page_size: this.pagesize,
- keywords: '',
- // category_id: this.categoryObj.category_id,
- // sort: this.sort_type,
- sort_method: 'desc'
- }, (res) => {
- var res = res.data
- if (res && res.errno == 0) {
- var data = res.rst
- this.total = data.pageInfo.total
- this.pages = data.pageInfo.pages
- this.infoList = data.data
- console.log(this.infoList)
- } else if (res.errno != 4001) {
- this.$message({
- message: res.err,
- type: "warning"
- })
- }
- }, (err) => {})
- }
- }
- }
- </script>
-
- <style scoped lang="scss">
- @import '@/common/css/rank.scss'
- </style>
|