<?php
/**
 * Created by PhpStorm.
 * User: guanxl
 * Date: 2018/9/28
 * Time: 11:41
 */

namespace App\Http\Controllers;

use App\Models\Corp;
use App\Services\BrainstormingService;
use App\Services\UserService;
use Illuminate\Support\Facades\Cookie;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Models\User;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Redis;

class DingtalkController extends BaseController
{
    /**
     * 钉钉E应用活动入口链接
     * @param Request $request
     */
    public function index(Request $request){
        $url = "dingtalk://dingtalkclient/action/open_mini_app?miniAppId=2018112862350270&page=page%2Factivity%2Fview%2Fview%3Fpageurl%3Dhttps%3A%2F%2Factivity.dingteam.com%2Fbrainstorming%3Factivity_id%3D".$request->get("activity_id")."%26pagetitle%3D%E5%8F%AE%E5%BD%93%E7%AD%94%E9%A2%98%E5%88%9D%E4%BD%93%E9%AA%8C%EF%BC%88%E7%A4%BA%E4%BE%8B%E6%B4%BB%E5%8A%A8%EF%BC%89%26pagedesc%3D%E5%8F%82%E4%B8%8E%E6%B4%BB%E5%8A%A8%E8%B5%A2%E5%8F%96%E4%B8%B0%E5%8E%9A%E5%A5%96%E5%93%81~%26sharepage%3D1";
        header("location:".$url);
    }
}