diff --git a/application/common.php b/application/common.php index 55d22f2..ef9ab6a 100644 --- a/application/common.php +++ b/application/common.php @@ -10,3 +10,36 @@ // +---------------------------------------------------------------------- // 应用公共文件 + + +/** + * CURL post数据 + * @param $url + * @param $data + * @param array $urlParam + * @param array $header + * @return mixed + */ +function curlPost( $url, $data, $urlParam = [], $header = [] ){ + $ch = curl_init(); + if( !empty($urlParam) ){ + $url = $url.'?'.http_build_query($urlParam); + } + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, $data); + + if( !empty($header) ){ + $headerStrArr = []; + foreach ($header as $key => $value){ + $headerStrArr[] = "$key: $value"; + } + curl_setopt($ch, CURLOPT_HTTPHEADER, $headerStrArr); + } + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_HEADER, 0); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_URL, $url); + $return = curl_exec($ch); + curl_close($ch); + return $return; +} \ No newline at end of file diff --git a/application/index/controller/Base.php b/application/index/controller/Base.php index 69bc57f..905103f 100644 --- a/application/index/controller/Base.php +++ b/application/index/controller/Base.php @@ -9,5 +9,18 @@ namespace app\index\controller; use think\Controller; class Base extends Controller { + protected $uid; + public function _initialize(){ + //初始化系统 + $this->uid = session('uid'); + if( !isset($this->uid) || empty($this->uid) ){ + $this->redirect('User/index'); + } + + //控制器初始化 + if(method_exists($this,'_myInitialize')){ + $this->_myInitialize(); + } + } } \ No newline at end of file diff --git a/application/index/controller/Help.php b/application/index/controller/Help.php new file mode 100644 index 0000000..0078374 --- /dev/null +++ b/application/index/controller/Help.php @@ -0,0 +1,20 @@ + + */ + +namespace app\index\controller; + + +class Help extends Base { + public function index(){ + $this->display(); + } + public function pro1(){ + $this->display(); + } + public function pro2(){ + $this->display(); + } +} \ No newline at end of file diff --git a/application/index/controller/Index.php b/application/index/controller/Index.php index 091dfdb..ba38993 100644 --- a/application/index/controller/Index.php +++ b/application/index/controller/Index.php @@ -7,7 +7,16 @@ namespace app\index\controller; class Index extends Base { - public function index() { + protected $uid; + public function index(){ +// $proList = D('BuyLog')->where(['uid' => $this->uid])->select(); + $proList = []; + $proNum = count($proList); + if( $proNum ){ + $this->assign('proList', $proList); + } + $this->assign('proNum', $proNum); + return $this->fetch(); } } diff --git a/application/index/controller/Product.php b/application/index/controller/Product.php new file mode 100644 index 0000000..3fb7dd3 --- /dev/null +++ b/application/index/controller/Product.php @@ -0,0 +1,50 @@ + + */ + +namespace app\index\controller; + + +class Product extends Base { + public function index(){ + $this->assign('pro',config('PROVINCE')); + $this->display(); + } + public function buy(){ + $data = $this->request->post(); + $data['uid'] = $this->uid; + $data['addTime'] = time(); + if( $data['type'] != 2 ){ + if( empty($data['email']) ){ + $this->error('电子邮箱不能为空!', '', true); + }else{ + if( !preg_match('/^[a-z]([a-z0-9]*[-_]?[a-z0-9]+)*@([a-z0-9]*[-_]?[a-z0-9]+)+[\.][a-z]{2,3}([\.][a-z]{2})?$/i', $data['email']) ){ + $this->error('手机号码不合法!', '', true); + } + } + if( empty($data['location']) ){ + $this->error('地区不能为空!', '', true); + } + if( empty($data['name']) ){ + $this->error('姓名不能为空!', '', true); + } + if( empty($data['city']) ){ + $this->error('所在城市不能为空!', '', true); + } + }else{ + $data['status'] = 1; + } +// $isBuy = D('BuyLog')->where(['uid' => $this->uid, 'proName' => $data['proName'], 'status' => 0])->count(); +// if( $isBuy ){ +// $this->error('请勿重复操作!', '', true); +// } +// $res = D('BuyLog')->add($data); +// if( $res === false ){ +// $this->error('操作失败!', '', true); +// }else{ +// $this->success('信息提交成功!', U('Index/index'), true); +// } + } +} \ No newline at end of file diff --git a/application/index/controller/User.php b/application/index/controller/User.php index 38160e5..204953b 100644 --- a/application/index/controller/User.php +++ b/application/index/controller/User.php @@ -6,10 +6,154 @@ */ namespace app\index\controller; -use \think\Controller; -class User extends Controller { +use extend\StrOrg; + +class User extends Base { public function index(){ - echo 11111; + return $this->fetch(); + } + + public function login(){ + if( $this->request->isPost() ){ + $user = $this->request->post('user'); + $pwd = $this->request->post('password'); + if( empty($user) ){ + $this->error('手机号不能为空!', '', true); + }else{ + if( !preg_match('/^1(3[0-9]|4[57]|5[0-35-9]|7[01678]|8[0-9])\\d{8}$/', $user) ){ + $this->error('手机号不合法!', '', true); + } + } + if( empty($pwd) ){ + $this->error('密码不能为空!', '', true); + } + $hashArr = $this->getAuthStr(); + $userData = [ + 'Account' => $user, + 'Password' => $pwd, + 'Type' => 3 + ]; + $userData = json_encode($userData); + $res = curlPost(config('API_HOST').config('API_USER_LOGIN'), $userData, $hashArr, ['Content-Type' => 'application/json']); + $resArr = json_decode($res , true); + if( $resArr['data']['Id'] == 0 ){ + $this->error($resArr['data']['Message'], '', true); + }else{ + session('uid', $resArr['data']['Id']); + session('phone', $user); + $this->success('登录成功!', url('Index/index'), true); + } + }else{ + $this->error('非法操作','', true); + } + } + + public function getCode(){ + if( $this->request->isPost() ){ + $user = $this->request->post('user'); + if( empty($user) ){ + $this->result(['status' => -999], -999); + } + $hashArr = $this->getAuthStr(); + $userData = [ + 'Account' => $user + ]; + $userData = json_encode($userData); + $nextTime = cache('nextTime');$now = time(); + if( $nextTime <= $now ){ + $res = curlPost(config('API_HOST').config('API_USER_CODE'), $userData, $hashArr, ['Content-Type' => 'application/json']); + $resArr = json_decode($res , true); + if( $resArr['status'] != 200 ){ + $this->error($resArr['message']); + }else{ + $nextTime = $now + 55; + cache('nextTime', $nextTime); + $this->result(['status' => 200], 200); + } + }else{ + $this->error('请勿频繁操作', '', true); + } + }else{ + $this->error('非法操作', '', true); + } + } + + public function register(){ + if( $this->request->isPost()){ + $user = $this->request->post('user'); + $pwd = $this->request->post('password'); + $code = $this->request->post('code'); + if( empty($user) ){ + $this->error('手机号码不能为空!', '', true); + }else{ + if( !preg_match('/^1(3[0-9]|4[57]|5[0-35-9]|7[01678]|8[0-9])\\d{8}$/', $user) ){ + $this->error('手机号码不合法!', '', true); + } + } + if( empty($pwd) ){ + $this->error('密码不能为空!', '', true); + } + if( empty($code) ){ + $this->error('验证码不能为空!', '', true); + } + $hashArr = $this->getAuthStr(); + $userData = [ + 'Account' => $user, + 'Password' => $pwd, + 'Code' => $code + ]; + $userData = json_encode($userData); + $res = curlPost(config('API_HOST').config('API_USER_REGISTER'), $userData, $hashArr, ['Content-Type' => 'application/json']); + $resArr = json_decode($res , true); + if( $resArr['data']['Id'] == 0 ){ + $this->error($resArr['data']['Message'], '', true); + }else{ + $this->success('注册成功!', url('User/index'), true); + } + }else{ + $this->display(); + } + } + + public function recover(){ + if( $this->request->isPost()){ + $user = $this->request->post('user'); + $pwd = $this->request->post('password'); + $rePwd = $this->request->post('rePassword'); + $code = $this->request->post('code'); + if( $rePwd != $pwd ){ + $this->error("两次输入密码不一致"); + } + $hashArr = $this->getAuthStr(); + $userData = [ + 'Account' => $user, + 'NewPassword' => $pwd, + 'Code' => $code + ]; + $userData = json_encode($userData); + $res = curlPost(config('API_HOST').config('API_USER_CHANGE_PWD'), $userData, $hashArr, ['Content-Type' => 'application/json']); + $resArr = json_decode($res , true); + if( $resArr['data']['Id'] == 0 ){ + $this->error($resArr['data']['Message'], '', true); + }else{ + $this->success('密码重置成功!', url('User/index'), true); + } + }else{ + $this->display(); + } + } + + private function getAuthStr(){ + $ticket = config('AUTH_TICKET'); + $nonceStr = StrOrg::randString(12,5,'oOLl01'); + $now = time(); + $hashStr = sha1("ticket={$ticket}&noncestr={$nonceStr}×tamp={$now}"); + $urlParam = [ + 's' => $hashStr, + 'n' => $nonceStr, + 't' => $now + ]; + return $urlParam; } } \ No newline at end of file diff --git a/application/index/model/User.php b/application/index/model/User.php deleted file mode 100644 index 4740910..0000000 --- a/application/index/model/User.php +++ /dev/null @@ -1,9 +0,0 @@ - + + + + + + + + + + 七维科技-用户中心 + + + + + + + {block name="myStyle"} + + {/block} + + + + + + + + +
+ +
+ +
+
+ +
+ {block name="content"}{/block} +
+
+
+ + + + + + + + + +{block name="myScript"}{/block} + + + diff --git a/application/index/view/help/index.html b/application/index/view/help/index.html new file mode 100644 index 0000000..d3e75f2 --- /dev/null +++ b/application/index/view/help/index.html @@ -0,0 +1,9 @@ +{extend name="help/base" /} +{block name="content"} +
+

Vr元年,内容缺乏,拍摄全景360°图像可以看做最快速的vr内容。

+

本产品将多目取景器实时采集的图像画面,实时缝合成高质量的全景VR图像,可实时预监,对图像画面进行实时调节,此VR视频可通过网络传输到云,在经云端编解码后,最终通过呈现端展示出来,也可本地录制保存,实时输出。

+
+

本软件运行在HP Z840 工作站为基础,加入4*2采集卡,4*1HD-SDI采集卡,i7高性能处理,16G内存,NVidia高性能图形渲染卡

+
+{/block} diff --git a/application/index/view/help/pro1.html b/application/index/view/help/pro1.html new file mode 100644 index 0000000..b34498f --- /dev/null +++ b/application/index/view/help/pro1.html @@ -0,0 +1,127 @@ +{extend name="help/base" /} +{block name="content"} +
+

引导页

+

帮助用户进行先前设定。

+

1、设备设定——为了更好的缝合效果,选择设备类型

+
+

2、拍录设定

+

设定拍录保存路径——选择拍录操作后文件保存的地址路径

+

录制码率——普通,高端,最佳的码率规格对应不同比特率,比特率是指每秒传送的比特(bit)数。比特率越高,传送数据速度越快,画质越好。

+
+

3、更多设置

+

RTMP地址——推流地址设定,RTMP是实时消息传输协议。

+

输出码率设定——每秒传输的兆数越大越清晰。码率即比特率是指每秒传送的比特(bit)数。比特率越高,传送数据速度越快,同时需要的带宽要求也就增大。

+

输出分辨率设定

+

安全距离设定——通过安全距离调整来微调畸变

+
+

功能使用

+

1、多模式预监

+ + + + + + + + + + + + + + + +

平铺模式

包球/VR模式

网格模式,单个镜头图像

+

2、调节图像

+ + + + + + + + + + + + + + + + + + + + + + + +

调色—实时手动调节,自动复位(包含:滤镜 饱和度 色调 伽玛值 亮度)

曝光—实时手动调节,自动复位

白平衡—实时手动调节,自动复位

安全距离—安全距离及时反映到预览画面,调节安全距离可改善畸变

添加logo—显示logo,选择路径,调整logo半径

+

3、输出功能

+ + + + + + + + + + + + + + + + + + + + + + + +
+

本地录制——全景视频实时录制。

+

录制前,需在引导页或设置页面中对录制参数进行设置。

+

录制中,显示录制状态,时间信息;可同时进行RTMP推流、SDI 输出、拍照。

+

注意:若正在推流,录制码率与推流码率相同。

+
+

本地拍照——拍摄全景照片,可在录制、RTMP推流、SDI输出同时进行拍照。

+
+

回看—一键打开软件自带播放器,播放器默认播放最近一次操作内容画面。右侧列表可选择之前的操作内容。

+

 注意:回放的前提是必须停止录制

+
+

RTMP推流—全景视频实时推流

+

推流前,需在引导页或设置页面中对RTMP参数进行设置。

+

推流中,显示推流信息;可同时进行录制、SDI输出、拍照。

+
+

SDI输出—全景视频实时输出

+

输出前,需在引导页或设置页面中对SDI参数进行设置。

+

输出中,显示输出信息;可同时进行录制、RTMP推流、拍照。

+

注意:SDI输出质量和RTMP推流质量一致。

+
+

4、其他

+ + + + + + + + + + + +
+

操作日志—用户操作记录

+
+

版本信息—版本号,更新信息,官网帮助

+
+

设置

+

1、设备选择:为了更好的缝合效果,更改引导页设备选择设定

+

2、拍录设置:更改引导页拍录路径码率设定或增加引导页未设定的数据

+

3、RTMP&SDI参数设置:更改引导页推流地址&输出质量设定或增加引导页未设定的

+
+{/block} diff --git a/application/index/view/help/pro2.html b/application/index/view/help/pro2.html new file mode 100644 index 0000000..1c318a9 --- /dev/null +++ b/application/index/view/help/pro2.html @@ -0,0 +1,127 @@ +{extend name="help/base" /} +{block name="myContent"> +
+

引导页

+

帮助用户进行先前设定。

+

1、设备设定——为了更好的缝合效果,选择设备类型

+
+

2、拍录设定

+

设定拍录保存路径——选择拍录操作后文件保存的地址路径

+

录制码率——普通,高端,最佳的码率规格对应不同比特率,比特率是指每秒传送的比特(bit)数。比特率越高,传送数据速度越快,画质越好。

+
+

3、更多设置

+

RTMP地址——推流地址设定,RTMP是实时消息传输协议。

+

输出码率设定——每秒传输的兆数越大越清晰。码率即比特率是指每秒传送的比特(bit)数。比特率越高,传送数据速度越快,同时需要的带宽要求也就增大。

+

输出分辨率设定

+

安全距离设定——通过安全距离调整来微调畸变

+
+

功能使用

+

1、多模式预监

+ + + + + + + + + + + + + + + +

平铺模式

包球/VR模式

网格模式,单个镜头图像

+

2、调节图像

+ + + + + + + + + + + + + + + + + + + + + + + +

调色—实时手动调节,自动复位(包含:滤镜 饱和度 色调 伽玛值 亮度)

曝光—实时手动调节,自动复位

白平衡—实时手动调节,自动复位

安全距离—安全距离及时反映到预览画面,调节安全距离可改善畸变

添加logo—显示logo,选择路径,调整logo半径

+

3、输出功能

+ + + + + + + + + + + + + + + + + + + + + + + +
+

本地录制——全景视频实时录制。

+

录制前,需在引导页或设置页面中对录制参数进行设置。

+

录制中,显示录制状态,时间信息;可同时进行RTMP推流、SDI 输出、拍照。

+

注意:若正在推流,录制码率与推流码率相同。

+
+

本地拍照——拍摄全景照片,可在录制、RTMP推流、SDI输出同时进行拍照。

+
+

回看—一键打开软件自带播放器,播放器默认播放最近一次操作内容画面。右侧列表可选择之前的操作内容。

+

 注意:回放的前提是必须停止录制

+
+

RTMP推流—全景视频实时推流

+

推流前,需在引导页或设置页面中对RTMP参数进行设置。

+

推流中,显示推流信息;可同时进行录制、SDI输出、拍照。

+
+

SDI输出—全景视频实时输出

+

输出前,需在引导页或设置页面中对SDI参数进行设置。

+

输出中,显示输出信息;可同时进行录制、RTMP推流、拍照。

+

注意:SDI输出质量和RTMP推流质量一致。

+
+

4、其他

+ + + + + + + + + + + +
+

操作日志—用户操作记录

+
+

版本信息—版本号,更新信息,官网帮助

+
+

设置

+

1、设备选择:为了更好的缝合效果,更改引导页设备选择设定

+

2、拍录设置:更改引导页拍录路径码率设定或增加引导页未设定的数据

+

3、RTMP&SDI参数设置:更改引导页推流地址&输出质量设定或增加引导页未设定的

+
+{/block} diff --git a/application/index/view/help/pro3.html b/application/index/view/help/pro3.html new file mode 100644 index 0000000..1c318a9 --- /dev/null +++ b/application/index/view/help/pro3.html @@ -0,0 +1,127 @@ +{extend name="help/base" /} +{block name="myContent"> +
+

引导页

+

帮助用户进行先前设定。

+

1、设备设定——为了更好的缝合效果,选择设备类型

+
+

2、拍录设定

+

设定拍录保存路径——选择拍录操作后文件保存的地址路径

+

录制码率——普通,高端,最佳的码率规格对应不同比特率,比特率是指每秒传送的比特(bit)数。比特率越高,传送数据速度越快,画质越好。

+
+

3、更多设置

+

RTMP地址——推流地址设定,RTMP是实时消息传输协议。

+

输出码率设定——每秒传输的兆数越大越清晰。码率即比特率是指每秒传送的比特(bit)数。比特率越高,传送数据速度越快,同时需要的带宽要求也就增大。

+

输出分辨率设定

+

安全距离设定——通过安全距离调整来微调畸变

+
+

功能使用

+

1、多模式预监

+ + + + + + + + + + + + + + + +

平铺模式

包球/VR模式

网格模式,单个镜头图像

+

2、调节图像

+ + + + + + + + + + + + + + + + + + + + + + + +

调色—实时手动调节,自动复位(包含:滤镜 饱和度 色调 伽玛值 亮度)

曝光—实时手动调节,自动复位

白平衡—实时手动调节,自动复位

安全距离—安全距离及时反映到预览画面,调节安全距离可改善畸变

添加logo—显示logo,选择路径,调整logo半径

+

3、输出功能

+ + + + + + + + + + + + + + + + + + + + + + + +
+

本地录制——全景视频实时录制。

+

录制前,需在引导页或设置页面中对录制参数进行设置。

+

录制中,显示录制状态,时间信息;可同时进行RTMP推流、SDI 输出、拍照。

+

注意:若正在推流,录制码率与推流码率相同。

+
+

本地拍照——拍摄全景照片,可在录制、RTMP推流、SDI输出同时进行拍照。

+
+

回看—一键打开软件自带播放器,播放器默认播放最近一次操作内容画面。右侧列表可选择之前的操作内容。

+

 注意:回放的前提是必须停止录制

+
+

RTMP推流—全景视频实时推流

+

推流前,需在引导页或设置页面中对RTMP参数进行设置。

+

推流中,显示推流信息;可同时进行录制、SDI输出、拍照。

+
+

SDI输出—全景视频实时输出

+

输出前,需在引导页或设置页面中对SDI参数进行设置。

+

输出中,显示输出信息;可同时进行录制、RTMP推流、拍照。

+

注意:SDI输出质量和RTMP推流质量一致。

+
+

4、其他

+ + + + + + + + + + + +
+

操作日志—用户操作记录

+
+

版本信息—版本号,更新信息,官网帮助

+
+

设置

+

1、设备选择:为了更好的缝合效果,更改引导页设备选择设定

+

2、拍录设置:更改引导页拍录路径码率设定或增加引导页未设定的数据

+

3、RTMP&SDI参数设置:更改引导页推流地址&输出质量设定或增加引导页未设定的

+
+{/block} diff --git a/application/index/view/index/index.html b/application/index/view/index/index.html index 5ab2f8a..54f3250 100644 --- a/application/index/view/index/index.html +++ b/application/index/view/index/index.html @@ -1 +1,82 @@ -Hello \ No newline at end of file +{extend name="public/base" /} +{block name="title"}用户中心{/block} +{block name="myStyle"} + +{/block} +{block name="myContent"} +
+ +
+ +
+
+ +
+

去获取Go!Pano系列产品

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
产品名称产品状态产品购买/下载订单时间
{$vo['proName']}已购买立即下载已下载购买正式版已经购买等待审核{$vo['addTime'] | date='Y-m-d H:i:s',###}
+
+ +

~您还没有购买过任何产品~
去获取产品

+
+
+
+
+{/block} +{block name="myScript"} + +{/block} \ No newline at end of file diff --git a/application/index/view/product/index.html b/application/index/view/product/index.html new file mode 100644 index 0000000..e7385fd --- /dev/null +++ b/application/index/view/product/index.html @@ -0,0 +1,321 @@ +{extend name="public/base" /} +{block name="title"}用户中心{/block} +{block name="myStyle"} + +{/block} +{block name="myContent"} +
+
+ +
+ +
+ +
+ +
+ + + + +{/block} +{block name="myScript"} + + + + +{/block} \ No newline at end of file diff --git a/application/index/view/public/base.html b/application/index/view/public/base.html new file mode 100644 index 0000000..b9da2c6 --- /dev/null +++ b/application/index/view/public/base.html @@ -0,0 +1,44 @@ + + + + + + + + + + + 七维科技-{block name="title"}{/block} + + + + + + + {block name="myStyle"}{/block} + + + + + + + + +{block name="myContent"}{/block} + + + + + + + + + +{block name="myScript"}{/block} + + + diff --git a/application/index/view/user/adminList.html b/application/index/view/user/adminList.html new file mode 100644 index 0000000..cf460a0 --- /dev/null +++ b/application/index/view/user/adminList.html @@ -0,0 +1,48 @@ + + + + + + + 七维科技-购买列表 + + + +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
用户编号购买产品用户姓名用户手机号用户所在地企业名称订单时间操作
{$vo['uid']}{$vo['proName']}{$vo['name']|default='-'}{$vo['phone']|default='-'}{$vo['city']|default='-'}{$vo['company']|default='-'}{$vo['addTime']}处理订单撤销状态
+
+ + \ No newline at end of file diff --git a/application/index/view/user/index.html b/application/index/view/user/index.html new file mode 100644 index 0000000..fc4fabb --- /dev/null +++ b/application/index/view/user/index.html @@ -0,0 +1,53 @@ +{extend name="public/base" /} +{block name="title"}用户中心{/block} +{block name="myStyle"} + +{/block} +{block name="myContent"} +
+
+ +
+ 返回七维首页 +
+

7D-VISION ID 登陆

+
+ +
+
+ +
+
+
+ +
+ +
+ +

还不是会员? 去注册7D-VISION ID

+
+
+{/block} +{block name="myScript"} + + + +{/block} \ No newline at end of file diff --git a/application/index/view/user/recover.html b/application/index/view/user/recover.html new file mode 100644 index 0000000..6703993 --- /dev/null +++ b/application/index/view/user/recover.html @@ -0,0 +1,93 @@ +{extend name="public/base" /} +{block name="title"}用户中心{/block} +{block name="myStyle"} + +{/block} +{block name="myContent"} +
+
+ +
+ 返回七维首页 +
+

找回密码

+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+ +

已是会员? 去登陆

+

不是会员? 去注册

+
+
+{/block} +{block name="myScript"} + + + + + +{/block} \ No newline at end of file diff --git a/application/index/view/user/register.html b/application/index/view/user/register.html new file mode 100644 index 0000000..fab5bdb --- /dev/null +++ b/application/index/view/user/register.html @@ -0,0 +1,100 @@ +{extend name="public/base" /} +{block name="title"}用户中心{/block} +{block name="myStyle"} + +{/block} +{block name="myContent"} +
+
+ +
+ 返回七维首页 +
+

7D-VISION ID 注册

+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+ +

已是会员? 去登陆

+
+
+{/block} +{block name="myScript"} + + + + + +{/block} \ No newline at end of file