支付宝接口
This commit is contained in:
65
app/logs/controller/Index.php
Normal file
65
app/logs/controller/Index.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace app\logs\controller;
|
||||
|
||||
use app\logs\model\Logs;
|
||||
use app\logs\model\User;
|
||||
use fastphp\base\Controller;
|
||||
|
||||
class Index extends Controller
|
||||
{
|
||||
public function export()
|
||||
{
|
||||
$data = json_decode(file_get_contents("php://input"),true);
|
||||
if(!$data){
|
||||
die;
|
||||
}
|
||||
die;
|
||||
// $logs = new Logs();
|
||||
// $logs->add($data);
|
||||
}
|
||||
|
||||
//点击客户管理
|
||||
public function clickVipInfo(){
|
||||
$data = json_decode(file_get_contents("php://input"),true);
|
||||
if(!$data){
|
||||
die;
|
||||
}
|
||||
$user = new User();
|
||||
$list = json_encode($user->getUserList());
|
||||
$data['info'] = $list;
|
||||
$data['create_time'] = date('Y-m-d H:i:s',time());
|
||||
$logs = new Logs();
|
||||
$status = $logs->add($data);
|
||||
if($status){
|
||||
echo json_encode(['Code'=>20000,]);
|
||||
}
|
||||
}
|
||||
|
||||
//点击客户信息产品账号//点击客户更多联系方式//点击客户信息会员价
|
||||
public function clickInfo(){
|
||||
$data = json_decode(file_get_contents("php://input"),true);
|
||||
if(!$data){
|
||||
die;
|
||||
}
|
||||
$user = new User();
|
||||
$info = $user->getOne(['id'=>$data['userid']]);
|
||||
$data['info'] = $info['LoginCode'];
|
||||
$data['create_time'] = date('Y-m-d H:i:s',time());
|
||||
unset($data['userid']);
|
||||
$logs = new Logs();
|
||||
$logs->add($data);
|
||||
echo json_encode(['Code'=>20000,]);
|
||||
}
|
||||
|
||||
public function hoveInfo(){
|
||||
$data = json_decode(file_get_contents("php://input"),true);
|
||||
if(!$data){
|
||||
die;
|
||||
}
|
||||
$data['create_time'] = date('Y-m-d H:i:s',time());
|
||||
$logs = new Logs();
|
||||
$logs->add($data);
|
||||
echo json_encode(['Code'=>20000,]);
|
||||
}
|
||||
}
|
||||
11
app/logs/model/Logs.php
Normal file
11
app/logs/model/Logs.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace app\logs\model;
|
||||
|
||||
use fastphp\base\Model;
|
||||
|
||||
class Logs extends Model
|
||||
{
|
||||
protected $table = 'logs';
|
||||
}
|
||||
19
app/logs/model/User.php
Normal file
19
app/logs/model/User.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace app\logs\model;
|
||||
|
||||
use fastphp\base\Model;
|
||||
|
||||
class User extends Model
|
||||
{
|
||||
protected $table = 'user';
|
||||
|
||||
public function getUserList(){
|
||||
return $this->field('LoginCode')->order('id desc')->limit('50')->fetchAll();
|
||||
}
|
||||
|
||||
public function getOne($where){
|
||||
return $this->field('LoginCode')->where($where)->fetch();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user