审查视图

app/portal/controller/LoadController.php 1.5 KB
王晓刚 authored
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/6/7
 * Time: 16:48
 */

namespace app\portal\controller;


use app\portal\model\IndentModel;
use cmf\controller\HomeBaseController;

class LoadController extends HomeBaseController
{
    public function index(){
        $indentModel = new IndentModel();
        $where['state'] = ['eq',2];
        $data = $indentModel->selectData($where);
        if(!empty($data)){
            foreach($data as $key => $vo){
                $birdController = new BirdController();
                $result = $birdController->getOrder($vo['id']);
            }
        }
    }
王晓刚 authored
28
    public function test(){
王晓刚 authored
29
王晓刚 authored
30
        dump(cache('param'));
王晓刚 authored
31
        dump(cache('result'));
王晓刚 authored
32
        dump(cache('data'));
王晓刚 authored
33
    }
王晓刚 authored
34
    public function notify(){
王晓刚 authored
35
王晓刚 authored
36 37 38 39 40 41 42 43 44
        $data = file_get_contents('php://input');
        $msg  = explode("&", $data);
        foreach ($msg as $k => $v) {
            $p = explode("=", $v);
            if ($p[0] == "RequestData") {
                $result[$p[0]] = json_decode(urldecode($p[1]),true);
            } else {
                $result[$p[0]] = urldecode($p[1]);
            }
王晓刚 authored
45
        }
王晓刚 authored
46 47 48 49 50
        /*echo '<pre>';
        print_r($res);exit;*/
        $data = '{
                "EBusinessID": "'.$result['RequestData']['EBusinessID'].'",
                "UpdateTime": "'. date('Y-m-d H:i:s', time()) .'",
王晓刚 authored
51
                "Success": true,
王晓刚 authored
52
                "Reason": ""
王晓刚 authored
53
            }';
王晓刚 authored
54
        cache('data',$data);
王晓刚 authored
55
        echo $data;
王晓刚 authored
56
    }
王晓刚 authored
57
}