...
|
...
|
@@ -4,6 +4,9 @@ import ( |
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/common/query"
|
|
|
)
|
|
|
|
|
|
const IOSPage = "http://fir.fjmaimaimai.com/pdvn"
|
|
|
const ANDPage = "http://fir.fjmaimaimai.com/ben1"
|
|
|
|
|
|
type CommonService struct {
|
|
|
}
|
|
|
|
...
|
...
|
@@ -67,22 +70,48 @@ func (srv *CommonService) GetDictionaryByCode(getDictionaryQuery *query.GetDicti |
|
|
}
|
|
|
|
|
|
//LatestVersionInfo 版本升级
|
|
|
func (srv *CommonService) LatestVersionInfo() (interface{}, error) {
|
|
|
func (srv *CommonService) LatestVersionInfo(q *query.GetLatestVersionQuery) (interface{}, error) {
|
|
|
page := IOSPage
|
|
|
if q.DeviceType == "1" { // 安卓
|
|
|
page = ANDPage
|
|
|
}
|
|
|
return map[string]interface{}{
|
|
|
"version": map[string]interface{}{
|
|
|
"downloadPage": "www.baidu.com",
|
|
|
"downloadFile": "test.iso",
|
|
|
"downloadPage": page,
|
|
|
"downloadFile": "",
|
|
|
"updateType": 0,
|
|
|
},
|
|
|
}, nil
|
|
|
//vs:= version_server.NewHttpLibVersionServer()
|
|
|
//data,err:= vs.GetLatestVersion(q.Request,version_server.ReqLatestVersion{
|
|
|
// VersionNo: q.VersionNo,
|
|
|
// Channel: q.Channel,
|
|
|
//})
|
|
|
//if err != nil {
|
|
|
// return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
|
|
//}
|
|
|
//return data, nil
|
|
|
}
|
|
|
|
|
|
//AppSharing 获取分享链接地址
|
|
|
func (srv *CommonService) AppSharing() (interface{}, error) {
|
|
|
func (srv *CommonService) AppSharing(q *query.GetLatestVersionQuery) (interface{}, error) {
|
|
|
page := IOSPage
|
|
|
if q.DeviceType == "1" { // 安卓
|
|
|
page = ANDPage
|
|
|
}
|
|
|
return map[string]interface{}{
|
|
|
"version": map[string]interface{}{
|
|
|
"downloadPage": "www.baidu.com",
|
|
|
"downloadFile": "test.iso",
|
|
|
"downloadPage": page,
|
|
|
"downloadFile": "",
|
|
|
},
|
|
|
}, nil
|
|
|
//vs:= version_server.NewHttpLibVersionServer()
|
|
|
//data,err:= vs.GetLatestVersion(q.Request,version_server.ReqLatestVersion{
|
|
|
// VersionNo: q.VersionNo,
|
|
|
// Channel: q.Channel,
|
|
|
//})
|
|
|
//if err != nil {
|
|
|
// return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
|
|
//}
|
|
|
//return data, nil
|
|
|
} |
...
|
...
|
|