Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
纵之格
ShopXO
提交
0492be9b
ShopXO
项目概览
纵之格
/
ShopXO
通知
394
Star
16
Fork
11
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
0492be9b
编写于
1月 14, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
二维码url处理
上级
b8a3fe72
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
6 addition
and
3 deletion
+6
-3
application/index/controller/Goods.php
application/index/controller/Goods.php
+3
-0
application/index/controller/Qrcode.php
application/index/controller/Qrcode.php
+1
-1
application/index/view/default/goods/index.html
application/index/view/default/goods/index.html
+1
-1
extend/payment/Weixin.php
extend/payment/Weixin.php
+1
-1
未找到文件。
application/index/controller/Goods.php
浏览文件 @
0492be9b
...
...
@@ -71,6 +71,9 @@ class Goods extends Common
$this
->
assign
(
'goods'
,
$goods
[
0
]);
$this
->
assign
(
'home_seo_site_title'
,
$goods
[
0
][
'title'
]);
// 二维码
$this
->
assign
(
'qrcode_url'
,
MyUrl
(
'index/qrcode/index'
,
[
'content'
=>
urlencode
(
base64_encode
(
MyUrl
(
'index/goods/index'
,
[
'id'
=>
$id
],
true
,
true
)))]));
// 商品访问统计
GoodsService
::
GoodsAccessCountInc
([
'goods_id'
=>
$id
]);
...
...
application/index/controller/Qrcode.php
浏览文件 @
0492be9b
...
...
@@ -38,7 +38,7 @@ class QrCode extends Common
$level
=
isset
(
$params
[
'level'
])
&&
in_array
(
$params
[
'level'
],
array
(
'L'
,
'M'
,
'Q'
,
'H'
))
?
$params
[
'level'
]
:
'L'
;
$point_size
=
isset
(
$params
[
'size'
])
?
min
(
max
(
intval
(
$params
[
'size'
]),
1
),
10
)
:
6
;
$mr
=
isset
(
$params
[
'mr'
])
?
intval
(
$params
[
'mr'
])
:
1
;
$content
=
isset
(
$params
[
'content'
])
?
urldecode
(
trim
(
$params
[
'content'
]
))
:
__MY_URL__
;
$content
=
isset
(
$params
[
'content'
])
?
base64_decode
(
urldecode
(
trim
(
$params
[
'content'
])
))
:
__MY_URL__
;
\
QRcode
::
png
(
$content
,
false
,
$level
,
$point_size
,
$mr
);
}
}
...
...
application/index/view/default/goods/index.html
浏览文件 @
0492be9b
...
...
@@ -100,7 +100,7 @@
<div
class=
"goods-qrcode am-hide-sm-only"
>
<span>
手机扫一扫购买
</span>
<i
class=
"am-icon-qrcode am-icon-sm"
></i>
<img
class=
"qrcode-images am-img-thumbnail"
src=
"{{
:MyUrl('index/qrcode/index', ['content'=>urlencode(MyUrl('index/goods/index', ['id'=>$goods['id']], true, true))])
}}"
/>
<img
class=
"qrcode-images am-img-thumbnail"
src=
"{{
$qrcode_url
}}"
/>
</div>
</div>
...
...
extend/payment/Weixin.php
浏览文件 @
0492be9b
...
...
@@ -172,7 +172,7 @@ class Weixin
// web支付
case
'NATIVE'
:
$pay_params
=
[
'url'
=>
urlencode
(
$data
[
'code_url'
]
),
'url'
=>
urlencode
(
base64_encode
(
$data
[
'code_url'
])
),
'order_no'
=>
$params
[
'order_no'
],
'name'
=>
urlencode
(
'微信支付'
),
'msg'
=>
urlencode
(
'打开微信APP扫一扫进行支付'
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录