$obj = new \wechat\Wechat();
$obj->official()->customer()->guide_add_user('{
"guide_account": "wx_account",
"openid": "xxxxxxx",
"buyer_nickname": "张三"
}');
成功结果:
true
或者:
array(2) {
[0]=>
array(3) {
["errcode"]=>
int(0)
["errmsg"]=>
string(2) "ok"
["openid"]=>
string(7) "xxxxxxx"
}
[1]=>
array(3) {
["errcode"]=>
int(0)
["errmsg"]=>
string(2) "ok"
["openid"]=>
string(8) "yyyyyyyy"
}
}
$obj = new \wechat\Wechat();
$obj->official()->customer()->guide_delete_user('{
"guide_account": "wx_account",
"openid": "xxxxxxx"
}');
成功结果:
true
或者:
array(2) {
[0]=>
array(3) {
["errcode"]=>
int(0)
["errmsg"]=>
string(2) "ok"
["openid"]=>
string(7) "xxxxxxx"
}
[1]=>
array(3) {
["errcode"]=>
int(0)
["errmsg"]=>
string(2) "ok"
["openid"]=>
string(8) "yyyyyyyy"
}
}
$obj = new \wechat\Wechat();
$obj->official()->customer()->guide_list_user([
"guide_account" => "wx_account",
"page" => 0,
"num" => 10
]);
成功结果:
array(2) {
["total_num"]=>
int(1)
["list"]=>
array(1) {
[0]=>
array(3) {
["openid"]=>
string(7) "xxxxxxx"
["buyer_nickname"]=>
string(7) "xxxxxxx"
["create_time"]=>
int(11223344)
}
}
}
$obj = new \wechat\Wechat();
$obj->official()->customer()->user_update_guide('{
"old_guide_account": "wx_account",
"new_guide_account": "wx_account",
"openid": "xxxxxxx"
}');
成功结果:
true
或者:
array(2) {
[0]=>
array(3) {
["errcode"]=>
int(0)
["errmsg"]=>
string(2) "ok"
["openid"]=>
string(7) "xxxxxxx"
}
[1]=>
array(3) {
["errcode"]=>
int(0)
["errmsg"]=>
string(2) "ok"
["openid"]=>
string(8) "yyyyyyyy"
}
}
$obj = new \wechat\Wechat();
// false.失败 true.成功
$obj->official()->customer()->user_select_guide('{
"guide_account": "wx_account",
"openid": "xxxxxx",
"buyer_nickname": "张三"
}');
$obj = new \wechat\Wechat();
// false.失败 true.成功
$obj->official()->customer()->user_update_nick('{
"openid": "xxxxxxx"
}');
成功结果:
array(5) {
["openid"]=>
string(5) "xxxxx"
["guide_account"]=>
string(5) "xxxxx"
["guide_openid"]=>
string(5) "xxxxx"
["buyer_nickname"]=>
string(6) "张三"
["create_time"]=>
int(11223344)
}
$obj = new \wechat\Wechat();
// false.失败 true.成功
$obj->official()->customer()->user_join_guide('{
"guide_account": "wx_account",
"openid": "xxxxxxx"
}');
成功结果:
array(3) {
["openid"]=>
string(5) "xxxxx"
["buyer_nickname"]=>
string(6) "张三"
["create_time"]=>
int(11223344)
}