Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xxmp
Project
Project
Details
Activity
Releases
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
chan
xxmp
Commits
45d2a897
Commit
45d2a897
authored
May 16, 2019
by
chenzq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加入会员,普通用户佣金
parent
a8a7d124
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
241 additions
and
25 deletions
+241
-25
cardedit.inc.php
addons/longbing_company/inc/web/manage/cardedit.inc.php
+2
-1
config.inc.php
addons/longbing_company/inc/web/manage/config.inc.php
+9
-0
goodsedit.inc.php
addons/longbing_company/inc/web/manage/goodsedit.inc.php
+6
-0
member.inc.php
addons/longbing_company/inc/web/manage/member.inc.php
+1
-1
memberLevel.inc.php
addons/longbing_company/inc/web/manage/memberLevel.inc.php
+2
-0
memberLeveledit.inc.php
...s/longbing_company/inc/web/manage/memberLeveledit.inc.php
+3
-0
memberend.inc.php
addons/longbing_company/inc/web/manage/memberend.inc.php
+26
-0
addmember.inc.php
addons/longbing_company/inc/wxapp/addmember.inc.php
+53
-0
memberlevel.inc.php
addons/longbing_company/inc/wxapp/memberlevel.inc.php
+5
-2
sellingcashdetail.inc.php
addons/longbing_company/inc/wxapp/sellingcashdetail.inc.php
+1
-1
config.html
addons/longbing_company/template/manage/config.html
+12
-2
goodsEdit.html
addons/longbing_company/template/manage/goodsEdit.html
+7
-7
member.html
addons/longbing_company/template/manage/member.html
+76
-3
memberLevel.html
addons/longbing_company/template/manage/memberLevel.html
+2
-2
memberLevelEdit.html
addons/longbing_company/template/manage/memberLevelEdit.html
+17
-4
wxapp.php
addons/longbing_company/wxapp.php
+19
-2
No files found.
addons/longbing_company/inc/web/manage/cardedit.inc.php
View file @
45d2a897
...
@@ -23,6 +23,7 @@ if (function_exists('longbing_check_redis')) {
...
@@ -23,6 +23,7 @@ if (function_exists('longbing_check_redis')) {
}
}
}
}
if
(
$_GPC
[
'action'
]
==
'edit'
)
{
if
(
$_GPC
[
'action'
]
==
'edit'
)
{
foreach
(
$_GPC
[
'formData'
]
as
$k
=>
$v
)
{
foreach
(
$_GPC
[
'formData'
]
as
$k
=>
$v
)
{
if
(
strpos
(
$k
,
'mages'
))
{
if
(
strpos
(
$k
,
'mages'
))
{
...
@@ -63,7 +64,7 @@ if ($_GPC['action'] == 'edit') {
...
@@ -63,7 +64,7 @@ if ($_GPC['action'] == 'edit') {
message
(
'编辑成功'
,
$this
->
createWebUrl
(
'manage/users'
),
'success'
);
message
(
'编辑成功'
,
$this
->
createWebUrl
(
'manage/users'
),
'success'
);
}
}
message
(
'编辑失败'
,
''
,
'error'
);
message
(
'编辑失败'
,
''
,
'error'
);
}
}
$limit
=
array
(
1
,
$this
->
limit
);
$limit
=
array
(
1
,
$this
->
limit
);
...
...
addons/longbing_company/inc/web/manage/config.inc.php
View file @
45d2a897
...
@@ -103,6 +103,15 @@ if ($_GPC['action'] == 'edit') {
...
@@ -103,6 +103,15 @@ if ($_GPC['action'] == 'edit') {
$data
[
'stock_extract'
]
=
0
;
$data
[
'stock_extract'
]
=
0
;
}
}
}
}
//普通用户提成
if
(
$data
[
'ordinary_extract'
])
{
$data
[
'ordinary_extract'
]
=
intval
(
$data
[
'ordinary_extract'
]);
if
(
$data
[
'ordinary_extract'
]
<
0
||
100
<
$data
[
'ordinary_extract'
])
{
$data
[
'ordinary_extract'
]
=
0
;
}
}
if
(
$data
[
'sec_extract'
])
{
if
(
$data
[
'sec_extract'
])
{
$data
[
'sec_extract'
]
=
intval
(
$data
[
'sec_extract'
]);
$data
[
'sec_extract'
]
=
intval
(
$data
[
'sec_extract'
]);
...
...
addons/longbing_company/inc/web/manage/goodsedit.inc.php
View file @
45d2a897
...
@@ -87,6 +87,9 @@ if ($_GPC['action'] == 'edit') {
...
@@ -87,6 +87,9 @@ if ($_GPC['action'] == 'edit') {
}
else
{
}
else
{
$data
[
'images'
]
=
''
;
$data
[
'images'
]
=
''
;
}
}
if
(
isset
(
$data
[
'content'
]))
{
$data
[
'content'
]
=
json_encode
(
$data
[
'content'
]);
}
$data
[
'images'
]
=
trim
(
$data
[
'images'
],
','
);
$data
[
'images'
]
=
trim
(
$data
[
'images'
],
','
);
$data
[
'update_time'
]
=
time
();
$data
[
'update_time'
]
=
time
();
...
@@ -156,6 +159,9 @@ if (isset($_GPC['id'])) {
...
@@ -156,6 +159,9 @@ if (isset($_GPC['id'])) {
if
(
$info
[
'images'
])
{
if
(
$info
[
'images'
])
{
$info
[
'images'
]
=
explode
(
','
,
$info
[
'images'
]);
$info
[
'images'
]
=
explode
(
','
,
$info
[
'images'
]);
}
}
if
(
$info
[
'content'
])
{
$info
[
'content'
]
=
json_decode
(
$info
[
'content'
]);
}
}
}
...
...
addons/longbing_company/inc/web/manage/member.inc.php
View file @
45d2a897
...
@@ -34,7 +34,7 @@ if (isset($_GPC['page'])) {
...
@@ -34,7 +34,7 @@ if (isset($_GPC['page'])) {
$limit
[
0
]
=
$_GPC
[
'page'
];
$limit
[
0
]
=
$_GPC
[
'page'
];
$curr
=
$_GPC
[
'page'
];
$curr
=
$_GPC
[
'page'
];
}
}
$company
=
pdo_getslice
(
'longbing_c
ompany_user'
,
array
(
'level_id
>'
=>
'0'
),
$limit
,
$count
);
$company
=
pdo_getslice
(
'longbing_c
ard_usermember'
,
array
(
'level
>'
=>
'0'
),
$limit
,
$count
);
//$company = pdo_getslice('longbing_company_member_level', $where, $limit, $count);
//$company = pdo_getslice('longbing_company_member_level', $where, $limit, $count);
$perPage
=
15
;
$perPage
=
15
;
...
...
addons/longbing_company/inc/web/manage/memberLevel.inc.php
View file @
45d2a897
...
@@ -98,9 +98,11 @@ if ($_GPC['action'] == 'edit') {
...
@@ -98,9 +98,11 @@ if ($_GPC['action'] == 'edit') {
$result
=
false
;
$result
=
false
;
if
(
$id
)
{
if
(
$id
)
{
$data
[
'describe'
]
=
stripslashes
(
$data
[
'describe'
]);
$result
=
pdo_update
(
'longbing_company_member_level'
,
$data
,
array
(
'id'
=>
$id
));
$result
=
pdo_update
(
'longbing_company_member_level'
,
$data
,
array
(
'id'
=>
$id
));
}
}
else
{
else
{
$data
[
'describe'
]
=
stripslashes
(
$data
[
'describe'
]);
$result
=
pdo_insert
(
'longbing_company_member_level'
,
$data
);
$result
=
pdo_insert
(
'longbing_company_member_level'
,
$data
);
}
}
...
...
addons/longbing_company/inc/web/manage/memberLeveledit.inc.php
View file @
45d2a897
...
@@ -19,6 +19,9 @@ if ($id) {
...
@@ -19,6 +19,9 @@ if ($id) {
}
}
}
}
load
()
->
func
(
'tpl'
);
load
()
->
func
(
'tpl'
);
include
$this
->
template
(
'manage/memberLevelEdit'
);
include
$this
->
template
(
'manage/memberLevelEdit'
);
...
...
addons/longbing_company/inc/web/manage/memberend.inc.php
0 → 100644
View file @
45d2a897
<?php
define
(
'ROOT_PATH'
,
IA_ROOT
.
'/addons/longbing_company/'
);
is_file
(
ROOT_PATH
.
'/inc/we7.php'
)
||
exit
(
'Access Denied Longbing'
);
require_once
ROOT_PATH
.
'/inc/we7.php'
;
global
$_GPC
;
global
$_W
;
$id
=
$_GPC
[
'id'
];
if
(
!
$id
)
{
result
(
-
1
,
''
,
array
());
}
$dd
=
array
(
'is_level'
=>
1
);
$result
=
pdo_update
(
'longbing_card_usermember'
,
$dd
,
array
(
'id'
=>
$id
));
if
(
$result
){
result
(
0
,
''
,
array
());
}
result
(
-
1
,
''
,
array
());
?>
\ No newline at end of file
addons/longbing_company/inc/wxapp/addmember.inc.php
0 → 100644
View file @
45d2a897
<?php
define
(
'ROOT_PATH'
,
IA_ROOT
.
'/addons/longbing_company/'
);
is_file
(
ROOT_PATH
.
'/inc/we7.php'
)
||
exit
(
'Access Denied Longbing'
);
require_once
ROOT_PATH
.
'/inc/we7.php'
;
global
$_GPC
;
global
$_W
;
$user_id
=
$_GPC
[
'user_id'
];
$name
=
$_GPC
[
'name'
];
$phone
=
$_GPC
[
'phone'
];
$channel
=
$_GPC
[
'channel'
];
$level
=
$_GPC
[
'level'
];
$level_name
=
$_GPC
[
'level_name'
];
//3是线下成为会员 2是房车app
$d
=
pdo_get
(
'longbing_company_user'
,
array
(
'id'
=>
$user_id
));
if
(
$channel
==
3
){
$b
=
array
(
'id'
=>
$user_id
,
'name'
=>
$name
,
'nickname'
=>
$d
[
'nickName'
],
'phone'
=>
$phone
,
'level'
=>
$level
,
'level_name'
=>
$level_name
,
'is_level'
=>
0
,
'channel'
=>
'线下'
);
// pdo_insert('longbing_card_usermember',$b);
}
elseif
(
$channel
==
2
){
$b
=
array
(
'id'
=>
$user_id
,
'name'
=>
$name
,
'nickname'
=>
$d
[
'nickName'
],
'phone'
=>
$phone
,
'level'
=>
$level
,
'level_name'
=>
$level_name
,
'is_level'
=>
0
,
'channel'
=>
'房车app'
);
}
pdo_insert
(
'longbing_card_usermember'
,
$b
);
return
$this
->
result
(
0
,
'请求成功'
,
array
());
?>
addons/longbing_company/inc/wxapp/memberlevel.inc.php
View file @
45d2a897
...
@@ -5,9 +5,12 @@ require_once ROOT_PATH . '/inc/we7.php';
...
@@ -5,9 +5,12 @@ require_once ROOT_PATH . '/inc/we7.php';
global
$_GPC
;
global
$_GPC
;
global
$_W
;
global
$_W
;
$ab
=
pdo_getall
(
'longbing_company_member_level'
,
''
,
array
(
'discount'
,
'name'
));
return
$this
->
result
(
0
,
''
,
$ab
,
array
());
$ab
=
pdo_getall
(
'longbing_company_member_level'
,
''
,
array
(
'discount'
,
'level'
,
'name'
,
'price'
,
'describe'
));
//echo json_encode(array('errno' => 0, 'data' => $ab), JSON_UNESCAPED_UNICODE);
return
$this
->
result
(
0
,
''
,
array
(
'list'
=>
$ab
),
array
());
?>
?>
\ No newline at end of file
addons/longbing_company/inc/wxapp/sellingcashdetail.inc.php
View file @
45d2a897
...
@@ -17,7 +17,7 @@ if (isset($_GPC['page'])) {
...
@@ -17,7 +17,7 @@ if (isset($_GPC['page'])) {
$curr
=
$_GPC
[
'page'
];
$curr
=
$_GPC
[
'page'
];
}
}
$list
=
pdo_getslice
(
'longbing_company_user'
,
array
(
'pid'
=>
$user_id
,
'uniacid'
=>
$uniacid
),
$limit
,
$count
,
array
(
'id'
,
'nickName'
,
'avatarUrl'
,
'create_time'
,
'create_money'
),
''
,
array
(
'create_money desc'
,
'id desc'
));
$list
=
pdo_getslice
(
'longbing_company_user'
,
array
(
'pid'
=>
$user_id
,
'is_staff'
=>
0
,
'is_stock'
=>
0
,
'is_water'
,
'uniacid'
=>
$uniacid
),
$limit
,
$count
,
array
(
'id'
,
'nickName'
,
'avatarUrl'
,
'create_time'
,
'create_money'
),
''
,
array
(
'create_money desc'
,
'id desc'
));
$total_money
=
0
;
$total_money
=
0
;
foreach
(
$list
as
$index
=>
$item
)
{
foreach
(
$list
as
$index
=>
$item
)
{
...
...
addons/longbing_company/template/manage/config.html
View file @
45d2a897
...
@@ -240,13 +240,23 @@
...
@@ -240,13 +240,23 @@
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
员工分销提成
</label>
<label
class=
"layui-form-label"
>
员工分销提成
</label>
<div
class=
"layui-input-block"
>
<input
type=
"number"
min=
"0"
max=
"100"
name=
"first_extract"
placeholder=
"请输入分销提成"
autocomplete=
"off"
class=
"layui-input"
value=
"{$info['first_extract']}"
>
<span
class=
"span-remark"
>
用户消费, 其上线所得提成。提成为百分比,取值0到100之间,超出取值范围按0计算,无上线时无提成
</span>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
普通用户分销提成
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
<input
type=
"number"
min=
"0"
max=
"100"
name=
"
first_extract"
placeholder=
"请输入分销提成"
autocomplete=
"off"
class=
"layui-input"
value=
"{$info['first
_extract']}"
>
<input
type=
"number"
min=
"0"
max=
"100"
name=
"
ordinary_extract"
placeholder=
"请输入分销提成"
autocomplete=
"off"
class=
"layui-input"
value=
"{$info['ordinary
_extract']}"
>
<span
class=
"span-remark"
>
用户消费, 其上线所得提成。提成为百分比,取值0到100之间,超出取值范围按0计算,无上线时无提成
</span>
<span
class=
"span-remark"
>
用户消费, 其上线所得提成。提成为百分比,取值0到100之间,超出取值范围按0计算,无上线时无提成
</span>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
提现金额
</label>
<label
class=
"layui-form-label"
>
提现金额
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
...
...
addons/longbing_company/template/manage/goodsEdit.html
View file @
45d2a897
...
@@ -297,13 +297,13 @@
...
@@ -297,13 +297,13 @@
</div>
</div>
</div>-->
</div>-->
<!-- <div class="layui-form-item"
>
<!-- <div class="layui-form-item">--
>
<label class="layui-form-label">推荐佣金一级</label
>
<!-- <label class="layui-form-label">推荐佣金一级</label>--
>
<div class="layui-input-block"
>
<!-- <div class="layui-input-block">--
>
<input type="number" min="0" name="first_extract" required lay-verify="required" placeholder="请输入推荐佣金" autocomplete="off" class="layui-input" value="{$info['first_extract']}"
>
<!-- <input type="number" min="0" name="first_extract" required lay-verify="required" placeholder="请输入推荐佣金" autocomplete="off" class="layui-input" value="{$info['first_extract']}">--
>
<span class="span-remark">用户内购时,给一级推荐人的佣金比例,0-100</span
>
<!-- <span class="span-remark">用户内购时,给一级推荐人的佣金比例,0-100</span>--
>
</div
>
<!-- </div>--
>
</div>-->
<!--
</div>-->
<!-- <div class="layui-form-item">
<!-- <div class="layui-form-item">
<label class="layui-form-label">推荐佣金二级</label>
<label class="layui-form-label">推荐佣金二级</label>
...
...
addons/longbing_company/template/manage/member.html
View file @
45d2a897
...
@@ -26,17 +26,31 @@
...
@@ -26,17 +26,31 @@
<thead>
<thead>
<tr>
<tr>
<th>
会员ID
</th>
<th>
会员ID
</th>
<th>
来源渠道
</th>
<th>
会员姓名
</th>
<th>
会员姓名
</th>
<th>
等级
</th>
<th>
微信名称
</th>
<th>
手机
</th>
<th>
会员等级
</th>
<th>
审批
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
{loop $company $item}
{loop $company $item}
<tr>
<tr>
<td>
{$item['id']}
</td>
<td>
{$item['id']}
</td>
<td>
{$item['channel']}
</td>
<td>
{$item['name']}
</td>
<td>
{$item['nickName']}
</td>
<td>
{$item['nickName']}
</td>
<td>
{$item['level_id']}
</td>
<td>
{$item['phone']}
</td>
<td>
{$item['level_name']}
</td>
<td>
{if $item['is_level']==0}
<button
type=
"button"
class=
"layui-btn layui-btn-xs btn-send-item"
itemId=
"{$item['id']}"
>
审核
</button>
{/if}
</td>
</tr>
</tr>
{/loop}
{/loop}
</tbody>
</tbody>
...
@@ -147,7 +161,66 @@
...
@@ -147,7 +161,66 @@
}
}
});
});
return
false
;
return
false
;
};
//审核
function
ajaxFun
(
e
,
fun
){
var
json_mun
=
false
;
$
.
ajax
({
type
:
"post"
,
url
:
e
.
url
,
data
:
e
.
json
,
async
:
false
,
dataType
:
"json"
,
success
:
function
(
resp
){
json_mun
=
resp
;
if
(
fun
){
fun
(
json_mun
);
return
false
;
}
},
error
:
function
(){
if
(
fun
){
fun
(
json_mun
)
return
false
;
}
}
});
}
}
$
(
'.btn-send-item'
).
click
(
function
()
{
var
id
=
$
(
this
).
attr
(
'itemId'
);
if
(
!
id
)
{
layer
.
msg
(
'获取信息失败!'
);
return
false
;
}
$
(
"input[name='itemId']"
).
val
(
id
);
layer
.
confirm
(
'是否审核通过?'
,
{
btn
:
[
'通过'
,
'取消'
]
//按钮
},
function
(){
ajaxFun
({
url
:
"{php echo $this->createWebUrl('manage/memberend')}"
,
json
:{
id
:
id
}
},
function
(
e
){
//console.log(e);
if
(
e
){
//console.log(e);
if
(
e
.
errno
==
0
){
layer
.
msg
(
"审核成功!"
,
function
(){
location
.
reload
();
});
}
else
{
layer
.
msg
(
"审核失败!"
);
}
//e是后台返回的数据;这里是成功的意思
}
else
{
layer
.
msg
(
"网络失败,请稍后再试!"
);
}
})
},
function
(){
//取消调这里
});
});
</script>
</script>
<script
src=
"../../../addons/{$module_name}/images/js/main.js"
></script>
<script
src=
"../../../addons/{$module_name}/images/js/main.js"
></script>
...
...
addons/longbing_company/template/manage/memberLevel.html
View file @
45d2a897
...
@@ -36,8 +36,8 @@
...
@@ -36,8 +36,8 @@
<th>
等级名称
</th>
<th>
等级名称
</th>
<th>
图标
</th>
<th>
图标
</th>
<th>
等级
</th>
<th>
等级
</th>
<th>
说明
</th>
<th>
折扣
</th>
<th>
折扣
</th>
<th>
价格
</th>
<th>
操作
</th>
<th>
操作
</th>
</tr>
</tr>
</thead>
</thead>
...
@@ -50,8 +50,8 @@
...
@@ -50,8 +50,8 @@
<img
src=
"{php echo tomedia($item['icon'])}"
alt=
""
/>
<img
src=
"{php echo tomedia($item['icon'])}"
alt=
""
/>
</td>
</td>
<td>
{$item['level']}
</td>
<td>
{$item['level']}
</td>
<td>
{$item['describe']}
</td>
<td>
{$item['discount']}
</td>
<td>
{$item['discount']}
</td>
<td>
{$item['price']}
</td>
<td>
<td>
<button
type=
"button"
class=
"layui-btn layui-btn-xs btn-edit-item"
<button
type=
"button"
class=
"layui-btn layui-btn-xs btn-edit-item"
...
...
addons/longbing_company/template/manage/memberLevelEdit.html
View file @
45d2a897
...
@@ -80,18 +80,31 @@
...
@@ -80,18 +80,31 @@
<input
type=
"text"
name=
"level"
required
placeholder=
"请输入公司地址"
autocomplete=
"off"
class=
"layui-input"
value=
"{$company['level']}"
>
<input
type=
"text"
name=
"level"
required
placeholder=
"请输入公司地址"
autocomplete=
"off"
class=
"layui-input"
value=
"{$company['level']}"
>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
说明
</label>
<label
class=
"layui-form-label"
>
折扣
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"d
escribe"
required
placeholder=
"请输入说明"
autocomplete=
"off"
class=
"layui-input"
value=
"{$company['describe
']}"
>
<input
type=
"text"
name=
"d
iscount"
required
placeholder=
"请输入折扣"
autocomplete=
"off"
class=
"layui-input"
value=
"{$company['discount
']}"
>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
折扣
</label>
<label
class=
"layui-form-label"
>
价格
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"
discount"
required
placeholder=
"请输入折扣"
autocomplete=
"off"
class=
"layui-input"
value=
"{$company['discount
']}"
>
<input
type=
"text"
name=
"
price"
required
placeholder=
"请输入折扣"
autocomplete=
"off"
class=
"layui-input"
value=
"{$company['price
']}"
>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
图文详情
</label>
<div
class=
"layui-input-block"
>
{php echo tpl_ueditor('describe', $company['describe']);}
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
<button
class=
"layui-btn"
lay-submit
lay-filter=
"formSub"
>
立即提交
</button>
<button
class=
"layui-btn"
lay-submit
lay-filter=
"formSub"
>
立即提交
</button>
...
...
addons/longbing_company/wxapp.php
View file @
45d2a897
...
@@ -9609,6 +9609,7 @@ class longbing_companyModuleWxapp extends WeModuleWxapp
...
@@ -9609,6 +9609,7 @@ class longbing_companyModuleWxapp extends WeModuleWxapp
);
);
//@file_put_contents($_SERVER['DOCUMENT_ROOT'] . '/data/tpl/pay.txt','g',$u_level);
//@file_put_contents($_SERVER['DOCUMENT_ROOT'] . '/data/tpl/pay.txt','g',$u_level);
pdo_update
(
'longbing_company_user'
,
$use_data
,
array
(
'id'
=>
$order
[
'user_id'
]));
pdo_update
(
'longbing_company_user'
,
$use_data
,
array
(
'id'
=>
$order
[
'user_id'
]));
}
elseif
(
$u_level
>
$g_level
){
}
elseif
(
$u_level
>
$g_level
){
$u_level
=
$u_level
;
$u_level
=
$u_level
;
}
}
...
@@ -9887,17 +9888,21 @@ class longbing_companyModuleWxapp extends WeModuleWxapp
...
@@ -9887,17 +9888,21 @@ class longbing_companyModuleWxapp extends WeModuleWxapp
}
}
}
}
$user
=
pdo_get
(
'longbing_company_user'
,
array
(
'id'
=>
$user_id
));
$user
=
pdo_get
(
'longbing_company_user'
,
array
(
'id'
=>
$user_id
));
if
(
!
$user
||
$user
[
'is_staff'
]
==
1
)
{
if
(
!
$user
||
$user
[
'is_staff'
]
==
1
)
{
return
false
;
return
false
;
}
}
if
(
!
$user
||
$user
[
'is_stock'
]
==
1
)
{
return
false
;
}
if
(
$user
[
'pid'
]
&&
$config
[
'first_extract'
])
{
if
(
$user
[
'pid'
]
&&
$config
[
'first_extract'
])
{
$user1
=
pdo_get
(
'longbing_company_user'
,
array
(
'id'
=>
$user
[
'pid'
]));
$user1
=
pdo_get
(
'longbing_company_user'
,
array
(
'id'
=>
$user
[
'pid'
]));
if
(
!
$user1
||
$user1
[
'is_staff'
]
!=
1
){
/*
if(!$user1||$user1['is_staff']!=1){
return false;
return false;
}
}
*/
$check_first
=
pdo_get
(
'longbing_company_selling_profit'
,
array
(
'user_id'
=>
$user
[
'pid'
]));
$check_first
=
pdo_get
(
'longbing_company_selling_profit'
,
array
(
'user_id'
=>
$user
[
'pid'
]));
$staff
=
pdo_get
(
'longbing_company_user'
,
array
(
'id'
=>
$user
[
'pid'
]));
$staff
=
pdo_get
(
'longbing_company_user'
,
array
(
'id'
=>
$user
[
'pid'
]));
if
(
!
$check_first
)
{
if
(
!
$check_first
)
{
...
@@ -9906,11 +9911,16 @@ class longbing_companyModuleWxapp extends WeModuleWxapp
...
@@ -9906,11 +9911,16 @@ class longbing_companyModuleWxapp extends WeModuleWxapp
if
(
$staff
[
'is_stock'
]
==
1
&&
$config
[
'first_extract'
]
&&
$config
[
'first_extract'
]
>
0
&&
$config
[
'first_extract'
]
<
100
){
if
(
$staff
[
'is_stock'
]
==
1
&&
$config
[
'first_extract'
]
&&
$config
[
'first_extract'
]
>
0
&&
$config
[
'first_extract'
]
<
100
){
$config
[
'first_extract'
]
=
$config
[
'stock_extract'
];
$config
[
'first_extract'
]
=
$config
[
'stock_extract'
];
}
}
if
(
$staff
[
'is_staff'
]
!=
1
&&
$config
[
'ordinary_extract'
]
&&
$config
[
'ordinary_extract'
]
>
0
&&
$config
[
'ordinary_extract'
]
<
100
){
$config
[
'first_extract'
]
=
$config
[
'ordinary_extract'
];
}
$extract_money_first
=
$price
*
$config
[
'first_extract'
]
/
100
;
$extract_money_first
=
$price
*
$config
[
'first_extract'
]
/
100
;
$extract_money_first
=
sprintf
(
'%.2f'
,
$extract_money_first
);
$extract_money_first
=
sprintf
(
'%.2f'
,
$extract_money_first
);
@
pdo_update
(
'longbing_company_selling_profit'
,
array
(
'waiting +='
=>
$extract_money_first
),
array
(
'user_id'
=>
$user
[
'pid'
]));
@
pdo_update
(
'longbing_company_selling_profit'
,
array
(
'waiting +='
=>
$extract_money_first
),
array
(
'user_id'
=>
$user
[
'pid'
]));
$insert_data
=
array
(
'user_id'
=>
$user
[
'pid'
],
'source_id'
=>
$user_id
,
'order_id'
=>
$order
[
'id'
],
'goods_id'
=>
$item
[
'goods_id'
],
'buy_number'
=>
$item
[
'number'
],
'type'
=>
2
,
'title'
=>
$title
,
'img'
=>
$img
,
'price'
=>
$price
,
'extract'
=>
$config
[
'first_extract'
],
'waiting'
=>
1
,
'uniacid'
=>
$uniacid
,
'create_time'
=>
$time
,
'update_time'
=>
$time
);
$insert_data
=
array
(
'user_id'
=>
$user
[
'pid'
],
'source_id'
=>
$user_id
,
'order_id'
=>
$order
[
'id'
],
'goods_id'
=>
$item
[
'goods_id'
],
'buy_number'
=>
$item
[
'number'
],
'type'
=>
2
,
'title'
=>
$title
,
'img'
=>
$img
,
'price'
=>
$price
,
'extract'
=>
$config
[
'first_extract'
],
'waiting'
=>
1
,
'uniacid'
=>
$uniacid
,
'create_time'
=>
$time
,
'update_time'
=>
$time
);
@
pdo_insert
(
'longbing_company_selling_water'
,
$insert_data
);
@
pdo_insert
(
'longbing_company_selling_water'
,
$insert_data
);
//pdo_update('longbing_company_user',array('is_water'=>1),array('id'=>$user_id));
}
}
if
(
$user
[
'pid'
]
&&
$config
[
'sec_extract'
])
{
if
(
$user
[
'pid'
]
&&
$config
[
'sec_extract'
])
{
...
@@ -9931,8 +9941,15 @@ class longbing_companyModuleWxapp extends WeModuleWxapp
...
@@ -9931,8 +9941,15 @@ class longbing_companyModuleWxapp extends WeModuleWxapp
}
}
return
true
;
return
true
;
}
}
protected
function
getRadarDetail
(
$sign
,
$type
,
$target
=
''
)
protected
function
getRadarDetail
(
$sign
,
$type
,
$target
=
''
)
{
{
$way
=
''
;
$way
=
''
;
...
...
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