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
f17ef9f0
Commit
f17ef9f0
authored
Dec 20, 2018
by
christ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
isjson
parent
59669158
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
216 additions
and
152 deletions
+216
-152
ApiConst.php
application/library/Our/ApiConst.php
+1
-1
Common.php
application/library/Our/Common.php
+199
-148
ShareService.php
application/models/Business/User/ShareService.php
+16
-3
No files found.
application/library/Our/ApiConst.php
View file @
f17ef9f0
...
...
@@ -368,7 +368,7 @@ class ApiConst
//等于0表示没有选中地址时是选中当前传入经纬度,等于1表示没有命中地址是选中地址列表中按照is_default desc,address_id desc倒序的第一条地址
const
defaultAddressRoute
=
0
;
const
shareLimitProgrameError
=
40001
;
const
addGoodsToCart
=
1
;
//将商品加入购物车
const
addBundingToCart
=
2
;
//将组合销售商品加入购物车
const
positionPickupCodeBegin
=
12
;
...
...
application/library/Our/Common.php
View file @
f17ef9f0
This diff is collapsed.
Click to expand it.
application/models/Business/User/ShareService.php
View file @
f17ef9f0
...
...
@@ -127,9 +127,14 @@ class ShareServiceModel extends \Business\AbstractModel
$scene
=
\Our\Common
::
format
(
\Our\PathConst
::
wxStoreParams
,
$data
[
'id'
]);
$page
=
\Our\PathConst
::
wxStorePath
;
$res
=
$this
->
getQrcode
(
$page
,
$scene
);
// var_dump($res);exit;
// header('Content-type: image/jpg');
// echo $res;exit;
if
(
Common
::
isJson
(
$res
)){
$res
=
json_decode
(
$res
,
true
);
if
(
$res
[
'errcode'
]
==
ApiConst
::
shareLimitProgrameError
){
$memberRedis
=
\Redis\Db0\MemberRedisModel
::
getInstance
();
$memberRedis
->
tableDel
(
'wechatAccessToken'
);
$res
=
$this
->
getQrcode
(
$page
,
$scene
);
}
}
$fileName
=
md5
(
$res
);
//$fileName=$fileName.NameConst::jpgSuffix;
// $base64image=$this->dataUri($res,ImageConst::imagePgn);
...
...
@@ -153,6 +158,14 @@ class ShareServiceModel extends \Business\AbstractModel
$scene
=
\Our\Common
::
format
(
\Our\PathConst
::
wxGoodsParams
,
$data
[
'id'
]);
$page
=
\Our\PathConst
::
wxStorePath
;
$res
=
$this
->
getQrcode
(
$page
,
$scene
);
if
(
Common
::
isJson
(
$res
)){
$res
=
json_decode
(
$res
,
true
);
if
(
$res
[
'errcode'
]
==
ApiConst
::
shareLimitProgrameError
){
$memberRedis
=
\Redis\Db0\MemberRedisModel
::
getInstance
();
$memberRedis
->
tableDel
(
'wechatAccessToken'
);
$res
=
$this
->
getQrcode
(
$page
,
$scene
);
}
}
// var_dump($res);exit;
// header('Content-type: image/jpg');
// echo $res;exit;
...
...
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