直播修改
@ -88,7 +88,7 @@ export function getfocuslst(data) {
|
||||
|
||||
//关注我的人
|
||||
export function getfanslst(data) {
|
||||
return requesta.post('community/fans/lst',data);
|
||||
return requesta.get('community/fans/lst',data);
|
||||
}
|
||||
|
||||
//用户送礼
|
||||
@ -121,6 +121,13 @@ export function sendGift(data) {
|
||||
return request.post('zhibo/sendGift',data);
|
||||
}
|
||||
|
||||
|
||||
//获取主播关注人数
|
||||
export function fansNum(data) {
|
||||
return requesta.get('zhibo/fansNum',data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 充值金额选择
|
||||
*/
|
||||
|
@ -1,47 +1,48 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="" :style="{'height':heightG+'px'}" @click="quanju">
|
||||
<view class="top-do-box">
|
||||
<view class="room-info">
|
||||
<view class="room-logo-box">
|
||||
<image :src="room.cover" class="room-logo-box"></image>
|
||||
</view>
|
||||
<view class="room-info-message">
|
||||
<view class="room-user-name">
|
||||
<text
|
||||
style="color: #fff;font-size: 25rpx;">{{room.live_name.length>6?room.live_name.substring(0, 6)+'...': room.live_name}}</text>
|
||||
<view class="" :style="{'height':heightG+'px'}" @click="quanju">
|
||||
<view class="top-do-box">
|
||||
<view class="room-info">
|
||||
<view class="room-logo-box">
|
||||
<image :src="room.cover" class="room-logo-box"></image>
|
||||
</view>
|
||||
<view class="room-user-money">
|
||||
<text style="color: #fff;font-size: 25rpx;">4000</text>
|
||||
<view class="room-info-message">
|
||||
<view class="room-user-name">
|
||||
<text
|
||||
style="color: #fff;font-size: 25rpx;">{{room.live_name.length>6?room.live_name.substring(0, 6)+'...': room.live_name}}</text>
|
||||
</view>
|
||||
<view class="room-user-money">
|
||||
<text style="color: #fff;font-size: 25rpx;">{{count}}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="room-guanzhu" @click="interest">
|
||||
<text class="guanzhu" v-if="!follow">关注</text>
|
||||
<text class="guanzhu" v-else>已关注</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="room-guanzhu" @click="interest">
|
||||
<text class="guanzhu" v-if="!follow">关注</text>
|
||||
<text class="guanzhu" v-else>已关注</text>
|
||||
<view class="room-users-box">
|
||||
<scroll-view class="right_top_scroll" scroll-x="true" scroll-left="0">
|
||||
<view class="top-scroll-users-header" v-for="(bitem,bindex) in users" :key="bindex">
|
||||
<image :src="bitem.app_user_avatar" class="top-scroll-users-header"
|
||||
v-if="bitem.app_user_avatar"></image>
|
||||
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/default_avtar.png"
|
||||
class="top-scroll-users-header" mode="aspectFill"></image>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="room-users-box">
|
||||
<scroll-view class="right_top_scroll" scroll-x="true" scroll-left="0">
|
||||
<view class="top-scroll-users-header" v-for="(bitem,bindex) in users" :key="bindex">
|
||||
<image :src="bitem.app_user_avatar" class="top-scroll-users-header"
|
||||
v-if="bitem.app_user_avatar"></image>
|
||||
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/default_avtar.png"
|
||||
class="top-scroll-users-header" mode="aspectFill"></image>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<view class="users-count web-font">
|
||||
<view class="users-count web-font">
|
||||
<text class="users-count-text"> {{users.length}}</text>
|
||||
</view>
|
||||
<view class="users-count " @click="outroom">
|
||||
<image src="@/static/img/close.png" class="users-count-img" mode="aspectFit"></image>
|
||||
<view class="users-count web-font">
|
||||
<text class="users-count-text"> {{users.length}}</text>
|
||||
</view>
|
||||
<view class="users-count " @click="outroom">
|
||||
<image src="@/static/img/close.png" class="users-count-img" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
<view class="top-left" v-if="isshow">
|
||||
<view class="top-left-a" @click="switchCamera">
|
||||
<image class="left-img" src="/static/img/qiehuan.png" mode=""></image>
|
||||
@ -51,7 +52,7 @@
|
||||
<mh-msgList ref="msgList" :msgList="msgList"></mh-msgList>
|
||||
</view>
|
||||
<!-- 底部操作 -->
|
||||
</view>
|
||||
|
||||
|
||||
<view class="inpit-box-bg" v-if="focus">
|
||||
<view class="inpit-box-body">
|
||||
@ -77,7 +78,7 @@
|
||||
<image class="ico-box-img" src="@/static/img/shanpin.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="ico-box" @click="send_lick">
|
||||
<image class="ico-box-img" src="@/static/img/gn.png"></image>
|
||||
<image class="ico-box-img" src="@/static/img/jl.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -241,7 +242,46 @@
|
||||
{{join.message}}
|
||||
</text>
|
||||
</view>
|
||||
<uni-popup ref="giftrecord" :type="type" :custom="true" @change="change">
|
||||
<view class="uni-record" >
|
||||
<view class="uni-record-top">
|
||||
<view class="uni-record-top-img" @click="closezb">
|
||||
<image class="uni-record-top-img" src="@/static/img/you.png" mode=""></image>
|
||||
</view>
|
||||
<view class="uni-record-top-text">
|
||||
<text class="uni-record-top-text">礼物记录</text>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y :style="{'height':380+'px','overflow':'hidden'}">
|
||||
<view class="uni-record-content" v-for="(item,m) in recordlist" :key="m">
|
||||
<view class="record-content-one">
|
||||
<view class="content-onea">
|
||||
<text class="content-onea">{{item.create_time}}</text>
|
||||
</view>
|
||||
|
||||
<view class="content-oneb">
|
||||
<image src="@/static/img/jb.png" class="content-oneb-img" mode="aspectFit">
|
||||
</image>
|
||||
<text class="content-oneb-txt" v-if='!isshow'>-{{item.amount}}</text>
|
||||
<text class="content-oneb-txt" v-else>+{{item.amount}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="record-content-two">
|
||||
<view class="content-twoa">
|
||||
<image class="content-twoa-img" src="@/static/missing-face.png" mode="aspectFit">
|
||||
</image>
|
||||
<text class="content-twoa-txt">{{item.nickname}}</text>
|
||||
</view>
|
||||
<view class="content-twob">
|
||||
<text class="content-twob-txt"
|
||||
v-if='!isshow'>给主播赠送{{item.gift_id}}个{{item.gift_name}}</text>
|
||||
<text class="content-twob-txt" v-else>主播收到{{item.gift_id}}个{{item.gift_name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<gb-popup :isShow="isShow1" rName="确定" :isBut="false" lName="取消" @lEvent="show1" @rEvent="copyData"
|
||||
title="请输入礼物数量">
|
||||
<view style="padding: 30rpx;">
|
||||
@ -265,7 +305,9 @@
|
||||
getuser,
|
||||
getRechargeApi,
|
||||
sendGift,
|
||||
getAjuser
|
||||
getAjuser,
|
||||
getfanslst,
|
||||
fansNum
|
||||
} from '@/api/live.js'
|
||||
import {
|
||||
VUE_APP_WS_URL_ONE
|
||||
@ -288,9 +330,9 @@
|
||||
room: {
|
||||
type: Object,
|
||||
},
|
||||
heightG :{
|
||||
heightG: {
|
||||
type: String,
|
||||
default: '760'
|
||||
default: '750'
|
||||
},
|
||||
},
|
||||
components: {
|
||||
@ -323,6 +365,7 @@
|
||||
message_arr: [
|
||||
|
||||
],
|
||||
recordlist:[],
|
||||
msgList: [{
|
||||
userName: "系统通知",
|
||||
content: "倡导绿色直播,严禁发布涉黄涉毒涉赌,严禁发布涉政、违法及低俗违规内容。健康直播,文明互动",
|
||||
@ -349,6 +392,7 @@
|
||||
gifsobj: {},
|
||||
gift_num: '',
|
||||
isShow1: false,
|
||||
count:0
|
||||
}
|
||||
/*定义IM消息类型
|
||||
1:进群通知
|
||||
@ -362,13 +406,15 @@
|
||||
|
||||
this.userinfo = JSON.parse(uni.getStorageSync('USER_INFO'))
|
||||
this.getjuser()
|
||||
|
||||
this.get_live_room(); //调用直播间信息
|
||||
this.rewardList()
|
||||
this.giftList()
|
||||
this.liveAudience()
|
||||
this.getuser()
|
||||
this.getRecharg()
|
||||
|
||||
|
||||
// console.log(this.room)
|
||||
|
||||
},
|
||||
onReady() {
|
||||
@ -410,6 +456,26 @@
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
//全局
|
||||
quanju() {
|
||||
this.focus = false;
|
||||
},
|
||||
//关注我的人
|
||||
getfanslst() {
|
||||
getfanslst().then((res) => {
|
||||
if (res.status = 200) {
|
||||
// console.log(res,'aaaaaaaaaa')
|
||||
this.count = res.data.count
|
||||
}
|
||||
})
|
||||
},
|
||||
//获取主播关注人数
|
||||
fansNum(id){
|
||||
fansNum({master_id:id}).then((res=>{
|
||||
// console.log(res,'SSSSSSS')
|
||||
this.count=res.data.fan_num
|
||||
}))
|
||||
},
|
||||
//关注
|
||||
getjuser() {
|
||||
getAjuser(this.room.app_user_id).then((res) => {
|
||||
@ -423,7 +489,7 @@
|
||||
//获取充值数据
|
||||
getRecharg() {
|
||||
getRechargeApi().then((res) => {
|
||||
console.log(res.data.recharge_quota, '11111111')
|
||||
|
||||
this.Recharglist = res.data.recharge_quota
|
||||
this.Recharglist.push({
|
||||
data: {},
|
||||
@ -435,7 +501,7 @@
|
||||
//获取余额
|
||||
getuser() {
|
||||
getuser().then((res) => {
|
||||
|
||||
console.log(res.data.now_money)
|
||||
this.now_money = res.data.now_money
|
||||
})
|
||||
},
|
||||
@ -452,7 +518,7 @@
|
||||
//礼物列表
|
||||
rewardList() {
|
||||
rewardList().then((res) => {
|
||||
console.log(res, '11111111')
|
||||
this.recordlist = res.data.list
|
||||
})
|
||||
},
|
||||
//送礼
|
||||
@ -466,13 +532,15 @@
|
||||
live_stream_id: this.room.live_stream_id,
|
||||
gift_num: gif.gift_num,
|
||||
}
|
||||
console.log(data)
|
||||
|
||||
sendGift(data).then((res) => {
|
||||
|
||||
if (res.code == 1) {
|
||||
this.getuser()
|
||||
this.rewardList()
|
||||
this.$refs.share.close()
|
||||
uni.hideModal()
|
||||
this.getuser()
|
||||
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
@ -578,7 +646,7 @@
|
||||
shopp(item) {
|
||||
// console.log(item)
|
||||
uni.navigateTo({
|
||||
url:'/pages/goods_details/index?id='+item.app_goods_id
|
||||
url: '/pages/goods_details/index?id=' + item.app_goods_id
|
||||
})
|
||||
},
|
||||
//绑定用户id
|
||||
@ -675,10 +743,10 @@
|
||||
})
|
||||
|
||||
}
|
||||
} else if (obj.type == 'gift_message') {
|
||||
} else if (obj.type == 'gift_message') {
|
||||
let data1 = {
|
||||
userName: '',
|
||||
content: obj.text+'X'+obj.gift_num,
|
||||
content: obj.text + 'X' + obj.gift_num,
|
||||
avatar: obj.app_user_avatar,
|
||||
cmd: "say",
|
||||
msg_type: "user"
|
||||
@ -905,24 +973,24 @@
|
||||
//关闭直播间
|
||||
outroom: function() {
|
||||
uni.showModal({
|
||||
title: '提示', // 对话框标题
|
||||
content: '是否确定退出直播间', // 对话框内容
|
||||
showCancel: true, // 是否显示取消按钮,默认为 true
|
||||
cancelText: '取消', // 取消按钮的文字,默认为 "取消"
|
||||
cancelColor: '#000000', // 取消按钮的文本颜色,默认为 "#000000"
|
||||
confirmText: '确定', // 确定按钮的文字,默认为 "确定"
|
||||
confirmColor: '#3CC51F', // 确定按钮的文本颜色,默认为 "#3CC51F"
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/room/index'
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击了取消按钮')
|
||||
}
|
||||
}
|
||||
title: '提示', // 对话框标题
|
||||
content: '是否确定退出直播间', // 对话框内容
|
||||
showCancel: true, // 是否显示取消按钮,默认为 true
|
||||
cancelText: '取消', // 取消按钮的文字,默认为 "取消"
|
||||
cancelColor: '#000000', // 取消按钮的文本颜色,默认为 "#000000"
|
||||
confirmText: '确定', // 确定按钮的文字,默认为 "确定"
|
||||
confirmColor: '#3CC51F', // 确定按钮的文本颜色,默认为 "#3CC51F"
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/room/index'
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击了取消按钮')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
|
||||
get_live_room() {
|
||||
@ -938,6 +1006,8 @@
|
||||
// console.log(this.room.app_user_id, uni.getStorageSync('user_id'), '房间id 以及当前用户id')
|
||||
if (res.data.app_user_id == uni.getStorageSync('Uid')) {
|
||||
this.isshow = true
|
||||
}else{
|
||||
this.fansNum(res.data.app_user_id)
|
||||
}
|
||||
}
|
||||
this.connectSocketInit()
|
||||
@ -984,10 +1054,14 @@
|
||||
this.type = 'bottom'
|
||||
t.togglePopup('bottom', 'share');
|
||||
},
|
||||
//关闭
|
||||
closezb() {
|
||||
this.$refs['giftrecord'].close()
|
||||
},
|
||||
send_lick: function() {
|
||||
this.sendGift()
|
||||
|
||||
// this.sendGift()
|
||||
|
||||
this.$refs['giftrecord'].open()
|
||||
},
|
||||
|
||||
//礼物弹窗
|
||||
@ -1092,13 +1166,109 @@
|
||||
width: 100%;
|
||||
/* 设置容器的宽度 */
|
||||
}
|
||||
.uni-record {
|
||||
border-radius: 0;
|
||||
flex: 1;
|
||||
background-color: #F4F4F4 !important;
|
||||
}
|
||||
|
||||
.uni-record-content {
|
||||
height: 177rpx;
|
||||
background: #FFFFFF;
|
||||
padding: 0rpx 28rpx;
|
||||
border-radius: 21rpx 21rpx;
|
||||
margin-bottom: 21rpx;
|
||||
}
|
||||
|
||||
.uni-record {
|
||||
|
||||
}
|
||||
|
||||
.uni-record-top {
|
||||
margin-top: 60rpx;
|
||||
flex-direction: row;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
}
|
||||
|
||||
.uni-record-top-img {
|
||||
width: 59rpx;
|
||||
height: 58rpx;
|
||||
}
|
||||
|
||||
.uni-record-top-text {
|
||||
font-size: 33rpx;
|
||||
color: #000000;
|
||||
margin-top: 5rpx;
|
||||
}
|
||||
|
||||
.record-content-one {
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
margin-top: 30rpx;
|
||||
padding-bottom: 14rpx;
|
||||
border-bottom: 1rpx solid #333333;
|
||||
}
|
||||
|
||||
.content-onea {
|
||||
font-size: 26rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.content-oneb {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.content-oneb-img {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.content-oneb-txt {
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
|
||||
}
|
||||
|
||||
.record-content-two {
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
padding-top: 25rpx;
|
||||
}
|
||||
|
||||
.content-twoa {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.content-twob-txt {
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.content-twoa-txt {
|
||||
font-size: 26rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
margin-top: 20rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.content-twoa-img {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
}
|
||||
.dobox {
|
||||
position: absolute;
|
||||
|
||||
bottom: 0rpx;
|
||||
width: 750rpx;
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
|
||||
.inpit-box {
|
||||
@ -1879,12 +2049,15 @@
|
||||
height: 30rpx;
|
||||
}
|
||||
|
||||
|
||||
.gift-alert {
|
||||
width: 430rpx;
|
||||
// width: 480rpx;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
justify-content: space-around;
|
||||
// background-color: green;
|
||||
// animation: slideRight 1s linear forwards;
|
||||
animation: slideRight 1s linear forwards;
|
||||
z-index: 9999;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.gift-alerta {
|
||||
@ -1956,13 +2129,12 @@
|
||||
height: 60upx;
|
||||
|
||||
}
|
||||
|
||||
.send-boj-user-header {
|
||||
width: 63upx;
|
||||
height: 63upx;
|
||||
border-radius: 50%;
|
||||
margin-top: 0rpx;
|
||||
margin-left: -7rpx;
|
||||
margin-top: 3rpx;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -2070,7 +2242,7 @@
|
||||
|
||||
}
|
||||
|
||||
.room-users-box {
|
||||
.room-users-box {
|
||||
width: 200rpx;
|
||||
height: 70upx;
|
||||
|
||||
@ -2096,7 +2268,7 @@
|
||||
border-radius: 50%;
|
||||
margin-right: 10upx;
|
||||
overflow: hidden;
|
||||
|
||||
|
||||
}
|
||||
|
||||
// .top-scroll-users-header image {
|
||||
|
@ -211,12 +211,14 @@
|
||||
},
|
||||
type: 4,
|
||||
},
|
||||
|
||||
{
|
||||
name: '里海直播',
|
||||
icon: '/static/applet/live.png',
|
||||
data: {
|
||||
id: "__UNI__0E46DAD",
|
||||
url: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/app/__UNI__0E46DAD.wgt',
|
||||
url:'https://lihai001.oss-cn-chengdu.aliyuncs.com/app/__UNI__0E46DAD.wgt',
|
||||
|
||||
},
|
||||
type: 4,
|
||||
|
||||
|
@ -43,39 +43,41 @@
|
||||
|
||||
</scroll-view>
|
||||
<scroll-view scroll-top="0" scroll-y="true" class="goods_body_scroll" v-if="isindex==1">
|
||||
<view v-for="(pp,index) in roomList" :key="index">
|
||||
<view class="roomsbox-a" v-for="(kk,i) in pp" :key="i">
|
||||
<view class="roomsbox-title">
|
||||
{{i}}
|
||||
</view>
|
||||
<view class="roomsbox">
|
||||
<view class="roomblock" style="border: 1px solid #e1d9d4;" v-for="(room,j) in kk"
|
||||
:key="j" @click="hsitroyjump(room)">
|
||||
<image :src="room.cover" mode="aspectFill" v-if="room.cover"></image>
|
||||
<image src="/static/lw/6.gif" mode="aspectFill" v-else></image>
|
||||
<view class="livetitle">{{room.live_name}}</view>
|
||||
<view class="roomstatus-d" v-if="room.status==1" style="background-color: #09BB07;">
|
||||
<view v-for="(pp,index) in dataList" :key="index">
|
||||
<view class="roomsbox-a">
|
||||
<view class="roomsbox-title">
|
||||
{{pp.date}}
|
||||
</view>
|
||||
<view class="roomsbox">
|
||||
<view class="roomblock" style="border: 1px solid #e1d9d4;" v-for="(room,j) in pp.records"
|
||||
:key="j" @click="hsitroyjump(room)">
|
||||
<image :src="room.cover" mode="aspectFill" v-if="room.cover"></image>
|
||||
<image src="/static/lw/6.gif" mode="aspectFill" v-else></image>
|
||||
<view class="livetitle">{{room.live_name}}</view>
|
||||
<view class="roomstatus-d" v-if="room.status==1" style="background-color: #09BB07;">
|
||||
</view>
|
||||
<view class="roomstatus-d" v-else style="background-color: #fa2306;">
|
||||
</view>
|
||||
<view class="roomstatus-d" v-if="room.status==3" style="background-color: #e1d9d4;">
|
||||
</view>
|
||||
<view class="roomstatus" style="color: #00B26A;" v-if="room.status==1">直播中
|
||||
</view>
|
||||
<view class="roomstatus" style="color: #fa2306;" v-else>已停播
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="roomstatus-d" v-if="room.status==2"
|
||||
style="background-color: #fa2306;">
|
||||
</view>
|
||||
<view class="roomstatus-d" v-if="room.status==3" style="background-color: #e1d9d4;">
|
||||
</view>
|
||||
<view class="roomstatus" style="color: #00B26A;" v-if="room.status==1">直播中
|
||||
</view>
|
||||
<view class="roomstatus" style="color: #fa2306;" v-else>已停播
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
</scroll-view>
|
||||
<view class="noshuju" v-if="roomList.length==0&&isindex==0">
|
||||
<emptyPage title="暂无房间信息"></emptyPage>
|
||||
</view>
|
||||
<view class="noshuju" v-if="dataList.length==0&&isindex==1">
|
||||
<emptyPage title="暂无房间信息"></emptyPage>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
<view class="noshuju" v-if="roomList.length==0">
|
||||
<emptyPage title="暂无房间信息"></emptyPage>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
@ -110,6 +112,7 @@
|
||||
|
||||
],
|
||||
roomList: [],
|
||||
dataList:[],
|
||||
user: [],
|
||||
index: 0,
|
||||
isGetLoginInfo: true,
|
||||
@ -123,6 +126,7 @@
|
||||
},
|
||||
mounted() {
|
||||
this.getRoomList()
|
||||
this.getbackList()
|
||||
},
|
||||
onShow() {},
|
||||
onReachBottom() {
|
||||
@ -132,6 +136,7 @@
|
||||
onPullDownRefresh: function() {
|
||||
console.log('下拉刷新')
|
||||
this.getRoomList()
|
||||
this.getbackList()
|
||||
},
|
||||
methods: {
|
||||
|
||||
@ -147,6 +152,7 @@
|
||||
search() {
|
||||
this.page = 1
|
||||
this.roomList=[]
|
||||
this.dataList=[]
|
||||
if (this.isindex == 0) {
|
||||
this.getRoomList()
|
||||
} else {
|
||||
@ -159,6 +165,7 @@
|
||||
this.page = 1
|
||||
this.keyword=''
|
||||
this.roomList=[]
|
||||
this.dataList=[]
|
||||
if (i == 0) {
|
||||
this.getRoomList()
|
||||
} else {
|
||||
@ -173,22 +180,37 @@
|
||||
keyword: this.keyword
|
||||
}).then(res => {
|
||||
|
||||
if (res.data.code = 1) {
|
||||
uni.hideLoading()
|
||||
const groupedArray = res.data.lists.reduce((acc, obj) => {
|
||||
const date = obj.date;
|
||||
if (!acc[date]) {
|
||||
acc[date] = [];
|
||||
}
|
||||
acc[date].push(obj);
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
this.roomList.push(groupedArray)
|
||||
// 输出结果
|
||||
// console.log(this.roomList);
|
||||
// this.page = this.page + 1
|
||||
if (res.data.lists.length > 0) {
|
||||
|
||||
// 初始化一个空数组来存储结果
|
||||
let result = [];
|
||||
|
||||
// 遍历每一条直播记录
|
||||
for (let i = 0; i < res.data.lists.length; i++) {
|
||||
let record = res.data.lists[i];
|
||||
let date = record.date;
|
||||
|
||||
// 检查结果数组中是否已存在该日期的分组
|
||||
let group = result.find((item) => item.date === date);
|
||||
|
||||
// 如果不存在,则创建一个新的分组
|
||||
if (!group) {
|
||||
group = {
|
||||
date: date,
|
||||
records: []
|
||||
};
|
||||
result.push(group);
|
||||
}
|
||||
|
||||
// 将当前记录添加到对应的分组中
|
||||
group.records.push(record);
|
||||
}
|
||||
|
||||
this.dataList = result
|
||||
|
||||
// 输出结果
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
@ -203,7 +225,7 @@
|
||||
app_name: 'shop',
|
||||
keyword: this.keyword
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
|
||||
if (res.data.code = 1) {
|
||||
uni.hideLoading()
|
||||
if (res.data.lists.length > 0) {
|
||||
@ -215,6 +237,10 @@
|
||||
this.page = this.page + 1
|
||||
}
|
||||
|
||||
}else{
|
||||
uni.showModal({
|
||||
title:res.msg
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -27,7 +27,7 @@
|
||||
<!-- {{item}} {{i}} -->
|
||||
|
||||
</view>
|
||||
<sd-float-page :room='room' :msgList='msgList'
|
||||
<sd-float-page :room='room' :msgList='msgList' :heightG='boxStyle.height'
|
||||
:style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;position: absolute;' "></sd-float-page>
|
||||
</view>
|
||||
|
||||
@ -337,7 +337,6 @@
|
||||
this.page = that.page + 1
|
||||
}
|
||||
|
||||
console.log(this.dataList, this.dataList[this.k].id, 222222)
|
||||
},
|
||||
onpullingdown() {
|
||||
this.refreshing = true
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.6 KiB |
BIN
static/img/jl.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.9 KiB |
BIN
static/img/you.png
Normal file
After Width: | Height: | Size: 1.0 KiB |