Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
2eb5d32c
提交
2eb5d32c
authored
4月 16, 2019
作者:
YunaiV
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
管理后台:商品列表报错的问题,解决商品报价 * 100
上级
371eba55
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
10 行增加
和
61 行删除
+10
-61
proxy.dev.js
admin-web/config/proxy/proxy.dev.js
+2
-2
productSpuList.js
admin-web/src/models/product/productSpuList.js
+2
-2
ProductSpuAddOrUpdate.js
admin-web/src/pages/Product/ProductSpuAddOrUpdate.js
+1
-14
ProductSpuList.js
admin-web/src/pages/Product/ProductSpuList.js
+3
-41
product.js
admin-web/src/services/product.js
+2
-2
没有找到文件。
admin-web/config/proxy/proxy.dev.js
浏览文件 @
2eb5d32c
...
...
@@ -8,8 +8,8 @@ export default {
pathRewrite
:
{},
},
'/product-api/'
:
{
target
:
'http://180.167.213.26:18083/'
,
//
target: 'http://127.0.0.1:18081/',
//
target: 'http://180.167.213.26:18083/',
target
:
'http://127.0.0.1:18081/'
,
changeOrigin
:
true
,
pathRewrite
:
{},
},
...
...
admin-web/src/models/product/productSpuList.js
浏览文件 @
2eb5d32c
...
...
@@ -56,8 +56,8 @@ export default {
yield
put
(
routerRedux
.
replace
(
'/product/product-spu-add'
));
},
*
page
({
payload
},
{
call
,
put
})
{
const
{
queryParams
}
=
payload
;
const
response
=
yield
call
(
productSpuPage
,
queryParams
);
//
const { queryParams } = payload;
const
response
=
yield
call
(
productSpuPage
,
payload
);
message
.
info
(
'查询成功!'
);
yield
put
({
type
:
'treeSuccess'
,
...
...
admin-web/src/pages/Product/ProductSpuAddOrUpdate.js
浏览文件 @
2eb5d32c
...
...
@@ -47,19 +47,6 @@ class ProductSpuAddOrUpdate extends Component {
});
}
// handleSubmit = e => {
// const { dispatch, form } = this.props;
// e.preventDefault();
// form.validateFieldsAndScroll((err, values) => {
// if (!err) {
// dispatch({
// type: 'form/submitRegularForm',
// payload: values,
// });
// }
// });
// }
handleAddAttr
=
e
=>
{
// alert('你猜');
const
{
dispatch
}
=
this
.
props
;
...
...
@@ -83,7 +70,7 @@ class ProductSpuAddOrUpdate extends Component {
}
let
newAttr
=
{
attrs
:
[],
price
:
sku
.
price
,
price
:
sku
.
price
*
100
,
quantity
:
sku
.
quantity
,
}
for
(
let
j
in
sku
.
attrs
)
{
...
...
admin-web/src/pages/Product/ProductSpuList.js
浏览文件 @
2eb5d32c
...
...
@@ -11,44 +11,7 @@ import styles from './ProductSpuList.less';
const
FormItem
=
Form
.
Item
;
const
{
TreeNode
}
=
Tree
;
// 添加 form 表单
const
CreateForm
=
Form
.
create
()(
props
=>
{
const
{
modalVisible
,
form
,
handleAdd
,
handleModalVisible
,
modalType
,
initValues
}
=
props
;
const
okHandle
=
()
=>
{
form
.
validateFields
((
err
,
fieldsValue
)
=>
{
if
(
err
)
return
;
form
.
resetFields
();
handleAdd
({
fields
:
fieldsValue
,
modalType
,
initValues
,
});
});
};
const
title
=
modalType
===
'add'
?
'添加一个 Role'
:
'更新一个 Role'
;
const
okText
=
modalType
===
'add'
?
'添加'
:
'更新'
;
return
(
<
Modal
destroyOnClose
title
=
{
title
}
visible
=
{
modalVisible
}
onOk
=
{
okHandle
}
okText
=
{
okText
}
onCancel
=
{()
=>
handleModalVisible
()}
>
<
FormItem
labelCol
=
{{
span
:
5
}}
wrapperCol
=
{{
span
:
15
}}
label
=
"角色名"
>
{
form
.
getFieldDecorator
(
'name'
,
{
rules
:
[{
required
:
true
,
message
:
'请输入角色名!'
,
min
:
2
}],
initialValue
:
initValues
.
name
,
})(
<
Input
placeholder
=
"请输入"
/>
)}
<
/FormItem
>
<
/Modal
>
);
});
// roleList
// productSpuList
@
connect
(({
productSpuList
,
loading
})
=>
({
productSpuList
,
list
:
productSpuList
.
list
.
spus
,
...
...
@@ -71,8 +34,8 @@ class ProductSpuList extends PureComponent {
type
:
'productSpuList/page'
,
payload
:
{
name
:
''
,
pageNo
:
0
,
pageSize
:
1
0
,
pageNo
:
1
,
pageSize
:
2
0
,
},
});
}
...
...
@@ -168,7 +131,6 @@ class ProductSpuList extends PureComponent {
<
/div
>
<
Table
columns
=
{
columns
}
dataSource
=
{
list
}
rowKey
=
"id"
/>
<
/Card
>
<
CreateForm
{...
parentMethods
}
modalVisible
=
{
modalVisible
}
/
>
<
/PageHeaderWrapper
>
);
}
...
...
admin-web/src/services/product.js
浏览文件 @
2eb5d32c
...
...
@@ -39,6 +39,7 @@ export async function productCategoryDelete(params) {
// product spu + sku
export
async
function
productSpuPage
(
params
)
{
debugger
;
return
request
(
`/product-api/admins/spu/page?
${
stringify
(
params
)}
`
,
{
method
:
'GET'
,
});
...
...
@@ -57,4 +58,4 @@ export async function productAttrTree(params) {
return
request
(
`/product-api/admins/attr/tree?
${
stringify
(
params
)}
`
,
{
method
:
'GET'
,
});
}
\ No newline at end of file
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论