Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenchuanwen
my-yaf-project
Commits
54c7adfd
Commit
54c7adfd
authored
Nov 24, 2018
by
christ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
share
parent
1c9093fe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
28 deletions
+43
-28
Index.php
application/controllers/Index.php
+43
-27
ShareService.php
application/models/Business/User/ShareService.php
+0
-1
No files found.
application/controllers/Index.php
View file @
54c7adfd
...
...
@@ -22,33 +22,49 @@ class IndexController extends \Our\Controller_Abstract {
return
false
;
}
public
function
getHtmlAction
(){
$this
->
req
=
$this
->
getRequest
()
->
getQuery
();
$postData
=
$this
->
req
;
$postData
=
base64_decode
(
$postData
[
\Our\NameConst
::
sessionKey
]);
$params
=
explode
(
\Our\PathConst
::
cutVertical
,
$postData
);
$this
->
key
=
$params
[
0
];
session_id
(
$this
->
key
);
$this
->
sess
=
\Yaf\Session
::
getInstance
();
$this
->
sess
->
start
();
if
(
$this
->
sess
[
'key'
]
!=
$this
->
key
){
echo
'error auth!'
;
exit
;
// ErrorModel::throwException(CodeConfigModel::authExpire);
}
$this
->
memberDb0Redis
=
\Redis\Db0\MemberRedisModel
::
getInstance
();
$paramsStr
=
$this
->
memberDb0Redis
->
tablelpop
(
$this
->
key
);
$paramsStr
=
json_decode
(
$paramsStr
,
true
);
$this
->
_view
->
assign
(
"params"
,
$paramsStr
);
if
(
$paramsStr
[
'type'
]
==
\Our\ApiConst
::
sharePlat
){
$this
->
_view
->
display
(
'index/plat.phtml'
);
}
if
(
$paramsStr
[
'type'
]
==
\Our\ApiConst
::
shareStore
){
$this
->
_view
->
display
(
'index/store.phtml'
);
}
if
(
$paramsStr
[
'type'
]
==
\Our\ApiConst
::
shareGoods
){
$this
->
_view
->
display
(
'index/goods.phtml'
);
}
if
(
$paramsStr
[
'type'
]
==
\Our\ApiConst
::
shareSaler
){
// $this->req=$this->getRequest()->getQuery();
// $postData=$this->req;
// $postData=base64_decode($postData[\Our\NameConst::sessionKey]);
// $params=explode(\Our\PathConst::cutVertical,$postData);
// $this->key=$params[0];
// session_id($this->key);
// $this->sess=\Yaf\Session::getInstance();
// $this->sess->start();
// if($this->sess['key']!=$this->key){
// echo 'error auth!';
// exit;
// // ErrorModel::throwException(CodeConfigModel::authExpire);
// }
// $this->memberDb0Redis=\Redis\Db0\MemberRedisModel::getInstance();
// $paramsStr= $this->memberDb0Redis->tablelpop($this->key);
// $paramsStr=json_decode($paramsStr,true);
// $this->_view->assign("params", $paramsStr);
// if($paramsStr['type']==\Our\ApiConst::sharePlat){
// $this->_view->display('index/plat.phtml');
// }
// if($paramsStr['type']==\Our\ApiConst::shareStore){
// $this->_view->display('index/store.phtml');
// }
// if($paramsStr['type']==\Our\ApiConst::shareGoods){
// $this->_view->display('index/goods.phtml');
// }
$paramsStr
=
array
();
if
(
true
){
$paramsStr
=
json_decode
(
'{
"deviceWidth": "828",
"id": "1050001",
"key": "023ea558dedda70eb275e43d745244d0",
"qrCode": "https://img.shenbd.com/mall/salesman_qr/168.png",
"shareType": "2",
"timestamp": "1543036500",
"type": "4",
"driverType": 2,
"address": "展进巷60号福远文创园",
"imgUrl": "https://img.shenbd.com/mall/store/05961129412631243.jpg?x-oss-process=image/resize,m_fill,h_186,w_186",
"storeName": "鲜花专卖店",
"desc": "新店开业专卖鲜花的店铺,为您提供最新鲜漂亮的鲜花"
}'
,
true
);
$this
->
_view
->
assign
(
"params"
,
$paramsStr
);
$this
->
_view
->
display
(
'index/saleShare.phtml'
);
}
exit
;
...
...
application/models/Business/User/ShareService.php
View file @
54c7adfd
...
...
@@ -139,7 +139,6 @@ class ShareServiceModel extends \Business\AbstractModel
$saveImageName
=
ImageUtil
::
getFileName
()
.
\Our\NameConst
::
jpgSuffix
;
$saveFile
=
$savePath
.
$saveImageName
;
$shell
=
\Our\Common
::
format
(
"
{
0
}
--crop-w 750 --width 750
{
1
}
{
2
}
"
,
$command
,
$convertUrl
,
$saveFile
);
echo
$shell
;
exit
;
system
(
$shell
,
$status
);
if
(
$status
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
shareGrowImageError
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment