SchoolPhysicalExamination/application/NewReedaw/controller/app/Business.php

36 lines
1.2 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace app\NewReedaw\controller\app;
use think\Db;
use Exception;
class Business extends Base{
public function business_cooperation(){
return $this->fetch();
}
public function business_cooperation_action(){
$data = input();
$result = Db::table('admin_business_cooperation_log')->insert([
'name'=>$data['name'],
'tel'=>$data['phone'],
'company'=>$data['company'],
'intention_data'=>implode(',',$data['selectedValues']),
'notes_data'=>$data['remark'],
'create_time'=>date('Y-m-d H:i:s'),
]);
if($result){
$this->send_email_api_error(["19759414@qq.com"],['title'=>'商户合作','from_user_name'=>'reedaw商务','content'=>'有一封商户合作']);
// $this->send_email_api_error(["tsf3920322@126.com"],['title'=>'商户合作','from_user_name'=>'reedaw商务','content'=>'有一封商户合作']);
return json(['code'=>0,'msg'=>'提交成功']);
}else{
return json(['code'=>10001,'msg'=>'网络错误']);
// return json(['code'=>10001,'msg'=>'网络错误,请直接联系商务合作电话/微信13590959084']);
}
}
}