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
657c2f7c
Commit
657c2f7c
authored
Mar 10, 2023
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增跳转参数封装
parent
494f6f50
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
26 deletions
+35
-26
product.js
src/boot/product.js
+28
-0
utils.js
src/boot/utils.js
+4
-1
style1.vue
src/components/goods/style1.vue
+1
-1
style2.vue
src/components/goods/style2.vue
+1
-1
kkday.vue
src/components/searchdata/kkday.vue
+1
-23
No files found.
src/boot/product.js
0 → 100644
View file @
657c2f7c
const
product
=
{
/**
* 生成產品詳情地址
* @param {*} productInfo 產品信息(必須包含Id和ProductType)
*/
genernalUrl
(
productInfo
)
{
let
t
=
productInfo
.
productType
?
productInfo
.
productType
:
productInfo
.
ProductType
;
let
configId
=
productInfo
.
configId
?
productInfo
.
configId
:
productInfo
.
ConfigId
;
let
url
=
''
if
(
t
&&
configId
)
{
if
(
t
===
4
)
{
// 接送机,包车
url
=
"/detailCar/"
+
configId
}
else
if
(
t
===
3
)
{
url
=
"/detailHotal/"
+
configId
}
else
if
(
t
===
2
)
{
url
=
"/detailsScenicSpotTicket/"
+
configId
}
else
if
(
t
===
1
)
{
url
=
"/detail/"
+
encodeURIComponent
(
item
.
id
)
+
"/"
+
0
+
"/"
+
configId
}
}
else
{
throw
new
Error
(
"參數不合法"
);
}
return
url
},
};
export
default
product
\ No newline at end of file
src/boot/utils.js
View file @
657c2f7c
...
...
@@ -6,6 +6,7 @@ import VueCoreVideoPlayer from 'vue-core-video-players'
import
'viewerjs/dist/viewer.css'
import
user
from
'./user'
import
message
from
'./message'
import
product
from
'./product'
import
VueViewer
from
'v-viewer'
// import VueCoreVideoPlayer from 'vue-core-video-player'
Vue
.
prototype
.
$EventBus
=
new
Vue
()
...
...
@@ -13,6 +14,7 @@ Vue.use(VueCoreVideoPlayer)
Vue
.
use
(
VueViewer
)
Vue
.
prototype
.
$md5
=
md5
;
Vue
.
prototype
.
$message
=
message
Vue
.
prototype
.
$product
=
product
//域名管理对象
Vue
.
prototype
.
domainManager
=
function
()
{
let
domainUrl
=
''
;
...
...
@@ -195,8 +197,9 @@ Vue.prototype.OpenNewUrl = function(URL) {
//公用跳转
Vue
.
prototype
.
CommonJump
=
function
(
path
,
obj
)
{
let
p
=
typeof
(
path
)
==
'string'
?
path
:
this
.
$product
.
genernalUrl
(
path
)
this
.
$router
.
push
({
path
:
p
ath
,
path
:
p
,
query
:
obj
});
}
...
...
src/components/goods/style1.vue
View file @
657c2f7c
...
...
@@ -5,7 +5,7 @@
{{
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=
"ellipsis-2-lines text-body1 q-ma-md cursor-pointer"
style=
"height: 74px;"
@
click=
"CommonJump(product,
{})"
>
{{
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>
...
...
src/components/goods/style2.vue
View file @
657c2f7c
...
...
@@ -15,7 +15,7 @@
</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=
"ellipsis-2-lines text-body1 q-ma-md cursor-pointer"
style=
"height:50px;"
@
click=
"CommonJump(product,
{})"
>
{{
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>
...
...
src/components/searchdata/kkday.vue
View file @
657c2f7c
...
...
@@ -733,29 +733,7 @@ this.dayArray = this.dayArray.filter(item => arr.includes(item.id))
// this.msg.dayNumList = arr;
}
,
GotoDetails(item) {
if(item.productType === 4) { // 接送机,包车
this.CommonJump(
"
/
detailCar
/
"+item.configId,
{
}
);
return
}
else if(item.productType === 3) { // 住宿
this.CommonJump(
"
/
detailHotal
/
"+item.configId,
{
}
);
return
}
else if(item.productType === 2) { // 景区门票
this.CommonJump(
"
/
detailsScenicSpotTicket
/
"+item.configId,
{
}
);
return
}
this.CommonJump(
"
/
detail
/
" + encodeURIComponent(item.id) + "
/
" + item.tcid + "
/
" + item.configId,
{
}
);
this.CommonJump(item,{
}
);
}
,
}
,
}
;
...
...
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