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
b8d16d92
Commit
b8d16d92
authored
Jun 12, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
610a5491
f9c41f13
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
134 additions
and
7 deletions
+134
-7
ConvertHelper.cs
Mall.Common/Plugin/ConvertHelper.cs
+1
-1
RB_Miniprogram_Template_Extend.cs
.../Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
+1
-0
PublishController.cs
Mall.WebApi/Controllers/AppletWeChat/PublishController.cs
+28
-4
MallController.cs
Mall.WebApi/Controllers/Mall/MallController.cs
+1
-0
MallHelper.cs
Mall.WebApi/Controllers/Mall/MallHelper.cs
+64
-2
appsettings2.json
Mall.WebApi/appsettings2.json
+39
-0
No files found.
Mall.Common/Plugin/ConvertHelper.cs
View file @
b8d16d92
...
...
@@ -42,7 +42,7 @@ namespace Mall.Common
}
}
}
return
new
String
(
temp
);
return
new
String
(
temp
)
.
Replace
(
@"\"
,
""
)
;
}
/// <summary>
...
...
Mall.Model/Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
View file @
b8d16d92
...
...
@@ -894,6 +894,7 @@ namespace Mall.Model.Extend.MarketingCenter
/// <summary>
/// 商品名称
/// </summary>
public
string
name
{
get
;
set
;
}
/// <summary>
...
...
Mall.WebApi/Controllers/AppletWeChat/PublishController.cs
View file @
b8d16d92
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/Controllers/Mall/MallController.cs
View file @
b8d16d92
...
...
@@ -344,6 +344,7 @@ namespace Mall.WebApi.Controllers.MallBase
}
//基础配置
setting
=
MallHelper
.
GetBasicSetting
(
miniProgram
);
//分销基础信息
share_setting
=
MallHelper
.
GetDistributorBasicsInfo
(
miniProgram
);
//分销商设置
...
...
Mall.WebApi/Controllers/Mall/MallHelper.cs
View file @
b8d16d92
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
;
}
}
}
Mall.WebApi/appsettings2.json
0 → 100644
View file @
b8d16d92
{
"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