Commit d5965e688427480c5449496bd7ddbf222b59a443

Authored by 前端开发-陈颖阳
1 parent 73916f30

OA更新

packageA/pages/liveStream/liveStream.js
@@ -21,6 +21,8 @@ Page({ @@ -21,6 +21,8 @@ Page({
21 */ 21 */
22 data: { 22 data: {
23 curPage: 1, 23 curPage: 1,
  24 + ad_data: null,
  25 + sharimg:"",
24 living: {}, 26 living: {},
25 livetoBegin: {}, 27 livetoBegin: {},
26 liveOver: {}, 28 liveOver: {},
@@ -28,7 +30,23 @@ Page({ @@ -28,7 +30,23 @@ Page({
28 isLoading: false, // 检测是否已经发送请求,防止重复发送请求 30 isLoading: false, // 检测是否已经发送请求,防止重复发送请求
29 noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据 31 noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据
30 pageNum: 1, // 当前页数 32 pageNum: 1, // 当前页数
31 - 33 + details: {},
  34 + status: '',
  35 + btnText: '',
  36 + showActionSheet: true,
  37 + showPlaybill: true,
  38 + windowWidth: 0,
  39 + windowHeight: 0,
  40 + dpr: 0,
  41 + canvasScale: 1.0,
  42 + nickName: '',
  43 + avatarUrl: '',
  44 + coverImg: '',
  45 + canvasToImgPath: '',
  46 + screenWidth: 0,
  47 + canvasHidden: 1,
  48 + gid: '',
  49 + shareImgPath: ''
32 }, 50 },
33 // list: [], 51 // list: [],
34 // live: { 52 // live: {
@@ -216,7 +234,29 @@ Page({ @@ -216,7 +234,29 @@ Page({
216 }); 234 });
217 }); 235 });
218 }) 236 })
219 - 237 +
  238 +
  239 + getApp().request.promiseGet("/api/weshop/ad/page?pid=1207&store_id=" + os.stoid, {
  240 + data: {
  241 + enabled: 1
  242 + }
  243 + }).then(res => {
  244 + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) {
  245 + var a = res.data.data.pageData;
  246 + var narr = [];
  247 + for (var i in a) {
  248 + var tt = {
  249 + 'ad_code': os.imghost + a[i].ad_code,
  250 + 'media_link': '',
  251 + 'ad_weapplink': a[i].ad_weapplink
  252 + };
  253 + narr.push(tt);
  254 + }
  255 + self.setData({
  256 + ad_data: narr
  257 + });
  258 + }
  259 + })
220 }, 260 },
221 261
222 /** 262 /**
@@ -244,40 +284,14 @@ Page({ @@ -244,40 +284,14 @@ Page({
244 284
245 self.getData(true, '/api/weshop/wx/livelist/page', { //请求直播中列表 285 self.getData(true, '/api/weshop/wx/livelist/page', { //请求直播中列表
246 storedId: o.stoid, 286 storedId: o.stoid,
247 - live_status: 101,  
248 - pageSize: 100, 287 + pageSize: 100,
  288 + ordertype:1,
  289 + liveshow:1
249 }).then((res) => { 290 }).then((res) => {
250 self.setData({ 291 self.setData({
251 living: self.data.list, 292 living: self.data.list,
252 }); 293 });
253 -  
254 -  
255 - console.log(self.data.living);  
256 -  
257 - //直播中列表请求完后,请求即将开始列表  
258 - self.getData(true, '/api/weshop/wx/livelist/page', {  
259 - storedId: o.stoid,  
260 - live_status: 102,  
261 - pageSize: 100,  
262 - }).then((res) => {  
263 - self.setData({  
264 - livetoBegin: self.data.list,  
265 - });  
266 -  
267 - //即将开始列表请求完后,请求结束列表  
268 - self.getData(true, '/api/weshop/wx/livelist/page', {  
269 - storedId: o.stoid,  
270 - live_status: 103,  
271 - }).then((res) => {  
272 - self.setData({  
273 - liveOver: self.data.list,  
274 - });  
275 - });  
276 -  
277 -  
278 - });  
279 -  
280 - 294 +
281 }); 295 });
282 296
283 297
@@ -306,6 +320,249 @@ Page({ @@ -306,6 +320,249 @@ Page({
306 320
307 }, 321 },
308 322
  323 +
  324 +
  325 + // 分享操作表
  326 + clickShare: function (e) {
  327 + var sharimg = e.currentTarget.dataset.sharimg
  328 + if(!getApp().globalData.user_id){
  329 + getApp().goto("/packageE/pages/togoin/togoin");
  330 + return false;
  331 + }
  332 + this.setData({
  333 + showActionSheet: !this.data.showActionSheet,
  334 + sharimg : sharimg
  335 + })
  336 + },
  337 +
  338 + // actionSheet - 取消按钮
  339 + hiddenActionSheet: function () {
  340 + this.setData({
  341 + showActionSheet: 'false'
  342 + })
  343 + if(!this.data.showPlaybill) {
  344 + this.setData({
  345 + showPlaybill: 'true'
  346 + });
  347 + }
  348 + },
  349 +
  350 + // 获取图片信息
  351 + getImageInfo(src) {
  352 + return new Promise((resolve, reject) => {
  353 + wx.getImageInfo({
  354 + src: src,
  355 + success: (res) => {
  356 + resolve(res);
  357 + }
  358 + })
  359 + });
  360 + },
  361 +
  362 + closeWin: function () {
  363 + this.setData({
  364 + showPlaybill: 'true'
  365 + });
  366 + },
  367 +
  368 + //生成海报
  369 + createPlaybill: function () {
  370 + // 1.提示 “正在生成海报...”
  371 + wx.showLoading({
  372 + title: '正在生成海报...'
  373 + });
  374 +
  375 + // 3.展示生成的海报
  376 + this.setData({
  377 + showActionSheet: 'false',
  378 + // showPlaybill: !this.data.showPlaybill
  379 + });
  380 +
  381 + // 2.生成海报,如果生成完毕,关闭提示
  382 + this.drawPlaybill();
  383 +
  384 + },
  385 +
  386 +
  387 + // 生成海报
  388 + drawPlaybill: async function () {
  389 +
  390 + var that=this;
  391 + // wx.showLoading({
  392 + // title: '正在生成海报...'
  393 + // });
  394 +
  395 +
  396 + if(!this.data.coverImg) {
  397 +
  398 + // 请求主图
  399 + await that.getImageInfo(that.data['shareimg']).then(res => {
  400 + that.setData({
  401 + coverImg: res.path,
  402 + coverImgWidth: res.width,
  403 + coverImgHeight: res.height,
  404 + coverImgSize: that.imageResize(res.width, res.height),
  405 + // coverImgHeight: res.height,
  406 + });
  407 + // console.log('主图加载成功~', that.data.coverImgSize);
  408 + });
  409 + }
  410 +
  411 + if(!this.data.avatarUrl) {
  412 +
  413 + // 请求头像
  414 + await that.getImageInfo(app.globalData.userInfo['head_pic']).then(res => {
  415 + that.setData({
  416 + avatarUrl: res.path
  417 + });
  418 + console.log('头像加载成功~')
  419 + });
  420 + }
  421 +
  422 + // 请求二维码
  423 + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +
  424 + os.stoid + "?sceneValue=1012" + "&pageValue=pages/goods/goodsInfo/goodsInfo";
  425 +
  426 + if(!this.data.ewm) {
  427 +
  428 + await that.getImageInfo(path3).then(res => {
  429 + that.setData({
  430 + ewm: res.path
  431 + });
  432 + console.log('二维码加载成功~')
  433 + });
  434 + }
  435 +
  436 +
  437 +
  438 + // 数据准备
  439 + const title = this.data.details.name;
  440 + // const headImg = app.globalData.userInfo['head_pic'];
  441 +
  442 + // console.log('----------------v', headImg);
  443 +
  444 + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +
  445 + os.stoid + "?sceneValue=1012" + "&pageValue=packageA/pages/liveStreamDetails/liveStreamDetails";
  446 +
  447 + // 以iPhone6为例,375/750 = 0.5
  448 + // let scale = this.data.windowWidth / 375;
  449 + let scale = this.data.screenWidth / 750 * 1.35
  450 +
  451 +
  452 + // 适配屏get幕
  453 + // let scale = this.data.windowWidth / 375.0;
  454 + // this.setData({totalHeight: 667 * scale});
  455 +
  456 + // 获取Canvas
  457 + let ctx = wx.createCanvasContext('myCanvas');
  458 +
  459 + // 放大 因为不放大的话,生成的分享图会模糊。暂时先注释
  460 + // ctx.scale(this.data.canvasScale, this.data.canvasScale)
  461 +
  462 +
  463 +
  464 + // var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +
  465 + // os.stoid + "?sceneValue=1012" + "&pageValue=pages/goods/goodsInfo/goodsInfo";
  466 + // + "?sceneValue=1012" + "&pageValue=packageA/pages/liveStreamDetails/liveStreamDetails"
  467 + // console.log('path3---->', path3);
  468 +
  469 +
  470 + // 绘制主背景白色
  471 + ctx.setFillStyle('#ffffff');
  472 + ctx.fillRect(0, 0, 480, 738);
  473 +
  474 + // 绘制头像
  475 + ctx.save();
  476 + ctx.beginPath();
  477 + ctx.arc(58, 52, 28, 0, 2*Math.PI);
  478 + ctx.clip();
  479 + // console.log('1__________________>',app.globalData.userInfo['head_pic']);
  480 + ctx.drawImage(this.data.avatarUrl, 30, 24, 56, 56);
  481 + ctx.restore();
  482 +
  483 + // 绘制昵称
  484 + ctx.setFontSize(22);
  485 + ctx.setFillStyle('#ADADAD');
  486 + ctx.fillText(this.data.nickName, 106, 60);
  487 +
  488 + // 绘制主图
  489 + ctx.setFillStyle('#f8f8f8');
  490 + ctx.fillRect(0, 104, 480, 380);
  491 +
  492 + // var w = this.data.coverImgWidth;
  493 + // var h = this.data.coverImgHeight;
  494 + var w = this.data.coverImgSize.imageWidth;
  495 + var h = this.data.coverImgSize.imageHeight;
  496 + // var dw = 480/w //canvas与图片的宽高比
  497 + // var dh = 380/h
  498 + // var ratio
  499 + // // 裁剪图片中间部分
  500 + // if(w > 480 && h > 380 || w < 480 && h < 380){
  501 + // if (dw > dh) {
  502 + // ctx.drawImage(this.data.coverImg, 0, (h - 380/dw)/2, w, 380/dw, 0, 104, 480, 380);
  503 + // } else {
  504 + // ctx.drawImage(this.data.coverImg, (w - 480/dh)/2, 0, 480/dh, h, 0, 104, 480, 380);
  505 + // };
  506 + // }
  507 + // // 拉伸图片
  508 + // else{
  509 + // if(w < 300){
  510 + // ctx.drawImage(this.data.coverImg, 0, (h - 380/dw)/2, w, 380/dw, 0, 104, 480, 380);
  511 + // }else {
  512 + // ctx.drawImage(this.data.coverImg, (w - 480/dh)/2, 0, 480/dh, h, 0, 104, 480, 380);
  513 + // }
  514 + // };
  515 + ctx.drawImage(this.data.coverImg, (480-w)/2, (380-h)/2+104, w, h);
  516 +
  517 +
  518 + // 绘制文字
  519 + ctx.setFontSize(24);
  520 + ctx.setFillStyle('#1E1E1E');
  521 + this.drawText(ctx, title, 30, 600, 200, 460, 2);
  522 +
  523 + // 绘制小程序码
  524 + ctx.drawImage(this.data.ewm, 310, 540, 132, 132);
  525 +
  526 +
  527 + //绘制文字:长按识别
  528 + ctx.setFontSize(20);
  529 + ctx.setFillStyle('#1E1E1E');
  530 + ctx.fillText('长按识别小程序', 309, 710);
  531 +
  532 + ctx.draw(true, function() {
  533 + setTimeout(function() {
  534 + // console.log("我进来了~~~~~");
  535 + wx.canvasToTempFilePath({
  536 + x: 0,
  537 + y: 0,
  538 + width: 750,
  539 + height: 1217,
  540 + destWidth: 750,
  541 + destHeight: 1217,
  542 + canvasId: 'myCanvas',
  543 + fileType: 'jpg',
  544 + success: function(res) {
  545 + wx.hideLoading();
  546 + that.setData({
  547 + canvasToImgPath: res.tempFilePath,
  548 + showPlaybill: !that.data.showPlaybill
  549 + });
  550 + // console.log('生成海报陈宫啦', that.data.canvasToImgPath);
  551 + // that.saveImageToPhotosAlbum(res.tempFilePath);
  552 + // console.log('截图陈宫:', that.data.canvasToImgPath);
  553 + // wx.previewImage({
  554 + // //将图片预览出来
  555 + // urls: [that.data.canvasToImgPath]
  556 + // });
  557 + }
  558 + })
  559 + }, 1000)
  560 + });
  561 +
  562 +
  563 +
  564 + },
  565 +
309 /** 566 /**
310 * 页面相关事件处理函数--监听用户下拉动作 567 * 页面相关事件处理函数--监听用户下拉动作
311 */ 568 */
@@ -351,17 +608,27 @@ Page({ @@ -351,17 +608,27 @@ Page({
351 }); 608 });
352 }, 609 },
353 610
354 - /** 611 + /**
355 * 用户点击右上角分享 612 * 用户点击右上角分享
356 */ 613 */
357 - onShareAppMessage: function () { getApp().globalData.no_clear=1; 614 + onShareAppMessage: function (res) {
  615 + getApp().globalData.clear=1;
  616 + this.setData({
  617 + showActionSheet: 'false'
  618 + })
  619 + var self = this;
358 if (res.from === 'button') { 620 if (res.from === 'button') {
359 // 来自页面内转发按钮 621 // 来自页面内转发按钮
360 - // console.log(res.target) 622 + console.log(res.target)
361 } 623 }
362 return { 624 return {
363 - title: '直播列表'  
364 - // path: '/page/user?id=123' 625 + title: this.data.details.name,
  626 + success: function(res) {
  627 + console.log('res---->', res);
  628 + },
  629 + complete: function(res) {
  630 + console.log('comple', res)
  631 + }
365 } 632 }
366 }, 633 },
367 634
packageA/pages/liveStream/liveStream.wxml
1 <!--pages/liveStream/liveStream.wxml--> 1 <!--pages/liveStream/liveStream.wxml-->
2 <wxs src="../../../utils/filter.wxs" module="filter"></wxs> 2 <wxs src="../../../utils/filter.wxs" module="filter"></wxs>
3 <view> 3 <view>
4 - <!-- 即将开始 -->  
5 - <block wx:if="{{livetoBegin.pageData.length > 0}}"> 4 + <!-- 即将开始 -->
  5 + <!-- <block wx:if="{{livetoBegin.pageData.length > 0}}">
6 <view class="title">即将开始</view> 6 <view class="title">即将开始</view>
7 <view class="list"> 7 <view class="list">
8 <block wx:for="{{livetoBegin.pageData}}" wx:key="item"> 8 <block wx:for="{{livetoBegin.pageData}}" wx:key="item">
@@ -22,34 +22,89 @@ @@ -22,34 +22,89 @@
22 22
23 </block> 23 </block>
24 </view> 24 </view>
25 - </block>  
26 - 25 + </block> -->
27 26
28 - <!-- 直播中 -->  
29 - <block wx:if="{{living.pageData.length > 0}}">  
30 - <view class="title">直播中</view>  
31 - <view class="list">  
32 - <block wx:for="{{living.pageData}}" wx:key="item">  
33 - <view class="list-item" catchtap="clickItem" data-id="{{item.id}}" data-live="ing">  
34 - <view class="list-item-left">  
35 - <image src="{{item.share_img}}" class="item-pic" mode="aspectFit"></image>  
36 - </view>  
37 - <view class="list-item-right">  
38 - <view>  
39 - <view class="item-title">{{item.name}}</view>  
40 - <view class="item-time">{{filter.format_time(item.start_time, 2)}} 开始</view>  
41 - <view class="item-anchor">主播:{{item['anchor_name']}}</view>  
42 - </view>  
43 - <view class="item-btn" catchtap="clickLive" data-roomid="{{item.roomid}}">观看直播</view>  
44 - </view>  
45 - </view>  
46 - </block>  
47 - </view>  
48 - </block>  
49 -  
50 27
51 - <!-- 精彩回放 -->  
52 - <block wx:if="{{liveOver.pageData.length > 0}}"> 28 +
  29 + <block wx:if="{{ad_data}}">
  30 + <view style="z-index: 1;">
  31 + <swiper class="swiper" circular="true" autoplay="true" indicator-dots="true" interval="2500" style="height:{{max_sw_height}}rpx">
  32 + <block wx:for="{{ad_data}}">
  33 +
  34 + <navigator url="{{item.ad_weapplink}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(item.ad_weapplink,'plugin')>=0}}">
  35 + <swiper-item>
  36 + <image src="{{item.ad_code}}" style="width: 100%;" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" lazy-load="true" />
  37 + </swiper-item>
  38 + </navigator>
  39 +
  40 + <view data-url="{{item.ad_weapplink}}" class="s1_gk_a1" bindtap="go_url" wx:else>
  41 + <swiper-item>
  42 + <image src="{{item.ad_code}}" style="width: 100%;" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" lazy-load="true" />
  43 + </swiper-item>
  44 + </view>
  45 +
  46 + </block>
  47 + </swiper>
  48 + </view>
  49 +
  50 +
  51 + </block>
  52 + <!-- <block wx:else>
  53 + <image class="xc-top-img" src="{{url}}/miniapp/images/seckill_top_img.jpg"></image>
  54 + </block> -->
  55 +
  56 + <view style="width: 100%;height: 100rpx;background-color: #eee;border-radius: 25rpx;position: absolute;top: 290rpx;">
  57 +
  58 + </view>
  59 +
  60 + <!-- 直播中 -->
  61 + <block wx:if="{{living.pageData.length > 0}}">
  62 + <!-- <view class="title">直播中</view> -->
  63 + <view class="list" style="margin-top: 23rpx;">
  64 + <block wx:for="{{living.pageData}}" wx:key="item">
  65 + <view class="list-item" data-id="{{item.id}}" data-live="ing" style="display: block;margin-top: 23rpx;margin: 20rpx 4%; border-radius: 25rpx;;background-color: white;">
  66 + <view class="list-item-left" catchtap="clickItem">
  67 + <view class="item-btn" catchtap="clickLive" data-roomid="{{item.roomid}}" wx:if="{{item.live_status==101}}">正在直播</view>
  68 + <view class="item-btnjjkb" catchtap="clickLive" data-roomid="{{item.roomid}}" wx:if="{{item.live_status==102}}">即将开播</view>
  69 + <view class="item-btnhf" catchtap="clickLive" data-roomid="{{item.roomid}}" wx:if="{{item.live_status==103}}">回放</view>
  70 + <view class="item-btnhf" catchtap="clickLive" data-roomid="{{item.roomid}}" wx:if="{{item.live_status==107}}">已失效</view>
  71 + <view class="item-btnld" catchtap="clickLive" data-roomid="{{item.roomid}}"></view>
  72 + <view class="item-btnxcx xcx-image" catchtap="clickLive" data-roomid="{{item.roomid}}"></view>
  73 + <view class="item-btnldt" catchtap="clickLive" data-roomid="{{item.roomid}}">
  74 + 小程序直播</view>
  75 + <image src="{{item.share_img}}" class="item-pic" mode="aspectFill" style="width: 690rpx;height: 360rpx;"></image>
  76 + </view>
  77 +
  78 + <view class="list-item-right">
  79 + <view style="display: flex;">
  80 + <view style="display: block;width: 70%;" catchtap="clickItem">
  81 + <view class="item-title">{{item.name}}</view>
  82 + <view class="item-anchor">
  83 + <image src="../../images/bar/user_on.png" mode="" style="width: 25rpx;height: 25rpx;"/>
  84 +
  85 + {{item['anchor_name']}}</view>
  86 + </view>
  87 + <view style="width: 30%;height: 90rpx;align-items: center;justify-items: center;">
  88 + <view bindtap="clickShare" data-sharimg="{{item.share_img}}" class="display: flex;" style="width: 70%;border-radius: 25rpx;border: 1rpx solid #fc6247;height: 46rpx;margin-top: 25rpx;margin-left: 30rpx;">
  89 + <view class="share-image"></view>
  90 + <view class="fs26" style="color: #fc6247;margin-left: 10rpx;line-height: 46rpx;"> 分享 </view>
  91 + </view>
  92 + </view>
  93 + </view>
  94 +
  95 + </view>
  96 + </view>
  97 + </block>
  98 +
  99 + <view style="width: 100%;height: 30rpx;">
  100 +
  101 + </view>
  102 + </view>
  103 + </block>
  104 +
  105 +
  106 + <!-- 精彩回放 -->
  107 + <!-- <block wx:if="{{liveOver.pageData.length > 0}}">
53 <view class="title">精彩回放</view> 108 <view class="title">精彩回放</view>
54 <view class="list"> 109 <view class="list">
55 <block wx:for="{{liveOver.pageData}}" wx:key="item"> 110 <block wx:for="{{liveOver.pageData}}" wx:key="item">
@@ -68,11 +123,45 @@ @@ -68,11 +123,45 @@
68 </view> 123 </view>
69 </block> 124 </block>
70 </view> 125 </view>
71 - </block>  
72 -  
73 -  
74 - <nodata nodataContainer="t-c" wx:if="{{livetoBegin.pageData.length == 0 && liveing.pageData.length == 0 && liveOver.pageData.length == 0}}"></nodata>  
75 - <view class="no-more" hidden="{{!noMore}}" wx:if="{{living.pageData.length != 0 && livetoBegin.pageData.length == 0 && liveO.pageData.length == 0}}">- 没有更多了 -</view>  
76 - <view class="no-more" hidden="{{!noMore}}" wx:if="{{living.pageData.length == 0 && livetoBegin.pageData.length != 0 && liveO.pageData.length == 0}}">- 没有更多了 -</view>  
77 - <view class="no-more" hidden="{{!noMore}}" wx:if="{{living.pageData.length == 0 && livetoBegin.pageData.length == 0 && liveO.pageData.length != 0}}">- 没有更多了 -</view>  
78 -</view>  
79 \ No newline at end of file 126 \ No newline at end of file
  127 + </block> -->
  128 +
  129 +
  130 +
  131 + <!-- actionSheet -->
  132 + <view class="{{showActionSheet ? 'share-actionSheet':'share-actionSheet active'}}" hidden="{{showActionSheet}}">
  133 + <view class="share-actionSheet-title">分享</view>
  134 + <view class="share-actionSheet-list">
  135 + <view class="share-actionSheet-item" hover-class="active">
  136 + <button open-type="share">
  137 + <image src="/packageA/images/liveStreamDetails/friend.jpg" class="share-actionSheet-pic"></image>
  138 + <text class="share-actionSheet-desc">发送给朋友</text>
  139 + </button>
  140 + </view>
  141 + <view class="share-actionSheet-item" hover-class="active" bindtap="createPlaybill">
  142 + <image src="/packageA/images/liveStreamDetails/circle.jpg" class="share-actionSheet-pic"></image>
  143 + <text class="share-actionSheet-desc">生成分享海报</text>
  144 + </view>
  145 + </view>
  146 + <view class="share-actionSheet-cancle" bindtap="hiddenActionSheet">取消</view>
  147 + </view>
  148 +
  149 + <!-- 生成海报 -->
  150 + <view class="{{showPlaybill ? 'playbill':'playbill active'}}" hidden="{{showPlaybill}}">
  151 + <image src="{{canvasToImgPath}}" class="playbill-pic" mode="widthFix" bindtap="closeWin"></image>
  152 + <!-- style="width:{{windowWidth}}px;height:{{windowHeight}}px;" -->
  153 + <view class="playbill-save" bindtap="onSaveToPhone">保存至相册</view>
  154 + </view>
  155 +
  156 + <!-- <canvas canvas-id="myCanvas" class="" catchtouchmove="true" style="width:{{windowWidth}}px;height:{{windowHeight}}px;"></canvas> -->
  157 +
  158 + <!-- mask -->
  159 + <!-- 这里mask必须强制放在actionsheet和playbill的后面 -->
  160 + <view class="mask" bindtap="hiddenActionSheet" catchtouchmove="true"></view>
  161 +
  162 +
  163 + <nodata nodataContainer="t-c" wx:if="{{livetoBegin.pageData.length == 0 && liveing.pageData.length == 0 && liveOver.pageData.length == 0}}"></nodata>
  164 + <view class="no-more" hidden="{{!noMore}}" wx:if="{{living.pageData.length != 0 && livetoBegin.pageData.length == 0 && liveO.pageData.length == 0}}">- 没有更多了 -</view>
  165 + <view class="no-more" hidden="{{!noMore}}" wx:if="{{living.pageData.length == 0 && livetoBegin.pageData.length != 0 && liveO.pageData.length == 0}}">- 没有更多了 -</view>
  166 + <view class="no-more" hidden="{{!noMore}}" wx:if="{{living.pageData.length == 0 && livetoBegin.pageData.length == 0 && liveO.pageData.length != 0}}">- 没有更多了 -</view>
  167 +</view>
  168 +<canvas canvas-id="myCanvas" catchtouchmove="true" style="width:480px;height:738px;position:absolute;left:-9999px;"></canvas>
80 \ No newline at end of file 169 \ No newline at end of file
packageA/pages/liveStream/liveStream.wxss
1 /* pages/liveStream/liveStream.wxss */ 1 /* pages/liveStream/liveStream.wxss */
  2 +page{
  3 + background-color: #eee;
  4 +}
2 .title { 5 .title {
3 font-size: 30rpx; 6 font-size: 30rpx;
4 padding: 50rpx 32rpx; 7 padding: 50rpx 32rpx;
5 } 8 }
6 .list-item { 9 .list-item {
7 - padding: 0 32rpx 30rpx;  
8 display: flex; 10 display: flex;
9 } 11 }
10 .list-item-left { 12 .list-item-left {
11 position: relative; 13 position: relative;
12 - width: 340rpx;  
13 - height: 220rpx;  
14 flex-shrink: 0; 14 flex-shrink: 0;
15 } 15 }
  16 +
  17 +.xcx-image {
  18 + width: 20rpx;
  19 + height: 20rpx;
  20 + margin-left: 18rpx;
  21 + margin-top: 8rpx;
  22 + background-size:contain;
  23 + background-repeat: no-repeat;
  24 + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkAgMAAAANjH3HAAAAAXNSR0IB2cksfwAAAAlwSFlzAAAuIwAALiMBeKU/dgAAAAlQTFRFPcRKAAAA////QjSLrQAAAAN0Uk5T/wD/aewfvgAAATZJREFUeJzt1MFxBSEIANDfRErTAyXQj+nAg1T58wVUEDObnfxLJl52xrcKKvr4SIf2OMG/vF0yUY2FvlqJBF9CgeQOPJ8VYGm7kLTiJatUL3AUVCEvdEGKlTylXhXgPlmrl8ZDAymciBOUbcZImo69Knoy+YakSMr3Es52W8L1lLniSPYdFQlOQQTsmdYp9rSRhoCpHeh/cQ8aoUVMJUo2XbIR9NJU5LcusN6FvEkRgU2SCNISRwqVRWt8ZKB3e+Sp6+lDhrQ096CqjGz4k+e7M2KOqlqlhoLLKe+STtJuSP1V+XEGIJLD3TlLSXqhVnn1fKZll4xIwQcij5cTfurGmXshLSAjeJTxtK/LcZKcjNe4eUlRmHmzfBgWCMLMG+zDiOA+mci2NVPQR5nvjkt5kb39NXkCPTYQh7BBvFgAAAAASUVORK5CYII=
  25 +
  26 + ) ;
  27 +}
  28 +
  29 +.share-image {
  30 + width: 30rpx;
  31 + height: 30rpx;
  32 + margin-left: 18rpx;
  33 + margin-top: 8rpx;
  34 + background-size:contain;
  35 + background-repeat: no-repeat;
  36 + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAAXNSR0IB2cksfwAAAAlwSFlzAAAuIwAALiMBeKU/dgAAACFQTFRFAAAA/04w/04w/04w/04w/04w/0ww/0Aw/0AA/00w/04wncLKIgAAAAt0Uk5TAP8/LxsOQBAE4ZBG21G1AAABIUlEQVR4nO3W2w3CMAwF0AYEEnzRDRiBEViFERiBzUEg+vK913ZFEUjxRyWanDqP4rRpatT4YpR2EIdlyAg8YhEyFQEyFT4xSfzp55M0qh++X4QoeJRqLKRJTZg8Tk14LrGtclkpYVN5bzK4jQndW7pg/A1iRLxChJQ0ka92hIBGQ/S/ARGyH4rgKShSZA5BeAWwrZ5gRFWZjxBP2A5uEkKUwESXWEPccZke/rj+gRw74pxJPTl1RIsBOXe/TacyStyTTZ6sn9cLIJPB9mT1vF4JOSDyilue7PJknydbsJMOQV8HHgFRSSW/TwKlzvSZR+LlMUpMZZ9J/OM0R+yp7n2yoHaHtGAYbSRQ5owIpcETzIhAGroqGeEYvfwJUGOZuAN2OElDEXSpWQAAAABJRU5ErkJggg==
  37 + ) ;
  38 +}
16 .list-item-right { 39 .list-item-right {
17 display: flex; 40 display: flex;
18 flex-direction: column; 41 flex-direction: column;
@@ -21,11 +44,54 @@ @@ -21,11 +44,54 @@
21 /* position: relative; 44 /* position: relative;
22 padding-bottom: 70rpx; */ 45 padding-bottom: 70rpx; */
23 } 46 }
  47 +
  48 +.share-actionSheet {
  49 + background-color: white;
  50 + padding-top: 45rpx;
  51 + position: fixed;
  52 + width: 100%;
  53 + bottom: 0;
  54 + z-index: 2;
  55 +}
  56 +.share-actionSheet-title {
  57 + font-size: 38rpx;
  58 +
  59 +}
  60 +.share-actionSheet-list {
  61 + display: flex;
  62 + justify-content: space-around;
  63 + padding-bottom: 30rpx;
  64 +}
  65 +.share-actionSheet-item {
  66 + text-align: center;
  67 + padding: 20rpx;
  68 +}
  69 +.share-actionSheet-pic {
  70 + display: block;
  71 + width: 118rpx;
  72 + height: 118rpx;
  73 + border-radius: 50%;
  74 + margin: 0 auto;
  75 +}
  76 +.share-actionSheet-desc {
  77 + font-size: 28rpx;
  78 +}
  79 +
  80 +.share-actionSheet-title,
  81 +.share-actionSheet-cancle {
  82 + text-align: center;
  83 +}
  84 +
  85 +.share-actionSheet-cancle {
  86 + padding: 30rpx 0;
  87 + border-top: 2rpx solid #CBCBCB;
  88 +}
24 .item-pic { 89 .item-pic {
25 /* width: 400rpx; */ 90 /* width: 400rpx; */
26 width: 100%; 91 width: 100%;
27 height: 100%; 92 height: 100%;
28 background-color: #eee; 93 background-color: #eee;
  94 + border-radius: 15rpx;
29 } 95 }
30 .item-desc { 96 .item-desc {
31 position: absolute; 97 position: absolute;
@@ -55,7 +121,7 @@ @@ -55,7 +121,7 @@
55 121
56 display: -webkit-box; 122 display: -webkit-box;
57 -webkit-box-orient: vertical; 123 -webkit-box-orient: vertical;
58 - -webkit-line-clamp: 2; 124 + -webkit-line-clamp: 1;
59 overflow: hidden; 125 overflow: hidden;
60 } 126 }
61 .item-time { 127 .item-time {
@@ -66,6 +132,12 @@ @@ -66,6 +132,12 @@
66 .item-anchor { 132 .item-anchor {
67 color: #999; 133 color: #999;
68 font-size: 24rpx; 134 font-size: 24rpx;
  135 + text-align: justify;
  136 +
  137 + display: -webkit-box;
  138 + -webkit-box-orient: vertical;
  139 + -webkit-line-clamp: 1;
  140 + overflow: hidden;
69 } 141 }
70 142
71 .item-btn { 143 .item-btn {
@@ -76,7 +148,81 @@ @@ -76,7 +148,81 @@
76 color: #fff; 148 color: #fff;
77 font-size: 24rpx; 149 font-size: 24rpx;
78 text-align: center; 150 text-align: center;
  151 + position: absolute;top: 15rpx;left: 7px;
  152 + border-radius: 15rpx;
  153 +}
  154 +.item-btnhf {
  155 + width: 172rpx;
  156 + height: 56rpx;
  157 + line-height: 56rpx;
  158 + background-color: #acacac;
  159 + color: #fff;
  160 + font-size: 24rpx;
  161 + text-align: center;
  162 + position: absolute;top: 15rpx;left: 7px;
  163 + border-radius: 15rpx;
  164 +}
  165 +.item-btnjjkb {
  166 + width: 172rpx;
  167 + height: 56rpx;
  168 + line-height: 56rpx;
  169 + background-color: rgb(250, 182, 36);
  170 + color: #fff;
  171 + font-size: 24rpx;
  172 + text-align: center;
  173 + position: absolute;top: 15rpx;left: 7px;
  174 + border-radius: 15rpx;
  175 +}
  176 +
  177 +
  178 +.item-btnld {
  179 + width: 202rpx;
  180 + height: 56rpx;
  181 + line-height: 56rpx;
  182 + background-color: #c9c9c9;
  183 + font-size: 24rpx;
  184 + text-align: center;
  185 + position: absolute;
  186 + bottom: 12rpx;
  187 + border-top-right-radius: 15rpx;
  188 + overflow: hidden;
  189 + opacity: 0.3;
  190 +}
  191 +.item-btnldt {
  192 + width: 202rpx;
  193 + height: 56rpx;
  194 + line-height: 56rpx;
  195 + color: white;
  196 + font-size: 24rpx;
  197 + text-align: center;
  198 + position: absolute;
  199 + bottom: 12rpx;
  200 + overflow: hidden;
  201 + margin-left: 20rpx;
  202 +}
  203 +
  204 +.item-btnxcx {
  205 + width: 32rpx;
  206 + height: 32rpx;
  207 + line-height: 56rpx;
  208 + color: rgb(233, 233, 233);
  209 + font-size: 24rpx;
  210 + left: 0;
  211 + bottom: 22rpx;
  212 + position: absolute;
  213 + overflow: hidden;
  214 +
  215 +}
  216 +
  217 +.content {
  218 + background-color: white;
  219 + padding-bottom: 168rpx;
  220 + position: relative;
79 } 221 }
  222 +button::after {
  223 + border: none;
  224 +}
  225 +
80 subscribe { 226 subscribe {
81 position: relative; 227 position: relative;
82 } 228 }
@@ -108,4 +254,9 @@ subscribe { @@ -108,4 +254,9 @@ subscribe {
108 line-height: 3; 254 line-height: 3;
109 color: #909090; 255 color: #909090;
110 text-align: center; 256 text-align: center;
  257 +}
  258 +
  259 +.share-actionSheet.active ~ .mask,
  260 +.playbill.active ~ .mask {
  261 + display: block;
111 } 262 }
112 \ No newline at end of file 263 \ No newline at end of file
pages/goods/categoryList/categoryList.wxml
@@ -292,7 +292,8 @@ @@ -292,7 +292,8 @@
292 292
293 <!-- 品类--> 293 <!-- 品类-->
294 <block wx:if="{{is_show_pl&&select_classify_on!=221&&select_classify_on!=220&&select_classify_on!=223}}"> 294 <block wx:if="{{is_show_pl&&select_classify_on!=221&&select_classify_on!=220&&select_classify_on!=223}}">
295 - <block wx:if="{{select_classify_on!=221&&select_classify_on!=220&&select_classify_on!=223&&is_level_three!=1}}"> 295 + <!-- <block wx:if="{{select_classify_on!=221&&select_classify_on!=220&&select_classify_on!=223&&is_level_three!=1}}"> -->
  296 + <block>
296 <!-- <block wx:if="{{select_classify_on == 0&&is_level_three!=1}}"> --> 297 <!-- <block wx:if="{{select_classify_on == 0&&is_level_three!=1}}"> -->
297 <view class="my-container"> 298 <view class="my-container">
298 <view class="classify_name fs28 flex-space-between ai-center" data-pid="0" data-cid="{{cat_id}}" bindtap='select_more'> 299 <view class="classify_name fs28 flex-space-between ai-center" data-pid="0" data-cid="{{cat_id}}" bindtap='select_more'>
@@ -303,7 +304,7 @@ @@ -303,7 +304,7 @@
303 </view> 304 </view>
304 </view> 305 </view>
305 <!-- 显示2级列表 --> 306 <!-- 显示2级列表 -->
306 - <view class="classify_content-frame flex-wrap"> 307 + <!-- <view class="classify_content-frame flex-wrap">
307 <block wx:if="{{goodslist && goodslist.length>0}}"> 308 <block wx:if="{{goodslist && goodslist.length>0}}">
308 <block wx:for="{{goodslist}}" wx:for-item="goods" wx:for-index="indx"> 309 <block wx:for="{{goodslist}}" wx:for-item="goods" wx:for-index="indx">
309 <view class="type_img_frame t-c ib" data-cid="{{goods.items.id}}" data-pid="{{goods.items.parent_id}}" bindtap="go_cate"> 310 <view class="type_img_frame t-c ib" data-cid="{{goods.items.id}}" data-pid="{{goods.items.parent_id}}" bindtap="go_cate">
@@ -315,19 +316,20 @@ @@ -315,19 +316,20 @@
315 <block wx:else> 316 <block wx:else>
316 <view class="no_child_lev fs28">该类别无子级</view> 317 <view class="no_child_lev fs28">该类别无子级</view>
317 </block> 318 </block>
318 - </view> 319 + </view> -->
319 320
320 </view> 321 </view>
321 </block> 322 </block>
322 323
323 <!-- 商品 含有3级的--> 324 <!-- 商品 含有3级的-->
324 - <block wx:if="{{select_classify_on!=220&&select_classify_on!=221&&select_classify_on!=223&&is_level_three==1}}"> 325 + <!-- <block wx:if="{{select_classify_on!=220&&select_classify_on!=221&&select_classify_on!=223&&is_level_three==1}}"> -->
  326 + <block>
325 <block wx:for="{{goodslist}}" wx:for-item="goods" wx:for-index="inds"> 327 <block wx:for="{{goodslist}}" wx:for-item="goods" wx:for-index="inds">
326 <view> 328 <view>
327 329
328 <view class="classify_name fs28 flex-space-between ai-center" data-pid="{{goods.items.parent_id}}" data-cid="{{goods.items.id}}" bindtap='select_more'> 330 <view class="classify_name fs28 flex-space-between ai-center" data-pid="{{goods.items.parent_id}}" data-cid="{{goods.items.id}}" bindtap='select_more'>
329 331
330 - <view class="classify_title ellipsis-1">{{goods.items.name}}</view> 332 + <view class="classify_title ellipsis-1" style="margin-left: 25rpx;">{{goods.items.name}}</view>
331 <view class="flex select_more ai-center"> 333 <view class="flex select_more ai-center">
332 <view class="red-co fs24">更多</view> 334 <view class="red-co fs24">更多</view>
333 <view class="bg_right width_height" style="margin-top: 0;"></view> 335 <view class="bg_right width_height" style="margin-top: 0;"></view>
@@ -335,7 +337,7 @@ @@ -335,7 +337,7 @@
335 </view> 337 </view>
336 338
337 <block wx:if="{{goods.arrays.length>0}}"> 339 <block wx:if="{{goods.arrays.length>0}}">
338 - <view class="classify_content-frame flex-wrap"> 340 + <view class="classify_content-frame flex-wrap" style="margin-left: 50rpx;">
339 <view class="type_img_frame t-c ib" data-cid="{{item.id}}" data-pid="three" wx:for="{{goods.arrays}}" wx:for-index="index" wx:for-item="item" bindtap="go_cate"> 341 <view class="type_img_frame t-c ib" data-cid="{{item.id}}" data-pid="three" wx:for="{{goods.arrays}}" wx:for-index="index" wx:for-item="item" bindtap="go_cate">
340 <image class=" type_img" src="{{item.icoimg==null||item.icoimg==''?iurl+'/miniapp/images/no_cate_def.png':item.icoimg}}" binderror="goods_bnerr" data-err="goodslist[{{index}}].logo"></image> 342 <image class=" type_img" src="{{item.icoimg==null||item.icoimg==''?iurl+'/miniapp/images/no_cate_def.png':item.icoimg}}" binderror="goods_bnerr" data-err="goodslist[{{index}}].logo"></image>
341 <view class="brand_img_name fs24 ellipsis-1 pdh10">{{item.name}}</view> 343 <view class="brand_img_name fs24 ellipsis-1 pdh10">{{item.name}}</view>
pages/goods/categoryList/categoryList.wxss
@@ -400,7 +400,7 @@ line-height: 65rpx; @@ -400,7 +400,7 @@ line-height: 65rpx;
400 } 400 }
401 .type_img_frame { 401 .type_img_frame {
402 box-sizing: border-box; 402 box-sizing: border-box;
403 - width: calc(100% / 3); 403 + width: calc(90% / 3);
404 height: 140rpx; 404 height: 140rpx;
405 margin-top: 20rpx; 405 margin-top: 20rpx;
406 margin-bottom: 20rpx; 406 margin-bottom: 20rpx;
pages/user/order_list/order_list.js
@@ -2051,7 +2051,6 @@ Page({ @@ -2051,7 +2051,6 @@ Page({
2051 let list= []; 2051 let list= [];
2052 2052
2053 if(currentIndex == 1) { 2053 if(currentIndex == 1) {
2054 - list = th.data.list2;  
2055 list = list.concat(data); 2054 list = list.concat(data);
2056 th.setData({list2:list}); 2055 th.setData({list2:list});
2057 }; 2056 };
@@ -2228,7 +2227,8 @@ Page({ @@ -2228,7 +2227,8 @@ Page({
2228 this.setData({ 2227 this.setData({
2229 currentPage2: 1, 2228 currentPage2: 1,
2230 list2: [], 2229 list2: [],
2231 - is_no_data2: 0, 2230 + is_no_data2: 0,
  2231 + is_no_more2:0
2232 }); 2232 });
2233 2233
2234 2234