Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
纵之格
ShopXO
提交
e391ba54
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 搜索 >>
提交
e391ba54
编写于
8月 30, 2020
作者:
D
devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
模板细节优化
上级
26041ed1
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
60 addition
and
73 deletion
+60
-73
application/index/view/default/buy/index.html
application/index/view/default/buy/index.html
+2
-12
application/index/view/default/index/index.html
application/index/view/default/index/index.html
+2
-2
application/service/ArticleService.php
application/service/ArticleService.php
+3
-3
application/service/CustomViewService.php
application/service/CustomViewService.php
+3
-3
application/service/OrderService.php
application/service/OrderService.php
+4
-0
application/service/ResourcesService.php
application/service/ResourcesService.php
+5
-4
application/service/ToutiaoService.php
application/service/ToutiaoService.php
+10
-11
application/tags.php
application/tags.php
+0
-16
config/app.php
config/app.php
+1
-1
public/static/admin/default/css/common.css
public/static/admin/default/css/common.css
+0
-1
public/static/common/lib/ueditor/dialogs/map/map.html
public/static/common/lib/ueditor/dialogs/map/map.html
+1
-1
public/static/index/default/css/index.css
public/static/index/default/css/index.css
+3
-3
public/static/index/default/js/common.js
public/static/index/default/js/common.js
+1
-1
public/static/upload/images/article/2020/08/29/1598708276130441.jpg
...tic/upload/images/article/2020/08/29/1598708276130441.jpg
+0
-0
sourcecode/toutiao/pages/user-order/user-order.js
sourcecode/toutiao/pages/user-order/user-order.js
+25
-15
未找到文件。
application/index/view/default/buy/index.html
浏览文件 @
e391ba54
...
...
@@ -571,12 +571,7 @@ function BuySubmitBack(e)
if
(
e
.
code
==
0
)
{
$
.
AMUI
.
progress
.
done
();
if
(
$
(
window
).
width
()
<
640
)
{
PromptBottom
(
e
.
msg
,
'
success
'
,
null
,
50
);
}
else
{
PromptCenter
(
e
.
msg
,
'
success
'
);
}
Prompt
(
e
.
msg
,
'
success
'
);
setTimeout
(
function
()
{
window
.
location
.
href
=
e
.
data
.
jump_url
;
...
...
@@ -584,12 +579,7 @@ function BuySubmitBack(e)
}
else
{
$
(
'
form.form-validation
'
).
find
(
'
button[type="submit"]
'
).
button
(
'
reset
'
);
$
.
AMUI
.
progress
.
done
();
if
(
$
(
window
).
width
()
<
640
)
{
PromptBottom
(
e
.
msg
,
null
,
null
,
50
);
}
else
{
PromptCenter
(
e
.
msg
);
}
Prompt
(
e
.
msg
);
}
}
</script>
\ No newline at end of file
application/index/view/default/index/index.html
浏览文件 @
e391ba54
...
...
@@ -88,10 +88,10 @@
</div>
{{if !empty($article_list)}}
<div
class=
"banner-news"
>
<p
class=
"banner-news-title"
>
新闻头条
</p>
<p
class=
"banner-news-title
am-text-truncate
"
>
新闻头条
</p>
<ul>
{{foreach $article_list as $article}}
<li>
<li
class=
"am-text-truncate"
>
<a
href=
"{{$article.url}}"
target=
"_blank"
>
{{if isset($article['article_category_name'])}}
<span>
[
</span><p
class=
"news-category-name am-inline-block am-text-truncate"
>
{{$article.article_category_name}}
</p><span>
]
</span>
...
...
application/service/ArticleService.php
浏览文件 @
e391ba54
...
...
@@ -168,16 +168,16 @@ class ArticleService
}
// 编辑器内容
$content
=
isset
(
$params
[
'content'
])
?
htmlspecialchars_decode
(
$params
[
'content'
])
:
''
;
$content
=
empty
(
$params
[
'content'
])
?
''
:
ResourcesService
::
ContentStaticReplace
(
htmlspecialchars_decode
(
$params
[
'content'
]),
'add'
)
;
// 数据
$images
=
ResourcesService
::
RichTextMatchContent
Image
(
$content
,
'article'
);
$images
=
ResourcesService
::
RichTextMatchContent
Attachment
(
$content
,
'article'
);
$data
=
[
'title'
=>
$params
[
'title'
],
'title_color'
=>
empty
(
$params
[
'title_color'
])
?
''
:
$params
[
'title_color'
],
'article_category_id'
=>
intval
(
$params
[
'article_category_id'
]),
'jump_url'
=>
empty
(
$params
[
'jump_url'
])
?
''
:
$params
[
'jump_url'
],
'content'
=>
ResourcesService
::
ContentStaticReplace
(
$content
,
'add'
)
,
'content'
=>
$content
,
'images'
=>
empty
(
$images
)
?
''
:
json_encode
(
$images
),
'images_count'
=>
count
(
$images
),
'is_enable'
=>
isset
(
$params
[
'is_enable'
])
?
intval
(
$params
[
'is_enable'
])
:
0
,
...
...
application/service/CustomViewService.php
浏览文件 @
e391ba54
...
...
@@ -146,13 +146,13 @@ class CustomViewService
}
// 编辑器内容
$content
=
isset
(
$params
[
'content'
])
?
htmlspecialchars_decode
(
$params
[
'content'
])
:
''
;
$content
=
empty
(
$params
[
'content'
])
?
''
:
ResourcesService
::
ContentStaticReplace
(
htmlspecialchars_decode
(
$params
[
'content'
]),
'add'
)
;
// 数据
$images
=
ResourcesService
::
RichTextMatchContent
Image
(
$content
,
'customview'
);
$images
=
ResourcesService
::
RichTextMatchContent
Attachment
(
$content
,
'customview'
);
$data
=
[
'title'
=>
$params
[
'title'
],
'content'
=>
ResourcesService
::
ContentStaticReplace
(
$content
,
'add'
)
,
'content'
=>
$content
,
'images'
=>
empty
(
$images
)
?
''
:
json_encode
(
$images
),
'images_count'
=>
count
(
$images
),
'is_enable'
=>
isset
(
$params
[
'is_enable'
])
?
intval
(
$params
[
'is_enable'
])
:
0
,
...
...
application/service/OrderService.php
浏览文件 @
e391ba54
...
...
@@ -274,6 +274,10 @@ class OrderService
// 支付模块处理数据
'data'
=>
$ret
[
'data'
],
// 支付日志id
'order_id'
=>
$pay_log
[
'data'
][
'id'
],
'order_no'
=>
$pay_log
[
'data'
][
'log_no'
],
];
// 是否线下支付
...
...
application/service/ResourcesService.php
浏览文件 @
e391ba54
...
...
@@ -570,14 +570,15 @@ class ResourcesService
* @version 1.0.0
* @date 2020-06-16
* @desc description
* @param [string] $content [内容]
* @param [string] $type [模块名称]
* @param [string] $content [内容]
* @param [string] $business [业务模块名称]
* @param [string] $type [附件类型(images 图片, file 文件, video 视频)]
*/
public
static
function
RichTextMatchContent
Image
(
$content
,
$type
)
public
static
function
RichTextMatchContent
Attachment
(
$content
,
$business
,
$type
=
'images'
)
{
if
(
!
empty
(
$content
))
{
$pattern
=
'/<img.*?src=[\'|\"](\/static\/upload\/
images\/'
.
$type
.
'\/image\/.*?[\.gif|\.jpg|\.jpeg|\.png|\.bmp
])[\'|\"].*?[\/]?>/'
;
$pattern
=
'/<img.*?src=[\'|\"](\/static\/upload\/
'
.
$type
.
'\/'
.
$business
.
'\/.*?[\.png|\.jpg|\.jpeg|\.gif|\.bmp|\.flv|\.swf|\.mkv|\.avi|\.rm|\.rmvb|\.mpeg|\.mpg|\.ogg|\.ogv|\.mov|\.wmv|\.mp4|\.webm|\.mp3|\.wav|\.mid|\.rar|\.zip|\.tar|\.gz|\.7z|\.bz2|\.cab|\.iso|\.doc|\.docx|\.xls|\.xlsx|\.ppt|\.pptx|\.pdf|\.txt|\.md|\.xml
])[\'|\"].*?[\/]?>/'
;
preg_match_all
(
$pattern
,
self
::
AttachmentPathHandle
(
$content
),
$match
);
return
empty
(
$match
[
1
])
?
[]
:
$match
[
1
];
}
...
...
application/service/ToutiaoService.php
浏览文件 @
e391ba54
...
...
@@ -11,7 +11,6 @@
namespace
app\service
;
use
think\Db
;
use
app\service\PaymentService
;
use
app\service\OrderService
;
/**
...
...
@@ -56,12 +55,12 @@ class ToutiaoService
}
// 获取订单信息
$where
=
[
'id'
=>
intval
(
$params
[
'id'
]),
'user_id'
=>
$params
[
'user'
][
'id'
]];
$
order
=
Db
::
name
(
'Order
'
)
->
where
(
$where
)
->
find
();
// 支付方式
$payment_id
=
empty
(
$params
[
'payment_id'
])
?
$order
[
'payment_id'
]
:
intval
(
$params
[
'payment_id'
]
);
$payment
=
PaymentService
::
PaymentList
([
'where'
=>
[
'id'
=>
$payment_id
]]);
$where
=
[
'id'
=>
$ret
[
'data'
][
'order_id'
],
'user_id'
=>
$params
[
'user'
][
'id'
]];
$
pay_log
=
Db
::
name
(
'PayLog
'
)
->
where
(
$where
)
->
find
();
if
(
empty
(
$pay_log
))
{
return
DataReturn
(
'订单支付日志有误'
,
-
1
);
}
// 头条需要的订单信息
$order_info
=
[
...
...
@@ -73,12 +72,12 @@ class ToutiaoService
'trade_type'
=>
'H5'
,
'product_code'
=>
'pay'
,
'payment_type'
=>
'direct'
,
'out_order_no'
=>
$
order
[
'order_no'
]
.
GetNumberCode
(
6
)
,
'out_order_no'
=>
$
pay_log
[
'log_no'
]
,
'uid'
=>
md5
(
$params
[
'user'
][
'id'
]),
'total_amount'
=>
$
order
[
'total_price'
]
*
100
,
'total_amount'
=>
$
pay_log
[
'total_price'
]
*
100
,
'currency'
=>
'CNY'
,
'subject'
=>
'订单支付'
,
'body'
=>
$
order
[
'order
_no'
],
'body'
=>
$
pay_log
[
'log
_no'
],
'trade_time'
=>
time
(),
'valid_time'
=>
intval
(
MyC
(
'common_order_close_limit_time'
,
30
,
true
))
*
60
,
'notify_url'
=>
__MY_URL__
,
...
...
@@ -86,7 +85,7 @@ class ToutiaoService
// 支付方式
$service
=
1
;
switch
(
$pay
ment
[
0
]
[
'payment'
])
switch
(
$pay
_log
[
'payment'
])
{
// 微信
case
'Weixin'
:
...
...
application/tags.php
浏览文件 @
e391ba54
...
...
@@ -32,21 +32,5 @@ return array (
'log_write'
=>
array
(
),
'plugins_css'
=>
array
(
0
=>
'app\\plugins\\share\\Hook'
,
),
'plugins_js'
=>
array
(
0
=>
'app\\plugins\\share\\Hook'
,
),
'plugins_view_common_bottom'
=>
array
(
0
=>
'app\\plugins\\share\\Hook'
,
),
'plugins_view_goods_detail_photo_bottom'
=>
array
(
0
=>
'app\\plugins\\share\\Hook'
,
),
);
?>
\ No newline at end of file
config/app.php
浏览文件 @
e391ba54
...
...
@@ -19,7 +19,7 @@ return [
// 应用地址
'app_host'
=>
''
,
// 应用调试模式
'app_debug'
=>
fals
e
,
'app_debug'
=>
tru
e
,
// 应用Trace
'app_trace'
=>
false
,
// 是否支持多模块
...
...
public/static/admin/default/css/common.css
浏览文件 @
e391ba54
...
...
@@ -25,7 +25,6 @@ time, mark, audio, video {
.w100
{
width
:
100%
;}
.fw-100
{
font-weight
:
100
;}
.fw-700
{
font-weight
:
700
;}
#common-prompt
{
position
:
fixed
;
top
:
0
;
left
:
0
;
right
:
0
;
text-align
:
center
;
margin-top
:
0
;
padding
:
5px
;
font-size
:
14px
;
z-index
:
10000
;}
.am-popover
{
border-radius
:
2px
!important
;
}
.am-popover
*
{
font-size
:
12px
;}
.am-icon-trash-o
:before
{
width
:
12px
!important
;}
...
...
public/static/common/lib/ueditor/dialogs/map/map.html
浏览文件 @
e391ba54
...
...
@@ -4,7 +4,7 @@
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<title></title>
<script
type=
"text/javascript"
src=
"../internal.js"
></script>
<script
type=
"text/javascript"
src=
"https://api.map.baidu.com/api?v=2.0&ak=
{{common_baidu_map_ak}}
"
></script>
<script
type=
"text/javascript"
src=
"https://api.map.baidu.com/api?v=2.0&ak=
XSdiGjfg3wOHiKjpYEMG6CYA
"
></script>
<style
type=
"text/css"
>
.content
{
width
:
530px
;
height
:
350px
;
margin
:
10px
auto
;}
.content
table
{
width
:
100%
}
...
...
public/static/index/default/css/index.css
浏览文件 @
e391ba54
...
...
@@ -15,8 +15,8 @@ ul, li, ol {list-style: none;}
/*走马灯*/
.banner-mixed
{
position
:
relative
;
border-top
:
1px
solid
#F5F5F5
;
border-bottom
:
1px
#f5f5f5
solid
;
overflow
:
hidden
;}
.banner-news-title
{
position
:
absolute
;
left
:
10px
;
padding-right
:
10px
;
border-right
:
1px
solid
#
F5F5F5
;}
.banner-news
li
,
#banner-news
li
a
{
height
:
30px
;
line-height
:
30px
;
font-size
:
12px
;
overflow
:
hidden
;
}
.banner-news-title
{
position
:
absolute
;
left
:
10px
;
padding-right
:
10px
;
border-right
:
1px
solid
#
eee
;}
.banner-news
li
,
#banner-news
li
a
{
height
:
30px
;
line-height
:
30px
;
font-size
:
12px
;}
.banner-news
{
max-width
:
1200px
;
margin
:
0px
auto
;
overflow
:
hidden
;
height
:
30px
;
width
:
100%
;
text-align
:
left
;
color
:
#fff
;}
.news-category-name
{
line-height
:
11px
;
max-width
:
50px
;
}
.banner-news
li
{
padding
:
0
10px
0
80px
;}
...
...
@@ -173,7 +173,7 @@ text-align: center;float:none}
@media
only
screen
and
(
max-width
:
640px
)
{
.items-nav-title
{
padding
:
0
10%
;}
.banner-news-title
{
line-height
:
30px
;
height
:
30px
;
color
:
#333
;
}
.banner-news-title
{
line-height
:
30px
;
height
:
30px
;
color
:
#333
;
max-width
:
62px
;
}
.am-footer
{
padding-bottom
:
50px
;
}
/*楼层*/
...
...
public/static/index/default/js/common.js
浏览文件 @
e391ba54
console
.
log
(
"
%c
\
u5b89
\
u5168
\
u8b66
\
u544a
\
uff01
"
,
"
font-size:50px;color:red;-webkit-text-fill-color:red;-webkit-text-stroke: 1px black;
"
);
console
.
log
(
"
%c
\
u6b64
\
u6d4f
\
u89c8
\
u5668
\
u529f
\
u80fd
\
u4e13
\
u4f9b
\
u5f00
\
u53d1
\
u8005
\
u4f7f
\
u7528
\
u3002
\
u8bf7
\
u4e0d
\
u8981
\
u5728
\
u6b64
\
u7c98
\
u8d34
\
u6267
\
u884c
\
u4efb
\
u4f55
\
u5185
\
u5bb9
\
uff0c
\
u8fd9
\
u53ef
\
u80fd
\
u4f1a
\
u5bfc
\
u81f4
\
u60a8
\
u7684
\
u8d26
\
u6237
\
u53d7
\
u5230
\
u653b
\
u51fb
\
uff0c
\
u7ed9
\
u60a8
\
u5e26
\
u6765
\
u635f
\
u5931
\
uff01
"
,
"
font-size: 20px;color:#
33
3
"
);
console
.
log
(
"
%c
\
u6b64
\
u6d4f
\
u89c8
\
u5668
\
u529f
\
u80fd
\
u4e13
\
u4f9b
\
u5f00
\
u53d1
\
u8005
\
u4f7f
\
u7528
\
u3002
\
u8bf7
\
u4e0d
\
u8981
\
u5728
\
u6b64
\
u7c98
\
u8d34
\
u6267
\
u884c
\
u4efb
\
u4f55
\
u5185
\
u5bb9
\
uff0c
\
u8fd9
\
u53ef
\
u80fd
\
u4f1a
\
u5bfc
\
u81f4
\
u60a8
\
u7684
\
u8d26
\
u6237
\
u53d7
\
u5230
\
u653b
\
u51fb
\
uff0c
\
u7ed9
\
u60a8
\
u5e26
\
u6765
\
u635f
\
u5931
\
uff01
"
,
"
font-size: 20px;color:#
e0434
3
"
);
console
.
log
(
"
\
u6280
\
u672f
\
u652f
\
u6301
\
uff1a
\
u0068
\
u0074
\
u0074
\
u0070
\
u003a
\
u002f
\
u002f
\
u0073
\
u0068
\
u006f
\
u0070
\
u0078
\
u006f
\
u002e
\
u006e
\
u0065
\
u0074
\
u002f
"
);
var
store
=
$
.
AMUI
.
store
;
...
...
public/static/upload/images/article/2020/08/29/1598708276130441.jpg
0 → 100644
浏览文件 @
e391ba54
98.7 KB
sourcecode/toutiao/pages/user-order/user-order.js
浏览文件 @
e391ba54
...
...
@@ -241,7 +241,7 @@ Page({
title
:
"
请求中...
"
});
tt
.
request
({
url
:
app
.
get_request_url
(
"
pay
"
,
"
order
"
),
url
:
app
.
get_request_url
(
"
pay
"
,
"
toutiao
"
),
method
:
"
POST
"
,
data
:
{
ids
:
order_ids
,
...
...
@@ -256,22 +256,32 @@ Page({
switch
(
res
.
data
.
data
.
is_payment_type
)
{
// 正常线上支付
case
0
:
tt
.
requestPayment
({
timeStamp
:
res
.
data
.
data
.
data
.
timeStamp
,
nonceStr
:
res
.
data
.
data
.
data
.
nonceStr
,
package
:
res
.
data
.
data
.
data
.
package
,
signType
:
res
.
data
.
data
.
data
.
signType
,
paySign
:
res
.
data
.
data
.
data
.
paySign
,
success
:
function
(
res
)
{
// 数据设置
self
.
order_item_pay_success_handle
(
order_ids
);
// 跳转支付页面
tt
.
navigateTo
({
url
:
"
/pages/paytips/paytips?code=9000
"
tt
.
pay
({
orderInfo
:
res
.
data
.
data
.
order_info
,
service
:
res
.
data
.
data
.
service
,
success
(
res
)
{
// if (res.code == 0) {
// // 数据设置
// self.order_item_pay_success_handle(index);
// // 跳转支付页面
// wx.navigateTo({
// url: "/pages/paytips/paytips?code=9000&total_price=" +
// self.data.data_list[index]['total_price']
// });
// } else {
// app.showToast('支付失败');
// }
// 由于头条支付无法监听支付状态,这里就不做接口轮询了,直接刷新页面
self
.
setData
({
data_page
:
1
});
self
.
get_data_list
(
1
);
},
fail
:
function
(
res
)
{
app
.
showToast
(
'
支付失败
'
);
fail
(
res
)
{
console
.
log
(
res
,
'
pay-fail
'
);
app
.
showToast
(
'
调起收银台失败-
'
+
res
.
data
.
code
);
}
});
break
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录