Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_electricity
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
zhengke
jz_electricity
Commits
7e56c3df
Commit
7e56c3df
authored
Mar 07, 2025
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
插件新增字段
parent
a180f7e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
56 deletions
+21
-56
rubik.vue
src/components/sallCenter/plugin/rubik.vue
+13
-2
index.js
src/plug/index.js
+8
-54
No files found.
src/components/sallCenter/plugin/rubik.vue
View file @
7e56c3df
...
...
@@ -142,6 +142,17 @@
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"高度"
>
<el-input
type=
"text"
size=
"small"
v-model=
"rubData.data.height"
>
<
template
slot=
"append"
>
px
</
template
>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
...
...
@@ -518,7 +529,7 @@
return
`height:
${
this
.
rubData
.
data
.
height
}
px;background-size:
${
per
}
px
${
per
}
px;`
;
}
else
{
if
(
index
===
0
)
{
this
.
rubData
.
data
.
height
=
'auto'
;
//
this.rubData.data.height = 'auto';
if
(
this
.
rubData
.
data
.
list
&&
this
.
rubData
.
data
.
list
.
length
>
0
)
{
return
`height:
${
this
.
rubData
.
data
.
list
[
0
].
pic_url
?
'auto'
:
'360px'
}
`
;
}
...
...
@@ -654,7 +665,7 @@
height
=
`calc(
${
height
}
-
${
space
*
hMultiple
}
px)`
;
}
if
(
this
.
rubData
.
data
.
style
===
0
&&
isPreview
&&
this
.
rubData
.
data
.
list
[
0
].
pic_url
)
{
height
=
'auto'
;
//
height = 'auto';
}
block
.
width
=
width
;
...
...
src/plug/index.js
View file @
7e56c3df
...
...
@@ -177,61 +177,15 @@ export default {
Vue
.
prototype
.
UploadFileToTencent
=
function
(
path
,
fileObj
,
callback
)
{
// debugger;
var
upInfo
=
JSON
.
parse
(
localStorage
.
uploadInfo
);
let
maxSize
=
500
*
1024
if
((
fileObj
.
type
==
"image/png"
||
fileObj
.
type
==
"image/jpeg"
)
&&
fileObj
.
size
>
maxSize
)
{
let
that
=
this
lrz
(
fileObj
,
{
width
:
750
,
quality
:
0.8
})
.
then
(
function
(
rst
)
{
//成功时执行
var
arr
=
rst
.
base64
.
split
(
','
);
var
mime
=
arr
[
0
].
match
(
/:
(
.*
?)
;/
)[
1
];
var
bstr
=
atob
(
arr
[
1
]);
var
n
=
bstr
.
length
;
var
u8arr
=
new
Uint8Array
(
n
);
while
(
n
--
)
{
u8arr
[
n
]
=
bstr
.
charCodeAt
(
n
);
}
var
newFile
=
new
File
([
u8arr
],
fileObj
.
name
,
{
type
:
mime
});
if
(
upInfo
&&
upInfo
.
IsDefault
==
1
)
{
if
(
upInfo
.
StoreType
==
1
)
{
that
.
uploadStart
(
path
,
newFile
,
callback
)
}
if
(
upInfo
.
StoreType
==
2
)
{
that
.
uploadToAli
(
path
,
newFile
,
callback
)
}
}
else
{
that
.
Error
(
'请先配置上传'
);
}
}).
catch
(
function
(
error
)
{
if
(
upInfo
&&
upInfo
.
IsDefault
==
1
)
{
if
(
upInfo
.
StoreType
==
1
)
{
that
.
uploadStart
(
path
,
fileObj
,
callback
)
}
if
(
upInfo
.
StoreType
==
2
)
{
that
.
uploadToAli
(
path
,
fileObj
,
callback
)
}
}
else
{
that
.
Error
(
'请先配置上传'
);
}
}).
always
(
function
()
{
//不管成功或失败,都会执行
})
}
else
{
if
(
upInfo
&&
upInfo
.
IsDefault
==
1
)
{
if
(
upInfo
.
StoreType
==
1
)
{
this
.
uploadStart
(
path
,
fileObj
,
callback
)
}
if
(
upInfo
.
StoreType
==
2
)
{
this
.
uploadToAli
(
path
,
fileObj
,
callback
)
}
}
else
{
this
.
Error
(
'请先配置上传'
);
if
(
upInfo
&&
upInfo
.
IsDefault
==
1
)
{
if
(
upInfo
.
StoreType
==
1
)
{
this
.
uploadStart
(
path
,
fileObj
,
callback
)
}
if
(
upInfo
.
StoreType
==
2
)
{
this
.
uploadToAli
(
path
,
fileObj
,
callback
)
}
}
else
{
this
.
Error
(
'请先配置上传'
);
}
},
Vue
.
prototype
.
uploadStart
=
function
(
path
,
fileObj
,
callback
)
{
...
...
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