wcj 5 жил өмнө
parent
commit
9ecf1ce336

+ 9 - 1
entbase/src/service_external/czfczj/czfczj.go

@@ -21,6 +21,9 @@ type Action struct {
 //首次使用
 //首次使用
 func (a *Action) Firstuse() {
 func (a *Action) Firstuse() {
 	userId := CheckUserId(a.Action)
 	userId := CheckUserId(a.Action)
+	if userId == "" {
+		return
+	}
 	bindphone, entauth := 0, 0
 	bindphone, entauth := 0, 0
 	phone := VarCurrentUser.Phone(userId)
 	phone := VarCurrentUser.Phone(userId)
 	if phone != "" {
 	if phone != "" {
@@ -34,8 +37,13 @@ func (a *Action) Firstuse() {
 
 
 //已认证过的企业
 //已认证过的企业
 func (a *Action) Authents() {
 func (a *Action) Authents() {
+	userId := CheckUserId(a.Action)
+	if userId == "" {
+		return
+	}
+	phone := VarCurrentUser.Phone(userId)
 	ents := []M{}
 	ents := []M{}
-	list := Mysql.Find(Entniche_info, map[string]interface{}{"auth_status": 1}, "id,name", "auth_time desc", 0, -1)
+	list := Mysql.Find(Entniche_info, map[string]interface{}{"phone": phone, "auth_status": 1}, "id,name", "auth_time desc", 0, -1)
 	if list != nil {
 	if list != nil {
 		for _, v := range *list {
 		for _, v := range *list {
 			ents = append(ents, M{
 			ents = append(ents, M{