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
24361181
Commit
24361181
authored
Nov 21, 2018
by
zhz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sale
parent
7f4e0e5c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
SalespersonService.php
application/models/Business/User/SalespersonService.php
+2
-0
Store.php
application/models/DAO/Store.php
+4
-2
No files found.
application/models/Business/User/SalespersonService.php
View file @
24361181
...
@@ -110,6 +110,7 @@ class SalespersonServiceModel extends \Business\AbstractModel
...
@@ -110,6 +110,7 @@ class SalespersonServiceModel extends \Business\AbstractModel
'qrCode'
=>
$qrCode
,
'qrCode'
=>
$qrCode
,
'memberName'
=>
$storeInfo
[
'store_name'
],
'memberName'
=>
$storeInfo
[
'store_name'
],
'memberAvatarUrl'
=>
$storeLabel
,
'memberAvatarUrl'
=>
$storeLabel
,
'memberAvatarUrlR20'
=>
$storeModelDAO
->
getStoreLabelSrc
(
$storeInfo
[
'store_label'
],
''
,
''
,
true
)
.
'?x-oss-process=image/rounded-corners,r_20'
,
'goods'
=>
$goods
?
array
(
$goods
)
:
$goods
'goods'
=>
$goods
?
array
(
$goods
)
:
$goods
];
];
}
}
...
@@ -145,6 +146,7 @@ class SalespersonServiceModel extends \Business\AbstractModel
...
@@ -145,6 +146,7 @@ class SalespersonServiceModel extends \Business\AbstractModel
'qrCode'
=>
$qrCode
,
'qrCode'
=>
$qrCode
,
'memberName'
=>
$storeInfo
[
'store_name'
],
'memberName'
=>
$storeInfo
[
'store_name'
],
'memberAvatarUrl'
=>
$storeLabel
,
'memberAvatarUrl'
=>
$storeLabel
,
'memberAvatarUrlR20'
=>
$storeModelDAO
->
getStoreLabelSrc
(
$storeInfo
[
'store_label'
],
''
,
''
,
true
)
.
'?x-oss-process=image/rounded-corners,r_20'
,
'goods'
=>
$data
?
array
(
$data
)
:
$data
'goods'
=>
$data
?
array
(
$data
)
:
$data
];
];
$hashData
[
$saleGoods
[
$id
]][
$saleGoods
[
$id
]
.
'_'
.
$memberId
]
=
$qrCode
;
$hashData
[
$saleGoods
[
$id
]][
$saleGoods
[
$id
]
.
'_'
.
$memberId
]
=
$qrCode
;
...
...
application/models/DAO/Store.php
View file @
24361181
...
@@ -83,7 +83,7 @@ class StoreModel extends \DAO\AbstractModel
...
@@ -83,7 +83,7 @@ class StoreModel extends \DAO\AbstractModel
* @param $storeLabel
* @param $storeLabel
* @return string
* @return string
*/
*/
public
function
getStoreLabelSrc
(
$storeLabel
,
$width
=
\Our\ImageConst
::
circleStoreLabel
,
$height
=
0
)
public
function
getStoreLabelSrc
(
$storeLabel
,
$width
=
\Our\ImageConst
::
circleStoreLabel
,
$height
=
0
,
$original
=
false
)
{
{
$width
=
ceil
(
$width
*
\Our\ImageConst
::
sizeScale
);
$width
=
ceil
(
$width
*
\Our\ImageConst
::
sizeScale
);
$height
?
$height
=
ceil
(
$height
*
\Our\ImageConst
::
sizeScale
)
:
$height
=
$width
;
$height
?
$height
=
ceil
(
$height
*
\Our\ImageConst
::
sizeScale
)
:
$height
=
$width
;
...
@@ -92,7 +92,9 @@ class StoreModel extends \DAO\AbstractModel
...
@@ -92,7 +92,9 @@ class StoreModel extends \DAO\AbstractModel
}
else
{
}
else
{
$storeLabel
=
\Our\Common
::
getStaticFile
(
ImageConst
::
defaultStoreLabelName
,
ImageConst
::
defaultPath
);
$storeLabel
=
\Our\Common
::
getStaticFile
(
ImageConst
::
defaultStoreLabelName
,
ImageConst
::
defaultPath
);
}
}
$storeLabel
.=
"?x-oss-process=image/resize,m_fill,h_
{
$height
}
,w_
{
$width
}
"
;
if
(
$original
==
false
)
{
$storeLabel
.=
"?x-oss-process=image/resize,m_fill,h_
{
$height
}
,w_
{
$width
}
"
;
}
return
$storeLabel
;
return
$storeLabel
;
}
}
/**
/**
...
...
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