Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
h5-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
yimu
h5-admin
Commits
dfedd56d
Commit
dfedd56d
authored
Jun 08, 2022
by
verestrasz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片展示压缩
parent
c0a81907
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
68 additions
and
115 deletions
+68
-115
index.vue
src/components/file-upload/index.vue
+1
-1
main.js
src/main.js
+4
-3
global.js
src/mixins/global.js
+15
-0
base-info.vue
src/view/good-mgr/add-commodity/base-info.vue
+6
-6
decpit-info.vue
src/view/good-mgr/add-commodity/decpit-info.vue
+2
-0
decpit-info.vue
src/view/good-mgr/add-good/decpit-info.vue
+2
-0
sale-info.vue
src/view/good-mgr/add-good/sale-info.vue
+2
-69
good-commodity.vue
src/view/good-mgr/good-commodity.vue
+1
-1
integral-list.vue
src/view/good-mgr/integral-list.vue
+1
-1
product-list.vue
src/view/good-mgr/product-list.vue
+34
-34
No files found.
src/components/file-upload/index.vue
View file @
dfedd56d
...
...
@@ -231,7 +231,7 @@ export default {
methods
:
{
getImgUrl
(
item
)
{
if
(
this
.
type
===
'image'
)
{
return
item
.
url
return
this
.
imgCompression
(
item
.
url
,
150
)
}
else
if
(
this
.
type
===
'video'
)
{
return
getPosterFromVideoUrl
(
item
.
url
)
}
else
if
(
this
.
type
===
'apk'
)
{
...
...
src/main.js
View file @
dfedd56d
...
...
@@ -30,7 +30,7 @@ import BaiduMap from 'vue-baidu-map'
import
ElementUI
from
'element-ui'
import
'element-ui/lib/theme-chalk/index.css'
import
vueTencentCaptcha
from
'@carpenter/vue-tencent-captcha'
import
"@/mixins/global.js"
// Vue.use(iView, {
// i18n: (key, value) => i18n.t(key, value)
// })
...
...
@@ -76,6 +76,7 @@ class VideoBlot extends BlockEmbed {
node
.
setAttribute
(
'webkit-playsinline'
,
true
)
node
.
setAttribute
(
'playsinline'
,
true
)
node
.
setAttribute
(
'x5-playsinline'
,
true
)
node
.
setAttribute
(
'style'
,
`margin-left:
${
value
.
marginLeft
}
;transform:
${
value
.
transform
}
`
)
return
node
}
static
value
(
node
)
{
...
...
@@ -84,7 +85,7 @@ class VideoBlot extends BlockEmbed {
controls
:
node
.
getAttribute
(
'controls'
),
width
:
node
.
getAttribute
(
'width'
),
height
:
node
.
getAttribute
(
'height'
),
poster
:
node
.
getAttribute
(
'poster'
)
poster
:
node
.
getAttribute
(
'poster'
)
,
}
}
}
...
...
@@ -98,7 +99,7 @@ class ImgBlot extends BlockEmbed {
node
.
setAttribute
(
'src'
,
value
.
url
)
node
.
setAttribute
(
'height'
,
value
.
height
)
node
.
setAttribute
(
'width'
,
value
.
width
)
node
.
setAttribute
(
'style'
,
'object-fit: contain'
)
node
.
setAttribute
(
'style'
,
`object-fit: contain;margin-left:
${
value
.
marginLeft
}
;transform:
${
value
.
transform
}
`
)
return
node
}
static
value
(
node
)
{
...
...
src/mixins/global.js
0 → 100644
View file @
dfedd56d
import
Vue
from
'vue'
Vue
.
mixin
({
methods
:
{
imgCompression
(
src
,
width
)
{
if
(
/
\?
x-oss-process=video/
.
test
(
src
))
{
return
src
}
if
(
src
)
{
return
`
${
src
}
?x-oss-process=image/resize,w_
${
width
}
,limit_0,m_mfit`
}
return
src
}
},
})
\ No newline at end of file
src/view/good-mgr/add-commodity/base-info.vue
View file @
dfedd56d
...
...
@@ -3,8 +3,8 @@
<div
class=
"item"
>
<label
class=
"label"
>
商品通证:
</label>
<!--
<RadioGroup
v-model=
"data.useNft"
>
<Radio
label=
"0"
:disabled=
"isDetail || isEdit || is
Draft|| is
Again"
class=
"ivu-radio"
>
否
</Radio>
<Radio
label=
"1"
:disabled=
"isDetail || isEdit || is
Draft|| is
Again"
class=
"ivu-radio"
>
是
</Radio>
<Radio
label=
"0"
:disabled=
"isDetail || isEdit || isAgain"
class=
"ivu-radio"
>
否
</Radio>
<Radio
label=
"1"
:disabled=
"isDetail || isEdit || isAgain"
class=
"ivu-radio"
>
是
</Radio>
</RadioGroup>
-->
<span>
{{
data
.
coinName
}}
</span>
</div>
...
...
@@ -99,15 +99,15 @@
<!--
<div
class=
"item"
>
<label
class=
"label"
>
应用NFT:
</label>
<RadioGroup
v-model=
"data.useNft"
>
<Radio
label=
"0"
:disabled=
"isDetail || isEdit || is
Draft|| is
Again"
class=
"ivu-radio"
>
否
</Radio>
<Radio
label=
"1"
:disabled=
"isDetail || isEdit || is
Draft|| is
Again"
class=
"ivu-radio"
>
是
</Radio>
<Radio
label=
"0"
:disabled=
"isDetail || isEdit || isAgain"
class=
"ivu-radio"
>
否
</Radio>
<Radio
label=
"1"
:disabled=
"isDetail || isEdit || isAgain"
class=
"ivu-radio"
>
是
</Radio>
</RadioGroup>
</div>
-->
<!--
<div
class=
"item"
>
<label
class=
"label"
>
正品认证:
</label>
<RadioGroup
v-model=
"data.type"
>
<Radio
label=
"1"
:disabled=
"isDetail || isEdit || is
Draft|| is
Again"
class=
"ivu-radio"
>
申请
</Radio>
<Radio
label=
"2"
:disabled=
"isDetail || isEdit || is
Draft|| is
Again"
class=
"ivu-radio"
>
不申请
</Radio>
<Radio
label=
"1"
:disabled=
"isDetail || isEdit || isAgain"
class=
"ivu-radio"
>
申请
</Radio>
<Radio
label=
"2"
:disabled=
"isDetail || isEdit || isAgain"
class=
"ivu-radio"
>
不申请
</Radio>
</RadioGroup>
</div>
-->
</info-con>
...
...
src/view/good-mgr/add-commodity/decpit-info.vue
View file @
dfedd56d
...
...
@@ -7,6 +7,7 @@
:width=
"150"
:iconSize=
"26"
:maxNum=
"5"
:maxSize=
"6"
v-model=
"data.detailPictures"
:defaultList=
"data.defaultDetailPicture"
:readonly=
"isDetail "
...
...
@@ -39,6 +40,7 @@
:width=
"150"
:iconSize=
"26"
:maxNum=
"1"
:maxSize=
"6"
v-model=
"data.thumbList"
:defaultList=
"data.defaultThumbList"
:readonly=
"isDetail "
...
...
src/view/good-mgr/add-good/decpit-info.vue
View file @
dfedd56d
...
...
@@ -7,6 +7,7 @@
:width=
"150"
:iconSize=
"26"
:maxNum=
"5"
:maxSize=
"6"
v-model=
"data.detailPictures"
:defaultList=
"data.defaultDetailPicture"
:readonly=
"isDetail"
...
...
@@ -39,6 +40,7 @@
:width=
"150"
:iconSize=
"26"
:maxNum=
"1"
:maxSize=
"6"
v-model=
"data.thumbList"
:defaultList=
"data.defaultThumbList"
:readonly=
"isDetail"
...
...
src/view/good-mgr/add-good/sale-info.vue
View file @
dfedd56d
...
...
@@ -550,6 +550,7 @@
v-model=
"data.sku[index].upload.imageList"
@
input=
"handleUploadInput($event, index)"
:maxNum=
"1"
:maxSize=
"6"
:defaultList=
"data.sku[index].upload.defaultImgList"
:readonly=
"isDetail"
showWatch
...
...
@@ -582,6 +583,7 @@
:ref=
"'fileUpload' + index"
:width=
"46"
style=
"margin-top: 5px"
:maxSize=
"6"
v-model=
"data.sku[index].upload.imageList"
@
input=
"handleUploadInput($event, index)"
:maxNum=
"1"
...
...
@@ -1441,75 +1443,6 @@ export default {
align
:
"center"
,
});
this
.
data
.
sku
=
resArr
;
},
genSkuData
(
prop
,
resArr
)
{
let
newArr
=
[];
let
{
name
,
valList
}
=
prop
;
if
(
resArr
.
length
===
0
)
{
valList
.
forEach
((
item
)
=>
{
let
propertyList
=
[{
propKey
:
name
,
propVal
:
item
.
val
}];
newArr
.
push
({
[
name
]:
item
.
val
,
originalPrice
:
0
,
stock
:
""
,
coinName
:
""
,
// coinNamePrefix: this.coinNamePrefix,
outToken
:
""
,
republish
:
false
,
// availableNumber: '',
image
:
""
,
propertyList
,
// rate: 0,
// typeCode: '',
hash
:
""
,
weight
:
0
,
upload
:
{
imageList
:
[],
defaultImgList
:
[],
},
});
});
// console.log('newArr1', newArr)
}
else
{
resArr
.
forEach
((
rItem
)
=>
{
valList
.
forEach
((
vItem
)
=>
{
let
newItem
=
{
...
rItem
,
[
name
]:
vItem
.
val
};
newItem
.
propertyList
=
JSON
.
parse
(
JSON
.
stringify
(
newItem
.
propertyList
)
);
newItem
.
propertyList
.
push
({
propKey
:
name
,
propVal
:
vItem
.
val
,
});
newItem
.
upload
=
{
imageList
:
[],
defaultImgList
:
[],
};
// console.log('newItem', newItem)
newArr
.
push
(
newItem
);
});
});
}
// console.log('newArr', newArr)
return
newArr
;
},
genSkuTableBlindBox
()
{
if
(
this
.
columns
.
length
===
0
){
this
.
genColumnBlindBox
();
}
this
.
genSkuBlindBox
();
},
genColumnBlindBox
()
{
let
columns
=
[];
this
.
propList
.
forEach
((
pItem
)
=>
{
columns
.
push
({
title
:
"规格名称"
,
minWidth
:
120
,
slot
:
"name"
,
align
:
"center"
,
});
});
columns
.
push
({
title
:
"重量(KG)"
,
slot
:
"weight"
,
...
...
src/view/good-mgr/good-commodity.vue
View file @
dfedd56d
...
...
@@ -230,7 +230,7 @@ export default {
[
h
(
'img'
,
{
attrs
:
{
src
:
params
.
row
.
thumb
src
:
this
.
imgCompression
(
params
.
row
.
thumb
,
70
)
},
style
:
{
width
:
'70px'
,
...
...
src/view/good-mgr/integral-list.vue
View file @
dfedd56d
...
...
@@ -164,7 +164,7 @@ export default {
[
h
(
'img'
,
{
attrs
:
{
src
:
params
.
row
.
thumb
src
:
this
.
imgCompression
(
params
.
row
.
thumb
,
70
)
},
style
:
{
width
:
'70px'
,
...
...
src/view/good-mgr/product-list.vue
View file @
dfedd56d
...
...
@@ -320,7 +320,7 @@ export default {
[
h
(
"img"
,
{
attrs
:
{
src
:
params
.
row
.
thumb
,
src
:
this
.
imgCompression
(
params
.
row
.
thumb
,
70
)
,
},
style
:
{
width
:
"70px"
,
...
...
@@ -417,39 +417,40 @@ export default {
},
obj
.
label
)
if
(
params
.
row
.
status
===
OffShelfType
.
ISSUE
){
const
slots
=
h
(
"div"
,
{
slot
:
"content"
,
style
:{
'textAlign'
:
"left"
}
},
[
h
(
"p"
,
'目标发行token:500个'
),
h
(
"p"
,
'已发行token:500个'
),
]
)
return
h
(
'Poptip'
,
{
props
:{
trigger
:
"hover"
,
title
:
'发行进度'
}
},
[
statusObj
,
slots
]
)
}
else
{
return
statusObj
}
// if(params.row.status===OffShelfType.ISSUE){
// const slots=h(
// "div",
// {
// slot:"content",
// style:{
// 'textAlign':"left"
// }
// },
// [
// h(
// "p",
// '目标发行token:500个'
// ),
// h(
// "p",
// '已发行token:500个'
// ),
// ]
// )
// return h(
// 'Poptip',
// {
// props:{
// trigger:"hover",
// title:'发行进度'
// }
// },
// [statusObj,slots]
// )
// }else{
// return statusObj
// }
//
// return h(
...
...
@@ -463,7 +464,6 @@ export default {
// );
},
},
{
title
:
"失败理由"
,
width
:
130
,
...
...
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