createANewLiveRoom.vue 27.7 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993
<template>
  <div class="createANewLiveRoom" v-loading="loading">
    <div class="header">
      <div class="step">
        <div class="baseinfo">
          <div :class="['circular',{'circularAct':activePage =='1'}]">1</div>
          <div class="text">基本信息</div>
        </div>
        <div class="horizontalLine"></div>
        <div class="baseinfo">
          <div :class="['circular',{'circularAct':activePage =='2'}]">2</div>
          <div class="text">直播间配置</div>
        </div>
      </div>
    </div>
    <div class="baseInfoContainer" v-if="activePage =='1'">
      <div class="baseTitle">基本信息</div>
      <div class="baseFrame gl-form-page">
        <el-form :model="baseForm" :rules="baseRules" ref="baseForm" label-width="120px">
          <el-form-item label="直播间名称:" prop="name">
            <el-input v-model="baseForm.name" maxlength="20" show-word-limit></el-input>
          </el-form-item>
          <el-form-item label="直播间简介:">
            <el-input type="textarea" v-model="baseForm.introduction" maxlength="200"
                      show-word-limit></el-input>
          </el-form-item>
          <el-form-item label="开播时间:" prop="timeStr">
            <el-date-picker
              type="datetimerange"
              v-model="baseForm.timeStr"
              required
              range-separator="至"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :picker-options="pickerOptions"
              value-format="yyyy-MM-dd HH:mm:ss"
              :default-time="['00:00:00', '23:59:59']"
              popper-class="pickerWrapZ1"
            ></el-date-picker>
          </el-form-item>
        </el-form>

      </div>
    </div>

    <div class="configContainer" v-if="activePage =='2'">
      <div class="baseInfo baseSpace">
        <div class="baseTitle">
          基本信息
        </div>
        <div class="spaceFrame paddingSpace">
          <div class="displayImage">
            <i v-show="liveRoom.shareCardCover" class="el-icon-close deleteIcon"
               @click="liveRoom.shareCardCover = ''"></i>
            <template v-if="liveRoom.shareCardCover || liveRoom.shareCardPaper">

              <div class="timeline">{{ time }}</div>
              <div class="tainer">
                <div class="avator">
                  <img src="../../assets/live/avtar.png">
                </div>
                <div class="liveContainer">
                  <div class="imgYai"><img src="../../assets/live/DJcarlife.png"></div>
                  <div class="shareText">{{ liveRoom.shareCardPaper }}</div>
                  <div class="shareImg"><img v-if="liveRoom.shareCardCover" :src="liveRoom.shareCardCover" /></div>
                  <div class="shareIcon">
                    <div><img src="../../assets/live/icon.png"></div>
                    小程序
                  </div>
                </div>
              </div>
            </template>
          </div>
          <div class="displayIro">
            <div class="title">分享卡片封面</div>
            <div class="intro">
              <p>用户在微信对话框内分享的直播间将以分享卡片的形式呈现</p>
              <p>建议尺寸:800像素*640像素,图片大小不得超过10M。</p>
            </div>
            <el-button class="upload-panel">
              上传图片
              <input type="file" style="opacity: 0" ref="avatar" accept="*"
                     @change="uploadAvatar($event,'shareCardCover')" />
            </el-button>
            <div class="copywriting">
              <p>分享文案:</p>
              <div>
                <el-input maxlength="20" clearable v-model="liveRoom.shareCardPaper"
                          placeholder="请输入分享文案"></el-input>
              </div>
            </div>
          </div>

        </div>
      </div>

      <div class="baseInfo baseSpace">
        <div class="baseTitle">
          直播封面样式
        </div>
        <div class="spaceFrame paddingSpace">
          <div class="forn">
            <div class="liveContainerStyle">
              <i v-show="liveRoom.liveVideoCover" class="el-icon-close deleteIcon"
                 @click="liveRoom.liveVideoCover = ''"></i>
              <div>
                <div style="display: flex">
                  <div class="leftCon"><img v-show="liveRoom.liveVideoCover" :src="liveRoom.liveVideoCover"></div>
                  <div class="rightCon" v-show="liveRoom.liveVideoCover">
                    <div class="img"><img src="../../assets/live/DJcarlife.png"></div>
                    <p class="title">直播卡片</p>
                    <div class="white">
                      <div></div>
                      <div></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>


          <div class="displayIro">
            <div class="title">直播卡片封面</div>
            <div class="intro">
              <p>图片大小建议为800像素*800像素。</p>
              <p>图片大小不超过10M。</p>
              <p>图片内容遵循平台规范后更容易被推荐。</p>
            </div>
            <el-button class="upload-panel">
              上传图片
              <input type="file" style="opacity: 0" ref="avatar" accept="*"
                     @change="uploadAvatar($event,'liveVideoCover')" />
            </el-button>
          </div>
        </div>

      </div>

      <div class="baseInfo baseSpace">
        <div class="baseTitle">
          直播前预告
        </div>
        <div class="spaceFrameNew paddingSpace">
          <div class="select">
            <el-radio v-model="liveRoom.preLiveMediaType" :label="'0'">预告图</el-radio>
            <el-radio v-model="liveRoom.preLiveMediaType" :label="'1'">预告视频</el-radio>
          </div>
          <div class="photosContent" v-if="liveRoom.preLiveMediaType=='0'">
            <div class="trailerImage">
              <div class="imgDisplay">
                <i v-show="liveRoom.preLiveMediaFilePic" class="el-icon-close deleteIcon"
                   @click="liveRoom.preLiveMediaFilePic = ''"></i>
                <img v-show="liveRoom.preLiveMediaFilePic" :src="liveRoom.preLiveMediaFilePic" />
              </div>
              <div class="displayIro">
                <div class="title">预告图</div>
                <div class="intro">
                  <p>图片建议大小为750像素*1624像素</p>
                  <p>图片大小不超过10M</p>
                </div>
                <el-button class="upload-panel">
                  上传图片
                  <input type="file" style="opacity: 0" ref="avatar" accept="*"
                         @change="uploadAvatar($event,'preLiveMediaFilePic')" />
                </el-button>
              </div>
            </div>
            <div class="preview">
              <div class="imgDisplay">
                <i v-show="liveRoom.preLiveMediaCoverPic" class="el-icon-close deleteIcon"
                   @click="liveRoom.preLiveMediaCoverPic = ''"></i>
                <img v-show="liveRoom.preLiveMediaCoverPic" :src="liveRoom.preLiveMediaCoverPic" />
              </div>
              <div class="displayIro">
                <div class="title">预告预览图</div>
                <div class="intro">
                  <p>图片建议大小为320像素*320像素</p>
                  <p>图片大小不超过300KB</p>
                </div>
                <el-button class="upload-panel">
                  上传图片
                  <input type="file" style="opacity: 0" ref="avatar" accept="*"
                         @change="uploadAvatar($event,'preLiveMediaCoverPic')" />
                </el-button>
              </div>
            </div>
          </div>
          <div class="videoContent" v-if="liveRoom.preLiveMediaType=='1'">
            <div class="teaserVideo">
              <div class="video-panel" v-if="liveRoom.preLiveMediaFileVid">
                <video id="video" width="100%" height="100%" preload loop muted>
                  <source :src="liveRoom.preLiveMediaFileVid" type="video/mp4" />
                </video>
                <i class="el-icon-video-play" @click="handleLook('video')"></i>
                <i class="el-icon-close" @click="liveRoom.preLiveMediaFileVid = ''"></i>
              </div>
              <div style="width:100%;height:100%" v-else>
              </div>
              <div class="displayIro">
                <p class="title">预告视频</p>
                <p class="intro">视频大小不超过20M</p>
              </div>
              <el-button class="upload-panel">上传视频
                <input type="file" accept="video/*" @change="e => handleVideoChange(e)"
                       style="opacity: 0" />
              </el-button>
            </div>
            <div class="teaserVideoCover">
              <div style="width:100%;height:100%;position: relative">
                <i v-show="liveRoom.preLiveMediaCoverVid" class="el-icon-close deleteIcon"
                   @click="liveRoom.preLiveMediaCoverVid = ''"></i>
                <img class="img-w-h" :src="liveRoom.preLiveMediaCoverVid" v-show="liveRoom.preLiveMediaCoverVid" />
                <span class="img-btns" v-show="liveRoom.preLiveMediaCoverVid">
              </span>
              </div>
              <div class="displayIro">
                <p class="title">预告视频封面</p>
                <p class="intro">图片建议大小为375像素*282像素</p>
                <p class="intro">图片大小不超过10M</p>
              </div>
              <el-button class="upload-panel">
                上传图片
                <input type="file" style="opacity: 0" ref="avatar" accept="*"
                       @change="uploadAvatar($event,'preLiveMediaCoverVid')" />
              </el-button>
            </div>
          </div>
        </div>
      </div>

      <div class="baseInfo baseSpace">
        <div class="baseTitle">
          直播间背景
        </div>
        <div class="spaceFrame paddingSpace">
          <div class="liveRoomBackground">

            <div class="bgmDisplay">
              <div class="back" :style="{'background':backgroundData.bgc}">
                <i v-if="hasMediaCover" class="el-icon-close deleteIcon"
                   @click="liveRoom.liveBackgroundWall = ''"></i>
                <img v-if="hasMediaCover" :src="liveRoom.liveBackgroundWall">
              </div>
              <div class="sort">
                <div v-for="(item,index) in backgroundData.sortColor" :key="index">
                  <div class="sortSize" :style="{'background':item}" @click="changeBGC(item)"></div>
                </div>
              </div>
            </div>
            <div>
              <div class="displayIro">
                <div class="title">直播间背景墙</div>
                <div class="intro">
                  <p>直播间背景墙是每个直播间的默认背景。</p>
                  <p>建议尺寸:600像素*1300像素,图片大小不得超过10M。</p>
                </div>
                <el-button class="upload-panel">
                  上传图片
                  <input type="file" style="opacity: 0" ref="avatar" accept="*"
                         @change="uploadAvatar($event,'liveBackgroundWall')" />
                </el-button>
              </div>
            </div>
          </div>
        </div>
      </div>

    </div>


    <div class="foot">
      <div class="baseBtn" v-if="activePage =='1'">
        <el-button v-show="showDraft" @click="handleCreateorEdit('1')">草稿</el-button>
        <el-button @click="previousNextStep('next')" type="primary">下一步</el-button>
      </div>
      <div class="configBtn" v-if="activePage=='2'">
        <el-button v-show="showDraft" @click="handleCreateorEdit('1')">草稿</el-button>
        <el-button @click="previousNextStep('previous')">上一步</el-button>
        <el-button type="primary" @click="handleCreateorEdit">创建</el-button>
      </div>
    </div>
    <el-dialog class="image-dialog" :visible.sync="dialogVisibleImg" width="50%">
      <img :src="dialogSrc" width="100%" v-if="dialogType == 'img'" />
      <video width="100%" autoplay controls :src="dialogSrc" v-else></video>
    </el-dialog>
  </div>
</template>

<script>
import upload from "@/api/uploadApi";
import uploadMixin from "@/mixins/upload";

export default {
  name: "createANewLiveRoom",
  mixins: [uploadMixin],
  data() {
    return {
      loading: false,
      activePage: 1,
      incomingId: "",
      incomingStatus: "",
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() < Date.now() - 24 * 60 * 60 * 1000;
        }
      },
      showDraft: true,
      dialogType: "",
      dialogVisibleImg: false,
      baseForm: {
        name: "",
        introduction: "",
        timeStr: []
      },
      saveBaseForm: {},
      basevalid: "",
      baseRules: {
        name: [
          { required: true, message: "请输入直播间名称", trigger: "blur" }
          // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
        ],
        timeStr: [
          { required: true, message: "请选择开播时间", trigger: "change" }
        ]
      },
      hasMediaCover: false,
      // 分享卡片
      backgroundData: {
        bgc: "#EDF1F9",
        sortColor: ["#EDF1F9", "#000000", "#BDE1FF", "#FFDABB"]
      },
      time: "",
      liveRoom: {
        shareCardPaper: "",
        shareCardCover: "",
        liveVideoCover: "",
        preLiveMediaType: "0",
        preLiveMediaFile: "",
        preLiveMediaCover: "",
        liveBackgroundWall: "",
        preLiveMediaFilePic: "",
        preLiveMediaCoverPic: "",
        preLiveMediaFileVid: "",
        preLiveMediaCoverVid: ""
      }
    };
  },
  watch: {
    "liveRoom.liveBackgroundWall": {
      handler(newV, oldV) {
        if (/\.(jpg|jpeg|png|JPG|PNG)$/.test(newV)) {
          this.liveRoom.liveBackgroundWall = newV;
          this.hasMediaCover = true;
        } else {
          this.hasMediaCover = false;
          this.liveRoom.liveBackgroundWall = this.backgroundData.bgc = newV || this.backgroundData.bgc;
        }
      },
      immediate: true,
      deep: true
    },
    "liveRoom": {
      handler(newValue, oldValue) {
        if (newValue.copywriting !== undefined || newValue.shareCardCover !== undefined) {
          this.getNowTime();
        }
      },
      deep: true
    }
  },
  async created() {
    const { id } = this.$route.query.row;
    this.incomingId = id;
    if (id) {
      await this.$apis.live
        .LiveRoomDetailApi({ id })
        .then(res => {
          const status = res.status;
          if (status == "0" || status == "1") {
            this.showDraft = false;
          }
          this.incomingStatus = status;
          this.baseForm.name = res.name;
          this.baseForm.introduction = res.introduction;
          this.$set(this.baseForm, "timeStr", [res.startTimeStr.replace(/\//g, "-"), res.endTimeStr.replace(/\//g, "-")]);
          Object.keys(res).forEach(i => {
            this.liveRoom[i] = res[i] || this.liveRoom[i];
          });
          if (res.preLiveMediaType == "0") {
            this.liveRoom.preLiveMediaType = "0";
            this.liveRoom.preLiveMediaFilePic = res.preLiveMediaFile;
            this.liveRoom.preLiveMediaCoverPic = res.preLiveMediaCover;
          } else {
            this.liveRoom.preLiveMediaType = "1";
            this.liveRoom.preLiveMediaFileVid = res.preLiveMediaFile;
            this.liveRoom.preLiveMediaCoverVid = res.preLiveMediaCover;
          }
        });
    }
  },
  mounted() {
  },
  methods: {
    handleLook(type) {
      this.dialogType = type;
      this.dialogVisibleImg = true;
      this.dialogSrc = type == "img" ? this.liveRoom.preLiveMediaCover : this.liveRoom.preLiveMediaFileVid;
    },
    handleVideoChange(e) {
      const self = this;
      let file = e.target.files[0];
      const size = file.size / 1024 / 1024;
      if (size > 20) {
        this.$message.error("上传视频大小不能超过20M");
        return;
      }
      self.loading = true;
      upload.init().then(res => {
        if (res.status == 0) {
          upload
            .uploaded(file)
            .then(res => {
              self.loading = false;
              const videoUrl = res.video.url;
              self.$set(self.liveRoom, "preLiveMediaFileVid", videoUrl);
              self.$nextTick(() => {
                self.getImgUrl(videoUrl).then(res => {
                  self.$set(self.liveRoom, "preLiveMediaCoverVid", res);
                });
              });
            })
            .finally(end => {
              console.log(end);
            });
          upload.uploadEvent("", res => {
            console.log(res, "视频上传完成");
          });
          upload.uploadEvent("media_progress", res => {
            console.log(res);
          });
        }
      });
    },
    async handleCreateorEdit(draftFlag) {
      let sucText = "创建直播间成功!";
      let errText = "创建直播间失败!";
      const params = Object.assign(this.liveRoom, this.baseForm);
      if (params.preLiveMediaType == "0") {
        params.preLiveMediaFile = params.preLiveMediaFilePic || "";
        params.preLiveMediaCover = params.preLiveMediaCoverPic || "";
      } else {
        params.preLiveMediaFile = params.preLiveMediaFileVid || "";
        params.preLiveMediaCover = params.preLiveMediaCoverVid || "";
      }
      if (params.timeStr) {
        params.startTimeStr = params.timeStr[0] || "";
        params.endTimeStr = params.timeStr[1] || "";
      }
      delete params.preLiveMediaFilePic;
      delete params.preLiveMediaCoverPic;
      delete params.preLiveMediaFileVid;
      delete params.preLiveMediaCoverVid;
      delete params.timeStr;
      if (draftFlag == "1") {
        this.activePage == "1" && this.getFormValidation();
        if (this.basevalid) {
          params.draftFlag = "1";
          sucText = "草稿保存成功!";
          errText = "草稿保存失败!";
        } else {
          return false;
        }
      }
      // 24 属于新建
      if (!!this.incomingStatus && (this.incomingStatus == "2" || this.incomingStatus == "4")) {
        delete params.id;
      }
      // 01 就是属于编辑
      if (this.incomingId && this.incomingStatus == "0") {
        params.id = this.incomingId;
        sucText = "编辑成功!";
        errText = "编辑失败!";
      }
      await this.$apis.live.addOrUpdataLiveRoomApi(params).then(res => {
        if (res.code == "0") {
          this.$message.success(sucText);
          this.$router.push(
            { path: "./index" }
          );
        } else {
          this.$message.error(errText);
        }
      });
    },
    changeBGC(item) {
      this.backgroundData.bgc = item;
      this.liveRoom.liveBackgroundWall = item;
    },
    previousNextStep(step) {
      if (step == "next") {
        this.getFormValidation();
        if (this.basevalid) {
          this.activePage = "2";
        }
      } else if (step == "previous") {
        this.activePage = "1";
      }
    },
    getFormValidation() {
      this.$refs.baseForm.validate((valid) =>
        this.basevalid = valid
      );
    },
    getNowTime() {
      let date = new Date();
      let year = date.getFullYear();
      let month = date.getMonth() + 1;
      let monthStr = month >= 10 ? month : "0" + month;
      let day = date.getDate();
      let dayStr = day >= 10 ? day : "0" + day;
      let hour = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
      let minute = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
      this.time = year + "年" + monthStr + "月" + dayStr + "日" + " " + hour + ":" + minute;
    },
    uploadAvatar(e, refName) {
      this.uploadFile(e, refName);
    },
    uploadFile(e, refName, AllImgExt = ".jpg|.jpeg|.png") {
      const file = e.srcElement.files[0];
      let extName = file.name.substring(file.name.lastIndexOf(".")).toLowerCase();
      if (AllImgExt.indexOf(extName) === -1) {
        this.$message.error("上传格式不正确");
        return false;
      }
      const size = file.size / 1024 / 1024;
      if (size > 10) {
        this.$message.error("图片体积需小于10M");
        return;
      }
      let reader = new FileReader();
      let fileInfo = e.srcElement.files[0];
      reader.readAsDataURL(fileInfo);
      reader.onload = e => {
        const imgFile = e.target.result;
        const base64 = fileInfo.name.split(".")[1] + "@" + imgFile.split(",")[1];
        this.$apis.common.pictureUpload({ file: base64 }).then(res => {
          this.$set(this.liveRoom, refName, res);
        });
      };
    }
  }
};
</script>

<style lang="scss" scoped>

.upload-panel {
  cursor: pointer;
  background-size: 100% 100%;
  border: 1px solid #5850FF;
  border-radius: 4px;
  text-align: center;
  position: relative;
  color: #5850FF;

  .upload-view {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0px;
    left: 0px;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;

    &:hover {
      opacity: 1;
    }

    i {
      color: rgba(255, 255, 255, 0.8);
      font-size: 16px;

      &:first-child {
        margin-right: 5px;
      }
    }
  }

  input {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    cursor: pointer;
  }

  .upload-icon {
    font-size: 20px;
    margin-top: 25px;
    color: rgba(0, 0, 0, 0.45);
  }

  .upload-text {
    font-size: 14px;
    height: 20px;
    line-height: 20px;
    color: #666666;
  }
}

.displayIro {
  margin: 8px 0 0 0;

  .intro {
    font-size: 14px;
    color: #666666;
    margin: 16px 0;
    line-height: 24px;
  }

  .copywriting {
    margin-top: 35px;
    display: flex;
    align-items: center;

    p {
      font-size: 14px;
      color: #333;
    }
  }
}

.baseTitle {
  font-weight: 600;
  font-size: 16px;
  color: #333333;
  padding: 15px 0 15px 20px;
  border-bottom: 1px solid #E5E5E5;
}

.baseSpace {
  margin-top: 20px;
  background-color: #FFFFFF;
}

.paddingSpace {
  padding: 20px;
}

.displayIro {
  .title {
    color: #000000;
    font-weight: 600;
    font-size: 16px;
  }

  .intro {
    font-size: 14px;
  }
}

.createANewLiveRoom {
  .header {
    display: flex;
    justify-content: center;

    .step {
      width: 30%;
      display: flex;
      align-items: center;

      .horizontalLine {
        height: 1px;
        width: 30%;
        background: #C6C6C6;
        margin: 0 15px;
      }

      .baseinfo {
        display: flex;
        line-height: 32px;

        .text {
          margin-left: 8px;
          font-size: 16px;
          color: rgba(0, 0, 0, 0.85);
        }

        .circular {
          width: 32px;
          height: 32px;
          border-radius: 50%;
          border: 1px solid #C6C6C6;
          color: #C6C6C6;
          text-align: center;
          line-height: 32px;
        }

        .circularAct {
          background: #5850FF;
          border: none;
          color: #ffffff;
        }
      }
    }
  }

  .baseInfoContainer {
    height: calc(100vh - 240px);
    margin-top: 16px;
    background: #FFFFFF;

    .baseFrame {
      width: 40%;
      margin: 20px 0 0 20px;
    }
  }

  .configContainer {
    .baseInfo {
      .spaceFrame {
        display: flex;

        .displayImage {
          width: 280px;
          height: 280px;
          background: #F7F7F7;
          margin-right: 35px;
          position: relative;

          .timeline {
            text-align: center;
            font-size: 10px;
            color: #999999;
            margin: 16px 0;
          }

          .tainer {
            display: flex;

            .avator {
              width: 26px;
              height: 26px;
              margin-left: 16px;
            }

            .liveContainer {
              background: #FFFFFF;
              padding: 8px;
              width: 62%;
              height: 100%;

              .imgYai {
                width: 85px;
              }

              .shareText {
                font-size: 12px;
                color: #333333;
                margin: 8px 0
              }

              .shareImg {
                width: 100%;
                height: 128px;
                background: #F7F7F7;


                img {
                  width: 100%;
                  height: 100%;
                }
              }

              .shareIcon {
                display: flex;
                align-items: center;
                font-size: 8px;
                color: #666666;
                margin-top: 6px;

                div {
                  width: 10px;
                  height: 10px;

                  img {
                    width: 100%;
                    height: 100%;
                  }
                }
              }
            }

          }
        }

        .forn {
          display: flex;

          .liveContainerStyle {
            background: #F7F7F7;
            padding: 15px;
            margin-right: 35px;
            display: flex;
            position: relative;

            .leftCon {
              width: 160px;
              height: 160px;

              img {
                width: 100%;
                height: 100%;
              }
            }

            .rightCon {
              box-sizing: border-box;
              width: 160px;
              height: 160px;
              background: #FFFFFF;
              padding: 10px;
              font-size: 14px;
              color: #000000;

              .img {
                width: 85px;
              }

              .title {
                margin: 8px 0;
              }

              .white {
                display: flex;

                div {
                  width: 60px;
                  height: 60px;
                  background: #F7F7F7;
                  margin-right: 10px;
                }
              }
            }
          }
        }

      }

    }
  }

  .foot {
    margin-top: 20px;
    display: flex;
    justify-content: center;
  }
}

.spaceFrameNew {
  .photosContent {
    display: flex;
    margin: 16px 0;

    .trailerImage {
      .imgDisplay {
        background: #F7F7F7;
        width: 200px;
        height: 433px;
        margin-right: 35px;
        position: relative;

        img {
          height: 100%;
          width: 100%;
        }
      }
    }

    .preview {
      .imgDisplay {
        background: #F7F7F7;
        width: 160px;
        height: 160px;
        position: relative;

        img {
          width: 100%;
        }
      }
    }
  }
}

.liveRoomBackground {
  display: flex;

  .bgmDisplay {
    margin-right: 35px;
    position: relative;

    .back {
      width: 200px;
      height: 433px;

      img {
        width: 100%;
        height: 100%;
      }
    }

    .sort {
      width: 200px;
      display: flex;
      margin-top: 10px;
      justify-content: space-evenly;

      .sortSize {
        width: 40px;
        height: 40px;
        cursor: pointer;
        border-radius: 2px;
      }
    }
  }
}

img {
  width: 100%;
  height: 100%;
}

.videoContent {
  display: flex;
  margin-top: 10px;
  height: 440px;

  .teaserVideo {
    width: 200px;
    height: 150px;
    background: #F7F7F7;
  }

  .teaserVideoCover {
    margin-left: 150px;
    width: 200px;
    height: 150px;
    background: #F7F7F7;
  }
}

.video-panel {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;

  video {
    position: absolute;
    object-fit: fill;
  }

  .el-icon-video-play {
    z-index: 10;
    font-size: 20px;
    color: #fff;
    cursor: pointer;
  }

  .el-icon-close {
    position: absolute;
    top: 0px;
    right: 0px;
    background: #000000;
    color: #fff;
  }
}

.deleteIcon {
  position: absolute;
  right: 0;
  top: 0;
  cursor: pointer;
}
</style>