Procházet zdrojové kódy

add agent apply function

abiao před 4 roky
rodič
revize
15612b78cd

+ 1 - 2
go/gopath/src/fohow.com/apps/controllers/user_controller/init.go

@@ -22,9 +22,8 @@ import (
 var (
 	exceptCheckUserLoginAction = []string{"BindingTel", "UpdateWxUserInfo",
 		"CheckLogin", "GenerateQrcode",
-		"AgentApplication", "ComAgentApplication", "GetMyAgentList", "GetAgentDetail", "GetUserInfo", "GetAgentDetailByWxUid",
 		"GetInviteList", "GetMonthlyInviteList", "OneClickBindingTel", "BindingWxPhone", "SetWxUserInviter", "Get"}
-	exceptCheckWxUserLoginAction = []string{"AgentApplication", "ComAgentApplication", "GetMyAgentList", "GetAgentDetail", "GetUserInfo", "GetAgentDetailByWxUid", "CheckLogin"}
+	exceptCheckWxUserLoginAction = []string{"CheckLogin"}
 )
 
 type UserController struct {

+ 0 - 12
go/gopath/src/fohow.com/apps/controllers/user_controller/invite_controller.go

@@ -98,18 +98,6 @@ func (self *UserController) GetInviteList() {
 	if list == nil {
 		list = make([]*user_model.Invitee, 0, 0)
 	}
-	//代理状态判断---普通会员(status=0),则显示 申请代理
-	for _, item := range list {
-		if item.ShowInviteMode == 0 {
-			item.Status = 0
-			record := user_model.GetAgentApplyByWxUId(item.WxUId)
-			if record != nil {
-				item.Status = 1
-			}
-		} else {
-			item.Status = 2
-		}
-	}
 
 	type Ret struct {
 		Inviter   *user_model.WxUser    `json:"wx_inviter"`

+ 10 - 0
go/gopath/src/fohow.com/apps/models/user_model/invite.go

@@ -227,6 +227,16 @@ func GetMyIntroListByInviteId(inviteId, page, perPage int64, useCache bool) (lis
 	}
 	for _, item := range list {
 		item.Head = GetFullImgUrl(item.Head)
+		//代理状态判断---普通会员(status=0),则显示 申请代理
+		if item.ShowInviteMode == 0 {
+			item.Status = 0
+			record := GetAgentApplyByWxUId(item.WxUId)
+			if record != nil {
+				item.Status = 1
+			}
+		} else {
+			item.Status = 2
+		}
 	}
 
 	cache.Cache.Put(k, list, 1*time.Minute)