|
|
@@ -17,7 +17,8 @@ namespace Winsoft.GOV.XF.WebApi.WXCore.Services
|
|
|
{
|
|
|
public delegate void OnFails(string message);
|
|
|
BundlesService _bundlesService;
|
|
|
- public XFApiService(BundlesService bundlesService, ILoggerFactory loggerFactory):base(context, loggerFactory)
|
|
|
+
|
|
|
+ public XFApiService(BundlesService bundlesService, XFDbContext context, ILoggerFactory loggerFactory):base(context, loggerFactory)
|
|
|
{
|
|
|
_bundlesService = bundlesService;
|
|
|
}
|
|
|
@@ -29,9 +30,12 @@ namespace Winsoft.GOV.XF.WebApi.WXCore.Services
|
|
|
/// <returns></returns>
|
|
|
public async Task<bool> PostLetter(Bundle b, OnFails onFails)
|
|
|
{
|
|
|
+ string d = b.Describe;
|
|
|
+ if (b.Assets.Count() > 0)
|
|
|
+ d += "(此信件内容含有其他多媒体信息,详细请复制网址到浏览器打开:" + _bundlesService.GenerateBaseURL(b) + ")";
|
|
|
string s = "advice={0};type={1};name={2};phone={3};is_public={4};content={5};title={6};county_id={7};unit_id={8};sswz=8;ly=2; user_id={9}";
|
|
|
s = String.Format(s, b.Advice, b.Type.ToString(), b.Name, b.Mobile, b.IsPublic.ToString(), b.Describe, b.Title, b.County_id, b.Unit_id, b.OpenID);
|
|
|
- return s;
|
|
|
+
|
|
|
|
|
|
XFApiResult rObj = await HttpPostAsync<XFApiResult>("http://118.178.118.50/test1/letter/submitLetter;", b.ToString(), onFails);
|
|
|
|