浏览代码

Merge branch 'cygx_9.2' into debug

ziwen 2 年之前
父节点
当前提交
0a69c6d444
共有 1 个文件被更改,包括 36 次插入0 次删除
  1. 36 0
      controllers/user.go

+ 36 - 0
controllers/user.go

@@ -1686,3 +1686,39 @@ func (this *UserController) MicroRoadshowCollectList() {
 	br.Success = true
 	br.Success = true
 	br.Data = resp
 	br.Data = resp
 }
 }
+
+// @Title 新增埋点
+// @Description 新增埋点接口
+// @Success 200 "新增成功!"
+// @router /tracking [get]
+func (this *UserController) Tracking() {
+	br := new(models.BaseResponse).Init()
+	defer func() {
+		this.Data["json"] = br
+		this.ServeJSON()
+	}()
+	user := this.User
+	if user == nil {
+		br.Msg = "请登录"
+		br.ErrMsg = "请登录,用户信息为空"
+		br.Ret = 408
+		return
+	}
+
+	//item := new(models.CygxPageHistoryRecord)
+	//item.UserId = user.UserId
+	//item.CreateTime = time.Now()
+	//item.Mobile = user.Mobile
+	//item.Email = user.Email
+	//item.CompanyId = user.CompanyId
+	//item.CompanyName = user.CompanyName
+	//item.Router = this.Ctx.Request.RequestURI
+	//item.PageRouter = this.Ctx.Input.Query("PageRouter")
+	//
+	//go models.AddCygxPageHistoryRecord(item)
+	//
+
+	br.Msg = "新增成功!"
+	br.Ret = 200
+	br.Success = true
+}