Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
S
shop-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
王天霸
shop-new
Commits
d82f7498
提交
d82f7498
authored
8月 02, 2021
作者:
huaxinzhu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
云仓入驻,上传图片,接口修改
上级
c3eae2ff
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
43 行增加
和
33 行删除
+43
-33
entry.js
src/api/module/entry.js
+10
-1
fillBrandInf.vue
src/views/entry/fillBrandInf.vue
+14
-14
fillMainInf.vue
src/views/entry/fillMainInf.vue
+10
-9
fillShopInf.vue
src/views/entry/fillShopInf.vue
+9
-9
没有找到文件。
src/api/module/entry.js
浏览文件 @
d82f7498
...
@@ -63,11 +63,20 @@ export function addShopInf(data) {
...
@@ -63,11 +63,20 @@ export function addShopInf(data) {
// 上传图片
// 上传图片
export
function
upLoadImg
(
data
)
{
export
function
upLoadImg
(
data
)
{
return
request
({
return
request
({
url
:
'/system/goods
/uploadImg
'
,
url
:
'/system/goods
New/uploadImage
'
,
method
:
'post'
,
method
:
'post'
,
data
:
data
data
:
data
});
});
}
}
// old
// export function upLoadImg (data) {
// return request({
// url: '/system/goods/uploadImg',
// method: 'post',
// data: data
// });
// }
// 获取商品类目
// 获取商品类目
export
function
getGoodsType
(
query
)
{
export
function
getGoodsType
(
query
)
{
return
request
({
return
request
({
...
...
src/views/entry/fillBrandInf.vue
浏览文件 @
d82f7498
...
@@ -338,11 +338,11 @@
...
@@ -338,11 +338,11 @@
this
.
getBase64
(
param
.
file
).
then
((
res
)
=>
{
this
.
getBase64
(
param
.
file
).
then
((
res
)
=>
{
let
result
=
res
.
split
(
","
);
let
result
=
res
.
split
(
","
);
this
.
Base64img
=
result
[
1
];
this
.
Base64img
=
result
[
1
];
let
data
=
{
"im
age
"
:
this
.
Base64img
};
let
data
=
{
"im
g_data
"
:
this
.
Base64img
};
upLoadImg
(
data
).
then
((
res
)
=>
{
upLoadImg
(
data
).
then
((
res
)
=>
{
if
(
res
&&
res
.
data
.
code
==
1
)
{
if
(
res
&&
res
.
code
=
==
1
)
{
this
.
brandImgFileList
.
push
({
'url'
:
res
.
data
.
data
.
imageU
rl
});
this
.
brandImgFileList
.
push
({
'url'
:
res
.
data
.
image_u
rl
});
this
.
$message
(
'上传成功'
);
this
.
$message
(
{
type
:
'success'
,
message
:
'上传成功'
}
);
this
.
$refs
.
brandForm
.
clearValidate
(
'brand_logo'
);
this
.
$refs
.
brandForm
.
clearValidate
(
'brand_logo'
);
//this.$refs.logoImg.clearValidate();
//this.$refs.logoImg.clearValidate();
}
}
...
@@ -354,11 +354,11 @@
...
@@ -354,11 +354,11 @@
this
.
getBase64
(
param
.
file
).
then
((
res
)
=>
{
this
.
getBase64
(
param
.
file
).
then
((
res
)
=>
{
let
result
=
res
.
split
(
","
);
let
result
=
res
.
split
(
","
);
this
.
Base64img
=
result
[
1
];
this
.
Base64img
=
result
[
1
];
let
data
=
{
"im
age
"
:
this
.
Base64img
};
let
data
=
{
"im
g_data
"
:
this
.
Base64img
};
upLoadImg
(
data
).
then
((
res
)
=>
{
upLoadImg
(
data
).
then
((
res
)
=>
{
if
(
res
&&
res
.
data
.
code
==
1
){
if
(
res
&&
res
.
code
=
==
1
){
this
.
shopImgFileList
.
push
({
'url'
:
res
.
data
.
data
.
imageU
rl
});
this
.
shopImgFileList
.
push
({
'url'
:
res
.
data
.
image_u
rl
});
this
.
$message
(
'上传成功'
);
this
.
$message
(
{
type
:
'success'
,
message
:
'上传成功'
}
);
this
.
$refs
.
brandForm
.
clearValidate
(
'brand_business_auth'
);
this
.
$refs
.
brandForm
.
clearValidate
(
'brand_business_auth'
);
}
}
});
});
...
@@ -369,11 +369,11 @@
...
@@ -369,11 +369,11 @@
this
.
getBase64
(
param
.
file
).
then
((
res
)
=>
{
this
.
getBase64
(
param
.
file
).
then
((
res
)
=>
{
let
result
=
res
.
split
(
","
);
let
result
=
res
.
split
(
","
);
this
.
Base64img
=
result
[
1
];
this
.
Base64img
=
result
[
1
];
let
data
=
{
"im
age
"
:
this
.
Base64img
};
let
data
=
{
"im
g_data
"
:
this
.
Base64img
};
upLoadImg
(
data
).
then
((
res
)
=>
{
upLoadImg
(
data
).
then
((
res
)
=>
{
if
(
res
&&
res
.
data
.
code
==
1
){
if
(
res
&&
res
.
code
=
==
1
){
this
.
factoryImgFileList
.
push
({
'url'
:
res
.
data
.
data
.
imageU
rl
});
this
.
factoryImgFileList
.
push
({
'url'
:
res
.
data
.
image_u
rl
});
this
.
$message
(
'上传成功'
);
this
.
$message
(
{
type
:
'success'
,
message
:
'上传成功'
}
);
}
}
});
});
});
});
...
@@ -486,7 +486,7 @@
...
@@ -486,7 +486,7 @@
// 初始化
// 初始化
//this.resetForm();
//this.resetForm();
getBrandsInf
().
then
(
res
=>
{
getBrandsInf
().
then
(
res
=>
{
console
.
log
(
"获取品牌:"
,
res
.
data
);
//
console.log("获取品牌:",res.data);
if
(
res
.
code
===
1
&&
res
.
data
)
{
if
(
res
.
code
===
1
&&
res
.
data
)
{
this
.
brandForm
=
res
.
data
[
0
];
this
.
brandForm
=
res
.
data
[
0
];
// 商标logo图片处理
// 商标logo图片处理
...
@@ -625,7 +625,7 @@
...
@@ -625,7 +625,7 @@
if
(
this
.
brandForm
.
id
===
0
)
{
if
(
this
.
brandForm
.
id
===
0
)
{
addBrandForm
.
brands
=
toArrBrandForm
;
addBrandForm
.
brands
=
toArrBrandForm
;
addBrands
(
addBrandForm
).
then
(
res
=>
{
addBrands
(
addBrandForm
).
then
(
res
=>
{
console
.
log
(
"新增返回信息"
,
res
);
//
console.log("新增返回信息",res);
this
.
$router
.
push
(
"/fillShopInf"
);
this
.
$router
.
push
(
"/fillShopInf"
);
});
});
}
else
{
}
else
{
...
...
src/views/entry/fillMainInf.vue
浏览文件 @
d82f7498
...
@@ -322,10 +322,11 @@
...
@@ -322,10 +322,11 @@
this
.
getBase64
(
param
.
file
).
then
((
res
)
=>
{
this
.
getBase64
(
param
.
file
).
then
((
res
)
=>
{
let
result
=
res
.
split
(
","
);
let
result
=
res
.
split
(
","
);
this
.
Base64img
=
result
[
1
];
this
.
Base64img
=
result
[
1
];
let
data
=
{
"im
age
"
:
this
.
Base64img
};
let
data
=
{
"im
g_data
"
:
this
.
Base64img
};
upLoadImg
(
data
).
then
((
res
)
=>
{
upLoadImg
(
data
).
then
((
res
)
=>
{
if
(
res
&&
res
.
data
.
code
==
1
){
//console.log('上传图片新接口返回:', res);
this
.
licenseImgFileList
.
push
({
'url'
:
res
.
data
.
data
.
imageUrl
});
if
(
res
&&
res
.
code
===
1
){
this
.
licenseImgFileList
.
push
({
'url'
:
res
.
data
.
image_url
});
this
.
$message
({
type
:
'success'
,
message
:
'上传成功'
});
this
.
$message
({
type
:
'success'
,
message
:
'上传成功'
});
this
.
$refs
.
mainForm
.
clearValidate
(
'license'
);
this
.
$refs
.
mainForm
.
clearValidate
(
'license'
);
}
}
...
@@ -348,11 +349,11 @@
...
@@ -348,11 +349,11 @@
this
.
getBase64
(
param
.
file
).
then
((
res
)
=>
{
this
.
getBase64
(
param
.
file
).
then
((
res
)
=>
{
let
result
=
res
.
split
(
","
);
let
result
=
res
.
split
(
","
);
this
.
Base64img
=
result
[
1
];
this
.
Base64img
=
result
[
1
];
let
data
=
{
"im
age
"
:
this
.
Base64img
};
let
data
=
{
"im
g_data
"
:
this
.
Base64img
};
upLoadImg
(
data
).
then
((
res
)
=>
{
upLoadImg
(
data
).
then
((
res
)
=>
{
if
(
res
&&
res
.
data
.
code
==
1
){
if
(
res
&&
res
.
code
=
==
1
){
this
.
idcardImgFileList
.
push
({
'url'
:
res
.
data
.
data
.
imageU
rl
});
this
.
idcardImgFileList
.
push
({
'url'
:
res
.
data
.
image_u
rl
});
this
.
$message
(
'上传成功'
);
this
.
$message
(
{
type
:
'success'
,
message
:
'上传成功'
}
);
this
.
$refs
.
mainForm
.
clearValidate
(
'idcard_front'
);
this
.
$refs
.
mainForm
.
clearValidate
(
'idcard_front'
);
}
}
});
});
...
@@ -372,7 +373,7 @@
...
@@ -372,7 +373,7 @@
// 获取主体信息接口
// 获取主体信息接口
getMain
()
{
getMain
()
{
getMainInf
().
then
(
res
=>
{
getMainInf
().
then
(
res
=>
{
console
.
log
(
"获取主体数据:"
,
res
);
//
console.log("获取主体数据:",res);
if
(
res
.
code
===
1
)
{
if
(
res
.
code
===
1
)
{
this
.
resetForm
(
'mainForm'
);
this
.
resetForm
(
'mainForm'
);
this
.
mainForm
=
res
.
data
;
this
.
mainForm
=
res
.
data
;
...
@@ -488,7 +489,7 @@
...
@@ -488,7 +489,7 @@
// 处理营业执照
// 处理营业执照
if
(
this
.
licenseImgFileList
.
length
>
0
)
{
if
(
this
.
licenseImgFileList
.
length
>
0
)
{
console
.
log
(
445
,
this
.
licenseImgFileList
)
//
console.log(445,this.licenseImgFileList)
for
(
let
i
=
0
;
i
<
this
.
licenseImgFileList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
licenseImgFileList
.
length
;
i
++
)
{
if
(
i
===
0
)
{
if
(
i
===
0
)
{
this
.
mainForm
.
license
=
this
.
licenseImgFileList
[
i
].
url
;
this
.
mainForm
.
license
=
this
.
licenseImgFileList
[
i
].
url
;
...
...
src/views/entry/fillShopInf.vue
浏览文件 @
d82f7498
...
@@ -259,7 +259,7 @@
...
@@ -259,7 +259,7 @@
this
.
storeForm
=
res
.
data
;
this
.
storeForm
=
res
.
data
;
this
.
storeForm
.
scope
=
scopeList
;
this
.
storeForm
.
scope
=
scopeList
;
}
}
console
.
log
(
"处理后的格式:"
,
this
.
storeForm
.
scope
);
//
console.log("处理后的格式:",this.storeForm.scope);
// 店铺logo回显处理
// 店铺logo回显处理
let
logoList
=
{};
let
logoList
=
{};
let
logoArr
=
[];
let
logoArr
=
[];
...
@@ -314,9 +314,9 @@
...
@@ -314,9 +314,9 @@
this
.
Base64img
=
result
[
1
];
this
.
Base64img
=
result
[
1
];
let
data
=
{
"image"
:
this
.
Base64img
};
let
data
=
{
"image"
:
this
.
Base64img
};
upLoadImg
(
data
).
then
((
res
)
=>
{
upLoadImg
(
data
).
then
((
res
)
=>
{
if
(
res
&&
res
.
data
.
code
==
1
){
if
(
res
&&
res
.
code
=
==
1
){
this
.
logoImgFileList
.
push
({
'url'
:
res
.
data
.
data
.
imageU
rl
});
this
.
logoImgFileList
.
push
({
'url'
:
res
.
data
.
image_u
rl
});
this
.
$message
(
'上传成功'
);
this
.
$message
(
{
type
:
'success'
,
message
:
'上传成功'
}
);
this
.
$refs
.
storeForm
.
clearValidate
(
'shop_logo'
);
this
.
$refs
.
storeForm
.
clearValidate
(
'shop_logo'
);
}
}
});
});
...
@@ -330,9 +330,9 @@
...
@@ -330,9 +330,9 @@
this
.
Base64img
=
result
[
1
];
this
.
Base64img
=
result
[
1
];
let
data
=
{
"image"
:
this
.
Base64img
};
let
data
=
{
"image"
:
this
.
Base64img
};
upLoadImg
(
data
).
then
((
res
)
=>
{
upLoadImg
(
data
).
then
((
res
)
=>
{
if
(
res
&&
res
.
data
.
code
==
1
){
if
(
res
&&
res
.
code
=
==
1
){
this
.
businessImgFileList
.
push
({
'url'
:
res
.
data
.
data
.
imageU
rl
});
this
.
businessImgFileList
.
push
({
'url'
:
res
.
data
.
image_u
rl
});
this
.
$message
(
'上传成功'
);
this
.
$message
(
{
type
:
'success'
,
message
:
'上传成功'
}
);
this
.
$refs
.
storeForm
.
clearValidate
(
'business_auth'
);
this
.
$refs
.
storeForm
.
clearValidate
(
'business_auth'
);
}
}
});
});
...
@@ -388,7 +388,7 @@
...
@@ -388,7 +388,7 @@
scoprStr
+=
this
.
storeForm
.
scope
[
i
]
+
','
;
scoprStr
+=
this
.
storeForm
.
scope
[
i
]
+
','
;
}
}
this
.
storeForm
.
scope
=
scoprStr
.
substring
(
0
,
scoprStr
.
length
-
1
);
this
.
storeForm
.
scope
=
scoprStr
.
substring
(
0
,
scoprStr
.
length
-
1
);
console
.
log
(
"提交前的scope"
,
this
.
storeForm
.
scope
);
//
console.log("提交前的scope",this.storeForm.scope);
// shop_logo图片地址字段
// shop_logo图片地址字段
if
(
this
.
logoImgFileList
.
length
>
0
)
{
if
(
this
.
logoImgFileList
.
length
>
0
)
{
...
@@ -412,7 +412,7 @@
...
@@ -412,7 +412,7 @@
}
}
}
}
console
.
log
(
"新增/修改的店铺信息:"
,
this
.
storeForm
);
//
console.log("新增/修改的店铺信息:",this.storeForm);
//formName
//formName
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论