Commit 23495466 by 陈宁

# dev foo

parent c52f7474
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "3.1.2",
"commands": [
"dotnet-ef"
]
}
}
}
\ No newline at end of file
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<!-- production --> <!-- production -->
<!-- <host><![CDATA[http://10.52.16.40]]></host> --> <!-- <host><![CDATA[http://10.52.16.40]]></host> -->
<!-- testing --> <!-- testing -->
<host></host> <host>http://10.53.10.27:8092</host>
<!--<host><![CDATA[http://118.89.99.95:7799]]></host> --> <!--<host><![CDATA[http://118.89.99.95:7799]]></host> -->
<resources> <resources>
<resource id="getDateType" uri="/Menu/GetDateType?date={0}" memo="判断是否节假日" /> <resource id="getDateType" uri="/Menu/GetDateType?date={0}" memo="判断是否节假日" />
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
<!-- production --> <!-- production -->
<!-- <host><![CDATA[http://10.52.16.40]]></host> --> <!-- <host><![CDATA[http://10.52.16.40]]></host> -->
<!-- testing --> <!-- testing -->
<host></host> <host>http://10.53.10.27:8092</host>
<!--<host><![CDATA[http://118.89.99.95:7799]]></host> --> <!--<host><![CDATA[http://118.89.99.95:7799]]></host> -->
<resources> <resources>
<resource id="queryByShop" uri="/Query/Stock/ListByShop?shopId={0}" memo="查询门店所有商品库存" /> <resource id="queryByShop" uri="/Query/Stock/ListByShop?shopId={0}" memo="查询门店所有商品库存" />
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
</global> </global>
<global name="FreemudStore"> <global name="FreemudStore">
<!-- Testing --> <!-- Testing -->
<host></host> <host>http://10.54.2.115</host>
<!-- Production --> <!-- Production -->
<!-- <host><![CDATA[http://10.52.16.31]]></host> --> <!-- <host><![CDATA[http://10.52.16.31]]></host> -->
<resources> <resources>
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
</global> </global>
<global name="Organization"> <global name="Organization">
<!-- Testing --> <!-- Testing -->
<host></host> <host>http://10.54.2.115/api/v2</host>
<!-- Production --> <!-- Production -->
<!-- <host><![CDATA[http://10.52.16.31/api/v2]]></host> --> <!-- <host><![CDATA[http://10.52.16.31/api/v2]]></host> -->
<resources> <resources>
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
<!-- Production --> <!-- Production -->
<!-- <host><![CDATA[http://10.10.3.130]]></host> --> <!-- <host><![CDATA[http://10.10.3.130]]></host> -->
<!-- 券码的测试环境 new coupon--> <!-- 券码的测试环境 new coupon-->
<host></host> <host>http://10.53.10.10:12666</host>
<!-- 券码的测试环境 old coupon --> <!-- 券码的测试环境 old coupon -->
<!-- <host><![CDATA[http://10.53.10.10:7878]]></host> --> <!-- <host><![CDATA[http://10.53.10.10:7878]]></host> -->
<resources> <resources>
......
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;
}
}
}
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<PackageReference Include="EasyCaching.InMemory" Version="0.8.4" /> <PackageReference Include="EasyCaching.InMemory" Version="0.8.4" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.2" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.2" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> <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="Serilog.AspNetCore" Version="3.2.0" />
<PackageReference Include="UAParser" Version="3.1.44" /> <PackageReference Include="UAParser" Version="3.1.44" />
</ItemGroup> </ItemGroup>
......
...@@ -2,5 +2,6 @@ ...@@ -2,5 +2,6 @@
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ShowAllFiles>false</ShowAllFiles> <ShowAllFiles>false</ShowAllFiles>
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
\ No newline at end of file
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; }
}
}
<?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
<?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
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);
}
}
...@@ -261,17 +261,17 @@ namespace Freemud.BE.Toolbox.WebApi.Services ...@@ -261,17 +261,17 @@ namespace Freemud.BE.Toolbox.WebApi.Services
return; 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, "FreemudStore"), storeEnv, environmentsConfigure.StoreDev, environmentsConfigure.StoreProd);
SetRestConfigValue(GetServiceHostElement(config, "Organization"), storeEnv, environmentsConfigure.StoreDev + @"/api/v2", environmentsConfigure.StoreProd + @"/api/v2"); 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, "FreemudMallDish"), productEnv, environmentsConfigure.ProductDev, environmentsConfigure.ProductProd);
SetRestConfigValue(GetServiceHostElement(config, "FreemudMallStock"), 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); SetRestConfigValue(GetServiceHostElement(config, "FreemudMcdCouponProduct"), couponEnv, environmentsConfigure.CouponDev, environmentsConfigure.CouponProd);
// 保存文件 // 保存文件
......
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();
}
}
}
...@@ -61,6 +61,9 @@ namespace Freemud.BE.Toolbox.WebApi ...@@ -61,6 +61,9 @@ namespace Freemud.BE.Toolbox.WebApi
app.UseDeveloperExceptionPage(); app.UseDeveloperExceptionPage();
} }
app.UseDefaultFiles();
app.UseStaticFiles();
// 用于路由请求的路由中间件 // 用于路由请求的路由中间件
// [注意] 对于大多数应用,对 UseAuthentication、UseAuthorization和 UseCors 的调用必须出现在对 UseRouting 的调用之间,然后 UseEndpoints 才有效 // [注意] 对于大多数应用,对 UseAuthentication、UseAuthorization和 UseCors 的调用必须出现在对 UseRouting 的调用之间,然后 UseEndpoints 才有效
app.UseRouting(); app.UseRouting();
......
<!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
...@@ -3024,6 +3024,11 @@ ...@@ -3024,6 +3024,11 @@
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
"dev": true "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": { "collection-visit": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/collection-visit/download/collection-visit-1.0.0.tgz", "resolved": "https://registry.npm.taobao.org/collection-visit/download/collection-visit-1.0.0.tgz",
...@@ -3953,6 +3958,11 @@ ...@@ -3953,6 +3958,11 @@
"integrity": "sha1-AU7o+PZpxcWAI9pkuBecCDooxGw=", "integrity": "sha1-AU7o+PZpxcWAI9pkuBecCDooxGw=",
"dev": true "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": { "diffie-hellman": {
"version": "5.0.3", "version": "5.0.3",
"resolved": "https://registry.npm.taobao.org/diffie-hellman/download/diffie-hellman-5.0.3.tgz", "resolved": "https://registry.npm.taobao.org/diffie-hellman/download/diffie-hellman-5.0.3.tgz",
...@@ -11621,6 +11631,15 @@ ...@@ -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", "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=" "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": { "vue-eslint-parser": {
"version": "7.0.0", "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", "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",
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
"lodash": "^4.17.15", "lodash": "^4.17.15",
"view-design": "^4.1.2", "view-design": "^4.1.2",
"vue": "^2.6.11", "vue": "^2.6.11",
"vue-codemirror": "^4.0.6",
"vue-router": "^3.1.5" "vue-router": "^3.1.5"
}, },
"devDependencies": { "devDependencies": {
......
...@@ -7,7 +7,10 @@ import './assets/css/global.css' ...@@ -7,7 +7,10 @@ import './assets/css/global.css'
import axios from 'axios' import axios from 'axios'
import _ from 'lodash' import _ from 'lodash'
// dev
axios.defaults.baseURL = 'http://localhost:51138/api' axios.defaults.baseURL = 'http://localhost:51138/api'
// prod
// axios.defaults.baseURL = '/api'
axios.interceptors.request.use(config => { axios.interceptors.request.use(config => {
const au = window.sessionStorage.getItem('au') const au = window.sessionStorage.getItem('au')
if (au) { if (au) {
......
...@@ -22,7 +22,7 @@ const routes = [ ...@@ -22,7 +22,7 @@ const routes = [
{ {
path: '/home', path: '/home',
component: Home, component: Home,
redirect: '/dashboard', redirect: '/environment-configure',
children: [ children: [
{ path: '/dashboard', component: Dashboard }, { path: '/dashboard', component: Dashboard },
{ path: '/environment-configure', component: EnvironmentConfigure }, { path: '/environment-configure', component: EnvironmentConfigure },
......
<template> <template>
<div> <div>
<h3>码券对应商品信息</h3> <h3>码券对应商品信息</h3>
<br />
<Form :label-width="80"> <Form :label-width="80">
<Row> <Row>
<Col span="8"> <Col span="8">
...@@ -34,17 +35,80 @@ ...@@ -34,17 +35,80 @@
<Col span="8"> <Col span="8">
<FormItem label="环境"> <FormItem label="环境">
<Select> <Select>
<Option value="prod">正式环境</Option>
<Option value="dev">测试环境</Option> <Option value="dev">测试环境</Option>
<Option value="prod">正式环境</Option>
</Select> </Select>
</FormItem> </FormItem>
</Col> </Col>
<Col span="8"> <Col span="8">
<FormItem> <FormItem>
<Button type="primary" icon="ios-search">查 询</Button> <Button type="primary" icon="ios-search" @click="search()">查 询</Button>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
</Form> </Form>
<hr />
<div class="result">
<h3>结果 JSON</h3>
<!-- bidirectional data binding(双向数据绑定) -->
<codemirror v-model="code" :options="cmOptions"></codemirror>
</div>
</div> </div>
</template> </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>
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
} }
</script> </script>
<style lang="less" scoped> <style lang="less">
.request-resource { .request-resource {
display: flex; display: flex;
.request-resource-menu { .request-resource-menu {
......
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