feat: 个人中心发布

This commit is contained in:
Blizzard
2026-02-14 11:38:59 +08:00
parent f1d9f63296
commit 4820323381
35 changed files with 691 additions and 148 deletions
+5
View File
@@ -114,6 +114,11 @@ func (s *OcrService) MyClassifyLog(req request.PageInfo, id string) (list interf
}
// DeleteClassifyLog 删除植物识别记录
func (s *OcrService) DeleteClassifyLog(req request.IdsReq, userId string) error {
return global.DB.Where("id in ? and user_id = ?", req.Ids, userId).Unscoped().Delete(&plant.ClassifyRecord{}).Error
}
func getAccessToken() string {
rpcUrl := "https://aip.baidubce.com/oauth/2.0/token"
postData := fmt.Sprintf("grant_type=client_credentials&client_id=%s&client_secret=%s", global.Config.BaiduImgClassify.ApiKey, global.Config.BaiduImgClassify.SecretKey)