...
|
...
|
@@ -211,7 +211,16 @@ func UserInfoV2(header *protocol.RequestHeader, request *protocol.UserInfoReques |
|
|
if company, err = CompanyResponsitory.FindOne(map[string]interface{}{"id": header.CompanyId}); err != nil {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
var miniProgram = make(map[string]interface{})
|
|
|
if len(company.Applets) > 0 {
|
|
|
if company.Applets[0].Valid() {
|
|
|
miniProgram["webpageUrl"] = "www.baidu.com"
|
|
|
miniProgram["userName"] = company.Applets[0].Id
|
|
|
miniProgram["path"] = fmt.Sprintf("%v?inviter_id=%v", company.Applets[0].URL, partnerInfo.Id)
|
|
|
miniProgram["hdImageUrl"] = "http://suplus-business-admin-test.fjmaimaimai.com/images/default/default_logo.png"
|
|
|
miniProgram["title"] = company.Applets[0].Name
|
|
|
}
|
|
|
}
|
|
|
u := userx.User{
|
|
|
Id: partnerInfo.Id,
|
|
|
PartnerName: partnerInfo.PartnerName,
|
...
|
...
|
@@ -222,12 +231,7 @@ func UserInfoV2(header *protocol.RequestHeader, request *protocol.UserInfoReques |
|
|
Phone: company.Phone,
|
|
|
SerialNo: partnerInfo.Id,
|
|
|
CooperateTime: partnerInfo.CooperateTime.Unix() * 1000,
|
|
|
MiniProgram: map[string]interface{}{
|
|
|
"webpageUrl": "www.baidu.com", //兼容低版本的网页链接
|
|
|
"userName": "gh_eae893edc61d", // //小程序的原始id
|
|
|
"path": fmt.Sprintf("%v?inviter_id=%v", "pages/index/index", partnerInfo.Id), //小程序的path
|
|
|
"hdImageUrl": "http://suplus-business-admin-test.fjmaimaimai.com/images/default/default_logo.png", //小程序的预览图链接
|
|
|
},
|
|
|
MiniProgram: miniProgram,
|
|
|
District: map[string]interface{}{"id": partnerInfo.RegionInfo.RegionId, "name": partnerInfo.RegionInfo.RegionName},
|
|
|
},
|
|
|
}
|
...
|
...
|
|