Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
million
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
million
Commits
ba5b6011
Commit
ba5b6011
authored
Mar 10, 2023
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化城市主页
parent
4844a58a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
379 additions
and
73 deletions
+379
-73
App.vue
src/App.vue
+4
-2
style1.vue
src/components/goods/style1.vue
+51
-0
style2.vue
src/components/goods/style2.vue
+58
-0
cityDetail.vue
src/pages/city/cityDetail.vue
+142
-46
city-info.vue
src/pages/city/components/city-info.vue
+59
-0
near-city.vue
src/pages/city/components/near-city.vue
+28
-14
top-card.vue
src/pages/city/components/top-card.vue
+5
-4
pay.vue
src/pages/pay/pay.vue
+3
-3
paysuccess.vue
src/pages/pay/paysuccess.vue
+3
-3
setUserInfo.vue
src/pages/usercenter/setUserInfo.vue
+1
-1
listProductType.js
src/utils/listProductType.js
+25
-0
No files found.
src/App.vue
View file @
ba5b6011
...
...
@@ -10,7 +10,7 @@ export default {
};
</
script
>
<
style
>
@import
url("//at.alicdn.com/t/c/font_1890699_
yrr2mh5n7ln
.css")
;
@import
url("//at.alicdn.com/t/c/font_1890699_
gbysegbhucu
.css")
;
@font-face
{
font-family
:
"oswald"
;
src
:
url("https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/smallapp/Oswald-Regular.ttf")
;
...
...
@@ -19,7 +19,9 @@ export default {
font-family
:
'FZDBSJW'
;
src
:
local
(
'FZDaBiaoSong-B06S'
)
}
.text-shadow
{
text-shadow
:
rgb
(
0
0
0
/
50%
)
2px
2px
5px
;
}
.text-subtitle1
{
font-size
:
1.25rem
!important
;
}
...
...
src/components/goods/style1.vue
0 → 100644
View file @
ba5b6011
<
template
>
<div
class=
"rounded-borders overflow-hidden q-pb-md"
:style=
"
{'width':width,'background-color':bgColor}" v-if="product">
<q-img
:src=
"product.ImgCover"
spinner-color=
"white"
:ratio=
"16/9"
fit=
"cover"
>
<div
class=
"absolute-top text-shadow"
style=
"background: linear-gradient(rgba(0, 0, 0, 0.5),rgba(0, 0, 0, 0));"
>
{{
formatEnum
(
product
.
ProductType
)
}}
</div>
</q-img>
<div
class=
"ellipsis-2-lines text-body1 q-ma-md cursor-pointer"
style=
"height: 74px;"
>
{{
product
.
Title
}}
</div>
<div
class=
"text-subtitle2 text-weight-bolder text-dark q-mx-md"
>
<span>
CNY
{{
moneyFormat
(
product
.
B2CPrice
,
2
)
}}
</span>
<span
class=
"f12 q-ml-sm"
>
起
</span>
</div>
</div>
</
template
>
<
script
>
import
ListProductTypeEnum
from
'src/utils/listProductType'
;
import
EnumHelper
from
'../../utils/enumhelper'
export
default
{
props
:{
product
:{
type
:
Object
,
required
:
true
},
width
:{
type
:
String
,
default
:
"250px"
},
bgColor
:{
type
:
String
,
default
:
'#fff'
}
},
data
()
{
return
{
}
},
methods
:
{
formatEnum
(
t
){
let
temp
=
EnumHelper
.
ParseToEnum
(
ListProductTypeEnum
,
t
,
'value'
)
return
temp
.
desc
}
},
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
src/components/goods/style2.vue
0 → 100644
View file @
ba5b6011
<
template
>
<!--
<div
class=
"rounded-borders overflow-hidden q-pb-md"
:style=
"
{'width':width,'background-color':bgColor}" v-if="product">
<q-img
:src=
"product.ImgCover"
spinner-color=
"white"
:ratio=
"16/9"
fit=
"cover"
/>
<div
class=
"ellipsis-2-lines text-body1 q-ma-md cursor-pointer"
>
{{
product
.
Title
}}{{
product
.
Title
}}{{
product
.
Title
}}{{
product
.
Title
}}{{
product
.
Title
}}
</div>
<div
class=
"text-subtitle2 text-weight-bolder text-dark q-mx-md"
>
<span>
CNY
{{
moneyFormat
(
product
.
B2CPrice
,
2
)
}}
</span>
<span
class=
"f12 q-ml-sm"
>
起
</span>
</div>
</div>
-->
<div
class=
"rounded-borders overflow-hidden"
v-if=
"product"
>
<div
class=
"row"
:style=
"
{'background-color':bgColor}" >
<q-img
:src=
"product.ImgCover"
spinner-color=
"dark"
:ratio=
"4/3"
fit=
"cover"
class=
" col-5"
>
<div
class=
"absolute-top text-shadow"
style=
"background: linear-gradient(rgba(0, 0, 0, 0.5),rgba(0, 0, 0, 0));"
>
{{
formatEnum
(
product
.
ProductType
)
}}
</div>
</q-img>
<div
class=
"q-px-md col"
>
<div
class=
"ellipsis-2-lines text-body1 q-ma-md cursor-pointer"
style=
"height:50px;"
>
{{
product
.
Title
}}
</div>
<div
class=
"text-subtitle2 text-weight-bolder text-dark q-mx-md"
>
<span>
CNY
{{
moneyFormat
(
product
.
B2CPrice
,
2
)
}}
</span>
<span
class=
"f12 q-ml-sm"
>
起
</span>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
ListProductTypeEnum
from
'src/utils/listProductType'
;
import
EnumHelper
from
'../../utils/enumhelper'
export
default
{
props
:{
product
:{
type
:
Object
,
required
:
true
},
width
:{
type
:
String
,
default
:
"250px"
},
bgColor
:{
type
:
String
,
default
:
'#fff'
}
},
methods
:
{
formatEnum
(
t
){
let
temp
=
EnumHelper
.
ParseToEnum
(
ListProductTypeEnum
,
t
,
'value'
)
return
temp
.
desc
}
},
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
src/pages/city/cityDetail.vue
View file @
ba5b6011
This diff is collapsed.
Click to expand it.
src/pages/city/components/city-info.vue
0 → 100644
View file @
ba5b6011
<
template
>
<div
class=
"q-mt-lg"
>
<div
class=
"top-title"
>
{{
cityInfo
.
AreaName
}}
旅遊指南
</div>
<div
class=
"q-mt-md rounded-borders q-pa-lg bg-white light-shadow"
>
<div
class=
"text-h6 text-weight-bold"
>
關於
{{
cityInfo
.
AreaName
}}
</div>
<div
class=
"q-my-md f12 text-grey-9"
v-html=
"cityInfo.Introduction"
></div>
<q-separator
class=
"q-my-xl"
color=
"grey-2"
/>
<div
class=
"text-h6 q-my-md text-weight-bold"
>
實用訊息
</div>
<div
class=
"q-mt-md"
:class=
"
{'row justify-between q-mr-lg':$q.platform.is.desktop,'column q-gutter-md':$q.platform.is.mobile}">
<div>
<div
class=
"f12 text-grey-9"
>
時區:
</div>
<div
class=
"q-my-md text-subtitle1"
>
{{
cityInfo
.
TimeZones
}}
</div>
<div
class=
"text-body2 text-grey-6"
>
出行注意時差,安排好休息時間哦
</div>
</div>
<div>
<div
class=
"f12 text-grey-9"
>
貨幣:
</div>
<div
class=
"q-my-md text-subtitle1"
>
{{
cityInfo
.
CurrencyName
}}
</div>
<div
class=
"text-body2 text-grey-6"
>
建議您出行錢準備充足的當地貨幣
</div>
</div>
<div>
<div
class=
"f12 text-grey-9"
>
电压:
</div>
<div
class=
"q-my-md text-subtitle1"
>
{{
cityInfo
.
Voltage
}}
</div>
</div>
<div>
<div
class=
"f12 text-grey-9"
>
最佳出行月份
</div>
<div
class=
"q-mt-md"
v-for=
"(x,i) in cityInfo.BestTravelTimeList"
:key=
"i"
>
<div
class=
"q-mb-sm text-subtitle1"
>
{{
x
.
Month
}}
</div>
<div
class=
"text-body2 text-grey-6"
>
{{
x
.
Description
}}
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
props
:[
'city'
],
data
()
{
return
{
cityInfo
:{}
}
},
created
()
{
this
.
cityInfo
=
this
.
city
this
.
cityInfo
.
Introduction
=
this
.
cityInfo
.
Introduction
.
replace
(
/
\n
/g
,
"<br>"
)
},
}
</
script
>
<
style
>
.top-title
{
font-size
:
26px
;
font-weight
:
bold
;
color
:
#000000
;
line-height
:
44px
;
}
</
style
>
\ No newline at end of file
src/pages/city/components/near-city.vue
View file @
ba5b6011
...
...
@@ -37,7 +37,11 @@
<
template
>
<div>
<div
class=
"title"
>
附近的城市
</div>
<div
class=
"flex"
>
<q-scroll-area
:thumb-style=
"thumbStyle"
style=
"height: 290px;width100%;"
>
<div
class=
"row no-wrap"
>
<div
@
click=
"navToSearch(item)"
class=
"relative card"
...
...
@@ -46,11 +50,13 @@
>
<img
class=
"card-img"
:src=
"item.ImageList[0]"
/>
<div
class=
"info"
>
<div
>
{{
item
.
AreaName
}}
</div>
<div
class=
"text-subtitle1 text-weight-bold text-shadow"
>
{{
item
.
AreaName
}}
</div>
<!--
<div>
10Km
</div>
-->
</div>
</div>
</div>
</q-scroll-area>
<div
class=
"flex flex-center"
>
<q-btn
@
click=
"navToSearch()"
...
...
@@ -72,7 +78,15 @@ export default {
},
},
data
()
{
return
{};
return
{
thumbStyle
:
{
right
:
'2px'
,
borderRadius
:
'2px'
,
backgroundColor
:
'#027be3'
,
width
:
'2px'
,
opacity
:
'0'
}
};
},
methods
:
{
navToSearch
(
item
)
{
...
...
src/pages/city/components/top-card.vue
View file @
ba5b6011
...
...
@@ -19,8 +19,8 @@
}
.card-img
{
width
:
272px
;
height
:
162px
;
border-radius
:
10px
;
height
:
162px
;
border-radius
:
10px
;
}
.title
{
margin-top
:
17px
;
...
...
@@ -40,7 +40,7 @@ color: #36A1FA;
</
style
>
<
template
>
<div
class=
"card"
>
<div
class=
"relative"
>
<
!--
<
div
class=
"relative"
>
<div
class=
"address"
>
<i
class=
"iconfont icondingweixiao q-icon notranslate"
...
...
@@ -58,7 +58,8 @@ color: #36A1FA;
class=
"card-img"
:src=
"data.ImgCover"
/>
</div>
</div>
-->
<div
class=
"title ellipsis-2"
>
{{
data
.
Title
}}
</div>
<!--
<div>
<i
...
...
src/pages/pay/pay.vue
View file @
ba5b6011
...
...
@@ -155,9 +155,9 @@ export default {
},
goHomeHandler
(){
this
.
loading
=
false
//
setTimeout(() => {
//
location.href = location.origin;
//
}, 3000);
setTimeout
(()
=>
{
location
.
href
=
location
.
origin
;
},
3000
);
},
cancelPayHandler
(){
this
.
showPay
=
''
...
...
src/pages/pay/paysuccess.vue
View file @
ba5b6011
...
...
@@ -131,9 +131,9 @@ export default {
},
goHomeHandler
()
{
this
.
loading
=
false
//
setTimeout(() => {
//
location.href = location.origin;
//
}, 3000);
setTimeout
(()
=>
{
location
.
href
=
location
.
origin
;
},
3000
);
}
},
}
...
...
src/pages/usercenter/setUserInfo.vue
View file @
ba5b6011
...
...
@@ -84,7 +84,7 @@
class=
"form-item"
placeholder=
"名字(需與旅遊證件一致)"
v-model=
"form.EnSurname"
outlined
standout
:rules=
"[(val) => !!val || '请输入名字(需與旅遊證件一致)']"
></q-input>
</div>
...
...
src/utils/listProductType.js
0 → 100644
View file @
ba5b6011
const
ListProductTypeEnum
=
Object
.
freeze
({
TRIP
:
{
value
:
1
,
desc
:
'線路旅遊'
},
SCENIC
:
{
value
:
2
,
desc
:
'景點門票'
},
HOTEL
:
{
value
:
3
,
desc
:
'酒店住宿'
},
CAR
:
{
value
:
4
,
desc
:
'目的地用車'
},
JALAN
:
{
value
:
5
,
desc
:
'酒店住宿'
},
})
export
default
ListProductTypeEnum
\ No newline at end of file
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