Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
shuchengMiniPro
Project
Project
Details
Activity
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
cfld-frontend
shuchengMiniPro
Commits
229aeecb
Commit
229aeecb
authored
Dec 18, 2023
by
王玉鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 详情页跳转vr
parent
be960036
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
99 additions
and
2 deletions
+99
-2
pages.json
src/pages.json
+6
-0
CommonDetail.vue
src/pages/detail/components/CommonDetail.vue
+68
-2
index.vue
src/pages/webview/index.vue
+25
-0
vr-animation.png
src/static/img/vr-animation.png
+0
-0
vr-icon.png
src/static/img/vr-icon.png
+0
-0
No files found.
src/pages.json
View file @
229aeecb
...
...
@@ -55,6 +55,12 @@
"navigationBarTitleText"
:
"投资舒城"
}
},
{
"path"
:
"pages/webview/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"pages/inviteInvestment/policyDetail"
},
...
...
src/pages/detail/components/CommonDetail.vue
View file @
229aeecb
<
template
>
<div
v-if=
"detail"
class=
"common-detail"
>
<div>
<div
style=
"position: relative"
>
<u-swiper
indicator
circular
:list=
"
detail.imgUrl
List"
:list=
"
image
List"
:height=
"420"
@
click=
"handleImgClick"
@
change=
"handleImgChange"
></u-swiper>
<!--
<image
class=
"vr-static-icon"
src=
"@/static/img/vr-icon.png"
></image>
-->
<div
v-if=
"currentIsVrImg"
class=
"vr-icon"
@
click=
"handleImgClick(imgIndex)"
></div>
</div>
<div
class=
"common-detail__cells"
>
<slot
:detail=
"detail"
></slot>
...
...
@@ -66,6 +74,7 @@ export default defineComponent({
callTitle
:
""
,
phoneInfo
:
null
,
showCallService
:
false
,
imgIndex
:
0
,
};
},
computed
:
{
...
...
@@ -83,6 +92,21 @@ export default defineComponent({
// todo 联系人电话
return
""
;
},
imageList
()
{
if
(
this
.
detail
)
{
const
{
imgUrlList
=
[],
vrUrlList
=
[]
}
=
this
.
detail
;
return
[...
vrUrlList
.
map
(({
vrCover
})
=>
vrCover
),
...
imgUrlList
];
}
else
{
return
[];
}
},
currentIsVrImg
()
{
if
(
this
.
detail
)
{
return
this
.
imgIndex
<
this
.
detail
.
vrUrlList
.
length
;
}
else
{
return
false
;
}
},
},
mounted
()
{
this
.
detailId
=
this
.
$root
.
$mp
.
query
.
id
;
...
...
@@ -123,6 +147,18 @@ export default defineComponent({
}
this
.
showCallService
=
!
this
.
showCallService
;
},
handleImgClick
(
index
)
{
const
{
vrUrlList
=
[]
}
=
this
.
detail
;
if
(
index
<
vrUrlList
.
length
)
{
const
url
=
vrUrlList
[
index
].
vrUrl
;
uni
.
navigateTo
({
url
:
"/pages/webview/index?webUrl="
+
url
,
});
}
},
handleImgChange
({
current
})
{
this
.
imgIndex
=
current
;
},
},
});
</
script
>
...
...
@@ -168,5 +204,35 @@ export default defineComponent({
width
:
40rpx
;
height
:
40rpx
;
}
.vr-icon
{
height
:
100rpx
;
width
:
100rpx
;
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
background
:
url("https://cfld-hw-obs-01.obs.cn-north-4.myhuaweicloud.com/lyy/img/shucheng/vr-animation.png")
no-repeat
;
background-size
:
auto
100rpx
;
animation
:
vr-ani
3
.08333333s
0s
steps
(
74
)
infinite
normal
;
z-index
:
100
;
}
@keyframes
vr-ani
{
from
{
background-position
:
0
0
;
}
to
{
background-position
:
100%
0
;
}
}
.vr-static-icon
{
width
:
100rpx
;
height
:
100rpx
;
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
z-index
:
100
;
}
}
</
style
>
src/pages/webview/index.vue
0 → 100644
View file @
229aeecb
<
template
>
<div
v-if=
"webUrl"
>
<web-view
:src=
"webUrl"
@
error=
"handleError"
></web-view>
</div>
</
template
>
<
script
>
export
default
{
name
:
"HmsWebview"
,
data
()
{
return
{
webUrl
:
""
,
};
},
mounted
()
{
this
.
webUrl
=
decodeURIComponent
(
this
.
$root
.
$mp
.
query
.
webUrl
);
console
.
log
(
this
.
webUrl
);
},
methods
:
{
handleError
(
e
)
{
console
.
log
(
e
);
},
},
};
</
script
>
src/static/img/vr-animation.png
0 → 100644
View file @
229aeecb
424 KB
src/static/img/vr-icon.png
0 → 100644
View file @
229aeecb
3.93 KB
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