$obj = new \wechat\Wechat();
// false.失败 true.成功
$obj->official()->lable()->create([
"tag_name" => "xxxxxxx",
"tag_values" => [
"标签1",
"标签2"
]
]);
$obj = new \wechat\Wechat();
// false.失败 true.成功
$obj->official()->lable()->delete([
"tag_name" => "xxxxxxx"
]);
$obj = new \wechat\Wechat();
// false.失败 true.成功
$obj->official()->lable()->add_option([
"tag_name" => "xxxxxxx",
"tag_values" => [
"标签1",
"标签2"
]
]);
$obj = new \wechat\Wechat();
$obj->official()->lable()->get();
成功结果:
array(2) {
[0]=>
array(2) {
["tag_name"]=>
string(4) "tag4"
["tag_values"]=>
array(1) {
[0]=>
string(7) "标签4"
}
}
[1]=>
array(2) {
["tag_name"]=>
string(4) "tag3"
["tag_values"]=>
array(2) {
[0]=>
string(8) "标签33"
[1]=>
string(8) "标签22"
}
}
}
$obj = new \wechat\Wechat();
$obj->official()->lable()->add_user([
"guide_account" => "wx_account",
"openid" => "xxxxxxx",
"tag_value" => "tag1"
]);
成功结果:
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()->lable()->select_user([
"guide_account" => "wx_account",
"openid" => "xxxxxxx"
]);
成功结果:
array(2) {
[0]=>
string(6) "tag1_1"
[1]=>
string(6) "tag2_1"
}
$obj = new \wechat\Wechat();
$obj->official()->lable()->query_user([
"guide_account" => "xxxxxxx",
"push_count" => 0,
"tag_values => [
"tag1_1",
"tag2_1"
]
]);
成功结果:
array(2) {
[0]=>
string(6) "xxx1"
[1]=>
string(6) "xxx2"
}
$obj = new \wechat\Wechat();
$obj->official()->lable()->delete_user([
"guide_account" => "wx_account",
"openid" => "xxxxxxx",
"tag_value" => "tag1"
]);
成功结果:
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()->lable()->add_diy_user([
"guide_account" => "wx_account",
"openid" => "xxxxxxx",
"display_tag_list" => [
"test1",
"test2"
]
]);
$obj = new \wechat\Wechat();
$obj->official()->lable()->get_diy_user([
"guide_account" => "张三",
"openid" => "xxxxxxx"
]);
成功结果:
array(2) {
[0]=>
string(6) "test1"
[1]=>
string(6) "test2"
}