1, 'title' => "助友图片格式转换器", ]; public function __construct() { parent::__construct(); } /** * 首页 */ public function index() { $deviceType = Request::input('type'); // '操作系统类型 windows linux android ios if (!in_array($deviceType, ['windows', 'linux', 'android', 'ios'])) { $deviceType = 'windows'; } // 获取下载地址,然后跳转 $info = DB::table('product_version') ->where('os_type', $deviceType) ->where('id', $this->softInfo['id']) ->where('status', 1) ->orderBy('id', 'desc') ->first(); if (empty($info)) { $url = '/'; } else { $url = $info->download_url; } return responseMessage(1001, '', $url); } }