Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
S
shop-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
王天霸
shop-new
Commits
b67e9990
提交
b67e9990
authored
8月 04, 2021
作者:
huaxinzhu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
店铺 上传图片接口修改
上级
ea05584a
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
23 行增加
和
22 行删除
+23
-22
goodsimg.vue
src/views/system/goods/add/components/goodsimg.vue
+4
-3
index.vue
src/views/system/goods/add/index.vue
+1
-1
brand.vue
src/views/system/shop/brand.vue
+12
-12
index.vue
src/views/system/shop/index.vue
+6
-6
没有找到文件。
src/views/system/goods/add/components/goodsimg.vue
浏览文件 @
b67e9990
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
},
},
// 禁止粘贴图片
// 禁止粘贴图片
clipboard
:
{
clipboard
:
{
matchers
:
[[
Node
.
ELEMENT_NODE
,
this
.
handleCustomMatcher
]]
//
matchers: [[Node.ELEMENT_NODE, this.handleCustomMatcher]]
}
}
}
}
},
},
...
@@ -87,8 +87,8 @@
...
@@ -87,8 +87,8 @@
methods
:
{
methods
:
{
handleCustomMatcher
(
node
,
Delta
)
{
handleCustomMatcher
(
node
,
Delta
)
{
let
ops
=
[]
let
ops
=
[]
//debugger
console
.
log
(
123
);
console
.
log
(
123
);
debugger
Delta
.
ops
.
forEach
(
op
=>
{
Delta
.
ops
.
forEach
(
op
=>
{
if
(
op
.
insert
&&
typeof
op
.
insert
===
'string'
)
{
// 如果粘贴了图片,这里会是一个对象,所以可以这样处理
if
(
op
.
insert
&&
typeof
op
.
insert
===
'string'
)
{
// 如果粘贴了图片,这里会是一个对象,所以可以这样处理
ops
.
push
({
ops
.
push
({
...
@@ -110,6 +110,7 @@
...
@@ -110,6 +110,7 @@
const
list
=
this
.
$refs
.
file
.
files
;
const
list
=
this
.
$refs
.
file
.
files
;
this
.
indexall
=
list
.
length
this
.
indexall
=
list
.
length
this
.
uploadImgs
()
this
.
uploadImgs
()
//debugger
},
},
// 向后台 传输 base64的图片数据
// 向后台 传输 base64的图片数据
uploadImgs
()
{
uploadImgs
()
{
...
@@ -129,7 +130,7 @@
...
@@ -129,7 +130,7 @@
let
quill
=
this
.
$refs
.
myTextEditor
.
quill
;
let
quill
=
this
.
$refs
.
myTextEditor
.
quill
;
let
length
=
quill
.
getSelection
().
index
;
let
length
=
quill
.
getSelection
().
index
;
// 插入图片 res.data.url为服务器返回的图片地址
// 插入图片 res.data.url为服务器返回的图片地址
quill
.
insertEmbed
(
length
,
'image'
,
res
.
data
.
image_url
)
quill
.
insertEmbed
(
length
,
'image
)
'
,
res
.
data
.
image_url
)
// 调整光标到最后
// 调整光标到最后
quill
.
setSelection
(
length
+
1
)
quill
.
setSelection
(
length
+
1
)
if
(
this
.
index
<
this
.
indexall
){
if
(
this
.
index
<
this
.
indexall
){
...
...
src/views/system/goods/add/index.vue
浏览文件 @
b67e9990
...
@@ -399,7 +399,7 @@
...
@@ -399,7 +399,7 @@
for
(
let
itemKey
in
itemObj
)
{
for
(
let
itemKey
in
itemObj
)
{
//----------------
//----------------
// 有多余字段,可能为空,需要对有效字段单独判断
// 有多余字段,可能为空,需要对有效字段单独判断
if
(
!
itemObj
[
'js_price'
]
||
!
itemObj
[
'sl_price'
]
||
!
itemObj
[
'price'
]
||
!
itemObj
[
'sc_price'
]
||
!
itemObj
[
'stock'
]
||
!
itemObj
[
'weight'
]
)
{
if
(
(
itemObj
[
'js_price'
]
===
''
)
||
(
itemObj
[
'sl_price'
]
===
''
)
||
(
itemObj
[
'price'
]
===
''
)
||
(
itemObj
[
'sc_price'
]
===
''
)
||
(
itemObj
[
'stock'
]
===
''
)
||
(
itemObj
[
'weight'
]
===
''
)
)
{
isGoodsPrice
=
false
;
isGoodsPrice
=
false
;
break
break
}
else
{
}
else
{
...
...
src/views/system/shop/brand.vue
浏览文件 @
b67e9990
...
@@ -492,10 +492,10 @@
...
@@ -492,10 +492,10 @@
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
(
'上传成功'
);
this
.
$refs
.
brandForm
.
clearValidate
(
'brand_logo'
);
this
.
$refs
.
brandForm
.
clearValidate
(
'brand_logo'
);
//this.$refs.logoImg.clearValidate();
//this.$refs.logoImg.clearValidate();
...
@@ -539,10 +539,10 @@
...
@@ -539,10 +539,10 @@
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
.
certImgFileList
.
push
({
'url'
:
res
.
data
.
data
.
imageU
rl
});
this
.
certImgFileList
.
push
({
'url'
:
res
.
data
.
image_u
rl
});
this
.
$message
(
'上传成功'
);
this
.
$message
(
'上传成功'
);
this
.
$refs
.
brandForm
.
clearValidate
(
'brand_register_cert'
);
this
.
$refs
.
brandForm
.
clearValidate
(
'brand_register_cert'
);
//this.$refs.logoImg.clearValidate();
//this.$refs.logoImg.clearValidate();
...
@@ -570,10 +570,10 @@
...
@@ -570,10 +570,10 @@
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
.
$refs
.
brandForm
.
clearValidate
(
'brand_auth'
);
this
.
$refs
.
brandForm
.
clearValidate
(
'brand_auth'
);
this
.
$message
(
'上传成功'
);
this
.
$message
(
'上传成功'
);
}
}
...
@@ -616,10 +616,10 @@
...
@@ -616,10 +616,10 @@
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
(
'上传成功'
);
this
.
$refs
.
brandForm
.
clearValidate
(
'brand_business_auth'
);
this
.
$refs
.
brandForm
.
clearValidate
(
'brand_business_auth'
);
}
}
...
...
src/views/system/shop/index.vue
浏览文件 @
b67e9990
...
@@ -743,10 +743,10 @@
...
@@ -743,10 +743,10 @@
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
.
logoImgFileList
.
push
({
'url'
:
res
.
data
.
data
.
imageU
rl
});
this
.
logoImgFileList
.
push
({
'url'
:
res
.
data
.
image_u
rl
});
this
.
$message
(
'上传成功'
);
this
.
$message
(
'上传成功'
);
this
.
$refs
.
storeForm
.
clearValidate
(
'shop_logo'
);
this
.
$refs
.
storeForm
.
clearValidate
(
'shop_logo'
);
}
}
...
@@ -758,10 +758,10 @@
...
@@ -758,10 +758,10 @@
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
.
businessImgFileList
.
push
({
'url'
:
res
.
data
.
data
.
imageU
rl
});
this
.
businessImgFileList
.
push
({
'url'
:
res
.
data
.
image_u
rl
});
this
.
$message
(
'上传成功'
);
this
.
$message
(
'上传成功'
);
this
.
$refs
.
storeForm
.
clearValidate
(
'business_auth'
);
this
.
$refs
.
storeForm
.
clearValidate
(
'business_auth'
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论