Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈智峰
jinfa-platform
Commits
53c8197d
Commit
53c8197d
authored
Aug 15, 2020
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复单选情况
parent
d2166fb0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
3 deletions
+9
-3
base.config.json
config/base.config.json
+1
-1
index.ts
src/constants/index.ts
+1
-1
useRowSelectionTable.ts
src/hooks/useRowSelectionTable.ts
+6
-0
index.ts
src/services/index.ts
+0
-0
request.ts
src/utils/request.ts
+1
-1
No files found.
config/base.config.json
View file @
53c8197d
{
"userRegister"
:{
"useType"
:{
"memberType"
:[{
"id"
:
1
,
"typeName"
:
"企业会员"
},{
"id"
:
3
,
"typeName"
:
"渠道企业会员"
},{
"id"
:
4
,
"typeName"
:
"渠道个人会员"
},{
"id"
:
2
,
"typeName"
:
"个人会员"
}],
"businessType"
:[{
"id"
:
1
,
"typeName"
:
"采购"
},{
"id"
:
24
,
"typeName"
:
"供应"
},{
"id"
:
33
,
"typeName"
:
"hcx供应商"
},{
"id"
:
34
,
"typeName"
:
"test3"
},{
"id"
:
35
,
"typeName"
:
"test4"
},{
"id"
:
36
,
"typeName"
:
"test5"
},{
"id"
:
37
,
"typeName"
:
"test6
"
}]}},
"web"
:{
"shopInfo"
:[{
"id"
:
302
,
"name"
:
"云鲜采企业商城"
,
"type"
:
1
,
"environment"
:
1
,
"logoUrl"
:
"https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/5b19a059530a4060984fc045125da1f81597395561658.png"
,
"describe"
:
null
,
"state"
:
1
,
"url"
:
"/"
},{
"id"
:
303
,
"name"
:
"云鲜采渠道商城"
,
"type"
:
3
,
"environment"
:
1
,
"logoUrl"
:
"https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/a63c8c81e74947f88c64d4c72bfb565c1597395598958.png"
,
"describe"
:
null
,
"state"
:
1
,
"url"
:
"/shop"
}]},
"global"
:{
"siteId"
:
502
,
"siteUrl"
:
"http://localhost:4396"
,
"logo"
:
"https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/4db4e7c5424c471c968ab540bce027f31597319423082.png"
,
"countryList"
:[{
"name"
:
"简体中文-ZH"
,
"key"
:
"zh-CN"
,
"icon"
:
"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/china.png"
},{
"name"
:
"English-EN"
,
"key"
:
"en-US"
,
"icon"
:
"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/us.png"
},{
"name"
:
"日本語-JP"
,
"key"
:
"jp"
,
"icon"
:
"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/japen.png"
},{
"name"
:
"한국어-KO"
,
"key"
:
"ko"
,
"icon"
:
"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/koren.png"
}]}}
{
"userRegister"
:{
"useType"
:{
"memberType"
:[{
"id"
:
1
,
"typeName"
:
"企业会员"
},{
"id"
:
3
,
"typeName"
:
"渠道企业会员"
},{
"id"
:
4
,
"typeName"
:
"渠道个人会员"
},{
"id"
:
2
,
"typeName"
:
"个人会员"
}],
"businessType"
:[{
"id"
:
1
,
"typeName"
:
"采购"
},{
"id"
:
39
,
"typeName"
:
"供货
"
}]}},
"web"
:{
"shopInfo"
:[{
"id"
:
302
,
"name"
:
"云鲜采企业商城"
,
"type"
:
1
,
"environment"
:
1
,
"logoUrl"
:
"https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/5b19a059530a4060984fc045125da1f81597395561658.png"
,
"describe"
:
null
,
"state"
:
1
,
"url"
:
"/"
},{
"id"
:
303
,
"name"
:
"云鲜采渠道商城"
,
"type"
:
3
,
"environment"
:
1
,
"logoUrl"
:
"https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/a63c8c81e74947f88c64d4c72bfb565c1597395598958.png"
,
"describe"
:
null
,
"state"
:
1
,
"url"
:
"/shop"
}]},
"global"
:{
"siteId"
:
502
,
"siteUrl"
:
"http://localhost:4396"
,
"logo"
:
"https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/4db4e7c5424c471c968ab540bce027f31597319423082.png"
,
"countryList"
:[{
"name"
:
"简体中文-ZH"
,
"key"
:
"zh-CN"
,
"icon"
:
"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/china.png"
},{
"name"
:
"English-EN"
,
"key"
:
"en-US"
,
"icon"
:
"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/us.png"
},{
"name"
:
"日本語-JP"
,
"key"
:
"jp"
,
"icon"
:
"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/japen.png"
},{
"name"
:
"한국어-KO"
,
"key"
:
"ko"
,
"icon"
:
"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/koren.png"
}]}}
src/constants/index.ts
View file @
53c8197d
...
...
@@ -9,7 +9,7 @@ export const MALL_TYPE = {
}
// 本地环境跳过权限校验
export
const
isDev
=
fals
e
export
const
isDev
=
tru
e
export
const
Environment_Status
=
{
0
:
"所有"
,
...
...
src/hooks/useRowSelectionTable.ts
View file @
53c8197d
...
...
@@ -54,6 +54,12 @@ export const useRowSelectionTable = (options: useRowSelectionOptions = {}): [Tab
type
,
// 为解决分页情况下, 保存多选的数据
onSelect
:
(
record
,
selects
,
selectedRows
,
nativeEvent
)
=>
{
if
(
type
===
'radio'
)
{
// 单选情况下
setSelectedRowKeys
([
record
.
id
])
setSelectRow
([
record
])
return
;
}
const
findIds
=
selectedRowKeys
.
indexOf
(
record
.
id
)
if
(
findIds
===
-
1
)
{
mergeRowKeys
(
record
.
id
)
...
...
src/services/index.ts
View file @
53c8197d
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/utils/request.ts
View file @
53c8197d
...
...
@@ -67,7 +67,6 @@ const baseRequest = extend({
// 请求拦截器
baseRequest
.
interceptors
.
request
.
use
((
url
:
string
,
options
:
RequestOptionsInit
):
{
url
:
string
,
options
:
RequestOptionsInit
}
=>
{
// 判断是否有权限
const
loginAfterHeaders
=
getAuth
()
const
headers
=
{
...
...
@@ -101,6 +100,7 @@ class ApiRequest {
createRequest
<
T
>
(
url
:
string
,
options
:
IApiRequest
=
{
ctlType
:
'none'
}):
Promise
<
IRequestSuccess
<
T
>>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
console
.
log
(
options
)
baseRequest
<
IRequestSuccess
<
T
>>
(
url
,
options
).
then
(
res
=>
{
// 登录验证
if
(
res
.
code
===
1101
)
{
...
...
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