neta0202
This commit is contained in:
@@ -23,7 +23,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
| a PHP script and you can easily do that on your own.
|
||||
|
|
||||
*/
|
||||
$config['base_url'] = 'haodian.dev.xiaoyu.com';
|
||||
$config['base_url'] = 'http://admin.dev.liche.cn/';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -11,11 +11,6 @@ class Clues extends HD_Controller
|
||||
'sa' => '陈秋龙',
|
||||
'mobile' => '17758949069'
|
||||
),
|
||||
// '101022' => array(
|
||||
// 'biz' => '泉州南安中骏',
|
||||
// 'sa' => '潘福泉',
|
||||
// 'mobile' => '15260424218'
|
||||
// ),
|
||||
'100966' => array(
|
||||
'biz' => '泉州南环路',
|
||||
'sa' => '傅玲玲',
|
||||
@@ -57,6 +52,41 @@ class Clues extends HD_Controller
|
||||
'mobile' => ''
|
||||
),
|
||||
|
||||
'101071' => array(
|
||||
'biz' => '江门朋赢',
|
||||
'sa' => '余镜苗',
|
||||
'mobile' => '18127125536'
|
||||
),
|
||||
'100647' => array(
|
||||
'biz' => '珠海金浩',
|
||||
'sa' => '占杨',
|
||||
'mobile' => '18923392948'
|
||||
),
|
||||
'100832' => array(
|
||||
'biz' => '中山金玺',
|
||||
'sa' => '黄美愉',
|
||||
'mobile' => '17329610587'
|
||||
),
|
||||
'101252' => array(
|
||||
'biz' => '佛山鑫明宇',
|
||||
'sa' => '陈惠伦',
|
||||
'mobile' => '13790011910'
|
||||
),
|
||||
'101289' => array(
|
||||
'biz' => '深圳东浩',
|
||||
'sa' => '余佳思',
|
||||
'mobile' => '15889556579'
|
||||
),
|
||||
'101204' => array(
|
||||
'biz' => '东莞金屹',
|
||||
'sa' => '姚宗亮',
|
||||
'mobile' => '13612751915'
|
||||
),
|
||||
'101043' => array(
|
||||
'biz' => '惠州华致',
|
||||
'sa' => '张安琪',
|
||||
'mobile' => '15999955547'
|
||||
),
|
||||
);
|
||||
protected $log_dir;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Time: 14:10
|
||||
*/
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
session_start();
|
||||
//session_start();
|
||||
|
||||
class Auth {
|
||||
|
||||
|
||||
@@ -31,4 +31,15 @@ $config = array(
|
||||
),
|
||||
'model' => array('user_model' => 'app/licheb/app_licheb_users_model')
|
||||
),
|
||||
'neta' => array(
|
||||
'id' => 3,
|
||||
'app_id' => 3,
|
||||
'name' => '哪铁圈',
|
||||
'sign_key' => 'be0fc63bf56a462f16a623501c156bb5',
|
||||
'wx' => array(
|
||||
'appid' => '',
|
||||
'secret' => '',
|
||||
),
|
||||
//'model' => array('user_model' => 'app/neta/app_licheb_users_model')
|
||||
),
|
||||
);
|
||||
|
||||
@@ -17,6 +17,7 @@ class Hd extends CI_Controller {
|
||||
private static $apps = array(
|
||||
'e49d182c6e6dab64' => 'liche',
|
||||
'1c156bb57cd6984a' => 'licheb',
|
||||
'fba9a12d2cd8599a' => 'neta',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -461,7 +462,7 @@ class Hd extends CI_Controller {
|
||||
private function print_return($data = array(), $ifgzip = false){
|
||||
|
||||
if(!isset($data['code'])){
|
||||
$msg = $data['msg'] ? $data['msg'] : '';
|
||||
$msg = $data['msg'] ? $data['msg'] : '执行成功';
|
||||
$data = array('code' => 200, 'data' => $data, 'msg' => $msg);
|
||||
}
|
||||
|
||||
@@ -611,7 +612,6 @@ class Hd extends CI_Controller {
|
||||
$buff = "";
|
||||
foreach($param as $k => $v){
|
||||
if(!is_array($v) && strlen($v) > 0){
|
||||
// $buff .= $k . "=" . $v . "&";
|
||||
$buff .= $k . "=" . ($v) . "&";
|
||||
}
|
||||
}
|
||||
@@ -621,14 +621,12 @@ class Hd extends CI_Controller {
|
||||
//MD5加密并转大写
|
||||
$string = strtoupper(md5($buff));
|
||||
|
||||
// var_dump($string);
|
||||
// var_dump($buff);
|
||||
//var_dump($string);
|
||||
//var_dump($buff);
|
||||
if($sign == $string){
|
||||
return true;
|
||||
}
|
||||
|
||||
// return true;
|
||||
|
||||
debug_log("[fail]". __FUNCTION__ . ": sign:{$sign}, check:{$string}, buff:{$buff}", $this->log_file);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
ini_set('display_errors', 'On');
|
||||
error_reporting(E_ERROR);
|
||||
//ini_set('display_errors', 'On');
|
||||
//error_reporting(E_ERROR);
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: xuxb
|
||||
@@ -146,6 +146,7 @@ abstract class Wxapp extends HD_Controller{
|
||||
}
|
||||
|
||||
if(!method_exists($this, $method)){
|
||||
echo $method;exit;
|
||||
debug_log("[fail]". __FUNCTION__ . ": request not allow; method:{$method}", $this->log_file);
|
||||
throw new Exception('非法请求', API_CODE_NONE);
|
||||
}
|
||||
@@ -153,6 +154,7 @@ abstract class Wxapp extends HD_Controller{
|
||||
//某个方法或者整个ct在白名单里无需校验
|
||||
$session = $this->session;
|
||||
if(!in_array($name, $this->login_white) && 'all' != $this->login_white){
|
||||
print_r($this->login_white);exit;
|
||||
if(!$session){
|
||||
throw new Exception('还未登录', API_CODE_LOGOUT);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ require_once APPPATH . 'controllers/wxapp/Wxapp.php';
|
||||
*/
|
||||
class Home extends Wxapp
|
||||
{
|
||||
private $uid;
|
||||
//private $uid;
|
||||
|
||||
function __construct($inputs, $app_key)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
defined('WXAPP_APP') or exit('No direct script access allowed');
|
||||
ini_set('display_errors', 'On');
|
||||
error_reporting(E_ERROR);
|
||||
|
||||
require_once APPPATH . 'controllers/wxapp/Wxapp.php';
|
||||
class Act extends Wxapp
|
||||
{
|
||||
function __construct($inputs, $app_key)
|
||||
{
|
||||
parent::__construct($inputs, $app_key);
|
||||
$this->login_white = 'all';//登录白名单
|
||||
$this->check_status = [];//用户状态校验
|
||||
$this->check_mobile = [];//需要手机号
|
||||
$this->check_headimg = [];//授权微信信息
|
||||
$this->load->model('market/market_sylive_activity_model');
|
||||
$this->load->model('market/market_sylive_order_model');
|
||||
$this->load->model('market/market_sylive_customer_model');
|
||||
}
|
||||
protected function get_user()
|
||||
{
|
||||
$ukey = $this->input_param('ukey');
|
||||
$activityId = 27;//活动id
|
||||
|
||||
$activity = $this->market_sylive_activity_model->get(['activityId' => $activityId]);
|
||||
if (!$activity) {
|
||||
//throw new Hd_exception('活动不存在', API_CODE_FAIL);
|
||||
}
|
||||
|
||||
if (!$ukey) {
|
||||
throw new Hd_exception('ukey不存在', API_CODE_FAIL);
|
||||
}
|
||||
|
||||
$customer = $this->market_sylive_customer_model->get(['ukey' => $ukey]);
|
||||
if(!$customer){
|
||||
throw new Hd_exception('用户不存在', API_CODE_FAIL);
|
||||
}
|
||||
|
||||
$data = [
|
||||
'customerId' => $customer['customerId'],
|
||||
];
|
||||
return $data;
|
||||
}
|
||||
|
||||
protected function post_reward()
|
||||
{
|
||||
$activityId = 27;//活动id
|
||||
$ukey = $this->input_param('ukey');
|
||||
$reward_id = $this->input_param('reward_id');
|
||||
|
||||
//$reward_id 对应 winType
|
||||
$winTypes = array(
|
||||
'5051' => '1', //电视机
|
||||
'5052' => '2', //电冰箱
|
||||
'5053' => '3', //平板
|
||||
);
|
||||
|
||||
$activity = $this->market_sylive_activity_model->get(['activityId' => $activityId]);
|
||||
if (!$activity) {
|
||||
throw new Hd_exception('活动不存在', API_CODE_FAIL);
|
||||
}
|
||||
|
||||
if (!$reward_id || !in_array($reward_id, $winTypes)) {
|
||||
throw new Hd_exception('参数错误', API_CODE_FAIL);
|
||||
}
|
||||
|
||||
if (!$ukey) {
|
||||
throw new Hd_exception('ukey不存在', API_CODE_FAIL);
|
||||
}
|
||||
|
||||
$customer = $this->market_sylive_customer_model->get(['ukey' => $ukey]);
|
||||
if(!$customer){
|
||||
throw new Hd_exception('用户不存在', API_CODE_FAIL);
|
||||
}
|
||||
|
||||
$order = $this->market_sylive_order_model->get(['activityId' => $activityId, 'userId' => $customer['userId'], 'status' => 1,]);
|
||||
if($order && $order['win'] == 0){
|
||||
$data = [
|
||||
'win' => 1,
|
||||
'winType' => $winTypes[$reward_id],
|
||||
'winTime' => date('Y-m-d H:i:s'),
|
||||
];
|
||||
|
||||
$rt = $this->market_sylive_order_model->update($data, ['id' => $order['id']]);
|
||||
}
|
||||
|
||||
if ($rt) {
|
||||
throw new Hd_exception('执行成功', API_CODE_SUCCESS);
|
||||
}
|
||||
|
||||
throw new Hd_exception('目标对象不存在', API_CODE_FAIL);
|
||||
}
|
||||
|
||||
protected function post_car()
|
||||
{
|
||||
$activityId = 27;//活动id
|
||||
$ukey = $this->input_param('ukey');
|
||||
$car = $this->input_param('car');
|
||||
|
||||
$activity = $this->market_sylive_activity_model->get(['activityId' => $activityId]);
|
||||
if (!$activity) {
|
||||
throw new Hd_exception('活动不存在', API_CODE_FAIL);
|
||||
}
|
||||
|
||||
if (!$car) {
|
||||
throw new Hd_exception('参数错误', API_CODE_FAIL);
|
||||
}
|
||||
|
||||
if (!$ukey) {
|
||||
throw new Hd_exception('ukey不存在', API_CODE_FAIL);
|
||||
}
|
||||
|
||||
$customer = $this->market_sylive_customer_model->get(['ukey' => $ukey]);
|
||||
if(!$customer){
|
||||
throw new Hd_exception('用户不存在', API_CODE_FAIL);
|
||||
}else{
|
||||
$data = ['visitTagId' => $car,];
|
||||
$rt = $this->market_sylive_customer_model->update($data, ['customerId' => $customer['customerId']]);
|
||||
}
|
||||
|
||||
if ($rt) {
|
||||
throw new Hd_exception('执行成功', API_CODE_SUCCESS);
|
||||
}
|
||||
|
||||
throw new Hd_exception('目标对象不存在', API_CODE_FAIL);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,11 +16,11 @@ class Welcome extends CI_Controller {
|
||||
//测试地址
|
||||
//$url = 'https://salespp-sit.hozonauto.com/appservice/app/if/salesclue/createSalesclue';
|
||||
|
||||
$name = '三好学生'; //客户姓名
|
||||
$mobile = '17720762025';//客户手机
|
||||
$name = '唐总'; //客户姓名
|
||||
$mobile = '13085816967';//客户手机
|
||||
|
||||
$comments = '100690'; //门店编码
|
||||
$samobile = '13600983210';//销售手机
|
||||
$comments = '100647'; //门店编码
|
||||
$samobile = '18923392948';//销售手机
|
||||
|
||||
$city_id = '350200';
|
||||
$voId = $city_id . date('mdHis') . sprintf("%06d", rand(1,999999));
|
||||
|
||||
@@ -125,7 +125,7 @@ class Act extends Wx {
|
||||
$info['appoint_mobile'] = true;
|
||||
//判断是否已报名
|
||||
$where = ['activityId'=>$this->a_id,'userId'=>$this->uid];
|
||||
$appoint = $this->market_sylive_customer_model->count($where);
|
||||
$appoint = $this->market_sylive_customer_model->get($where);
|
||||
$info['is_appoint'] = $appoint ? true : false;
|
||||
if(!$user['nickname'] && !$user['headimg']) {
|
||||
$auth_url = http_host_com('home') . "/h5/market/sylive2/act/userinfo?skey={$this->skey}&type=apt";
|
||||
@@ -133,6 +133,7 @@ class Act extends Wx {
|
||||
}
|
||||
$info['auth_url'] = $auth_url;
|
||||
$info['apt'] = $apt ? true : false; //是否弹窗报名
|
||||
$info['ukey'] = $appoint ? md5($this->a_id.$appoint['mobile']) : ''; //是否弹窗报名
|
||||
$info['appoint_title'] = $jsondata['signBespeak']['title'] ? $jsondata['signBespeak']['title'] : '';
|
||||
$info['appoint_msg'] = $jsondata['signBespeak']['content'] ? $jsondata['signBespeak']['content'] : '';
|
||||
$info['notice_color'] = $jsondata['barrage']['color'] ? '#fff' : '#333';
|
||||
@@ -540,9 +541,11 @@ class Act extends Wx {
|
||||
$act_user_row = $this->act_user_model->get(['id'=>$this->act_uid]);
|
||||
$p_user = [];
|
||||
$act_user_row['channelId'] && $p_user = $this->act_user_model->get(['userId'=>$act_user_row['channelId'],'activityId'=>$a_id]);
|
||||
$ukey = md5($a_id.$mobile);
|
||||
$add_data = [
|
||||
'activityId' => $a_id,
|
||||
'userId' => $this->uid,
|
||||
'ukey' => $ukey,
|
||||
'ifAppointment' => 1,
|
||||
'mobile' => $mobile,
|
||||
'createTime' => date('Y-m-d H:i:s'),
|
||||
@@ -591,7 +594,7 @@ class Act extends Wx {
|
||||
$this->sylive2_entity->kpi_log($params);
|
||||
}
|
||||
}
|
||||
// if($a_id==11){
|
||||
// if($a_id==27){
|
||||
// //通知第三方
|
||||
// require_once COMMPATH . 'third_party/SytApi.php';
|
||||
// $syt = new SytApi();
|
||||
@@ -609,11 +612,9 @@ class Act extends Wx {
|
||||
// $syt->Tj($dlrCode,"活动客户",$mobile,$mediaCaName,$leadNo);
|
||||
// }
|
||||
|
||||
// if($a_id == 20){
|
||||
// if($a_id == 27){
|
||||
// //生产地址
|
||||
// $url = 'https://salesapp.hozonauto.com/appservice/app/if/salesclue/createSalesclue';
|
||||
// //测试地址
|
||||
// //$url = 'https://salesapp-sit.hozonauto.com/appservice/app/if/salesclue/createSalesclue';
|
||||
//
|
||||
// //获取意向网点编码
|
||||
// if($p_user){
|
||||
@@ -622,14 +623,14 @@ class Act extends Wx {
|
||||
// }
|
||||
//
|
||||
// $data[] = array(
|
||||
// 'cusSource3' => '011403',
|
||||
// 'cusSource3' => '023409',
|
||||
// 'customerName' => "活动客户",
|
||||
// 'dealerCode' => $biz['comments'],
|
||||
// 'fromSystem' => "好店云",
|
||||
// 'mobile' => $mobile,
|
||||
// 'saMobile' => $user['mobile'],
|
||||
// 'cusType' => '30111001',
|
||||
// 'remark' => "99宠你节",
|
||||
// 'remark' => "2024新春",
|
||||
// );
|
||||
//
|
||||
// $data = json_encode($data, JSON_UNESCAPED_UNICODE);
|
||||
@@ -658,6 +659,6 @@ class Act extends Wx {
|
||||
// }
|
||||
}
|
||||
$redis->delete($key);
|
||||
$this->show_json('',200, '预约成功');
|
||||
$this->show_json(array('ukey' => $ukey),200, '预约成功');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
href="https://www.liche.cn/h5/market/sylive2/item/detail?skey=YV9pZD0yNiZpdGVtSWQ9MzU">
|
||||
支付9.9元瓜分百万红包
|
||||
</a>
|
||||
<a class="block bg-1a1a1a pt20 pb20 text-center font-36 color-fff ulib-r20" v-else
|
||||
<a class="block bg-ff0000 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}}
|
||||
@@ -156,7 +156,7 @@
|
||||
<div class="msgMain">
|
||||
<div class="content">
|
||||
<div class="word">
|
||||
<div class="pt10 pb10 text-center font-36"> {{info.btn_text}}</div>
|
||||
<div class="pt10 pb10 text-center font-36 color-000"> 百万现金马上分 </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="请输入手机号"/>
|
||||
@@ -169,9 +169,9 @@
|
||||
</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"
|
||||
<a class="fn-flex-item bg-fff bds-2-ff0000 mr15 pt20 pb20 text-center font-32 color-ff0000 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"
|
||||
<a class="fn-flex-item bg-ff0000 ml15 pt20 pb20 text-center font-32 color-fff ulib-r750"
|
||||
@click="postCustomers()" href="javascript:">确定</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -188,15 +188,14 @@
|
||||
<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 relative wp80 bg-1a1a1a pt20 pb20 text-center font-32 color-fff ulib-r750" href="javascript:" @click="goSubscribemsg()">
|
||||
<i class="iconfont icon-tixing mr10"></i>立即预约直播
|
||||
<!--小程序下订
|
||||
<a class="inline-block relative wp80 bg-ff0000 pt20 pb20 text-center font-32 color-fff ulib-r750" href="javascript:">
|
||||
<i class="iconfont icon-tixing mr10"></i>
|
||||
马上去抽奖
|
||||
<div class="absolute top-0 left-0 right-0 bottom-0 overflowhidden z-index-1">
|
||||
<wx-open-launch-weapp
|
||||
id='launch-btn'
|
||||
username="gh_dd9dbd866d61"
|
||||
path="pages/car/index"
|
||||
>
|
||||
username="gh_166300b36245"
|
||||
:path="ukeyPath">
|
||||
<template>
|
||||
<button class="btn" style="width:100px;height:60px;opacity:0"></button>
|
||||
</template>
|
||||
@@ -205,7 +204,6 @@
|
||||
</script>
|
||||
</wx-open-launch-weapp>
|
||||
</div>
|
||||
-->
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -254,6 +252,7 @@
|
||||
msgisShowSuccess: false,//报名成功
|
||||
succesTx: '',//报名成功提示
|
||||
subShowSuccess:false,
|
||||
ukeyPath:'',
|
||||
},
|
||||
created() {
|
||||
|
||||
@@ -286,6 +285,7 @@
|
||||
if(that.info.is_appoint){
|
||||
//提交成功
|
||||
that.msgisShowSuccess = true
|
||||
that.ukeyPath = '/pages/lottery/index?encrypt=2711aed73199217a59b968b74883710e&weshop_key=k44f71a&liche_ukey='+ that.info.ukey
|
||||
that.succesTx = {
|
||||
title: that.info.appoint_title,
|
||||
content:that.info.appoint_msg,
|
||||
@@ -465,6 +465,7 @@
|
||||
that.msgisShowReg = false
|
||||
//提交成功
|
||||
that.msgisShowSuccess = true
|
||||
that.ukeyPath = '/pages/lottery/index?encrypt=2711aed73199217a59b968b74883710e&weshop_key=k44f71a&liche_ukey='+response.data.ukey
|
||||
that.succesTx = {
|
||||
title: that.info.appoint_title,
|
||||
content:that.info.appoint_msg,
|
||||
@@ -483,7 +484,7 @@
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: response.msg
|
||||
});
|
||||
})
|
||||
}
|
||||
},'json')
|
||||
}
|
||||
|
||||
@@ -7,5 +7,5 @@
|
||||
*/
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$config['host'] = '192.168.0.16';
|
||||
$config['host'] = '192.168.0.53';
|
||||
$config['port'] = 6379;
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user