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
f0962dda
Commit
f0962dda
authored
Jul 29, 2021
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复类型警告
parent
16c3d1d7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
88 additions
and
67 deletions
+88
-67
index.ts
src/module/channelProductModule/index.ts
+2
-3
index.ts
src/store/channelProduct/index.ts
+73
-63
index.ts
src/store/product/index.ts
+13
-1
No files found.
src/module/channelProductModule/index.ts
View file @
f0962dda
import
{
GetProductChannelCommodityGetCommodityUnitPriceResponse
}
from
'@/services'
;
import
{
GetProductChannelCommodityGetCommodityUnitPriceResponse
}
from
'@/services
/ProductV2Api
'
;
export
interface
IRole
{
key
:
string
;
...
...
@@ -29,4 +29,4 @@ export interface IChannelProductModule {
setTableDataInSetPrice
(
data
:
GetProductChannelCommodityGetCommodityUnitPriceResponse
[]):
void
;
setSelectChannel
(
data
:
any
):
void
;
setSelectSource
(
data
:
number
):
void
;
}
\ No newline at end of file
}
src/store/channelProduct/index.ts
View file @
f0962dda
import
{
action
,
computed
,
observable
,
runInAction
}
from
'mobx'
import
{
IChannelProductModule
,
IRole
,
IChannel
}
from
'@/module/channelProductModule'
;
/**
* 渠道直采商品
*/
class
ChannelProductStore
implements
IChannelProductModule
{
// 选择商品区块
@
observable
public
productSourceInStore
:
number
=
1
;
@
observable
public
productSelectRowInStore
:
any
=
null
;
@
observable
public
priceType
:
number
=
null
;
@
observable
public
productName
:
string
=
null
;
@
observable
public
tableDataInSetPrice
:
any
[]
=
null
;
@
observable
public
selectedRole
:
IRole
=
null
;
@
observable
public
selectChannel
:
any
=
null
;
@
observable
public
selectedSource
:
number
=
1
;
@
action
.
bound
public
setProductSourceInStore
(
data
:
number
)
{
this
.
productSourceInStore
=
data
;
}
@
action
.
bound
public
setProductSelectRowInStore
(
data
:
any
)
{
this
.
productSelectRowInStore
=
data
;
}
@
action
.
bound
public
setPriceType
(
data
:
number
){
this
.
priceType
=
data
;
}
@
action
.
bound
public
setProductName
(
data
:
string
){
this
.
productName
=
data
;
}
@
action
.
bound
public
setTableDataInSetPrice
(
data
:
any
[]){
this
.
tableDataInSetPrice
=
data
;
}
@
action
.
bound
public
setSelectedRole
(
data
:
IRole
){
this
.
selectedRole
=
data
;
}
@
action
.
bound
public
setSelectChannel
(
data
:
any
[]){
this
.
selectChannel
=
data
}
@
action
.
bound
public
setSelectSource
(
data
:
number
){
this
.
selectedSource
=
data
}
}
export
default
ChannelProductStore
import
{
action
,
computed
,
observable
,
runInAction
}
from
'mobx'
import
{
IChannelProductModule
}
from
'@/module/channelProductModule'
;
export
interface
IRole
{
key
:
string
;
value
:
number
;
children
:
string
;
}
export
interface
IChannel
{
name
:
string
;
memberId
?:
number
;
}
/**
* 渠道直采商品
*/
class
ChannelProductStore
implements
IChannelProductModule
{
// 选择商品区块
@
observable
public
productSourceInStore
:
number
=
1
;
@
observable
public
productSelectRowInStore
:
any
=
null
;
@
observable
public
priceType
:
number
=
null
;
@
observable
public
productName
:
string
=
null
;
@
observable
public
tableDataInSetPrice
:
any
[]
=
null
;
@
observable
public
selectedRole
:
IRole
=
null
;
@
observable
public
selectChannel
:
any
=
null
;
@
observable
public
selectedSource
:
number
=
1
;
@
action
.
bound
public
setProductSourceInStore
(
data
:
number
)
{
this
.
productSourceInStore
=
data
;
}
@
action
.
bound
public
setProductSelectRowInStore
(
data
:
any
)
{
this
.
productSelectRowInStore
=
data
;
}
@
action
.
bound
public
setPriceType
(
data
:
number
){
this
.
priceType
=
data
;
}
@
action
.
bound
public
setProductName
(
data
:
string
){
this
.
productName
=
data
;
}
@
action
.
bound
public
setTableDataInSetPrice
(
data
:
any
[]){
this
.
tableDataInSetPrice
=
data
;
}
@
action
.
bound
public
setSelectedRole
(
data
:
IRole
){
this
.
selectedRole
=
data
;
}
@
action
.
bound
public
setSelectChannel
(
data
:
any
[]){
this
.
selectChannel
=
data
}
@
action
.
bound
public
setSelectSource
(
data
:
number
){
this
.
selectedSource
=
data
}
}
export
default
ChannelProductStore
src/store/product/index.ts
View file @
f0962dda
import
{
action
,
computed
,
observable
,
runInAction
}
from
'mobx'
import
{
IProductModule
,
IProductSelectAttribute
,
IBasicFormParam
,
IPriceAttributeParam
,
IOtherParam
,
IDecsParams
,
IPage
}
from
'@/module/productModule'
;
// mobx要用到的数据类型
import
{
IProductModule
,
IProductSelectAttribute
,
IBasicFormParam
,
IPriceAttributeParam
,
IOtherParam
}
from
'@/module/productModule'
;
// mobx要用到的数据类型
export
interface
IPage
{
current
:
number
;
pageSize
:
number
;
}
export
interface
IDecsParams
{
id
?:
number
;
video
:
string
[];
image
:
string
[]
;
word
:
string
[];
}
class
ProductStore
implements
IProductModule
{
@
observable
public
attributeLists
:
any
[]
=
[];
...
...
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