修复无法发送短信BUG

dev
曾超新 5 years ago
parent 5b71471ce5
commit bd70c22332
  1. 40
      frontend/controllers/CarController.php
  2. 6
      frontend/views/car/order-add.php

@ -4572,30 +4572,30 @@ class CarController extends BaseController
$result['msg'] = '生成失败';
$order_id = $request->post('order_id');
$company2_id = $request->post('company2_id');
$company_id = $request->post('company_id');
// $company2_name = InsurerCompany2T::findOne($company2_id)->name;
$company2_name ='';
if($company2_id == 1){
$company2_name = '人保车险';
}elseif ($company2_id ==8){
$company2_name = '平安车险';
$company_name ='';
if($company_id == 1){
$company_name = '人保车险';
}elseif ($company_id ==8){
$company_name = '平安车险';
}elseif ($company2_id == 4){
$company2_name = '太平洋车险';
}elseif ($company2_id ==7){
$company2_name = '人寿车险';
}elseif ($company_id == 4){
$company_name = '太平洋车险';
}elseif ($company_id ==7){
$company_name = '人寿车险';
}
$company2 ='';
if($company2_id == 1){
$company2 = '人保';
}elseif ($company2_id == 8){
$company2 = '平安';
$company ='';
if($company_id == 1){
$company = '人保';
}elseif ($company_id == 8){
$company = '平安';
}elseif ($company2_id == 4){
$company2 = '太平洋';
}elseif ($company2_id == 7){
$company2 = '太平洋';
}elseif ($company_id == 4){
$company = '太平洋';
}elseif ($company_id == 7){
$company = '太平洋';
}
// var_dump($order_id);
@ -4617,7 +4617,7 @@ class CarController extends BaseController
$insurer_type_items = InsurerTypeT::find()->all();
$msg = '【'.$company2_name.'】尊敬的'.$car_info->car_no.'客户您好:'.$company2.$this->my->name.'为您报价:';
$msg = '【'.$company_name.'】尊敬的'.$car_info->car_no.'客户您好:'.$company.$this->my->name.'为您报价:';
$msg .= '交强、';
if($total3 > 0) {
$msg .= '车船税、';

@ -539,7 +539,7 @@ use common\models\PriceT;
//生成短信内容
$('.sms-make-btn').click(function(){
var params = $('#orderFrm').serialize();
var baoxiangs=$('#company2_id').val();
var baoxiangs=$('#company_id').val();
var smstel=$('#sms-tel').val();
if(isNull(smstel)){
@ -563,7 +563,7 @@ use common\models\PriceT;
$('.sms-send-btn').click(function(){
var tel = $('#sms-tel').val();
var msg = $('#sms-msg').val();
var baoxiangs=$('#company2_id').val();
var baoxiangs=$('#company_id').val();
var smstel=$('#sms-tel').val();
var smsmsg=$('#sms-msg').val();
@ -581,7 +581,7 @@ use common\models\PriceT;
}
// return;
$.post('/car/sms-send',{tel:tel,msg:msg,company2_id:baoxiangs},function(obj){
$.post('/car/sms-send',{tel:tel,msg:msg,company_id:baoxiangs},function(obj){
parent.layer.msg(obj.msg);
},'json');
});

Loading…
Cancel
Save