abiao лет назад: 5
Родитель
Сommit
3e1954e129

+ 7 - 5
go/gopath/src/fohow.com/apps/controllers/user_controller/user_controller.go

@@ -451,14 +451,16 @@ func (self *UserController) SysUserBind() {
 	remark := self.GetString("remark")
 
 	useCache, _ := self.GetBool("cache", false)
+
+	curWxUser := self.GetCurrentWxUser(useCache)
+	if curWxUser.Id != wxId {
+		self.ReturnError(403, apps.BindFail, "", nil)
+	}
+
+	// wxUser := user_model.GetWxUserById(inviteWxId, useCache)
 	if len(userNo) <= 0 {
 		self.ReturnError(403, apps.ParamsError, "", nil)
 	}
-	//wxUser := self.GetCurrentWxUser(useCache)
-	// if inviteWxId == 0 {
-	// 	self.ReturnError(403, apps.NoExist, "", nil)
-	// }
-	// wxUser := user_model.GetWxUserById(inviteWxId, useCache)
 	wxUser := user_model.GetWxUserById(wxId, useCache)
 	if wxUser == nil {
 		self.ReturnError(403, apps.NoExist, "", nil)