From 7374a2cb21e117ffaaa63a1801bf0821796ea0a0 Mon Sep 17 00:00:00 2001 From: lccsw <805383944@qq.com> Date: Mon, 24 Oct 2022 17:21:33 +0800 Subject: [PATCH] edit-sylive-static --- home/controllers/h5/market/sylive/Stic.php | 14 +++++++------- home/views/h5/market/sylive/act/share.php | 8 ++++++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/home/controllers/h5/market/sylive/Stic.php b/home/controllers/h5/market/sylive/Stic.php index 5d74c687..9c9ce2d1 100644 --- a/home/controllers/h5/market/sylive/Stic.php +++ b/home/controllers/h5/market/sylive/Stic.php @@ -39,14 +39,14 @@ class Stic extends Admin{ $info['begin'] = [ ['title' => '访问用户', 'num' => "{$browse_count}人",'url'=>'/h5/market/sylive/stic/users?type=owner&kpi=browse&a_id='.$a_id], ['title' => '预约用户', 'num' => "{$subscribe_count}人",'url'=>'/h5/market/sylive/stic/users?type=owner&kpi=subscribe&a_id='.$a_id], - ['title' => '预约率', 'num' => $subscribe_count ? round($subscribe_count/$browse_count*100,2)."%" : 0], + ['title' => '预约率', 'num' => $browse_count ? round($subscribe_count/$browse_count*100,2)."%" : 0], ]; $watch_count = $this->mdSytActivityKpiData->count(['a_id'=>$a_id,'kpi'=>'watch','cf_uid'=>$this->uid]); $order_count = $this->mdSytActivityKpiData->count(['a_id'=>$a_id,'kpi'=>'order','cf_uid'=>$this->uid]); $info['live'] = [ ['title' => '观看用户', 'num' => "{$watch_count}人",'url' => '/h5/market/sylive/stic/users?type=owner&kpi=watch&a_id='.$a_id], ['title' => '下单用户', 'num' => "{$order_count}人",'url' => '/h5/market/sylive/stic/users?type=owner&kpi=order&a_id='.$a_id], - ['title' => '转化率', 'num' => $watch_count ? round($watch_count/$order_count*100,2)."%" : 0], + ['title' => '转化率', 'num' => $watch_count ? round($order_count/$watch_count*100,2)."%" : 0], ]; $this->data['info'] = $info; $this->show_view('h5/market/sylive/stic/index'); @@ -99,7 +99,7 @@ class Stic extends Admin{ $where = [ 'a_id' => $a_id, 'kpi' => 'browse', - 'biz_id' => $this->uid + 'cf_uid' => $this->uid ]; $owner_browse_count = $this->mdSytActivityKpiData->count($where); //浏览数据 $where['kpi'] = 'subscribe'; @@ -107,7 +107,7 @@ class Stic extends Admin{ $cell3 = [ ['title' => '访问用户', 'num' => "{$owner_browse_count}人",'url'=>'/h5/market/sylive/stic/users?type=owner&kpi=browse&a_id='.$a_id], ['title' => '预约用户', 'num' => "{$owner_subscribe_count}人",'url'=>'/h5/market/sylive/stic/users?type=owner&kpi=subscribe&a_id='.$a_id], - ['title' => '预约率', 'num' => $owner_browse_count ? round($owner_browse_count/$owner_subscribe_count*100,2)."%" : 0], + ['title' => '预约率', 'num' => $owner_browse_count ? round($owner_subscribe_count/$owner_browse_count*100,2)."%" : 0], ]; }else{ //门店 $where = [ @@ -122,7 +122,7 @@ class Stic extends Admin{ $cell1 = [ ['title' => '访问用户', 'num' => "{$browse_count}人",'url'=>'/h5/market/sylive/stic/users?type=all&kpi=browse&a_id='.$a_id], ['title' => '预约用户', 'num' => "{$subscribe_count}人",'url'=>'/h5/market/sylive/stic/users?type=all&kpi=subscribe&a_id='.$a_id], - ['title' => '预约率', 'num' => $subscribe_count ? round($subscribe_count/$browse_count*100,2)."%" : 0], + ['title' => '预约率', 'num' => $browse_count ? round($subscribe_count/$browse_count*100,2)."%" : 0], ]; if($this->group_id==3){ $org_row = $this->market_sylive_organization_model->get(['organizationId'=>$this->session['org_id']],'parentId'); @@ -207,7 +207,7 @@ class Stic extends Admin{ $cell4 = [ ['title' => '观看用户', 'num' => "{$owner_view_count}人",'url'=>'/h5/market/sylive/stic/users?type=owner&kpi=watch&a_id='.$a_id], ['title' => '下单用户', 'num' => "{$owner_order_count}人",'url'=>'/h5/market/sylive/stic/users?type=owner&kpi=order&a_id='.$a_id], - ['title' => '转化率', 'num' => $owner_order_count ? round($owner_view_count/$owner_order_count*100,2)."%" : 0], + ['title' => '转化率', 'num' => $owner_view_count ? round($owner_order_count/$owner_view_count*100,2)."%" : 0], ]; }else{ //门店 $where = [ @@ -234,7 +234,7 @@ class Stic extends Admin{ $cell1 = [ ['title' => '观看用户', 'num' => "{$view_count}人",'url'=>'/h5/market/sylive/stic/users?type=all&kpi=watch&a_id='.$a_id], ['title' => '下单用户', 'num' => "{$order_count}人",'url'=>'/h5/market/sylive/stic/users?type=all&kpi=order&a_id='.$a_id], - ['title' => '转化率', 'num' => $order_count ? round($order_count/$view_count*100,2)."%" : 0], + ['title' => '转化率', 'num' => $view_count ? round($order_count/$view_count*100,2)."%" : 0], ]; $poly_row = $this->mdPolyvSession->get(['channelId'=>$row['channelId']]); $duration = $poly_row['duration'] ? intval($poly_row['duration']/60) : "0"; diff --git a/home/views/h5/market/sylive/act/share.php b/home/views/h5/market/sylive/act/share.php index 510ca211..6683b661 100644 --- a/home/views/h5/market/sylive/act/share.php +++ b/home/views/h5/market/sylive/act/share.php @@ -100,7 +100,7 @@ }, methods: { showPoster: function() { - this.msgisShowPoster = true + // this.msgisShowPoster = true this.posterSrc= '' this.draw() }, @@ -133,7 +133,11 @@ ctx.font="22px Georgia"; ctx.fillText(that.posterTip,that.canW/2,that.canH-34,); ctx.drawImage(codeimg,that.canW-200, that.canH-240, 160, 160) - that.posterSrc = canvas.toDataURL("image/jpg"); + // that.posterSrc = canvas.toDataURL("image/jpg"); + setTimeout(function () { + that.posterSrc = canvas.toDataURL("image/jpg"); + that.msgisShowPoster = true + }, 200); } }