Files
2024-10-29 14:04:59 +08:00

37 lines
812 B
PHP
Executable File

<?php
/**
* Created by PhpStorm.
* User: ORICO
* Date: 2018-12-10
* Time: 13:48
*/
namespace app\us\controller;
use think\Controller;
use think\Session;
class ClickSum extends Controller {
public function add_click() {
$data = $this->request->post();
// tiaoshi($data);die;
if (empty($data) || !is_array($data)) {
return $this->json(-1, '数据错误');
}
$insert_data = [
'content_id' => $data['content_id'],
'type' => $data['type'],
'customer_id' => $data['customer_id'],
'country_code' => $data['country_code'],
'url' => $data['url'],
'click_ip' => get_ip(),
'create_time' => date('Y-m-d H:i:s')
];
model('click_sum')->insert($insert_data);
}
}