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
b994ed3a
Commit
b994ed3a
authored
May 16, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改会员模块
parent
beed40c6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
139 additions
and
115 deletions
+139
-115
member.inc.php
addons/longbing_company/inc/web/manage/member.inc.php
+31
-22
memberend.inc.php
addons/longbing_company/inc/web/manage/memberend.inc.php
+0
-26
addmember.inc.php
addons/longbing_company/inc/wxapp/addmember.inc.php
+0
-53
member.inc.php
addons/longbing_company/inc/wxapp/member.inc.php
+56
-0
member.html
addons/longbing_company/template/manage/member.html
+52
-14
No files found.
addons/longbing_company/inc/web/manage/member.inc.php
View file @
b994ed3a
...
...
@@ -2,42 +2,51 @@
//dezend by http://www.yunlu99.com/
global
$_GPC
;
global
$_W
;
define
(
'ROOT_PATH'
,
IA_ROOT
.
'/addons/
'
.
$_W
[
'current_module'
][
'name'
]
.
'
/'
);
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'
;
$uniacid
=
$_W
[
'uniacid'
];
$module_name
=
$_W
[
'current_module'
][
'name'
];
$companyEdit
=
$this
->
createWebUrl
(
'manage/member'
);
$redis_sup_v3
=
false
;
$redis_server_v3
=
false
;
include_once
$_SERVER
[
'DOCUMENT_ROOT'
]
.
'/addons/longbing_company/images/phpqrcode/func_longbing.php'
;
if
(
function_exists
(
'longbing_check_redis'
))
{
$config
=
$_W
[
'config'
][
'setting'
][
'redis'
];
$password
=
''
;
if
(
$config
&&
isset
(
$config
[
'requirepass'
])
&&
$config
[
'requirepass'
])
{
$password
=
$config
[
'requirepass'
];
if
(
$_GPC
[
'action'
]
==
'disable'
)
{
$item
=
pdo_get
(
'longbing_card_user_member'
,
array
(
'id'
=>
$_GPC
[
'id'
]));
if
(
!
$item
||
empty
(
$item
))
{
message
(
'未找到该数据'
,
''
,
'error'
);
}
if
(
$config
&&
isset
(
$config
[
'server'
])
&&
$config
[
'server'
]
&&
isset
(
$config
[
'port'
])
&&
$config
[
'port'
])
{
list
(
$redis_sup_v3
,
$redis_server_v3
)
=
longbing_check_redis
(
$config
[
'server'
],
$config
[
'port'
],
$password
);
if
(
$item
[
'status'
]
==
1
)
{
message
(
'该数据已审核'
,
''
,
'error'
);
}
$status
=
1
;
$where
=
array
(
'update_time'
=>
time
());
if
(
isset
(
$_GPC
[
'type'
])
&&
$_GPC
[
'type'
]){
$status
=
0
;
$where
[
'reason'
]
=
$_GPC
[
'reason'
];
}
else
{
$where
[
'status_time'
]
=
time
();
}
$where
[
'status'
]
=
$status
;
$result
=
pdo_update
(
'longbing_card_user_member'
,
$where
,
array
(
'id'
=>
$_GPC
[
'id'
]));
if
(
$result
)
{
if
(
$status
==
1
){
pdo_update
(
'longbing_card_user'
,
array
(
'level_id'
=>
$item
[
'level'
]),
array
(
'id'
=>
$item
[
'user_id'
]));
}
message
(
'审核成功'
,
$this
->
createWebUrl
(
'manage/member'
),
'success'
);
}
}
$limit
=
array
(
1
,
15
);
message
(
'审核失败'
,
''
,
'error'
);
}
$limit
=
array
(
1
,
10
);
$where
=
array
(
'uniacid'
=>
$uniacid
);
$curr
=
1
;
if
(
isset
(
$_GPC
[
'page'
]))
{
$limit
[
0
]
=
$_GPC
[
'page'
];
$curr
=
$_GPC
[
'page'
];
}
$
company
=
pdo_getslice
(
'longbing_card_usermember'
,
array
(
'level >'
=>
'0'
),
$limit
,
$count
)
;
//$company = pdo_getslice('longbing_company_member_level', $where, $limit, $count
);
$perPage
=
1
5
;
$
sql
=
"select name,level from "
.
tablename
(
'longbing_company_member_level'
)
.
"where isdel=0 order by level "
;
$level
=
pdo_fetchall
(
$sql
);
$list
=
pdo_getslice
(
'longbing_card_user_member'
,
$where
,
$limit
,
$count
,
array
(),
''
,
array
(
'update_time desc'
));
$perPage
=
1
0
;
load
()
->
func
(
'tpl'
);
include
$this
->
template
(
'manage/member'
);
?>
addons/longbing_company/inc/web/manage/memberend.inc.php
deleted
100644 → 0
View file @
beed40c6
<?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
deleted
100644 → 0
View file @
beed40c6
<?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/member.inc.php
0 → 100644
View file @
b994ed3a
<?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
;
$uniacid
=
$_W
[
'uniacid'
];
$user_id
=
$_GPC
[
'user_id'
];
$member
=
pdo_get
(
'longbing_card_user_member'
,
array
(
'user_id'
=>
$user_id
,
'uniacid'
=>
$uniacid
));
function
isphone
(
$phone
){
if
(
preg_match
(
"/^1[345678]
{
1}\d{9
}
$/"
,
$phone
)){
return
true
;
}
return
false
;
}
if
(
$_GPC
[
'action'
]
==
'apply'
)
{
$phone
=
$_GPC
[
'phone'
];
$name
=
$_GPC
[
'name'
];
$level
=
$_GPC
[
'level'
];
if
(
!
$name
||!
$phone
||
$level
==
0
){
return
$this
->
result
(
-
1
,
'提交信息不全!'
,
array
());
}
if
(
!
isphone
(
$phone
)){
return
$this
->
result
(
-
1
,
'手机号码格式不对!'
,
array
());
}
$user
=
pdo_get
(
'longbing_company_user'
,
array
(
'id'
=>
$user_id
,
'uniacid'
=>
$uniacid
));
if
(
!
$user
||
$user
[
'level_id'
]
>
0
){
return
$this
->
result
(
-
1
,
'已经是会员无法再申请!'
,
array
());
}
if
(
$member
){
if
(
$member
[
'status'
]
!=
2
){
return
$this
->
result
(
-
1
,
'无法重复申请!'
,
array
());
}
$updatedata
=
array
(
'name'
=>
$name
,
'phone'
=>
$phone
,
'level'
=>
$level
,
'update_time'
=>
time
());
pdo_update
(
'longbing_card_user_member'
,
$updatedata
,
array
(
'user_id'
=>
$user_id
));
}
else
{
$insertdata
=
array
(
'user_id'
=>
$user_id
,
'name'
=>
$name
,
'phone'
=>
$phone
,
'level'
=>
$level
,
'cre_time'
=>
time
(),
'update_time'
=>
time
(),
'uniacid'
=>
$uniacid
);
pdo_insert
(
'longbing_card_user_member'
,
$insertdata
);
}
return
$this
->
result
(
0
,
''
,
array
());
}
$sql
=
"select name,level from "
.
tablename
(
'longbing_company_member_level'
)
.
"where isdel=0 order by level "
;
$level
=
pdo_fetchall
(
$sql
);
return
$this
->
result
(
0
,
'请求成功'
,
array
(
'member'
=>
$member
,
'level'
=>
$level
));
?>
addons/longbing_company/template/manage/member.html
View file @
b994ed3a
...
...
@@ -26,25 +26,37 @@
<thead>
<tr>
<th>
会员ID
</th>
<th>
来源渠道
</th>
<th>
会员姓名
</th>
<th>
微信名称
</th>
<th>
手机
</th>
<th>
联系电话
</th>
<th>
会员等级
</th>
<th>
审批
</th>
<th>
状态
</th>
<th>
申请时间
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody>
{loop $
company
$item}
{loop $
list
$item}
<tr>
<td>
{$item['id']}
</td>
<td>
{$item['channel']}
</td>
<td>
{$item['name']}
</td>
<td>
{$item['nickName']}
</td>
<td>
{$item['phone']}
</td>
<td>
{$item['level_name']}
</td>
{loop $level $v}
{if $v['level'] == $item['level']}
<td>
{$v['name']}
</td>
{/if}
{/loop}
<td>
{if $item['status'] ==0}
未审核
{elseif $item['status'] == 1}
审核通过
{else}
审核不通过
{/if}
</td>
<td>
{php echo date('Y-m-d H:i:s', $item['update_time'])}
</td>
<td>
{if $item['
is_level']==0
}
{if $item['
status']!=1
}
<button
type=
"button"
class=
"layui-btn layui-btn-xs btn-send-item"
itemId=
"{$item['id']}"
>
审核
...
...
@@ -194,16 +206,16 @@
}
$
(
"input[name='itemId']"
).
val
(
id
);
layer
.
confirm
(
'是否审核通过?'
,
{
btn
:
[
'通过'
,
'
取消
'
]
//按钮
btn
:
[
'通过'
,
'
不通过
'
]
//按钮
},
function
(){
ajaxFun
({
url
:
"{php echo $this->createWebUrl('manage/member
end
')}"
,
json
:{
id
:
id
}
url
:
"{php echo $this->createWebUrl('manage/member')}"
,
json
:{
id
:
id
,
action
:
"disable"
}
},
function
(
e
){
//console.log(e);
if
(
e
){
//console.log(e);
if
(
e
.
errno
==
0
){
if
(
e
.
type
==
"success"
){
layer
.
msg
(
"审核成功!"
,
function
(){
location
.
reload
();
});
...
...
@@ -216,7 +228,33 @@
}
})
},
function
(){
//取消调这里
layer
.
prompt
({
title
:
'不通过原因'
,
formType
:
2
},
function
(
text
,
index
){
layer
.
close
(
index
);
if
(
!
text
){
layer
.
msg
(
"请输入不通过原因!"
);
return
;
}
//取消调这里
ajaxFun
({
url
:
"{php echo $this->createWebUrl('manage/member')}"
,
json
:{
id
:
id
,
action
:
"disable"
,
type
:
1
,
reason
:
text
}
},
function
(
e
){
//console.log(e);
if
(
e
){
//console.log(e);
if
(
e
.
type
==
"success"
){
layer
.
msg
(
"审核成功!"
,
function
(){
location
.
reload
();
});
}
else
{
layer
.
msg
(
"审核失败!"
);
}
//e是后台返回的数据;这里是成功的意思
}
else
{
layer
.
msg
(
"网络失败,请稍后再试!"
);
}
})
});
});
});
...
...
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