Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
S
shop-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
王天霸
shop-new
Commits
ea05584a
提交
ea05584a
authored
8月 04, 2021
作者:
huaxinzhu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加商品bug修复;拦截器 统一message
上级
77569b97
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
26 行增加
和
20 行删除
+26
-20
request.js
src/utils/request.js
+1
-1
goodsinfomation.vue
src/views/system/goods/add/components/goodsinfomation.vue
+14
-19
goodsspecifications.vue
...views/system/goods/add/components/goodsspecifications.vue
+7
-0
index.vue
src/views/system/goods/add/index.vue
+4
-0
没有找到文件。
src/utils/request.js
浏览文件 @
ea05584a
...
...
@@ -58,7 +58,7 @@ service.interceptors.response.use(res => {
// 返回所有数据的统一处理
const
data
=
res
.
data
;
// 获取错误信息
const
message
=
errorCode
[
code
]
||
res
.
data
.
m
sg
||
errorCode
[
'default'
];
const
message
=
errorCode
[
code
]
||
res
.
data
.
m
essage
||
errorCode
[
'default'
];
// 200,1意味着成功返回数据
if
(
code
===
200
||
code
===
1
)
{
if
(
res
.
data
)
{
...
...
src/views/system/goods/add/components/goodsinfomation.vue
浏览文件 @
ea05584a
...
...
@@ -115,6 +115,7 @@
<
script
>
import
{
NewGetCategory
,
GetFreight
,
UploadImg
}
from
'@/api/module/goods'
import
{
getBrandsInf
}
from
'@/api/module/brand/brand'
import
{
getAreaList
}
from
'@/api/module/retreat/address'
export
default
{
name
:
'goods'
,
props
:
{
...
...
@@ -224,7 +225,7 @@
this
.
goodsInfoForm
.
categoryList
=
this
.
goodsinfodata
.
categoryList
;
}
// 获取 省
//
this.getArea();
this
.
getArea
();
// 获取 商品品牌
this
.
getBrands
();
},
...
...
@@ -235,24 +236,18 @@
this
.
goodsImgFileList
=
[];
},
// 获取 省
// getArea() {
// let limboNode = {
// pid: 0
// };
// NewGetCategory(limboNode).then( res=> {
// if(res.data && res.data.length > 0) {
// res.data.forEach( item => {
// let obj = { value: '', label: '' };
// obj.value = item.id;
// obj.label = item.label;
// this.areaOptions.push(obj);
// });
// //this.areaOptions = res.data;
// }else {
// this.areaOptions = [];
// }
// });
// },
getArea
()
{
let
limboNode
=
{
pid
:
0
};
getAreaList
(
limboNode
).
then
(
res
=>
{
if
(
res
.
data
&&
res
.
data
.
length
>
0
)
{
this
.
areaOptions
=
res
.
data
;
}
else
{
this
.
areaOptions
=
[];
}
});
},
// 获取 商品品牌
getBrands
()
{
getBrandsInf
().
then
(
res
=>
{
...
...
src/views/system/goods/add/components/goodsspecifications.vue
浏览文件 @
ea05584a
...
...
@@ -260,6 +260,13 @@ export default {
};
let
localArr
=
[];
let
localJSON
=
''
;
// 去 首尾空格
this
.
specName_sm
=
this
.
specName_sm
.
trim
();
if
(
!
this
.
specName_sm
)
{
this
.
$message
({
type
:
'error'
,
message
:
'规格名称不能为空'
});
return
}
if
(
this
.
speOptions
.
length
===
0
)
{
let
localObj
=
{
...
...
src/views/system/goods/add/index.vue
浏览文件 @
ea05584a
...
...
@@ -181,6 +181,9 @@
imgs
:
res
.
data
.
imgs
// 商品图片
}
this
.
goodsinfodata
.
categoryStr
=
res
.
data
.
category_first_name
+
'/'
+
res
.
data
.
category_first_name
+
'/'
+
res
.
data
.
category_three_name
;
// 产地 和 发货地 需要 处理
this
.
goodsinfodata
.
producing_area
=
this
.
goodsinfodata
.
producing_area
===
0
?
''
:
this
.
goodsinfodata
.
producing_area
;
this
.
goodsinfodata
.
deliver_area
=
this
.
goodsinfodata
.
deliver_area
===
0
?
''
:
this
.
goodsinfodata
.
deliver_area
;
let
arr
=
[];
arr
[
0
]
=
res
.
data
.
category_first_id
;
arr
[
0
]
=
res
.
data
.
category_second_id
;
...
...
@@ -376,6 +379,7 @@
// 保存/提交
save
()
{
//debugger
// 此处变量 有顺序 校验时,电梯至某处
// 商品信息 是否填写完整
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论