Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
纵之格
ShopXO
提交
59070118
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 搜索 >>
提交
59070118
编写于
4月 07, 2020
作者:
D
devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
订单取货码改为图片、公共下载目录优化
上级
22a16fa5
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
47 addition
and
13 deletion
+47
-13
application/install/view/index/check.html
application/install/view/index/check.html
+4
-4
application/service/AppMiniService.php
application/service/AppMiniService.php
+7
-4
application/service/OrderService.php
application/service/OrderService.php
+34
-4
config/shopxo.php
config/shopxo.php
+1
-1
extend/base/Qrcode.php
extend/base/Qrcode.php
+1
-0
未找到文件。
application/install/view/index/check.html
浏览文件 @
59070118
...
...
@@ -208,18 +208,18 @@
<?php endif ?>
</td>
</tr>
<tr
class=
"<?php if(is_writable(ROOT.'public/download
/sourcecode
')){ echo 'yes'; } else { echo 'am-danger'; } ?>"
>
<td>
./public/download
/sourcecode
</td>
<tr
class=
"<?php if(is_writable(ROOT.'public/download')){ echo 'yes'; } else { echo 'am-danger'; } ?>"
>
<td>
./public/download
</td>
<td>
可写
</td>
<td>
<?php if (is_writable(ROOT.'public/download
/sourcecode
')): ?>
<?php if (is_writable(ROOT.'public/download')): ?>
可写
<?php else: ?>
不可写
<?php endif ?>
</td>
<td>
<?php if (is_writable(ROOT.'public/download
/sourcecode
')): ?>
<?php if (is_writable(ROOT.'public/download')): ?>
√
<?php else: ?>
×
...
...
application/service/AppMiniService.php
浏览文件 @
59070118
...
...
@@ -116,16 +116,19 @@ class AppMiniService
return
DataReturn
(
'配置信息不能为空'
,
-
1
);
}
// 源码包目录是否存在
// 源码目录不存在则创建
\
base\FileUtil
::
CreateDir
(
self
::
$new_root
);
// 源码目标目录是否存在
if
(
!
is_dir
(
self
::
$new_root
))
{
return
DataReturn
(
'源码
包
目录不存在['
.
self
::
$new_root
.
']'
,
-
1
);
return
DataReturn
(
'源码
目标
目录不存在['
.
self
::
$new_root
.
']'
,
-
1
);
}
// 源码
包目录是否
有权限
// 源码
目标目录没
有权限
if
(
!
is_writable
(
self
::
$new_root
))
{
return
DataReturn
(
'源码
包
目录没有权限['
.
self
::
$new_root
.
']'
,
-
1
);
return
DataReturn
(
'源码
目标
目录没有权限['
.
self
::
$new_root
.
']'
,
-
1
);
}
// 目录不存在则创建
...
...
application/service/OrderService.php
浏览文件 @
59070118
...
...
@@ -778,7 +778,7 @@ class OrderService
// 自提模式 添加订单取货码
if
(
$v
[
'order_model'
]
==
2
)
{
$v
[
'extraction_data'
]
=
self
::
OrdersExtractionData
(
$v
[
'id'
]);
$v
[
'extraction_data'
]
=
self
::
OrdersExtractionData
(
$v
[
'id'
]
,
$v
[
'user_id'
]
);
}
}
...
...
@@ -928,19 +928,49 @@ class OrderService
* @version 1.0.0
* @date 2019-11-26
* @desc description
* @param [int] $order_id [订单id]
* @param [int] $order_id [订单id]
* @param [int] $user_id [用户id]
*/
private
static
function
OrdersExtractionData
(
$order_id
)
private
static
function
OrdersExtractionData
(
$order_id
,
$user_id
)
{
// 必须返回的内容格式
$result
=
[
'code'
=>
null
,
'images'
=>
null
,
];
// 获取取货码
$code
=
Db
::
name
(
'OrderExtractionCode'
)
->
where
([
'order_id'
=>
$order_id
])
->
value
(
'code'
);
if
(
!
empty
(
$code
))
{
$result
[
'code'
]
=
$code
;
$result
[
'images'
]
=
MyUrl
(
'index/qrcode/index'
,
[
'content'
=>
urlencode
(
base64_encode
(
$code
))]);
// 生成二维码参数
$qrcode_params
=
[
'content'
=>
$code
,
'root_path'
=>
ROOT
.
'public'
,
'path'
=>
DS
.
'download'
.
DS
.
'order'
.
DS
.
'extraction_ode'
.
DS
,
'filename'
=>
$user_id
.
'_'
.
$order_id
.
'.png'
,
];
// 图片不存在则去生成二维码图片并保存至目录
$file
=
$qrcode_params
[
'root_path'
]
.
$qrcode_params
[
'path'
]
.
$qrcode_params
[
'filename'
];
if
(
!
file_exists
(
$file
))
{
$ret
=
(
new
\
base\Qrcode
())
->
Create
(
$qrcode_params
);
if
(
$ret
[
'code'
]
==
0
)
{
$result
[
'images'
]
=
$qrcode_params
[
'path'
]
.
$qrcode_params
[
'filename'
];
}
}
else
{
$result
[
'images'
]
=
$qrcode_params
[
'path'
]
.
$qrcode_params
[
'filename'
];
}
// 展示地址处理
if
(
!
empty
(
$result
[
'images'
]))
{
$result
[
'images'
]
=
ResourcesService
::
AttachmentPathViewHandle
(
$result
[
'images'
]);
}
}
return
$result
;
}
...
...
config/shopxo.php
浏览文件 @
59070118
...
...
@@ -15,7 +15,7 @@
return
[
// 开发模式
'is_develop'
=>
fals
e
,
'is_develop'
=>
tru
e
,
// 默认编码
'default_charset'
=>
'utf-8'
,
...
...
extend/base/Qrcode.php
浏览文件 @
59070118
...
...
@@ -66,6 +66,7 @@ class Qrcode
ob_clean
();
}
\
QRcode
::
png
(
$content
,
false
,
$level
,
$point_size
,
$mr
);
die
;
}
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录