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
59669158
Commit
59669158
authored
Dec 20, 2018
by
christ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pc
parent
8ac5af8f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
PathConst.php
application/library/Our/PathConst.php
+2
-1
ShareService.php
application/models/Business/User/ShareService.php
+7
-1
No files found.
application/library/Our/PathConst.php
View file @
59669158
...
@@ -17,7 +17,8 @@ class PathConst {
...
@@ -17,7 +17,8 @@ class PathConst {
const
wxGoodsParams
=
"id=
{
0
}
"
;
const
wxGoodsParams
=
"id=
{
0
}
"
;
//1:店铺小程序二维码生成路径,2:商品小程序二维码路径
//1:店铺小程序二维码生成路径,2:商品小程序二维码路径
const
wxStorePath
=
"pages/shops/home/index"
;
const
wxStorePath
=
"pages/shops/home/index"
;
const
wxGoodsPath
=
"pages/products/home/index"
;
const
wxGoodsPath
=
"pages/products/details/index"
;
// const wxGoodsPath="pages/goods/home/index";
//默认小程序的图片
//默认小程序的图片
const
wxDefaultPath
=
"/data/img/qrcode.jpg"
;
const
wxDefaultPath
=
"/data/img/qrcode.jpg"
;
//下载app的页面
//下载app的页面
...
...
application/models/Business/User/ShareService.php
View file @
59669158
...
@@ -127,6 +127,9 @@ class ShareServiceModel extends \Business\AbstractModel
...
@@ -127,6 +127,9 @@ class ShareServiceModel extends \Business\AbstractModel
$scene
=
\Our\Common
::
format
(
\Our\PathConst
::
wxStoreParams
,
$data
[
'id'
]);
$scene
=
\Our\Common
::
format
(
\Our\PathConst
::
wxStoreParams
,
$data
[
'id'
]);
$page
=
\Our\PathConst
::
wxStorePath
;
$page
=
\Our\PathConst
::
wxStorePath
;
$res
=
$this
->
getQrcode
(
$page
,
$scene
);
$res
=
$this
->
getQrcode
(
$page
,
$scene
);
// var_dump($res);exit;
// header('Content-type: image/jpg');
// echo $res;exit;
$fileName
=
md5
(
$res
);
$fileName
=
md5
(
$res
);
//$fileName=$fileName.NameConst::jpgSuffix;
//$fileName=$fileName.NameConst::jpgSuffix;
// $base64image=$this->dataUri($res,ImageConst::imagePgn);
// $base64image=$this->dataUri($res,ImageConst::imagePgn);
...
@@ -148,8 +151,11 @@ class ShareServiceModel extends \Business\AbstractModel
...
@@ -148,8 +151,11 @@ class ShareServiceModel extends \Business\AbstractModel
if
((
$data
[
'shareType'
]
==
ApiConst
::
shareWxFriend
||
$data
[
'shareType'
]
==
ApiConst
::
shareWxFriends
)){
if
((
$data
[
'shareType'
]
==
ApiConst
::
shareWxFriend
||
$data
[
'shareType'
]
==
ApiConst
::
shareWxFriends
)){
if
(
\Our\ApiConst
::
isWxPublish
){
if
(
\Our\ApiConst
::
isWxPublish
){
$scene
=
\Our\Common
::
format
(
\Our\PathConst
::
wxGoodsParams
,
$data
[
'id'
]);
$scene
=
\Our\Common
::
format
(
\Our\PathConst
::
wxGoodsParams
,
$data
[
'id'
]);
$page
=
\Our\PathConst
::
wx
Goods
Path
;
$page
=
\Our\PathConst
::
wx
Store
Path
;
$res
=
$this
->
getQrcode
(
$page
,
$scene
);
$res
=
$this
->
getQrcode
(
$page
,
$scene
);
// var_dump($res);exit;
// header('Content-type: image/jpg');
// echo $res;exit;
$fileName
=
md5
(
$res
);
$fileName
=
md5
(
$res
);
//$fileName=$fileName.NameConst::jpgSuffix;
//$fileName=$fileName.NameConst::jpgSuffix;
// $base64image=$this->dataUri($res,ImageConst::imagePgn);
// $base64image=$this->dataUri($res,ImageConst::imagePgn);
...
...
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