parent
3d82929a3b
commit
da4f152438
@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
namespace app\index\controller;
|
||||||
|
|
||||||
|
use think\Controller;
|
||||||
|
use think\Db;
|
||||||
|
use \app\index\model\Option;
|
||||||
|
use \app\index\model\User;
|
||||||
|
use think\Session;
|
||||||
|
use \app\index\model\FileManage;
|
||||||
|
|
||||||
|
class Viewer extends Controller{
|
||||||
|
|
||||||
|
public $userObj;
|
||||||
|
|
||||||
|
public function _initialize(){
|
||||||
|
// $this->userObj = new User(cookie('user_id'),cookie('login_key'));
|
||||||
|
// if(!$this->userObj->loginStatus){
|
||||||
|
// $this->redirect(url('/Login','',''));
|
||||||
|
// exit();
|
||||||
|
// }
|
||||||
|
$this->userObj = new User(cookie('user_id'),cookie('login_key'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function Video(){
|
||||||
|
$path = input("get.path");
|
||||||
|
$pathSplit = explode("/",urldecode($path));
|
||||||
|
$userInfo = $this->userObj->getInfo();
|
||||||
|
$groupData = $this->userObj->getGroupData();
|
||||||
|
return view('video', [
|
||||||
|
'options' => Option::getValues(['basic']),
|
||||||
|
'userInfo' => $userInfo,
|
||||||
|
'groupData' => $groupData,
|
||||||
|
'url' => "/File/Preview?action=preview&path=".$path,
|
||||||
|
'fileName' => end($pathSplit),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,72 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-cn">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<link rel="shortcut icon" href="/favicon.ico">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
|
<!--
|
||||||
|
manifest.json provides metadata used when your web app is added to the
|
||||||
|
homescreen on Android. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||||
|
-->
|
||||||
|
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
|
||||||
|
<!--
|
||||||
|
Notice the use of %PUBLIC_URL% in the tags above.
|
||||||
|
It will be replaced with the URL of the `public` folder during the build.
|
||||||
|
Only files inside the `public` folder can be referenced from the HTML.
|
||||||
|
|
||||||
|
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
||||||
|
work correctly both with client-side routing and a non-root public URL.
|
||||||
|
Learn how to configure a non-root public URL by running `npm run build`.
|
||||||
|
-->
|
||||||
|
<title>我的文件 - {$options.siteName}</title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
isHomePage = false,
|
||||||
|
apiURL={
|
||||||
|
imgThumb:"/File/Thumb",
|
||||||
|
preview:"/File/Preview",
|
||||||
|
download:"/File/Download",
|
||||||
|
docPreiview:'/File/DocPreview',
|
||||||
|
};
|
||||||
|
userInfo={
|
||||||
|
uid:{$userInfo.uid},
|
||||||
|
nick:"{$userInfo.userNick}",
|
||||||
|
email:"{$userInfo.userMail}",
|
||||||
|
group:"{$userInfo.groupData.group_name}",
|
||||||
|
groupId:{$userInfo.groupData.id},
|
||||||
|
groupColor:"{$userInfo.groupData.color}",
|
||||||
|
};
|
||||||
|
siteInfo = {
|
||||||
|
mainTitle:"{$fileName}",
|
||||||
|
};
|
||||||
|
videoInfo={
|
||||||
|
url:"{$url}",
|
||||||
|
name:"{$fileName}"
|
||||||
|
};
|
||||||
|
mediaType = {},
|
||||||
|
isMobile = window.innerWidth<600;
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<noscript>
|
||||||
|
You need to enable JavaScript to run this app.
|
||||||
|
</noscript>
|
||||||
|
<div id="root"></div>
|
||||||
|
<!--
|
||||||
|
This HTML file is a template.
|
||||||
|
If you open it directly in the browser, you will see an empty page.
|
||||||
|
|
||||||
|
You can add webfonts, meta tags, or analytics to this file.
|
||||||
|
The build step will place the bundled scripts into the <body> tag.
|
||||||
|
|
||||||
|
To begin the development, run `npm start` or `yarn start`.
|
||||||
|
To create a production bundle, use `npm run build` or `yarn build`.
|
||||||
|
-->
|
||||||
|
</body>
|
||||||
|
<script src="http://192.168.123.19:3000/static/js/runtime~video.bundle.js"></script><script src="http://192.168.123.19:3000/static/js/5.chunk.js"></script>
|
||||||
|
<script src="http://192.168.123.19:3000/static/js/0.chunk.js"></script>
|
||||||
|
<script src="http://192.168.123.19:3000/static/js/4.chunk.js"></script>
|
||||||
|
<script src="http://192.168.123.19:3000/static/js/9.chunk.js"></script>
|
||||||
|
<script src="http://192.168.123.19:3000/static/js/1.chunk.js"></script>
|
||||||
|
<script src="http://192.168.123.19:3000/static/js/video.chunk.js"></script>
|
||||||
|
</html>
|
Loading…
Reference in new issue