|
@@ -211,7 +211,16 @@ func UserInfoV2(header *protocol.RequestHeader, request *protocol.UserInfoReques |
|
@@ -211,7 +211,16 @@ func UserInfoV2(header *protocol.RequestHeader, request *protocol.UserInfoReques |
211
|
if company, err = CompanyResponsitory.FindOne(map[string]interface{}{"id": header.CompanyId}); err != nil {
|
211
|
if company, err = CompanyResponsitory.FindOne(map[string]interface{}{"id": header.CompanyId}); err != nil {
|
212
|
return
|
212
|
return
|
213
|
}
|
213
|
}
|
214
|
-
|
214
|
+ var miniProgram = make(map[string]interface{})
|
|
|
215
|
+ if len(company.Applets) > 0 {
|
|
|
216
|
+ if company.Applets[0].Valid() {
|
|
|
217
|
+ miniProgram["webpageUrl"] = "www.baidu.com"
|
|
|
218
|
+ miniProgram["userName"] = company.Applets[0].Id
|
|
|
219
|
+ miniProgram["path"] = fmt.Sprintf("%v?inviter_id=%v", company.Applets[0].URL, partnerInfo.Id)
|
|
|
220
|
+ miniProgram["hdImageUrl"] = "http://suplus-business-admin-test.fjmaimaimai.com/images/default/default_logo.png"
|
|
|
221
|
+ miniProgram["title"] = company.Applets[0].Name
|
|
|
222
|
+ }
|
|
|
223
|
+ }
|
215
|
u := userx.User{
|
224
|
u := userx.User{
|
216
|
Id: partnerInfo.Id,
|
225
|
Id: partnerInfo.Id,
|
217
|
PartnerName: partnerInfo.PartnerName,
|
226
|
PartnerName: partnerInfo.PartnerName,
|
|
@@ -222,13 +231,8 @@ func UserInfoV2(header *protocol.RequestHeader, request *protocol.UserInfoReques |
|
@@ -222,13 +231,8 @@ func UserInfoV2(header *protocol.RequestHeader, request *protocol.UserInfoReques |
222
|
Phone: company.Phone,
|
231
|
Phone: company.Phone,
|
223
|
SerialNo: partnerInfo.Id,
|
232
|
SerialNo: partnerInfo.Id,
|
224
|
CooperateTime: partnerInfo.CooperateTime.Unix() * 1000,
|
233
|
CooperateTime: partnerInfo.CooperateTime.Unix() * 1000,
|
225
|
- MiniProgram: map[string]interface{}{
|
|
|
226
|
- "webpageUrl": "www.baidu.com", //兼容低版本的网页链接
|
|
|
227
|
- "userName": "gh_eae893edc61d", // //小程序的原始id
|
|
|
228
|
- "path": fmt.Sprintf("%v?inviter_id=%v", "pages/index/index", partnerInfo.Id), //小程序的path
|
|
|
229
|
- "hdImageUrl": "http://suplus-business-admin-test.fjmaimaimai.com/images/default/default_logo.png", //小程序的预览图链接
|
|
|
230
|
- },
|
|
|
231
|
- District: map[string]interface{}{"id": partnerInfo.RegionInfo.RegionId, "name": partnerInfo.RegionInfo.RegionName},
|
234
|
+ MiniProgram: miniProgram,
|
|
|
235
|
+ District: map[string]interface{}{"id": partnerInfo.RegionInfo.RegionId, "name": partnerInfo.RegionInfo.RegionName},
|
232
|
},
|
236
|
},
|
233
|
}
|
237
|
}
|
234
|
if len(partnerInfo.Salesman) > 0 {
|
238
|
if len(partnerInfo.Salesman) > 0 {
|