edit-sylive-rank
This commit is contained in:
@@ -335,5 +335,76 @@ class Syt extends CI_Controller
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//更新活动用户表信息
|
||||
public function tmp(){
|
||||
$this->load->library('market/sylive_entity');
|
||||
$this->load->model('market/market_sylive_user_model', 'user_model');
|
||||
$this->load->model('market/market_sylive_activity_user_model', 'act_user_model');
|
||||
$this->load->model('market/market_sylive_activity_kpidata_model','mdSytActivityKpiData');
|
||||
$page = $this->input->get('page');
|
||||
$size = $this->input->get('size');
|
||||
!$page && $page = 1;
|
||||
!$size && $size = 20;
|
||||
$where = [
|
||||
'organizationId>' => 0,
|
||||
'userId>' => 0
|
||||
];
|
||||
$total = $this->act_user_model->count($where);
|
||||
$filed = 'id,userId,activityId';
|
||||
$rows = $this->act_user_model->select($where,'id asc',$page,$size,$filed);
|
||||
if(!$rows){
|
||||
echo "执行完毕";
|
||||
}
|
||||
$user_ids = implode(',',array_column($rows,'userId'));
|
||||
$where = ["userId in ({$user_ids})"=>null];
|
||||
$users = $this->user_model->map('userId','',$where);
|
||||
foreach ($rows as $item) {
|
||||
$user = $users[$item['userId']] ? $users[$item['userId']][0] : [];
|
||||
if($user){
|
||||
$update = [
|
||||
'organizationId' => $user['organizationId'],
|
||||
'teamId' => $user['teamId'],
|
||||
];
|
||||
if($update['organizationId']){
|
||||
$level_lists = $this->sylive_entity->get_level_lists($update['organizationId']);
|
||||
if($level_lists){
|
||||
$area_id = $level_lists[1]['organizationId'];//获取大区id
|
||||
$biz_id = $level_lists[2]['organizationId'];//获取店铺id
|
||||
}
|
||||
$type = 0;
|
||||
}
|
||||
if($update['teamId']){
|
||||
$team_lists = $this->sylive_entity->get_team_lists($update['teamId']);
|
||||
if($team_lists) {
|
||||
$area_id = $team_lists[0]['teamId']; //大团长id
|
||||
$biz_id = $team_lists[1]['teamId']; //团长id
|
||||
}
|
||||
$type = 1;
|
||||
}
|
||||
if($update['teamId']||$update['organizationId']){
|
||||
$where = [
|
||||
'type' => $type,
|
||||
'activityId' => $item['activityId'],
|
||||
'cfUserId' => $item['userId']
|
||||
];
|
||||
$where['kpi'] = 'browse';
|
||||
$browse = $this->mdSytActivityKpiData->count($where);
|
||||
$where['kpi'] = 'subscribe';
|
||||
$subscribe = $this->mdSytActivityKpiData->count($where);
|
||||
$where['kpi'] = 'order';
|
||||
$orderTotal = $this->mdSytActivityKpiData->count($where);
|
||||
$where['kpi'] = 'watch';
|
||||
$watch = $this->mdSytActivityKpiData->count($where);
|
||||
}
|
||||
$area_id && $update['areaId'] = $area_id;
|
||||
$biz_id && $update['bizId'] = $biz_id;
|
||||
$browse && $update['browse'] = $browse;
|
||||
$subscribe && $update['subscribe'] = $browse;
|
||||
$orderTotal && $update['orderTotal'] = $browse;
|
||||
$watch && $update['watch'] = $browse;
|
||||
$this->act_user_model->update($update,['userId'=>$item['userId']]);
|
||||
echo "更新成功:".json_encode($update,JSON_UNESCAPED_UNICODE)."<br>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
<?php
|
||||
/**
|
||||
* 私域直播
|
||||
*/
|
||||
class Sylive_data_entity{
|
||||
|
||||
private $ci;
|
||||
private $map_kpi_biz = [
|
||||
'browse' => 'browse', 'subscribe' => 'subscribe', 'order' => 'orderTotal','watch' => 'watch'
|
||||
];
|
||||
|
||||
public function __construct(){
|
||||
$this->ci = &get_instance();
|
||||
$this->ci->load->model('market/market_sylive_user_model', 'user_model');
|
||||
$this->ci->load->model('market/market_sylive_activity_user_model', 'act_user_model');
|
||||
$this->ci->load->model('market/market_sylive_activity_model');
|
||||
$this->ci->load->model('market/market_sylive_activity_biz_model','mdSytActivityBiz');
|
||||
$this->ci->load->model('market/market_sylive_activity_team_model','mdSytActivityTeam');
|
||||
$this->ci->load->model('market/market_sylive_activity_kpidata_model','mdSytActivityKpiData');
|
||||
$this->ci->load->model('market/market_sylive_organization_model');
|
||||
$this->ci->load->model('market/market_sylive_activity_orders_model','mdSytActivityOrders');
|
||||
$this->ci->load->model('live/Live_polyv_viewlog_model', 'mdPolyvViewlog');
|
||||
$this->ci->load->model('market/market_sylive_team_model');
|
||||
$this->ci->load->model('market/market_sylive_viewlog_model');
|
||||
}
|
||||
|
||||
/**
|
||||
* 更具kpi排名
|
||||
* @param $where
|
||||
* @return void
|
||||
*/
|
||||
public function top_biz_kpidata($params, $page=1, $size=10, $biz_id=0){
|
||||
$t1 = 'lc_market_sylive_activity_biz';
|
||||
$t2 = 'lc_market_sylive_activity_kpidata';
|
||||
$fileds = "{$t1}.bizId,count({$t2}.id) as t";
|
||||
$where = [
|
||||
"{$t1}.activityId" => $params['activityId'],
|
||||
"{$t1}.status" => 0,
|
||||
];
|
||||
$j_where = [
|
||||
"{$t2}.bizId={$t1}.bizId",
|
||||
"{$t2}.activityId={$t1}.activityId",
|
||||
"{$t2}.kpi='{$params['kpi']}'"
|
||||
];
|
||||
if($params['createTime']){
|
||||
$j_where[] = "{$t2}.createTime>=".strtotime($params['createTime'].' 00:00:00');
|
||||
$j_where[] = "{$t2}.createTime<=".strtotime($params['createTime'].' 23:59:59');
|
||||
}
|
||||
$j_where = implode(' and ',$j_where);
|
||||
if($page) {
|
||||
$offset = ($page - 1) * $size;
|
||||
$limit = $size;
|
||||
} else {
|
||||
$offset = null;
|
||||
$limit = null;
|
||||
}
|
||||
$total = $this->ci->db->select($fileds)->from("$t1")
|
||||
->join("$t2", $j_where, 'left')
|
||||
->where($where)->group_by("{$t1}.bizId")->order_by("t desc,{$t1}.id desc")->count_all_results();
|
||||
if($total){
|
||||
$rows = $this->ci->db->select($fileds)->from("$t1")
|
||||
->join("$t2", $j_where, 'left')
|
||||
->where($where)->group_by("{$t1}.bizId")->order_by("t desc,{$t1}.id desc")->limit($limit, $offset)
|
||||
->get()->result_array();
|
||||
$biz_ids = implode(',',array_column($rows,'bizId'));
|
||||
$org_rows = [];
|
||||
if($biz_ids){
|
||||
$org_rows = $this->ci->market_sylive_organization_model->map('organizationId','organizationName',["organizationId in ($biz_ids)"],'','','','organizationId,organizationName');
|
||||
}
|
||||
$start = $page>1 ? ($page-1)*$size : 0;
|
||||
foreach ($rows as $key=>$val) {
|
||||
$lists[] = [
|
||||
'ranking' => $start+$key+1,
|
||||
'name' => $org_rows[$val['bizId']] ? $org_rows[$val['bizId']] : '',
|
||||
'num' => $val['t'].'人',
|
||||
'tip' => $biz_id==$val['bizId'] ? '本店' : '',
|
||||
];
|
||||
}
|
||||
}
|
||||
$data = [
|
||||
'total' => $total,
|
||||
'lists' => $lists
|
||||
];
|
||||
return $data;
|
||||
}
|
||||
|
||||
//排行数据
|
||||
public function top_lists($aid,$type='browse',$page=1,$size=10,$biz_id=0){
|
||||
$lists = [];
|
||||
$where = [
|
||||
'activityId' => $aid,
|
||||
'status' => 0
|
||||
];
|
||||
$total = $this->ci->mdSytActivityBiz->count($where);
|
||||
$field = $this->map_kpi_biz[$type];
|
||||
if($total && $field){
|
||||
$rows = $this->ci->mdSytActivityBiz->select($where,"{$field} desc,id desc",$page,$size);
|
||||
$biz_ids = implode(',',array_column($rows,'bizId'));
|
||||
$org_rows = [];
|
||||
if($biz_ids){
|
||||
$org_rows = $this->ci->market_sylive_organization_model->map('organizationId','organizationName',["organizationId in ($biz_ids)"],'','','','organizationId,organizationName');
|
||||
}
|
||||
$start = $page>1 ? ($page-1)*$size : 0;
|
||||
foreach ($rows as $key=>$val) {
|
||||
$lists[] = [
|
||||
'ranking' => $start+$key+1,
|
||||
'name' => $org_rows[$val['bizId']] ? $org_rows[$val['bizId']] : '',
|
||||
'num' => $val[$this->map_kpi_biz[$type]].'人',
|
||||
'tip' => $biz_id==$val['bizId'] ? '本店' : '',
|
||||
];
|
||||
}
|
||||
}
|
||||
$data = [
|
||||
'total' => $total,
|
||||
'lists' => $lists
|
||||
];
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function __get($name)
|
||||
{
|
||||
if ('_model' === substr($name, -6)) {
|
||||
return $this->ci->$name;
|
||||
} elseif ('load' == $name) {
|
||||
return $this->ci->load;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -234,39 +234,6 @@ class Sylive_entity{
|
||||
}
|
||||
}
|
||||
|
||||
//排行数据
|
||||
public function top_lists($aid,$type='browse',$page=1,$size=10,$biz_id=0){
|
||||
$lists = [];
|
||||
$where = [
|
||||
'activityId' => $aid,
|
||||
'status' => 0
|
||||
];
|
||||
$total = $this->ci->mdSytActivityBiz->count($where);
|
||||
$field = $this->map_kpi_biz[$type];
|
||||
if($total && $field){
|
||||
$rows = $this->ci->mdSytActivityBiz->select($where,"{$field} desc,id desc",$page,$size);
|
||||
$biz_ids = implode(',',array_column($rows,'bizId'));
|
||||
$org_rows = [];
|
||||
if($biz_ids){
|
||||
$org_rows = $this->ci->market_sylive_organization_model->map('organizationId','organizationName',["organizationId in ($biz_ids)"],'','','','organizationId,organizationName');
|
||||
}
|
||||
$start = $page>1 ? ($page-1)*$size : 0;
|
||||
foreach ($rows as $key=>$val) {
|
||||
$lists[] = [
|
||||
'ranking' => $start+$key+1,
|
||||
'name' => $org_rows[$val['bizId']] ? $org_rows[$val['bizId']] : '',
|
||||
'num' => $val[$this->map_kpi_biz[$type]].'人',
|
||||
'tip' => $biz_id==$val['bizId'] ? '本店' : '',
|
||||
];
|
||||
}
|
||||
}
|
||||
$data = [
|
||||
'total' => $total,
|
||||
'lists' => $lists
|
||||
];
|
||||
return $data;
|
||||
}
|
||||
|
||||
//门店用户排行数据
|
||||
public function top_biz_user($aid,$biz_id,$uid,$type='browse',$page=1,$size=50){
|
||||
if(!$biz_id){
|
||||
|
||||
@@ -238,11 +238,30 @@ class Wx extends Common{
|
||||
$param = $this->myencryption->base64url_decode($skey);
|
||||
$act_user = $this->act_user_model->get(['activityId'=>$param['a_id'],'userId'=>$this->uid]);
|
||||
if(!$act_user && $param['a_id']){
|
||||
$this->load->library('market/sylive_entity');
|
||||
$act_data = [
|
||||
'activityId' => $param['a_id'],
|
||||
'userId' => $this->uid,
|
||||
"createTime" => date('Y-m-d H:i:s')
|
||||
];
|
||||
if($row_wechat['organizationId']){
|
||||
$act_data['organizationId'] = $row_wechat['organizationId'];
|
||||
$level_lists = $this->sylive_entity->get_level_lists($row_wechat['organizationId']);
|
||||
if($level_lists){
|
||||
$area_id = $level_lists[1]['organizationId'];//获取大区id
|
||||
$biz_id = $level_lists[2]['organizationId'];//获取店铺id
|
||||
}
|
||||
}
|
||||
if($row_wechat['teamId']){
|
||||
$act_data['teamId'] = $row_wechat['teamId'];
|
||||
$team_lists = $this->sylive_entity->get_team_lists($row_wechat['teamId']);
|
||||
if($team_lists) {
|
||||
$area_id = $team_lists[0]['teamId']; //大团长id
|
||||
$biz_id = $team_lists[1]['teamId']; //团长id
|
||||
}
|
||||
}
|
||||
$area_id && $act_data['areaId'] = $area_id;
|
||||
$biz_id && $act_data['bizId'] = $biz_id;
|
||||
if($param['cf_uid']){
|
||||
$p_user = $this->user_model->get(['userId'=>$param['cf_uid']],'userId,organizationId,teamId');
|
||||
$p_act_user = $this->act_user_model->get(['userId'=>$param['cf_uid']],'userId,channelId');
|
||||
|
||||
@@ -10,6 +10,8 @@ class Login extends CI_Controller{
|
||||
parent::__construct();
|
||||
session_start();
|
||||
$this->load->model('market/market_sylive_user_model', 'user_model');
|
||||
$this->load->model('market/market_sylive_activity_user_model', 'act_user_model');
|
||||
$this->load->library('market/sylive_entity');
|
||||
$this->load->library('hd_exception');
|
||||
}
|
||||
|
||||
@@ -63,6 +65,28 @@ class Login extends CI_Controller{
|
||||
$this->user_model->update($update,['userId'=>$user['userId']]);
|
||||
//删除普通账户
|
||||
$this->user_model->update(['status'=>-1],['openid'=>$wx_info['openid'],'status>='=>0,'organizationId'=>0,'teamId'=>0]);
|
||||
//更新activity用户表数据
|
||||
$update = [
|
||||
'organizationId' => $user['organizationId'],
|
||||
'teamId' => $user['teamId']
|
||||
];
|
||||
if($update['organizationId']){
|
||||
$level_lists = $this->sylive_entity->get_level_lists($update['organizationId']);
|
||||
if($level_lists){
|
||||
$area_id = $level_lists[1]['organizationId'];//获取大区id
|
||||
$biz_id = $level_lists[2]['organizationId'];//获取店铺id
|
||||
}
|
||||
}
|
||||
if($update['teamId']){
|
||||
$team_lists = $this->sylive_entity->get_team_lists($update['teamId']);
|
||||
if($team_lists) {
|
||||
$area_id = $team_lists[0]['teamId']; //大团长id
|
||||
$biz_id = $team_lists[1]['teamId']; //团长id
|
||||
}
|
||||
}
|
||||
$area_id && $update['areaId'] = $area_id;
|
||||
$biz_id && $update['bizId'] = $biz_id;
|
||||
$this->act_user_model->update($update,['openid'=>$wx_info['openid'],'status'=>0]);
|
||||
return ['code' => 1,'msg' => '绑定成功'];
|
||||
}
|
||||
//获取验证码
|
||||
|
||||
@@ -14,6 +14,7 @@ class Stic extends Admin{
|
||||
$this->load->model('market/market_sylive_order_model');
|
||||
$this->load->model('live/Live_polyv_session_model', 'mdPolyvSession');
|
||||
$this->load->library('market/sylive_entity');
|
||||
$this->load->library('market/sylive_data_entity');
|
||||
$this->group_id = $this->sylive_entity->get_level($this->session['org_id']);
|
||||
$this->data['skey'] = $this->input->get('skey');
|
||||
}
|
||||
@@ -63,6 +64,11 @@ class Stic extends Admin{
|
||||
$b_row = $this->market_sylive_organization_model->get(['organizationId'=>$info['biz_id']],'organizationName');
|
||||
$h_title .= $b_row['organizationName'];
|
||||
}
|
||||
$day_list = ['全部'];
|
||||
for($i=0;$i<9;$i++){
|
||||
$day_list[] = date('Y-m-d',strtotime("-{$i} day"));
|
||||
}
|
||||
$this->data['day_list'] = $day_list;
|
||||
$this->data['h_title'] = $h_title;
|
||||
$this->data['info'] = $info;
|
||||
$this->show_view('h5/market/sylive/stic/area');
|
||||
@@ -165,13 +171,13 @@ class Stic extends Admin{
|
||||
];
|
||||
}
|
||||
$biz_id = $this->sylive_entity->get_biz_id($this->session['org_id'],$this->group_id);
|
||||
$browse_lists = $this->sylive_entity->top_lists($a_id,'browse',1,10,$biz_id);
|
||||
$browse_lists = $this->sylive_data_entity->top_lists($a_id,'browse',1,10,$biz_id);
|
||||
$browse = [
|
||||
'title' => '门店<span class="color-00a2ff">浏览</span>排行',
|
||||
'url' => '/h5/market/sylive/stic/rank?type=browse&skey='.$skey,
|
||||
'list' => $browse_lists['lists']
|
||||
];
|
||||
$book_lists = $this->sylive_entity->top_lists($a_id,'subscribe',1,10,$biz_id);
|
||||
$book_lists = $this->sylive_data_entity->top_lists($a_id,'subscribe',1,10,$biz_id);
|
||||
$book = [
|
||||
'title' => '门店<span class="color-00a2ff">预约</span>排行',
|
||||
'url' => '/h5/market/sylive/stic/rank?type=subscribe&skey='.$skey,
|
||||
@@ -312,13 +318,13 @@ class Stic extends Admin{
|
||||
['title' => '观看次数', 'num' => "{$livePV}次"],
|
||||
];
|
||||
$biz_id = $this->sylive_entity->get_biz_id($this->session['org_id'],$this->group_id);
|
||||
$watch_lists = $this->sylive_entity->top_lists($a_id,'watch',1,10,$biz_id);
|
||||
$watch_lists = $this->sylive_data_entity->top_lists($a_id,'watch',1,10,$biz_id);
|
||||
$view = [
|
||||
'title' => '门店<span class="color-00a2ff">观看</span>排行',
|
||||
'url' => '/h5/market/sylive/stic/rank?type=watch&skey='.$skey,
|
||||
'list' => $watch_lists['lists']
|
||||
];
|
||||
$order_lists = $this->sylive_entity->top_lists($a_id,'order',1,10,$biz_id);
|
||||
$order_lists = $this->sylive_data_entity->top_lists($a_id,'order',1,10,$biz_id);
|
||||
$order = [
|
||||
'title' => '门店<span class="color-00a2ff">订单</span>排行',
|
||||
'url' => '/h5/market/sylive/stic/rank?type=order&skey='.$skey,
|
||||
@@ -339,9 +345,7 @@ class Stic extends Admin{
|
||||
];
|
||||
$this->show_json($data,200);
|
||||
}
|
||||
|
||||
//排名列表
|
||||
public function rank(){
|
||||
public function ajax_rank(){
|
||||
$title_arr = [
|
||||
'browse' => '门店<span class="color-00a2ff">浏览</span>排行',
|
||||
'subscribe' => '门店<span class="color-00a2ff">预约</span>排行',
|
||||
@@ -349,16 +353,29 @@ class Stic extends Admin{
|
||||
'order' => '门店<span class="color-00a2ff">订单</span>排行'
|
||||
];
|
||||
$params = $this->input->get();
|
||||
if($this->input->is_ajax_request()){
|
||||
$page = $params['page'] ? intval($params['page']) : 1;
|
||||
$info = $this->myencryption->base64url_decode($params['skey']);
|
||||
$a_id = intval($info['a_id']);//活动id
|
||||
$biz_id = $this->sylive_entity->get_biz_id($this->session['org_id'],$this->group_id);
|
||||
$type = $params['type'] ? $params['type'] : 'browse';
|
||||
$data = $this->sylive_entity->top_lists($a_id,$type,$page,20,$biz_id);
|
||||
$data['title'] = $title_arr[$type];
|
||||
$this->show_json($data,200);
|
||||
$page = $params['page'] ? intval($params['page']) : 1;
|
||||
$size = $params['size'] ? intval($params['size']) : 20;
|
||||
$info = $this->myencryption->base64url_decode($params['skey']);
|
||||
$a_id = intval($info['a_id']);//活动id
|
||||
$biz_id = $this->sylive_entity->get_biz_id($this->session['org_id'],$this->group_id);
|
||||
$type = $params['type'] ? $params['type'] : 'browse';
|
||||
if(strtotime($params['day'])){ //根据日期排行
|
||||
$where = [
|
||||
'activityId' => $a_id,
|
||||
'kpi' => $type,
|
||||
'createTime' => $params['day'],
|
||||
];
|
||||
$data = $this->sylive_data_entity->top_biz_kpidata($where,$page,$size,$biz_id);
|
||||
}else{
|
||||
$data = $this->sylive_data_entity->top_lists($a_id,$type,$page,$size,$biz_id);
|
||||
}
|
||||
$data['title'] = $title_arr[$type];
|
||||
$data['url'] = "/h5/market/sylive/stic/rank?type={$type}&skey={$params['skey']}&day={$params['day']}";
|
||||
$this->show_json($data,200);
|
||||
}
|
||||
//排名列表
|
||||
public function rank(){
|
||||
$params = $this->input->get();
|
||||
$param = $this->myencryption->base64url_decode($this->data['skey']);
|
||||
$a_id = intval($param['a_id']);//活动id
|
||||
$row = $this->market_sylive_activity_model->get(['activityId'=>$a_id]);
|
||||
|
||||
@@ -76,7 +76,10 @@
|
||||
<div class="mt30 bg-f9 inner40 overflowhidden ulib-r20">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="begin.browse.title"></b>
|
||||
<a class="mt5 fn-fr font-28" :href="begin.browse.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
<!-- <a class="mt5 fn-fr font-28" :href="begin.browse.url">查看更多<i class="iconfont icon-gengduo"></i></a>-->
|
||||
<select class="fn-fr select-more ulib-r10 font-28" @change="changebeginbook">
|
||||
<option :value="item" v-for="item in day_list">{{item}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div v-if="begin.browse && begin.browse.list">
|
||||
<div class="font-32 color-666" v-for="(item,index) in begin.browse.list">
|
||||
@@ -90,6 +93,7 @@
|
||||
<div class="fn-fr">{{item.num}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt10 text-center"><a class="mt5 font-28" :href="begin.browse.url">查看更多<i class="iconfont icon-gengduo"></i></a></div>
|
||||
</div>
|
||||
<div class="pt100 pb100 text-center font-32 color-666" v-else>暂时无数据</div>
|
||||
</div>
|
||||
@@ -97,7 +101,10 @@
|
||||
<div class="mt30 bg-f9 inner40 overflowhidden ulib-r20">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="begin.book.title"></b>
|
||||
<a class="mt5 fn-fr font-28" :href="begin.book.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
<!-- <a class="mt5 fn-fr font-28" :href="begin.book.url">查看更多<i class="iconfont icon-gengduo"></i></a>-->
|
||||
<select class="fn-fr select-more ulib-r10 font-28" @change="changebeginbook($event,'subscribe')">
|
||||
<option :value="item" v-for="item in day_list">{{item}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div v-if="begin.book && begin.book.list">
|
||||
<div class="font-32 color-666" v-for="(item,index) in begin.book.list">
|
||||
@@ -111,6 +118,7 @@
|
||||
<div class="fn-fr">{{item.num}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt10 text-center"><a class="mt5 font-28" :href="begin.book.url">查看更多<i class="iconfont icon-gengduo"></i></a></div>
|
||||
</div>
|
||||
<div class="pt100 pb100 text-center font-32 color-666" v-else>暂时无数据</div>
|
||||
</div>
|
||||
@@ -178,7 +186,7 @@
|
||||
<div class="mt30 bg-f9 inner40 overflowhidden ulib-r20">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="live.view.title"></b>
|
||||
<a class="mt5 fn-fr font-28" :href="live.view.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
<!-- <a class="mt5 fn-fr font-28" :href="live.view.url">查看更多<i class="iconfont icon-gengduo"></i></a>-->
|
||||
</div>
|
||||
<div v-if="live.view.list.length>0">
|
||||
<div class="font-32 color-666" v-for="(item,index) in live.view.list">
|
||||
@@ -192,6 +200,7 @@
|
||||
<div class="fn-fr">{{item.num}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt10 text-center"><a class="mt5 font-28" :href="live.view.url">查看更多<i class="iconfont icon-gengduo"></i></a></div>
|
||||
</div>
|
||||
<div class="pt100 pb100 text-center font-32 color-666" v-else>暂时无数据</div>
|
||||
</div>
|
||||
@@ -199,7 +208,7 @@
|
||||
<div class="mt30 bg-f9 inner40 overflowhidden ulib-r20">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="live.order.title"></b>
|
||||
<a class="mt5 fn-fr font-28" :href="live.order.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
<!-- <a class="mt5 fn-fr font-28" :href="live.order.url">查看更多<i class="iconfont icon-gengduo"></i></a>-->
|
||||
</div>
|
||||
<div v-if="live.order.list.length>0">
|
||||
<div class="font-32 color-666" v-for="(item,index) in live.order.list">
|
||||
@@ -213,6 +222,7 @@
|
||||
<div class="fn-fr">{{item.num}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt10 text-center"><a class="mt5 font-28" :href="live.order.url">查看更多<i class="iconfont icon-gengduo"></i></a></div>
|
||||
</div>
|
||||
<div class="pt100 pb100 text-center font-32 color-666" v-else>暂时无数据</div>
|
||||
</div>
|
||||
@@ -220,7 +230,7 @@
|
||||
<div class="mt30 bg-f9 inner40 overflowhidden ulib-r20" v-if="live.view_num && live.view_num.list">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="live.view_num.title"></b>
|
||||
<a class="mt5 fn-fr font-28" v-if="live.view_num.url" :href="live.view_num.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
<!-- <a class="mt5 fn-fr font-28" v-if="live.view_num.url" :href="live.view_num.url">查看更多<i class="iconfont icon-gengduo"></i></a>-->
|
||||
</div>
|
||||
<div>
|
||||
<div class="font-32 color-666" v-for="(item,index) in live.view_num.list">
|
||||
@@ -234,6 +244,7 @@
|
||||
<div class="fn-fr">{{item.num}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt10 text-center"><a class="mt5 font-28" :href="live.view_num.url">查看更多<i class="iconfont icon-gengduo"></i></a></div>
|
||||
</div>
|
||||
<div class="pt100 pb100 text-center font-32 color-666" v-else>暂时无数据</div>
|
||||
</div>
|
||||
@@ -242,7 +253,7 @@
|
||||
<div class="mt30 bg-f9 inner40 overflowhidden ulib-r20" v-if="live.view_time && live.view_time.list">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="live.view_time.title"></b>
|
||||
<a class="mt5 fn-fr font-28" v-if="live.view_time.url" :href="live.view_time.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
<!-- <a class="mt5 fn-fr font-28" v-if="live.view_time.url" :href="live.view_time.url">查看更多<i class="iconfont icon-gengduo"></i></a>-->
|
||||
</div>
|
||||
<div>
|
||||
<div class="font-32 color-666" v-for="(item,index) in live.view_time.list">
|
||||
@@ -256,6 +267,7 @@
|
||||
<div class="fn-fr">{{item.num}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt10 text-center"><a class="mt5 font-28" :href="live.view_time.url">查看更多<i class="iconfont icon-gengduo"></i></a></div>
|
||||
</div>
|
||||
<div class="pt100 pb100 text-center font-32 color-666" v-else>暂时无数据</div>
|
||||
</div>
|
||||
@@ -279,6 +291,7 @@
|
||||
tabid:'<?=$info['tab']?>',//1预热阶段 /2直播阶段
|
||||
info:'',
|
||||
loading: false,
|
||||
day_list : <?=json_encode($day_list,JSON_UNESCAPED_UNICODE)?>,
|
||||
begin:{
|
||||
mine:[],
|
||||
biz:[],
|
||||
@@ -324,6 +337,7 @@
|
||||
list:[],
|
||||
}
|
||||
},
|
||||
ph_type:'',
|
||||
},
|
||||
created(){
|
||||
|
||||
@@ -427,6 +441,36 @@
|
||||
}
|
||||
},
|
||||
|
||||
//选择浏览时间
|
||||
changebeginbook(e,type){
|
||||
// console.log(e.target.value)
|
||||
// console.log(type)
|
||||
this.ph_type = type;
|
||||
if(this.beginbookDate != e.target.value){
|
||||
this.beginbookDate = e.target.value
|
||||
let that=this;
|
||||
var params = {
|
||||
'skey':'<?=$skey?>',
|
||||
'biz_id':'<?=$info['biz_id']?>',
|
||||
'area_id':'<?=$info['area_id']?>',
|
||||
'day' : this.beginbookDate,
|
||||
'type':type,
|
||||
'size':10
|
||||
}
|
||||
//请求接口
|
||||
$.get('/h5/market/sylive/stic/ajax_rank',params,function (result){
|
||||
if(result.data){
|
||||
if(that.ph_type){
|
||||
that.begin.book.list = result.data.lists
|
||||
that.begin.book.url = result.data.url
|
||||
}else{
|
||||
that.begin.browse.list = result.data.lists
|
||||
that.begin.browse.url = result.data.url
|
||||
}
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
if (!that.isNoData && !that.isDataEnd && !that.loading) {
|
||||
that.loading = true;
|
||||
//请求接口
|
||||
$.get('/h5/market/sylive/stic/rank',{'skey':'<?=$params['skey']?>','type':'<?=$params['type']?>','page':that.page},function (res){
|
||||
$.get('/h5/market/sylive/stic/ajax_rank',{'skey':'<?=$params['skey']?>','type':'<?=$params['type']?>','day':'<?=$params['day']?>','page':that.page},function (res){
|
||||
that.loading = false;
|
||||
that.page = that.page + 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user