Ver código fonte

feat:微信平台

wangshan 1 ano atrás
pai
commit
1e8d43f83f
1 arquivos alterados com 2 adições e 3 exclusões
  1. 2 3
      src/jfw/modules/weixin/src/service/usersource.go

+ 2 - 3
src/jfw/modules/weixin/src/service/usersource.go

@@ -8,7 +8,6 @@ import (
 	"fmt"
 	"jy/src/jfw/modules/weixin/src/tools"
 	"log"
-	"strings"
 	"time"
 )
 
@@ -21,8 +20,8 @@ func SaveUserSource(channelCode, userId, phone, ip string, state int, positionId
 		ChannelCode:      qutil.If(channelCode == "", fmt.Sprintf("%s%s", "jy_wx", qutil.If(state == 1, "_scan", "_sub")), channelCode).(string),
 		EncryptionUserId: encrypt.SE.Encode2Hex(userId),
 		CreateTime:       time.Now().Format(date.Date_Full_Layout),
-		LoginWay:         3,                                                         //登录方式;1:手机号密码;2:手机号验证码;3:微信;4:手机号一键登录
-		Platform:         qutil.If(strings.Contains(channelCode, "pc"), 1, 2).(int), //登录端;1:PC;2:WX;3:APP;4:H5
+		LoginWay:         3,                                       //登录方式;1:手机号密码;2:手机号验证码;3:微信;4:手机号一键登录
+		Platform:         qutil.If(channelCode != "", 1, 2).(int), //登录端;1:PC;2:WX;3:APP;4:H5
 		Ip:               ip,
 	}
 	b := jy.SaveUserSource(tools.Mysql, jy.ChannelTableName, qutil.StructToMapMore(us))