Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
mall.oytour.com
Commits
0961488b
Commit
0961488b
authored
Jun 12, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发布新增一个接口
parent
b22dc6fe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
4 deletions
+67
-4
PublishController.cs
Mall.WebApi/Controllers/AppletWeChat/PublishController.cs
+28
-4
appsettings2.json
Mall.WebApi/appsettings2.json
+39
-0
No files found.
Mall.WebApi/Controllers/AppletWeChat/PublishController.cs
View file @
0961488b
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>
...
...
Mall.WebApi/appsettings2.json
0 → 100644
View file @
0961488b
{
"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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment