1、文件:app/services/user/label/UserLabelRelationServices.php
2、复制一下代码:替换原来方法:unUserLabel
public function unUserLabel(int $uid, array $labels = [], int $type = 0, int $relation_id = 0)
{
if (!count($labels)) {
return true;
}
$where = [
['uid', '=', $uid],
['label_id', 'in', $labels],
['type', '=', $type],
['relation_id', '=', $relation_id]
];
$this->dao->delete($where);
return true;
}
3、复制代码,放在截图部位
/**
* 清空用户标签
* @param int $uid
* @param int $type
* @param int $relation_id
* @return bool
*/
public function delUserLabel(int $uid, int $type = 0, int $relation_id = 0)
{
$where = [
['uid', '=', $uid],
['type', '=', $type],
['relation_id', '=', $relation_id]
];
$this->dao->delete($where);
return true;
}
4、文件:app/services/user/UserServices.php
5、按下图(修改后截图)修改,
6、重启swoole,重新在门店给用户设置标签测试
{{item.user_info.nickname ? item.user_info.nickname : item.user_name}}
作者 管理员 企业
{{itemf.name}}
{{itemc.user_info.nickname}}
{{itemc.user_name}}
回复 {{itemc.comment_user_info.nickname}}
{{itemf.name}}