|
|
@@ -37,13 +37,6 @@ namespace Winsoft.GOV.XF.WebApi.WXCore.Services
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
- public string GetURL(Bundle b, string absoluteUri)
|
|
|
- {
|
|
|
- //_httpContext.Request.GetAbsoluteUri()
|
|
|
- string s = absoluteUri + "/dist/web12345-pageView/index.html#!/pageView?bid={0}&m={1}";
|
|
|
- s = String.Format(s, b.Id.ToString(), b.Id.ToString().AESEncrypt(b.Key));
|
|
|
- return s;
|
|
|
- }
|
|
|
|
|
|
public async Task<Bundle> GetDetail(string id)
|
|
|
{
|
|
|
@@ -100,7 +93,21 @@ namespace Winsoft.GOV.XF.WebApi.WXCore.Services
|
|
|
Expire = -1,
|
|
|
BundleId = b.Id
|
|
|
};
|
|
|
- string multimediaURL = string.Format("{0}dist/multimedia/index.html?bundleId={1}&ciphertext={2}",
|
|
|
+ //http://ef7eb3cc.ngrok.io/dist/multimedia/index.html?
|
|
|
+ string multimediaURL = string.Format("{0}m/index.html?bundleId={1}&ciphertext={2}",
|
|
|
+ absoluteUri, b.Id, JsonConvert.SerializeObject(a).AESEncrypt(b.Key));
|
|
|
+ return multimediaURL;
|
|
|
+ }
|
|
|
+
|
|
|
+ public string GenerateSampleBaseURL(Bundle b, string absoluteUri)
|
|
|
+ {
|
|
|
+ BundleAccessToken a = new BundleAccessToken()
|
|
|
+ {
|
|
|
+ Expire = -1,
|
|
|
+ BundleId = b.Id
|
|
|
+ };
|
|
|
+ //http://ef7eb3cc.ngrok.io/dist/multimedia/index.html?
|
|
|
+ string multimediaURL = string.Format("{0}m/index.html?id={1}",
|
|
|
absoluteUri, b.Id, JsonConvert.SerializeObject(a).AESEncrypt(b.Key));
|
|
|
return multimediaURL;
|
|
|
}
|
|
|
@@ -110,11 +117,24 @@ namespace Winsoft.GOV.XF.WebApi.WXCore.Services
|
|
|
if (a.Expire != -1)
|
|
|
{
|
|
|
a.Expire = DateTime.Now.AddDays(1).ToTimeStamp();
|
|
|
- string multimediaURL = string.Format("{0}dist/multimedia/index.html?bundleId={1}&data={2}",
|
|
|
+ string multimediaURL = string.Format("{0}m/index.html?id={1}&ciphertext={2}",
|
|
|
absoluteUri, b.Id, JsonConvert.SerializeObject(a).AESEncrypt(b.Key));
|
|
|
return multimediaURL;
|
|
|
}
|
|
|
return String.Empty;
|
|
|
}
|
|
|
+
|
|
|
+ public string GenerateSampleShareURL(Bundle b, string absoluteUri)
|
|
|
+ {
|
|
|
+ BundleAccessToken a = new BundleAccessToken()
|
|
|
+ {
|
|
|
+ BundleId = b.Id,
|
|
|
+ Expire = DateTime.Now.AddDays(1).ToTimeStamp()
|
|
|
+ };
|
|
|
+
|
|
|
+ string multimediaURL = string.Format("{0}m/index.html?id={1}&ciphertext={2}",
|
|
|
+ absoluteUri, b.Id, JsonConvert.SerializeObject(a).AESEncrypt(b.Key));
|
|
|
+ return multimediaURL;
|
|
|
+ }
|
|
|
}
|
|
|
}
|