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
784ac7ad
Commit
784ac7ad
authored
Dec 04, 2018
by
christ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
share
parent
30bb641d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
6 deletions
+31
-6
Index.php
application/controllers/Index.php
+19
-0
ShareService.php
application/models/Business/User/ShareService.php
+1
-0
store.phtml
application/views/index/store.phtml
+11
-6
bg-code1.jpg
public/data/images/bg-code1.jpg
+0
-0
bg-code2.jpg
public/data/images/bg-code2.jpg
+0
-0
No files found.
application/controllers/Index.php
View file @
784ac7ad
...
...
@@ -38,6 +38,25 @@ class IndexController extends \Our\Controller_Abstract {
$this
->
memberDb0Redis
=
\Redis\Db0\MemberRedisModel
::
getInstance
();
$paramsStr
=
$this
->
memberDb0Redis
->
tablelpop
(
$this
->
key
);
$paramsStr
=
'{
"desc": "最优质的产品,最实惠的价格,最好的服务质量,欢迎选购",
"deviceWidth": "828",
"id": "1050000",
"imgUrl": "http://qmoss-01.oss-cn-hangzhou.aliyuncs.com/mall/store/05960231407828374.jpg?x-oss-process=image/resize,m_fill,h_186,w_186",
"key": "bda203557fcc08150fc997360d432bfa",
"shareType": "1",
"storeName": "LQ日化用品",
"timestamp": "1543913056",
"type": "2",
"driverType": 2,
"qrCode": "http://share.shenbd.com/share.html?type=store&id=1050000",
"address": "鑫雄盛快捷酒店仓山紫番林幼儿园",
"storeWorkingtime": "",
"buyerDistribution": 1,
"sellerDistribution": 1,
"startShippingPrice": 2000,
"freeShippingPrice": 0
}'
;
$paramsStr
=
json_decode
(
$paramsStr
,
true
);
$this
->
_view
->
assign
(
"params"
,
$paramsStr
);
...
...
application/models/Business/User/ShareService.php
View file @
784ac7ad
...
...
@@ -198,6 +198,7 @@ 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
);
...
...
application/views/index/store.phtml
View file @
784ac7ad
...
...
@@ -73,7 +73,7 @@
.header-c1
{
position
:
relative
;
}
.header-c2
{
padding
:
16px
4%
30px
;
}
.header
.header-bg
{
width
:
750px
;
height
:
314px
;
display
:
block
;
}
.header
.address
{
font-size
:
30px
;
position
:
absolute
;
top
:
30px
;
left
:
4%
;
padding-left
:
34px
;
}
.header
.address
{
font-size
:
30px
;
position
:
absolute
;
top
:
30px
;
left
:
4%
;
padding-left
:
34px
;
text-shadow
:
1px
1px
1px
rgba
(
255
,
255
,
255
,
.8
);
}
.header
.address
:before
{
position
:
absolute
;
content
:
''
;
width
:
24px
;
height
:
28px
;
left
:
0
;
top
:
8px
;
}
.header
.info
{
overflow
:
hidden
;
line-height
:
60px
;
}
.header
.follow
{
float
:
right
;
color
:
#ff3419
;
border
:
1px
solid
#ff3b1a
;
border
:
1px
solid
rgba
(
255
,
59
,
26
,
0.5
);
line-height
:
36px
;
padding
:
0
8px
0
36px
;
border-radius
:
18px
;
margin
:
11px
0
0
1em
;
font-size
:
20px
;
position
:
relative
;
}
...
...
@@ -96,10 +96,10 @@
.pn-share
{
padding
:
20px
4%
0
;
}
.pn-share
.code-box
{
position
:
relative
;
margin-top
:
90px
;
padding
:
0
4%
;
text-align
:
center
;
}
.pn-share
.code-box
.code-in
img
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
}
.pn-share
.code-box
.code-in
img
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
margin-left
:
-130px
;
margin-top
:
-130px
;
}
.pn-share
.code-box
.code-txt
{
position
:
absolute
;
left
:
0
;
right
:
0
;
bottom
:
-1.5em
;
text-align
:
center
;
font-size
:
22px
;
}
.pn-share
.code-box
.code1
{
width
:
320px
;
height
:
320px
;
margin-left
:
-160px
;
margin-top
:
-160px
;
}
.pn-share
.code-box
.code2
{
width
:
260px
;
height
:
260px
;
margin-left
:
-1
30px
;
margin-top
:
-130
px
;
}
.pn-share
.code-box
.code2
{
width
:
260px
;
height
:
260px
;
margin-left
:
-1
25px
;
margin-top
:
-125
px
;
}
.footer
{
color
:
#bbb
;
font-size
:
20px
;
text-align
:
center
;
margin-top
:
136px
;
padding
:
30px
0
;
}
.footer
:before
{
content
:
''
;
width
:
23px
;
height
:
28px
;
background-position
:
-60px
0
;
margin
:
0
10px
6px
0
;
}
...
...
@@ -149,8 +149,8 @@
<!-- <p class="code-txt">长按图片识别二维码</p>-->
<!-- </div>-->
<div
class=
"code-box"
>
<img
src=
"
img/app-share
/bg-code2.jpg"
alt=
""
>
<div
id=
"qrcodeImg"
class=
"code-in
code2
"
>
<img
src=
"
/data/images
/bg-code2.jpg"
alt=
""
>
<div
id=
"qrcodeImg"
class=
"code-in"
>
<!-- <img id="qrcodeImg" src="//static.shenbd.com/www/index/2018/img/app-share/code2.jpg" alt="">-->
</div>
<p
class=
"code-txt"
>
长按图片识别二维码
</p>
...
...
@@ -160,6 +160,11 @@
</div>
</body>
<script>
new
QRCode
(
document
.
getElementById
(
'qrcodeImg'
),
'
<?php
echo
$params
[
'qrCode'
];
?>
'
);
new
QRCode
(
document
.
getElementById
(
'qrcodeImg'
),
{
text
:
'
<?php
echo
$params
[
'qrCode'
];
?>
'
,
width
:
250
,
height
:
250
});
</script>
</html>
\ No newline at end of file
public/data/images/bg-code1.jpg
0 → 100644
View file @
784ac7ad
46.3 KB
public/data/images/bg-code2.jpg
0 → 100644
View file @
784ac7ad
46.2 KB
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