文档手册

微信取关后不删除会员信息-记录取关日志

2024-12-19 20:30:38

/dayrui/App/Weixin/Controllers/Home.php

case 'unsubscribe':
                                    // 取消关注时                                  
                                    // 删除各种记录
                                    //九戒 2023年10月9日  不删除取关的用户信息 ,标注一下他取关了
                                    $rt = \Phpcmf\Service::M()->table(weixin_wxtable('log'))->insert([
                                        'time' => time(),
                                        'openid' => $this->data['FromUserName'],
                                        'msg' => "取消订阅",                                    
                                    ]);

                                    dr_debug("取消订阅-data",$this->data);
                                    dr_debug("取消订阅-rt",$this->rt);

                                    /*
                                    \Phpcmf\Service::M()->db->table(weixin_wxtable('user'))->where('openid', $this->data['FromUserName'])->delete();
                                    \Phpcmf\Service::M()->db->table(weixin_wxtable('follow'))->where('openid', $this->data['FromUserName'])->delete();
                                    \Phpcmf\Service::M()->db->table(weixin_wxtable('message'))->where('openid', $this->data['FromUserName'])->delete();
                                    \Phpcmf\Service::M()->db->table('member_oauth')->where('oauth', 'wechat')->where('oid', $this->data['FromUserName'])->delete();
                                    */
                                    break;