1 Commits

Author SHA1 Message Date
lccsw c27fce37ca 东风EX 2022-05-16 09:44:57 +08:00
16 changed files with 198 additions and 31 deletions
+15 -4
View File
@@ -18,7 +18,7 @@ class Login extends CI_Controller
header('Location:/welcome'); header('Location:/welcome');
} }
$this->load->view('login'); $this->load->view('login_sms');
} }
public function post() public function post()
@@ -39,13 +39,16 @@ class Login extends CI_Controller
$cookie = $this->input->cookie(LOGIN_CODE_COOKIE); $cookie = $this->input->cookie(LOGIN_CODE_COOKIE);
$code_cookie = $this->encryption->decrypt($cookie); $code_cookie = $this->encryption->decrypt($cookie);
if (!$code_cookie) { if (!$code_cookie) {
return $this->show_json(0, '验证码已过期'); return $this->show_json(0, '请输入正确验证码');
} }
if ($code_cookie != $code) { if ($code_cookie != $code) {
return $this->show_json(0, '验证码错误'); return $this->show_json(0, '验证码错误');
} }
$this->load->model('sys/sys_admin_model'); $this->load->model('sys/sys_admin_model');
$admin_user = $this->sys_admin_model->get(array("mobile = '{$mobile}'" => null, 'status' => 1)); $admin_user = $this->sys_admin_model->get(array("mobile" => $mobile, 'status' => 1));
if(!$admin_user){
return $this->show_json(0, '用户不存在');
}
$log = 1; $log = 1;
} else { } else {
if (!$username) { if (!$username) {
@@ -116,6 +119,11 @@ class Login extends CI_Controller
{ {
if ($this->input->method() == 'post') { if ($this->input->method() == 'post') {
$mobile = $this->input->post('mobile', true); $mobile = $this->input->post('mobile', true);
$this->load->model('sys/sys_admin_model');
$admin_user = $this->sys_admin_model->get(array("mobile" => $mobile, 'status' => 1));
if(!$admin_user){
return $this->show_json(SYS_CODE_FAIL, '请输入正确手机号');
}
$code = rand(100000, 999999); $code = rand(100000, 999999);
$domain = explode('.', $_SERVER['HTTP_HOST']); $domain = explode('.', $_SERVER['HTTP_HOST']);
@@ -123,7 +131,10 @@ class Login extends CI_Controller
$domain = implode('.', $domain); $domain = implode('.', $domain);
$this->input->set_cookie(LOGIN_CODE_COOKIE, $this->encryption->encrypt(json_encode($code)), 60 * 5, $domain); $this->input->set_cookie(LOGIN_CODE_COOKIE, $this->encryption->encrypt(json_encode($code)), 60 * 5, $domain);
send_sms($mobile, $code); // send_sms($mobile, $code);
$content = "【东创宝】您的验证码为:{$code},请勿泄露于他人!";
b2m_send_sms($mobile,$content);
return $this->show_json(SYS_CODE_SUCCESS, '验证码已发送');
} }
} }
+1 -1
View File
@@ -84,7 +84,7 @@ class Main extends HD_Controller
); );
$value = $this->mdPolyvSession->count(); $value = $this->mdPolyvSession->count();
$list[] = array( $list[] = array(
'title' => '保利威直播-场次报表', 'title' => '直播-场次报表',
'value' => $value, 'value' => $value,
'btns' => array( 'btns' => array(
array('name' => '查看详情', 'url' => '/live/polyv'), array('name' => '查看详情', 'url' => '/live/polyv'),
@@ -785,10 +785,10 @@ class Orders extends HD_Controller
$last_p_row && $this->app_liche_orders_model->update(['status'=>1],['id'=>$last_p_row['id']]);//完成未支付尾款 $last_p_row && $this->app_liche_orders_model->update(['status'=>1],['id'=>$last_p_row['id']]);//完成未支付尾款
$this->orders_status_entity->set_status($row['id'],0,2); $this->orders_status_entity->set_status($row['id'],0,2);
} }
if(!$this->order_contracts_model->count(['o_id'=>$row['id']])){ //生成合同 // if(!$this->order_contracts_model->count(['o_id'=>$row['id']])){ //生成合同
$url = http_host_com('api').'/pdfapi/add_pdf?oid='.$row['id']; // $url = http_host_com('api').'/pdfapi/add_pdf?oid='.$row['id'];
$pdf_res = file_get_contents($url); // $pdf_res = file_get_contents($url);
} // }
if($row['order_time'] == '0000-00-00 00:00:00'){ //更新下定时间 if($row['order_time'] == '0000-00-00 00:00:00'){ //更新下定时间
$this->receiver_orders_v2_model->update(['order_time' => date('Y-m-d H:i:s',strtotime($pay_time))], ['id' => $row['id']]); $this->receiver_orders_v2_model->update(['order_time' => date('Y-m-d H:i:s',strtotime($pay_time))], ['id' => $row['id']]);
} }
+2 -2
View File
@@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<title>狸车</title> <title>东风EV</title>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content=""> <meta name="description" content="">
@@ -39,7 +39,7 @@
<div class="coms-layout-header"> <div class="coms-layout-header">
<div class="bars-nav"><i class="am-icon-bars"></i>导航</div> <div class="bars-nav"><i class="am-icon-bars"></i>导航</div>
<a href="" class="logo" style=""> <a href="" class="logo" style="">
<img src="/static/images/common/logo.png" style="height:40px"> <img src="/static/images/common/logo.png?v2" style="height:40px">
</a> </a>
<?php if ($menus) { ?> <?php if ($menus) { ?>
<ul class="header-nav"> <ul class="header-nav">
+4
View File
@@ -184,6 +184,7 @@
</a> </a>
</span> </span>
</th> </th>
<!--
<th width="17%"> <th width="17%">
<span :class="'order'+('addr_id'==params.order?' order-on':' order-none')"> <span :class="'order'+('addr_id'==params.order?' order-on':' order-none')">
<a href="javascript:void(0)" @click="set_order('addr_id')"> <a href="javascript:void(0)" @click="set_order('addr_id')">
@@ -193,6 +194,7 @@
</a> </a>
</span> </span>
</th> </th>
-->
<th width="10%"> <th width="10%">
<span :class="'order'+('in_time'==params.order?' order-on':' order-none')"> <span :class="'order'+('in_time'==params.order?' order-on':' order-none')">
<a href="javascript:void(0)" @click="set_order('in_time')"> <a href="javascript:void(0)" @click="set_order('in_time')">
@@ -225,7 +227,9 @@
<a href="javascript:void(0);" :data-modal="'/items/goods/goods/get_info?id='+v.id" <a href="javascript:void(0);" :data-modal="'/items/goods/goods/get_info?id='+v.id"
data-title="详情">{{v.vin}}</a> data-title="详情">{{v.vin}}</a>
</td> </td>
<!--
<td>{{v.address}}</td> <td>{{v.address}}</td>
-->
<td>{{v.in_time}}</td> <td>{{v.in_time}}</td>
<td style="display: none">{{v.auto_fine}}</td> <td style="display: none">{{v.auto_fine}}</td>
<td>{{v.company_name}}</td> <td>{{v.company_name}}</td>
+144
View File
@@ -0,0 +1,144 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" 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>东风EV</title>
<link rel="stylesheet" href="/static/css/login.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>
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/mDialog.js"></script>
</head>
<body>
<div id="app" class="login relative">
<div class="absolute login-con">
<div class="inpu-bg">
<input class="wp100 int-sty font-16" type="tel" v-model="telPhone" placeholder="请输入手机号" />
</div>
<div class="mt20 inpu-bg pr120 relative">
<input class="wp100 int-sty font-16" type="number" v-model="vCode" placeholder="请输入验证码" />
<button class="absolute right-0 box-middle mr15 bg-none border-none font-16 color-00e9ff" :disabled="!codeState" @click="getcode()">{{codeTx}}</button>
</div>
<button class="mt30 lgbtn font-36 color-00e9ff" @click="submit()"> </button>
</div>
</div>
<script type="text/javascript">
var app = new Vue({
el: '#app',
data: {
telPhone:'',
vCode:'',
codeState:true,
codeTx:'获取验证码',
isSubmiting: false,
},
computed: {
},
mounted() {
var Timer;
},
beforeDestroy() {
},
methods: {
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() {
var that = this
if (!/^1[3456789]\d{9}$/.test(this.telPhone)) {
//alert('请输入正确手机号')
mDialog.msg({
duration: 250,
pause: 2000,
content: "请输入正确手机号"
});
} else {
$.ajax({
'url': '/login/get_code',
'method': 'post',
'type': 'json',
'data': {mobile: this.telPhone},
success: function (data) {
//按钮倒计时
mDialog.msg({
duration: 250,
pause: 2000,
content: data.msg
});
if(data.code){
that.countDownTime(61)
}
}
})
}
},
submit() {
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;
$.ajax({
'url': '/login/post',
'method': 'post',
'type': 'json',
'data': {'mobile': this.telPhone,'code':that.vCode,'need_code':'login'},
success: function (data) {
if(data.code){
window.location.href = '/';
}else{
mDialog.msg({
duration: 250,
pause: 2000,
content: data.msg
});
}
that.isSubmiting = false;
}
})
}
},
},
})
</script>
</body>
</html>
-6
View File
@@ -32,12 +32,6 @@ class Xzcall extends HD_Controller
debug_log("start function:" . __FUNCTION__, $this->log_file); debug_log("start function:" . __FUNCTION__, $this->log_file);
$data = $this->input->post(); $data = $this->input->post();
debug_log('data:' . json_encode($data, JSON_UNESCAPED_UNICODE), $this->log_file); debug_log('data:' . json_encode($data, JSON_UNESCAPED_UNICODE), $this->log_file);
if($data['virtualMobile']=='13391247942'){ //推送test环境
$url = "https://api.lc.haodian.cn/plan/xzcall";
$res = $this->mycurl->httpPost($url,$data);
debug_log('结束,推送test环境:'.json_encode($res,JSON_UNESCAPED_UNICODE), $this->log_file);
exit;
}
if ($data && $data['seqId']) { if ($data && $data['seqId']) {
$row = $this->receiver_xz_model->get(array('call_id' => $data['seqId'])); $row = $this->receiver_xz_model->get(array('call_id' => $data['seqId']));
if ($row) { if ($row) {
+5 -3
View File
@@ -41,7 +41,9 @@ class Sms extends Wxapp{
$mc->save($key, $code, 600); $mc->save($key, $code, 600);
} }
if($mobile!='15359333655'){//测试号码 if($mobile!='15359333655'){//测试号码
send_sms($mobile,$code,'狸车宝'); // send_sms($mobile,$code,'狸车宝');
$content = "【东创宝】您的验证码为:{$code},请勿泄露于他人!";
b2m_send_sms($mobile,$content);
} }
$msg = '发送成功'; $msg = '发送成功';
//$msg = $code; //$msg = $code;
@@ -64,7 +66,7 @@ class Sms extends Wxapp{
throw new Exception('该客户不可操作', ERR_PARAMS_ERROR); throw new Exception('该客户不可操作', ERR_PARAMS_ERROR);
} }
$mobile = $row['mobile']; $mobile = $row['mobile'];
$content = '【狸车】'.$content; $content = '【东创宝】'.$content;
b2m_send_sms($mobile,$content); b2m_send_sms($mobile,$content);
$this->load->library('receiver/customers_entity'); $this->load->library('receiver/customers_entity');
$this->customers_entity->add_log_visit($id,$uid,$this->session['uname'],$content,1,1); $this->customers_entity->add_log_visit($id,$uid,$this->session['uname'],$content,1,1);
@@ -85,7 +87,7 @@ class Sms extends Wxapp{
throw new Exception('参数错误', ERR_PARAMS_ERROR); throw new Exception('参数错误', ERR_PARAMS_ERROR);
} }
$mobile = $row['mobile']; $mobile = $row['mobile'];
$content = '【狸车】'.$content; $content = '【东创宝】'.$content;
b2m_send_sms($mobile,$content); b2m_send_sms($mobile,$content);
$this->load->library('receiver/customers_entity'); $this->load->library('receiver/customers_entity');
$this->customers_entity->add_log($row['id'],$uid,$this->session['uname'],$content,1); $this->customers_entity->add_log($row['id'],$uid,$this->session['uname'],$content,1);
+1 -1
View File
@@ -40,7 +40,7 @@ class Sytactivity extends Wxapp
protected function get_tabs() protected function get_tabs()
{ {
$data['title'] = '私域通'; $data['title'] = '私域通';
$data['bg_img'] = 'https://qs.haodian.cn/wechat_app/lichebao/siyutong/theme.jpg?v=220207'; $data['bg_img'] = 'https://qs.haodian.cn/wechat_app/dongfeng/siyutong/theme.jpg?v=220207';
// $bm_count = $this->mdSytActivityKpiData->count(['kpi' => 'enroll']); // $bm_count = $this->mdSytActivityKpiData->count(['kpi' => 'enroll']);
// $dd_count = $this->mdCustomers->count(['status' => 1, 'cf_id' => $this->cf_id]); // $dd_count = $this->mdCustomers->count(['status' => 1, 'cf_id' => $this->cf_id]);
// $xd_count = $this->mdCustomers->count(['status' => 2, 'cf_id' => $this->cf_id]); // $xd_count = $this->mdCustomers->count(['status' => 2, 'cf_id' => $this->cf_id]);
+14 -3
View File
@@ -57,9 +57,20 @@ class Xz extends Wxapp{
$seq_id = create_order_no(); $seq_id = create_order_no();
$result = ''; $result = '';
//循环绑定 //循环绑定
// $xcall = new Xcall($params);
// $maxBindingTime = 10;//绑定时间
// $result = $xcall -> ABXbind($user_mobile, $customer_mobile,$seq_id,$maxBindingTime);
$xcall = new Xcall($params); $xcall = new Xcall($params);
$maxBindingTime = 10;//绑定时间 $middleNumber = '13391247942';
$result = $xcall -> ABXbind($user_mobile, $customer_mobile,$seq_id,$maxBindingTime); $result = $xcall->SWbind($customer_mobile, $seq_id, $middleNumber);
if ($result['t_code'] == '-26') {//已经绑定解绑
$s_res = $xcall->Searchbind($middleNumber);
$bined_mobile = $s_res['data']['value'];//已绑定手机号
if ($bined_mobile) {
$xcall->SWunbind($bined_mobile, $middleNumber);//解绑
$result = $xcall->SWbind($customer_mobile, $seq_id, $middleNumber);
}
}
if(!$result['code']){ //绑定失败 if(!$result['code']){ //绑定失败
debug_log("xz_failed_bind:customer_mobile【{$customer_mobile}", $this->log_file); debug_log("xz_failed_bind:customer_mobile【{$customer_mobile}", $this->log_file);
debug_log("xz_result:" . json_encode($result, JSON_UNESCAPED_UNICODE), $this->log_file); debug_log("xz_result:" . json_encode($result, JSON_UNESCAPED_UNICODE), $this->log_file);
@@ -79,7 +90,7 @@ class Xz extends Wxapp{
]; ];
$this->receiver_xz_model->add($add_data); $this->receiver_xz_model->add($add_data);
$call_mobile = $result['data']['virtualMobile']; $call_mobile = $result['data']['virtualMobile'];
$redis->save($cache_key, $call_mobile, $maxBindingTime*60); // $redis->save($cache_key, $call_mobile, $maxBindingTime*60);
} }
} }
$data['mobile'] = $call_mobile; $data['mobile'] = $call_mobile;
+2 -2
View File
@@ -73,7 +73,7 @@ class Home extends Wxapp
array_multisort($timeKey, SORT_DESC, $list);//排序,根据$total 排序 array_multisort($timeKey, SORT_DESC, $list);//排序,根据$total 排序
} }
} }
$list[] = ['id' => 3, 'name' => '狸车'];//全品牌蓄客 // $list[] = ['id' => 3, 'name' => '狸车'];//全品牌蓄客
$this->data['title'] = '推广素材'; $this->data['title'] = '推广素材';
$this->data['list'] = $list; $this->data['list'] = $list;
$this->data['list_type'] = [['id' => 4, 'name' => '图片'], ['id' => 1, 'name' => '视频']]; $this->data['list_type'] = [['id' => 4, 'name' => '图片'], ['id' => 1, 'name' => '视频']];
@@ -272,7 +272,7 @@ class Home extends Wxapp
*/ */
protected function get_biz_posters() protected function get_biz_posters()
{ {
$url = 'https://qs.haodian.cn/wechat_app/lichebao/distribute'; $url = 'https://qs.haodian.cn/wechat_app/dongfeng/distribute';
$lists = [ $lists = [
['title' => '店铺常规模板', 'cover' => $url . '/md-0.jpg', 'type' => 0, 'tpHeight' => 10, 'ftHeight' => 350, ['title' => '店铺常规模板', 'cover' => $url . '/md-0.jpg', 'type' => 0, 'tpHeight' => 10, 'ftHeight' => 350,
'marginLR' => 10, 'posterBg' => '', 'posterFt' => $url . '/posterFt-0.jpg', 'bgColor' => '#fff', 'color' => '#fff'], 'marginLR' => 10, 'posterBg' => '', 'posterFt' => $url . '/posterFt-0.jpg', 'bgColor' => '#fff', 'color' => '#fff'],
+2 -2
View File
@@ -947,11 +947,11 @@ if (!function_exists('http_host_com')) {
} }
} else { // 正式 } else { // 正式
if ($type == 'api') { if ($type == 'api') {
$url = 'https://api.liche.cn'; $url = 'https://api.lc.haodian.cn';
} else if ($type == 'home') { } else if ($type == 'home') {
$url = "https://www.liche.cn"; $url = "https://www.liche.cn";
} else if ($type == 'admin') { } else if ($type == 'admin') {
$url = "https://admin.liche.cn"; $url = "https://dfev.liche.cn";
} }
} }
return $url; return $url;
+2 -2
View File
@@ -15,9 +15,9 @@ class Qyrobot{
private $ci; private $ci;
public function __construct($params=[]){ public function __construct($params=[]){
$this->ci = & get_instance(); $this->ci = & get_instance();
if($_SERVER['CI_ENV'] == 'development' || $params['test']){ //测试环境 // if($_SERVER['CI_ENV'] == 'development' || $params['test']){ //测试环境
$this->key = '0b644923-4e5c-46be-9a87-6dfcb023d09c'; $this->key = '0b644923-4e5c-46be-9a87-6dfcb023d09c';
} // }
} }
/** /**
* 支付定金推送消息 * 支付定金推送消息
@@ -11,7 +11,7 @@ class Orders_v2_entity{
const PRICE_FINANCE = 1000; //金融服务费写死 const PRICE_FINANCE = 1000; //金融服务费写死
const PRICE_FINANCE_NZ = 2000; //哪吒金融服务费 const PRICE_FINANCE_NZ = 2000; //哪吒金融服务费
const API_PAY_IMG = 'https://img.liche.cn/liche/2022/04/22ed0636993504bc/18ad8baab11b2891.png'; //api 跳转支付二维码 const API_PAY_IMG = 'https://img.liche.cn/liche/2022/04/22ed0636993504bc/18ad8baab11b2891.png'; //api 跳转支付二维码
const V2_START_ID = 10000; //升级后订单开始 const V2_START_ID = 0; //升级后订单开始
private $ci; private $ci;
public $local_bill_citys = ['350200','350500','350100']; //厦门、泉州、福州 显示本地开票按钮 public $local_bill_citys = ['350200','350500','350100']; //厦门、泉州、福州 显示本地开票按钮
File diff suppressed because one or more lines are too long
Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 29 KiB