|
@@ -10,89 +10,91 @@
|
|
|
mode="horizontal"
|
|
|
@select="handleSelect"
|
|
|
>
|
|
|
- <el-menu-item index="1" class="menu-item">私域直播</el-menu-item>
|
|
|
- <el-menu-item index="2" class="menu-item">展会直播</el-menu-item>
|
|
|
+ <el-menu-item index="/userhomepage/live/sylive" class="menu-item">私域直播</el-menu-item>
|
|
|
+ <el-menu-item index="/userhomepage/live/zhlive" class="menu-item">展会直播</el-menu-item>
|
|
|
</el-menu>
|
|
|
<el-button class="downloadApps">下载开播客户端</el-button>
|
|
|
- <el-descriptions title="直播账号信息" :column="2">
|
|
|
- <el-descriptions-item v-if="show" label="直播账号" contentClassName="my-content">10000000000</el-descriptions-item>
|
|
|
- <el-descriptions-item v-if="show" label="开播时间">2021-12-23 17:00</el-descriptions-item>
|
|
|
- <el-descriptions-item v-if="show" label="密码">32114321432</el-descriptions-item>
|
|
|
+ <!-- <el-descriptions title="直播账号信息" :column="2">
|
|
|
+ <el-descriptions-item v-if="show" label="直播账号" contentClassName="my-content">{{userInfo.createdby}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item v-if="show" label="开播时间">{{userInfo.changedate.substr(0 , userInfo.changedate.length-3)}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item v-if="show" label="密码">{{userInfo.channelpasswd}}</el-descriptions-item>
|
|
|
<el-descriptions-item v-if="show" label="直播间地址" >
|
|
|
- www.jfc001.com/zb001
|
|
|
- <span class="akeyassignment">一键复制</span>
|
|
|
+ {{userInfo.fliveshowurl}}
|
|
|
+ <span class="akeyassignment" @click="akeyCopy">一键复制</span>
|
|
|
</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
<el-button class="akey themeButton" v-if="show" >一键开播</el-button>
|
|
|
- <el-button class="noAccount" v-if="!show">暂无账号 前往申请 》</el-button>
|
|
|
+ <el-button class="noAccount" v-else @click="supplyLive()" ref="supplylive">{{buttonValue}}</el-button> -->
|
|
|
</div>
|
|
|
-
|
|
|
- <div class="living_bottom">
|
|
|
+ <div>
|
|
|
+ <router-view></router-view>
|
|
|
+ </div>
|
|
|
+ <!-- <div class="living_bottom">
|
|
|
<p class="living_bottom_title">直播数据</p>
|
|
|
<ul class="living_bottom_data">
|
|
|
<li>
|
|
|
<span>观看次数(次)</span>
|
|
|
- <span>123</span>
|
|
|
+ <span>{{userLiveData.viewCounts}}</span>
|
|
|
</li>
|
|
|
<li>
|
|
|
<span>观看时长(分钟)</span>
|
|
|
- <span>123</span>
|
|
|
+ <span>{{userLiveData.viewCountsAvg}}</span>
|
|
|
</li>
|
|
|
<li>
|
|
|
<span>观看人数(人)</span>
|
|
|
- <span>123</span>
|
|
|
+ <span>{{userLiveData.viewers}}</span>
|
|
|
</li>
|
|
|
<li>
|
|
|
<span>人均观看时长(分钟)</span>
|
|
|
- <span>123</span>
|
|
|
+ <span>{{userLiveData.viewDurationAvg}}</span>
|
|
|
</li>
|
|
|
<li>
|
|
|
<span>人均观看次数(次)</span>
|
|
|
- <span>123</span>
|
|
|
+ <span>{{userLiveData.viewDuration}}</span>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<el-table
|
|
|
- :data="tableData"
|
|
|
+ :data="userListData"
|
|
|
:header-cell-style= "{background: '#F6F7F8', borderRadius: '4px 4px 0px 0px'}"
|
|
|
style="width: 100%">
|
|
|
<el-table-column
|
|
|
- prop="date"
|
|
|
+ prop="name"
|
|
|
label="用户昵称">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="name"
|
|
|
+ prop="playduration"
|
|
|
label="观看时长">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="date"
|
|
|
+ prop="datetime"
|
|
|
label="进入时间">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="date"
|
|
|
+ prop="province"
|
|
|
label="地区">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="date"
|
|
|
+ prop="city"
|
|
|
label="城市">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="date"
|
|
|
+ prop="ipaddress"
|
|
|
label="观看ip">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="date"
|
|
|
+ prop="ismobile"
|
|
|
label="观看终端">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="date"
|
|
|
+ prop="viewcount"
|
|
|
label="场次">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="date"
|
|
|
+ prop="viewtype"
|
|
|
label="观看类型">
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
|
|
|
</div>
|
|
|
<SystemLoginCopyBottom bgc_blue="background: #4DC2D4"/>
|
|
@@ -113,37 +115,88 @@
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
+ // 按钮值
|
|
|
+ buttonValue: "",
|
|
|
// 资讯导航index
|
|
|
- activeIndex: '1',
|
|
|
- tableData: [{
|
|
|
- date: '2016-05-02',
|
|
|
- name: '王小虎',
|
|
|
- address: '上海市普陀区金沙江路 1518 弄'
|
|
|
- }, {
|
|
|
- date: '2016-05-04',
|
|
|
- name: '王小虎',
|
|
|
- address: '上海市普陀区金沙江路 1517 弄'
|
|
|
- }, {
|
|
|
- date: '2016-05-01',
|
|
|
- name: '王小虎',
|
|
|
- address: '上海市普陀区金沙江路 1519 弄'
|
|
|
- }, {
|
|
|
- date: '2016-05-03',
|
|
|
- name: '王小虎',
|
|
|
- address: '上海市普陀区金沙江路 1516 弄'
|
|
|
- }],
|
|
|
- show: false
|
|
|
+ activeIndex: '/userhomepage/live/sylive',
|
|
|
+ // 用户观看列表
|
|
|
+ userListData: [],
|
|
|
+ show: false,
|
|
|
+ // 用户直播信息详情
|
|
|
+ userInfo: {},
|
|
|
+ // 用户直播数据
|
|
|
+ userLiveData: {}
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
this.activeIndex = sessionStorage.getItem("key");
|
|
|
+ this.getLiveDetail();
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 获取是否有账号,
|
|
|
+ async getLiveDetail() {
|
|
|
+ const res = await this.$http.post("", this.getFullItfLiveRoom("getSYLiveInfo"))
|
|
|
+ if (res.data.code == 3) {
|
|
|
+ this.show = false;
|
|
|
+ this.buttonValue = "暂无账号 点击申请 >>";
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (res.data.code == 2) {
|
|
|
+ this.show = false;
|
|
|
+ this.buttonValue = "正在申请 请稍等 ...";
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (res.data.code == 1) {
|
|
|
+ this.show = true;
|
|
|
+ this.userInfo = res.data.data[0];
|
|
|
+ }
|
|
|
+ const res1 = await this.$http.post("", this.getFullItfLiveRoom("getSYLiveDataCount"));
|
|
|
+ const {data: {data}} = res1;
|
|
|
+ data.viewers = data.viewers.substr(0, data.viewers.length - 3);
|
|
|
+ data.viewCounts = data.viewCounts.substr(0, data.viewCounts.length - 3);
|
|
|
+ this.userLiveData = res1.data.data;
|
|
|
+ const res2 = await this.$http.post("", this.getFullItfLiveRoom("getSYLiveUserList"));
|
|
|
+ res2.data.data[0].ismobile == "N" ? res2.data.data[0].ismobile = "手机" : res2.data.data[0].ismobile = "不是手机"
|
|
|
+ this.userListData = res2.data.data;
|
|
|
+
|
|
|
+ },
|
|
|
+ // 直播间申请请求
|
|
|
+ async supplyLive() {
|
|
|
+ await this.$http.post("", this.getFullItfLiveRoom("applySYLive"));
|
|
|
+ this.getLiveDetail();
|
|
|
+
|
|
|
+ },
|
|
|
+ // 一键复制
|
|
|
+ async akeyCopy() {
|
|
|
+ // let data = new DataTransfer();
|
|
|
+ // data.items.add("text/plain", this.userInfo.fliveshowurl);
|
|
|
+ // console.log(data);
|
|
|
+ // await navigator.clipboard.write(data).then( function(){
|
|
|
+ // alert("直播地址已复制到剪贴板上去")
|
|
|
+ // }), function() {
|
|
|
+ // alert("一键复制失败");
|
|
|
+ // }
|
|
|
+ },
|
|
|
+
|
|
|
// 选择导航index方法
|
|
|
handleSelect(key, keyPath) {
|
|
|
sessionStorage.setItem("key", key);
|
|
|
this.activeIndex = key
|
|
|
},
|
|
|
+
|
|
|
+ // 请求直播详情查询请求体
|
|
|
+ // 请求直播数据请求体 和 直播间申请请求体
|
|
|
+ getFullItfLiveRoom(method) {
|
|
|
+ this.$store.commit("getTokenInterfaceBaseType", {
|
|
|
+ classname: 'customer.live.live',
|
|
|
+ method,
|
|
|
+ })
|
|
|
+ const interfaceType = this.$store.state.interfaceData;
|
|
|
+ interfaceType.content = {
|
|
|
+ }
|
|
|
+
|
|
|
+ return interfaceType;
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|