Commit a234435d by 程智春

直播

parent 36fbe921
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</div> </div>
<!-- 评论层 --> <!-- 评论层 -->
<livedIsMsg <livedIsMsg
v-if="info.liveBroadcastState<2&&guestBookList" v-if="(info.liveBroadcastState!=2 || info.liveBroadcastState!=4) &&guestBookList"
:guestBookList="guestBookList" :guestBookList="guestBookList"
:updateVal="updateVal" :updateVal="updateVal"
:isSend="isSend" :isSend="isSend"
......
...@@ -18,13 +18,11 @@ ...@@ -18,13 +18,11 @@
<!-- 左上角展示讲解中商品 --> <!-- 左上角展示讲解中商品 -->
<div class="fixedGoods" v-else-if="showFixedGoods&&fixedGoodsList&&fixedGoodsList.length>0"> <div class="fixedGoods" v-else-if="showFixedGoods&&fixedGoodsList&&fixedGoodsList.length>0">
<div class="goodsList" v-for="(item,index) in fixedGoodsList" :key="index" @click="toGoodsInfo(item)"> <div class="goodsList" v-for="(item,index) in fixedGoodsList" :key="index" @click="toGoodsInfo(item)">
<!-- <img :src="item.productImgUrl" alt /> -->
<image :src="item.productImgUrl" mode="aspectFill" alt=""></image>
<!-- <p class="num">{{item.number}}</p> -->
<div class="explain" v-if="item.upperScreenState==1">讲解中</div> <div class="explain" v-if="item.upperScreenState==1">讲解中</div>
<p class="price" v-if="item.minPrice"> <image :src="item.productImgUrl" mode="aspectFill" alt=""></image>
<div class="price" v-if="item.minPrice">
<span></span> <span>{{item.minPrice}}</span> <span></span> <span>{{item.minPrice}}</span>
</p> </div>
</div> </div>
</div> </div>
</div> </div>
...@@ -217,7 +215,6 @@ img { ...@@ -217,7 +215,6 @@ img {
image { image {
width: 30vw; width: 30vw;
height: 30vw; height: 30vw;
object-fit: cover;
} }
.num { .num {
position: absolute; position: absolute;
...@@ -249,17 +246,15 @@ img { ...@@ -249,17 +246,15 @@ img {
top: 14vh; top: 14vh;
left: 12px; left: 12px;
.goodsList { .goodsList {
width: 22vw; width: 78px;
// border: 1px solid #ff3334; margin-bottom: 15px;
margin-right: 10px; border-radius: 2px;
overflow: hidden; overflow: hidden;
margin-bottom: 10px; position: relative;
position: relative; background-color: white;
border-radius: 2px;
image { image {
width: 22vw; width: 22vw;
height: 28vw; height: 78px;
object-fit: cover;
} }
.num { .num {
position: absolute; position: absolute;
...@@ -286,7 +281,9 @@ img { ...@@ -286,7 +281,9 @@ img {
color: #FA7018; color: #FA7018;
background: #fff; background: #fff;
text-align: center; text-align: center;
height: 21px;
font-size: 16px; font-size: 16px;
line-height: 17px;
} }
} }
} }
......
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
<image v-if="item.productImgUrl" :src="item.productImgUrl" mode="aspectFill" alt=""></image> <image v-if="item.productImgUrl" :src="item.productImgUrl" mode="aspectFill" alt=""></image>
</div> </div>
<div class="info"> <div class="info">
<p class="name line-clamp2">{{item.productName}}</p> <div class="name line-clamp2">{{item.productName}}</div>
<div class="bottom"> <div class="bottom">
<div class="price"> <div class="price">
<p> <div>
<span></span> <span></span>
<span>{{item.minPrice}}</span> <span>{{item.minPrice}}</span>
</p> </div>
<!-- <p class="del"> <!-- <p class="del">
<span></span> <span></span>
<span>{{999}}</span> <span>{{999}}</span>
......
...@@ -92,7 +92,7 @@ export default { ...@@ -92,7 +92,7 @@ export default {
} }
let newTime = new Date(this.info.startTime.replace(/-/g, "/")); let newTime = new Date(this.info.startTime.replace(/-/g, "/"));
query.livedTime = `${newTime.getMonth() + 1}${newTime.getDate() - query.livedTime = `${newTime.getMonth() + 1}${newTime.getDate() -
1}${newTime.getHours()}:${newTime.getMinutes()}`; 1}${Number(newTime.getHours()) < 10 ? '0' + Number(newTime.getHours()) : newTime.getHours()}:${Number(newTime.getMinutes()) < 10 ? '0' + Number(newTime.getMinutes()) : newTime.getMinutes()}`;
let qrCode = DFSImg(res.data.data); let qrCode = DFSImg(res.data.data);
if (qrCode.indexOf("https") == -1) { if (qrCode.indexOf("https") == -1) {
query.qrCode = qrCode.replace("http", "https"); query.qrCode = qrCode.replace("http", "https");
...@@ -124,6 +124,7 @@ export default { ...@@ -124,6 +124,7 @@ export default {
wx.getStorage({ wx.getStorage({
key: "sessionid", key: "sessionid",
success(res) { success(res) {
console.log('1111111111')
_this.toCreatePoster(); _this.toCreatePoster();
}, },
fail(res) { fail(res) {
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import live from "@/api/live"; import live from "@/api/live";
import { DFSImg } from '../../utils/common.js'
export default { export default {
props: ["showPosterDia", "posterInfo","userInfo"], props: ["showPosterDia", "posterInfo","userInfo"],
name: "", name: "",
...@@ -99,6 +100,56 @@ export default { ...@@ -99,6 +100,56 @@ export default {
ctx.setFontSize(15); ctx.setFontSize(15);
ctx.fillText(info.nickName, 70 * bili, 410 * bili); ctx.fillText(info.nickName, 70 * bili, 410 * bili);
//
ctx.setFillStyle("#FDC330");
ctx.fillRect(0, 330 * bili, 310 * bili, 40 * bili);
this.saveThe('https://mayi-newshop.oss-cn-shanghai.aliyuncs.com/public/png/1eaa8c87-e20a-4b5b-8c21-596dac8fa093.png',path => {
ctx.drawImage(path, 20 * bili , 340 * bili, 26 * bili, 20 * bili);
ctx.save()
ctx.setTextAlign("left");
ctx.setFillStyle("#3F2F00");
ctx.setFontSize(14);
ctx.fillText(this.info.livedStatus == 1 ? '直播中' : '直播预告', 52 * bili , 355 * bili);
if(this.info.livedStatus == 0){
this.saveThe('https://mayi-newshop.oss-cn-shanghai.aliyuncs.com/public/png/1a33da04-8224-4980-9299-a4a8e32be678.png',path => {
ctx.drawImage(path, 160 * bili , 340 * bili, 20 * bili, 20 * bili);
ctx.save()
ctx.setTextAlign("left");
ctx.setFillStyle("#3F2F00");
ctx.setFontSize(14);
ctx.fillText(this.info.livedTime, 188 * bili , 355 * bili);
})
}
})
// ctx.drawImage(require('../../../static/images/bofang.png'), 20 * bili , 340 * bili, 26 * bili, 20 * bili);
// ctx.save()
// ctx.setTextAlign("left");
// ctx.setFillStyle("#3F2F00");
// ctx.setFontSize(14);
// ctx.fillText(this.info.livedStatus == 1 ? '直播中' : '直播预告', 52 * bili , 355 * bili);
// if(this.info.livedStatus == 0){
// ctx.drawImage(require('../../../static/images/lishi.png'), 160 * bili , 340 * bili, 20 * bili, 20 * bili);
// ctx.save()
// ctx.setTextAlign("left");
// ctx.setFillStyle("#3F2F00");
// ctx.setFontSize(14);
// ctx.fillText(this.info.livedTime, 188 * bili , 355 * bili);
// }
// ctx.fill()
ctx.setTextAlign("left"); ctx.setTextAlign("left");
ctx.setFillStyle("#3F2F00"); ctx.setFillStyle("#3F2F00");
ctx.setFontSize(14); ctx.setFontSize(14);
......
...@@ -218,7 +218,7 @@ export default { ...@@ -218,7 +218,7 @@ export default {
isDetailControlLock : true, isDetailControlLock : true,
mirror : false, mirror : true,
} }
}, },
watch:{ watch:{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment