Commit 0961488b authored by 吴春's avatar 吴春

发布新增一个接口

parent b22dc6fe
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>
......
{
"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