Commit d0a250c8 authored by liudong1993's avatar liudong1993

1

parent dffc7dba
...@@ -648,6 +648,26 @@ namespace Property.Module.FixedAssets ...@@ -648,6 +648,26 @@ namespace Property.Module.FixedAssets
demodel.Images = JsonConvert.SerializeObject(imgList); demodel.Images = JsonConvert.SerializeObject(imgList);
var dmodel = property_InfoRepository.GetEntity(demodel.Id); var dmodel = property_InfoRepository.GetEntity(demodel.Id);
if (string.IsNullOrEmpty(dmodel.QRCode)) {
#region 生成二维码
string QRPath = DateTime.Now.Ticks.ToString() + ".png";
string basepath = AppContext.BaseDirectory;
string path_server = basepath + "\\upfile\\code\\" + QRPath;
string ImageAddress = "/upfile/code/" + QRPath;
string logoPath = basepath + "\\ExportFile\\Branch\\Logo.png";
try
{
QRCodeHelper.Create_CodeImages("PropertyCheck|Id=" + demodel.Id, 3, logoPath, path_server, System.Drawing.Imaging.ImageFormat.Png);
}
catch (Exception ex)
{
LogHelper.Write(ex, "QRCodeHelper.Create_CodeImages");
ImageAddress = "";
}
#endregion
dmodel.QRCode = ImageAddress;
}
dmodel.BrandName = demodel.BrandName; dmodel.BrandName = demodel.BrandName;
dmodel.BuyDate = demodel.BuyDate; dmodel.BuyDate = demodel.BuyDate;
dmodel.BuyType = demodel.BuyType; dmodel.BuyType = demodel.BuyType;
...@@ -723,7 +743,7 @@ namespace Property.Module.FixedAssets ...@@ -723,7 +743,7 @@ namespace Property.Module.FixedAssets
string logoPath = basepath + "\\ExportFile\\Branch\\Logo.png"; string logoPath = basepath + "\\ExportFile\\Branch\\Logo.png";
try try
{ {
QRCodeHelper.Create_CodeImages("vt:193213/3213/4123?Id=" + PropertyId, 3, logoPath, path_server, System.Drawing.Imaging.ImageFormat.Png); QRCodeHelper.Create_CodeImages("PropertyCheck|Id=" + PropertyId, 3, logoPath, path_server, System.Drawing.Imaging.ImageFormat.Png);
} }
catch (Exception ex) catch (Exception ex)
{ {
......
...@@ -57,6 +57,9 @@ namespace Property.WebApi.Controllers.Login ...@@ -57,6 +57,9 @@ namespace Property.WebApi.Controllers.Login
{ {
Domain = Domain.Replace("zc", "");//资产管理专用 Domain = Domain.Replace("zc", "");//资产管理专用
} }
if (Domain.Contains("test")) {
Domain = Domain.Replace("test", "");//资产管理测试专用
}
var gmodel = loginModule.GetGroupByDomain(new RB_Group_Extend { Domain = Domain }).FirstOrDefault(); var gmodel = loginModule.GetGroupByDomain(new RB_Group_Extend { Domain = Domain }).FirstOrDefault();
if (gmodel == null) if (gmodel == null)
{ {
......
...@@ -49,7 +49,7 @@ namespace Property.WebApi ...@@ -49,7 +49,7 @@ namespace Property.WebApi
options.JsonSerializerOptions.PropertyNamingPolicy = null; options.JsonSerializerOptions.PropertyNamingPolicy = null;
}); });
services.AddCors(options => options.AddPolicy("AllowCors", policy => policy.AllowAnyHeader().AllowAnyMethod().AllowCredentials().WithOrigins(new[] { "http://www.test.com:8080", "http://www.test.com:8081", "http://www.test.com:8082", "http://zcyx.oytour.com", "http://yx.oytour.com" }))); services.AddCors(options => options.AddPolicy("AllowCors", policy => policy.AllowAnyHeader().AllowAnyMethod().AllowCredentials().WithOrigins(new[] { "http://www.test.com:8080", "http://www.test.com:8081", "http://www.test.com:8082", "http://testzcyx.oytour.com:8080", "http://testzcyx.oytour.com:8081", "http://zcyx.oytour.com", "http://yx.oytour.com" })));
//services.AddCors(options => //services.AddCors(options =>
//{ //{
// options.AddPolicy("AllowCors", // options.AddPolicy("AllowCors",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment