xingzai 1 жил өмнө
parent
commit
c32266a0f9

+ 4 - 0
controllers/user.go

@@ -171,6 +171,10 @@ func (this *UserController) Detail() {
 		br.ErrMsg = "获取用户信息失败,Err:" + err.Error()
 		return
 	}
+	fmt.Println(utils.MD5(userDetail.Mobile))
+	if userDetail.Mobile != "" {
+		resp.InviteShareCode = services.GetInviteShareCode(userDetail.Mobile) //判断用户是否属于销售,并且获取对应加密的分享码
+	}
 	resp.OutboundCountryCode = userDetail.OutboundCountryCode
 	resp.OutboundMobile = userDetail.OutboundMobile
 	var hasPermission int

+ 4 - 4
services/user_admin_share.go

@@ -35,7 +35,7 @@ func GetInviteShareCode(mobile string) (inviteShareCode string) {
 	return
 }
 
-func init() {
-	fmt.Println(GetInviteShareCode("15557270714"))
-	fmt.Println(AseDecrypted("QZqxHK3ObVYm2DbN3ztbwSiF7Q=="))
-}
+//func init() {
+//	fmt.Println(GetInviteShareCode("15557270714"))
+//	fmt.Println(AseDecrypted("QZqxHK3ObVYm2DbN3ztbwSiF7Q=="))
+//}