Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
git test
CRMEB
Commits
62cfe778
Commit
62cfe778
authored
5 years ago
by
liaofei
Browse files
Options
Download
Email Patches
Plain Diff
更新2.6.13文件
parent
c13ff131
Changes
39
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
application/admin/controller/Index.php
+2
-0
application/admin/controller/Index.php
application/admin/controller/article/WechatNews.php
+3
-5
application/admin/controller/article/WechatNews.php
application/admin/controller/setting/SystemConfig.php
+7
-2
application/admin/controller/setting/SystemConfig.php
application/admin/controller/store/StoreInfoMana.php
+9
-7
application/admin/controller/store/StoreInfoMana.php
application/admin/model/store/StoreProduct.php
+2
-1
application/admin/model/store/StoreProduct.php
application/admin/model/system/SystemAttachment.php
+4
-2
application/admin/model/system/SystemAttachment.php
application/admin/model/user/User.php
+2
-3
application/admin/model/user/User.php
application/admin/model/user/UserExtract.php
+1
-1
application/admin/model/user/UserExtract.php
application/admin/model/wechat/WechatUser.php
+3
-3
application/admin/model/wechat/WechatUser.php
application/admin/view/finance/finance/commission_list.php
+6
-7
application/admin/view/finance/finance/commission_list.php
application/admin/view/wechat/reply/add_keyword.php
+14
-2
application/admin/view/wechat/reply/add_keyword.php
application/admin/view/wechat/reply/index.php
+12
-1
application/admin/view/wechat/reply/index.php
application/config.php
+2
-9
application/config.php
application/core/behavior/OrderBehavior.php
+8
-0
application/core/behavior/OrderBehavior.php
application/core/model/routine/RoutineCode.php
+1
-4
application/core/model/routine/RoutineCode.php
application/core/model/system/SystemUserLevel.php
+0
-9
application/core/model/system/SystemUserLevel.php
application/core/model/user/UserSign.php
+1
-1
application/core/model/user/UserSign.php
application/core/util/ApiLogs.php
+2
-0
application/core/util/ApiLogs.php
application/core/util/GroupDataService.php
+6
-3
application/core/util/GroupDataService.php
application/core/util/WechatService.php
+5
-5
application/core/util/WechatService.php
with
90 additions
and
65 deletions
+90
-65
application/admin/controller/Index.php
+
2
-
0
View file @
62cfe778
...
...
@@ -29,6 +29,8 @@ class Index extends AuthController
$adminInfo
=
$this
->
adminInfo
->
toArray
();
$roles
=
explode
(
','
,
$adminInfo
[
'roles'
]);
$site_logo
=
SystemConfig
::
getOneConfig
(
'menu_name'
,
'site_logo'
)
->
toArray
();
// dump(SystemMenus::menuList());
// exit();
$this
->
assign
([
'menuList'
=>
SystemMenus
::
menuList
(),
'site_logo'
=>
json_decode
(
$site_logo
[
'value'
],
true
),
...
...
This diff is collapsed.
Click to expand it.
application/admin/controller/article/WechatNews.php
+
3
-
5
View file @
62cfe778
...
...
@@ -91,11 +91,9 @@ class WechatNews extends AuthController
*/
public
function
upload_image
(){
$res
=
Upload
::
Image
(
$_POST
[
'file'
],
'wechat/image/'
.
date
(
'Ymd'
));
//产品图片上传记录
$fileInfo
=
$res
->
fileInfo
->
getinfo
();
SystemAttachment
::
attachmentAdd
(
$res
->
fileInfo
->
getSaveName
(),
$fileInfo
[
'size'
],
$fileInfo
[
'type'
],
$res
->
dir
,
''
,
5
);
if
(
!
$res
->
status
)
return
Json
::
fail
(
$res
->
error
);
return
Json
::
successful
(
'上传成功!'
,[
'url'
=>
$res
->
filePath
]);
if
(
!
is_array
(
$res
))
return
Json
::
fail
(
$res
);
SystemAttachment
::
attachmentAdd
(
$res
[
'name'
],
$res
[
'size'
],
$res
[
'type'
],
$res
[
'dir'
],
$res
[
'thumb_path'
],
5
,
$res
[
'image_type'
],
$res
[
'time'
]);
return
Json
::
successful
(
'上传成功!'
,[
'url'
=>
$res
[
'thumb_path'
]]);
}
/**
...
...
This diff is collapsed.
Click to expand it.
application/admin/controller/setting/SystemConfig.php
+
7
-
2
View file @
62cfe778
<?php
namespace
app\admin\controller\setting
;
use
app\admin\model\system\SystemAttachment
;
use
think\Url
;
use
service\FormBuilder
as
Form
;
use
think\Request
;
...
...
@@ -293,11 +294,15 @@ class SystemConfig extends AuthController
public
function
view_upload
(){
if
(
$_POST
[
'type'
]
==
3
){
$res
=
Upload
::
file
(
$_POST
[
'file'
],
'config/file'
);
if
(
!
$res
->
status
)
return
Json
::
fail
(
$res
->
error
);
return
Json
::
successful
(
'上传成功!'
,[
'url'
=>
$res
->
dir
]);
}
else
{
$res
=
Upload
::
Image
(
$_POST
[
'file'
],
'config/image'
);
if
(
is_array
(
$res
)){
SystemAttachment
::
attachmentAdd
(
$res
[
'name'
],
$res
[
'size'
],
$res
[
'type'
],
$res
[
'dir'
],
$res
[
'thumb_path'
],
0
,
$res
[
'image_type'
],
$res
[
'time'
]);
return
Json
::
successful
(
'上传成功!'
,[
'url'
=>
$res
[
'dir'
]]);
}
else
return
Json
::
fail
(
$res
);
}
if
(
!
$res
->
status
)
return
Json
::
fail
(
$res
->
error
);
return
Json
::
successful
(
'上传成功!'
,[
'url'
=>
$res
->
dir
]);
}
/**
* 文件上传
...
...
This diff is collapsed.
Click to expand it.
application/admin/controller/store/StoreInfoMana.php
+
9
-
7
View file @
62cfe778
...
...
@@ -4,6 +4,7 @@ namespace app\admin\controller\store;
use
app\admin\controller\AuthController
;
use
app\admin\library\FormBuilder
;
use
app\admin\model\system\SystemAttachment
;
use
service\UtilService
as
Util
;
use
service\JsonService
as
Json
;
use
service\UploadService
as
Upload
;
...
...
@@ -64,15 +65,16 @@ class StoreInfoMana extends AuthController
}
/**
*
s
上传图片
*
TODO
上传图片
* */
public
function
upload
(){
$res
=
Upload
::
image
(
'file'
,
'article'
);
$thumbPath
=
Upload
::
thumb
(
$res
->
dir
);
if
(
$res
->
status
==
200
)
return
Json
::
successful
(
'图片上传成功!'
,[
'name'
=>
$res
->
fileInfo
->
getSaveName
(),
'url'
=>
Upload
::
pathToUrl
(
$thumbPath
)]);
public
function
upload
()
{
$res
=
Upload
::
image
(
'file'
,
'article/'
.
date
(
'Ymd'
));
SystemAttachment
::
attachmentAdd
(
$res
[
'name'
],
$res
[
'size'
],
$res
[
'type'
],
$res
[
'dir'
],
$res
[
'thumb_path'
],
2
,
$res
[
'image_type'
],
$res
[
'time'
]);
if
(
is_array
(
$res
))
return
Json
::
successful
(
'图片上传成功!'
,[
'name'
=>
$res
[
'name'
],
'url'
=>
Upload
::
pathToUrl
(
$res
[
'thumb_path'
])]);
else
return
Json
::
fail
(
$res
->
error
);
return
Json
::
fail
(
$res
);
}
/**
...
...
This diff is collapsed.
Click to expand it.
application/admin/model/store/StoreProduct.php
+
2
-
1
View file @
62cfe778
...
...
@@ -371,7 +371,8 @@ class StoreProduct extends ModelBasic
//获取利润
public
static
function
ProfityTop10
(
$where
){
$classs
=
[
'layui-bg-red'
,
'layui-bg-orange'
,
'layui-bg-green'
,
'layui-bg-blue'
,
'layui-bg-cyan'
];
$model
=
StoreOrder
::
alias
(
'a'
)
->
join
(
'StoreOrderCartInfo c'
,
'a.id=c.oid'
)
->
join
(
'__STORE_PRODUCT__ b'
,
'b.id=c.product_id'
);
$model
=
StoreOrder
::
alias
(
'a'
)
->
join
(
'StoreOrderCartInfo c'
,
'a.id=c.oid'
)
->
join
(
'__STORE_PRODUCT__ b'
,
'b.id=c.product_id'
)
->
where
(
'b.is_show'
,
1
)
->
where
(
'b.is_del'
,
0
);
$list
=
self
::
getModelTime
(
$where
,
$model
,
'a.add_time'
)
->
group
(
'c.product_id'
)
->
order
(
'profity desc'
)
->
limit
(
10
)
->
field
([
'count(c.product_id) as p_count'
,
'b.store_name'
,
'sum(b.price) as sum_price'
,
'(b.price-b.cost) as profity'
])
->
select
();
...
...
This diff is collapsed.
Click to expand it.
application/admin/model/system/SystemAttachment.php
+
4
-
2
View file @
62cfe778
...
...
@@ -66,8 +66,10 @@ class SystemAttachment extends ModelBasic
$list
=
count
(
$list
)
?
$list
->
toArray
()
:
[];
$site_url
=
SystemConfig
::
getValue
(
'site_url'
);
foreach
(
$list
as
&
$item
){
$item
[
'satt_dir'
]
=
(
strpos
(
$item
[
'satt_dir'
],
$site_url
)
!==
false
||
strstr
(
$item
[
'satt_dir'
],
'http'
)
!==
false
)
?
$item
[
'satt_dir'
]
:
$site_url
.
$item
[
'satt_dir'
];
$item
[
'att_dir'
]
=
(
strpos
(
$item
[
'att_dir'
],
$site_url
)
!==
false
||
strstr
(
$item
[
'att_dir'
],
'http'
)
!==
false
)
?
$item
[
'satt_dir'
]
:
$site_url
.
$item
[
'att_dir'
];
if
(
$site_url
)
{
$item
[
'satt_dir'
]
=
(
strpos
(
$item
[
'satt_dir'
],
$site_url
)
!==
false
||
strstr
(
$item
[
'satt_dir'
],
'http'
)
!==
false
)
?
$item
[
'satt_dir'
]
:
$site_url
.
$item
[
'satt_dir'
];
$item
[
'att_dir'
]
=
(
strpos
(
$item
[
'att_dir'
],
$site_url
)
!==
false
||
strstr
(
$item
[
'att_dir'
],
'http'
)
!==
false
)
?
$item
[
'satt_dir'
]
:
$site_url
.
$item
[
'att_dir'
];
}
}
$count
=
self
::
where
([
'pid'
=>
$where
[
'pid'
],
'module_type'
=>
1
])
->
count
();
return
compact
(
'list'
,
'count'
);
...
...
This diff is collapsed.
Click to expand it.
application/admin/model/user/User.php
+
2
-
3
View file @
62cfe778
...
...
@@ -573,13 +573,12 @@ class User extends ModelBasic
$value
[
'nickname'
],
$value
[
'sum_number'
],
$value
[
'now_money'
],
$value
[
'money'
],
$value
[
'ex_price'
],
$value
[
'brokerage_price'
],
$value
[
'extract_price'
],
];
}
if
(
$where
[
'excel'
]){
\
service\PHPExcelService
::
setExcelHeader
([
'昵称/姓名'
,
'总佣金金额'
,
'
提现佣金'
,
'
余额'
,
'
剩余
佣金'
,
'提现到账佣金'
])
\
service\PHPExcelService
::
setExcelHeader
([
'昵称/姓名'
,
'总佣金金额'
,
'
账户
余额'
,
'
账户
佣金'
,
'提现到账佣金'
])
->
setExcelTile
(
'拥金记录'
,
'拥金记录'
.
time
(),
' 生成时间:'
.
date
(
'Y-m-d H:i:s'
,
time
()))
->
setExcelContent
(
$export
)
->
ExcelSave
();
...
...
This diff is collapsed.
Click to expand it.
application/admin/model/user/UserExtract.php
+
1
-
1
View file @
62cfe778
...
...
@@ -61,7 +61,7 @@ class UserExtract extends ModelBasic
$status
=
-
1
;
$User
=
User
::
find
([
'uid'
=>
$uid
])
->
toArray
();
UserBill
::
income
(
'提现失败'
,
$uid
,
'now_money'
,
'extract'
,
$extract_number
,
$id
,
bcadd
(
$User
[
'now_money'
],
$extract_number
,
2
),
$mark
);
User
::
bcInc
(
$uid
,
'
now_money
'
,
$extract_number
,
'uid'
);
User
::
bcInc
(
$uid
,
'
brokerage_price
'
,
$extract_number
,
'uid'
);
$extract_type
=
'未知方式'
;
switch
(
$data
[
'extract_type'
]){
case
'alipay'
:
...
...
This diff is collapsed.
Click to expand it.
application/admin/model/wechat/WechatUser.php
+
3
-
3
View file @
62cfe778
...
...
@@ -531,7 +531,7 @@ use app\core\util\SystemConfigService;
$model
=
self
::
setSpreadWhere
(
$where
);
$status
=
SystemConfigService
::
get
(
'store_brokerage_statu'
);
if
(
isset
(
$where
[
'excel'
])
&&
$where
[
'excel'
]
==
1
){
$list
=
$model
->
field
([
'a.uid'
,
'u.phone'
,
'a.nickname'
,
'a.sex'
,
'a.country'
,
'a.province'
,
'a.city'
,
'a.now_money'
,
'a.subscribe'
])
->
select
()
->
toArray
();
$list
=
$model
->
field
([
'a.uid'
,
'u.phone'
,
'a.nickname'
,
'a.sex'
,
'a.country'
,
'a.province'
,
'a.city'
,
'a.now_money'
,
'a.subscribe'
,
'u.brokerage_price'
])
->
select
()
->
toArray
();
$export
=
[];
foreach
(
$list
as
$index
=>
$item
){
$uids
=
self
::
getModelTime
(
$where
,
User
::
where
(
'spread_uid'
,
$item
[
'uid'
]))
->
column
(
'uid'
);
...
...
@@ -552,7 +552,7 @@ use app\core\util\SystemConfigService;
$item
[
'order_stair'
]
=
self
::
getUserSpreadOrderCount
(
$item
[
'uid'
],
0
,
$where
);
//一级推荐人订单
$item
[
'order_second'
]
=
self
::
getUserSpreadOrderCount
(
$item
[
'uid'
],
1
,
$where
);
//二级推荐人订单
//可提现佣金
$item
[
'new_money'
]
=
User
::
getextractPrice
(
$item
[
'uid'
],
$where
)
;
$item
[
'new_money'
]
=
$item
[
'brokerage_price'
]
;
//总共佣金
$item
[
'brokerage_money'
]
=
self
::
getModelTime
(
$where
,
UserBill
::
where
([
'uid'
=>
$item
[
'uid'
],
'category'
=>
'now_money'
,
'type'
=>
'brokerage'
,
'pm'
=>
1
,
'status'
=>
1
]))
->
sum
(
'number'
);
$item
[
'spread_name'
]
=
'暂无'
;
...
...
@@ -620,7 +620,7 @@ use app\core\util\SystemConfigService;
//总共佣金
$item
[
'brokerage_money'
]
=
self
::
getModelTime
(
$where
,
UserBill
::
where
([
'uid'
=>
$item
[
'uid'
],
'category'
=>
'now_money'
,
'type'
=>
'brokerage'
,
'pm'
=>
1
,
'status'
=>
1
]))
->
sum
(
'number'
);
//可提现佣金
$item
[
'new_money'
]
=
User
::
getextractPrice
(
$item
[
'uid'
],
$where
)
;
$item
[
'new_money'
]
=
$item
[
'brokerage_price'
]
;
$item
[
'stair'
]
=
self
::
getUserSpreadUidCount
(
$item
[
'uid'
],
0
,
$where
);
//一级推荐人
$item
[
'second'
]
=
self
::
getUserSpreadUidCount
(
$item
[
'uid'
],
1
,
$where
);
//二级推荐人
$item
[
'order_stair'
]
=
self
::
getUserSpreadOrderCount
(
$item
[
'uid'
],
0
,
$where
);
//一级推荐人订单
...
...
This diff is collapsed.
Click to expand it.
application/admin/view/finance/finance/commission_list.php
+
6
-
7
View file @
62cfe778
...
...
@@ -65,13 +65,12 @@
layList
.
form
.
render
();
layList
.
tableList
(
'List'
,
"
{
:Url('get_commission_list')
}
"
,
function
()
{
return
[
{
field
:
'nickname'
,
title
:
'昵称/姓名'
,
unresize
:
true
},
{
field
:
'sum_number'
,
title
:
'总佣金金额'
,
sort
:
true
,
unresize
:
true
},
{
field
:
'now_money'
,
title
:
'账户余额'
,
unresize
:
true
},
{
field
:
'money'
,
title
:
'剩余佣金'
,
unresize
:
true
},
{
field
:
'ex_price'
,
title
:
'提现佣金'
,
unresize
:
true
},
{
field
:
'extract_price'
,
title
:
'提现到账佣金'
,
unresize
:
true
},
{
fixed
:
'right'
,
title
:
'操作'
,
align
:
'center'
,
unresize
:
true
,
toolbar
:
'#barDemo'
},
{
field
:
'nickname'
,
title
:
'昵称/姓名'
,
unresize
:
true
,
width
:
"16%"
,
align
:
'center'
},
{
field
:
'sum_number'
,
title
:
'总佣金金额'
,
sort
:
true
,
unresize
:
true
,
align
:
'center'
},
{
field
:
'now_money'
,
title
:
'账户余额'
,
unresize
:
true
,
align
:
'center'
},
{
field
:
'brokerage_price'
,
title
:
'账户佣金'
,
unresize
:
true
,
align
:
'center'
},
{
field
:
'extract_price'
,
title
:
'提现到账佣金'
,
unresize
:
true
,
align
:
'center'
},
{
fixed
:
'right'
,
title
:
'操作'
,
align
:
'center'
,
unresize
:
true
,
toolbar
:
'#barDemo'
,
width
:
"10%"
},
];
});
layList
.
search
(
'search'
);
...
...
This diff is collapsed.
Click to expand it.
application/admin/view/wechat/reply/add_keyword.php
+
14
-
2
View file @
62cfe778
...
...
@@ -8,6 +8,7 @@
{
/
block
}
{
block
name
=
"content"
}
<
div
id
=
"app"
class
=
"row"
>
<
div
ref
=
"transfer"
></
div
>
<
div
class
=
"col-sm-12"
>
<
div
class
=
"wechat-reply-wrapper"
>
<
div
class
=
"ibox-title"
><
p
>
{{
msg
}}
</
p
></
div
>
...
...
@@ -176,6 +177,17 @@
uploadLink
:
''
},
methods
:
{
transfer
:
function
(
str
){
var
s
=
""
;
if
(
str
.
length
===
0
)
{
return
""
;}
s
=
str
.
replace
(
/&
amp
;
/
g
,
"&"
);
s
=
s
.
replace
(
/&
lt
;
/
g
,
"<"
);
s
=
s
.
replace
(
/&
gt
;
/
g
,
">"
);
s
=
s
.
replace
(
/&
nbsp
;
/
g
,
" "
);
s
=
s
.
replace
(
/&
#39;/g, "\'");
s
=
s
.
replace
(
/&
quot
;
/
g
,
"
\"
"
);
return
s
;
},
submit
:
function
(){
if
(
!
this
.
check
())
return
false
;
window
.
vm
=
this
;
...
...
@@ -227,7 +239,7 @@
this.uploadLink = "
{
:
Url
(
'upload_img'
)}
";
$('#file').attr('accept','image/*');
this.uploadColl = function(pic){
vm.dataGroup.image.src = pic;
vm.dataGroup.image.src =
vm.transfer(
pic
)
;
};
$('#file').trigger('click');
},
...
...
@@ -260,7 +272,7 @@
vm.upload();
},
error: function (data, status, e) {
$eb
.message('
error
','上传失败!');
$eb
.message('
success
','上传失败!');
vm.upload();
}
});
...
...
This diff is collapsed.
Click to expand it.
application/admin/view/wechat/reply/index.php
+
12
-
1
View file @
62cfe778
...
...
@@ -214,6 +214,17 @@
uploadLink
:
''
},
methods
:
{
transfer
:
function
(
str
){
var
s
=
""
;
if
(
str
.
length
===
0
)
{
return
""
;}
s
=
str
.
replace
(
/&/g
,
"
&
"
);
s
=
s
.
replace
(
/</g
,
"
<
"
);
s
=
s
.
replace
(
/>/g
,
"
>
"
);
s
=
s
.
replace
(
/ /g
,
"
"
);
s
=
s
.
replace
(
/'/g
,
"
\
'
"
);
s
=
s
.
replace
(
/"/g
,
"
\"
"
);
return
s
;
},
submit
:
function
(){
if
(
!
this
.
check
())
return
false
;
$eb
.
axios
.
post
(
"
{:Url('save',array('key'=>$key))}
"
,{
key
:
this
.
key
,
status
:
this
.
status
,
data
:
this
.
dataGroup
[
this
.
type
],
type
:
this
.
type
}).
then
(
function
(
res
){
...
...
@@ -255,7 +266,7 @@
this
.
uploadLink
=
"
{:Url('upload_img')}
"
;
$
(
'
#file
'
).
attr
(
'
accept
'
,
'
image/*
'
);
this
.
uploadColl
=
function
(
pic
){
vm
.
dataGroup
.
image
.
src
=
pic
;
vm
.
dataGroup
.
image
.
src
=
vm
.
transfer
(
pic
)
;
};
$
(
'
#file
'
).
trigger
(
'
click
'
);
},
...
...
This diff is collapsed.
Click to expand it.
application/config.php
+
2
-
9
View file @
62cfe778
...
...
@@ -144,13 +144,6 @@ return [
// 视图输出字符串内容替换
'view_replace_str'
=>
[
'{__PUBLIC_PATH}'
=>
PUBILC_PATH
,
//public 目录
'{__STATIC_PATH}'
=>
PUBILC_PATH
.
'static/'
,
//全局静态目录
'{__PLUG_PATH}'
=>
PUBILC_PATH
.
'static/plug/'
,
//全局静态插件
'{__ADMIN_PATH}'
=>
PUBILC_PATH
.
'system/'
,
//后台目录
'{__FRAME_PATH}'
=>
PUBILC_PATH
.
'system/frame/'
,
//后台框架
'{__MODULE_PATH}'
=>
PUBILC_PATH
.
'system/module/'
,
//后台模块
'{__WAP_PATH}'
=>
PUBILC_PATH
.
'wap/first/'
//wap静态文件目录 模版1
],
// 默认跳转页面对应的模板文件
'dispatch_success_tmpl'
=>
THINK_PATH
.
'tpl'
.
DS
.
'dispatch_jump.tpl'
,
...
...
@@ -166,7 +159,7 @@ return [
// 错误显示信息,非调试模式有效
'error_message'
=>
'页面错误!请稍后再试~'
,
// 显示错误信息
'show_error_msg'
=>
tru
e
,
'show_error_msg'
=>
fals
e
,
// 异常处理handle类 留空使用 \think\exception\Handle
'exception_handle'
=>
''
,
...
...
@@ -203,7 +196,7 @@ return [
// 缓存前缀
'prefix'
=>
''
,
// 缓存有效期 0表示永久缓存
'expire'
=>
0
,
'expire'
=>
6
0
,
],
// +----------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
application/core/behavior/OrderBehavior.php
+
8
-
0
View file @
62cfe778
...
...
@@ -217,4 +217,12 @@ class OrderBehavior
{
}
/*
* 订单未支付默认取消
* */
public
static
function
orderUnpaidCancel
()
{
StoreOrder
::
orderUnpaidCancel
();
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
application/core/model/routine/RoutineCode.php
+
1
-
4
View file @
62cfe778
...
...
@@ -18,10 +18,7 @@ class RoutineCode{
$res
=
RoutineQrcode
::
routineQrCodeForever
(
$thirdId
,
$thirdType
,
$page
,
$imgUrl
);
$resCode
=
MiniProgramService
::
qrcodeService
()
->
appCodeUnlimit
(
$res
->
id
,
$page
,
280
);
if
(
$resCode
){
$dataQrcode
[
'status'
]
=
1
;
$dataQrcode
[
'url_time'
]
=
time
();
$res
=
RoutineQrcode
::
setRoutineQrcodeFind
(
$res
->
id
,
$dataQrcode
);
if
(
$res
)
return
$resCode
;
if
(
$res
)
return
[
'res'
=>
$resCode
,
'id'
=>
$res
->
id
];
else
return
false
;
}
else
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
application/core/model/system/SystemUserLevel.php
+
0
-
9
View file @
62cfe778
...
...
@@ -83,11 +83,6 @@ class SystemUserLevel extends ModelBasic
* */
public
static
function
getLevelListAndGrade
(
$leval_id
,
$isArray
,
$expire
=
1400
)
{
if
(
$isArray
&&
Cache
::
has
(
'LevelListArrayTask'
)){
return
Cache
::
get
(
'LevelListArrayTask'
);
}
else
if
(
Cache
::
has
(
'LevelListArray'
)){
return
Cache
::
get
(
'LevelListArray'
);
}
$grade
=
0
;
$list
=
self
::
setWhere
()
->
field
([
'name'
,
'discount'
,
'image'
,
'icon'
,
'explain'
,
'id'
,
'grade'
])
->
order
(
'grade asc'
)
->
select
();
$list
=
count
(
$list
)
?
$list
->
toArray
()
:
[];
...
...
@@ -99,10 +94,6 @@ class SystemUserLevel extends ModelBasic
if
(
$grade
<
$item
[
'grade'
])
$item
[
'is_clear'
]
=
true
;
else
$item
[
'is_clear'
]
=
false
;
}
if
(
$isArray
)
Cache
::
set
(
'LevelListArrayTask'
,
$list
,
$expire
);
else
Cache
::
set
(
'LevelListArray'
,
$list
,
$expire
);
return
$list
;
}
...
...
This diff is collapsed.
Click to expand it.
application/core/model/user/UserSign.php
+
1
-
1
View file @
62cfe778
...
...
@@ -113,7 +113,7 @@ class UserSign extends ModelBasic
$res3
=
$user
->
save
();
$res
=
$res1
&&
$res2
&&
$res3
!==
false
;
ModelBasic
::
checkTrans
(
$res
);
HookService
::
afterListen
(
'user_level'
,
$user
,
false
,
UserBehavior
::
class
);
HookService
::
afterListen
(
'user_level'
,
$user
,
null
,
false
,
UserBehavior
::
class
);
if
(
$res
)
return
$sign_num
;
else
...
...
This diff is collapsed.
Click to expand it.
application/core/util/ApiLogs.php
+
2
-
0
View file @
62cfe778
...
...
@@ -24,6 +24,8 @@ class ApiLogs
const
ACCESS_TOKEN_PREFIX
=
'AccessToken:'
;
//api info 缓存前缀
const
AB_API_INFO
=
'eb_ApiInfo:'
;
//未支付订单取消
const
ORDER_UNPAID_PAGE
=
'order_unpaid_page'
;
// +----------------------------------------------------------------------
// | 缓存时间配置区域
...
...
This diff is collapsed.
Click to expand it.
application/core/util/GroupDataService.php
+
6
-
3
View file @
62cfe778
...
...
@@ -14,6 +14,9 @@ use think\Cache;
class
GroupDataService
{
protected
static
$isCaChe
=
true
;
protected
static
$expire
=
60
;
/**获取单个组数据
* @param $config_name
* @param int $limit
...
...
@@ -26,7 +29,7 @@ class GroupDataService
return
Cache
::
get
(
$cacheName
);
}
else
{
$data
=
SystemGroupData
::
getGroupData
(
$config_name
,
$limit
);
if
(
self
::
$isCaChe
)
Cache
::
set
(
$cacheName
,
$data
);
if
(
self
::
$isCaChe
)
Cache
::
set
(
$cacheName
,
$data
,
self
::
$expire
);
return
$data
;
}
}
...
...
@@ -43,7 +46,7 @@ class GroupDataService
return
Cache
::
get
(
$cacheName
);
}
else
{
$data
=
SystemGroupData
::
getAllValue
(
$config_name
,
$limit
);
if
(
self
::
$isCaChe
)
Cache
::
set
(
$cacheName
,
$data
);
if
(
self
::
$isCaChe
)
Cache
::
set
(
$cacheName
,
$data
,
self
::
$expire
);
return
$data
;
}
}
...
...
@@ -60,7 +63,7 @@ class GroupDataService
return
Cache
::
get
(
$cacheName
);
}
else
{
$data
=
SystemGroupData
::
getDateValue
(
$id
);
if
(
self
::
$isCaChe
)
Cache
::
set
(
$cacheName
,
$data
);
if
(
self
::
$isCaChe
)
Cache
::
set
(
$cacheName
,
$data
,
self
::
$expire
);
return
$data
;
}
}
...
...
This diff is collapsed.
Click to expand it.
application/core/util/WechatService.php
+
5
-
5
View file @
62cfe778
...
...
@@ -34,9 +34,9 @@ class WechatService
$wechat
=
SystemConfigService
::
more
([
'wechat_appid'
,
'wechat_appsecret'
,
'wechat_token'
,
'wechat_encodingaeskey'
,
'wechat_encode'
]);
$payment
=
SystemConfigService
::
more
([
'pay_weixin_mchid'
,
'pay_weixin_client_cert'
,
'pay_weixin_client_key'
,
'pay_weixin_key'
,
'pay_weixin_open'
]);
$config
=
[
'app_id'
=>
isset
(
$wechat
[
'wechat_appid'
])
?
$wechat
[
'wechat_appid'
]
:
''
,
'secret'
=>
isset
(
$wechat
[
'wechat_appsecret'
])
?
$wechat
[
'wechat_appsecret'
]
:
''
,
'token'
=>
isset
(
$wechat
[
'wechat_token'
])
?
$wechat
[
'wechat_token'
]
:
''
,
'app_id'
=>
isset
(
$wechat
[
'wechat_appid'
])
?
trim
(
$wechat
[
'wechat_appid'
]
)
:
''
,
'secret'
=>
isset
(
$wechat
[
'wechat_appsecret'
])
?
trim
(
$wechat
[
'wechat_appsecret'
]
)
:
''
,
'token'
=>
isset
(
$wechat
[
'wechat_token'
])
?
trim
(
$wechat
[
'wechat_token'
]
)
:
''
,
'guzzle'
=>
[
'timeout'
=>
10.0
,
// 超时时间(秒)
],
...
...
@@ -45,8 +45,8 @@ class WechatService
$config
[
'aes_key'
]
=
$wechat
[
'wechat_encodingaeskey'
];
if
(
isset
(
$payment
[
'pay_weixin_open'
])
&&
$payment
[
'pay_weixin_open'
]
==
1
){
$config
[
'payment'
]
=
[
'merchant_id'
=>
$payment
[
'pay_weixin_mchid'
],
'key'
=>
$payment
[
'pay_weixin_key'
],
'merchant_id'
=>
trim
(
$payment
[
'pay_weixin_mchid'
]
)
,
'key'
=>
trim
(
$payment
[
'pay_weixin_key'
]
)
,
'cert_path'
=>
realpath
(
'.'
.
$payment
[
'pay_weixin_client_cert'
]),
'key_path'
=>
realpath
(
'.'
.
$payment
[
'pay_weixin_client_key'
]),
//'notify_url'=>SystemConfigService::get('site_url').Url::build('wap/Wechat/notify')
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
Next
Write
Preview
Supports
Markdown
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
Menu
Projects
Groups
Snippets
Help