Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
freemud.be.toolbox
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈宁
freemud.be.toolbox
Commits
23495466
Commit
23495466
authored
Mar 21, 2020
by
陈宁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# dev foo
parent
c52f7474
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
228 additions
and
12 deletions
+228
-12
Freemud.BE.Toolbox.WebApi/.config/dotnet-tools.json
+13
-0
Freemud.BE.Toolbox.WebApi/Configs/DeliveryRestService.config
+5
-5
Freemud.BE.Toolbox.WebApi/Controllers/RequestResourceController.cs
+18
-0
Freemud.BE.Toolbox.WebApi/Freemud.BE.Toolbox.WebApi.csproj
+1
-0
Freemud.BE.Toolbox.WebApi/Freemud.BE.Toolbox.WebApi.csproj.user
+2
-0
Freemud.BE.Toolbox.WebApi/Model/Request/GetCouponProductInput.cs
+18
-0
Freemud.BE.Toolbox.WebApi/Properties/PublishProfiles/FolderProfile.pubxml
+22
-0
Freemud.BE.Toolbox.WebApi/Properties/PublishProfiles/FolderProfile.pubxml.user
+12
-0
Freemud.BE.Toolbox.WebApi/Services/IRequestResourceService.cs
+13
-0
Freemud.BE.Toolbox.WebApi/Services/Impl/EnvironmentConfigureService.cs
+3
-3
Freemud.BE.Toolbox.WebApi/Services/Impl/RequestResourceService.cs
+16
-0
Freemud.BE.Toolbox.WebApi/Startup.cs
+3
-0
Freemud.BE.Toolbox.WebApi/wwwroot/index.html
+11
-0
freemud.be.toolboxview/package-lock.json
+19
-0
freemud.be.toolboxview/package.json
+1
-0
freemud.be.toolboxview/src/main.js
+3
-0
freemud.be.toolboxview/src/router/index.js
+1
-1
freemud.be.toolboxview/src/views/requestresource/CouponProductSearch.vue
+66
-2
freemud.be.toolboxview/src/views/requestresource/RequestResource.vue
+1
-1
No files found.
Freemud.BE.Toolbox.WebApi/.config/dotnet-tools.json
0 → 100644
View file @
23495466
{
"version"
:
1
,
"isRoot"
:
true
,
"tools"
:
{
"dotnet-ef"
:
{
"version"
:
"3.1.2"
,
"commands"
:
[
"dotnet-ef"
]
}
}
}
\ No newline at end of file
Freemud.BE.Toolbox.WebApi/Configs/DeliveryRestService.config
View file @
23495466
...
...
@@ -72,7 +72,7 @@
<!--
production
-->
<!-- <
host
><![
CDATA
[
http
://
10
.
52
.
16
.
40
]]></
host
> -->
<!--
testing
-->
<
host
></
host
>
<
host
>
http
://
10
.
53
.
10
.
27
:
8092
</
host
>
<!--<
host
><![
CDATA
[
http
://
118
.
89
.
99
.
95
:
7799
]]></
host
> -->
<
resources
>
<
resource
id
=
"getDateType"
uri
=
"/Menu/GetDateType?date={0}"
memo
=
"判断是否节假日"
/>
...
...
@@ -110,7 +110,7 @@
<!--
production
-->
<!-- <
host
><![
CDATA
[
http
://
10
.
52
.
16
.
40
]]></
host
> -->
<!--
testing
-->
<
host
></
host
>
<
host
>
http
://
10
.
53
.
10
.
27
:
8092
</
host
>
<!--<
host
><![
CDATA
[
http
://
118
.
89
.
99
.
95
:
7799
]]></
host
> -->
<
resources
>
<
resource
id
=
"queryByShop"
uri
=
"/Query/Stock/ListByShop?shopId={0}"
memo
=
"查询门店所有商品库存"
/>
...
...
@@ -148,7 +148,7 @@
</
global
>
<
global
name
=
"FreemudStore"
>
<!--
Testing
-->
<
host
></
host
>
<
host
>
http
://
10
.
54
.
2
.
115
</
host
>
<!--
Production
-->
<!-- <
host
><![
CDATA
[
http
://
10
.
52
.
16
.
31
]]></
host
> -->
<
resources
>
...
...
@@ -190,7 +190,7 @@
</
global
>
<
global
name
=
"Organization"
>
<!--
Testing
-->
<
host
></
host
>
<
host
>
http
://
10
.
54
.
2
.
115
/
api
/
v2
</
host
>
<!--
Production
-->
<!-- <
host
><![
CDATA
[
http
://
10
.
52
.
16
.
31
/
api
/
v2
]]></
host
> -->
<
resources
>
...
...
@@ -233,7 +233,7 @@
<!--
Production
-->
<!-- <
host
><![
CDATA
[
http
://
10
.
10
.
3
.
130
]]></
host
> -->
<!-- 券码的测试环境
new
coupon
-->
<
host
></
host
>
<
host
>
http
://
10
.
53
.
10
.
10
:
12666
</
host
>
<!-- 券码的测试环境
old
coupon
-->
<!-- <
host
><![
CDATA
[
http
://
10
.
53
.
10
.
10
:
7878
]]></
host
> -->
<
resources
>
...
...
Freemud.BE.Toolbox.WebApi/Controllers/RequestResourceController.cs
0 → 100644
View file @
23495466
using
Freemud.BE.Toolbox.WebApi.Services
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
namespace
Freemud.BE.Toolbox.WebApi.Controllers
{
public
class
RequestResourceController
:
BaseController
{
private
readonly
IRequestResourceService
requestResourceService
;
public
RequestResourceController
(
IRequestResourceService
requestResourceService
)
{
this
.
requestResourceService
=
requestResourceService
;
}
}
}
Freemud.BE.Toolbox.WebApi/Freemud.BE.Toolbox.WebApi.csproj
View file @
23495466
...
...
@@ -8,6 +8,7 @@
<PackageReference Include="EasyCaching.InMemory" Version="0.8.4" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.2" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="RestSharp" Version="106.10.1" />
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
<PackageReference Include="UAParser" Version="3.1.44" />
</ItemGroup>
...
...
Freemud.BE.Toolbox.WebApi/Freemud.BE.Toolbox.WebApi.csproj.user
View file @
23495466
...
...
@@ -2,5 +2,6 @@
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ShowAllFiles>false</ShowAllFiles>
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
</PropertyGroup>
</Project>
\ No newline at end of file
Freemud.BE.Toolbox.WebApi/Model/Request/GetCouponProductInput.cs
0 → 100644
View file @
23495466
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
namespace
Freemud.BE.Toolbox.WebApi.Model.Request
{
public
class
GetCouponProductInput
{
public
string
CouponCode
{
get
;
set
;
}
public
string
StoreCode
{
get
;
set
;
}
public
string
Channel
{
get
;
set
;
}
public
string
Env
{
get
;
set
;
}
}
}
Freemud.BE.Toolbox.WebApi/Properties/PublishProfiles/FolderProfile.pubxml
0 → 100644
View file @
23495466
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project
ToolsVersion=
"4.0"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup>
<WebPublishMethod>
FileSystem
</WebPublishMethod>
<PublishProvider>
FileSystem
</PublishProvider>
<LastUsedBuildConfiguration>
Release
</LastUsedBuildConfiguration>
<LastUsedPlatform>
Any CPU
</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish
/>
<LaunchSiteAfterPublish>
True
</LaunchSiteAfterPublish>
<ExcludeApp_Data>
False
</ExcludeApp_Data>
<ProjectGuid>
acf0a518-8f91-40e7-b866-4269cc65c3fa
</ProjectGuid>
<publishUrl>
bin\Release\netcoreapp3.1\publish\
</publishUrl>
<DeleteExistingFiles>
True
</DeleteExistingFiles>
<TargetFramework>
netcoreapp3.1
</TargetFramework>
<SelfContained>
false
</SelfContained>
</PropertyGroup>
</Project>
\ No newline at end of file
Freemud.BE.Toolbox.WebApi/Properties/PublishProfiles/FolderProfile.pubxml.user
0 → 100644
View file @
23495466
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project
ToolsVersion=
"4.0"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup>
<TimeStampOfAssociatedLegacyPublishXmlFile
/>
<_PublishTargetUrl>
D:\WorkDocument\Freemud.BE\Freemud.BE.Toolbox.WebApi\bin\Release\netcoreapp3.1\publish\
</_PublishTargetUrl>
</PropertyGroup>
</Project>
\ No newline at end of file
Freemud.BE.Toolbox.WebApi/Services/IRequestResourceService.cs
0 → 100644
View file @
23495466
using
Freemud.BE.Toolbox.WebApi.Model.Request
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
namespace
Freemud.BE.Toolbox.WebApi.Services
{
public
interface
IRequestResourceService
{
Task
GetCouponProduct
(
GetCouponProductInput
input
);
}
}
Freemud.BE.Toolbox.WebApi/Services/Impl/EnvironmentConfigureService.cs
View file @
23495466
...
...
@@ -261,17 +261,17 @@ namespace Freemud.BE.Toolbox.WebApi.Services
return
;
// 门店
var
storeEnv
=
services
.
FirstOrDefault
(
d
=>
d
.
Code
.
Equals
(
"store
-env
"
))?.
Val
;
var
storeEnv
=
services
.
FirstOrDefault
(
d
=>
d
.
Code
.
Equals
(
"store"
))?.
Val
;
SetRestConfigValue
(
GetServiceHostElement
(
config
,
"FreemudStore"
),
storeEnv
,
environmentsConfigure
.
StoreDev
,
environmentsConfigure
.
StoreProd
);
SetRestConfigValue
(
GetServiceHostElement
(
config
,
"Organization"
),
storeEnv
,
environmentsConfigure
.
StoreDev
+
@"/api/v2"
,
environmentsConfigure
.
StoreProd
+
@"/api/v2"
);
// 商品
var
productEnv
=
services
.
FirstOrDefault
(
d
=>
d
.
Code
.
Equals
(
"product
-env
"
))?.
Val
;
var
productEnv
=
services
.
FirstOrDefault
(
d
=>
d
.
Code
.
Equals
(
"product"
))?.
Val
;
SetRestConfigValue
(
GetServiceHostElement
(
config
,
"FreemudMallDish"
),
productEnv
,
environmentsConfigure
.
ProductDev
,
environmentsConfigure
.
ProductProd
);
SetRestConfigValue
(
GetServiceHostElement
(
config
,
"FreemudMallStock"
),
productEnv
,
environmentsConfigure
.
ProductDev
,
environmentsConfigure
.
ProductProd
);
// 券码
var
couponEnv
=
services
.
FirstOrDefault
(
d
=>
d
.
Code
.
Equals
(
"coupon
-env
"
))?.
Val
;
var
couponEnv
=
services
.
FirstOrDefault
(
d
=>
d
.
Code
.
Equals
(
"coupon"
))?.
Val
;
SetRestConfigValue
(
GetServiceHostElement
(
config
,
"FreemudMcdCouponProduct"
),
couponEnv
,
environmentsConfigure
.
CouponDev
,
environmentsConfigure
.
CouponProd
);
// 保存文件
...
...
Freemud.BE.Toolbox.WebApi/Services/Impl/RequestResourceService.cs
0 → 100644
View file @
23495466
using
Freemud.BE.Toolbox.WebApi.Model.Request
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
namespace
Freemud.BE.Toolbox.WebApi.Services
{
public
class
RequestResourceService
:
IRequestResourceService
{
public
async
Task
GetCouponProduct
(
GetCouponProductInput
input
)
{
throw
new
NotImplementedException
();
}
}
}
Freemud.BE.Toolbox.WebApi/Startup.cs
View file @
23495466
...
...
@@ -61,6 +61,9 @@ namespace Freemud.BE.Toolbox.WebApi
app
.
UseDeveloperExceptionPage
();
}
app
.
UseDefaultFiles
();
app
.
UseStaticFiles
();
// 用于路由请求的路由中间件
// [注意] 对于大多数应用,对 UseAuthentication、UseAuthorization和 UseCors 的调用必须出现在对 UseRouting 的调用之间,然后 UseEndpoints 才有效
app
.
UseRouting
();
...
...
Freemud.BE.Toolbox.WebApi/wwwroot/index.html
0 → 100644
View file @
23495466
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
/>
<title></title>
</head>
<body>
<h1>
Halo! Freemud.BE.Toolbox
</h1>
</body>
</html>
\ No newline at end of file
freemud.be.toolboxview/package-lock.json
View file @
23495466
...
...
@@ -3024,6 +3024,11 @@
"integrity"
:
"sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
,
"dev"
:
true
},
"codemirror"
:
{
"version"
:
"5.52.0"
,
"resolved"
:
"https://registry.npm.taobao.org/codemirror/download/codemirror-5.52.0.tgz"
,
"integrity"
:
"sha1-Tb1q738OY9uCa5ojki8MA6x1wKc="
},
"collection-visit"
:
{
"version"
:
"1.0.0"
,
"resolved"
:
"https://registry.npm.taobao.org/collection-visit/download/collection-visit-1.0.0.tgz"
,
...
...
@@ -3953,6 +3958,11 @@
"integrity"
:
"sha1-AU7o+PZpxcWAI9pkuBecCDooxGw="
,
"dev"
:
true
},
"diff-match-patch"
:
{
"version"
:
"1.0.4"
,
"resolved"
:
"https://registry.npm.taobao.org/diff-match-patch/download/diff-match-patch-1.0.4.tgz"
,
"integrity"
:
"sha1-asS1UjdGN2HE2vDcYD64aRJHRLE="
},
"diffie-hellman"
:
{
"version"
:
"5.0.3"
,
"resolved"
:
"https://registry.npm.taobao.org/diffie-hellman/download/diffie-hellman-5.0.3.tgz"
,
...
...
@@ -11621,6 +11631,15 @@
"resolved"
:
"https://registry.npm.taobao.org/vue/download/vue-2.6.11.tgz?cache=0&sync_timestamp=1582073125064&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue%2Fdownload%2Fvue-2.6.11.tgz"
,
"integrity"
:
"sha1-dllNh31LEiNEBuhONSdcbVFBJcU="
},
"vue-codemirror"
:
{
"version"
:
"4.0.6"
,
"resolved"
:
"https://registry.npm.taobao.org/vue-codemirror/download/vue-codemirror-4.0.6.tgz"
,
"integrity"
:
"sha1-t4a7gNjXYqk6q45G95qBAG8EN8Q="
,
"requires"
:
{
"codemirror"
:
"^5.41.0"
,
"diff-match-patch"
:
"^1.0.0"
}
},
"vue-eslint-parser"
:
{
"version"
:
"7.0.0"
,
"resolved"
:
"https://registry.npm.taobao.org/vue-eslint-parser/download/vue-eslint-parser-7.0.0.tgz?cache=0&sync_timestamp=1573306349811&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-eslint-parser%2Fdownload%2Fvue-eslint-parser-7.0.0.tgz"
,
...
...
freemud.be.toolboxview/package.json
View file @
23495466
...
...
@@ -13,6 +13,7 @@
"lodash"
:
"^4.17.15"
,
"view-design"
:
"^4.1.2"
,
"vue"
:
"^2.6.11"
,
"vue-codemirror"
:
"^4.0.6"
,
"vue-router"
:
"^3.1.5"
},
"devDependencies"
:
{
...
...
freemud.be.toolboxview/src/main.js
View file @
23495466
...
...
@@ -7,7 +7,10 @@ import './assets/css/global.css'
import
axios
from
'axios'
import
_
from
'lodash'
// dev
axios
.
defaults
.
baseURL
=
'http://localhost:51138/api'
// prod
// axios.defaults.baseURL = '/api'
axios
.
interceptors
.
request
.
use
(
config
=>
{
const
au
=
window
.
sessionStorage
.
getItem
(
'au'
)
if
(
au
)
{
...
...
freemud.be.toolboxview/src/router/index.js
View file @
23495466
...
...
@@ -22,7 +22,7 @@ const routes = [
{
path
:
'/home'
,
component
:
Home
,
redirect
:
'/
dashboard
'
,
redirect
:
'/
environment-configure
'
,
children
:
[
{
path
:
'/dashboard'
,
component
:
Dashboard
},
{
path
:
'/environment-configure'
,
component
:
EnvironmentConfigure
},
...
...
freemud.be.toolboxview/src/views/requestresource/CouponProductSearch.vue
View file @
23495466
<
template
>
<div>
<h3>
码券对应商品信息
</h3>
<br
/>
<Form
:label-width=
"80"
>
<Row>
<Col
span=
"8"
>
...
...
@@ -34,17 +35,80 @@
<Col
span=
"8"
>
<FormItem
label=
"环境"
>
<Select>
<Option
value=
"prod"
>
正式环境
</Option>
<Option
value=
"dev"
>
测试环境
</Option>
<Option
value=
"prod"
>
正式环境
</Option>
</Select>
</FormItem>
</Col>
<Col
span=
"8"
>
<FormItem>
<Button
type=
"primary"
icon=
"ios-search"
>
查 询
</Button>
<Button
type=
"primary"
icon=
"ios-search"
@
click=
"search()"
>
查 询
</Button>
</FormItem>
</Col>
</Row>
</Form>
<hr
/>
<div
class=
"result"
>
<h3>
结果 JSON
</h3>
<!-- bidirectional data binding(双向数据绑定) -->
<codemirror
v-model=
"code"
:options=
"cmOptions"
></codemirror>
</div>
</div>
</
template
>
<
script
>
// require component And styles And Themes
import
{
codemirror
}
from
'vue-codemirror'
import
'codemirror/mode/javascript/javascript.js'
import
'codemirror/lib/codemirror.css'
import
'codemirror/theme/ambiance.css'
export
default
{
components
:
{
codemirror
},
data
()
{
return
{
code
:
''
,
cmOptions
:
{
lineNumbers
:
true
,
// readOnly: true,
tabSize
:
2
,
model
:
'text/javascript'
,
theme
:
'ambiance'
}
}
},
created
()
{
},
methods
:
{
search
()
{
const
codeStr
=
'{"title":"json在线解析(简版) -JSON在线解析","json.url":"https://www.sojson.com/simple_json.html","keywords":"json在线解析","功能":["JSON美化","JSON数据类型显示","JSON数组显示角标","高亮显示","错误提示",{"备注":["www.sojson.com","json.la"]}],"加入我们":{"qq群":"259217951","年龄":18,"IsChange":false}}'
const
json
=
JSON
.
parse
(
codeStr
)
this
.
code
=
JSON
.
stringify
(
json
,
null
,
'
\
t'
)
this
.
$Message
.
success
(
'请求成功'
)
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.ss
{
color
:
aqua
;
}
</
style
>
<
style
lang=
"less"
>
.CodeMirror
{
border
:
1px
solid
#eee
;
height
:
100%
!important
;
}
.CodeMirror-scroll
{
height
:
auto
;
overflow-y
:
hidden
;
overflow-x
:
auto
;
}
</
style
>
freemud.be.toolboxview/src/views/requestresource/RequestResource.vue
View file @
23495466
...
...
@@ -59,7 +59,7 @@ export default {
}
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
>
.request-resource
{
display
:
flex
;
.request-resource-menu
{
...
...
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