Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pptist
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
viitto
pptist
Commits
0a866c0c
Commit
0a866c0c
authored
Jan 05, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化 广告 模版切换 画布定位
parent
fa948abc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
10 deletions
+22
-10
index.vue
src/views/Editor/Thumbnails/index.vue
+11
-9
index.vue
src/views/Editor/index.vue
+10
-1
Index.vue
src/views/Market/Index.vue
+1
-0
No files found.
src/views/Editor/Thumbnails/index.vue
View file @
0a866c0c
...
...
@@ -389,8 +389,11 @@ const GetTripTemplate = async () =>{
let
dataRes
=
await
ConfigService
.
GetTripTemplateSlide
(
queryMsg
);
if
(
dataRes
.
data
.
resultCode
==
1
)
{
if
(
SalesBack
.
value
==
0
||
(
SalesBack
.
value
==
1
&&
searchData
.
value
.
TempId
)){
let
viewportRatios
=
1.414
if
(
dataRes
.
data
.
data
.
TempType
==
1
)
viewportRatios
=
0.7069
let
viewportRatios
=
0
if
(
dataRes
.
data
.
data
.
TemplateType
!=
2
)
{
viewportRatios
=
1.414
if
(
dataRes
.
data
.
data
.
TempType
==
1
)
viewportRatios
=
0.7069
}
if
(
dataRes
.
data
.
data
.
TemplateType
==
2
&&
dataRes
.
data
.
data
.
Width
&&
dataRes
.
data
.
data
.
Height
)
{
viewportRatios
=
dataRes
.
data
.
data
.
Height
/
dataRes
.
data
.
data
.
Width
queryObj
.
value
.
Width
=
dataRes
.
data
.
data
.
Width
...
...
@@ -444,13 +447,10 @@ const GetTripTemplate = async () =>{
if
(
queryObj
.
value
.
Width
){
VIEWPORT_SIZE
.
Value
=
queryObj
.
value
.
Height
VIEWPORT_VER_SIZE
.
Value
=
queryObj
.
value
.
Width
// if(viewportRatio.value
<
1
)
VIEWPORT_SIZE
.
Value
=
queryObj
.
value
.
Height
// else VIEWPORT_VER_SIZE.Value = queryObj.value.Width
}
else
{
VIEWPORT_SIZE
.
Value
=
1754
VIEWPORT_VER_SIZE
.
Value
=
1240
}
if
(
ConfigId
.
value
==
0
)
return
if
(
TempId
.
value
&&!
searchData
.
value
.
TempId
)
await
GetTripConfig
()
await
GetTripFiledData
()
...
...
@@ -478,14 +478,17 @@ const sellGetTripTemplate = async () =>{
else
if
(
TempId
.
value
)
queryObj
.
value
.
TempId
=
TempId
.
value
let
dataObj
=
dataRes
.
data
.
data
let
viewportRatios
=
1.414
if
(
dataRes
.
data
.
data
.
TempType
==
1
)
viewportRatios
=
0.7069
queryObj
.
value
.
TemplateType
=
dataRes
.
data
.
data
.
TemplateType
let
viewportRatios
=
0
if
(
dataRes
.
data
.
data
.
TemplateType
!=
2
)
{
viewportRatios
=
1.414
if
(
dataRes
.
data
.
data
.
TempType
==
1
)
viewportRatios
=
0.7069
}
if
(
dataRes
.
data
.
data
.
TemplateType
==
2
&&
dataRes
.
data
.
data
.
Width
&&
dataRes
.
data
.
data
.
Height
)
{
viewportRatios
=
dataRes
.
data
.
data
.
Height
/
dataRes
.
data
.
data
.
Width
queryObj
.
value
.
Width
=
dataRes
.
data
.
data
.
Width
queryObj
.
value
.
Height
=
dataRes
.
data
.
data
.
Height
}
queryObj
.
value
.
TemplateType
=
dataRes
.
data
.
data
.
TemplateType
slidesStore
.
setViewportRatio
(
viewportRatios
)
if
(
queryObj
.
value
.
Width
){
...
...
@@ -495,7 +498,6 @@ const sellGetTripTemplate = async () =>{
VIEWPORT_SIZE
.
Value
=
1754
VIEWPORT_VER_SIZE
.
Value
=
1240
}
if
(
SalesBack
.
value
==
0
)
slidesStore
.
setTitle
(
dataRes
.
data
.
data
.
Title
)
if
(
SalesBack
.
value
==
0
&&
searchData
.
value
.
sellId
){
console
.
log
(
JSON
.
parse
(
dataObj
.
TempData
))
...
...
src/views/Editor/index.vue
View file @
0a866c0c
...
...
@@ -6,7 +6,7 @@
<Thumbnails
class=
"layout-content-left"
/>
<div
class=
"layout-content-center"
style=
"overflow: hidden;"
>
<CanvasTool
class=
"center-top"
/>
<div
style=
"height: calc(100% - 40px);overflow: scroll;background: #f9f9f9;"
>
<div
v-if=
"!reloadLoading"
style=
"height: calc(100% - 40px);overflow: scroll;background: #f9f9f9;"
>
<!--
<Canvas
class=
"center-body"
:style=
"
{ height: `calc(100% - 40px)`}" /> -->
<Canvas
class=
"center-body"
:style=
"
{ height: '100%'}" />
</div>
...
...
@@ -132,6 +132,15 @@ watch(() => refThumbnails.value, () => {
getDomeWH
()
},
1000
)
})
const
reloadLoading
=
ref
(
true
)
const
reload
=
()
=>
{
setTimeout
(()
=>
{
reloadLoading
.
value
=
false
},
200
)
}
// 监听viewportRatio 重新渲染画布
watch
(
viewportRatio
,
reload
())
const
getDomeWH
=
async
()
=>
{
if
(
refThumbnails
.
value
){
let
height
=
await
refThumbnails
.
value
.
offsetHeight
;
...
...
src/views/Market/Index.vue
View file @
0a866c0c
...
...
@@ -286,6 +286,7 @@
})
let
TemplateType
=
0
if
(
searchData
.
value
.
TemplateType
)
TemplateType
=
searchData
.
value
.
TemplateType
if
(
model
.
value
==
1
)
TemplateType
=
0
if
(
ConfigId
.
value
>
0
)
TemplateType
=
1
const
queryObj
=
reactive
({
pageIndex
:
1
,
...
...
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