Commit b8d16d92 authored by liudong1993's avatar liudong1993
parents 610a5491 f9c41f13
......@@ -42,7 +42,7 @@ namespace Mall.Common
}
}
}
return new String(temp);
return new String(temp).Replace(@"\","");
}
/// <summary>
......
......@@ -894,6 +894,7 @@ namespace Mall.Model.Extend.MarketingCenter
/// <summary>
/// 商品名称
/// </summary>
public string name { get; set; }
/// <summary>
......
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Google.Protobuf.WellKnownTypes;
using Mall.CacheManager.AppletWeChat;
using Mall.Common.API;
using Mall.Common.Plugin;
using Mall.Model.Extend.User;
......@@ -14,7 +12,6 @@ using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Mall.WebApi.Controllers.AppletWeChat
{
[Route("api/[controller]/[action]")]
......@@ -29,6 +26,33 @@ namespace Mall.WebApi.Controllers.AppletWeChat
readonly string developerKitsPort = Mall.Common.Config.DeveloperKitsPort;
readonly string FirstPage = Mall.Common.Config.FirstPage;
public ApiResult UpdateSetting()
{
var parms = RequestParm;
var query = new RB_MiniProgram_Extend
{
TenantId = UserInfo.TenantId,
MallBaseId = parms.MallBaseId
};
//读取小程序的配置文件
string path = projectUrl + "/common/vendor.js";
string basePath = projectUrl + "/common/vendorbase.js";
if (System.IO.File.Exists(path))
{
string txtStr = System.IO.File.ReadAllText(basePath);
string newStr = txtStr.Replace("$MallBaseId$", query.MallBaseId.ToString()).Replace("$TenantId$", query.TenantId.ToString());
System.IO.File.WriteAllText(path, newStr);
return ApiResult.Failed("基础信息配置成功");
}
else
{
return ApiResult.Failed("配置文件不存在,请先确认");
}
}
/// <summary>
/// 发布微信小程序获取登录二维码
/// </summary>
......
......@@ -344,6 +344,7 @@ namespace Mall.WebApi.Controllers.MallBase
}
//基础配置
setting = MallHelper.GetBasicSetting(miniProgram);
//分销基础信息
share_setting = MallHelper.GetDistributorBasicsInfo(miniProgram);
//分销商设置
......
using Mall.Model.Entity.BaseSetUp;
using Mall.Common.Enum.MallBase;
using Mall.Model.Entity.BaseSetUp;
using Mall.Model.Entity.MarketingCenter;
using Mall.Model.Extend.BaseSetUp;
using Mall.Model.Extend.MarketingCenter;
......@@ -1591,9 +1592,54 @@ namespace Mall.WebApi.Controllers
}
}
}
//商城风格
var mallStyle = new object();
if (miniProgram?.MallShopStyle > 0)
{
ResultMallShopStyle resultMallShopStyle = new ResultMallShopStyle();
switch (miniProgram.MallShopStyle)
{
case MallShopStyleEnum.Default:
resultMallShopStyle = new ResultMallShopStyle() { main = "#ff4544", secondary = "#f39800" };
break;
case MallShopStyleEnum.VibrantYellow:
resultMallShopStyle = new ResultMallShopStyle() { main = "#ff4544", secondary = "#f39800" };
break;
case MallShopStyleEnum.RomanticPowder:
resultMallShopStyle = new ResultMallShopStyle() { main = "#ff547b", secondary = "#ffe6e8" };
break;
case MallShopStyleEnum.StreamerGold:
resultMallShopStyle = new ResultMallShopStyle() { main = "#ddb766", secondary = "#f0ebd8" };
break;
case MallShopStyleEnum.ElegantPurple:
resultMallShopStyle = new ResultMallShopStyle() { main = "#7783ea", secondary = "#e9ebff" };
break;
case MallShopStyleEnum.TasteRed:
resultMallShopStyle = new ResultMallShopStyle() { main = "#ff4544", secondary = "#555555" };
break;
case MallShopStyleEnum.FreshGreen:
resultMallShopStyle = new ResultMallShopStyle() { main = "#63be72", secondary = "#e1f4e3" };
break;
case MallShopStyleEnum.BusinessBlue:
resultMallShopStyle = new ResultMallShopStyle() { main = "#4a90e2", secondary = "#dbe9f9" };
break;
case MallShopStyleEnum.PureBlack:
resultMallShopStyle = new ResultMallShopStyle() { main = "#333333", secondary = "#dedede" };
break;
case MallShopStyleEnum.PassionateRed:
resultMallShopStyle = new ResultMallShopStyle() { main = "#ff4544", secondary = "#ffdada" };
break;
}
mallStyle = new
{
resultMallShopStyle?.main,
resultMallShopStyle?.secondary,
};
}
var setting = new
var setting = new
{
mallStyle,
contact_tel = mallBaseModel?.ContactNumber,
over_time = mallBaseModel?.CancelTime,
delivery_time = mallBaseModel?.AutoReceiving,
......@@ -1847,4 +1893,20 @@ namespace Mall.WebApi.Controllers
return share_setting_custom;
}
}
/// <summary>
/// 商城风格
/// </summary>
public class ResultMallShopStyle
{
/// <summary>
/// 主色
/// </summary>
public string main { get; set; }
/// <summary>
/// 辅色
/// </summary>
public string secondary { get; set; }
}
}
{
"ConnectionStrings": {
"DefaultConnection": "server=rm-bp1tj77h6kp0d02fbio.mysql.rds.aliyuncs.com;user id=reborn;password=Reborn@2018;database=uat_reborn_mall;CharSet=utf8; Convert Zero Datetime=true; ",
"DefaultConnectionPName": "MySql.Data.MySqlClient"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"JwtSecretKey": "@VIITTOREBORN*2018",
"JwtExpirTime": 2592000,
"ApiExpirTime": 2592000,
"AllowedHosts": "*",
"OpenValidation": "False",
"UploadSiteUrl": "http://192.168.2.214:8120",
"ViewFileSiteUrl": "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com",
"ImKey": "b612b31e837c79c68f141aeb719d2b20",
"ImSecret": "66000451fb72",
"Mongo": "mongodb://47.96.25.130:27017",
"MongoDBName": "Mall",
"ProjectUrl": "D:/project/GitProject/tripfriend",
"DeveloperKitsPort": "63994",
"FirstPage": "pages/index/index.html",
"ByteDanceSendTemplate": "https://developer.toutiao.com/api/apps/game/template/send",
"sTenpayNotify":"http://mallapi.oytour.com/api/WeChatNotify/Notify",
"RedisSetting": {
"RedisServer": "47.96.23.199",
"RedisPort": "6379",
"RedisPwd": "Viitto2018"
},
"VirtualDirectory": "WebFile",
"FileService": "2",
"InitializeImages": {
"GradeEntranceImage": "1234566778"
}
}
\ No newline at end of file
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