livedControls.vue 16 KB
Newer Older
李嘉林 committed
1
<template>
程智春 committed
2
  <div class="livedControls" :style="{'bottom' : info.openPlayback == 0 && info.playbackUrl && info.playbackUrl[0] && info.liveBroadcastState == 2 ? '40px' : '20px'}">
李嘉林 committed
3
    <!-- 公告层 -->
程智春 committed
4
    <livedAnnouncement v-if="info.liveNotice && !info.playbackUrl" :liveNotice="info.liveNotice"></livedAnnouncement>
李嘉林 committed
5
    <!-- 用户进入通知 -->
李嘉林 committed
6
    <div class="userComing userComingAni" v-if="userComing">
李嘉林 committed
7
      <span>{{entryNoticeText}}</span>
李嘉林 committed
8 9
      <span>来了</span>
    </div>
李嘉林 committed
10
    <!-- 评论层 -->
李嘉林 committed
11 12 13
    <livedIsMsg
      :guestBookList="guestBookList"
      :updateVal="updateVal"
李嘉林 committed
14
      :isSend="isSend"
程智春 committed
15
      :liveId="liveId"
程智春 committed
16
      :info="info"
李嘉林 committed
17
      :fixedHeight="getBottom"
李嘉林 committed
18
    ></livedIsMsg>
李嘉林 committed
19
    <!-- 带货商品层 -->
李嘉林 committed
20
    <livedExplainingCommodities
李嘉林 committed
21
      v-if="(info.liveBroadcastState==1||info.liveBroadcastState==3)&&list"
李嘉林 committed
22 23
      :updateGoods="updateGoods"
      :goodsList="list"
程智春 committed
24
      :isFocusComments="isFocusComments"
李嘉林 committed
25
    ></livedExplainingCommodities>
李嘉林 committed
26
    <!-- 商品列表弹层 -->
李嘉林 committed
27 28
    <livedGoodsDia
      :showDia="showDia"
李嘉林 committed
29
      :updateVal="updateVal"
李嘉林 committed
30
      :goodsList="list"
李嘉林 committed
31
      :updateGoods="updateGoods"
李嘉林 committed
32
      v-if="list"
李嘉林 committed
33 34
      @changeStatus="changeStatus"
    ></livedGoodsDia>
李嘉林 committed
35
    <!-- 分享弹层 -->
李嘉林 committed
36
    <livedShareDia v-if="loadingShare"  :showShareDia="showShareDia" @closeShareDia="closeShareDia" :info="info"></livedShareDia>
李嘉林 committed
37
    <!-- 底部控制层 -->
程智春 committed
38
    <div class="control flex" >
李嘉林 committed
39
      <template v-if="!isSend">
李嘉林 committed
40
        <div class="goodsImg" @click="showGoodsList" v-if="info.liveBroadcastSales==0">
程智春 committed
41
          
李嘉林 committed
42
          <img src="../../../static/images/lived/goodsImg.png" alt />
李嘉林 committed
43
          <p class="goodsNum" v-if="list.length>0">{{list.length}}</p>
李嘉林 committed
44
        </div>
程智春 committed
45
        <div class="goodsImg" v-else></div>
程智春 committed
46
        <div class="iptCopy" v-if="!info.playbackUrl || info.liveBroadcastState==3 || info.liveBroadcastState==1" @click="isLogin">跟主播说点什么...</div>
程智春 committed
47
        <div class="iptCopy" style="background:none;" v-else></div>
李嘉林 committed
48
        <div class="shareIcon" @click="showShare">
李嘉林 committed
49
          <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAADwElEQVR4Xu2aS6hNURjH//+RgYGRKAMDr1tmFJGBSxmIjGTgKq/rUURi5qKQkhKlLt1IHkl05VUG7r3lkW4MPMIVRXkNFMqAqL++2len45y99mPtc/bu7FWnc2qv9X3f/7fX41trHaLFC1tcP0oAZQ9ocQLlEGjxDlBOguUQKIdAixPI1RCQ1EbyZSPfSW4ASHoGYCqABwC2kBxsBIhcAJB0CsDKCsGfAKwleTNrCHkB0A9gbpXY3wDWkDyTJYQ8AxjWvY3k4awgFAGAad9PcmcWEIoCwLQfJ7nBN4QiATDtl22yJPnDF4iiATDdAwGEdz4gFBGA6bacwXrCo7QQmg5A0iQAJ2osgy5tliusInnLVTHsecMBSBoHYAaAmcG3/R6ZUITlCgbhXML2jTsPkDQdwLrgkzTeeu22kjySxGjmPSBj4ZWa95HsigshMwCSxgDYHnzixpW0fjfJjXEaZwJAkiUsJn5CnGA81b0EoIPkryj2vAKQNA3AAQALojjPsI5trlaQ/ODy4Q2ApIUAzgMY5XLaoOdPAwiPM18GJa0H0N0gYXHcWK5gPeF2vUape4CkGwDs7ee1WK6wjGRvrQBTAZB0BcCSvCqviOsNyYleAUg6CmBzAcRbiAMk270BkGTCDUBRSjtJ20X+V2IPAUnzANSdVHJIZArJV14mQUkjAPQBmJ1DodUhfQcwluRPb8ugpIMAdhRA/BDJtihxRh4CkhYDuBrFaJPr9JGcHzWGOADs4KHZKa5L12mSlRcsrvrRzgMkLQdw1mmtuRX2ktwVN4RIPUDSfQCz4hpvYP1Okj1J/DkBSOoA4Pt66huA5wCeADC4qxOcCZrePwAWpTkXjALgguXSSegGbT4HS6cJfQFgsPpcX1Ktu0GXy/c2J5E0m4lLKIDgAHMowaGlTZj3APSTvOuKLgGAhwAsu0t9QeICEGeba/tu2xz1kgzdg1cDiQngOklbkr0UF4BrNsYcnu4AOEQycY4QA0APyU4vygMjdQFIGg/gbYizj4Hw1FfXEQEkOvV1wQoDEDb7HwvEhwFy+f73PAKATSTNp/cSBuAigKU1PNq/Nk76jCQEwFe7SCFpJ72ZlDAANvtPrvI6h6TN7l5LHQC2vJl45yqSJpgwAMP/2hq2P5rklzTO6rWVtAfA7ornlheY+NdZ+Ku0GQbAgrIZ18a5HSpa4pFZkWSriN0f2tDr8rHGRwnWmQlGMVLkOiWAIr89H7GXPcAHxSLbKHtAkd+ej9jLHuCDYpFtlD2gyG/PR+wt3wP+AsW7I1AzjlUOAAAAAElFTkSuQmCC" alt="">
李嘉林 committed
50
        </div>
李嘉林 committed
51 52
        <div class="heardIcon">
          <div class="clickEl" @click="addLike(1)"></div>
李嘉林 committed
53
          <img class="like" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAADu0lEQVR4Xu2aTYhOURjH//+VspRSksiKKRsjWShT2FE2jK80xAj5CpHkI8nkm8aYwZiGGTORDQsKzcpqZomtmixsWCnZPHpypl5v8957zrnnfrzve596N+99znP+z+8+5957PogmNzZ5/igBlBXQ5ATKIdDkBVA+BMshkHQIiMhiAGsBLAIwx/y+A9DfJwAvSP7w6UdEFgBYDaClIvYvE1vjPyI56RN7qo13BYhIO4AjAFZYCBgCMELytYUvHGOPABiyjV3dvzMAEVkK4DQABeBqrwD01RKbZuxaQp0AiMhmADcAzHXNvMr/Fsmjlf+lGTtKqzUAETkP4FzCxCubvyOpzw4t+dRix+m1AiAiXQBOxgXzuK6Jq4aQYKdkXCGpQzXSYgGIyA4Ag3GBCnr9AkmFXNNsAIwDWFbQBG1ktZKc8HoIisheAL02vRTYR986nb4APgJYWeDkbKUtJPl1OueaQ0BE5gFI9JVlqy4Dvw6SA64AtgAYzkBcFl0MkOxwBXAVwPEs1GXQxzjJ5a4A9NWnr8BGsEmS810BvAWwrhGyB/CH5AxXAC8BbGwQAD9JznIF0ANgX4MA+EJyiSuA0BOUPFmOkWxzBaAfQPoh1AhWc04QORcQkW8B5v5FANhGcsypAtRZRHQeoPOBerYJkq21EoirAJ0F6mywnq2TZJ8XgAaogsi7r/nZrAfMBvCmDtcEfqtmkp+jyjcWgKmCVQbCzDoaCy1xyVtVwFTCIrIJwGidAFhD8r2NVqsKqICgewHPbALn6LOBpO4/WJkTADMctupOjFX07J3aSTpVqTMAA2E7gCfZ5xfZ4y6Sj101eQEwEHYCmHaZyVVEAP8DJO/5xPEGYCDoMlO/T8cB25wgec03XiIABsJuAA99BSRsd47kxSQxEgMwEPborm8SIR5tu0ie8mj3X5MgAAwE3Xy4n1SQZfs7JA9b+ka6BQNgIOwH0B1CWESMbpIHQ/URFICBoOLuhhJYFaeHpEIOZsEBGAiHANwOpvJfoF6SwdcoUwFgIOj5oZuBIDwgmcrCTGoADIRjAK4nhNBPUl+1qViqAAwE3V7TbTYfq7mn5xNsujapAzAQ9HiNHrNxsUGS+rmdqmUCwEDQ8zqXLbN5SjKTfcnMABgIZwBcioEwTHKbJajEbpkCMBDOAqj1/T5K0ucApjeIzAEYCHosrvr01nOSuuyWqeUCwEDQMb4egB5+/kAylwWW3ABkepsjOisBFOVO5KWjrIC8yBel37ICinIn8tJRVkBe5IvS71/x8QxQBHuXTgAAAABJRU5ErkJggg==" alt="">
李嘉林 committed
54
          <p class="heardNum" v-if="likeNum>0">{{likeNumCopy}}</p>
李嘉林 committed
55
          <div class="box">
李嘉林 committed
56 57 58 59 60 61
            <div
              class="img"
              :class="{'imgAni':imgAni}"
              v-for="(item,index) in imgList"
              :key="index"
            >
李嘉林 committed
62 63
              <img :src="item.img" alt />
            </div>
李嘉林 committed
64
          </div>
李嘉林 committed
65
        </div>
程智春 committed
66
        
李嘉林 committed
67 68
      </template>
      <template v-else>
李嘉林 committed
69
        <div class="sendOut" :style="{'bottom':getBottom+'px'}">
李嘉林 committed
70 71
          <input
            class="sendIpt"
李嘉林 committed
72
            :adjust-position="false"
李嘉林 committed
73 74
            :focus="getFocus"
            type="text"
李嘉林 committed
75
            @focus="onFocus"
李嘉林 committed
76 77 78 79
            @blur="onblur"
            v-model="sendVal"
            placeholder="和主播说点什么吧~"
          />
李嘉林 committed
80 81 82
          <div class="send" :class="{'noSendVal':sendVal==''}" @click="toSend">发送</div>
        </div>
      </template>
李嘉林 committed
83
    </div>
李嘉林 committed
84
  </div>
李嘉林 committed
85 86 87
</template>

<script type="text/ecmascript-6">
李嘉林 committed
88
import livedAnnouncement from "@/components/livedModel/livedAnnouncement";
李嘉林 committed
89
import livedIsMsg from "@/components/livedModel/livedIsMsg";
李嘉林 committed
90
import livedExplainingCommodities from "@/components/livedModel/livedExplainingCommodities";
李嘉林 committed
91
import livedGoodsDia from "@/components/livedModel/livedGoodsDia";
李嘉林 committed
92
import livedShareDia from "@/components/livedModel/livedShareDia";
李嘉林 committed
93
import live from "@/api/live";
李嘉林 committed
94
export default {
李嘉林 committed
95 96 97 98 99 100 101 102 103
  props: [
    "info",
    "entryNoticeText",
    "updateVal",
    "guestBookList",
    "likeInfo",
    "goodsList",
    "updateGoods"
  ],
李嘉林 committed
104 105 106
  name: "",
  data() {
    return {
李嘉林 committed
107
      liveId: 0,
李嘉林 committed
108
      imgList: [],
李嘉林 committed
109
      likeNum: 0,
李嘉林 committed
110
      iconList: [
李嘉林 committed
111 112 113 114
        // "//img3.imgtn.bdimg.com/it/u=3743111107,1940472030&fm=11&gp=0.jpg",
        // "//img0.imgtn.bdimg.com/it/u=216605226,3652567530&fm=11&gp=0.jpg",
        // "//img3.imgtn.bdimg.com/it/u=3743111107,1940472030&fm=11&gp=0.jpg",
        // "//img2.imgtn.bdimg.com/it/u=1354268575,1268995723&fm=26&gp=0.jpg"
李嘉林 committed
115
      ],
李嘉林 committed
116
      list: [],
李嘉林 committed
117
      num: 0,
李嘉林 committed
118
      userComing: false,
李嘉林 committed
119
      showDia: false, //显示商品列表弹窗
李嘉林 committed
120
      showShareDia: false, //显示分享弹窗
李嘉林 committed
121 122
      isSend: false, //显示评论输入框
      sendVal: "", //输入内容
李嘉林 committed
123
      getFocus: false, //获取焦点
李嘉林 committed
124 125
      imgAni: false, //给点赞元素加动画
      getBottom:0,//动态绑定输入框位置
李嘉林 committed
126
      loadingShare:false,
李嘉林 committed
127
      isClick:true,
程智春 committed
128 129

      isFocusComments:false, //是否在评论中,如果在评论中就隐藏掉上屏商品
李嘉林 committed
130 131 132 133
    };
  },
  components: {
    livedAnnouncement,
李嘉林 committed
134
    livedIsMsg,
李嘉林 committed
135
    livedExplainingCommodities,
李嘉林 committed
136 137
    livedGoodsDia,
    livedShareDia
李嘉林 committed
138 139 140
  },
  computed: {
    likeNumCopy() {
李嘉林 committed
141
      return this.watchMan(this.likeNum);
李嘉林 committed
142
    }
李嘉林 committed
143
  },
李嘉林 committed
144 145 146
  watch: {
    updateVal(newVal, oldVal) {
      if (this.likeNum < this.likeInfo.likeNum) {
李嘉林 committed
147 148
        this.getAdd();
      }
李嘉林 committed
149 150 151
      this.likeNum = this.likeInfo.likeNum;
      if (this.entryNoticeText) {
        this.userComing = true;
李嘉林 committed
152
        setTimeout(() => {
李嘉林 committed
153
          this.userComing = false;
李嘉林 committed
154
        }, 4600);
李嘉林 committed
155 156
      } else {
        this.userComing = false;
李嘉林 committed
157
      }
李嘉林 committed
158
    },
李嘉林 committed
159 160 161
    updateGoods() {
      this.list = this.goodsList;
    }
李嘉林 committed
162 163
  },
  created() {},
李嘉林 committed
164
  onLoad(options) {
程智春 committed
165 166 167 168 169 170 171 172 173 174 175
    if(options.params){
      let params = JSON.parse(options.params);
      this.liveId = params.liveId;  
    }else if(options.scene){
      var scene = decodeURIComponent(options.scene); //参数二维码传递过来的参数
      console.log(scene)
      let sceneInfo = scene.split(',')
      console.log('sceneInfo',sceneInfo)
      this.liveId = sceneInfo[0].split('=')[1]
    }
    
李嘉林 committed
176 177
    let _this=this;
    wx.getStorage({
李嘉林 committed
178 179 180 181 182 183 184 185 186 187
      key: "sessionid",
      success(res) {
        _this.loadingShare=true;
      },
      fail(res) {
        _this.loadingShare=false;
      }
    });
    // 获取直播配置
    this.getLivedConfig();
李嘉林 committed
188
  },
李嘉林 committed
189
  mounted() {},
李嘉林 committed
190 191 192
  methods: {
    // 数量大于1w
    watchMan(val) {
程智春 committed
193
      return val - 0 > 10000 ? ((val - 0) / 10000).toFixed(1) + "w" : val;
李嘉林 committed
194
    },
李嘉林 committed
195 196
    // 点赞
    addLike(val) {
李嘉林 committed
197
      this.imgAni = true;
李嘉林 committed
198
      if (val == 1) {
李嘉林 committed
199 200 201 202
        // if (this.info.liveBroadcastState < 1) {
        //   this.notAgainLive();
        //   return;
        // }
李嘉林 committed
203
        this.likeNum++;
李嘉林 committed
204 205 206
        let query = {
          liveBroadcastId: this.liveId,
          clickNum: 1
李嘉林 committed
207
        };
李嘉林 committed
208
        live.addLiveLikeByUser(query).then(res => {});
李嘉林 committed
209 210 211 212 213 214 215 216 217 218
      }
      setTimeout(() => {
        this.num++;
        if (this.num >= 4) {
          this.num = 0;
        }
        this.imgList.push({
          img: this.iconList[this.num]
        });
      }, 300);
李嘉林 committed
219
    },
李嘉林 committed
220 221 222 223 224 225 226 227 228 229 230 231
    // 直播未开始提示
    notAgainLive() {
      wx.showModal({
        content: "直播还未开始",
        confirmColor: "#ff877d",
        success: function(res) {
          if (res.confirm) {
          } else if (res.cancel) {
          }
        }
      });
    },
李嘉林 committed
232 233 234 235 236 237 238 239 240 241
    // 接口获取触发点赞
    getAdd() {
      if (this.imgList.length > 20) {
        this.imgList = [];
      }
      for (let i = 0; i < this.iconList.length; i++) {
        setTimeout(() => {
          this.addLike(2);
        }, 200 * i);
      }
李嘉林 committed
242 243 244 245 246 247 248
    },
    // 显示商品
    showGoodsList() {
      this.showDia = true;
    },
    changeStatus() {
      this.showDia = false;
李嘉林 committed
249
    },
李嘉林 committed
250
    showShare() {
李嘉林 committed
251
      this.loadingShare=true;
李嘉林 committed
252 253 254 255 256
      this.showShareDia = true;
    },
    closeShareDia() {
      this.showShareDia = false;
    },
李嘉林 committed
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
    // 是否登录
    isLogin() {
      let _this = this;
      wx.getStorage({
        key: "sessionid",
        success(res) {
          _this.toSendOut();
        },
        fail(res) {
          console.log("未登录------150");
          // 跳转登录页
          let backUrl = "/lived/main";
          let query = {
            liveId: _this.liveId,
            fromType: "mini"
          };
          let url = `/pages/login/main?back=${backUrl}&params=${JSON.stringify(
            query
          )}`;
          wx.navigateTo({
            url: url
          });
        }
      });
    },
李嘉林 committed
282
    // 发送评论
李嘉林 committed
283 284 285
    toSendOut() {
      this.isSend = true;
      this.getFocus = true;
李嘉林 committed
286 287
    },
    // 失焦点
李嘉林 committed
288
    onblur() {
李嘉林 committed
289
      this.imgAni = false;
李嘉林 committed
290 291 292
      setTimeout(() => {
        this.isSend = false;
        this.sendVal = "";
程智春 committed
293
        this.isFocusComments = false;
李嘉林 committed
294
      }, 300);
李嘉林 committed
295
    },
李嘉林 committed
296 297
    // 获取焦点
    onFocus(e){
程智春 committed
298
      this.isFocusComments = true;
李嘉林 committed
299
      this.getBottom=(e.mp.detail.height-10);
李嘉林 committed
300
    },
李嘉林 committed
301
    // 点击发送留言
李嘉林 committed
302
    toSend() {
李嘉林 committed
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318
      if(this.isClick){
        this.isClick=false;
        setTimeout(() => {
          this.isClick=true;
        },300);
        console.log("点击按钮-------------------200");
        if (this.sendVal == "") {
          this.getFocus = true;
        } else {
          let query = {
            guestbookType: "1",
            guestbookContent: this.sendVal,
            liveBroadcastId: Number(this.liveId)
          };
          this.$emit("toSendMsg", query);
        }
李嘉林 committed
319
      }
李嘉林 committed
320 321 322
    },
    getLivedConfig(){
      let configCode="LIVE_LIKE_ICON";
李嘉林 committed
323 324 325 326
      live.getConfigValueByConfigCode({configCode}).then(res=>{
        if(res.data.code==200){
          let newArr=res.data.data;
          this.iconList=JSON.parse(newArr);
李嘉林 committed
327 328
        }
      })
李嘉林 committed
329 330 331
    }
  }
};
李嘉林 committed
332 333 334
</script>

<style lang="scss" scoped>
李嘉林 committed
335
.flex {
李嘉林 committed
336 337
  display: flex;
}
李嘉林 committed
338
.livedControls {
李嘉林 committed
339
  position: fixed;
李嘉林 committed
340 341
  left: 0;
  width: 100vw;
程智春 committed
342
  z-index: 2;
李嘉林 committed
343
  .userComing {
李嘉林 committed
344 345 346 347 348 349 350 351 352 353
    margin-bottom: 10px;
    background: rgba(#000, 0.4);
    color: #fff;
    font-size: 16px;
    height: 26px;
    line-height: 26px;
    border-radius: 26px;
    padding: 0 8px;
    display: inline-block;
  }
李嘉林 committed
354
  .userComingAni {
李嘉林 committed
355
    animation: userComingAni 4.7s linear;
李嘉林 committed
356 357
  }
  @keyframes userComingAni {
李嘉林 committed
358
    0% {
李嘉林 committed
359 360 361
      transform: translateX(150vw);
      opacity: 0.3;
    }
李嘉林 committed
362
    30% {
李嘉林 committed
363 364 365
      transform: translateX(12px);
      opacity: 1;
    }
李嘉林 committed
366
    80% {
李嘉林 committed
367 368 369
      transform: translateX(12px);
      opacity: 1;
    }
李嘉林 committed
370
    100% {
李嘉林 committed
371 372 373 374
      transform: translateX(-150vw);
      opacity: 0;
    }
  }
李嘉林 committed
375
  .control {
李嘉林 committed
376 377 378 379
    height: 40px;
    align-items: center;
    justify-content: space-around;
    padding: 0 12px;
李嘉林 committed
380
    .goodsImg {
李嘉林 committed
381 382 383
      width: 30px;
      height: 30px;
      position: relative;
李嘉林 committed
384
      img {
李嘉林 committed
385 386 387 388 389 390 391
        width: 30px;
        height: 30px;
        position: absolute;
        top: 0;
        left: 0;
        z-index: -1;
      }
李嘉林 committed
392
      .goodsNum {
李嘉林 committed
393 394 395 396 397 398
        color: #fff;
        font-size: 14px;
        text-align: center;
        margin-top: 10px;
      }
    }
李嘉林 committed
399
    .iptCopy {
李嘉林 committed
400 401
      margin: 0 10px;
      width: 50vw;
李嘉林 committed
402
      background: rgba(#000, 0.4);
李嘉林 committed
403 404 405 406 407 408 409
      color: #999;
      font-size: 16px;
      height: 38px;
      border-radius: 38px;
      line-height: 38px;
      text-indent: 1em;
    }
李嘉林 committed
410
    .shareIcon,
李嘉林 committed
411
    .heardIcon{
李嘉林 committed
412
      position: relative;
李嘉林 committed
413
      width: 50px;
李嘉林 committed
414
      height: 30px;
李嘉林 committed
415 416 417 418 419 420 421
      display: flex;
      justify-content: center;
      align-items: center;
      img{
        width: 32px;
        height: 32px;
      }
李嘉林 committed
422
    }
李嘉林 committed
423
    .heardIcon {
李嘉林 committed
424 425 426 427 428 429 430 431
      .clickEl{
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 99;
      }
李嘉林 committed
432
      .like {
李嘉林 committed
433 434
        position: absolute;
        top: 0;
李嘉林 committed
435 436
        left: 50%;
        margin-left: -16px;
李嘉林 committed
437
      }
李嘉林 committed
438
      .heardNum {
李嘉林 committed
439
        text-align: center;
李嘉林 committed
440
        transform: translateY(-20px);
李嘉林 committed
441
        background: rgba(#e60012, 0.5);
李嘉林 committed
442
        border-radius: 8px;
李嘉林 committed
443
        padding: 0 2px;
李嘉林 committed
444
        font-size: 12px;
李嘉林 committed
445 446
        color: #fff;
        min-width: 30px;
李嘉林 committed
447
      }
李嘉林 committed
448 449 450 451 452 453 454
      .box {
        width: 100px;
        height: 260px;
        position: absolute;
        overflow: hidden;
        bottom: 0;
        right: -30px;
程智春 committed
455
        pointer-events: none;
李嘉林 committed
456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473
        .img {
          position: absolute;
          bottom: 0;
          left: 50%;
          margin-left: -20px;
          width: 40px;
          height: 40px;
          opacity: 0;
          border-radius: 50%;
          overflow: hidden;
          display: flex;
          align-items: center;
          justify-content: center;
          img {
            width: 40px;
            height: 40px;
          }
        }
李嘉林 committed
474
        .imgAni {
李嘉林 committed
475 476
          animation: moveImg 1.5s linear 0.1s;
        }
李嘉林 committed
477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498
        @keyframes moveImg {
          0% {
            opacity: 1;
          }
          20% {
            transform: translateY(-40px) translateX(-5px) scale(1);
          }
          40% {
            transform: translateY(-80px) translateX(0) scale(1);
          }
          60% {
            transform: translateY(-120px) translateX(0) scale(1);
          }
          80% {
            transform: translateY(-160px) translateX(5px) scale(1);
          }
          100% {
            opacity: 0;
            transform: translateY(-200px) translateX(0) scale(1);
          }
        }
      }
李嘉林 committed
499
    }
李嘉林 committed
500
    .sendOut {
李嘉林 committed
501 502
      position: absolute;
      bottom: 0;
李嘉林 committed
503 504 505 506
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: rgba(#000, 0.4);
李嘉林 committed
507
      width: 96vw;
李嘉林 committed
508 509 510
      height: 40px;
      border-radius: 40px;
      line-height: 40px;
李嘉林 committed
511
      font-size: 16px;
李嘉林 committed
512
      .sendIpt {
李嘉林 committed
513
        width: 70vw;
程智春 committed
514
        color: white;
李嘉林 committed
515
        margin-left: 10px;
李嘉林 committed
516
      }
李嘉林 committed
517
      .send {
李嘉林 committed
518 519
        color: #fff;
        height: 30px;
李嘉林 committed
520
        width: 70px;
李嘉林 committed
521 522 523 524
        text-align: center;
        line-height: 30px;
        border-radius: 30px;
        background: linear-gradient(to right, #ff877d, #fb566d);
李嘉林 committed
525
        margin-right: 6px;
李嘉林 committed
526
      }
李嘉林 committed
527 528
      .noSendVal {
        background: #ababa9;
李嘉林 committed
529 530
      }
    }
李嘉林 committed
531 532 533
  }
}
</style>