فهرست منبع

对直播接口

余胜明 3 سال پیش
والد
کامیت
7f3194e4b9

+ 22 - 14
Desktop/buwanjia/src/commonCmp/AccountCenter/AccountCenterTop.vue

@@ -13,7 +13,7 @@
             </div>
             <ul class="logout manyRole">
                 <li @click="backhomepage">用户首页</li>
-                <li @click="accountcenter">账户中心</li>
+                <li @click="jumpAccountCenter">账户中心</li>
                 <li @click="logoutAccount">注销登陆</li>
             </ul>
         </div>
@@ -42,31 +42,38 @@
                 const res = await this.$http.post("", this.getFullItfUserAvatar());
                 if (res.status >= 300 && res.status < 200) return;
                 const {data: {data}} = res;
-                if (data[0].length === 0) return;
+                if (data.length === 0) return;
                 this.url = data[0].fobsurl
             },
-
             clickSelectAccount (currentInfo) {
                 this.$store.commit("selectAccount", currentInfo);
                 const address = window.location.href.split('/');
                 console.log(address[4]);
+                    if (address[4] === "accountcenter") {
+                        console.log(address);
+                        if (address[5] === "userinfo") {
+                            this.$router.go(0);
+                        }
+                        this.$router.push("/accountcenter")
+                    }
+                    if (address[4] === "userhomepage") {
+                        if (!address[5]) {
+                            this.$router.go(0);
+                        }
+                        console.log(`/${address[4]}`);
+                        this.$router.push(`/${address[4]}`)
+                    }
+            },
+            jumpAccountCenter() {
+                const address = window.location.href.split('/');
+                console.log(address[5]);
                 if (address[4] === "accountcenter") {
                     if (address[5] === "userinfo") {
                         this.$router.go(0);
+                        return;
                     }
                     this.$router.push("/accountcenter")
                 }
-                if (address[4] === "userhomepage") {
-                    if (!address[5]) {
-                        this.$router.go(0);
-                    }
-                    console.log(`/${address[4]}`);
-                    this.$router.push(`/${address[4]}`)
-                }
-
-            },
-            accountcenter() {
-                this.$router.push("/accountcenter");
             },
             backhomepage() {
                 const address = window.location.href.split('#/')[1];
@@ -203,6 +210,7 @@
                 img {
                     height: 4.5rem;
                     width: 4.5rem;
+                    border-radius: 50%;
                 }
             }
             .logout {

+ 8 - 4
Desktop/buwanjia/src/components/AccountCenter/PartnerAgents.vue

@@ -6,8 +6,8 @@
             <el-button icon="el-icon-plus" class="addAgents themeButton" @click="addPartnerList">添加</el-button>
         </div>
         <ul class="partnerAgents_ul">
-            <CardList v-for="(item, index) in 8" :key="index">
-                <span @click="jumpPartnerDetail" class="slotName">合作详情</span>
+            <CardList v-for="(item, index) in agentsList" :key="index">
+                <span @click="jumpPartnerDetail(item)" class="slotName">合作详情</span>
             </CardList>
         </ul>
         <el-pagination
@@ -42,7 +42,8 @@
                     pageSize: 8,
                     // 当前产品总数
                     pageTotal: 0,
-                },                       
+                },   
+                agentsList: [],                    
             }
         },
         created() {
@@ -55,6 +56,8 @@
                 const res = await this.$http.post("", this.getFullItfPartnerAgents());
                 if (res.status >= 300 && res.status < 200) return;
                 console.log(res);
+                this.agentsList = res.data.data;
+
             },
             getSearchList() {
 
@@ -72,7 +75,8 @@
                 this.queryInfo.pageSize = newPage;
                 this.getTeamMsgListInfo();
             },
-            jumpPartnerDetail() {
+            jumpPartnerDetail(item) {
+                sessionStorage.setItem("agentList", item);
                 this.$router.push("/accountcenter/partnerdetail");
             },
 

+ 1 - 19
Desktop/buwanjia/src/components/Exhibition/ExhibitionIndex.vue

@@ -70,11 +70,6 @@
                 <div class="blueShortLine"></div>
                 <div class="hotAgents_main">
                     <el-select placeholder="区域"></el-select>
-                    <el-carousel :interval="4000" type="card" height="200px" :autoplay="false">
-                        <el-carousel-item v-for="item in 6" :key="item">
-
-                        </el-carousel-item>
-                    </el-carousel>
                 </div>
             </div>
         </div>
@@ -311,20 +306,7 @@
                     /deep/ .el-input__inner {
                         border-radius: 2rem;
                     }
-                    .el-carousel__item h3 {
-                        color: #475669;
-                        font-size: 14px;
-                        opacity: 0.75;
-                        line-height: 200px;
-                        margin: 0;
-                    }
-                    .el-carousel__item:nth-child(2n) {
-                        background-color: #99a9bf;
-                    }
-                    
-                    .el-carousel__item:nth-child(2n+1) {
-                        background-color: #d3dce6;
-                    }
+                        
                 }
 
             }

+ 99 - 46
Desktop/buwanjia/src/components/HomePage/Live/Live.vue

@@ -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>

+ 1 - 1
Desktop/buwanjia/src/components/HomePage/Live/LiveSupply.vue → Desktop/buwanjia/src/components/HomePage/Live/SyLive.vue

@@ -6,7 +6,7 @@
 
 <script type='text/javascript'>
     export default {
-        name: "LiveSupply"
+        name: "SyLive"
     }
 </script>
 

+ 15 - 0
Desktop/buwanjia/src/components/HomePage/Live/ZhLive.vue

@@ -0,0 +1,15 @@
+<template>
+    <div>
+        
+    </div>
+</template>
+
+<script type='text/javascript'>
+    export default {
+        name: "ZhLive"
+    }
+</script>
+
+<style lang='scss' scoped>
+    
+</style>

+ 6 - 1
Desktop/buwanjia/src/components/HomePage/Supply/SupplyItem.vue

@@ -25,7 +25,7 @@
         </p>
         <div v-if="status">
             <el-button class="contact1 areaItem_contact" :disabled="disabled">待对接</el-button>
-            <el-button class="contact2 areaItem_contact" :disabled="disabled">编辑</el-button>
+            <el-button class="contact2 areaItem_contact" @click="editDemand(item)" :disabled="disabled">编辑</el-button>
             <el-button class="contact3 areaItem_contact" @click="offline(item.tsupplyanddemandid)" :disabled="disabled">下架</el-button>
         </div>
         <ul v-if="disable" class="takingList" >
@@ -68,6 +68,7 @@
             }
         },
         methods: {
+            // 跳用户详情
             jumpLastSupply() {
                 console.log(this.item.tsupplyanddemandid);
                 sessionStorage.setItem("itemid", this.item.tsupplyanddemandid);
@@ -78,6 +79,10 @@
                 this.disable = !this.disable;
 
             },
+            // 编辑
+            editDemand() {
+                // this.$router.push("PulishDemand");
+            },
 
             // 发送下架请求
             async offline(tsupplyanddemandid) {

+ 5 - 1
Desktop/buwanjia/src/components/HomePage/Supply/SupplySquare.vue

@@ -30,6 +30,9 @@
             AccountCenterTop,
             SystemLoginCopyBottom
         },
+        created() {
+            this.activePath =  sessionStorage.getItem("supplyPathKey");
+        },
         data() {
             return {
                 // 列表展示
@@ -39,13 +42,14 @@
                     {id: 3, authname: 'userhomepage/supplydemand', title: "我的需求"}, 
                 ],
                 // 被激活的链接地址
-                activePath: '',
+                activePath: '1',
             }
         },
         methods: {
             // 选择导航index方法
             handleSelect(key, keyPath) {
                 this.activeIndex = key
+                sessionStorage.setItem("supplyPathKey", key)
             },
         }
     }

+ 0 - 104
Desktop/buwanjia/src/components/SystemLogin/AgentLogin.vue

@@ -156,110 +156,6 @@
             }
         },
         methods: {
-            async uploadSuccess(event) {
-                // 初始化this
-                const that = this;
-                const file = event.target.files[0];
-                let reader = new FileReader();
-                // reader.readAsDataURL(event.target.files[0]);
-                // reader.addEventListener('load',function() {
-                //     that.list = this.result;
-                // })
-                // 解构store中当前选择身份的token和tagentsid
-                const {token, tagentsid} = this.$store.state.selectAccount
-                // 发送上传申请的接口
-                const res = await this.$http.post("", {
-                    accesstoken: token,
-                    classname: "system.system.docManage",
-                    method: "getFileName",
-                    content: {
-                        filename: event.target.files[0].name,
-                        filetype: "png",
-                        ownertable: "tagents",
-                        ownerid: tagentsid,
-                        ftype: "brandlogo",
-                    }
-                })
-                if (res.status < 200 && res.status >= 300) return;
-                console.log(res);
-                const {data: {data}} = res;
-                // let text = data.obsuploadurl.split(":443")[0];
-                // text = text + ":443/demoErweima.jpg";
-                // console.log(text);
-                // 上传华为云
-                const res1 = await that.$http.put(data.obsuploadurl, file);
-                if (res1.status < 200 && res1.status >= 300) return;
-                console.log(res1);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-                // // 预览上传文件的url
-                // this.imageUrl = URL.createObjectURL(file.raw);
-                // // 预览上传文件的名字
-                // this.fileList.filename = file.name;
-                // // 预览上传文件的类型
-                // this.fileList.filetype  = (file.raw.type.split('/'))[1];
-
-                // // 调申请接口
-                // const res = await that.$http.post("", this.getFullItfDocApply())
-                // if (res.status < 200 && res.status >= 300) return;
-                // console.log(res);
-
-
-            },
-            // async handleAvatarSuccess(_, file) {
-            //     // 预览上传文件的url
-            //     this.imageUrl = URL.createObjectURL(file.raw);
-            //     // 预览上传文件的名字
-            //     this.fileList.filename = file.name;
-            //     // 预览上传文件的类型
-            //     this.fileList.filetype  = (file.raw.type.split('/'))[1];
-
-            //     // 调申请接口
-            //     const res = await this.$http.post("", this.getFullItfDocApply())
-            //     if (res.status < 200 && res.status >= 300) return;
-            //     console.log(res);
-            //     //解构出data
-            //     const {data: {data}} = res;
-
-            //     // 华为云文件名
-            //     this.obsfilename = data.obsfilename;
-            //     console.log(data.obsuploadurl);
-            //     // 上传华为云
-            //     const res1 = await this.$http.put(data.obsuploadurl, file.row)
-            //     console.log(res1)
-            // },
-            // beforeAvatarUpload(file) {
-            //     // 上传文件格式限制
-            //     const isJPG = file.type === 'image/jpeg';
-            //     // 上传文件大小限制
-            //     const isLt10M = file.size / 1024 / 1024 < 10;
-
-            //     //  格式超出限制提示
-            //     if (!isJPG) {
-            //         this.$message.error('上传头像图片只能是 JPG 格式!');
-            //     }
-            //     //  大小超出限制提示
-            //     if (!isLt10M) {
-            //         this.$message.error('上传头像图片大小不能超过 10MB!');
-            //     }
-            //     return isJPG && isLt10M;
-            // },
-
             async nextStepBtn() {
                 this.$refs.updateFormRef.validate( async valid => {
                     if (!valid) return;

+ 15 - 4
Desktop/buwanjia/src/progressCmp/AccountCenter/NewPartner.vue

@@ -1,14 +1,24 @@
 <template>
     <div class="newPartner">
-        <img src="../../assets/images/UserHomepage/bedImg.png" alt="erweima">
-        <img src="../../assets/images/SystemLogin/logo2x.png" alt="Logo">
-        <p class="partnerContct">合作二维码 &nbsp;<span>下载</span></p>
+        <img :src="url" alt="erweima">
+        <p class="partnerContct">合作二维码 &nbsp;<span @click="download">下载</span></p>
     </div>
 </template>
 
 <script type='text/javascript'>
     export default {
-        name: "NewPartner"
+        name: "NewPartner",
+        data() {
+            return {
+                url: require('../../assets/images/UserHomepage/bedImg.png')
+            }
+        },
+
+        methods: {
+            download() {
+                window.open(this.url);
+            }
+        }
     }
 </script>
 
@@ -37,6 +47,7 @@
             span {
                 color: #4CBECF;
                 text-decoration: underline;
+                cursor: pointer;
             }
         }
     }

+ 1 - 1
Desktop/buwanjia/src/progressCmp/AccountCenter/Partner.vue

@@ -21,7 +21,7 @@
         name: "Parner",
         data() {
             return {
-                activeIndex: "1",
+                activeIndex: "/accountcenter/partneragents/newpartner",
                 partnerData: [
                     {id: 1, title: "创建新合作", authpath: "/accountcenter/partneragents/newpartner"},
                     {id: 2, title: "合作请求", authpath: "/accountcenter/partneragents/partnerrequest"}

+ 21 - 2
Desktop/buwanjia/src/progressCmp/AccountCenter/PartnerRequest.vue

@@ -2,7 +2,7 @@
     <div class="partnerRequest">
         <CardList>
             <div v-if="show">
-                <span>拒绝</span>
+                <span @click="refuseOperate">拒绝</span>
                 <span class="themeButton">同意</span>
             </div>
             <div v-else>
@@ -20,12 +20,31 @@
         name: "PartnerRequest",
         data() {
             return {
-                show: false,
+                show: true,
                 value: ""
             }
         },
         components: {
             CardList
+        },
+        methods: {
+            refuseOperate() {
+                
+            },
+
+            // 请求取消合作请求体
+            getFullItfRefuseRequest() {
+                this.$store.commit("getTokenInterfaceBaseType", {
+                    classname: 'customer.tagents.tagents',
+                    method: 'delete.cooperation'
+                })
+                const interfaceType = this.$store.state.interfaceData;
+                interfaceType.content = {
+                    tcooperationagentsid: "27103"
+                }
+
+                return interfaceType;
+            }, 
         }
     }
 </script>

+ 11 - 3
Desktop/buwanjia/src/router/index.js

@@ -27,7 +27,8 @@ import SupplyDemand from "../components/HomePage/Supply/SupplyDemand.vue"
 import PulishDemand from "../components/HomePage/Supply/PulishDemand.vue"
 import OBS_upload from "../components/SystemLogin/OBS_upload.vue"
 import Live from '../components/HomePage/Live/Live.vue'
-import LiveSupply from '../components/HomePage/Live/LiveSupply.vue'
+import SyLive from "../components/HomePage/Live/SyLive.vue"
+import ZhLive from "../components/HomePage/Live/ZhLive.vue"
 import ExhibitionIndex from "../components/Exhibition/ExhibitionIndex"
 
 // 将VueRouter挂载到Vue当中去
@@ -56,8 +57,15 @@ const router = new VueRouter({
                 { path: "/userhomepage/supplydemand", component: SupplyDemand },
             ]
         },
-        { path: "/userhomepage/live", component: Live},
-        { path: "/userhomepage/livesupply", component: LiveSupply},
+        { 
+            path: "/userhomepage/live", 
+            component: Live,
+            redirect: "/userhomepage/live/sylive",
+            children: [
+                {path: "/userhomepage/live/sylive", component: SyLive},
+                {path: "/userhomepage/live/zhlive", component: ZhLive},
+            ]
+        },
         { path: "/userhomepage/supplydemand/pulishdemand", component: PulishDemand},
         { 
             path: "/accountcenter",