add-syt-customer
This commit is contained in:
@@ -7,11 +7,12 @@ class Sylive2_data_entity{
|
||||
const DF_IMG = 'https://qs.haodian.cn/web/images/project/H5-ShiYu/goodslogo.jpg'; //东风图标
|
||||
|
||||
private $ci;
|
||||
private $show_echarts = false;
|
||||
private $map_kpi_biz = [
|
||||
'browse' => 'browse', 'subscribe' => 'subscribe', 'order' => 'orderTotal','watch' => 'watch','beforeOrder' => 'beforeOrderTotal'
|
||||
];
|
||||
|
||||
public function __construct(){
|
||||
public function __construct($params = []){
|
||||
$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');
|
||||
@@ -24,6 +25,7 @@ class Sylive2_data_entity{
|
||||
$this->ci->load->model('market/market_sylive_viewlog_model');
|
||||
$this->load->model('market/market_sylive_groups_model', 'groups_model');
|
||||
$this->load->model('market/market_sylive_groups_user_model', 'groups_user_model');
|
||||
$params['show_echarts'] && $this->show_echarts = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -31,9 +33,11 @@ class Sylive2_data_entity{
|
||||
*/
|
||||
public function top_kpidata($groupby,$where,$order,$page=1,$page_size=20,$select='',$tagId=0){
|
||||
$total = $this->ci->mdSytActivityKpiData->count($where,$groupby);
|
||||
$lists = [];
|
||||
$pieChart = $lists = [];
|
||||
if($total){
|
||||
$rows = $this->ci->mdSytActivityKpiData->select_groupby($groupby, $where, $order, $page, $page_size, $select);
|
||||
$other_total = 0;
|
||||
$this->show_echarts && $other_total = $this->ci->mdSytActivityKpiData->count($where);
|
||||
$biz_rows = $target_rows = [];
|
||||
if($groupby=='bizId'){
|
||||
$biz_ids = implode(',',array_column($rows,'tagId'));
|
||||
@@ -49,6 +53,7 @@ class Sylive2_data_entity{
|
||||
}
|
||||
$num_tip = $where['kpi'] == 'order' ? '单' : '人';
|
||||
$start = $page>1 ? ($page-1)*$page_size : 0;
|
||||
$i = 0;
|
||||
foreach ($rows as $key=>$val) {
|
||||
$headimg = '';
|
||||
if($groupby=='bizId'){
|
||||
@@ -73,11 +78,20 @@ class Sylive2_data_entity{
|
||||
'headimg' => $headimg,
|
||||
'tip' => $tip,
|
||||
];
|
||||
if($this->show_echarts && $val['t']>0 && $i<5){
|
||||
$pieChart[] = ['value'=>$val['t'],'name'=>$name];
|
||||
$other_total -= $val['t'];
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if($this->show_echarts && $other_total>0){
|
||||
$pieChart[] = ['value'=>$other_total,'name'=>'其它'];
|
||||
}
|
||||
}
|
||||
$data = [
|
||||
'total' => $total,
|
||||
'lists' => $lists
|
||||
'lists' => $lists,
|
||||
'pieChart' => $pieChart
|
||||
];
|
||||
return $data;
|
||||
}
|
||||
@@ -85,10 +99,17 @@ class Sylive2_data_entity{
|
||||
* @return void
|
||||
*/
|
||||
public function top_groups_user($groupby,$where,$order,$page=1,$page_size=20,$select='',$kpi,$tagId=0){
|
||||
$pieChart = [];
|
||||
$total = $this->ci->groups_user_model->count($where,$groupby);
|
||||
$lists = [];
|
||||
if($total){
|
||||
$rows = $this->ci->groups_user_model->select_groupby($groupby, $where, $order, $page, $page_size, $select);
|
||||
$other_total = 0;
|
||||
if($this->show_echarts){
|
||||
$sum_key = $this->map_kpi_biz[$kpi];
|
||||
$sum_key && $other_sum = $this->ci->groups_user_model->sum($sum_key,$where);
|
||||
$other_sum[$sum_key] && $other_total = $other_sum[$sum_key];
|
||||
}
|
||||
$biz_rows = $target_rows = [];
|
||||
if($groupby=='bizId'){
|
||||
$biz_ids = implode(',',array_column($rows,'tagId'));
|
||||
@@ -104,6 +125,7 @@ class Sylive2_data_entity{
|
||||
}
|
||||
$start = $page>1 ? ($page-1)*$page_size : 0;
|
||||
$num_tip = $kpi == 'order' ? '单' : '人';
|
||||
$i = 0;
|
||||
foreach ($rows as $key=>$val) {
|
||||
$tip = $headimg = $name = '';
|
||||
if($groupby=='bizId'){
|
||||
@@ -126,11 +148,20 @@ class Sylive2_data_entity{
|
||||
'headimg' => $headimg,
|
||||
'tip' => $tip,
|
||||
];
|
||||
if($this->show_echarts && $val['t']>0 && $i<5){
|
||||
$pieChart[] = ['value'=>$val['t'],'name'=>$name];
|
||||
$other_total -= $val['t'];
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if($this->show_echarts && $other_total>0){
|
||||
$pieChart[] = ['value'=>$other_total,'name'=>'其它'];
|
||||
}
|
||||
}
|
||||
$data = [
|
||||
'total' => $total,
|
||||
'lists' => $lists
|
||||
'lists' => $lists,
|
||||
'pieChart' => $pieChart
|
||||
];
|
||||
return $data;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@ class Act extends Wx {
|
||||
$this->load->model('market/market_sylive_subscribemsg_model','mdSytSubscribemsg');
|
||||
$this->load->model('market/market_sylive_activity_kpidata_model','mdSytActivityKpiData');
|
||||
$this->load->model('market/market_sylive_order_model');
|
||||
$this->load->model('market/market_sylive_customer_model');
|
||||
$this->load->model('market/market_sylive_items_model');
|
||||
$this->load->library('market/sylive_entity');
|
||||
$this->load->library('market/sylive2_entity');
|
||||
$this->load->library('qiniu');
|
||||
@@ -113,11 +115,24 @@ class Act extends Wx {
|
||||
$info['live_url'] = "https://live.haodian.cn/watch/{$row['channelId']}?userid={$userid}&ts={$ts}&sign={$sign}";
|
||||
}
|
||||
$info['my_url'] = http_host_com('home')."/h5/market/sylive2/act/userinfo?skey={$this->skey}&type=my";
|
||||
//微信分享
|
||||
$wx_info = $this->share_info($row);
|
||||
$info['show_code'] = $is_show_code ? 1 : 0;
|
||||
$info['alert_code'] = $alert_code ? 1 : 0;
|
||||
$info['appoint_mobile'] = false;
|
||||
$info['is_appoint'] = false;
|
||||
if($jsondata['signBespeak']['status']){
|
||||
$info['appoint_mobile'] = true;
|
||||
//判断是否已报名
|
||||
$where = ['activityId'=>$this->a_id,'userId'=>$this->uid];
|
||||
$appoint = $this->market_sylive_customer_model->count($where);
|
||||
$info['is_appoint'] = $appoint ? true : false;
|
||||
}
|
||||
$info['appoint_title'] = $jsondata['signBespeak']['title'] ? $jsondata['signBespeak']['title'] : '';
|
||||
$info['appoint_msg'] = $jsondata['signBespeak']['content'] ? $jsondata['signBespeak']['content'] : '';
|
||||
$info['notice_color'] = $jsondata['barrageColor'] ? '#fff' : '#333';
|
||||
$info['btn_text'] = $jsondata['button']['title'] ? $jsondata['button']['title'] : '开播提醒';
|
||||
$this->data['info'] = $info;
|
||||
//微信分享
|
||||
$wx_info = $this->share_info($row);
|
||||
$this->data['sign_package'] = $wx_info['sign_package'];
|
||||
$this->data['share'] = $wx_info['share'];
|
||||
$this->data['_title'] = $row['title'];
|
||||
@@ -143,6 +158,8 @@ class Act extends Wx {
|
||||
}
|
||||
$rows = $this->mdSytActivityKpiData->select($where,'id desc',1,30,$field);
|
||||
if($rows){
|
||||
$act_row = $this->market_sylive_activity_model->get(['activityId'=>$a_id]);
|
||||
$jsondata = json_decode($act_row['jsondata'],true);
|
||||
$users = [];
|
||||
$uids = implode(',',array_unique(array_column($rows,'userId')));
|
||||
if($uids){
|
||||
@@ -153,9 +170,15 @@ class Act extends Wx {
|
||||
}
|
||||
foreach ($rows as $item) {
|
||||
$nickname = $users[$item['userId']] ? $users[$item['userId']] : "用户{$item['userId']}";
|
||||
//报名使用自定标题
|
||||
if($jsondata['signBespeak']['status'] && !$live_status && $jsondata['barrage']['title']){
|
||||
$tip = $jsondata['barrage']['title'];
|
||||
}else{
|
||||
$tip = $map_kpi_name[$item['kpi']];
|
||||
}
|
||||
$lists[] = [
|
||||
'name' => $nickname,
|
||||
'tip' => $map_kpi_name[$item['kpi']],
|
||||
'tip' => $tip,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -461,4 +484,93 @@ class Act extends Wx {
|
||||
$this->show_json([],400,'参数错误');
|
||||
}
|
||||
}
|
||||
|
||||
//获取验证码
|
||||
public function get_code(){
|
||||
$mobile = $this->input->post('mobile');
|
||||
if(!mobile_valid($mobile)){
|
||||
$this->show_json('',400,'请输入正确的手机号码');
|
||||
}
|
||||
$redis = &load_cache('redis');
|
||||
$key = "sylive_appointment_code_".$mobile;
|
||||
$code = $redis->get($key);
|
||||
if(!$code){
|
||||
$this->load->helper('string');
|
||||
$code = random_string('numeric', 4);
|
||||
$redis->save($key, $code, 60*5);
|
||||
}
|
||||
$content = "【好店云】您的验证码为: {$code},五分钟之内有效,请勿泄露于他人,!";
|
||||
b2m_send_sms($mobile,$content);
|
||||
$this->show_json('',200, '验证码已发送');
|
||||
}
|
||||
//预约
|
||||
public function appointment(){
|
||||
$mobile = $this->input->post('mobile');
|
||||
$code = $this->input->post('code');
|
||||
$a_id = $this->input->post('a_id');
|
||||
if(!$a_id){
|
||||
$this->show_json('',400, '参数错误');
|
||||
}
|
||||
$redis = &load_cache('redis');
|
||||
$key = "sylive_appointment_code_".$mobile;
|
||||
$c_code = $redis->get($key);
|
||||
if(!$code || $code!=$c_code){
|
||||
$this->show_json('',400, '请输入正确的验证码');
|
||||
}
|
||||
$row = $this->market_sylive_customer_model->get(['activityId'=>$this->a_id,'mobile'=>$mobile]);
|
||||
if($row){
|
||||
$update = [
|
||||
'ifAppointment' => 1
|
||||
];
|
||||
!$row['userId'] && $update['userId'] = $this->uid;
|
||||
$this->market_sylive_customer_model->update($update,['customerId'=>$row['customerId']]);
|
||||
}else{
|
||||
$ac_row = $this->market_sylive_activity_model->get(['activityId'=>$a_id],'jsondata');
|
||||
$jsondata = json_decode($ac_row['jsondata'],true);
|
||||
$act_user_row = $this->act_user_model->get(['id'=>$this->act_uid]);
|
||||
$add_data = [
|
||||
'activityId' => $a_id,
|
||||
'userId' => $this->uid,
|
||||
'ifAppointment' => 1,
|
||||
'mobile' => $mobile,
|
||||
'createTime' => date('Y-m-d H:i:s')
|
||||
];
|
||||
$act_user_row['channelId'] && $add_data['cfUserId'] = $act_user_row['channelId'];
|
||||
$act_user_row['bizId'] && $add_data['bizId'] = $act_user_row['bizId'];
|
||||
$act_user_row['levelId1'] && $add_data['levelId1'] = $act_user_row['levelId1'];
|
||||
$act_user_row['levelId2'] && $add_data['levelId2'] = $act_user_row['levelId2'];
|
||||
$act_user_row['levelId3'] && $add_data['levelId3'] = $act_user_row['levelId3'];
|
||||
$add_data['cfUserId'] && $add_data['status'] = 1;
|
||||
$this->market_sylive_customer_model->add($add_data);
|
||||
if($jsondata['signBespeak']['status'] && $jsondata['signBespeak']['itemId']){ //绑定新增商品订单
|
||||
$itemId = $jsondata['signBespeak']['itemId'];
|
||||
$item = $this->market_sylive_items_model->get(['itemId'=>$itemId]);
|
||||
$p_user = [];
|
||||
$act_user_row['channelId'] && $p_user = $this->act_user_model->get(['userId'=>$act_user_row['channelId'],'activityId'=>$a_id]);
|
||||
$this->load->helper('order');
|
||||
$unpay = [
|
||||
'sid' => create_order_no('350200','market'),
|
||||
'activityId' => $a_id,
|
||||
'userId' => $this->uid,
|
||||
'itemId' => $itemId,
|
||||
'itemTitle' => $item['title'],
|
||||
'itemPrice' => 0,
|
||||
'totalPrice' => 0,
|
||||
'expireTime' => 0,//订单过期时间
|
||||
'status' => 1,
|
||||
'payTime' => date('Y-m-d H:i:s'),
|
||||
'createTime' => date('Y-m-d H:i:s')
|
||||
];
|
||||
$mobile && $unpay['mobile'] = $mobile;
|
||||
$p_user['bizId'] && $unpay['bizId'] = $p_user['bizId'];
|
||||
$p_user['levelId1'] && $unpay['levelId1'] = $p_user['levelId1'];
|
||||
$p_user['levelId2'] && $unpay['levelId2'] = $p_user['levelId2'];
|
||||
$p_user['levelId3'] && $unpay['levelId3'] = $p_user['levelId3'];
|
||||
$p_user['userId'] && $unpay['cfUserId'] = $p_user['userId'];
|
||||
$this->market_sylive_order_model->add($unpay);
|
||||
}
|
||||
}
|
||||
$redis->delete($key);
|
||||
$this->show_json('',200, '预约成功');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,6 +282,25 @@ class Wx extends Common{
|
||||
}
|
||||
$row_wechat['groupsId'] && $act_data['channelId'] = $this->uid;//管理员自己归属到自己
|
||||
$act_user['id'] = $this->act_user_model->add($act_data);
|
||||
}else{
|
||||
//更新分组信息
|
||||
$update_ac_user = [];
|
||||
if($act_user['bizId']!=$row_wechat['bizId']){
|
||||
$update_ac_user['bizId'] = $row_wechat['bizId'];
|
||||
}
|
||||
if($act_user['groupsId']!=$row_wechat['groupsId']){
|
||||
$update_ac_user['groupsId'] = $row_wechat['groupsId'];
|
||||
}
|
||||
if($act_user['levelId1']!=$row_wechat['levelId1']){
|
||||
$update_ac_user['levelId1'] = $row_wechat['levelId1'];
|
||||
}
|
||||
if($act_user['levelId2']!=$row_wechat['levelId2']){
|
||||
$update_ac_user['levelId2'] = $row_wechat['levelId2'];
|
||||
}
|
||||
if($act_user['levelId3']!=$row_wechat['levelId3']){
|
||||
$update_ac_user['levelId3'] = $row_wechat['levelId3'];
|
||||
}
|
||||
$update_ac_user && $this->act_user_model->update($update_ac_user,['id'=>$act_user['id']]);
|
||||
}
|
||||
$_SESSION[self::SESSION_KEY]['userId'] = $this->uid;
|
||||
$_SESSION[self::SESSION_KEY]['act_uid'] = $act_user['id'];
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
<?php
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
require_once 'Common.php';
|
||||
|
||||
class Customer extends Admin
|
||||
{
|
||||
|
||||
private $a_id;
|
||||
private $group_user;
|
||||
private $is_shop_manager = 0;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('market/market_sylive_items_model');
|
||||
$this->load->model('market/market_sylive_order_model');
|
||||
$this->load->model('market/Market_sylive_activity_draw_model', 'mdSyliveActivityDraw');
|
||||
$this->load->model('market/market_sylive_checkdata_model');
|
||||
$this->load->model('market/market_sylive_customer_model');
|
||||
$this->a_id = $this->input->get('a_id');
|
||||
$this->a_id && $_SESSION[self::SESSION_KEY]['a_id'] = $this->a_id;
|
||||
!$this->a_id && $this->a_id = $_SESSION[self::SESSION_KEY]['a_id'];
|
||||
$skey = $this->myencryption->base64url_encode("a_id=" . $this->a_id);
|
||||
$this->data['act_url'] = "/h5/market/sylive2/act?skey={$skey}";
|
||||
$this->group_user = $this->groups_user_model->get(['activityId' => $this->a_id, 'userId' => $this->uid, 'status' => 0]);
|
||||
$this->data['is_biz'] = $this->group_user['bizId'] ? 1 : 0;
|
||||
if($this->group_user['bizId'] && $this->group_user['type']){ //店长
|
||||
$this->is_shop_manager = 1;
|
||||
}
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$tab = [
|
||||
['id'=>2,'title'=>'待回访'],
|
||||
['id'=>3,'title'=>'已回访']
|
||||
];
|
||||
$this->is_shop_manager && array_unshift($tab,['id'=>1,'title'=>'待分配']);
|
||||
$gw_rows = $this->groups_user_model->select(['activityId' => $this->a_id, 'bizId' => $this->group_user['bizId'], 'status' => 0],'','','','groupsUserId,userId');
|
||||
$uids = implode(',',array_column($gw_rows,'userId'));
|
||||
$gw_list = [];
|
||||
if($gw_rows && $uids){
|
||||
$where = ["userId in ({$uids})"=>null];
|
||||
$user_rows = $this->user_model->map('userId','uname',$where,'','','','userId,uname');
|
||||
foreach ($gw_rows as $item) {
|
||||
$gw_list[] = [
|
||||
'id' => $item['userId'],
|
||||
'title' => $user_rows[$item['userId']]
|
||||
];
|
||||
}
|
||||
}
|
||||
$visitTagAry = $this->market_sylive_customer_model->visitTagAry();
|
||||
$re = $this->market_sylive_activity_model->get(['activityId' => $this->a_id], 'jsondata');
|
||||
$jsonData = $re['jsondata'] ? json_decode($re['jsondata'], true) : [];
|
||||
$visitTag = [];
|
||||
foreach ($visitTagAry as $key => $item) {
|
||||
$tip = $jsonData['visitTag'][$key] ? "({$jsonData['visitTag'][$key]})" : '';
|
||||
$visitTag[] = [
|
||||
'id' => $key,
|
||||
'title' => $item.$tip
|
||||
];
|
||||
}
|
||||
$this->data['visitTag'] = $visitTag;
|
||||
$this->data['tabId'] = $this->is_shop_manager ? 1 : 2;
|
||||
$this->data['tab'] = $tab;
|
||||
$this->data['gw_list'] = $gw_list;
|
||||
$this->data['is_shop_manager'] = $this->is_shop_manager;
|
||||
$this->data['_title'] = '客户';
|
||||
$this->show_view('h5/market/sylive2/customer/index');
|
||||
}
|
||||
|
||||
public function ajax_list(){
|
||||
$page = $this->input->get('page');
|
||||
$tabid = intval($this->input->get('tabid'))-1;
|
||||
$employeeId = intval($this->input->get('employeeId'));
|
||||
$tagId = intval($this->input->get('tagId'));
|
||||
!$page && $page = 1;
|
||||
$size = 10;
|
||||
$where = [
|
||||
'status' => $tabid,
|
||||
'activityId' => $this->a_id
|
||||
];
|
||||
if($this->is_shop_manager){
|
||||
$where['bizId'] = $this->group_user['bizId'];
|
||||
}else{
|
||||
$where['cfUserId'] = $this->uid;
|
||||
}
|
||||
$employeeId && $where['cfUserId'] = $employeeId;
|
||||
$tagId && $where['visitTagId'] = $tagId;
|
||||
$total = $this->market_sylive_customer_model->count($where);
|
||||
$lists = [];
|
||||
if($total){
|
||||
$rows = $this->market_sylive_customer_model->select($where,'customerId desc',$page,$size);
|
||||
$visitTagAry = $this->market_sylive_customer_model->visitTagAry();
|
||||
$re = $this->market_sylive_activity_model->get(['activityId' => $this->a_id], 'jsondata');
|
||||
$jsonData = $re['jsondata'] ? json_decode($re['jsondata'], true) : [];
|
||||
$uids = implode(',',array_column($rows,'cfUserId'));
|
||||
$where = ["userId in ({$uids})"=>null];
|
||||
$gw_user_rows = $this->user_model->map('userId','',$where,'','','','userId,uname,headimg,nickname');
|
||||
$uids = implode(',',array_unique(array_column($rows,'userId')));
|
||||
$where = ["userId in ({$uids})"=>null];
|
||||
$user_rows = $this->user_model->map('userId','nickname',$where,'','','','userId,nickname');
|
||||
foreach ($rows as $key => $val) {
|
||||
$employee_name = '';
|
||||
$gw_user = $gw_user_rows[$val['cfUserId']][0] ? $gw_user_rows[$val['cfUserId']][0] : [];
|
||||
$nicakname = $user_rows[$val['userId']];
|
||||
if($val['status']>0 && $gw_user){
|
||||
$employee_name = $gw_user['uname'];
|
||||
$headimg = $gw_user['headimg'];
|
||||
}
|
||||
$tip = $jsonData['visitTag'][$val['visitTagId']] ? ":{$jsonData['visitTag'][$val['visitTagId']]}" : '';
|
||||
$lists[] = [
|
||||
'id' => $val['customerId'],
|
||||
'status' => $val['status'],//0未分配 /1已分配 /2战败
|
||||
'customer_name' => $val['name'] ? $val['name'] : $nicakname,
|
||||
'tel' => $val['mobile'],
|
||||
'employee_name' => $employee_name,
|
||||
'headimg' => $headimg,
|
||||
'grade' => $val['level'],
|
||||
'is_rights' => $val['userId'] ? 1 : 0,//0未领权益 /1已领权益
|
||||
'is_appoint' => $val['userId'] ? 1 : 0,//0未预约 /1已预约
|
||||
'is_wechat' => intval($val['ifWechat']),//0未加微 /1已加微
|
||||
'tip' => $visitTagAry[$val['visitTagId']].$tip,
|
||||
];
|
||||
}
|
||||
}
|
||||
$data = [
|
||||
'total' => $total,
|
||||
'lists' => $lists
|
||||
];
|
||||
$this->show_json($data,200);
|
||||
}
|
||||
|
||||
public function allot_single(){
|
||||
$customerId = $this->input->post('customerId');
|
||||
$cfUserId = $this->input->post('cfUserId');
|
||||
$where = [
|
||||
'customerId' => $customerId,
|
||||
'bizId' => $this->group_user['bizId'],
|
||||
];
|
||||
$row = $this->market_sylive_customer_model->get($where);
|
||||
if(!$row){
|
||||
$this->show_json('',400,'参数错误');
|
||||
}
|
||||
if($row['status']){
|
||||
$this->show_json('',400,'该客户已分配');
|
||||
}
|
||||
$this->market_sylive_customer_model->update(['cfUserId'=>$cfUserId,'status'=>1],['customerId'=>$row['customerId']]);
|
||||
$this->show_json('',200,'保存成功');
|
||||
}
|
||||
|
||||
public function allot_mult(){
|
||||
$info = $this->input->post('info');
|
||||
if(!$info){
|
||||
$this->show_json('',400,'参数错误');
|
||||
}
|
||||
$total = array_sum(array_column($info,'num'));
|
||||
if($total<=0){
|
||||
$this->show_json('',400,'请填写分配数量');
|
||||
}
|
||||
foreach ($info as $key=>$value) {
|
||||
if($value['num']>0){
|
||||
$sql = "update lc_market_sylive_customer set cfUserId={$value['id']},status=1 where activityId={$this->a_id} and bizId={$this->group_user['bizId']} and status=0 limit {$value['num']}";
|
||||
$this->market_sylive_customer_model->db->query($sql);
|
||||
$this->market_sylive_customer_model->db->affected_rows();
|
||||
}
|
||||
}
|
||||
$this->show_json('',200,'保存成功');
|
||||
}
|
||||
|
||||
public function addTag(){
|
||||
$customerId = $this->input->post('customerId');
|
||||
$visitTagId = $this->input->post('followId');
|
||||
$is_wechat = $this->input->post('is_wechat');
|
||||
if(!$visitTagId){
|
||||
$this->show_json('',400,'请选择标签');
|
||||
}
|
||||
$where = [
|
||||
'customerId' => $customerId,
|
||||
'bizId' => $this->group_user['bizId'],
|
||||
];
|
||||
$row = $this->market_sylive_customer_model->get($where);
|
||||
if(!$row){
|
||||
$this->show_json('',400,'参数错误');
|
||||
}
|
||||
$update = [
|
||||
'visitTagId'=>$visitTagId,
|
||||
'ifWechat' => $is_wechat ? 1 : 0,
|
||||
'status' => 2
|
||||
];
|
||||
$this->market_sylive_customer_model->update($update,['customerId'=>$row['customerId']]);
|
||||
$this->show_json('',200,'保存成功');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,324 @@
|
||||
<?php
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
require_once 'Common.php';
|
||||
|
||||
class Order extends Admin
|
||||
{
|
||||
|
||||
private $a_id;
|
||||
private $group_user;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('market/market_sylive_items_model');
|
||||
$this->load->model('market/market_sylive_order_model');
|
||||
$this->load->model('market/Market_sylive_activity_draw_model', 'mdSyliveActivityDraw');
|
||||
$this->load->model('market/market_sylive_checkdata_model');
|
||||
$this->a_id = $this->input->get('a_id');
|
||||
$this->a_id && $_SESSION[self::SESSION_KEY]['a_id'] = $this->a_id;
|
||||
!$this->a_id && $this->a_id = $_SESSION[self::SESSION_KEY]['a_id'];
|
||||
$skey = $this->myencryption->base64url_encode("a_id=" . $this->a_id);
|
||||
$this->data['act_url'] = "/h5/market/sylive2/act?skey={$skey}";
|
||||
$this->group_user = $this->groups_user_model->get(['activityId' => $this->a_id, 'userId' => $this->uid, 'status' => 0]);
|
||||
$this->data['is_biz'] = $this->group_user['bizId'] ? 1 : 0;
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$where = [
|
||||
'activityId' => $this->a_id,
|
||||
'status' => 0
|
||||
];
|
||||
$goods_rows = $this->market_sylive_items_model->select($where, 'sort desc,itemId desc', 0, 0, 'itemId,title');
|
||||
$goods = [
|
||||
['id' => 0, 'title' => '全部']
|
||||
];
|
||||
if ($goods_rows) {
|
||||
foreach ($goods_rows as $val) {
|
||||
$goods[] = [
|
||||
'id' => $val['itemId'],
|
||||
'title' => $val['title']
|
||||
];
|
||||
}
|
||||
}
|
||||
$this->data['goods'] = $goods;
|
||||
//微信分享
|
||||
$wx_info = $this->share_info();
|
||||
$this->data['sign_package'] = $wx_info['sign_package'];
|
||||
$this->data['share'] = $wx_info['share'];
|
||||
$this->show_view('h5/market/sylive2/order/index');
|
||||
}
|
||||
|
||||
public function exchange()
|
||||
{
|
||||
//微信分享
|
||||
$wx_info = $this->share_info();
|
||||
$this->data['sign_package'] = $wx_info['sign_package'];
|
||||
$this->data['share'] = $wx_info['share'];
|
||||
$this->show_view('h5/market/sylive2/order/exchange');
|
||||
}
|
||||
|
||||
public function apply()
|
||||
{
|
||||
$id = $this->input->get('id');
|
||||
$iswin = $this->input->get('iswin');
|
||||
$where = [
|
||||
'id' => $id
|
||||
];
|
||||
$iswin && $where['win'] = 1;
|
||||
if($this->group_user['bizId'] && $this->group_user['type']==1){
|
||||
$where['bizId'] = $this->group_user['bizId'];
|
||||
}else{
|
||||
$where['cfUserId'] = $this->uid;
|
||||
}
|
||||
$row = $this->market_sylive_order_model->get($where);
|
||||
if (!$row) {
|
||||
throw new Hd_exception('参数错误', 400);
|
||||
}
|
||||
$time = $iswin ? '开奖时间 ' . date('Y.m.d H:i:s', strtotime($row['winTime'])) : '下单时间 ' . date('Y.m.d H:i:s', strtotime($row['createTime']));
|
||||
$user_row = $this->user_model->get(["userId" => $row['userId']], 'userId,nickname,headimg');
|
||||
$jsondata = json_decode($row['jsondata'], true);
|
||||
$ifAddress = true;
|
||||
if ($iswin) {
|
||||
$re_draw = $this->mdSyliveActivityDraw->get(['activityId' => $row['activityId']]);
|
||||
$winTypeAry = [];
|
||||
if ($re_draw && $re_draw['winType']) {
|
||||
$json_winType = json_decode($re_draw['winType'], true);
|
||||
foreach ($json_winType as $v) {
|
||||
$v['img'] && $v['img'] = build_qiniu_image_url($v['img']);
|
||||
$winTypeAry[$v['id']] = ['img' => $v['img'], 'tag' => $v['tag'], 'title' => $v['title']];
|
||||
}
|
||||
}
|
||||
$winTypeItem = $winTypeAry[$row['winType']];
|
||||
$img = $winTypeItem['img'];
|
||||
$title = $winTypeItem['title'];
|
||||
$grade = $winTypeItem['tag'];
|
||||
if(isset($winTypeItem['ifAddress']) && !$winTypeItem['ifAddress']){
|
||||
$ifAddress = false;
|
||||
}
|
||||
} else {
|
||||
$item_row = $this->market_sylive_items_model->get(["itemId" => $row['itemId']]);
|
||||
$grade = '';
|
||||
$title = $row['itemTitle'];
|
||||
$imgs = json_decode($item_row['imgs'], true);
|
||||
$img = $imgs['banner'][0] ? build_qiniu_image_url($imgs['banner'][0]) : '';
|
||||
!$item_row['ifAddress'] && $ifAddress = false;
|
||||
}
|
||||
$info = [
|
||||
'id' => $row['id'],
|
||||
'iswin' => $iswin ? 1 : 0,
|
||||
'cate' => $iswin ? '抽奖' : '订单',
|
||||
'nickname' => $user_row['nickname'],
|
||||
'headimg' => $user_row['headimg'],
|
||||
'tel' => $row['mobile'],
|
||||
'customer_name' => $row['uname'],
|
||||
'address' => $jsondata['address']['detail'] ? $jsondata['address']['detail'] : '',
|
||||
'grade' => $grade,
|
||||
'name' => $title,
|
||||
'img' => $img,
|
||||
'time' => $time,
|
||||
'ifAddress' => $ifAddress ? 1 : 0,
|
||||
'region' => $jsondata['address']['region'] ? $jsondata['address']['region'] : ''
|
||||
];
|
||||
$this->data['info'] = $info;
|
||||
$this->show_view('h5/market/sylive2/order/apply');
|
||||
}
|
||||
|
||||
public function add_apply()
|
||||
{
|
||||
$info = $this->input->post('info');
|
||||
$iswin = $info['iswin'];
|
||||
$where = [
|
||||
'id' => $info['id']
|
||||
];
|
||||
$iswin && $where['win'] = 1;
|
||||
if($this->group_user['bizId'] && $this->group_user['type']==1){
|
||||
$where['bizId'] = $this->group_user['bizId'];
|
||||
}else{
|
||||
$where['cfUserId'] = $this->uid;
|
||||
}
|
||||
$row = $this->market_sylive_order_model->get($where);
|
||||
if (!$row) {
|
||||
$this->show_json([], 400,'参数错误');
|
||||
}
|
||||
$type = $iswin ? 1 : 0;
|
||||
if($this->market_sylive_checkdata_model->get(['cfId'=>$row['id'],'type'=>$type,'ifCheck'=>0])){
|
||||
$this->show_json([], 200,'审核中');
|
||||
}
|
||||
$add_data = [
|
||||
'cfId' => $row['id'],
|
||||
'cfUid' => $this->uid,
|
||||
'type' => $type,
|
||||
'createTime' => time()
|
||||
];
|
||||
$o_update = [];
|
||||
$jsondata = json_decode($row['jsondata'],true);
|
||||
$address = $jsondata['address']['detail'];
|
||||
$region = $jsondata['address']['region'];
|
||||
if($address!=$info['address'] || $region!=$info['region'] || $row['uname']!=$info['customer_name'] || $row['mobile']!=$info['tel']){
|
||||
$old_info = [
|
||||
'uname' => $row['uname'],
|
||||
'mobile' => $row['mobile'],
|
||||
'address' => $address,
|
||||
'region' => $region
|
||||
];
|
||||
$add_data['jsondata'] = json_encode(['old_info'=>$old_info],JSON_UNESCAPED_UNICODE);
|
||||
$o_update['uname'] = $info['customer_name'];
|
||||
$o_update['mobile'] = $info['tel'];
|
||||
$jsondata['address']['detail'] =$info['address'];
|
||||
$jsondata['address']['region'] =$info['region'];
|
||||
$o_update['jsondata'] = json_encode($jsondata,JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
$res = $this->market_sylive_checkdata_model->add($add_data);
|
||||
if(is_numeric($res)){
|
||||
if($iswin){
|
||||
$o_update['winUseStatus'] = 1;
|
||||
}else{
|
||||
$o_update['useStatus'] = 1;
|
||||
}
|
||||
|
||||
$this->market_sylive_order_model->update($o_update,['id'=>$row['id']]);
|
||||
$this->show_json([], 200,'提交成功');
|
||||
}else{
|
||||
$this->show_json([], 400,'提交失败');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function o_lists()
|
||||
{
|
||||
$iswin = $this->input->get('iswin');
|
||||
$item_id = $this->input->get('item_id');
|
||||
$page = $this->input->get('page');
|
||||
$size = $this->input->get('size');
|
||||
$keyword = $this->input->get('keyword');
|
||||
$used = $this->input->get('used');
|
||||
!$page && $page = 1;
|
||||
!$size && $size = 20;
|
||||
$where = [
|
||||
'status' => 1,
|
||||
'activityId' => $this->a_id
|
||||
];
|
||||
$item_id && $where['itemId'] = $item_id;
|
||||
if($this->group_user['bizId'] && $this->group_user['type']==1){
|
||||
$where['bizId'] = $this->group_user['bizId'];
|
||||
}else{
|
||||
$where['cfUserId'] = $this->uid;
|
||||
}
|
||||
$keyword && $where["uname like '%{$keyword}%' or mobile like '%{$keyword}%'"] = null;
|
||||
if ($used) {
|
||||
if($iswin){
|
||||
$re_draw = $this->mdSyliveActivityDraw->get(['activityId' => $this->a_id],'winType');
|
||||
$type_arr = [];
|
||||
if ($re_draw && $re_draw['winType']) {
|
||||
$json_winType = json_decode($re_draw['winType'], true);
|
||||
foreach ($json_winType as $v) {
|
||||
$v['ifCode'] && $type_arr[] = $v['id'];
|
||||
}
|
||||
}
|
||||
$type_ids = 0;
|
||||
$type_arr && $type_ids = implode(',',$type_arr);
|
||||
$where["winType in ({$type_ids})"] = null;
|
||||
}else{
|
||||
$where["itemId in (select itemId from lc_market_sylive_items where ifCode=1 and activityId={$this->a_id})"] = null;
|
||||
}
|
||||
$status_key = $iswin ? 'winUseStatus' : 'useStatus';
|
||||
if ($used == 2) {
|
||||
$where[$status_key] = 2;
|
||||
} else {
|
||||
$where["{$status_key} != 2"] = null;
|
||||
}
|
||||
}
|
||||
$order_total = $this->market_sylive_order_model->count($where);
|
||||
$where['win'] = 1;
|
||||
$win_total = $this->market_sylive_order_model->count($where);
|
||||
if (!$iswin) {
|
||||
unset($where['win']);
|
||||
}
|
||||
$rows = $this->market_sylive_order_model->select($where, 'id desc', $page, $size);
|
||||
$lists = [];
|
||||
if ($rows) {
|
||||
$item_ids = implode(',', array_unique(array_column($rows, 'itemId')));
|
||||
$item_rows = [];
|
||||
if ($item_ids) {
|
||||
$item_rows = $this->market_sylive_items_model->map('itemId', '', ["itemId in ({$item_ids})" => null], '', 0, 0, 'itemId,imgs');
|
||||
}
|
||||
$user_ids = implode(',', array_unique(array_column($rows, 'userId')));
|
||||
$user_rows = [];
|
||||
if ($user_ids) {
|
||||
$user_rows = $this->user_model->map('userId', '', ["userId in ({$user_ids})" => null], '', 0, 0, 'userId,nickname,headimg');
|
||||
}
|
||||
if ($iswin) {
|
||||
$re_draw = $this->mdSyliveActivityDraw->get(['activityId' => $this->a_id]);
|
||||
$winTypeAry = [];
|
||||
if ($re_draw && $re_draw['winType']) {
|
||||
$json_winType = json_decode($re_draw['winType'], true);
|
||||
foreach ($json_winType as $v) {
|
||||
$v['img'] && $v['img'] = build_qiniu_image_url($v['img']);
|
||||
$winTypeAry[$v['id']] = ['img' => $v['img'], 'tag' => $v['tag'], 'title' => $v['title']];
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach ($rows as $key => $val) {
|
||||
$url = 'javascript:;';
|
||||
$ck_rows = $this->market_sylive_checkdata_model->select(['cfId' => $val['id'], 'type' => $iswin ? 1 : 0], 'id desc', 1, 1, 'ifCheck,descrip');
|
||||
$success = $fail = '';
|
||||
if ($ck_rows) {
|
||||
$ck_row = $ck_rows[0];
|
||||
if ($ck_row['ifCheck'] == 1) {
|
||||
$success = '审核通过:恭喜您!您的奖品将在7个工作日内发出 >';
|
||||
} elseif ($ck_row['ifCheck'] == -1) {
|
||||
$fail = "审核失败:{$ck_row['descrip']}";
|
||||
} else {
|
||||
$success = '审核中';
|
||||
}
|
||||
}
|
||||
|
||||
$jsondata = json_decode($val['jsondata'], true);
|
||||
$item = $item_rows[$val['itemId']] ? $item_rows[$val['itemId']][0] : [];
|
||||
$imgs = json_decode($item['imgs'], true);
|
||||
$img = $imgs['banner'][0] ? build_qiniu_image_url($imgs['banner'][0]) : '';
|
||||
$user = $user_rows[$val['userId']] ? $user_rows[$val['userId']][0] : [];
|
||||
$time = $iswin ? '开奖时间 ' . date('Y.m.d H:i:s', strtotime($val['winTime'])) : '下单时间 ' . date('Y.m.d H:i:s', strtotime($val['createTime']));
|
||||
$address = $jsondata['address'] ? $jsondata['address']['region'] . ' ' . $jsondata['address']['detail'] : '';
|
||||
if ($iswin) {
|
||||
$winTypeItem = $winTypeAry[$val['winType']];
|
||||
$img = $winTypeItem['img'];
|
||||
$title = $winTypeItem['title'];
|
||||
$grade = $winTypeItem['tag'];
|
||||
$used = $val['winUseStatus'] == 2 ? 1 : '';
|
||||
$val['winUseStatus'] != 2 && $url = "/h5/market/sylive2/order/apply?id={$val['id']}&iswin=1";
|
||||
} else {
|
||||
$grade = '';
|
||||
$title = $val['itemTitle'];
|
||||
$used = $val['useStatus'] == 2 ? 1 : '';
|
||||
$val['useStatus'] != 2 && $url = "/h5/market/sylive2/order/apply?id={$val['id']}";
|
||||
}
|
||||
$lists[] = [
|
||||
'nickname' => $user['nickname'],
|
||||
'headimg' => $user['headimg'],
|
||||
'tel' => $val['mobile'],
|
||||
'customer_name' => $val['uname'],
|
||||
'address' => $address,
|
||||
'grade' => $grade,
|
||||
'name' => $title,
|
||||
'img' => $img,
|
||||
'time' => $time,
|
||||
'success' => $success,
|
||||
'fail' => $fail,
|
||||
'used' => $used,
|
||||
'cate' => $iswin ? '抽奖' : '订单',
|
||||
'url' => $url
|
||||
];
|
||||
}
|
||||
}
|
||||
$data = [
|
||||
'lists' => $lists,
|
||||
'total' => $iswin ? $win_total : $order_total,
|
||||
'order_total' => $order_total,
|
||||
'win_total' => $win_total
|
||||
];
|
||||
$this->show_json($data, 200);
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ require_once 'Common.php';
|
||||
class Stic extends Admin{
|
||||
|
||||
private $a_id;
|
||||
private $group_user;
|
||||
|
||||
public function __construct(){
|
||||
parent::__construct();
|
||||
@@ -20,6 +21,8 @@ class Stic extends Admin{
|
||||
!$this->a_id && $this->a_id = $_SESSION[self::SESSION_KEY]['a_id'];
|
||||
$skey = $this->myencryption->base64url_encode("a_id=" . $this->a_id);
|
||||
$this->data['act_url'] = "/h5/market/sylive2/act?skey={$skey}";
|
||||
$this->group_user = $this->groups_user_model->get(['activityId'=>$this->a_id,'userId'=>$this->uid,'status'=>0]);
|
||||
$this->data['is_biz'] = $this->group_user['bizId'] ? 1 : 0;
|
||||
}
|
||||
|
||||
public function index(){
|
||||
@@ -33,7 +36,7 @@ class Stic extends Admin{
|
||||
$info['banner'] = $jsondata['banner'] ? build_qiniu_image_url($jsondata['banner']) : Sylive_entity::DF_BANNER;
|
||||
$info['nickname'] = $user['nickname'];
|
||||
$info['headimg'] = $user['headimg'];
|
||||
$group_user = $this->groups_user_model->get(['activityId'=>$this->a_id,'userId'=>$this->uid,'status'=>0]);
|
||||
$group_user = $this->group_user;
|
||||
$info['group_name'] = '';
|
||||
$info['is_biz'] = $group_user['bizId'] ? 1 : 0;
|
||||
$info['biz_id'] = $group_user['biz_id'] ? $group_user['biz_id'] : 0;
|
||||
@@ -53,10 +56,11 @@ class Stic extends Admin{
|
||||
$this->data['share'] = $wx_info['share'];
|
||||
$this->show_view('h5/market/sylive2/stic/index');
|
||||
}
|
||||
|
||||
//预约阶段数据
|
||||
public function lists_ready(){
|
||||
$groupsId = $this->input->get('groupsId');
|
||||
$group_user = $this->groups_user_model->get(['activityId'=>$this->a_id,'userId'=>$this->uid,'status'=>0]);
|
||||
$group_user = $this->group_user;
|
||||
!$groupsId && $groupsId = $group_user['groupsId'];
|
||||
$group_row = $this->groups_model->get(['groupsId'=>$groupsId,'activityId'=>$this->a_id]);
|
||||
$disk = $this->sylive2_entity->level_disk($this->a_id);
|
||||
@@ -98,10 +102,13 @@ class Stic extends Admin{
|
||||
$owner_browse_count = $this->mdSytActivityKpiData->count($where); //浏览数据
|
||||
$where['kpi'] = 'subscribe';
|
||||
$owner_subscribe_count = $this->mdSytActivityKpiData->count($where); //订阅数据
|
||||
$where['kpi'] = 'beforeOrder';
|
||||
$order_count = $this->mdSytActivityKpiData->count($where); //下单数据
|
||||
$mine = [
|
||||
['title'=>'访问用户','num'=>"{$owner_browse_count}人",'url'=>'/h5/market/sylive2/stic/users?type=owner&kpi=browse'],
|
||||
['title'=>'预约用户','num'=>"{$owner_subscribe_count}人",'url'=>'/h5/market/sylive2/stic/users?type=owner&kpi=subscribe'],
|
||||
['title'=>'预约率','num'=>$owner_browse_count ? round($owner_subscribe_count/$owner_browse_count*100,2)."%" : 0],
|
||||
['title'=>'下单数','num'=>"{$order_count}单"],
|
||||
];
|
||||
$sub_lists = [
|
||||
['title'=>'我的','lists'=>$mine],
|
||||
@@ -115,10 +122,13 @@ class Stic extends Admin{
|
||||
$biz_browse_count = $this->mdSytActivityKpiData->count($where); //浏览数据
|
||||
$where['kpi'] = 'subscribe';
|
||||
$biz_subscribe_count = $this->mdSytActivityKpiData->count($where); //订阅数据
|
||||
$where['kpi'] = 'beforeOrder';
|
||||
$order_count = $this->mdSytActivityKpiData->count($where); //下单数据
|
||||
$biz = [
|
||||
['title'=>'访问用户','num'=>"{$biz_browse_count}人",'url' => "/h5/market/sylive2/stic/users?type=biz&type_id={$group_user['bizId']}&kpi=browse"],
|
||||
['title'=>'预约用户','num'=>"{$biz_subscribe_count}人",'url' => "/h5/market/sylive2/stic/users?type=biz&type_id={$group_user['bizId']}&kpi=subscribe"],
|
||||
['title'=>'预约率','num'=>$biz_browse_count ? round($biz_subscribe_count/$biz_browse_count*100,2)."%" : 0],
|
||||
['title'=>'下单数','num'=>"{$order_count}单"],
|
||||
];
|
||||
$sub_lists[] = ['title'=>'本店','lists'=>$biz];
|
||||
}
|
||||
@@ -126,9 +136,11 @@ class Stic extends Admin{
|
||||
if(!$group_row['groupsLevel'] && !$group_row['ifBiz']){//顶级
|
||||
$browse_count = $this->mdSytActivityKpiData->count(['activityId' => $this->a_id, 'kpi' => 'browse']);
|
||||
$subscribe_count = $this->mdSytActivityKpiData->count(['activityId' => $this->a_id, 'kpi' => 'subscribe']);
|
||||
$order_count = $this->mdSytActivityKpiData->count(['activityId' => $this->a_id, 'kpi' => 'beforeOrder']);
|
||||
}else{
|
||||
$browse_count = $group_row['browse'];//浏览数据
|
||||
$subscribe_count = $group_row['subscribe'];//订阅数据
|
||||
$order_count = $group_user['beforeOrderTotal'];//下单数
|
||||
}
|
||||
$b_url = $sub_url = '';
|
||||
if($group_row['ifBiz']){
|
||||
@@ -139,6 +151,7 @@ class Stic extends Admin{
|
||||
['title'=>'访问用户','num'=>"{$browse_count}人",'url'=>$b_url],
|
||||
['title'=>'预约用户','num'=>"{$subscribe_count}人",'url'=>$sub_url],
|
||||
['title'=>'预约率','num'=>$browse_count ? round($subscribe_count/$browse_count*100,2)."%" : 0],
|
||||
['title'=>'下单数','num'=>"{$order_count}单"],
|
||||
];
|
||||
$title = $disk[$group_row['groupsLevel']+1]? '所有'.$disk[$group_row['groupsLevel']+1] : '所有门店';
|
||||
$group_row['ifBiz'] && $title = $group_row['groupsName'];
|
||||
@@ -154,7 +167,7 @@ class Stic extends Admin{
|
||||
//直播统计数据
|
||||
public function lists_live(){
|
||||
$groupsId = $this->input->get('groupsId');
|
||||
$group_user = $this->groups_user_model->get(['activityId'=>$this->a_id,'userId'=>$this->uid,'status'=>0]);
|
||||
$group_user = $this->group_user;
|
||||
!$groupsId && $groupsId = $group_user['groupsId'];
|
||||
$group_row = $this->groups_model->get(['groupsId'=>$groupsId,'activityId'=>$this->a_id]);
|
||||
$row = $this->market_sylive_activity_model->get(['activityId'=>$this->a_id]);
|
||||
@@ -243,7 +256,7 @@ class Stic extends Admin{
|
||||
$type = $this->input->get('type');
|
||||
!$page && $page=1;
|
||||
$row = $this->market_sylive_activity_model->get(['activityId'=>$this->a_id]);
|
||||
$group_user = $this->groups_user_model->get(['activityId'=>$this->a_id,'userId'=>$this->uid,'status'=>0]);
|
||||
$group_user = $this->group_user;
|
||||
$where = [
|
||||
'activityId'=>$this->a_id,
|
||||
'bizId'=>$group_user['bizId'],
|
||||
@@ -491,6 +504,12 @@ class Stic extends Admin{
|
||||
}
|
||||
}
|
||||
}
|
||||
$where = [
|
||||
'activityId' => $this->a_id,
|
||||
'status' => 0
|
||||
];
|
||||
$goods = $this->market_sylive_items_model->select($where,'sort desc,itemId desc',0,0,'itemId,title');
|
||||
$this->data['goods'] = $goods ? $goods : [];
|
||||
$groups[] = ['value'=>'','type'=>'biz','title'=>'门店排名'];
|
||||
$groups[] = ['value'=>'','type'=>'user','title'=>'顾问排名'];
|
||||
$this->data['groups'] = $groups;
|
||||
@@ -503,6 +522,7 @@ class Stic extends Admin{
|
||||
}
|
||||
|
||||
public function ajax_rank(){
|
||||
$sylive2_data_entity = new sylive2_data_entity(['show_echarts'=>true]);
|
||||
$map_kpi_biz = [
|
||||
'browse' => 'browse', 'subscribe' => 'subscribe', 'order' => 'orderTotal','watch' => 'watch','beforeOrder' => 'beforeOrderTotal'
|
||||
];
|
||||
@@ -517,7 +537,7 @@ class Stic extends Admin{
|
||||
$group_user = $this->groups_user_model->get(['activityId'=>$this->a_id,'userId'=>$this->uid]);
|
||||
$page = $params['page'] ? intval($params['page']) : 1;
|
||||
$size = 20;
|
||||
if(strtotime($params['day']) || $params['itemId']){//根据日期排行
|
||||
// if(strtotime($params['day']) || $params['itemId']){//根据日期排行
|
||||
$kpi = $params['kpi'];
|
||||
$tagId = 0;
|
||||
$where = [
|
||||
@@ -540,32 +560,34 @@ class Stic extends Admin{
|
||||
$where["$group_by>"] = 0;
|
||||
$tagId = $group_user['userId'];
|
||||
}
|
||||
strtotime($params['day']) && $where['day'] = date('Y-m-d',strtotime($params['day']));
|
||||
$params['itemId'] && $where["itemId"] = $params['itemId'];
|
||||
$data = $this->sylive2_data_entity->top_kpidata($group_by,$where,'t desc,id desc',$page,$size,$select,$tagId);
|
||||
}else{
|
||||
$kpi = $map_kpi_biz[$params['kpi']];
|
||||
$where = [
|
||||
'activityId' => $this->a_id,
|
||||
'status' => 0
|
||||
];
|
||||
if($params['type']=='level'){
|
||||
$group_by = "levelId{$params['value']}";
|
||||
$select = "{$group_by} as tagId,sum({$kpi}) as t";
|
||||
$where["$group_by>"] = 0;
|
||||
}elseif($params['type']=='biz'){
|
||||
$group_by = 'bizId';
|
||||
$select = "bizId as tagId,sum({$kpi}) as t";
|
||||
$where["$group_by>"] = 0;
|
||||
}else{
|
||||
$group_by = 'userId';
|
||||
$select = "bizId,userId as tagId,sum({$kpi}) as t";
|
||||
$where["$group_by>"] = 0;
|
||||
if($params['day']){
|
||||
strtotime($params['day']) && $where['day'] = date('Y-m-d',strtotime($params['day']));
|
||||
}
|
||||
$data = $this->sylive2_data_entity->top_groups_user($group_by,$where,'t desc,groupsUserId desc',$page,$size,$select,$params['kpi'],$group_user['bizId']);
|
||||
}
|
||||
$params['itemId'] && $where["itemId"] = $params['itemId'];
|
||||
$data = $sylive2_data_entity->top_kpidata($group_by,$where,'t desc,id desc',$page,$size,$select,$tagId);
|
||||
// }else{
|
||||
// $kpi = $map_kpi_biz[$params['kpi']];
|
||||
// $where = [
|
||||
// 'activityId' => $this->a_id,
|
||||
// 'status' => 0
|
||||
// ];
|
||||
// if($params['type']=='level'){
|
||||
// $group_by = "levelId{$params['value']}";
|
||||
// $select = "{$group_by} as tagId,sum({$kpi}) as t";
|
||||
// $where["$group_by>"] = 0;
|
||||
// }elseif($params['type']=='biz'){
|
||||
// $group_by = 'bizId';
|
||||
// $select = "bizId as tagId,sum({$kpi}) as t";
|
||||
// $where["$group_by>"] = 0;
|
||||
// }else{
|
||||
// $group_by = 'userId';
|
||||
// $select = "bizId,userId as tagId,sum({$kpi}) as t";
|
||||
// $where["$group_by>"] = 0;
|
||||
// }
|
||||
// $data = $sylive2_data_entity->top_groups_user($group_by,$where,'t desc,groupsUserId desc',$page,$size,$select,$params['kpi'],$group_user['bizId']);
|
||||
// }
|
||||
$data['title'] = $title_arr[$params['kpi']];
|
||||
$data['url'] = "/h5/market/sylive2/stic/rank?kpi={$params['kpi']}&day={$params['day']}&index={$params['index']}&show_day=1";
|
||||
$data['url'] = "/h5/market/sylive2/stic/rank?kpi={$params['kpi']}&day={$params['day']}&index={$params['index']}&show_day=1&itemId={$params['itemId']}";
|
||||
$this->show_json($data,200);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ class Ucenter extends Wx{
|
||||
$this->load->model('market/market_sylive_items_model');
|
||||
$this->load->model('market/market_sylive_order_model');
|
||||
$this->load->model('market/market_sylive_activity_model');
|
||||
$this->load->model('market/market_sylive_checkdata_model');
|
||||
$this->load->library('AliWuliu');
|
||||
$this->load->library('market/sylive_entity');
|
||||
$this->skey = $this->input->get('skey');
|
||||
$param = $this->myencryption->base64url_decode($this->skey);
|
||||
@@ -54,7 +56,8 @@ class Ucenter extends Wx{
|
||||
$where = [
|
||||
'activityId' => $this->a_id,
|
||||
'userId' => $this->uid,
|
||||
'win' => 1
|
||||
'win' => 1,
|
||||
'status' => 1
|
||||
];
|
||||
$total = $this->market_sylive_order_model->count($where);;
|
||||
$lists = [];
|
||||
@@ -69,15 +72,20 @@ class Ucenter extends Wx{
|
||||
$winTypeAry[$v['id']] = ['img' => $v['img'], 'tag' => $v['tag'], 'title' => $v['title']];
|
||||
}
|
||||
}
|
||||
$rows = $this->market_sylive_order_model->select($where,'id desc',$page,$size,'id,winType');
|
||||
$rows = $this->market_sylive_order_model->select($where,'id desc',$page,$size,'id,winType,winUseStatus');
|
||||
$oids = implode(',',array_column($rows,'id'));
|
||||
$oids&& $check_rows = $this->market_sylive_checkdata_model->map('cfId','jsondata',["cfId in ({$oids})"=>null,'type'=>1,'ifCheck'=>1],'id desc','','','cfId,jsondata');
|
||||
foreach ($rows as $key => $val) {
|
||||
$ck_jsondata = $check_rows[$val['id']] ? json_decode($check_rows[$val['id']],true) : [];
|
||||
$winTypeItem = $winTypeAry[$val['winType']];
|
||||
if($winTypeItem){
|
||||
$lists[] = [
|
||||
'id' => $val['id'],
|
||||
'img' => $winTypeItem['img'],
|
||||
'title' => $winTypeItem['tag'],
|
||||
'goods' => $winTypeItem['title']
|
||||
'goods' => $winTypeItem['title'],
|
||||
'is_writeoff' => $val['winUseStatus']==2 ? 1 : 0,
|
||||
'courierNo' => $ck_jsondata['courierNo']
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -143,6 +151,21 @@ class Ucenter extends Wx{
|
||||
$gw_tel = $pid_user['mobile'];
|
||||
$logo = $pid_user['headimg'];
|
||||
}
|
||||
//获取物流信息
|
||||
$check_row = $this->market_sylive_checkdata_model->select(['cfId'=>$order['id'],'type'=>0,'ifCheck'=>1],'id desc',1,1,'jsondata');
|
||||
$check_row && $ck_jsondata = json_decode($check_row[0]['jsondata'],true);
|
||||
$express = ['title'=>'','code'=>'','list'=>[]];
|
||||
$show_express = 0;
|
||||
if($ck_jsondata && $ck_jsondata['courierNo']){
|
||||
$show_express = 1;
|
||||
$express['code'] = $ck_jsondata['courierNo'];
|
||||
$mobile_last = strlen($order['mobile'])>4 ? substr($order['mobile'],-4) : '1234';
|
||||
$res = $this->aliwuliu->kdi("{$ck_jsondata['courierNo']}:$mobile_last");
|
||||
if($res['code']){
|
||||
$express['title'] = $res['result']['expName'];
|
||||
$express['list'] = $res['result']['list'];
|
||||
}
|
||||
}
|
||||
$info = [
|
||||
'bg' => "https://qs.haodian.cn/web/images/project/H5-ShiYu/mine-bg.jpg",
|
||||
'logo' => $logo,
|
||||
@@ -154,7 +177,10 @@ class Ucenter extends Wx{
|
||||
'content' => $item['descrip'] ? $item['descrip'] : '',
|
||||
'order' => $order,
|
||||
'skey' => $this->data['skey'],
|
||||
'ifAddress' => $item['ifAddress']
|
||||
'ifAddress' => $item['ifAddress'],
|
||||
'is_writeoff' => $order['useStatus']==2 ? 1 : 0,
|
||||
'show_express' => $show_express,
|
||||
'express' => $express
|
||||
];
|
||||
$this->data['info'] = $info;
|
||||
$this->show_view('h5/market/sylive2/ucenter/detail');
|
||||
@@ -177,19 +203,25 @@ class Ucenter extends Wx{
|
||||
$item_ids = implode(',',array_unique(array_column($rows,'itemId')));
|
||||
$item_rows = [];
|
||||
if($item_ids){
|
||||
$item_rows = $this->market_sylive_items_model->map('itemId','',["itemId in ({$item_ids})"],'',0,0,'itemId,imgs');
|
||||
$item_rows = $this->market_sylive_items_model->map('itemId','',["itemId in ({$item_ids})"=>null],'',0,0,'itemId,imgs');
|
||||
}
|
||||
$oids = implode(',',array_column($rows,'id'));
|
||||
$oids&& $check_rows = $this->market_sylive_checkdata_model->map('cfId','jsondata',["cfId in ({$oids})"=>null,'type'=>0,'ifCheck'=>1],'id desc','','','cfId,jsondata');
|
||||
foreach ($rows as $val) {
|
||||
$item = $item_rows[$val['itemId']] ? $item_rows[$val['itemId']][0] : [];
|
||||
$imgs = json_decode($item['imgs'],true);
|
||||
$img = $imgs['banner'][0] ? build_qiniu_image_url($imgs['banner'][0]) : '';
|
||||
$ck_jsondata = $check_rows[$val['id']] ? json_decode($check_rows[$val['id']],true) : [];
|
||||
$lists[] = [
|
||||
'id' => $val['id'],
|
||||
'sid' => $val['sid'],
|
||||
'img' => $img,
|
||||
'title' => $val['itemTitle'],
|
||||
'time' => date('Y.m.d H:i:s',strtotime($val['createTime'])),
|
||||
'price' => $val['totalPrice'],
|
||||
'url' => "/h5/market/sylive2/ucenter/detail?skey={$this->skey}&id={$val['id']}"
|
||||
'url' => "/h5/market/sylive2/ucenter/detail?skey={$this->skey}&id={$val['id']}",
|
||||
'is_writeoff' => $val['useStatus']==2 ? 1 : 0,
|
||||
'courierNo' => $ck_jsondata['courierNo']
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -219,4 +251,39 @@ class Ucenter extends Wx{
|
||||
$this->market_sylive_order_model->update($update,['id'=>$order['id']]);
|
||||
$this->show_json([],200,'保存成功');
|
||||
}
|
||||
|
||||
public function get_wuli(){
|
||||
$id = $this->input->get('id');
|
||||
$type = $this->input->get('type'); // 1中奖订单 0普通订单
|
||||
$where = [
|
||||
'id' => $id,
|
||||
'userId' => $this->uid,
|
||||
'status' => 1
|
||||
];
|
||||
$type && $where['win'] = 1;
|
||||
$row = $this->market_sylive_order_model->get($where);
|
||||
if(!$row){
|
||||
$this->show_json('',400,'参数错误');
|
||||
}
|
||||
$list = [];
|
||||
$title = '';
|
||||
//获取物流信息
|
||||
$check_row = $this->market_sylive_checkdata_model->select(['cfId'=>$row['id'],'type'=>$type?1:0,'ifCheck'=>1],'id desc',1,1,'jsondata');
|
||||
$check_row && $ck_jsondata = json_decode($check_row[0]['jsondata'],true);
|
||||
if($ck_jsondata['courierNo']){
|
||||
$mobile_last = strlen($row['mobile'])>4 ? substr($row['mobile'],-4) : '1234';
|
||||
$res = $this->aliwuliu->kdi("{$ck_jsondata['courierNo']}:$mobile_last");
|
||||
if($res['code']){
|
||||
$title = $res['result']['expName'];
|
||||
$list = $res['result']['list'];
|
||||
}
|
||||
}
|
||||
|
||||
$data = [
|
||||
'title' => $title,
|
||||
'courierNo' => $ck_jsondata['courierNo'],
|
||||
'list' => $list
|
||||
];
|
||||
$this->show_json($data,200);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,23 +2,26 @@
|
||||
<div class="height-500 fixed left-0 right-0 top-0 z-index-0 bg-1a1a1a"></div>
|
||||
<div class="bg-fff" id="app" ref="app">
|
||||
<div class="container relative bg-no-repeat bg-size-fullwidth bg-pos-top">
|
||||
<img class="block wp100" :src="info.bg" alt="#" />
|
||||
<img class="block wp100" :src="info.bg" alt="#"/>
|
||||
<div class="fixed top-0 right-0 bg-fff mt40 mr25 pl20 pr20 ulib-r750 fn-flex overflowhidden font-20">
|
||||
<a class="fn-flex-item pt10 pb10 pl20 pr20" v-if="info.statisticsurl" :href="info.statisticsurl">
|
||||
<img class="imgsize-40X40" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-shuju.png" alt="#">
|
||||
<img class="imgsize-40X40" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-shuju.png"
|
||||
alt="#">
|
||||
<div class="text-middle">数据</div>
|
||||
</a>
|
||||
<a class="fn-flex-item pt10 pb10 pl20 pr20" v-if="info.rankingurl" :href="info.rankingurl">
|
||||
<img class="imgsize-40X40" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-paihang.png" alt="#">
|
||||
<img class="imgsize-40X40" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-paihang.png"
|
||||
alt="#">
|
||||
<div class="text-middle">排行</div>
|
||||
</a>
|
||||
<a class="fn-flex-item pt10 pb10 pl20 pr20" v-if="info.shareurl" :href="info.shareurl">
|
||||
<img class="imgsize-40X40" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-fenxiang.png" alt="#">
|
||||
<img class="imgsize-40X40" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-fenxiang.png"
|
||||
alt="#">
|
||||
<div class="text-middle">分享</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="fixed left-0 bottom-0 right-0 inner20 pb40 bg-fff ulib-rt20 z-index-4 fn-flex text-center" >
|
||||
<div class="fixed left-0 bottom-0 right-0 inner20 pb40 bg-fff ulib-rt20 z-index-4 fn-flex text-center">
|
||||
<div class="relative fn-flex-item pl20 pr20" flexsize="0" v-for="item in info.menu">
|
||||
<a v-if="item.type==1" :href="item.url">
|
||||
<img class="imgsize-50X50" :src="item.icon" alt="#">
|
||||
@@ -44,19 +47,23 @@
|
||||
</div>
|
||||
</div>
|
||||
<a class="fn-flex-item pl20 pr20" flexsize="0" :href="info.my_url">
|
||||
<img class="imgsize-50X50" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-wode.png" alt="#">
|
||||
<img class="imgsize-50X50" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-wode.png"
|
||||
alt="#">
|
||||
<div class="space-nowrap con-min60 font-22">我的</div>
|
||||
</a>
|
||||
|
||||
<div class="fn-flex-item pl20" flexsize="1">
|
||||
<template v-if="info.live_status<2">
|
||||
<a class="block bg-1a1a1a pt20 pb20 text-center font-36 color-fff ulib-r20" v-if="info.live_status==1" href="javascript:;" @click="goLive">进入直播间</a>
|
||||
<a class="block bg-1a1a1a pt20 pb20 text-center font-36 color-fff ulib-r20" v-else href="javascript:;" @click="showCode">
|
||||
<i class="iconfont icon-tixing mr10"></i>开播提醒
|
||||
<a class="block bg-1a1a1a pt20 pb20 text-center font-36 color-fff ulib-r20"
|
||||
v-if="info.live_status==1" href="javascript:;" @click="goLive">进入直播间</a>
|
||||
<a class="block bg-1a1a1a pt20 pb20 text-center font-36 color-fff ulib-r20" v-else
|
||||
href="javascript:;" @click="showCode">
|
||||
<!--<i class="iconfont icon-tixing mr10"></i>-->
|
||||
{{info.btn_text}}
|
||||
</a>
|
||||
</template>
|
||||
<template v-else>
|
||||
<a class="block bg-1a1a1a pt20 pb20 text-center font-36 color-fff ulib-r20" href="javascript:;">活动已结束</a>
|
||||
<a class="block bg-1a1a1a pt20 pb20 text-center font-36 color-fff ulib-r20" href="javascript:;">活动已结束</a>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
@@ -64,13 +71,15 @@
|
||||
<!--直播字幕-->
|
||||
<div>
|
||||
<div class="notice-shadow"></div>
|
||||
<div class="notice bg-000-op10 pl20 pr20 line-height-17 font-28 ulib-r750 z-index-1" :style="'animation-delay:'+item.delay+'s;'" v-for="(item,index) in notice1">
|
||||
<span class="color-333">{{item.name}}</span>
|
||||
<span class="ml10 color-333">{{item.tip}}</span>
|
||||
<div class="notice bg-000-op10 pl20 pr20 line-height-17 font-28 ulib-r750 z-index-1"
|
||||
:style="'animation-delay:'+item.delay+'s;'+'color:'+info.notice_color" v-for="(item,index) in notice1">
|
||||
<span>{{item.name}}</span>
|
||||
<span class="ml10">{{item.tip}}</span>
|
||||
</div>
|
||||
<div class="notice bg-000-op10 pl20 pr20 line-height-17 font-28 ulib-r750 z-index-1" :style="'animation-delay:'+item.delay+'s;'" v-for="(item,index) in notice2">
|
||||
<span class="color-333">{{item.name}}</span>
|
||||
<span class="ml10 color-333">{{item.tip}}</span>
|
||||
<div class="notice bg-000-op10 pl20 pr20 line-height-17 font-28 ulib-r750 z-index-1"
|
||||
:style="'animation-delay:'+item.delay+'s;'+'color:'+info.notice_color" v-for="(item,index) in notice2">
|
||||
<span>{{item.name}}</span>
|
||||
<span class="ml10">{{item.tip}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -91,10 +100,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt20 pt10 text-center">
|
||||
<img class='inline-block imgsize-360X360' :src='info.code' />
|
||||
<img class='inline-block imgsize-360X360' :src='info.code'/>
|
||||
</div>
|
||||
<div class="pt10 pb20 pl20 pr20 font-24 color-fe9538 line-height-15">
|
||||
<img class="imgsize-24X24 text-middle" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-finger2.png" alt="#" />
|
||||
<img class="imgsize-24X24 text-middle"
|
||||
src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-finger2.png" alt="#"/>
|
||||
<span class="text-middle">长按识别二维码添加</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -106,6 +116,47 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="msg fn-hide" :style="msgisShowReg?'display:block':'display:none'" v-if="msgisShowReg">
|
||||
<div class="msgBg" @click="msgisShowReg = false"></div>
|
||||
<div class="msgMain">
|
||||
<div class="content">
|
||||
<div class="word">
|
||||
<div class="pt10 pb10 text-center font-36">预约直播</div>
|
||||
<div class="mt20 relative bg-f6 ulib-r10">
|
||||
<input class="wp100 inner30 font-30 bg-f6 border-none ulib-r10" type="tel" v-model="telPhone"
|
||||
placeholder="请输入手机号"/>
|
||||
</div>
|
||||
<div class="mt30 relative bg-f6 ulib-r10 pr200">
|
||||
<div><input class="wp100 inner30 font-30 bg-f6 border-none ulib-r10" type="number"
|
||||
v-model="vCode" placeholder="请输入验证码"/></div>
|
||||
<a :class="[codeState ?'color-333':'color-999','absolute right-0 mr20 box-middle font-30']"
|
||||
@click="getcode()">{{codeTx}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="opt mt30 pl20 pr20 fn-flex">
|
||||
<a class="fn-flex-item bg-fff bds-2-1a1a1a mr15 pt20 pb20 text-center font-32 ulib-r750"
|
||||
@click="msgisShowReg = false" href="javascript:">取消</a>
|
||||
<a class="fn-flex-item bg-1a1a1a ml15 pt20 pb20 text-center font-32 color-fff ulib-r750"
|
||||
@click="postCustomers()" href="javascript:">确定</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="msg fn-hide" :style="msgisShowSuccess?'display:block':'display:none'" v-if="msgisShowSuccess">
|
||||
<div class="msgBg"></div>
|
||||
<div class="msgMain">
|
||||
<div class="content">
|
||||
<div>
|
||||
<div class="pt10 pb10 text-center font-36">{{succesTx.title}}</div>
|
||||
<div class="inner30 text-break font-22 line-height-17 color-666" v-html="succesTx.content"></div>
|
||||
</div>
|
||||
<div class="opt pl20 pr20 text-center ">
|
||||
<a class="inline-block wp80 bg-1a1a1a pt20 pb20 text-center font-32 color-fff ulib-r750" @click="goSubscribemsg" href="javascript:" ><i class="iconfont icon-tixing mr10"></i>开播提醒</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -113,55 +164,74 @@
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
info:'',
|
||||
page:1,
|
||||
notice1:[],
|
||||
notice2:[],
|
||||
code:'',
|
||||
info: '',
|
||||
page: 1,
|
||||
notice1: [],
|
||||
notice2: [],
|
||||
code: '',
|
||||
msgisShowCode: false,
|
||||
noticeTime: null,
|
||||
|
||||
msgisShowReg: false,
|
||||
telPhone: '',
|
||||
isSubmiting: false,
|
||||
vCode: '',
|
||||
codeState: true,
|
||||
codeTx: '立即获取',
|
||||
|
||||
msgisShowSuccess: false,//报名成功
|
||||
succesTx: '',//报名成功提示
|
||||
},
|
||||
created(){
|
||||
|
||||
},
|
||||
computed: {
|
||||
created() {
|
||||
|
||||
},
|
||||
computed: {},
|
||||
mounted() {
|
||||
|
||||
this.getInfo()
|
||||
this.getNotice()
|
||||
if(this.info.alert_code){
|
||||
if (this.info.alert_code) {
|
||||
mDialog.msg({content: '预约成功'});
|
||||
}
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.notice1= []
|
||||
this.notice2= []
|
||||
this.notice1 = []
|
||||
this.notice2 = []
|
||||
clearTimeout(this.noticeTime);
|
||||
},
|
||||
methods: {
|
||||
|
||||
showCode: function() {
|
||||
showCode: function () {
|
||||
var that = this
|
||||
if (that.info.subscribemsg == '已订阅直播') {
|
||||
// if(that.info.show_code){
|
||||
// this.msgisShowCode = true
|
||||
// }else{
|
||||
mDialog.msg({content: that.info.subscribemsg});
|
||||
// }
|
||||
if(that.info.appoint_mobile){
|
||||
if(that.info.is_appoint){
|
||||
//提交成功
|
||||
that.msgisShowSuccess = true
|
||||
that.succesTx = {
|
||||
title: that.info.appoint_title,
|
||||
content:that.info.appoint_msg,
|
||||
}
|
||||
}else{
|
||||
that.msgisShowReg = true
|
||||
}
|
||||
}else{
|
||||
this.goSubscribemsg()
|
||||
}
|
||||
},
|
||||
closeCode: function () {
|
||||
this.msgisShowCode = false
|
||||
},
|
||||
goSubscribemsg:function (){
|
||||
if (that.info.subscribemsg == '已订阅直播') {
|
||||
mDialog.msg({content: that.info.subscribemsg});
|
||||
} else {
|
||||
window.location.href = that.info.subscribemsg;
|
||||
}
|
||||
},
|
||||
closeCode: function() {
|
||||
this.msgisShowCode = false
|
||||
},
|
||||
|
||||
//获取基础信息
|
||||
getInfo(){
|
||||
this.info = <?=json_encode($info,JSON_UNESCAPED_UNICODE)?>;
|
||||
getInfo() {
|
||||
this.info = <?=json_encode($info, JSON_UNESCAPED_UNICODE)?>;
|
||||
// this.info['menu'] = [
|
||||
// {
|
||||
// type:'2',
|
||||
@@ -203,47 +273,143 @@
|
||||
},
|
||||
|
||||
//获取底部订阅提示
|
||||
getNotice(){
|
||||
getNotice() {
|
||||
let that = this
|
||||
if(that.info.live_status==2){
|
||||
if (that.info.live_status == 2) {
|
||||
return '';
|
||||
}
|
||||
$.get('/h5/market/sylive2/act/subscribemsg_lists',{'a_id':that.info.a_id,'live_status':that.info.live_status},function (result){
|
||||
$.get('/h5/market/sylive2/act/subscribemsg_lists', {
|
||||
'a_id': that.info.a_id,
|
||||
'live_status': that.info.live_status
|
||||
}, function (result) {
|
||||
that.notice = result.data.lists
|
||||
that.page = that.page + 1
|
||||
|
||||
alldelay = 0
|
||||
that.notice.forEach(item => {
|
||||
item.delay = alldelay + Math.floor(Math.random() * (3))/10 + 1
|
||||
item.delay = alldelay + Math.floor(Math.random() * (3)) / 10 + 1
|
||||
alldelay = item.delay
|
||||
})
|
||||
|
||||
if(that.page%2 ==0){
|
||||
if (that.page % 2 == 0) {
|
||||
that.notice2 = that.notice
|
||||
setTimeout(function () {
|
||||
that.notice1= []
|
||||
that.notice1 = []
|
||||
}, 6000);
|
||||
}else{
|
||||
} else {
|
||||
that.notice1 = that.notice
|
||||
setTimeout(function () {
|
||||
that.notice2= []
|
||||
that.notice2 = []
|
||||
}, 6000);
|
||||
}
|
||||
setTimeout(function () {
|
||||
that.getNotice()
|
||||
}, (alldelay<20?20:alldelay)*1000);
|
||||
},'json')
|
||||
}, (alldelay < 20 ? 20 : alldelay) * 1000);
|
||||
}, 'json')
|
||||
},
|
||||
|
||||
//进入直播间
|
||||
goLive(){
|
||||
$.get('/h5/market/sylive2/act/golive',{'a_id':this.info.a_id},function (result){
|
||||
goLive() {
|
||||
$.get('/h5/market/sylive2/act/golive', {'a_id': this.info.a_id}, function (result) {
|
||||
window.location.href = "<?=$info['live_url']?>"
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//获取验证码倒计时
|
||||
countDownTime(time) {
|
||||
let that = this;
|
||||
if (time > 1) {
|
||||
time--;
|
||||
this.codeState = false;
|
||||
this.codeTx = time + "s后重新获取";
|
||||
Timer = setTimeout(function () {
|
||||
that.countDownTime(time);
|
||||
}, 1000)
|
||||
} else {
|
||||
clearTimeout(Timer);
|
||||
that.codeState = true;
|
||||
that.codeTx = "立即获取";
|
||||
}
|
||||
},
|
||||
|
||||
//获取验证码
|
||||
getcode() {
|
||||
if (!this.codeState) return;
|
||||
if (!/^1[3456789]\d{9}$/.test(this.telPhone)) {
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "请输入正确手机号"
|
||||
});
|
||||
} else {
|
||||
//按钮倒计时
|
||||
var that = this;
|
||||
$.post('/h5/market/sylive2/act/get_code',{'mobile':this.telPhone},function (response){
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: response.msg
|
||||
});
|
||||
if(response.code==200){
|
||||
that.countDownTime(91)
|
||||
}
|
||||
},'json')
|
||||
}
|
||||
},
|
||||
|
||||
//提交手机号
|
||||
postCustomers() {
|
||||
if (this.isSubmiting) return;
|
||||
|
||||
if (!/^1[3456789]\d{9}$/.test(this.telPhone)) {
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "请输入正确手机号"
|
||||
});
|
||||
} else if (!this.vCode) {
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "请输入验证码"
|
||||
});
|
||||
} else {
|
||||
this.isSubmiting = true
|
||||
var that = this;
|
||||
$.post('/h5/market/sylive2/act/appointment',{'mobile':this.telPhone,'code':this.vCode,'a_id': this.info.a_id},function (response){
|
||||
that.isSubmiting = false
|
||||
|
||||
if(response.code==200){
|
||||
that.msgisShowReg = false
|
||||
//提交成功
|
||||
that.msgisShowSuccess = true
|
||||
that.succesTx = {
|
||||
title: that.info.appoint_title,
|
||||
content:that.info.appoint_msg,
|
||||
}
|
||||
|
||||
// mDialog.msg({
|
||||
// duration: 250,
|
||||
// pause: 2000,
|
||||
// content: response.msg,
|
||||
// onClose:function(){
|
||||
// window.location.href = that.info.subscribemsg;
|
||||
// }
|
||||
// });
|
||||
}else{
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: response.msg
|
||||
});
|
||||
}
|
||||
},'json')
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
})
|
||||
Vue.config.ignoredElements = ['wx-open-launch-weapp', 'wx-open-subscribe'];
|
||||
</script>
|
||||
<?=$this->load->view('h5/market/sylive/share_script')?>
|
||||
<?= $this->load->view('h5/market/sylive/share_script') ?>
|
||||
</body>
|
||||
|
||||
@@ -0,0 +1,564 @@
|
||||
<body class="bg-fff">
|
||||
<div class="height-500 fixed left-0 right-0 top-0 z-index-0 bg-1a1a1a"></div>
|
||||
<div class="bg-fff" id="app" ref="app">
|
||||
<div>
|
||||
<div class="height-80"></div>
|
||||
<div class="fixed top-0 left-0 right-0 z-index-10 bg-fff pl30 pr30 pt20 pb20">
|
||||
<div class="relative height-70 ml50 mr50 fn-flex text-center" v-if="info.tab.length<4">
|
||||
<div class="fn-flex-item relative tab-menu2 pt10 pb10" :class="[tabid == item.id?'font-36 active':'font-28']" v-for="(item,index) in info.tab"><a class="relative inline-block" :class="[tabid == item.id?'':'pt10']" @click="changeTab(item.id,index)" href="javascript:">{{item.title}}</a></div>
|
||||
</div>
|
||||
<div class="relative height-70 space-nowrap text-center scroll-x" v-else>
|
||||
<div class="inline-block relative tab-menu2 pt10 pb10 pl25 pr25" :class="[tabid == item.id?'font-36 active':'font-28']" v-for="(item,index) in info.tab"><a class="relative inline-block" :class="[tabid == item.id?'':'pt10']" @click="changeTab(item.id,index)" href="javascript:">{{item.title}}</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container pt40 pb130">
|
||||
<div class="pt30 pb30 ml30 mr30 bg-fff box-shadow-darkGray ulib-r20">
|
||||
|
||||
<div class="relative ml30">
|
||||
<div class="height-60" v-if="tabid!=1">
|
||||
<?if($is_shop_manager){?>
|
||||
<select class="select-more bg-f6 ulib-r10 height-60" @change="changeEmployee">
|
||||
<option :value="item.id" v-for="item in siftEmployeeList">{{item.title}}</option>
|
||||
</select>
|
||||
<?}?>
|
||||
<select class="select-more bg-f6 ulib-r10 height-60" @change="changeTag" v-if="tabid==3">
|
||||
<option value="0">标签</option>
|
||||
<option :value="item.id" v-for="item in info.followList">{{item.title}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="height-60" v-else>
|
||||
<div class="block absolute box-middle left-0 pt10 pb10 pr10 ulib-rl750">
|
||||
<span>合计 {{total}} 人</span>
|
||||
</div>
|
||||
</div>
|
||||
<?if($is_shop_manager){?>
|
||||
<a class="block absolute box-middle right-0 pt10 pb10 pl55 pr10 bg-ff9d47 ulib-rl750" @click="showAllotMultiple" v-if="tabid==1">
|
||||
<div class="inline-block absolute left-0 box-middle ml15 imgsize-32X32 bg-fff ulib-r750"><i class=" absolute box-center-middle iconfont icon-fenpei font-22 color-ff9d47"></i></div>
|
||||
<span class="line-height-11 font-28 color-fff">统一分配</span>
|
||||
</a>
|
||||
<?}?>
|
||||
<a class="block absolute box-middle right-0 pt10 pb10 pl55 pr10 ulib-rl750" v-if="tabid!=1">
|
||||
<span>合计 {{total}} 人</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="block relative mt30 ml30 mr30 pl30 pr30 pt45 pb45 bg-f6 ulib-r20" :class="item.status==2?'op70':''" v-for="(item,index) in list">
|
||||
<div class="absolute top-0 right-0 bg-fe9538 pt5 pb5 pl20 pr20 font-22 color-fff ulib-rbl20 ulib-rtr20" v-if="item.is_appoint||item.is_wechat||item.is_rights">
|
||||
<span class="text-middle" v-if="item.is_appoint">已预约</span>
|
||||
<span class="text-middle" v-if="item.is_appoint&&item.is_wechat">·</span>
|
||||
<span class="text-middle" v-if="item.is_wechat">已加微信</span>
|
||||
<span class="text-middle" v-if="(item.is_wechat&&item.is_rights)||(!item.is_wechat&&item.is_appoint&&item.is_rights)">·</span>
|
||||
<span class="text-middle" v-if="item.is_rights">已领权益</span>
|
||||
</div>
|
||||
<div class="relative pr150">
|
||||
<div class="font-32">
|
||||
<span class="text-middle">{{item.customer_name}}</span>
|
||||
<span class="text-middle">·</span>
|
||||
<a class="text-middle" :href="'tel:'+item.tel" >
|
||||
<span class="text-middle">{{item.tel}} </span>
|
||||
<i class="text-middle iconfont icon-tel font-24"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="mt20" v-if="item.status!=0">
|
||||
<div class="font-22">
|
||||
<span class="text-middle color-999">顾问</span>
|
||||
<span class="text-middle color-999">·</span>
|
||||
<img class="text-middle imgsize-35X35 ulib-r750 bds-4-fff" :src="item.headimg" alt="#" />
|
||||
<span class="text-middle">{{item.employee_name}}</span>
|
||||
<div class="inline-block text-middle bg-fe9538 pt2 pb2 pl15 pr15 font-18 color-fff ulib-r750" v-if="item.grade">
|
||||
<span class="text-middle">{{item.grade}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="block absolute right-0 box-middle pt10 pb10 pl20 pr20 bg-333 font-28 color-fff ulib-r750" v-if="item.status==0" @click="showAllotSingle(index)">分配</a>
|
||||
<a class="block absolute right-0 box-middle pt10 pb10 pl20 pr20 bg-333 font-28 color-fff ulib-r750" v-if="item.status==1" @click="showFollowUp(index)">跟进</a>
|
||||
<a class="block absolute right-0 box-middle pt10 pb10 pl20 pr20 bg-333 font-28 color-fff ulib-r750" v-if="item.status==2" @click="showFollowUp(index)">修改</a>
|
||||
</div>
|
||||
<div class="mt20 pt10 pb10 pl15 pr15 ulib-rtr20 ulib-rbl20 ulib-rbr20 font-22 color-fe9538" :class="item.status==2?'bg-eee':'bg-fcecde'" v-if="item.tip">{{item.tip}}</div>
|
||||
</div>
|
||||
<mugen-scroll :handler="fetchData" :should-handle="!loading" scroll-container="app">
|
||||
<div class="pt100 pb100 text-center color-ccc" v-if="isNoData"><span class="text-middle font-22">暂无数据</span></div>
|
||||
<div class="pt20 pb20 text-center color-ccc" v-else-if="loading"><i class="iconfont icon-jiazai text-middle"></i><span class="text-middle font-22">请稍等...</span></div>
|
||||
<div class="pt20 pb20 text-center font-22 color-ccc" v-else-if="isDataEnd&&list.length>5">我们是有底线的</div>
|
||||
</mugen-scroll>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?$this->load->view('h5/market/sylive2/nav_biz')?>
|
||||
|
||||
<!--跟进-->
|
||||
<div class="msg fn-hide" :style="msgisShowFollowUp?'display:block':'display:none'" v-if="msgisShowFollowUp">
|
||||
<div class="msgBg" @click="msgisShowFollowUp = false"></div>
|
||||
<div class="msgMain">
|
||||
<div class="content">
|
||||
<div class="word pl20 pr20">
|
||||
<div class="pt10 pb10 fn-clear">
|
||||
<div class="fn-fl font-36">客户标签</div>
|
||||
<div class="fn-fr" v-if="list[followIndex].is_wechat==1" @click="addwechat"><i class="iconfont text-middle font-32" :class="is_wechat==1?'icon-checked':'icon-check'"></i><span class="font-28 text-middle">已添加微信</span></div>
|
||||
<div class="fn-fr" @click="addwechat" v-else><i class="iconfont text-middle font-32" :class="is_wechat==1?'icon-checked':'icon-check'"></i><span class="font-28 text-middle">已添加微信</span></div>
|
||||
</div>
|
||||
<a class="block mt20 pt20 pb20 text-center font-28 ulib-r20 " :class="followId==item.id?'bg-fff bds-2-1a1a1a':'bg-f6 bds-2-fff color-999'" @click="followId=item.id" v-for="(item,index) in info.followList">{{item.title}}</a>
|
||||
</div>
|
||||
<div class="opt mt20 pl20 pr20 fn-flex">
|
||||
<a class="fn-flex-item bg-fff bds-2-1a1a1a mr15 pt20 pb20 text-center font-32 ulib-r750" @click="msgisShowFollowUp = false" href="javascript:" >取消</a>
|
||||
<a class="fn-flex-item bg-1a1a1a ml15 pt20 pb20 text-center font-32 color-fff ulib-r750" @click="submitFollowUp" href="javascript:" >保存</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--单个分配-->
|
||||
<div class="msg fn-hide" :style="msgisShowAllotSingle?'display:block':'display:none'" v-if="msgisShowAllotSingle">
|
||||
<div class="msgBg" @click="msgisShowAllotSingle = false"></div>
|
||||
<div class="msgMain">
|
||||
<div class="content">
|
||||
<div class="word pl20 pr20">
|
||||
<div class="pt10 pb10 text-center font-36">选择顾问</div>
|
||||
<div class="mt20 inner30 pt10 bds-1-eee ulib-r20 max-height-500 scroll-y">
|
||||
<a class="block mt20 inner20 font-28 ulib-r20 fn-clear" :class="allotEmployeeId==item.id?'bg-fff bds-2-1a1a1a':'bg-f6 bds-2-fff color-999'" @click="allotEmployeeId=item.id" v-for="(item,index) in info.employeeList">
|
||||
<span class="fn-fl">{{item.title}}</span>
|
||||
<i class="fn-fr iconfont text-middle font-32" :class="allotEmployeeId==item.id?'icon-checked':'icon-check'"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="opt mt20 pl20 pr20 fn-flex">
|
||||
<a class="fn-flex-item bg-fff bds-2-1a1a1a mr15 pt20 pb20 text-center font-32 ulib-r750" @click="msgisShowAllotSingle = false" href="javascript:" >取消</a>
|
||||
<a class="fn-flex-item bg-1a1a1a ml15 pt20 pb20 text-center font-32 color-fff ulib-r750" @click="submitAllotSingle" href="javascript:" >保存</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--统一分配-->
|
||||
<div class="msg fn-hide" :style="msgisShowAllotMultiple?'display:block':'display:none'" v-if="msgisShowAllotMultiple">
|
||||
<div class="msgBg" @click="msgisShowAllotMultiple = false"></div>
|
||||
<div class="msgMain">
|
||||
<div class="content">
|
||||
<div class="word pl20 pr20">
|
||||
<div class="pt10 pb10 fn-clear">
|
||||
<div class="fn-fl font-36">分配方案</div>
|
||||
<div class="fn-fr">
|
||||
<span class="font-22">待分配总数</span>
|
||||
<span class="font-28 color-ff9d47">{{total}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt20 fn-flex text-center">
|
||||
<a class="fn-flex-item inner20 mr15 font-28 ulib-r20" :class="assig_type==0?'bg-fff bds-2-1a1a1a':'bg-f6 bds-2-fff color-999'" @click="customise">手动分</a>
|
||||
<a class="fn-flex-item inner20 ml15 font-28 ulib-r20" :class="assig_type==1?'bg-fff bds-2-1a1a1a':'bg-f6 bds-2-fff color-999'" @click="average">平均分</a>
|
||||
</div>
|
||||
<div class="mt20 inner20 pt10 bds-1-eee ulib-r20 max-height-500 scroll-y">
|
||||
<div class="mt20 inner10 fn-clear" v-for="(item,index) in multipleEmployeeList">
|
||||
<span class="fn-fl font-32">{{item.title}}</span>
|
||||
<div class="fn-fr relative pl50 pr50 bg-fff bds-1-eee ulib-r20 overflowhidden">
|
||||
<div class="block absolute left-0 top-0 bottom-0 bg-f6 w-50" @click="minus(index)"><i class="absolute box-center-middle iconfont icon-jian font-22"></i></div>
|
||||
<input class="w-50 pt10 pb10 bg-transparent border-none text-center font-28" type="number" v-model="item.num" @blur="blurNum(index)" placeholder="" />
|
||||
<div class="block absolute right-0 top-0 bottom-0 bg-f6 w-50" @click="add(index)"><i class="absolute box-center-middle iconfont icon-jia font-22"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="opt mt20 pl20 pr20 fn-flex">
|
||||
<a class="fn-flex-item bg-fff bds-2-1a1a1a mr15 pt20 pb20 text-center font-32 ulib-r750" @click="msgisShowAllotMultiple = false" href="javascript:" >取消</a>
|
||||
<a class="fn-flex-item bg-1a1a1a ml15 pt20 pb20 text-center font-32 color-fff ulib-r750" @click="submitAllotMultiple" href="javascript:" >保存</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let hostUrl = ''
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
info:{
|
||||
tab:[],
|
||||
employeeList:[],
|
||||
followList:[],
|
||||
},
|
||||
tabid:'<?=$tabId?>',
|
||||
ActivityId:'0',
|
||||
loading: false,
|
||||
isDataEnd: false,
|
||||
isNoData: false,
|
||||
page: 1, //页数
|
||||
size: 20, //每页取多少个数据
|
||||
list:[],
|
||||
total:0,
|
||||
isSubmiting: false,
|
||||
siftEmployeeList:[
|
||||
{
|
||||
id:'0',
|
||||
title:'顾问'
|
||||
},
|
||||
],
|
||||
|
||||
msgisShowFollowUp:false,//是否显示跟踪弹窗
|
||||
followIndex:-1,
|
||||
followId:'',
|
||||
is_wechat:0,
|
||||
|
||||
msgisShowAllotSingle:false,//是否显示分配单个弹窗
|
||||
allotEmployeeId:'',
|
||||
|
||||
msgisShowAllotMultiple:false,//是否显示统一分配弹窗
|
||||
assig_type:'0', //0手动分 /1平均分
|
||||
multipleEmployeeList:[],//顾问分配列表
|
||||
|
||||
tagId : 0
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.getInfo()
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
//显示跟进
|
||||
showFollowUp(index){
|
||||
this.followIndex = index
|
||||
this.followId = ''
|
||||
this.msgisShowFollowUp = true
|
||||
this.is_wechat = this.list[index].is_wechat
|
||||
},
|
||||
|
||||
//添加微信
|
||||
addwechat(){
|
||||
this.is_wechat = this.is_wechat == 1?0:1
|
||||
},
|
||||
|
||||
//提交跟进
|
||||
submitFollowUp(){
|
||||
if (this.isSubmiting) return;
|
||||
if (this.followId == '') {
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "请选择跟进情况"
|
||||
});
|
||||
}else{
|
||||
var that = this
|
||||
this.isSubmiting = true
|
||||
//this.list[followIndex].id //客户id
|
||||
//this.followId //选中的跟进id
|
||||
//this.is_wechat //是否加微
|
||||
var params = {
|
||||
'customerId' : this.list[this.followIndex].id,
|
||||
'followId' :this.followId,
|
||||
'is_wechat' :this.is_wechat
|
||||
}
|
||||
$.post('/h5/market/sylive2/customer/addTag',params,function (res) {
|
||||
that.isSubmiting = false
|
||||
if(res.code==200){
|
||||
that.msgisShowFollowUp = false
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "提交成功"
|
||||
});
|
||||
//重新请求列表
|
||||
that.loading = false;
|
||||
that.isDataEnd = false;
|
||||
that.isNoData = false;
|
||||
that.page = 1;
|
||||
that.list = [];
|
||||
that.getCustomerList()
|
||||
}else{
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: res.msg
|
||||
});
|
||||
}
|
||||
},'json')
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
//显示单个分配
|
||||
showAllotSingle(index){
|
||||
this.allotCustomerIndex = index
|
||||
this.allotEmployeeId = ''
|
||||
this.msgisShowAllotSingle = true
|
||||
},
|
||||
|
||||
//提交单个分配
|
||||
submitAllotSingle(){
|
||||
if (this.isSubmiting) return;
|
||||
if (this.allotEmployeeId == '') {
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "请选顾问"
|
||||
});
|
||||
}else{
|
||||
this.isSubmiting = true
|
||||
var that = this
|
||||
var params = {
|
||||
'customerId' : this.list[this.allotCustomerIndex].id,
|
||||
'cfUserId' : this.allotEmployeeId
|
||||
}
|
||||
$.post('/h5/market/sylive2/customer/allot_single',params,function (res) {
|
||||
that.isSubmiting = false
|
||||
if(res.code==200){
|
||||
that.msgisShowAllotSingle = false
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "提交成功"
|
||||
});
|
||||
let list= that.list
|
||||
list.splice(that.allotCustomerIndex, 1)
|
||||
that.list = list
|
||||
that.total = that.total-1
|
||||
}else{
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: res.msg
|
||||
});
|
||||
}
|
||||
},'json')
|
||||
}
|
||||
},
|
||||
|
||||
//显示统一分配
|
||||
showAllotMultiple(){
|
||||
this.msgisShowAllotMultiple = true
|
||||
|
||||
let employeeList = this.info.employeeList
|
||||
employeeList.forEach(item => {
|
||||
item.num = 0
|
||||
})
|
||||
this.multipleEmployeeList = employeeList
|
||||
|
||||
},
|
||||
|
||||
//自定义分
|
||||
customise(){
|
||||
this.assig_type = 0
|
||||
let employeeList = this.info.employeeList
|
||||
employeeList.forEach(item => {
|
||||
item.num = 0
|
||||
})
|
||||
this.multipleEmployeeList = employeeList
|
||||
},
|
||||
|
||||
//平均分
|
||||
average(){
|
||||
this.assig_type = 1
|
||||
if(this.total>0&&this.info.employeeList.length>0){
|
||||
let num = Math.floor(this.total / this.info.employeeList.length)
|
||||
let remainder = this.total % this.info.employeeList.length
|
||||
let employeeList = this.info.employeeList
|
||||
employeeList.forEach((item,index) => {
|
||||
if(index < remainder){
|
||||
item.num = num + 1
|
||||
}else{
|
||||
item.num = num
|
||||
}
|
||||
})
|
||||
this.multipleEmployeeList = employeeList
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
//加
|
||||
add(index){
|
||||
|
||||
let curtotal = 0
|
||||
this.info.employeeList.forEach(item => {
|
||||
curtotal = curtotal + item.num
|
||||
})
|
||||
|
||||
if(curtotal<this.total){
|
||||
let obj = this.multipleEmployeeList[index]
|
||||
obj.num = obj.num + 1
|
||||
this.$set(this.multipleEmployeeList, index, obj)
|
||||
}
|
||||
else{
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "已超过可以分配数量"
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
//减
|
||||
minus(index){
|
||||
if(this.multipleEmployeeList[index].num>0){
|
||||
let obj = this.multipleEmployeeList[index]
|
||||
obj.num = obj.num - 1
|
||||
this.$set(this.multipleEmployeeList, index, obj)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
//输入判断
|
||||
blurNum(index){
|
||||
let obj = this.multipleEmployeeList[index]
|
||||
obj.num = Math.floor(obj.num)
|
||||
if(obj.num < 0){
|
||||
obj.num = 0
|
||||
}
|
||||
if(obj.num>0){
|
||||
let curtotal = 0
|
||||
this.info.employeeList.forEach((item,i) => {
|
||||
if(index != i){
|
||||
curtotal = curtotal + item.num
|
||||
}
|
||||
})
|
||||
if(curtotal + obj.num > this.total ){
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "已超过可以分配数量"
|
||||
});
|
||||
obj.num = this.total - curtotal
|
||||
}
|
||||
}
|
||||
this.$set(this.multipleEmployeeList, index, obj)
|
||||
},
|
||||
|
||||
//提交统一分配
|
||||
submitAllotMultiple(){
|
||||
var that = this
|
||||
if (this.isSubmiting) return;
|
||||
this.isSubmiting = true
|
||||
|
||||
$.post('/h5/market/sylive2/customer/allot_mult',{'info':this.multipleEmployeeList},function (res) {
|
||||
that.isSubmiting = false
|
||||
if(res.code==200){
|
||||
that.msgisShowAllotMultiple = false
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "提交成功"
|
||||
});
|
||||
//重新请求列表
|
||||
that.loading = false;
|
||||
that.isDataEnd = false;
|
||||
that.isNoData = false;
|
||||
that.page = 1;
|
||||
that.list = [];
|
||||
that.getCustomerList()
|
||||
}else{
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: res.msg
|
||||
});
|
||||
}
|
||||
},'json')
|
||||
// this.msgisShowAllotMultiple = false
|
||||
// mDialog.msg({
|
||||
// duration: 250,
|
||||
// pause: 2000,
|
||||
// content: "提交成功"
|
||||
// });
|
||||
// this.isSubmiting = false
|
||||
//
|
||||
// //重新请求列表
|
||||
// this.loading = false;
|
||||
// this.isDataEnd = false;
|
||||
// this.isNoData = false;
|
||||
// this.page = 1;
|
||||
// this.list = [];
|
||||
// this.getCustomerList()
|
||||
},
|
||||
|
||||
//拉取数据
|
||||
fetchData() {
|
||||
this.getCustomerList()
|
||||
},
|
||||
|
||||
//获取基础信息
|
||||
getInfo(){
|
||||
this.info = {
|
||||
tab:<?=json_encode($tab,JSON_UNESCAPED_UNICODE)?>,
|
||||
employeeList:<?=json_encode($gw_list,JSON_UNESCAPED_UNICODE)?>,
|
||||
followList:<?=json_encode($visitTag,JSON_UNESCAPED_UNICODE)?>,
|
||||
}
|
||||
|
||||
this.siftEmployeeList = this.siftEmployeeList.concat(this.info.employeeList);
|
||||
|
||||
},
|
||||
|
||||
//tab切换
|
||||
changeTab(id,index){
|
||||
if (this.isSubmiting) return;
|
||||
if(id != this.tabid&&!this.loading){
|
||||
this.tabid = id;
|
||||
this.loading = false;
|
||||
this.isDataEnd = false;
|
||||
this.isNoData = false;
|
||||
this.page = 1;
|
||||
this.list = [];
|
||||
this.getCustomerList()
|
||||
}
|
||||
},
|
||||
|
||||
//选项选择顾问
|
||||
changeEmployee(e){
|
||||
if(this.employeeId != e.target.value){;
|
||||
this.employeeId = e.target.value
|
||||
|
||||
this.loading = false;
|
||||
this.isDataEnd = false;
|
||||
this.isNoData = false;
|
||||
this.page = 1;
|
||||
this.list = [];
|
||||
this.getCustomerList()
|
||||
}
|
||||
},
|
||||
//选项选择标签
|
||||
changeTag(e){
|
||||
if(this.tagId != e.target.value){;
|
||||
this.tagId = e.target.value
|
||||
|
||||
this.loading = false;
|
||||
this.isDataEnd = false;
|
||||
this.isNoData = false;
|
||||
this.page = 1;
|
||||
this.list = [];
|
||||
this.getCustomerList()
|
||||
}
|
||||
},
|
||||
|
||||
//获取中奖列表
|
||||
getCustomerList(){
|
||||
let that=this;
|
||||
if (!that.isNoData && !that.isDataEnd && !that.loading) {
|
||||
that.loading = true;
|
||||
var params = {
|
||||
'tabid' : that.tabid,
|
||||
'page' : that.page
|
||||
}
|
||||
if(this.employeeId){
|
||||
params['employeeId'] = this.employeeId
|
||||
}
|
||||
if(this.tagId){
|
||||
params['tagId'] = this.tagId
|
||||
}
|
||||
//请求接口
|
||||
$.get('/h5/market/sylive2/customer/ajax_list',params,function (res) {
|
||||
that.loading = false;
|
||||
that.page = that.page + 1;
|
||||
that.total = res.data.total
|
||||
that.list = that.list.concat(res.data.lists);
|
||||
if (res.data.total == 0) {
|
||||
that.isNoData = true;
|
||||
} else if (that.list.length == res.data.total) {
|
||||
that.isDataEnd = true;
|
||||
}
|
||||
},'json')
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
@@ -7,7 +7,7 @@
|
||||
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title><?=$_title?></title>
|
||||
<link rel="stylesheet" href="/css/h5/market/sylive/h5.css?20221212">
|
||||
<link rel="stylesheet" href="/css/h5/market/sylive/h5.css?20230225">
|
||||
<link rel="stylesheet" href="https://qs.haodian.cn/web/javascript/swiper/css/swiper.min.css">
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/jquery.3.4.1.min.js"></script>
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/vue.2.6.10.min.js"></script>
|
||||
|
||||
@@ -23,8 +23,13 @@
|
||||
<div class="font-32 line-height-13 ">{{info.title}}</div>
|
||||
<div class="mt10 font-22 color-999">{{info.validity}}</div>
|
||||
<div class="absolute right-0 box-middle mr30 color-c4302c">
|
||||
<span class="font-24">¥</span>
|
||||
<span class="font-48 text-bold">{{info.price}}</span>
|
||||
<template v-if="info.price>0">
|
||||
<span class="font-24">¥</span>
|
||||
<span class="font-48 text-bold">{{info.price}}</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span class="font-48 text-bold">免费</span>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="relative bg-fff mb30 ml30 mr30 inner40 ulib-r20 box-shadow-darkGray">
|
||||
@@ -40,14 +45,16 @@
|
||||
<div class="fixed left-0 bottom-0 right-0 inner30 bg-fff z-index-2" >
|
||||
<template v-if="info.s_time>0">
|
||||
<a class="block bg-999 pt20 pb20 text-center color-fff ulib-r10" href="javascript:void(0)">
|
||||
<div class="font-32">立即支付<span>{{info.price}}</span>元</div>
|
||||
<div class="font-32" v-if="info.price>0">立即支付<span>{{info.price}}</span>元</div>
|
||||
<div class="font-32" v-else>立即领取</div>
|
||||
<div class="mt10 font-20 color-fff" v-html="showTime"></div>
|
||||
</a>
|
||||
</template>
|
||||
<template v-else-if="info.e_time>0">
|
||||
<template v-if="info.item_status==0">
|
||||
<a class="block bg-1a1a1a pt20 pb20 text-center color-fff ulib-r10" v-if="info.stock>0" @click="showReg" href="javascript:void(0)">
|
||||
<div class="font-32">立即支付<span>{{info.price}}</span>元</div>
|
||||
<div class="font-32" v-if="info.price>0">立即支付<span>{{info.price}}</span>元</div>
|
||||
<div class="font-32" v-else>立即领取</div>
|
||||
<div class="mt10 font-20 color-888" v-html="showTime"></div>
|
||||
</a>
|
||||
<div class="bg-999 pt30 pb30 text-center color-fff ulib-r10" v-else>已售罄</div>
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<div class="fixed left-0 bottom-0 right-0 pt15 pb20 text-center font-22 fn-flex bg-size-fullwidth bg-no-repeat bg-pos-top" style="background-image:url('https://qs.haodian.cn/web/images/project/H5-ShiYu/nav-bg.png');">
|
||||
<a class="fn-flex-item pt15" href="/h5/market/sylive2/stic">
|
||||
<img class="imgsize-50X50" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-home.png" alt="#">
|
||||
<div class="space-nowrap con-min60 font-22">首页</div>
|
||||
</a>
|
||||
<?if($is_biz){?>
|
||||
<a class="fn-flex-item pt15" href="/h5/market/sylive2/customer">
|
||||
<img class="imgsize-50X50" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-kehu-ac.png" alt="#">
|
||||
<div class="space-nowrap con-min60 font-22">客户</div>
|
||||
</a>
|
||||
<a class="fn-flex-item relative" href="/h5/market/sylive2/order/exchange">
|
||||
<img class="imgsize-80X80 absolute box-center top-0 " src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-writeOff.png" alt="#">
|
||||
</a>
|
||||
<a class="fn-flex-item pt15" href="/h5/market/sylive2/order">
|
||||
<img class="imgsize-50X50" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-winning-ac.png" alt="#">
|
||||
<div class="space-nowrap con-min60 font-22">订单</div>
|
||||
</a>
|
||||
<?}?>
|
||||
<a class="fn-flex-item pt15" href="/h5/market/sylive2/stic/ranking">
|
||||
<img class="imgsize-50X50" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-ranking.png" alt="#">
|
||||
<div class="space-nowrap con-min60 font-22">排行</div>
|
||||
</a>
|
||||
</div>
|
||||
@@ -0,0 +1,187 @@
|
||||
<link rel="stylesheet" href="https://qs.haodian.cn/web/javascript/LArea/css/LArea.css">
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/LArea/js/LAreaData1.js"></script>
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/LArea/js/LAreaData2.js"></script>
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/LArea/js/LArea.js"></script>
|
||||
<body class="bg-f6">
|
||||
<div class="height-500 fixed left-0 right-0 top-0 z-index-0 bg-1a1a1a"></div>
|
||||
<div class="bg-f6" id="app" ref="app">
|
||||
<div class="container pt100">
|
||||
<div class="relative bg-fff ml30 mr30 inner30 ulib-r20 box-shadow-darkGray" style="min-height:45vh;">
|
||||
<div class="absolute top-0 right-0 bg-fe9538 pt10 pb10 pl20 pr20 font-22 color-fff ulib-rbl20 ulib-rtr20">
|
||||
{{info.cate}}
|
||||
</div>
|
||||
<img class="absolute top--60 box-center bds-4-fff imgsize-120X120 ulib-r750 z-index-1" :src="info.headimg"
|
||||
alt="#"/>
|
||||
<div class="pt50 font-28 text-center color-999">{{info.nickname}}</div>
|
||||
<div class="pt50">
|
||||
<div class="relative pl70 bg-f6 ulib-r10">
|
||||
<i class="absolute box-middle left-0 ml30 iconfont icon-wode font-30 color-999"></i>
|
||||
<input class="wp100 pt25 pb25 font-30 bg-f6 border-none ulib-r10" type="text" v-model="info.customer_name"
|
||||
placeholder="请输入姓名"/>
|
||||
</div>
|
||||
<div class="mt30 relative pl70 bg-f6 ulib-r10">
|
||||
<i class="absolute box-middle left-0 ml30 iconfont icon-shouji font-30 color-999"></i>
|
||||
<input class="wp100 pt25 pb25 font-30 bg-f6 border-none ulib-r10" type="tel" v-model="info.tel"
|
||||
placeholder="请输入手机号"/>
|
||||
</div>
|
||||
<template v-if="info.ifAddress">
|
||||
<div class="mt30 relative bg-f6 ulib-r10">
|
||||
<input id="region" class="wp100 inner30 font-28 bg-f6 border-none ulib-r10" type="text" readonly="" v-model="info.region" placeholder="选择省/市/区" />
|
||||
<input id="regionvalue" type="hidden" v-model="regionvalue"/>
|
||||
</div>
|
||||
<div class="mt30 relative pl70 bg-f6 ulib-r10">
|
||||
<i class="absolute box-middle left-0 ml30 iconfont icon-dizhi1 font-30 color-999"></i>
|
||||
<input class="wp100 pt25 pb25 font-28 bg-f6 border-none ulib-r10" type="text" v-model="info.address" placeholder="请输入详细地址" />
|
||||
</div>
|
||||
</template>
|
||||
<div class="relative mt30 pt30 bts-1-eee fn-clear">
|
||||
<img class="fn-fl imgsize-180X90 ulib-r5" :src="info.img" alt="#">
|
||||
<div class="pl200">
|
||||
<div class="text-nowrap font-32 line-height-13">
|
||||
<template v-if="info.grade">
|
||||
<span class="text-middle color-fe9538">{{info.grade}}</span>
|
||||
<span class="text-middle">·</span>
|
||||
</template>
|
||||
<span class="text-middle">{{info.name}}</span>
|
||||
</div>
|
||||
<div class="mt15 font-22 color-999">{{info.time}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pl30 pr30">
|
||||
<button class="mt40 wp100 bg-1a1a1a border-none pt30 pb30 font-32 color-fff ulib-r10" @click="submit()">
|
||||
立即提交核销
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="absolute bottom-0 left-0 right-0 pb100 pl30 pr30 text-center font-22 color-999 line-height-20">
|
||||
<div>温馨提示:核销只能使用一次,遇到问题及时联系顾问</div>
|
||||
<!--
|
||||
<div>联系电话:<a class="color-999" href="tel:0592-6666888">0592-6666888</a></div>
|
||||
-->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function _Debounce(fn, t) {
|
||||
let delay = t || 500;
|
||||
let timer;
|
||||
return function () {
|
||||
let args = arguments;
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
timer = setTimeout(() => {
|
||||
timer = null;
|
||||
fn.apply(this, args);
|
||||
}, delay);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
let hostUrl = ''
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
info: {},
|
||||
regionvalue:'',
|
||||
isSubmiting: false,
|
||||
},
|
||||
mounted() {
|
||||
this.getInfo()
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
//获取基础信息
|
||||
getInfo() {
|
||||
this.info = <?=json_encode($info,JSON_UNESCAPED_UNICODE)?>
|
||||
|
||||
if(this.info.ifAddress){
|
||||
var that = this
|
||||
//选择省市初始化
|
||||
setTimeout(function () {
|
||||
let area = new LArea();
|
||||
area.init({
|
||||
'trigger': '#region', //触发选择控件的文本框,同时选择完毕后name属性输出到该位置
|
||||
'valueTo': '#regionvalue', //选择完毕后id属性输出到该位置
|
||||
'keys': {
|
||||
id: 'value',
|
||||
name: 'text'
|
||||
}, //绑定数据源相关字段 id对应valueTo的value属性输出 name对应trigger的value属性输出
|
||||
'type': 2,
|
||||
'data': [provs_data, citys_data, dists_data]
|
||||
});
|
||||
|
||||
if(that.info.region !=''){
|
||||
for(var i in provs_data){
|
||||
if(provs_data[i].text==that.info.region.split(",")[0]){
|
||||
var x=i;
|
||||
var city=citys_data[provs_data[i].value];
|
||||
for(var j in city){
|
||||
if(city[j].text==that.info.region.split(",")[1]){
|
||||
var y=j;
|
||||
var district=dists_data[city[j].value];
|
||||
for(var k in district){
|
||||
if(district[k].text==that.info.region.split(",")[2]){
|
||||
var z=k;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
area.value=[x,y,z];//控制初始位置,注意:该方法并不会影响到input的value
|
||||
}else{
|
||||
area.value=[12,1,1];//控制初始位置,注意:该方法并不会影响到input的value
|
||||
}
|
||||
area.success = function(){
|
||||
that.regionvalue = $("#regionvalue").val();
|
||||
}
|
||||
}, 200)
|
||||
}
|
||||
},
|
||||
|
||||
submit() {
|
||||
if (this.isSubmiting) return;
|
||||
if (!this.info.customer_name) {
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "请输入姓名"
|
||||
});
|
||||
} else if (!/^1[3456789]\d{9}$/.test(this.info.tel)) {
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "请输入正确手机号"
|
||||
});
|
||||
} else {
|
||||
var that = this
|
||||
this.isSubmiting = true
|
||||
if(this.isSubmit){
|
||||
return false;
|
||||
}
|
||||
$.post('/h5/market/sylive2/order/add_apply',{'info':this.info},function(res){
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: res.msg,
|
||||
onClose:function(){
|
||||
self.location=document.referrer;
|
||||
}
|
||||
});
|
||||
that.isSubmiting = false
|
||||
},'json');
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
@@ -0,0 +1,216 @@
|
||||
<body class="bg-f6">
|
||||
<div class="height-500 fixed left-0 right-0 top-0 z-index-0 bg-1a1a1a"></div>
|
||||
<div class="bg-f6" id="app" ref="app">
|
||||
<div>
|
||||
<div class="height-165"></div>
|
||||
<div class="fixed top-0 left-0 right-0 z-index-10 bg-f6 pl30 pr30">
|
||||
<div class="pt20 pb20">
|
||||
<div class="relative height-70 ml50 mr50 fn-flex text-center" v-if="info.tab.length<4">
|
||||
<div class="fn-flex-item relative tab-menu2 pt10 pb10" :class="[tabid == item.id?'font-36 active':'font-28']" v-for="(item,index) in info.tab"><a class="relative inline-block" :class="[tabid == item.id?'':'pt10']" @click="changeTab(item.id,index)" href="javascript:">{{item.title}}</a></div>
|
||||
</div>
|
||||
<div class="relative height-70 space-nowrap text-center scroll-x" v-else>
|
||||
<div class="inline-block relative tab-menu2 pt10 pb10 pl25 pr25" :class="[tabid == item.id?'font-36 active':'font-28']" v-for="(item,index) in info.tab"><a class="relative inline-block" :class="[tabid == item.id?'':'pt10']" @click="changeTab(item.id,index)" href="javascript:">{{item.title}}</a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pb20 fn-clear">
|
||||
<div class="fn-fl relative wp70 pl40 pr150 height-60 bg-fff ulib-r20" >
|
||||
<i class="absolute left-0 box-middle iconfont icon-sousuo ml20 font-24 color-ddd"></i>
|
||||
<input class="height-55 inp-sty wp100 border-none font-22 ulib-r10" type="search" class="ipt-seach" placeholder="请输入查找姓名/预留手机号" v-model="searchValue" />
|
||||
<button class="absolute right-0 box-middle bg-1a1a1a border-none height-60 pl20 pr20 font-22 color-fff ulib-r20" @click="searchHandler">搜索</button>
|
||||
</div>
|
||||
<select class="fn-fr select-more2 height-60 ulib-r10 font-28" @change="changePrize">
|
||||
<option :value="item.id" v-for="item in info.prizeList">{{item.title}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container pb130">
|
||||
<div class="inner30 pt0">
|
||||
<a class="block relative mt30 pl30 pr30 pb30 bg-fff ulib-r20" :class="item.success?'op70':''" v-for="(item,index) in list" :href="item.url">
|
||||
<div class="absolute top-0 right-0 bg-fe9538 pt10 pb10 pl20 pr20 font-22 color-fff ulib-rbl20 ulib-rtr20">{{item.cate}}</div>
|
||||
<div class="bbs-1-eee pt20 pb20">
|
||||
<div>
|
||||
<img class="text-middle imgsize-35X35 ulib-r750 bds-4-fff" :src="item.headimg" alt="#" />
|
||||
<span class="text-middle font-22 color-999">{{item.nickname}}</span>
|
||||
<span class="text-middle font-22 color-999">·</span>
|
||||
<span class="text-middle font-22">{{item.customer_name}}</span>
|
||||
</div>
|
||||
<div class="mt10 fn-clear font-22 color-999">
|
||||
<div class="fn-fl"><i class="iconfont icon-shouji"></i>{{item.tel}}</div>
|
||||
<div class="fn-fr wp70 text-nowrap" v-if="item.address"><i class="iconfont icon-dizhi1"></i>{{item.address}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="relative mt20 fn-clear">
|
||||
<img class="fn-fl imgsize-180X90 ulib-r5" :src="item.img" alt="#">
|
||||
<div class="pl200">
|
||||
<div class="text-nowrap font-32 line-height-13">
|
||||
<template v-if="item.grade">
|
||||
<span class="text-middle color-fe9538">{{item.grade}}</span>
|
||||
<span class="text-middle">·</span>
|
||||
</template>
|
||||
<span class="text-middle">{{item.name}}</span>
|
||||
</div>
|
||||
<div class="mt15 font-22 color-999">{{item.time}}</div>
|
||||
</div>
|
||||
<i class="absolute right-0 box-middle iconfont icon-yishiyong font-130 color-aaa" v-if="item.used"></i>
|
||||
</div>
|
||||
<div class="bg-eee mt20 pt10 pb10 pl15 pr15 ulib-rtr20 ulib-rbl20 ulib-rbr20 font-22 color-666" v-if="item.success">{{item.success}}</div>
|
||||
<div class="bg-fcecde mt20 pt10 pb10 pl15 pr15 ulib-rtr20 ulib-rbl20 ulib-rbr20 font-22 color-fe9538" v-if="item.fail">{{item.fail}}</div>
|
||||
</a>
|
||||
<mugen-scroll :handler="fetchData" :should-handle="!loading" scroll-container="app">
|
||||
<div class="pt100 pb100 text-center color-ccc" v-if="isNoData"><span class="text-middle font-22">暂无数据</span></div>
|
||||
<div class="pt20 pb20 text-center color-ccc" v-else-if="loading"><i class="iconfont icon-jiazai text-middle"></i><span class="text-middle font-22">请稍等...</span></div>
|
||||
<div class="pt20 pb20 text-center font-22 color-ccc" v-else-if="isDataEnd&&list.length>5">我们是有底线的</div>
|
||||
</mugen-scroll>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?$this->load->view('h5/market/sylive2/nav_biz')?>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function _Debounce(fn, t) {
|
||||
let delay = t || 500;
|
||||
let timer;
|
||||
return function() {
|
||||
let args = arguments;
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
timer = setTimeout(() => {
|
||||
timer = null;
|
||||
fn.apply(this, args);
|
||||
}, delay);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
let hostUrl = ''
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
searchValue: "",
|
||||
info:{
|
||||
tab:[],
|
||||
prizeList:[]
|
||||
},
|
||||
tabid:'1',
|
||||
ActivityId:'0',
|
||||
loading: false,
|
||||
isDataEnd: false,
|
||||
isNoData: false,
|
||||
page: 1, //页数
|
||||
size: 20, //每页取多少个数据
|
||||
list:[],
|
||||
},
|
||||
mounted() {
|
||||
this.getInfo()
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
searchHandler: _Debounce(function() {
|
||||
this.loading = false;
|
||||
this.isDataEnd = false;
|
||||
this.isNoData = false;
|
||||
this.page = 1;
|
||||
this.list = [];
|
||||
this.getWinList()
|
||||
}, 250),
|
||||
|
||||
//拉取数据
|
||||
fetchData: function() {
|
||||
this.getWinList()
|
||||
},
|
||||
|
||||
//获取基础信息
|
||||
getInfo(){
|
||||
this.info = {
|
||||
tab:[
|
||||
{
|
||||
id:'1',
|
||||
title:'待核销',
|
||||
},
|
||||
{
|
||||
id:'2',
|
||||
title:'已核销',
|
||||
},
|
||||
],
|
||||
prizeList:[
|
||||
{
|
||||
id:'1',
|
||||
title:'订单'
|
||||
},
|
||||
{
|
||||
id:'2',
|
||||
title:'抽奖'
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
|
||||
//tab切换
|
||||
changeTab(id,index){
|
||||
if(id != this.tabid&&!this.loading){
|
||||
this.tabid = id;
|
||||
this.loading = false;
|
||||
this.isDataEnd = false;
|
||||
this.isNoData = false;
|
||||
this.page = 1;
|
||||
this.list = [];
|
||||
this.getWinList()
|
||||
}
|
||||
},
|
||||
|
||||
//选择奖项
|
||||
changePrize(e){
|
||||
|
||||
if(this.PrizeId != e.target.value){;
|
||||
this.PrizeId = e.target.value
|
||||
|
||||
this.loading = false;
|
||||
this.isDataEnd = false;
|
||||
this.isNoData = false;
|
||||
this.page = 1;
|
||||
this.list = [];
|
||||
this.getWinList()
|
||||
}
|
||||
},
|
||||
|
||||
//获取中奖列表
|
||||
getWinList(){
|
||||
let that=this;
|
||||
if (!that.isNoData && !that.isDataEnd && !that.loading) {
|
||||
that.loading = true;
|
||||
//请求接口
|
||||
var params = {
|
||||
'page' : that.page,
|
||||
'keyword' : that.searchValue
|
||||
}
|
||||
if(this.tabid==2){ //已核销
|
||||
params['used'] = 2
|
||||
}else{ //未核销
|
||||
params['used'] = 1
|
||||
}
|
||||
if(this.PrizeId==2){ //抽奖
|
||||
params['iswin'] = 1
|
||||
}
|
||||
$.get('/h5/market/sylive2/order/o_lists',params,function (res) {
|
||||
that.loading = false;
|
||||
that.page = that.page + 1;
|
||||
that.list = that.list.concat(res.data.lists);
|
||||
console.dir(that.list)
|
||||
if (res.data.total == 0) {
|
||||
that.isNoData = true;
|
||||
} else if (that.list.length == res.data.total) {
|
||||
that.isDataEnd = true;
|
||||
}
|
||||
},'json')
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
@@ -0,0 +1,175 @@
|
||||
<body class="bg-f6">
|
||||
<div class="height-500 fixed left-0 right-0 top-0 z-index-0 bg-1a1a1a"></div>
|
||||
<div class="bg-f6" id="app" ref="app">
|
||||
<div>
|
||||
<div class="height-80"></div>
|
||||
<div class="fixed top-0 left-0 right-0 z-index-10 bg-f6 pl30 pr30 pt20 pb20 fn-clear">
|
||||
<div class="fn-fl relative height-70 space-nowrap text-center" >
|
||||
<div class="inline-block relative tab-menu2 pt10 pb10 pl25 pr25" :class="[tabid == item.id?'font-36 active':'font-28']" v-for="(item,index) in info.tab">
|
||||
<a class="relative inline-block" :class="[tabid == item.id?'':'pt10']" @click="changeTab(item.id,index)" href="javascript:">{{item.title}}</a>
|
||||
<div class="absolute top-0 right-0 mt10 pl5 pr5 bg-ff0000 font-22 color-fff ulib-r750" >{{item.num}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<select class="fn-fr mt5 height-60 select-more2 ulib-r10 font-28" @change="changePrize">
|
||||
<option :value="item.id" v-for="item in info.prizeList">{{item.title}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container pb130">
|
||||
<div class="inner30 pt0">
|
||||
<template v-if="list && list.length>0">
|
||||
<div class="block mt30 pl30 pr30 pb30 bg-fff ulib-r20" :class="item.success?'op70':''" v-for="(item,index) in list">
|
||||
<div class="bbs-1-eee pt20 pb20">
|
||||
<div>
|
||||
<img class="text-middle imgsize-35X35 ulib-r750 bds-4-fff" :src="item.headimg" alt="#" />
|
||||
<span class="text-middle font-22 color-999">{{item.nickname}}</span>
|
||||
<span class="text-middle font-22 color-999">·</span>
|
||||
<span class="text-middle font-22" v-if="item.customer_name">{{item.customer_name}}</span>
|
||||
</div>
|
||||
<div class="mt10 fn-clear font-22 color-999">
|
||||
<a :href="'tel:'+item.tel" class="fn-fl"><i class="iconfont icon-shouji"></i>{{item.tel}}</a>
|
||||
<div class="fn-fr wp70 text-nowrap" v-if="item.address"><i class="iconfont icon-dizhi1"></i>{{item.address}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="relative mt20 fn-clear">
|
||||
<img class="fn-fl imgsize-180X90 ulib-r5" :src="item.img" alt="#">
|
||||
<div class="pl200">
|
||||
<div class="text-nowrap font-32 line-height-13">
|
||||
<template v-if="item.grade">
|
||||
<span class="text-middle color-fe9538">{{item.grade}}</span>
|
||||
<span class="text-middle">·</span>
|
||||
</template>
|
||||
<span class="text-middle">{{item.name}}</span>
|
||||
</div>
|
||||
<div class="mt15 font-22 color-999">{{item.time}}</div>
|
||||
</div>
|
||||
<i class="absolute right-0 box-middle iconfont icon-yishiyong font-130 color-aaa" v-if="item.used"></i>
|
||||
</div>
|
||||
<div class="bg-eee mt20 pt10 pb10 pl15 pr15 ulib-rtr20 ulib-rbl20 ulib-rbr20 font-22 color-666" v-if="item.success">{{item.success}}</div>
|
||||
<div class="bg-fcecde mt20 pt10 pb10 pl15 pr15 ulib-rtr20 ulib-rbl20 ulib-rbr20 font-22 color-fe9538" v-if="item.fail">{{item.fail}}</div>
|
||||
</div>
|
||||
</template>
|
||||
<mugen-scroll :handler="fetchData" :should-handle="!loading" scroll-container="app">
|
||||
<div class="pt100 pb100 text-center color-ccc" v-if="isNoData"><span class="text-middle font-22">暂无数据</span></div>
|
||||
<div class="pt20 pb20 text-center color-ccc" v-else-if="loading"><i class="iconfont icon-jiazai text-middle"></i><span class="text-middle font-22">请稍等...</span></div>
|
||||
<div class="pt20 pb20 text-center font-22 color-ccc" v-else-if="isDataEnd&&list.length>5">我们是有底线的</div>
|
||||
</mugen-scroll>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?$this->load->view('h5/market/sylive2/nav_biz')?>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let hostUrl = ''
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
info:{
|
||||
tab:[],
|
||||
prizeList:[]
|
||||
},
|
||||
tabid:'1',
|
||||
ActivityId:'0',
|
||||
loading: false,
|
||||
isDataEnd: false,
|
||||
isNoData: false,
|
||||
page: 1, //页数
|
||||
size: 20, //每页取多少个数据
|
||||
list:[],
|
||||
},
|
||||
mounted() {
|
||||
this.getInfo()
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
//拉取数据
|
||||
fetchData: function() {
|
||||
this.getWinList()
|
||||
},
|
||||
|
||||
//获取基础信息
|
||||
getInfo(){
|
||||
this.info = {
|
||||
tab:[
|
||||
{
|
||||
id:'1',
|
||||
title:'订单列表',
|
||||
num:'0',
|
||||
},
|
||||
{
|
||||
id:'2',
|
||||
title:'中奖列表',
|
||||
num:'0',
|
||||
},
|
||||
],
|
||||
prizeList: <?=json_encode($goods,JSON_UNESCAPED_UNICODE)?>,
|
||||
}
|
||||
},
|
||||
|
||||
//tab切换
|
||||
changeTab(id,index){
|
||||
if (this.isSubmiting) return;
|
||||
if(id != this.tabid&&!this.loading){
|
||||
this.tabid = id;
|
||||
this.loading = false;
|
||||
this.isDataEnd = false;
|
||||
this.isNoData = false;
|
||||
this.page = 1;
|
||||
this.list = [];
|
||||
this.getInfo()
|
||||
this.getWinList()
|
||||
}
|
||||
},
|
||||
|
||||
//选择奖项
|
||||
changePrize(e){
|
||||
if(this.PrizeId != e.target.value){
|
||||
this.PrizeId = e.target.value;
|
||||
|
||||
this.loading = false;
|
||||
this.isDataEnd = false;
|
||||
this.isNoData = false;
|
||||
this.page = 1;
|
||||
this.list = [];
|
||||
this.getWinList()
|
||||
}
|
||||
},
|
||||
|
||||
//获取中奖列表
|
||||
getWinList(){
|
||||
let that=this;
|
||||
if (!that.isNoData && !that.isDataEnd && !that.loading) {
|
||||
that.loading = true;
|
||||
//请求接口
|
||||
var params = {
|
||||
'page' : that.page,
|
||||
}
|
||||
if(that.tabid==2){
|
||||
params['iswin'] = 1;
|
||||
}
|
||||
if(that.PrizeId){
|
||||
params['item_id'] = that.PrizeId
|
||||
}
|
||||
$.get('/h5/market/sylive2/order/o_lists',params,function (res) {
|
||||
that.loading = false;
|
||||
that.page = that.page + 1;
|
||||
that.info.tab[0]['num'] = res.data.order_total
|
||||
that.info.tab[1]['num'] = res.data.win_total
|
||||
that.list = that.list.concat(res.data.lists);
|
||||
console.dir(that.list)
|
||||
if (res.data.total == 0) {
|
||||
that.isNoData = true;
|
||||
} else if (that.list.length == res.data.total) {
|
||||
that.isDataEnd = true;
|
||||
}
|
||||
},'json')
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
@@ -4,20 +4,27 @@
|
||||
<div class="bg-fff" id="app" ref="app">
|
||||
<div class="container pb130">
|
||||
<div class="bg-eee-fff">
|
||||
<div class="inner20 fn-flex">
|
||||
<div class="fn-flex-item relative inner10 bg-333 mr30 ulib-r750 fn-clear" flexsize="4">
|
||||
<img class='block fn-fl imgsize-32X32 ulib-r750' :src='info.headimg' />
|
||||
<div class="absolute left-0 box-middle wp90 pl50">
|
||||
<div class="text-nowrap font-22 color-ddd"><span class="color-fff">{{info.nickname}}·</span><span class="color-ddd">{{info.group}}</span></div>
|
||||
<div class="inner20">
|
||||
<div class="relative pl50 pr200 bg-333 ulib-r750">
|
||||
<img class='block absolute left-0 box-middle ml10 imgsize-32X32 ulib-r750' :src='info.headimg' />
|
||||
<div class="pt15 pb15 text-nowrap font-22 color-ddd">
|
||||
<span class="color-fff">{{info.nickname}}·</span>
|
||||
<span class="color-ddd">{{info.group}}</span>
|
||||
</div>
|
||||
<a class="block fn-fr relative bg-fff imgsize-32X32 ulib-r750" @click="logout()"><i class="absolute box-center-middle iconfont font-24 icon-tuichu1"></i></a>
|
||||
<a class="block absolute right-0 mr150 box-middle bg-fff imgsize-32X32 ulib-r750" @click="logout">
|
||||
<i class="absolute box-center-middle iconfont font-24 icon-tuichu1"></i>
|
||||
</a>
|
||||
<span class="absolute right-0 box-middle mr128 font-28 color-fff">|</span>
|
||||
<a class="block absolute right-0 mr80 box-middle bg-fff imgsize-32X32 ulib-r750" href="/h5/market/sylive2/biz">
|
||||
<i class="absolute box-center-middle iconfont font-24 icon-qizi"></i>
|
||||
</a>
|
||||
<a class="absolute right-0 box-middle mr15 font-28 color-fff" href="/h5/market/sylive2/biz">活动</a>
|
||||
</div>
|
||||
<a class="fn-flex-item pt10 pb10 bg-ccc text-center font-28 ulib-r750" href="/h5/market/sylive2/biz" flexsize="1">
|
||||
<i class="iconfont icon-huodong2 text-middle"></i>
|
||||
<span class="text-middle">活动</span>
|
||||
</a>
|
||||
</div>
|
||||
<img class='block imgsize-750X340 ulib-rt20' :src='info.theme' />
|
||||
<a href="javascript:;" @click="goAct">
|
||||
<img class='block imgsize-750X340 ulib-rt20' :src='info.theme'/>
|
||||
</a>
|
||||
|
||||
<div id="main" class="inner30">
|
||||
<div v-if="tabFixed">
|
||||
<div class="height-60"></div>
|
||||
@@ -59,7 +66,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt30 relative bg-fff inner40 pr30 overflowhidden box-shadow-lightGray ulib-r20" v-if="lineChart && lineChart.title">
|
||||
<div class="mt30 relative bg-fff inner40 pr30 overflowhidden box-shadow-lightGray ulib-r20 z-index-0" v-if="lineChart && lineChart.title">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="lineChart.title"></b>
|
||||
</div>
|
||||
@@ -92,7 +99,7 @@
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt30 relative bg-fff inner40 pr30 overflowhidden box-shadow-lightGray ulib-r20" v-if="lineChart && lineChart.title">
|
||||
<div class="mt30 relative bg-fff inner40 pr30 overflowhidden box-shadow-lightGray ulib-r20 z-index-0" v-if="lineChart && lineChart.title">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="lineChart.title"></b>
|
||||
</div>
|
||||
@@ -145,7 +152,7 @@
|
||||
</mugen-scroll>
|
||||
</div>
|
||||
<!-- end 实时动态-->
|
||||
|
||||
<!--
|
||||
<div class="fixed left-0 bottom-0 right-0 pt20 pb30 bg-fff-op95 text-center font-22 fn-flex" >
|
||||
<a class="fn-flex-item" href="/h5/market/sylive2/stic">
|
||||
<img class="imgsize-50X50" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-home-ac.png" alt="#">
|
||||
@@ -160,6 +167,8 @@
|
||||
<div class="space-nowrap con-min60 font-22">排行</div>
|
||||
</a>
|
||||
</div>
|
||||
-->
|
||||
<?$this->load->view('h5/market/sylive2/nav_biz')?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -234,6 +243,15 @@
|
||||
this.getBegin()
|
||||
}
|
||||
// this.getBegin()
|
||||
if (window.history && window.history.pushState) {
|
||||
$(window).on('popstate', function () {
|
||||
// 当点击浏览器的 后退和前进按钮 时才会被触发,
|
||||
window.history.pushState('forward', null, '');
|
||||
window.history.forward(1);
|
||||
});
|
||||
}
|
||||
window.history.pushState('forward', null, ''); //在IE中必须得有这两行
|
||||
window.history.forward(1);
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -451,8 +469,11 @@
|
||||
}, 100);
|
||||
},'json')
|
||||
|
||||
},
|
||||
//跳转活动页
|
||||
goAct(){
|
||||
window.location.replace('<?=$act_url?>')
|
||||
}
|
||||
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="pt30" v-if="kpi=='order' && goodsList">
|
||||
<select class="wp100 select-more ulib-r10 font-28" style="width: 100%" @change="changegoods">
|
||||
<select class="wp100 select-more ulib-r10 font-28" style="width: 100%" @change="changegoods" v-model="goodsId">
|
||||
<option value="">全部</option>
|
||||
<option :value="item.itemId" v-for="item in goodsList">{{item.title}}</option>
|
||||
</select>
|
||||
@@ -23,7 +23,9 @@
|
||||
<div class="pt20 pb20 fn-clear">
|
||||
<div class="fn-fl wp70 text-nowrap">
|
||||
<img class="imgsize-42X42 text-middle" v-if="item.ranking<4" :src="'https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-ranking-'+item.ranking+'.png'" alt="#" />
|
||||
<span class="inline-block w-50 text-center text-middle" v-else>{{item.ranking}}</span>
|
||||
<div class="inline-block relative imgsize-32X32 ml5 mr5 mb5 bg-ccc text-middle ulib-r750" v-else>
|
||||
<span class="absolute box-center-middle text-bold font-18 color-fff">{{item.ranking}}</span>
|
||||
</div>
|
||||
<span class="text-middle">{{item.name}}</span>
|
||||
<span class="inline-block pl10 pr10 line-height-15 text-middle bg-fe9538 font-22 color-fff ulib-r750" v-if="item.tip">{{item.tip}}</span>
|
||||
</div>
|
||||
@@ -56,7 +58,7 @@
|
||||
groups:<?=json_encode($groups,JSON_UNESCAPED_UNICODE)?>,
|
||||
index:<?=$params['index'] ? $params['index'] : 0?>,
|
||||
kpi:'<?=$params['kpi']?>',
|
||||
goodsId:0,
|
||||
goodsId:'<?=$params['itemId'] ? $params['itemId'] : 0?>',
|
||||
goodsList: <?=json_encode($goods,JSON_UNESCAPED_UNICODE)?>,
|
||||
},
|
||||
created(){
|
||||
|
||||
@@ -1,229 +1,112 @@
|
||||
<body class="bg-fff">
|
||||
<div class="height-500 fixed left-0 right-0 top-0 z-index-0 bg-1a1a1a"></div>
|
||||
<div class="bg-fff" id="app" ref="app">
|
||||
<div class="container pb130 bg-eee-fff">
|
||||
<div class="container pb130">
|
||||
<img class='block imgsize-750X340' :src='info.theme' />
|
||||
<div id="main"class="inner30">
|
||||
<div v-if="tabFixed">
|
||||
<div class="height-60"></div>
|
||||
<div class="fixed top-0 left-0 right-0 z-index-10 bg-fff pl30 pr30 pt20 pb20">
|
||||
<div class="relative height-60 ml50 mr50 fn-flex text-center">
|
||||
<div class="fn-flex-item" v-for="(item,index) in info.tab"><a :class="'relative inline-block tab-menu '+ [tabid == item.id?'font-36 active':'font-32']" @click="changeTab(item.id,index)" href="javascript:">{{item.title}}</a></div>
|
||||
<div :class="'glider glider-'+tabIndex"></div>
|
||||
<div class="relative height-70 ml50 mr50 fn-flex text-center" v-if="info.tab.length<5">
|
||||
<div class="fn-flex-item relative tab-menu2 pt10 pb10" :class="[tabid == item.id?'font-36 active':'font-28']" v-for="(item,index) in info.tab"><a class="relative inline-block" :class="[tabid == item.id?'':'pt10']" @click="changeTab(item.id,index)" href="javascript:">{{item.title}}</a></div>
|
||||
</div>
|
||||
<div class="relative height-70 space-nowrap text-center scroll-x" v-else>
|
||||
<div class="inline-block relative tab-menu2 pt10 pb10 pl25 pr25" :class="[tabid == item.id?'font-36 active':'font-28']" v-for="(item,index) in info.tab"><a class="relative inline-block" :class="[tabid == item.id?'':'pt10']" @click="changeTab(item.id,index)" href="javascript:">{{item.title}}</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="relative height-60 ml50 mr50 fn-flex text-center">
|
||||
<div class="fn-flex-item" v-for="(item,index) in info.tab"><a :class="'relative inline-block tab-menu '+ [tabid == item.id?'font-36 active':'font-32']" @click="changeTab(item.id,index)" href="javascript:">{{item.title}}</a></div>
|
||||
<div :class="'glider glider2-'+tabIndex"></div>
|
||||
</div>
|
||||
<!--预热阶段-->
|
||||
<div v-if="tabid==1">
|
||||
<div class="mt30 relative bg-fff inner40 pr30 overflowhidden box-shadow-lightGray ulib-r20">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="beginBrowse.title"></b>
|
||||
<div class="fn-fr">
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'beginBrowseGroup')">
|
||||
<option :value="key" v-for="(item,key) in info.group">{{item.title}}</option>
|
||||
</select>
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'beginBrowseDate')">
|
||||
<option :value="item" v-for="item in info.date">{{item}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pr10" v-if="beginBrowse.lists && beginBrowse.lists.length>0">
|
||||
<div class="font-32 color-666" v-for="(item,index) in beginBrowse.lists">
|
||||
<div class="inner20 fn-clear ulib-r20" :class="index==0?'bg-fff7f1':''">
|
||||
<a class="fn-fl block wp70 text-nowrap" :href="item.url">
|
||||
<img class="imgsize-42X42 text-middle" v-if="item.ranking<4" :src="'https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-ranking-'+item.ranking+'.png'" alt="#" />
|
||||
<span class="inline-block w-50 text-center text-middle" v-else>{{item.ranking}}</span>
|
||||
<span class="text-middle">{{item.name}}</span>
|
||||
<span class="inline-block pl10 pr10 line-height-15 text-middle bg-fe9538 font-22 color-fff ulib-r750" v-if="item.tip">{{item.tip}}</span>
|
||||
<!--
|
||||
<i class="iconfont icon-gengduo text-middle font-24 color-666"></i>
|
||||
-->
|
||||
</a>
|
||||
<div class="fn-fr">{{item.num}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="gengduo block absolute bottom-0 box-center pl10 text-center font-22 color-fff" :href="beginBrowse.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
</div>
|
||||
<div class="pt100 pb100 text-center font-32 color-666" v-else>暂时无数据</div>
|
||||
<div v-else>
|
||||
<div class="relative height-70 ml50 mr50 fn-flex text-center" v-if="info.tab.length<5">
|
||||
<div class="fn-flex-item relative tab-menu2 pt10 pb10" :class="[tabid == item.id?'font-36 active':'font-28']" v-for="(item,index) in info.tab"><a class="relative inline-block" :class="[tabid == item.id?'':'pt10']" @click="changeTab(item.id,index)" href="javascript:">{{item.title}}</a></div>
|
||||
</div>
|
||||
|
||||
<div class="mt30 relative bg-fff inner40 overflowhidden box-shadow-lightGray ulib-r20">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="beginBook.title"></b>
|
||||
<div class="fn-fr">
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'beginBookGroup')">
|
||||
<option :value="key" v-for="(item,key) in info.group">{{item.title}}</option>
|
||||
</select>
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'beginBookDate')">
|
||||
<option :value="item" v-for="item in info.date">{{item}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="beginBook.lists && beginBook.lists.length>0">
|
||||
<div class="font-32 color-666" v-for="(item,index) in beginBook.lists">
|
||||
<div class="inner20 fn-clear ulib-r20" :class="index==0?'bg-fff7f1':''">
|
||||
<a class="fn-fl block wp70 text-nowrap" :href="item.url">
|
||||
<img class="imgsize-42X42 text-middle" v-if="item.ranking<4" :src="'https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-ranking-'+item.ranking+'.png'" alt="#" />
|
||||
<span class="inline-block w-50 text-center text-middle" v-else>{{item.ranking}}</span>
|
||||
<span class="text-middle">{{item.name}}</span>
|
||||
<span class="inline-block pl10 pr10 line-height-15 text-middle bg-fe9538 font-22 color-fff ulib-r750" v-if="item.tip">{{item.tip}}</span>
|
||||
<!--
|
||||
<i class="iconfont icon-gengduo text-middle font-24 color-666"></i>
|
||||
-->
|
||||
</a>
|
||||
<div class="fn-fr">{{item.num}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="gengduo block absolute bottom-0 box-center pl10 text-center font-22 color-fff" :href="beginBook.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
</div>
|
||||
<div class="pt100 pb100 text-center font-32 color-666" v-else>暂时无数据</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- end 预热阶段-->
|
||||
<!--直播阶段-->
|
||||
<div v-if="tabid==2">
|
||||
|
||||
<div class="mt30 relative bg-fff inner40 pr30 overflowhidden box-shadow-lightGray ulib-r20">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="liveView.title"></b>
|
||||
<div class="fn-fr">
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'liveViewGroup')">
|
||||
<option :value="key" v-for="(item,key) in info.group">{{item.title}}</option>
|
||||
</select>
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'liveViewDate')">
|
||||
<option :value="item" v-for="item in info.date">{{item}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pr10" v-if="liveView.lists && liveView.lists.length>0">
|
||||
<div class="font-32 color-666" v-for="(item,index) in liveView.lists">
|
||||
<div class="inner20 fn-clear ulib-r20" :class="index==0?'bg-fff7f1':''">
|
||||
<a class="fn-fl block wp70 text-nowrap" :href="item.url">
|
||||
<img class="imgsize-42X42 text-middle" v-if="item.ranking<4" :src="'https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-ranking-'+item.ranking+'.png'" alt="#" />
|
||||
<span class="inline-block w-50 text-center text-middle" v-else>{{item.ranking}}</span>
|
||||
<span class="text-middle">{{item.name}}</span>
|
||||
<span class="inline-block pl10 pr10 line-height-15 text-middle bg-fe9538 font-22 color-fff ulib-r750" v-if="item.tip">{{item.tip}}</span>
|
||||
<!--
|
||||
<i class="iconfont icon-gengduo text-middle font-24 color-666"></i>
|
||||
-->
|
||||
</a>
|
||||
<div class="fn-fr">{{item.num}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="gengduo block absolute bottom-0 box-center pl10 text-center font-22 color-fff" :href="liveView.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
</div>
|
||||
<div class="pt100 pb100 text-center font-32 color-666" v-else>暂时无数据</div>
|
||||
</div>
|
||||
|
||||
<div class="mt30 relative bg-fff inner40 overflowhidden box-shadow-lightGray ulib-r20">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="liveOrder.title"></b>
|
||||
<div class="fn-fr">
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'liveOrderGroup')">
|
||||
<option :value="key" v-for="(item,key) in info.group">{{item.title}}</option>
|
||||
</select>
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'liveOrderDate')">
|
||||
<option :value="item" v-for="item in info.date">{{item}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="liveOrder.lists && liveOrder.lists.length>0">
|
||||
<div class="font-32 color-666" v-for="(item,index) in liveOrder.lists">
|
||||
<div class="inner20 fn-clear ulib-r20" :class="index==0?'bg-fff7f1':''">
|
||||
<a class="fn-fl block wp70 text-nowrap" :href="item.url">
|
||||
<img class="imgsize-42X42 text-middle" v-if="item.ranking<4" :src="'https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-ranking-'+item.ranking+'.png'" alt="#" />
|
||||
<span class="inline-block w-50 text-center text-middle" v-else>{{item.ranking}}</span>
|
||||
<span class="text-middle">{{item.name}}</span>
|
||||
<span class="inline-block pl10 pr10 line-height-15 text-middle bg-fe9538 font-22 color-fff ulib-r750" v-if="item.tip">{{item.tip}}</span>
|
||||
<!--
|
||||
<i class="iconfont icon-gengduo text-middle font-24 color-666"></i>
|
||||
-->
|
||||
</a>
|
||||
<div class="fn-fr">{{item.num}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="gengduo block absolute bottom-0 box-center pl10 text-center font-22 color-fff" :href="liveOrder.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
</div>
|
||||
<div class="pt100 pb100 text-center font-32 color-666" v-else>暂时无数据</div>
|
||||
<div class="relative height-70 space-nowrap text-center scroll-x" v-else>
|
||||
<div class="inline-block relative tab-menu2 pt10 pb10 pl25 pr25" :class="[tabid == item.id?'font-36 active':'font-28']" v-for="(item,index) in info.tab"><a class="relative inline-block" :class="[tabid == item.id?'':'pt10']" @click="changeTab(item.id,index)" href="javascript:">{{item.title}}</a></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end 直播阶段-->
|
||||
|
||||
<div class="mt30 bg-fff7f1 pt15 pb15 overflowhidden text-center font-22 color-ff9d47 ulib-r750" v-if="tabid==3">温馨提示:直播结束后6小时同步数据</div>
|
||||
|
||||
<div class="mt30 relative bg-fff inner40 pr30 overflowhidden box-shadow-lightGray ulib-r20">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="statistical.title"></b>
|
||||
<div class="fn-fr">
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'group')">
|
||||
<option :value="key" v-for="(item,key) in info.group">{{item.title}}</option>
|
||||
</select>
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'date')">
|
||||
<option :value="item" v-for="item in info.date">{{item}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="tabid==4">
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'goods')" style="width: 100%">
|
||||
<option value="0">全部</option>
|
||||
<option :value="item.itemId" v-for="item in info.goods">{{item.title}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="pr10" v-if="statistical.lists && statistical.lists.length>0">
|
||||
<div class="height-500 relative overflowhidden">
|
||||
<div id="pieChartBox" class="height-500"></div>
|
||||
</div>
|
||||
<div class="font-32 color-666" v-for="(item,index) in statistical.lists">
|
||||
<div class="inner20 fn-clear ulib-r20" :class="index==0?'bg-fff7f1':''">
|
||||
<a class="fn-fl block wp70 text-nowrap" :href="item.url">
|
||||
<img class="imgsize-42X42 text-middle" v-if="item.ranking<4" :src="'https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-ranking-'+item.ranking+'.png'" alt="#" />
|
||||
<div class="inline-block relative imgsize-32X32 ml5 mr5 mb5 bg-ccc text-middle ulib-r750" v-else>
|
||||
<span class="absolute box-center-middle text-bold font-18 color-fff">{{item.ranking}}</span>
|
||||
</div>
|
||||
<span class="text-middle">{{item.name}}</span>
|
||||
<span class="inline-block pl10 pr10 line-height-15 text-middle bg-fe9538 font-22 color-fff ulib-r750" v-if="item.tip">{{item.tip}}</span>
|
||||
<!--
|
||||
<i class="iconfont icon-gengduo text-middle font-24 color-666"></i>
|
||||
-->
|
||||
</a>
|
||||
<div class="fn-fr">{{item.num}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="gengduo block absolute bottom-0 box-center pl10 text-center font-22 color-fff" :href="statistical.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
</div>
|
||||
<div class="pt100 pb100 text-center font-32 color-666" v-else>暂时无数据</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="fixed left-0 bottom-0 right-0 pt20 pb30 bg-fff-op95 text-center font-22 fn-flex" >
|
||||
<a class="fn-flex-item" href="/h5/market/sylive2/stic">
|
||||
<img class="imgsize-50X50" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-home-ac.png" alt="#">
|
||||
<div class="space-nowrap con-min60 font-22">首页</div>
|
||||
</a>
|
||||
<a class="fn-flex-item" href="<?=$act_url?>">
|
||||
<img class="imgsize-50X50" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-activity.png" alt="#">
|
||||
<div class="space-nowrap con-min60 font-22">活动</div>
|
||||
</a>
|
||||
<a class="fn-flex-item" href="/h5/market/sylive2/stic/ranking">
|
||||
<img class="imgsize-50X50" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-ranking.png" alt="#">
|
||||
<div class="space-nowrap con-min60 font-22">排行</div>
|
||||
</a>
|
||||
</div>
|
||||
<?$this->load->view('h5/market/sylive2/nav_biz')?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/echarts.min.js?20221213"></script>
|
||||
<script>
|
||||
let hostUrl = ''
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
tabFixed:false,
|
||||
tabIndex:0,
|
||||
tabid:'1',//1预热阶段 /2直播阶段
|
||||
info:'',
|
||||
info:{
|
||||
tab:[],
|
||||
},
|
||||
loading: false,
|
||||
beginBrowseDate:0,
|
||||
beginBrowseGroup:0,
|
||||
beginBookDate:0,
|
||||
beginBookGroup:0,
|
||||
beginBrowse:{
|
||||
date:0,
|
||||
group:0,
|
||||
statistical:{
|
||||
title:'',
|
||||
url:'',
|
||||
list:[],
|
||||
},
|
||||
beginBook:{
|
||||
title:'',
|
||||
url:'',
|
||||
list:[],
|
||||
},
|
||||
liveViewDate:0,
|
||||
liveViewGroup:0,
|
||||
liveOrderDate:0,
|
||||
liveOrderGroup:0,
|
||||
liveView:{
|
||||
title:'',
|
||||
url:'',
|
||||
list:[],
|
||||
},
|
||||
liveOrder:{
|
||||
title:'',
|
||||
url:'',
|
||||
list:[],
|
||||
},
|
||||
time1:''
|
||||
kpi: 'browse',
|
||||
itemId:0,
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('scroll', this.handleScroll, true)
|
||||
this.getInfo()
|
||||
this.getBeginBrowse()
|
||||
this.getBeginBook()
|
||||
},
|
||||
//离开页面时
|
||||
destroyed () {
|
||||
window.removeEventListener('scroll', this.handleScroll)
|
||||
},
|
||||
methods: {
|
||||
|
||||
//判断导航是否需要吸顶
|
||||
handleScroll () {
|
||||
let scrollTop = document.querySelector('#app').scrollTop
|
||||
@@ -242,16 +125,30 @@
|
||||
tab:[
|
||||
{
|
||||
id:'1',
|
||||
title:'预热阶段',
|
||||
kpi:'browse',
|
||||
title:'浏览',
|
||||
},
|
||||
{
|
||||
id:'2',
|
||||
title:'直播阶段',
|
||||
kpi:'subscribe',
|
||||
title:'预约',
|
||||
},
|
||||
{
|
||||
id:'3',
|
||||
kpi:'watch',
|
||||
title:'观看',
|
||||
},
|
||||
{
|
||||
id:'4',
|
||||
kpi:'order',
|
||||
title:'订单',
|
||||
},
|
||||
],
|
||||
date:<?=json_encode($day_list,JSON_UNESCAPED_UNICODE)?>,
|
||||
group:<?=json_encode($groups,JSON_UNESCAPED_UNICODE)?>,
|
||||
goods:<?=json_encode($goods,JSON_UNESCAPED_UNICODE)?>
|
||||
}
|
||||
this.getStatisticalData()
|
||||
},
|
||||
|
||||
//tab切换
|
||||
@@ -262,157 +159,133 @@
|
||||
$('html,body').animate({scrollTop: mainoffsetTop+5},500);
|
||||
}
|
||||
this.tabid = id
|
||||
this.tabIndex = index
|
||||
if(this.tabid == 1){
|
||||
this.beginBrowseDate = 0
|
||||
this.beginBrowseGroup = 0
|
||||
this.beginBookDate = 0
|
||||
this.beginBookGroup = 0
|
||||
this.getBeginBrowse()
|
||||
this.getBeginBook()
|
||||
}else if(this.tabid == 2){
|
||||
this.liveViewDate = 0
|
||||
this.liveViewGroup = 0
|
||||
this.liveOrderDate = 0
|
||||
this.liveOrderGroup = 0
|
||||
this.getLiveView()
|
||||
this.getLiveOrder()
|
||||
}
|
||||
this.kpi = this.info.tab[index]['kpi']
|
||||
$('#pieChartBox').hide()
|
||||
this.getStatisticalData()
|
||||
}
|
||||
},
|
||||
|
||||
//预热阶段浏览数据
|
||||
getBeginBrowse(){
|
||||
getStatisticalData(){
|
||||
let that=this;
|
||||
var type = this.info.group[this.beginBrowseGroup]['type']
|
||||
var value = this.info.group[this.beginBrowseGroup]['value']
|
||||
//请求接口
|
||||
var params = {
|
||||
'kpi':'browse',
|
||||
'type':type,
|
||||
'value':value,
|
||||
'index':this.beginBrowseGroup,
|
||||
'day':this.beginBrowseDate
|
||||
if (!that.loading) {
|
||||
that.loading = true;
|
||||
//请求接口
|
||||
var type = this.info.group[this.group]['type']
|
||||
var value = this.info.group[this.group]['value']
|
||||
var params = {
|
||||
'kpi':this.kpi,
|
||||
'type':type,
|
||||
'value':value,
|
||||
'index':this.group,
|
||||
'day':this.date
|
||||
}
|
||||
if(that.tabid==4){
|
||||
params['itemId'] = this.itemId
|
||||
}
|
||||
$.get('/h5/market/sylive2/stic/ajax_rank',params,function (res){
|
||||
that.loading = false;
|
||||
that.statistical = res.data;
|
||||
if(res.data.pieChart){
|
||||
that.initchart('pieChartBox',res.data.pieChart)
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
$.get('/h5/market/sylive2/stic/ajax_rank',params,function (res){
|
||||
that.beginBrowse = res.data;
|
||||
},'json');
|
||||
},
|
||||
|
||||
//预热阶段预约数据
|
||||
getBeginBook(){
|
||||
let that=this;
|
||||
var type = this.info.group[this.beginBookGroup]['type']
|
||||
var value = this.info.group[this.beginBookGroup]['value']
|
||||
var params = {
|
||||
'kpi':'subscribe',
|
||||
'type':type,
|
||||
'value':value,
|
||||
'index':this.beginBookGroup,
|
||||
'day':this.beginBookDate
|
||||
}
|
||||
$.get('/h5/market/sylive2/stic/ajax_rank',params,function (res){
|
||||
that.beginBook = res.data;
|
||||
},'json');
|
||||
},
|
||||
|
||||
//直播阶段观看数据
|
||||
getLiveView(){
|
||||
let that=this;
|
||||
var type = this.info.group[this.liveViewGroup]['type']
|
||||
var value = this.info.group[this.liveViewGroup]['value']
|
||||
var params = {
|
||||
'kpi':'watch',
|
||||
'type':type,
|
||||
'value':value,
|
||||
'index':this.liveViewGroup,
|
||||
'day':this.liveViewDate
|
||||
}
|
||||
$.get('/h5/market/sylive2/stic/ajax_rank',params,function (res){
|
||||
that.liveView = res.data;
|
||||
},'json');
|
||||
},
|
||||
|
||||
//预热阶段订单数据
|
||||
getLiveOrder(){
|
||||
let that=this;
|
||||
var type = this.info.group[this.liveOrderGroup]['type']
|
||||
var value = this.info.group[this.liveOrderGroup]['value']
|
||||
var params = {
|
||||
'kpi':'order',
|
||||
'type':type,
|
||||
'value':value,
|
||||
'index':this.liveOrderGroup,
|
||||
'day':this.liveOrderDate
|
||||
}
|
||||
$.get('/h5/market/sylive2/stic/ajax_rank',params,function (res){
|
||||
that.liveOrder = res.data;
|
||||
},'json');
|
||||
},
|
||||
|
||||
//选择条件
|
||||
handleChange(e,key){
|
||||
console.log(e)
|
||||
switch (key) {
|
||||
case 'beginBrowseDate':
|
||||
if(this.beginBrowseDate != e.target.value){
|
||||
this.beginBrowseDate = e.target.value
|
||||
console.log(key)
|
||||
this.getBeginBrowse()
|
||||
case 'date':
|
||||
if(this.date != e.target.value){
|
||||
this.date = e.target.value
|
||||
$('#pieChartBox').hide()
|
||||
this.getStatisticalData()
|
||||
}
|
||||
break;
|
||||
case 'beginBrowseGroup':
|
||||
if(this.beginBrowseGroup != e.target.value){
|
||||
this.beginBrowseGroup = e.target.value
|
||||
console.log(key)
|
||||
this.getBeginBrowse()
|
||||
case 'group':
|
||||
if(this.group != e.target.value){
|
||||
this.group = e.target.value
|
||||
$('#pieChartBox').hide()
|
||||
this.getStatisticalData()
|
||||
}
|
||||
break;
|
||||
case 'beginBookDate':
|
||||
if(this.beginBookDate != e.target.value){
|
||||
this.beginBookDate = e.target.value
|
||||
console.log(key)
|
||||
this.getBeginBook()
|
||||
}
|
||||
break;
|
||||
case 'beginBookGroup':
|
||||
if(this.beginBookGroup != e.target.value){
|
||||
this.beginBookGroup = e.target.value
|
||||
console.log(key)
|
||||
this.getBeginBook()
|
||||
}
|
||||
break;
|
||||
case 'liveViewDate':
|
||||
if(this.liveViewDate != e.target.value){
|
||||
this.liveViewDate = e.target.value
|
||||
console.log(key)
|
||||
this.getLiveView()
|
||||
}
|
||||
break;
|
||||
case 'liveViewGroup':
|
||||
if(this.liveViewGroup != e.target.value){
|
||||
this.liveViewGroup = e.target.value
|
||||
console.log(key)
|
||||
this.getLiveView()
|
||||
}
|
||||
break;
|
||||
case 'liveOrderDate':
|
||||
if(this.liveOrderDate != e.target.value){
|
||||
this.liveOrderDate = e.target.value
|
||||
console.log(key)
|
||||
this.getLiveOrder()
|
||||
}
|
||||
break;
|
||||
case 'liveOrderGroup':
|
||||
if(this.liveOrderGroup != e.target.value){
|
||||
this.liveOrderGroup = e.target.value
|
||||
console.log(key)
|
||||
this.getLiveOrder()
|
||||
case 'goods':
|
||||
if(this.itemId != e.target.value){
|
||||
this.itemId = e.target.value
|
||||
$('#pieChartBox').hide()
|
||||
this.getStatisticalData()
|
||||
}
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
//初始化表格
|
||||
initchart(obj,pieChart){
|
||||
setTimeout(function () {
|
||||
$('#'+obj).show()
|
||||
let dom = document.getElementById(obj);
|
||||
let myChart = echarts.init(dom, null, {
|
||||
renderer: 'canvas',
|
||||
useDirtyRect: false
|
||||
});
|
||||
let option;
|
||||
option = {
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{b}: {c} ({d}%)'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
bottom:'12%',
|
||||
radius: ['25%', '50%'],
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
labelLine: {
|
||||
fontSize:5,
|
||||
length:10
|
||||
},
|
||||
label: {
|
||||
formatter: '{b| {b} }{abg|}\n{hr|}\n{c| {c}({d}%) }',
|
||||
backgroundColor: '#F6F8FC',
|
||||
borderColor: '#8C8D8E',
|
||||
borderWidth: 1,
|
||||
borderRadius: 4,
|
||||
rich: {
|
||||
hr: {
|
||||
borderColor: '#8C8D8E',
|
||||
width: '100%',
|
||||
borderWidth: 1,
|
||||
height: 0
|
||||
},
|
||||
b: {
|
||||
color: '#4C5058',
|
||||
fontSize:10,
|
||||
lineHeight:20,
|
||||
align: 'center',
|
||||
},
|
||||
c: {
|
||||
color: '#4C5058',
|
||||
fontSize:8,
|
||||
lineHeight:20,
|
||||
align: 'center',
|
||||
},
|
||||
}
|
||||
},
|
||||
data:pieChart
|
||||
}
|
||||
]
|
||||
};
|
||||
if (option && typeof option === 'object') {
|
||||
myChart.setOption(option);
|
||||
}
|
||||
window.addEventListener('resize', myChart.resize);
|
||||
}, 200);
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,501 @@
|
||||
<body class="bg-fff">
|
||||
<div class="height-500 fixed left-0 right-0 top-0 z-index-0 bg-1a1a1a"></div>
|
||||
<div class="bg-fff" id="app" ref="app">
|
||||
<div class="container pb130 bg-eee-fff">
|
||||
<img class='block imgsize-750X340' :src='info.theme' />
|
||||
<div id="main"class="inner30">
|
||||
<div v-if="tabFixed">
|
||||
<div class="height-60"></div>
|
||||
<div class="fixed top-0 left-0 right-0 z-index-10 bg-fff pl30 pr30 pt20 pb20">
|
||||
<div class="relative height-60 ml50 mr50 fn-flex text-center">
|
||||
<div class="fn-flex-item" v-for="(item,index) in info.tab"><a :class="'relative inline-block tab-menu '+ [tabid == item.id?'font-36 active':'font-32']" @click="changeTab(item.id,index)" href="javascript:">{{item.title}}</a></div>
|
||||
<div :class="'glider glider-'+tabIndex"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="relative height-60 ml50 mr50 fn-flex text-center">
|
||||
<div class="fn-flex-item" v-for="(item,index) in info.tab"><a :class="'relative inline-block tab-menu '+ [tabid == item.id?'font-36 active':'font-32']" @click="changeTab(item.id,index)" href="javascript:">{{item.title}}</a></div>
|
||||
<div :class="'glider glider2-'+tabIndex"></div>
|
||||
</div>
|
||||
<!--预热阶段-->
|
||||
<div v-if="tabid==1">
|
||||
<div class="mt30 relative bg-fff inner40 pr30 overflowhidden box-shadow-lightGray ulib-r20">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="beginBrowse.title"></b>
|
||||
<div class="fn-fr">
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'beginBrowseGroup')">
|
||||
<option :value="key" v-for="(item,key) in info.group">{{item.title}}</option>
|
||||
</select>
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'beginBrowseDate')">
|
||||
<option :value="item" v-for="item in info.date">{{item}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pr10" v-if="beginBrowse.lists && beginBrowse.lists.length>0">
|
||||
<div class="height-500 relative overflowhidden">
|
||||
<div id="beginBrowseChart" class="height-500"></div>
|
||||
</div>
|
||||
<div class="font-32 color-666" v-for="(item,index) in beginBrowse.lists">
|
||||
<div class="inner20 fn-clear ulib-r20" :class="index==0?'bg-fff7f1':''">
|
||||
<a class="fn-fl block wp70 text-nowrap" :href="item.url">
|
||||
<img class="imgsize-42X42 text-middle" v-if="item.ranking<4" :src="'https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-ranking-'+item.ranking+'.png'" alt="#" />
|
||||
<span class="inline-block w-50 text-center text-middle" v-else>{{item.ranking}}</span>
|
||||
<span class="text-middle">{{item.name}}</span>
|
||||
<span class="inline-block pl10 pr10 line-height-15 text-middle bg-fe9538 font-22 color-fff ulib-r750" v-if="item.tip">{{item.tip}}</span>
|
||||
<!--
|
||||
<i class="iconfont icon-gengduo text-middle font-24 color-666"></i>
|
||||
-->
|
||||
</a>
|
||||
<div class="fn-fr">{{item.num}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="gengduo block absolute bottom-0 box-center pl10 text-center font-22 color-fff" :href="beginBrowse.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
</div>
|
||||
<div class="pt100 pb100 text-center font-32 color-666" v-else>暂时无数据</div>
|
||||
</div>
|
||||
|
||||
<div class="mt30 relative bg-fff inner40 overflowhidden box-shadow-lightGray ulib-r20">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="beginBook.title"></b>
|
||||
<div class="fn-fr">
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'beginBookGroup')">
|
||||
<option :value="key" v-for="(item,key) in info.group">{{item.title}}</option>
|
||||
</select>
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'beginBookDate')">
|
||||
<option :value="item" v-for="item in info.date">{{item}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="beginBook.lists && beginBook.lists.length>0">
|
||||
<div class="height-500 relative overflowhidden">
|
||||
<div id="beginBookChart" class="height-500"></div>
|
||||
</div>
|
||||
<div class="font-32 color-666" v-for="(item,index) in beginBook.lists">
|
||||
<div class="inner20 fn-clear ulib-r20" :class="index==0?'bg-fff7f1':''">
|
||||
<a class="fn-fl block wp70 text-nowrap" :href="item.url">
|
||||
<img class="imgsize-42X42 text-middle" v-if="item.ranking<4" :src="'https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-ranking-'+item.ranking+'.png'" alt="#" />
|
||||
<span class="inline-block w-50 text-center text-middle" v-else>{{item.ranking}}</span>
|
||||
<span class="text-middle">{{item.name}}</span>
|
||||
<span class="inline-block pl10 pr10 line-height-15 text-middle bg-fe9538 font-22 color-fff ulib-r750" v-if="item.tip">{{item.tip}}</span>
|
||||
<!--
|
||||
<i class="iconfont icon-gengduo text-middle font-24 color-666"></i>
|
||||
-->
|
||||
</a>
|
||||
<div class="fn-fr">{{item.num}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="gengduo block absolute bottom-0 box-center pl10 text-center font-22 color-fff" :href="beginBook.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
</div>
|
||||
<div class="pt100 pb100 text-center font-32 color-666" v-else>暂时无数据</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- end 预热阶段-->
|
||||
<!--直播阶段-->
|
||||
<div v-if="tabid==2">
|
||||
<div class="mt30 bg-fff7f1 pt15 pb15 overflowhidden text-center font-22 color-ff9d47 ulib-r750">温馨提示:直播结束后6小时同步数据</div>
|
||||
<div class="mt30 relative bg-fff inner40 pr30 overflowhidden box-shadow-lightGray ulib-r20">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="liveView.title"></b>
|
||||
<div class="fn-fr">
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'liveViewGroup')">
|
||||
<option :value="key" v-for="(item,key) in info.group">{{item.title}}</option>
|
||||
</select>
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'liveViewDate')">
|
||||
<option :value="item" v-for="item in info.date">{{item}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pr10" v-if="liveView.lists && liveView.lists.length>0">
|
||||
<div class="height-500 relative overflowhidden">
|
||||
<div id="liveViewChart" class="height-500"></div>
|
||||
</div>
|
||||
<div class="font-32 color-666" v-for="(item,index) in liveView.lists">
|
||||
<div class="inner20 fn-clear ulib-r20" :class="index==0?'bg-fff7f1':''">
|
||||
<a class="fn-fl block wp70 text-nowrap" :href="item.url">
|
||||
<img class="imgsize-42X42 text-middle" v-if="item.ranking<4" :src="'https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-ranking-'+item.ranking+'.png'" alt="#" />
|
||||
<span class="inline-block w-50 text-center text-middle" v-else>{{item.ranking}}</span>
|
||||
<span class="text-middle">{{item.name}}</span>
|
||||
<span class="inline-block pl10 pr10 line-height-15 text-middle bg-fe9538 font-22 color-fff ulib-r750" v-if="item.tip">{{item.tip}}</span>
|
||||
<!--
|
||||
<i class="iconfont icon-gengduo text-middle font-24 color-666"></i>
|
||||
-->
|
||||
</a>
|
||||
<div class="fn-fr">{{item.num}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="gengduo block absolute bottom-0 box-center pl10 text-center font-22 color-fff" :href="liveView.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
</div>
|
||||
<div class="pt100 pb100 text-center font-32 color-666" v-else>暂时无数据</div>
|
||||
</div>
|
||||
|
||||
<div class="mt30 relative bg-fff inner40 overflowhidden box-shadow-lightGray ulib-r20">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="liveOrder.title"></b>
|
||||
<div class="fn-fr">
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'liveOrderGroup')">
|
||||
<option :value="key" v-for="(item,key) in info.group">{{item.title}}</option>
|
||||
</select>
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'liveOrderDate')">
|
||||
<option :value="item" v-for="item in info.date">{{item}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="liveOrder.lists && liveOrder.lists.length>0">
|
||||
<div class="height-500 relative overflowhidden">
|
||||
<div id="liveOrderChart" class="height-500"></div>
|
||||
</div>
|
||||
<div class="font-32 color-666" v-for="(item,index) in liveOrder.lists">
|
||||
<div class="inner20 fn-clear ulib-r20" :class="index==0?'bg-fff7f1':''">
|
||||
<a class="fn-fl block wp70 text-nowrap" :href="item.url">
|
||||
<img class="imgsize-42X42 text-middle" v-if="item.ranking<4" :src="'https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-ranking-'+item.ranking+'.png'" alt="#" />
|
||||
<span class="inline-block w-50 text-center text-middle" v-else>{{item.ranking}}</span>
|
||||
<span class="text-middle">{{item.name}}</span>
|
||||
<span class="inline-block pl10 pr10 line-height-15 text-middle bg-fe9538 font-22 color-fff ulib-r750" v-if="item.tip">{{item.tip}}</span>
|
||||
<!--
|
||||
<i class="iconfont icon-gengduo text-middle font-24 color-666"></i>
|
||||
-->
|
||||
</a>
|
||||
<div class="fn-fr">{{item.num}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="gengduo block absolute bottom-0 box-center pl10 text-center font-22 color-fff" :href="liveOrder.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
</div>
|
||||
<div class="pt100 pb100 text-center font-32 color-666" v-else>暂时无数据</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end 直播阶段-->
|
||||
</div>
|
||||
|
||||
<?$this->load->view('h5/market/sylive2/nav_biz')?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/echarts.min.js?20221213"></script>
|
||||
<script>
|
||||
let hostUrl = ''
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
tabFixed:false,
|
||||
tabIndex:0,
|
||||
tabid:'1',//1预热阶段 /2直播阶段
|
||||
info:'',
|
||||
loading: false,
|
||||
beginBrowseDate:0,
|
||||
beginBrowseGroup:0,
|
||||
beginBookDate:0,
|
||||
beginBookGroup:0,
|
||||
beginBrowse:{
|
||||
title:'',
|
||||
url:'',
|
||||
list:[],
|
||||
},
|
||||
beginBook:{
|
||||
title:'',
|
||||
url:'',
|
||||
list:[],
|
||||
},
|
||||
liveViewDate:0,
|
||||
liveViewGroup:0,
|
||||
liveOrderDate:0,
|
||||
liveOrderGroup:0,
|
||||
liveView:{
|
||||
title:'',
|
||||
url:'',
|
||||
list:[],
|
||||
},
|
||||
liveOrder:{
|
||||
title:'',
|
||||
url:'',
|
||||
list:[],
|
||||
},
|
||||
time1:''
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('scroll', this.handleScroll, true)
|
||||
this.getInfo()
|
||||
this.getBeginBrowse()
|
||||
this.getBeginBook()
|
||||
},
|
||||
//离开页面时
|
||||
destroyed () {
|
||||
window.removeEventListener('scroll', this.handleScroll)
|
||||
},
|
||||
methods: {
|
||||
//判断导航是否需要吸顶
|
||||
handleScroll () {
|
||||
let scrollTop = document.querySelector('#app').scrollTop
|
||||
let mainoffsetTop = document.querySelector('#main').offsetTop
|
||||
if (scrollTop > mainoffsetTop) {
|
||||
this.tabFixed = true
|
||||
} else {
|
||||
this.tabFixed = false
|
||||
}
|
||||
},
|
||||
|
||||
//获取基础信息
|
||||
getInfo(){
|
||||
this.info = {
|
||||
theme:'<?=$info['banner']?>',
|
||||
tab:[
|
||||
{
|
||||
id:'1',
|
||||
title:'预热阶段',
|
||||
},
|
||||
{
|
||||
id:'2',
|
||||
title:'直播阶段',
|
||||
},
|
||||
],
|
||||
date:<?=json_encode($day_list,JSON_UNESCAPED_UNICODE)?>,
|
||||
group:<?=json_encode($groups,JSON_UNESCAPED_UNICODE)?>,
|
||||
}
|
||||
},
|
||||
|
||||
//tab切换
|
||||
changeTab(id,index){
|
||||
if(id != this.tabid&&!this.loading){
|
||||
if(this.tabFixed){
|
||||
let mainoffsetTop = document.querySelector('#main').offsetTop
|
||||
$('html,body').animate({scrollTop: mainoffsetTop+5},500);
|
||||
}
|
||||
this.tabid = id
|
||||
this.tabIndex = index
|
||||
$('#beginBrowseChart').hide()
|
||||
$('#beginBookChart').hide()
|
||||
$('#liveViewChart').hide()
|
||||
$('#liveOrderChart').hide()
|
||||
if(this.tabid == 1){
|
||||
this.beginBrowseDate = 0
|
||||
this.beginBrowseGroup = 0
|
||||
this.beginBookDate = 0
|
||||
this.beginBookGroup = 0
|
||||
this.getBeginBrowse()
|
||||
this.getBeginBook()
|
||||
}else if(this.tabid == 2){
|
||||
this.liveViewDate = 0
|
||||
this.liveViewGroup = 0
|
||||
this.liveOrderDate = 0
|
||||
this.liveOrderGroup = 0
|
||||
this.getLiveView()
|
||||
this.getLiveOrder()
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
//预热阶段浏览数据
|
||||
getBeginBrowse(){
|
||||
let that=this;
|
||||
var type = this.info.group[this.beginBrowseGroup]['type']
|
||||
var value = this.info.group[this.beginBrowseGroup]['value']
|
||||
//请求接口
|
||||
var params = {
|
||||
'kpi':'browse',
|
||||
'type':type,
|
||||
'value':value,
|
||||
'index':this.beginBrowseGroup,
|
||||
'day':this.beginBrowseDate
|
||||
}
|
||||
$.get('/h5/market/sylive2/stic/ajax_rank',params,function (res){
|
||||
that.beginBrowse = res.data;
|
||||
if(res.data.pieChart){
|
||||
that.initchart('beginBrowseChart',res.data.pieChart)
|
||||
}
|
||||
},'json');
|
||||
},
|
||||
|
||||
//预热阶段预约数据
|
||||
getBeginBook(){
|
||||
let that=this;
|
||||
var type = this.info.group[this.beginBookGroup]['type']
|
||||
var value = this.info.group[this.beginBookGroup]['value']
|
||||
var params = {
|
||||
'kpi':'subscribe',
|
||||
'type':type,
|
||||
'value':value,
|
||||
'index':this.beginBookGroup,
|
||||
'day':this.beginBookDate
|
||||
}
|
||||
$.get('/h5/market/sylive2/stic/ajax_rank',params,function (res){
|
||||
that.beginBook = res.data;
|
||||
if(res.data.pieChart){
|
||||
that.initchart('beginBookChart',res.data.pieChart)
|
||||
}
|
||||
},'json');
|
||||
},
|
||||
|
||||
//直播阶段观看数据
|
||||
getLiveView(){
|
||||
let that=this;
|
||||
var type = this.info.group[this.liveViewGroup]['type']
|
||||
var value = this.info.group[this.liveViewGroup]['value']
|
||||
var params = {
|
||||
'kpi':'watch',
|
||||
'type':type,
|
||||
'value':value,
|
||||
'index':this.liveViewGroup,
|
||||
'day':this.liveViewDate
|
||||
}
|
||||
$.get('/h5/market/sylive2/stic/ajax_rank',params,function (res){
|
||||
that.liveView = res.data;
|
||||
if(res.data.pieChart){
|
||||
that.initchart('liveViewChart',res.data.pieChart)
|
||||
}
|
||||
},'json');
|
||||
},
|
||||
|
||||
//预热阶段订单数据
|
||||
getLiveOrder(){
|
||||
let that=this;
|
||||
var type = this.info.group[this.liveOrderGroup]['type']
|
||||
var value = this.info.group[this.liveOrderGroup]['value']
|
||||
var params = {
|
||||
'kpi':'order',
|
||||
'type':type,
|
||||
'value':value,
|
||||
'index':this.liveOrderGroup,
|
||||
'day':this.liveOrderDate
|
||||
}
|
||||
$.get('/h5/market/sylive2/stic/ajax_rank',params,function (res){
|
||||
that.liveOrder = res.data;
|
||||
if(res.data.pieChart){
|
||||
that.initchart('liveOrderChart',res.data.pieChart)
|
||||
}
|
||||
},'json');
|
||||
},
|
||||
|
||||
//选择条件
|
||||
handleChange(e,key){
|
||||
console.log(e)
|
||||
switch (key) {
|
||||
case 'beginBrowseDate':
|
||||
if(this.beginBrowseDate != e.target.value){
|
||||
this.beginBrowseDate = e.target.value
|
||||
console.log(key)
|
||||
this.getBeginBrowse()
|
||||
}
|
||||
break;
|
||||
case 'beginBrowseGroup':
|
||||
if(this.beginBrowseGroup != e.target.value){
|
||||
this.beginBrowseGroup = e.target.value
|
||||
console.log(key)
|
||||
this.getBeginBrowse()
|
||||
}
|
||||
break;
|
||||
case 'beginBookDate':
|
||||
if(this.beginBookDate != e.target.value){
|
||||
this.beginBookDate = e.target.value
|
||||
console.log(key)
|
||||
this.getBeginBook()
|
||||
}
|
||||
break;
|
||||
case 'beginBookGroup':
|
||||
if(this.beginBookGroup != e.target.value){
|
||||
this.beginBookGroup = e.target.value
|
||||
console.log(key)
|
||||
this.getBeginBook()
|
||||
}
|
||||
break;
|
||||
case 'liveViewDate':
|
||||
if(this.liveViewDate != e.target.value){
|
||||
this.liveViewDate = e.target.value
|
||||
console.log(key)
|
||||
this.getLiveView()
|
||||
}
|
||||
break;
|
||||
case 'liveViewGroup':
|
||||
if(this.liveViewGroup != e.target.value){
|
||||
this.liveViewGroup = e.target.value
|
||||
console.log(key)
|
||||
this.getLiveView()
|
||||
}
|
||||
break;
|
||||
case 'liveOrderDate':
|
||||
if(this.liveOrderDate != e.target.value){
|
||||
this.liveOrderDate = e.target.value
|
||||
console.log(key)
|
||||
this.getLiveOrder()
|
||||
}
|
||||
break;
|
||||
case 'liveOrderGroup':
|
||||
if(this.liveOrderGroup != e.target.value){
|
||||
this.liveOrderGroup = e.target.value
|
||||
console.log(key)
|
||||
this.getLiveOrder()
|
||||
}
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
//初始化表格
|
||||
initchart(obj,pieChart){
|
||||
setTimeout(function () {
|
||||
$('#'+obj).show()
|
||||
let dom = document.getElementById(obj);
|
||||
let myChart = echarts.init(dom, null, {
|
||||
renderer: 'canvas',
|
||||
useDirtyRect: false
|
||||
});
|
||||
let option;
|
||||
option = {
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{b}: {c} ({d}%)'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
bottom:'12%',
|
||||
radius: ['25%', '50%'],
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
labelLine: {
|
||||
fontSize:5,
|
||||
length:10
|
||||
},
|
||||
label: {
|
||||
formatter: '{b| {b} }{abg|}\n{hr|}\n{c| {c}({d}%) }',
|
||||
backgroundColor: '#F6F8FC',
|
||||
borderColor: '#8C8D8E',
|
||||
borderWidth: 1,
|
||||
borderRadius: 4,
|
||||
rich: {
|
||||
hr: {
|
||||
borderColor: '#8C8D8E',
|
||||
width: '100%',
|
||||
borderWidth: 1,
|
||||
height: 0
|
||||
},
|
||||
b: {
|
||||
color: '#4C5058',
|
||||
fontSize:10,
|
||||
lineHeight:20,
|
||||
align: 'center',
|
||||
},
|
||||
c: {
|
||||
color: '#4C5058',
|
||||
fontSize:8,
|
||||
lineHeight:20,
|
||||
align: 'center',
|
||||
},
|
||||
}
|
||||
},
|
||||
data:pieChart
|
||||
}
|
||||
]
|
||||
};
|
||||
if (option && typeof option === 'object') {
|
||||
myChart.setOption(option);
|
||||
}
|
||||
window.addEventListener('resize', myChart.resize);
|
||||
}, 200);
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
</body>
|
||||
@@ -0,0 +1,420 @@
|
||||
<body class="bg-fff">
|
||||
<div class="height-500 fixed left-0 right-0 top-0 z-index-0 bg-1a1a1a"></div>
|
||||
<div class="bg-fff" id="app" ref="app">
|
||||
<div class="container pb130 bg-eee-fff">
|
||||
<img class='block imgsize-750X340' :src='info.theme' />
|
||||
<div id="main"class="inner30">
|
||||
<div v-if="tabFixed">
|
||||
<div class="height-60"></div>
|
||||
<div class="fixed top-0 left-0 right-0 z-index-10 bg-fff pl30 pr30 pt20 pb20">
|
||||
<div class="relative height-60 ml50 mr50 fn-flex text-center">
|
||||
<div class="fn-flex-item" v-for="(item,index) in info.tab"><a :class="'relative inline-block tab-menu '+ [tabid == item.id?'font-36 active':'font-32']" @click="changeTab(item.id,index)" href="javascript:">{{item.title}}</a></div>
|
||||
<div :class="'glider glider-'+tabIndex"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="relative height-60 ml50 mr50 fn-flex text-center">
|
||||
<div class="fn-flex-item" v-for="(item,index) in info.tab"><a :class="'relative inline-block tab-menu '+ [tabid == item.id?'font-36 active':'font-32']" @click="changeTab(item.id,index)" href="javascript:">{{item.title}}</a></div>
|
||||
<div :class="'glider glider2-'+tabIndex"></div>
|
||||
</div>
|
||||
<!--预热阶段-->
|
||||
<div v-if="tabid==1">
|
||||
<div class="mt30 relative bg-fff inner40 pr30 overflowhidden box-shadow-lightGray ulib-r20">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="beginBrowse.title"></b>
|
||||
<div class="fn-fr">
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'beginBrowseGroup')">
|
||||
<option :value="key" v-for="(item,key) in info.group">{{item.title}}</option>
|
||||
</select>
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'beginBrowseDate')">
|
||||
<option :value="item" v-for="item in info.date">{{item}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pr10" v-if="beginBrowse.lists && beginBrowse.lists.length>0">
|
||||
<div class="font-32 color-666" v-for="(item,index) in beginBrowse.lists">
|
||||
<div class="inner20 fn-clear ulib-r20" :class="index==0?'bg-fff7f1':''">
|
||||
<a class="fn-fl block wp70 text-nowrap" :href="item.url">
|
||||
<img class="imgsize-42X42 text-middle" v-if="item.ranking<4" :src="'https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-ranking-'+item.ranking+'.png'" alt="#" />
|
||||
<span class="inline-block w-50 text-center text-middle" v-else>{{item.ranking}}</span>
|
||||
<span class="text-middle">{{item.name}}</span>
|
||||
<span class="inline-block pl10 pr10 line-height-15 text-middle bg-fe9538 font-22 color-fff ulib-r750" v-if="item.tip">{{item.tip}}</span>
|
||||
<!--
|
||||
<i class="iconfont icon-gengduo text-middle font-24 color-666"></i>
|
||||
-->
|
||||
</a>
|
||||
<div class="fn-fr">{{item.num}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="gengduo block absolute bottom-0 box-center pl10 text-center font-22 color-fff" :href="beginBrowse.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
</div>
|
||||
<div class="pt100 pb100 text-center font-32 color-666" v-else>暂时无数据</div>
|
||||
</div>
|
||||
|
||||
<div class="mt30 relative bg-fff inner40 overflowhidden box-shadow-lightGray ulib-r20">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="beginBook.title"></b>
|
||||
<div class="fn-fr">
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'beginBookGroup')">
|
||||
<option :value="key" v-for="(item,key) in info.group">{{item.title}}</option>
|
||||
</select>
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'beginBookDate')">
|
||||
<option :value="item" v-for="item in info.date">{{item}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="beginBook.lists && beginBook.lists.length>0">
|
||||
<div class="font-32 color-666" v-for="(item,index) in beginBook.lists">
|
||||
<div class="inner20 fn-clear ulib-r20" :class="index==0?'bg-fff7f1':''">
|
||||
<a class="fn-fl block wp70 text-nowrap" :href="item.url">
|
||||
<img class="imgsize-42X42 text-middle" v-if="item.ranking<4" :src="'https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-ranking-'+item.ranking+'.png'" alt="#" />
|
||||
<span class="inline-block w-50 text-center text-middle" v-else>{{item.ranking}}</span>
|
||||
<span class="text-middle">{{item.name}}</span>
|
||||
<span class="inline-block pl10 pr10 line-height-15 text-middle bg-fe9538 font-22 color-fff ulib-r750" v-if="item.tip">{{item.tip}}</span>
|
||||
<!--
|
||||
<i class="iconfont icon-gengduo text-middle font-24 color-666"></i>
|
||||
-->
|
||||
</a>
|
||||
<div class="fn-fr">{{item.num}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="gengduo block absolute bottom-0 box-center pl10 text-center font-22 color-fff" :href="beginBook.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
</div>
|
||||
<div class="pt100 pb100 text-center font-32 color-666" v-else>暂时无数据</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- end 预热阶段-->
|
||||
<!--直播阶段-->
|
||||
<div v-if="tabid==2">
|
||||
|
||||
<div class="mt30 relative bg-fff inner40 pr30 overflowhidden box-shadow-lightGray ulib-r20">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="liveView.title"></b>
|
||||
<div class="fn-fr">
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'liveViewGroup')">
|
||||
<option :value="key" v-for="(item,key) in info.group">{{item.title}}</option>
|
||||
</select>
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'liveViewDate')">
|
||||
<option :value="item" v-for="item in info.date">{{item}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pr10" v-if="liveView.lists && liveView.lists.length>0">
|
||||
<div class="font-32 color-666" v-for="(item,index) in liveView.lists">
|
||||
<div class="inner20 fn-clear ulib-r20" :class="index==0?'bg-fff7f1':''">
|
||||
<a class="fn-fl block wp70 text-nowrap" :href="item.url">
|
||||
<img class="imgsize-42X42 text-middle" v-if="item.ranking<4" :src="'https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-ranking-'+item.ranking+'.png'" alt="#" />
|
||||
<span class="inline-block w-50 text-center text-middle" v-else>{{item.ranking}}</span>
|
||||
<span class="text-middle">{{item.name}}</span>
|
||||
<span class="inline-block pl10 pr10 line-height-15 text-middle bg-fe9538 font-22 color-fff ulib-r750" v-if="item.tip">{{item.tip}}</span>
|
||||
<!--
|
||||
<i class="iconfont icon-gengduo text-middle font-24 color-666"></i>
|
||||
-->
|
||||
</a>
|
||||
<div class="fn-fr">{{item.num}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="gengduo block absolute bottom-0 box-center pl10 text-center font-22 color-fff" :href="liveView.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
</div>
|
||||
<div class="pt100 pb100 text-center font-32 color-666" v-else>暂时无数据</div>
|
||||
</div>
|
||||
|
||||
<div class="mt30 relative bg-fff inner40 overflowhidden box-shadow-lightGray ulib-r20">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="liveOrder.title"></b>
|
||||
<div class="fn-fr">
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'liveOrderGroup')">
|
||||
<option :value="key" v-for="(item,key) in info.group">{{item.title}}</option>
|
||||
</select>
|
||||
<select class="select-more box-shadow-lightGray ulib-r10 font-22" @change="handleChange($event,'liveOrderDate')">
|
||||
<option :value="item" v-for="item in info.date">{{item}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="liveOrder.lists && liveOrder.lists.length>0">
|
||||
<div class="font-32 color-666" v-for="(item,index) in liveOrder.lists">
|
||||
<div class="inner20 fn-clear ulib-r20" :class="index==0?'bg-fff7f1':''">
|
||||
<a class="fn-fl block wp70 text-nowrap" :href="item.url">
|
||||
<img class="imgsize-42X42 text-middle" v-if="item.ranking<4" :src="'https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-ranking-'+item.ranking+'.png'" alt="#" />
|
||||
<span class="inline-block w-50 text-center text-middle" v-else>{{item.ranking}}</span>
|
||||
<span class="text-middle">{{item.name}}</span>
|
||||
<span class="inline-block pl10 pr10 line-height-15 text-middle bg-fe9538 font-22 color-fff ulib-r750" v-if="item.tip">{{item.tip}}</span>
|
||||
<!--
|
||||
<i class="iconfont icon-gengduo text-middle font-24 color-666"></i>
|
||||
-->
|
||||
</a>
|
||||
<div class="fn-fr">{{item.num}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="gengduo block absolute bottom-0 box-center pl10 text-center font-22 color-fff" :href="liveOrder.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
</div>
|
||||
<div class="pt100 pb100 text-center font-32 color-666" v-else>暂时无数据</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end 直播阶段-->
|
||||
</div>
|
||||
|
||||
<div class="fixed left-0 bottom-0 right-0 pt20 pb30 bg-fff-op95 text-center font-22 fn-flex" >
|
||||
<a class="fn-flex-item" href="/h5/market/sylive2/stic">
|
||||
<img class="imgsize-50X50" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-home-ac.png" alt="#">
|
||||
<div class="space-nowrap con-min60 font-22">首页</div>
|
||||
</a>
|
||||
<a class="fn-flex-item" href="<?=$act_url?>">
|
||||
<img class="imgsize-50X50" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-activity.png" alt="#">
|
||||
<div class="space-nowrap con-min60 font-22">活动</div>
|
||||
</a>
|
||||
<a class="fn-flex-item" href="/h5/market/sylive2/stic/ranking">
|
||||
<img class="imgsize-50X50" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-ranking.png" alt="#">
|
||||
<div class="space-nowrap con-min60 font-22">排行</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let hostUrl = ''
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
tabFixed:false,
|
||||
tabIndex:0,
|
||||
tabid:'1',//1预热阶段 /2直播阶段
|
||||
info:'',
|
||||
loading: false,
|
||||
beginBrowseDate:0,
|
||||
beginBrowseGroup:0,
|
||||
beginBookDate:0,
|
||||
beginBookGroup:0,
|
||||
beginBrowse:{
|
||||
title:'',
|
||||
url:'',
|
||||
list:[],
|
||||
},
|
||||
beginBook:{
|
||||
title:'',
|
||||
url:'',
|
||||
list:[],
|
||||
},
|
||||
liveViewDate:0,
|
||||
liveViewGroup:0,
|
||||
liveOrderDate:0,
|
||||
liveOrderGroup:0,
|
||||
liveView:{
|
||||
title:'',
|
||||
url:'',
|
||||
list:[],
|
||||
},
|
||||
liveOrder:{
|
||||
title:'',
|
||||
url:'',
|
||||
list:[],
|
||||
},
|
||||
time1:''
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('scroll', this.handleScroll, true)
|
||||
this.getInfo()
|
||||
this.getBeginBrowse()
|
||||
this.getBeginBook()
|
||||
},
|
||||
//离开页面时
|
||||
destroyed () {
|
||||
window.removeEventListener('scroll', this.handleScroll)
|
||||
},
|
||||
methods: {
|
||||
//判断导航是否需要吸顶
|
||||
handleScroll () {
|
||||
let scrollTop = document.querySelector('#app').scrollTop
|
||||
let mainoffsetTop = document.querySelector('#main').offsetTop
|
||||
if (scrollTop > mainoffsetTop) {
|
||||
this.tabFixed = true
|
||||
} else {
|
||||
this.tabFixed = false
|
||||
}
|
||||
},
|
||||
|
||||
//获取基础信息
|
||||
getInfo(){
|
||||
this.info = {
|
||||
theme:'<?=$info['banner']?>',
|
||||
tab:[
|
||||
{
|
||||
id:'1',
|
||||
title:'预热阶段',
|
||||
},
|
||||
{
|
||||
id:'2',
|
||||
title:'直播阶段',
|
||||
},
|
||||
],
|
||||
date:<?=json_encode($day_list,JSON_UNESCAPED_UNICODE)?>,
|
||||
group:<?=json_encode($groups,JSON_UNESCAPED_UNICODE)?>,
|
||||
}
|
||||
},
|
||||
|
||||
//tab切换
|
||||
changeTab(id,index){
|
||||
if(id != this.tabid&&!this.loading){
|
||||
if(this.tabFixed){
|
||||
let mainoffsetTop = document.querySelector('#main').offsetTop
|
||||
$('html,body').animate({scrollTop: mainoffsetTop+5},500);
|
||||
}
|
||||
this.tabid = id
|
||||
this.tabIndex = index
|
||||
if(this.tabid == 1){
|
||||
this.beginBrowseDate = 0
|
||||
this.beginBrowseGroup = 0
|
||||
this.beginBookDate = 0
|
||||
this.beginBookGroup = 0
|
||||
this.getBeginBrowse()
|
||||
this.getBeginBook()
|
||||
}else if(this.tabid == 2){
|
||||
this.liveViewDate = 0
|
||||
this.liveViewGroup = 0
|
||||
this.liveOrderDate = 0
|
||||
this.liveOrderGroup = 0
|
||||
this.getLiveView()
|
||||
this.getLiveOrder()
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
//预热阶段浏览数据
|
||||
getBeginBrowse(){
|
||||
let that=this;
|
||||
var type = this.info.group[this.beginBrowseGroup]['type']
|
||||
var value = this.info.group[this.beginBrowseGroup]['value']
|
||||
//请求接口
|
||||
var params = {
|
||||
'kpi':'browse',
|
||||
'type':type,
|
||||
'value':value,
|
||||
'index':this.beginBrowseGroup,
|
||||
'day':this.beginBrowseDate
|
||||
}
|
||||
$.get('/h5/market/sylive2/stic/ajax_rank',params,function (res){
|
||||
that.beginBrowse = res.data;
|
||||
},'json');
|
||||
},
|
||||
|
||||
//预热阶段预约数据
|
||||
getBeginBook(){
|
||||
let that=this;
|
||||
var type = this.info.group[this.beginBookGroup]['type']
|
||||
var value = this.info.group[this.beginBookGroup]['value']
|
||||
var params = {
|
||||
'kpi':'subscribe',
|
||||
'type':type,
|
||||
'value':value,
|
||||
'index':this.beginBookGroup,
|
||||
'day':this.beginBookDate
|
||||
}
|
||||
$.get('/h5/market/sylive2/stic/ajax_rank',params,function (res){
|
||||
that.beginBook = res.data;
|
||||
},'json');
|
||||
},
|
||||
|
||||
//直播阶段观看数据
|
||||
getLiveView(){
|
||||
let that=this;
|
||||
var type = this.info.group[this.liveViewGroup]['type']
|
||||
var value = this.info.group[this.liveViewGroup]['value']
|
||||
var params = {
|
||||
'kpi':'watch',
|
||||
'type':type,
|
||||
'value':value,
|
||||
'index':this.liveViewGroup,
|
||||
'day':this.liveViewDate
|
||||
}
|
||||
$.get('/h5/market/sylive2/stic/ajax_rank',params,function (res){
|
||||
that.liveView = res.data;
|
||||
},'json');
|
||||
},
|
||||
|
||||
//预热阶段订单数据
|
||||
getLiveOrder(){
|
||||
let that=this;
|
||||
var type = this.info.group[this.liveOrderGroup]['type']
|
||||
var value = this.info.group[this.liveOrderGroup]['value']
|
||||
var params = {
|
||||
'kpi':'order',
|
||||
'type':type,
|
||||
'value':value,
|
||||
'index':this.liveOrderGroup,
|
||||
'day':this.liveOrderDate
|
||||
}
|
||||
$.get('/h5/market/sylive2/stic/ajax_rank',params,function (res){
|
||||
that.liveOrder = res.data;
|
||||
},'json');
|
||||
},
|
||||
|
||||
//选择条件
|
||||
handleChange(e,key){
|
||||
console.log(e)
|
||||
switch (key) {
|
||||
case 'beginBrowseDate':
|
||||
if(this.beginBrowseDate != e.target.value){
|
||||
this.beginBrowseDate = e.target.value
|
||||
console.log(key)
|
||||
this.getBeginBrowse()
|
||||
}
|
||||
break;
|
||||
case 'beginBrowseGroup':
|
||||
if(this.beginBrowseGroup != e.target.value){
|
||||
this.beginBrowseGroup = e.target.value
|
||||
console.log(key)
|
||||
this.getBeginBrowse()
|
||||
}
|
||||
break;
|
||||
case 'beginBookDate':
|
||||
if(this.beginBookDate != e.target.value){
|
||||
this.beginBookDate = e.target.value
|
||||
console.log(key)
|
||||
this.getBeginBook()
|
||||
}
|
||||
break;
|
||||
case 'beginBookGroup':
|
||||
if(this.beginBookGroup != e.target.value){
|
||||
this.beginBookGroup = e.target.value
|
||||
console.log(key)
|
||||
this.getBeginBook()
|
||||
}
|
||||
break;
|
||||
case 'liveViewDate':
|
||||
if(this.liveViewDate != e.target.value){
|
||||
this.liveViewDate = e.target.value
|
||||
console.log(key)
|
||||
this.getLiveView()
|
||||
}
|
||||
break;
|
||||
case 'liveViewGroup':
|
||||
if(this.liveViewGroup != e.target.value){
|
||||
this.liveViewGroup = e.target.value
|
||||
console.log(key)
|
||||
this.getLiveView()
|
||||
}
|
||||
break;
|
||||
case 'liveOrderDate':
|
||||
if(this.liveOrderDate != e.target.value){
|
||||
this.liveOrderDate = e.target.value
|
||||
console.log(key)
|
||||
this.getLiveOrder()
|
||||
}
|
||||
break;
|
||||
case 'liveOrderGroup':
|
||||
if(this.liveOrderGroup != e.target.value){
|
||||
this.liveOrderGroup = e.target.value
|
||||
console.log(key)
|
||||
this.getLiveOrder()
|
||||
}
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
</body>
|
||||
@@ -2,6 +2,7 @@
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/LArea/js/LAreaData1.js"></script>
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/LArea/js/LAreaData2.js"></script>
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/LArea/js/LArea.js"></script>
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/clipboard.min.js"></script>
|
||||
<body class="bg-f6">
|
||||
<div id="app" ref="app">
|
||||
<div class="container relative bg-no-repeat bg-size-fullwidth bg-pos-top pb40" :style="'background-image:url('+info.bg+')'">
|
||||
@@ -16,12 +17,16 @@
|
||||
<div class="mt10 uinfoadd font-22 ulib-rl750" v-if="show_address" @click="showAdd()"><i class="iconfont mr5 icon-dizhi"></i>{{show_address}}</div>
|
||||
<div class="mt10 uinfoadd font-22 ulib-rl750" v-else @click="showAdd()"><i class="iconfont mr5 icon-zengjia"></i>(完善收货地址)</div>
|
||||
</template>
|
||||
<img class="absolute box-middle right-0 mr80 imgsize-130X100" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-hexiao.png" alt="已核销" v-if="info.is_writeoff">
|
||||
</div>
|
||||
<!-- <div class="uinfo absolute box-center pt15 pb15 pl30 pr30 font-32 ulib-r750 space-nowrap">{{info.order.uname}} · {{info.order.utel}}</div>-->
|
||||
<div class="odslogan absolute box-center text-center color-e4bc93 space-nowrap">
|
||||
<div class="pb10 bbs-1-e4bc93 font-48">{{info.order.slogan}}</div>
|
||||
<div class="mt10 font-24">{{info.order.valid_time}}</div>
|
||||
</div>
|
||||
<div class="absolute logistics box-center bg-e0b78d pt10 pb10 pl15 pr15 ulib-rtr20 ulib-rbl20 ulib-r750 font-22 color-1a1a1a text-nowrap text-center" v-if="info.show_express" @click="msgisShowExpress = true">
|
||||
您的礼包已发出 {{info.express.title}}·{{info.express.code}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="relative bg-fff mb30 ml30 mr30 inner40 pl150 pr220 ulib-r20 box-shadow-darkGray" v-if="info.if_pid">
|
||||
<img class="absolute left-0 box-middle ml35 imgsize-90X90 ulib-r750 bds-1-eee" :src="info.logo" :alt="info.title" />
|
||||
@@ -67,6 +72,36 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--快递-->
|
||||
<div class="msg fn-hide" :style="msgisShowExpress?'display:block':'display:none'" v-if="msgisShowExpress">
|
||||
<div class="msgBg" @click="msgisShowExpress = false"></div>
|
||||
<div class="msgMain">
|
||||
<div class="content">
|
||||
<div class="pt20 pb20 fn-clear">
|
||||
<div class="fn-fl font-36">{{info.express.title}}</div>
|
||||
<div class="fn-fr mt10 font-24">
|
||||
<span>{{info.express.code}}</span>
|
||||
<a class="J_copy" :data-clipboard-text="info.express.code">复制</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pl20 pr20 max-height-500 scroll-y">
|
||||
<div class="orderDtail-log mt40 relative">
|
||||
<div class="orderDtail-log-item pl40 relative" v-for="(item,index) in info.express.list">
|
||||
<div class="orderDtail-log-content font-22">
|
||||
<div :class="index == 0?'color-ff9d47':''">{{item.time}}</div>
|
||||
<div class="color-999 text-break">{{item.status}}</div>
|
||||
</div>
|
||||
<span class="absolute orderDtail-log-line2 z-index-0" v-if="index != info.express.list.length-1"></span>
|
||||
<span class="absolute orderDtail-log-dot z-index-1"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="opt mt20 pl20 pr20">
|
||||
<a class="bg-1a1a1a ml15 pt20 pb20 pl60 pr60 text-center font-32 color-fff ulib-r750" @click="msgisShowExpress = false" href="javascript:" >知道了</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
let hostUrl = ''
|
||||
@@ -97,6 +132,7 @@
|
||||
show_address:'<?=$info['order']['region'] ? $info['order']['region']." ".$info['order']['detail'] : ''?>',
|
||||
isShowAdd: false,
|
||||
isSubmiting: false,
|
||||
msgisShowExpress:false,
|
||||
},
|
||||
created(){
|
||||
|
||||
@@ -123,7 +159,16 @@
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
//复制文字
|
||||
let clipboardDemos = new ClipboardJS('.J_copy');
|
||||
clipboardDemos.on('success', function (e) {
|
||||
e.clearSelection();
|
||||
var msgDia = mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "复制成功!"
|
||||
});
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
|
||||
@@ -3,19 +3,23 @@
|
||||
<div class="bg-f6" id="app" ref="app">
|
||||
<div class="container">
|
||||
<div class="inner30 pt0">
|
||||
<a class="block mt30 pl30 pr30 bg-fff ulib-r20" :href="item.url" v-for="(item,index) in list">
|
||||
<div class="bbs-1-eee pt20 pb20 font-22 color-999">订单编号 {{item.sid}}</div>
|
||||
<div class="relative pt30 pb30 fn-clear">
|
||||
<img class="fn-fl imgsize-185X170 ulib-r5" :src="item.img" alt="#">
|
||||
<div class="pl210">
|
||||
<div class="line-clamp-2 font-32 line-height-13">{{item.title}}</div>
|
||||
<div class="mt5 font-22 color-999">订单时间 {{item.time}}</div>
|
||||
<div class="absolute left-0 bottom-0 pl210 pb30 text-bold color-fe9538">
|
||||
<span class="font-28">¥</span><span class="ml5 font-40">{{item.price}}</span>
|
||||
<div class="block mt30 pl30 pr30 pb30 bg-fff ulib-r20" v-for="(item,index) in list">
|
||||
<a :href="item.url" >
|
||||
<div class="bbs-1-eee pt20 pb20 font-22 color-999">订单编号 {{item.sid}}</div>
|
||||
<div class="relative pt30 fn-clear">
|
||||
<img class="fn-fl imgsize-185X170 ulib-r5" :src="item.img" alt="#">
|
||||
<div class="pl210">
|
||||
<div class="line-clamp-2 font-32 line-height-13">{{item.title}}</div>
|
||||
<div class="mt5 font-22 color-999">订单时间 {{item.time}}</div>
|
||||
<div class="absolute left-0 bottom-0 pl210 text-bold color-fe9538"><span class="font-28">¥</span><span class="ml5 font-40">{{item.price}}</span></div>
|
||||
</div>
|
||||
<img class="absolute bottom--15 right-0 imgsize-130X100" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-hexiao.png" alt="已核销" v-if="item.is_writeoff">
|
||||
</div>
|
||||
</a>
|
||||
<div class="bg-eee mt20 pt10 pb10 pl15 pr15 ulib-rtr20 ulib-rbl20 ulib-rbr20 font-22 color-666" @click="showExpress(index)" v-if="item.courierNo">
|
||||
您的快递已发出 快递单号:{{item.courierNo}}>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<mugen-scroll :handler="fetchData" :should-handle="!loading" scroll-container="app">
|
||||
<div class="pt100 pb100 text-center color-ccc" v-if="isNoData"><span class="text-middle font-22">暂无数据</span></div>
|
||||
<div class="pt20 pb20 text-center color-ccc" v-else-if="loading"><i class="iconfont icon-jiazai text-middle"></i><span class="text-middle font-22">请稍等...</span></div>
|
||||
@@ -24,8 +28,38 @@
|
||||
</div>
|
||||
</div>
|
||||
<? $this->load->view('h5/market/sylive2/nav_my') ?>
|
||||
<!--快递-->
|
||||
<div class="msg fn-hide" :style="msgisShowExpress?'display:block':'display:none'" v-if="msgisShowExpress">
|
||||
<div class="msgBg" @click="msgisShowExpress = false"></div>
|
||||
<div class="msgMain">
|
||||
<div class="content">
|
||||
<div class="pt20 pb20 fn-clear">
|
||||
<div class="fn-fl font-36">{{express.title}}</div>
|
||||
<div class="fn-fr mt10 font-24">
|
||||
<span>{{express.courierNo}}</span>
|
||||
<a class="J_copy" :data-clipboard-text="express.courierNo">复制</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pl20 pr20 max-height-500 scroll-y" v-if="express && express.list">
|
||||
<div class="orderDtail-log mt40 relative">
|
||||
<div class="orderDtail-log-item pl40 relative" v-for="(item,index) in express.list">
|
||||
<div class="orderDtail-log-content font-22">
|
||||
<div :class="index == 0?'color-ff9d47':''">{{item.time}}</div>
|
||||
<div class="color-999 text-break">{{item.status}}</div>
|
||||
</div>
|
||||
<span class="absolute orderDtail-log-line2 z-index-0" v-if="index != express.list.length-1"></span>
|
||||
<span class="absolute orderDtail-log-dot z-index-1"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="opt mt20 pl20 pr20">
|
||||
<a class="bg-1a1a1a ml15 pt20 pb20 pl60 pr60 text-center font-32 color-fff ulib-r750" @click="msgisShowExpress = false" href="javascript:" >知道了</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/clipboard.min.js"></script>
|
||||
<script>
|
||||
let hostUrl = ''
|
||||
var app = new Vue({
|
||||
@@ -37,11 +71,44 @@
|
||||
page: 1,
|
||||
size: 20,
|
||||
list:[],
|
||||
msgisShowExpress:false,
|
||||
expressIndex:-1,
|
||||
},
|
||||
mounted() {
|
||||
|
||||
//复制文字
|
||||
let clipboardDemos = new ClipboardJS('.J_copy');
|
||||
clipboardDemos.on('success', function (e) {
|
||||
e.clearSelection();
|
||||
var msgDia = mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "复制成功!"
|
||||
});
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
//显示物流
|
||||
showExpress(index){
|
||||
var that = this
|
||||
var params = {
|
||||
'id' : this.list[index]['id'],
|
||||
'type' : 0
|
||||
}
|
||||
//请求接口
|
||||
$.get('/h5/market/sylive2/ucenter/get_wuli',params,function (res){
|
||||
if(res.code==200){
|
||||
that.express = res.data
|
||||
that.msgisShowExpress = true
|
||||
}else{
|
||||
msgDia = mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: res.msg
|
||||
});
|
||||
}
|
||||
|
||||
},'json');
|
||||
},
|
||||
|
||||
//拉取数据
|
||||
fetchData: function() {
|
||||
|
||||
@@ -1,16 +1,25 @@
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/clipboard.min.js"></script>
|
||||
<body class="bg-f6">
|
||||
<div class="height-500 fixed left-0 right-0 top-0 z-index-0 bg-1a1a1a"></div>
|
||||
<div class="bg-f6" id="app" ref="app">
|
||||
<div class="container">
|
||||
<div class="inner30 pt0">
|
||||
<a class="block mt30 inner30 bg-fff ulib-r20" :href="item.url" v-for="(item,index) in list">
|
||||
<div class="relative overflowhidden ulib-r10">
|
||||
<div class="orderTip2 text-center font-24 color-fff bg-ff5a5a" v-if="item.title">{{item.title}}</div>
|
||||
<img class="imgsize-630X340 ulib-r10" :src="item.img" alt="#">
|
||||
<div class="mt30 bg-fff ulib-r20" v-for="(item,index) in list">
|
||||
<a class="block relative overflowhidden ulib-rt20" :href="item.url">
|
||||
<div class="orderTip2 text-center font-24 color-fff bg-ff5a5a">{{item.title}}</div>
|
||||
<img class="imgsize-690X345" :src="item.img" alt="#">
|
||||
</a>
|
||||
<div class="inner30 pt20">
|
||||
<div class="relative pr150">
|
||||
<div class="font-30 color-333">{{item.goods}}</div>
|
||||
<div class="mt15 font-20 color-bbb">*抽奖礼品需提车后才能享受</div>
|
||||
<img class="absolute box-middle right-0 imgsize-130X100" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/icon-hexiao.png" alt="已核销" v-if="item.is_writeoff">
|
||||
</div>
|
||||
<div class="bg-eee mt20 pt10 pb10 pl15 pr15 ulib-rtr20 ulib-rbl20 ulib-rbr20 font-22 color-666" @click="showExpress(index)" v-if="item.courierNo">
|
||||
您的快递已发出 快递单号:{{item.courierNo}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt15 text-center font-30 color-333">{{item.goods}}</div>
|
||||
<div class="mt15 text-center font-20 color-bbb">*抽奖礼品需提车后才能享受</div>
|
||||
</a>
|
||||
</div>
|
||||
<mugen-scroll :handler="fetchData" :should-handle="!loading" scroll-container="app">
|
||||
<div class="pt100 pb100 text-center color-ccc" v-if="isNoData"><span class="text-middle font-22">暂无数据</span></div>
|
||||
<div class="pt20 pb20 text-center color-ccc" v-else-if="loading"><i class="iconfont icon-jiazai text-middle"></i><span class="text-middle font-22">请稍等...</span></div>
|
||||
@@ -20,6 +29,37 @@
|
||||
</div>
|
||||
<? $this->load->view('h5/market/sylive2/nav_my') ?>
|
||||
|
||||
<!--快递-->
|
||||
<div class="msg fn-hide" :style="msgisShowExpress?'display:block':'display:none'" v-if="msgisShowExpress">
|
||||
<div class="msgBg" @click="msgisShowExpress = false"></div>
|
||||
<div class="msgMain">
|
||||
<div class="content">
|
||||
<div class="pt20 pb20 fn-clear">
|
||||
<div class="fn-fl font-36">{{express.title}}</div>
|
||||
<div class="fn-fr mt10 font-24">
|
||||
<span>{{express.courierNo}}</span>
|
||||
<a class="J_copy" :data-clipboard-text="express.courierNo">复制</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pl20 pr20 max-height-500 scroll-y" v-if="express && express.list">
|
||||
<div class="orderDtail-log mt40 relative">
|
||||
<div class="orderDtail-log-item pl40 relative" v-for="(item,index) in express.list">
|
||||
<div class="orderDtail-log-content font-22">
|
||||
<div :class="index == 0?'color-ff9d47':''">{{item.time}}</div>
|
||||
<div class="color-999 text-break">{{item.status}}</div>
|
||||
</div>
|
||||
<span class="absolute orderDtail-log-line2 z-index-0" v-if="index != express.list.length-1"></span>
|
||||
<span class="absolute orderDtail-log-dot z-index-1"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="opt mt20 pl20 pr20">
|
||||
<a class="bg-1a1a1a ml15 pt20 pb20 pl60 pr60 text-center font-32 color-fff ulib-r750" @click="msgisShowExpress = false" href="javascript:" >知道了</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let hostUrl = ''
|
||||
var app = new Vue({
|
||||
@@ -31,11 +71,44 @@
|
||||
page: 1,
|
||||
size: 20,
|
||||
list:[],
|
||||
msgisShowExpress:false,
|
||||
express:''
|
||||
},
|
||||
mounted() {
|
||||
|
||||
//复制文字
|
||||
let clipboardDemos = new ClipboardJS('.J_copy');
|
||||
clipboardDemos.on('success', function (e) {
|
||||
e.clearSelection();
|
||||
var msgDia = mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "复制成功!"
|
||||
});
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
//显示物流
|
||||
showExpress(index){
|
||||
var that = this
|
||||
var params = {
|
||||
'id' : this.list[index]['id'],
|
||||
'type' : 1
|
||||
}
|
||||
//请求接口
|
||||
$.get('/h5/market/sylive2/ucenter/get_wuli',params,function (res){
|
||||
if(res.code==200){
|
||||
that.express = res.data
|
||||
that.msgisShowExpress = true
|
||||
}else{
|
||||
msgDia = mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: res.msg
|
||||
});
|
||||
}
|
||||
|
||||
},'json');
|
||||
},
|
||||
|
||||
//拉取数据
|
||||
fetchData: function() {
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user