Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
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_Travel
Commits
59232b8f
Commit
59232b8f
authored
Oct 13, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/zk123/jz_travel
parents
09525173
4c558210
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
285 additions
and
216 deletions
+285
-216
style2.vue
components/goods/style2.vue
+258
-205
list.vue
pages/hotel/list.vue
+1
-1
jz_LineDetail.vue
pages/jiuzhai/jz_LineDetail.vue
+4
-0
jz_MyOrder.vue
pages/jiuzhai/jz_MyOrder.vue
+11
-3
jz_Reserve.vue
pages/jiuzhai/jz_Reserve.vue
+11
-7
No files found.
components/goods/style2.vue
View file @
59232b8f
<
template
>
<view
style=
"padding: 12px; padding-bottom: 0;"
:style=
"
{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : ''
}"
>
<u-row
gutter=
"24"
>
<u-col
span=
"6"
v-for=
"(item, gli) in goodList"
:key=
"gli"
>
<view
class=
"good-two"
@
click=
"openGood(item)"
:style=
"
{
border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
background: goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : ''
}"
>
<view
class=
"tips"
v-if=
"goodsInfo.showGoodsTag"
><image
:src=
"goodsInfo.goodsTagPicUrl"
mode=
"widthFix"
style=
"width:100%"
/></view>
<view
class=
"img-box"
>
<view
class=
"img-show"
>
<image
style=
"
width: 100%;
height: 100%;
border-radius: 10rpx 10rpx 0 0;
"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.picUrl"
/>
</view>
</view>
<view
class=
"good-info"
>
<view
class=
"good-name"
v-if=
"goodsInfo.showGoodsName"
>
{{
item
.
name
}}
</view>
<!--
<view
class=
"good-sub-name"
v-if=
"item.subname"
>
{{
item
.
subname
}}
</view>
-->
<!--
<view
class=
"good-sub-name"
style=
"height:30rpx;"
>
<view
style=
"padding: 12px; padding-bottom: 0; display: flex; flex-wrap: wrap"
:style=
"
{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : '',
}"
>
<view
v-for=
"(item, gli) in goodList"
:key=
"gli"
class=
"good-two"
@
click=
"openGood(item)"
>
<view
:style=
"
{
border:
goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
background:
goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2
? '#FFF'
: '',
}"
>
<view
class=
"tips"
v-if=
"goodsInfo.showGoodsTag"
><image
:src=
"goodsInfo.goodsTagPicUrl"
mode=
"widthFix"
style=
"width: 100%"
/></view>
<view
class=
"img-box"
>
<view
class=
"img-show"
>
<image
style=
"width: 100%; height: 100%; border-radius: 10rpx 10rpx 0 0"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.picUrl"
/>
</view>
</view>
<view
class=
"good-info"
>
<view
class=
"good-name-style2"
v-if=
"goodsInfo.showGoodsName"
>
{{
item
.
name
}}
</view>
<!--
<view
class=
"good-sub-name"
v-if=
"item.subname"
>
{{
item
.
subname
}}
</view>
-->
<!--
<view
class=
"good-sub-name"
style=
"height:30rpx;"
>
<template
v-if=
"item.subname"
>
{{
item
.
subname
}}
</
template
>
</view>
-->
<view
class=
"good-price-info"
>
<view
class=
"price"
>
{{ goodsInfo.showGoodsPrice ? getPrice(item.OriginalPrice) : '' }}
<!-- <span style='text-decoration: line-through;margin-left: 10px;font-size: 10px;color: gray;font-family: aa;'>原价:{{goodsInfo.showGoodsPrice ? getPrice(item.OriginalPrice) : ''}}</span> -->
</view>
<view
class=
"buy"
v-if=
"goodsInfo.showBuyBtn"
@
click
.
stop=
"showSkuHandler(item)"
>
<u-icon
name=
"cart-o"
size=
"40"
:color=
"mainColor"
v-if=
"goodsInfo.buyBtn == 'cart'"
/>
<u-icon
name=
"add-o"
size=
"40"
:color=
"mainColor"
v-else-if=
"goodsInfo.buyBtn == 'add'"
/>
<u-button
type=
"primary"
size=
"mini"
:ripple=
"true"
:color=
"goodsInfo.buttonColor"
:custom-style=
"{
'backgroundColor':goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4 ?'#FFF' : goodsInfo.buttonColor ,
'color':goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4 ? goodsInfo.buttonColor : '#FFF'
}"
:plain=
"goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4"
:shape=
"goodsInfo.buyBtnStyle == 3 || goodsInfo.buyBtnStyle == 4 ? 'circle' : 'square'"
v-else
>
{{ goodsInfo.buyBtnText }}
</u-button>
</view>
</view>
</view>
</view>
</u-col>
</u-row>
<good-sku
v-if=
"showSku"
borderRadius=
"20"
v-model=
"showSku"
:good=
"sku"
:option-type=
"2"
></good-sku>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
</view>
<view
class=
"good-price-info"
>
<view
class=
"price"
>
{{ goodsInfo.showGoodsPrice ? getPrice(item.OriginalPrice) : "" }}
<!-- <span style='text-decoration: line-through;margin-left: 10px;font-size: 10px;color: gray;font-family: aa;'>原价:{{goodsInfo.showGoodsPrice ? getPrice(item.OriginalPrice) : ''}}</span> -->
</view>
<view
class=
"buy"
v-if=
"goodsInfo.showBuyBtn"
@
click
.
stop=
"showSkuHandler(item)"
>
<u-icon
name=
"cart-o"
size=
"40"
:color=
"mainColor"
v-if=
"goodsInfo.buyBtn == 'cart'"
/>
<u-icon
name=
"add-o"
size=
"40"
:color=
"mainColor"
v-else-if=
"goodsInfo.buyBtn == 'add'"
/>
<u-button
type=
"primary"
size=
"mini"
:ripple=
"true"
:color=
"goodsInfo.buttonColor"
:custom-style=
"{
backgroundColor:
goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4
? '#FFF'
: goodsInfo.buttonColor,
color:
goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4
? goodsInfo.buttonColor
: '#FFF',
}"
:plain=
"
goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4
"
:shape=
"
goodsInfo.buyBtnStyle == 3 || goodsInfo.buyBtnStyle == 4
? 'circle'
: 'square'
"
v-else
>
{{ goodsInfo.buyBtnText }}
</u-button>
</view>
</view>
</view>
</view>
</view>
<good-sku
v-if=
"showSku"
borderRadius=
"20"
v-model=
"showSku"
:good=
"sku"
:option-type=
"2"
></good-sku>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
</view>
</template>
<
script
>
import
goodSku
from
'../goods/goodsku'
;
import
auth
from
'@/components/auth/index.vue'
;
import
goodSku
from
"../goods/goodsku"
;
import
auth
from
"@/components/auth/index.vue"
;
export
default
{
components
:
{
goodSku
,
auth
},
props
:
[
'goodList'
,
'goodsInfo'
],
data
()
{
return
{
mainColor
:
''
,
activeKey
:
0
,
showSku
:
false
,
sku
:
{},
showAuth
:
false
,
u
:
{}
};
},
created
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
},
methods
:
{
openGood
(
item
)
{
//线路
if
(
item
.
goodType
==
4
)
{
var
url
=
"/pages/jiuzhai/jz_LineDetail?tcid="
+
item
.
id
+
'&configId='
+
item
.
subid
;
uni
.
navigateTo
({
url
:
url
});
}
//酒店
else
if
(
item
.
goodType
==
1
)
{
uni
.
navigateTo
({
url
:
"/pages/hotel/detail?id="
+
item
.
id
});
}
//餐食
else
if
(
item
.
goodType
==
2
)
{
uni
.
navigateTo
({
url
:
'/pages/restaurant/detail?id='
+
item
.
id
});
}
//景点
else
if
(
item
.
goodType
==
3
)
{
uni
.
navigateTo
({
url
:
'/pages/ticketCoupons/detail?id='
+
item
.
id
});
}
},
showSkuHandler
(
g
)
{
this
.
sku
=
g
;
this
.
u
=
uni
.
getStorageSync
(
'mall_UserInfo'
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
'未登录'
,
avatarUrl
:
''
};
this
.
showAuth
=
true
;
}
else
{
this
.
showSku
=
true
;
}
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
'mall_UserInfo'
);
// this.showAuth = false;
},
//关闭登录窗口
gbAuth
()
{
this
.
showAuth
=
false
;
}
}
components
:
{
goodSku
,
auth
,
},
props
:
[
"goodList"
,
"goodsInfo"
],
data
()
{
return
{
mainColor
:
""
,
activeKey
:
0
,
showSku
:
false
,
sku
:
{},
showAuth
:
false
,
u
:
{},
};
},
created
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
},
methods
:
{
openGood
(
item
)
{
//线路
if
(
item
.
goodType
==
4
)
{
var
url
=
"/pages/jiuzhai/jz_LineDetail?tcid="
+
item
.
id
+
"&configId="
+
item
.
subid
;
uni
.
navigateTo
({
url
:
url
,
});
}
//酒店
else
if
(
item
.
goodType
==
1
)
{
uni
.
navigateTo
({
url
:
"/pages/hotel/detail?id="
+
item
.
id
,
});
}
//餐食
else
if
(
item
.
goodType
==
2
)
{
uni
.
navigateTo
({
url
:
"/pages/restaurant/detail?id="
+
item
.
id
,
});
}
//景点
else
if
(
item
.
goodType
==
3
)
{
uni
.
navigateTo
({
url
:
"/pages/ticketCoupons/detail?id="
+
item
.
id
,
});
}
},
showSkuHandler
(
g
)
{
this
.
sku
=
g
;
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
};
this
.
showAuth
=
true
;
}
else
{
this
.
showSku
=
true
;
}
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
// this.showAuth = false;
},
//关闭登录窗口
gbAuth
()
{
this
.
showAuth
=
false
;
},
},
};
</
script
>
<
style
>
.good-two
{
position
:
relative
;
margin-bottom
:
12px
;
border
:
1
rpx
solid
transparent
;
border-radius
:
10
rpx
;
overflow
:
hidden
;
padding-bottom
:
10
rpx
;
box-shadow
:
0px
10px
30px
0px
rgba
(
36
,
36
,
36
,
0.2
);
border-radius
:
20
rpx
;
width
:
48%
;
position
:
relative
;
border
:
1
rpx
solid
transparent
;
border-radius
:
10
rpx
;
overflow
:
hidden
;
margin
:
0
6
rpx
;
margin-bottom
:
12px
;
padding-bottom
:
10
rpx
;
box-shadow
:
0px
10px
30px
0px
rgba
(
36
,
36
,
36
,
0.2
);
border-radius
:
20
rpx
;
}
.good-two
.tips
{
width
:
64
rpx
;
height
:
64
rpx
;
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
4
;
width
:
64
rpx
;
height
:
64
rpx
;
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
4
;
}
.good-two
.img-box
{
width
:
100%
;
height
:
330
rpx
;
position
:
relative
;
border-radius
:
20
rpx
;
overflow
:
hidden
;
width
:
100%
;
height
:
330
rpx
;
position
:
relative
;
border-radius
:
20
rpx
;
overflow
:
hidden
;
}
.good-two
.img-box
.img-show
{
position
:
absolute
;
left
:
0
;
top
:
0
;
bottom
:
0
;
right
:
0
;
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
position
:
absolute
;
left
:
0
;
top
:
0
;
bottom
:
0
;
right
:
0
;
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
}
.good-two
.guding
{
position
:
relative
;
position
:
relative
;
}
.good-two
.guding
.img-box
{
position
:
absolute
;
left
:
0
;
right
:
0
;
bottom
:
0
;
top
:
0
;
position
:
absolute
;
left
:
0
;
right
:
0
;
bottom
:
0
;
top
:
0
;
}
.good-two
.good-info
{
padding
:
20
rpx
;
/* margin-top: -5px;
padding
:
20
rpx
;
/* margin-top: -5px;
padding-bottom: 0; */
}
.good-two
.good-info
.good-name
{
text-overflow
:
-o-ellipsis-lastline
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
margin-bottom
:
10
rpx
;
font-size
:
26
rpx
;
font-weight
:
600
;
height
:
68
rpx
;
.good-two
.good-info
.good-name-style2
{
text-overflow
:
-o-ellipsis-lastline
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
font-size
:
26
rpx
;
font-weight
:
600
;
/* #ifdef MP-WEIXIN */
height
:
68
rpx
;
/* #endif */
/* #ifdef MP-ALIPAY */
height
:
60
rpx
;
margin
:
6
rpx
0
;
/* #endif */
}
.good-two
.good-info
.good-sub-name
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
/* -webkit-line-clamp: 2;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
/* -webkit-line-clamp: 2;
-webkit-box-orient: vertical; */
white-space
:
nowrap
;
margin-bottom
:
10
rpx
;
font-size
:
22
rpx
;
color
:
#999999
;
/* height: 37px; */
white-space
:
nowrap
;
margin-bottom
:
10
rpx
;
font-size
:
22
rpx
;
color
:
#999999
;
/* height: 37px; */
}
.good-two
.good-info
.good-price-info
{
display
:
flex
;
flex-direction
:
row-reverse
;
display
:
flex
;
flex-direction
:
row-reverse
;
}
.good-two
.good-info
.good-price-info
.price
{
color
:
#FF
3166
;
/* flex: 1; */
font-size
:
26
rpx
;
font-weight
:
500
;
text-align
:
right
;
color
:
#ff
3166
;
/* flex: 1; */
font-size
:
26
rpx
;
font-weight
:
500
;
text-align
:
right
;
}
.good-two
.good-info
.good-price-info
.buy
{
/* width: 24px; */
text-align
:
right
;
/* width: 24px; */
text-align
:
right
;
}
</
style
>
pages/hotel/list.vue
View file @
59232b8f
...
...
@@ -669,7 +669,7 @@ export default {
}
.hotel-list
.search-box
.date
{
width
:
8
0
rpx
;
width
:
8
2
rpx
;
height
:
50rpx
;
font-size
:
22rpx
;
font-weight
:
500
;
...
...
pages/jiuzhai/jz_LineDetail.vue
View file @
59232b8f
...
...
@@ -870,6 +870,7 @@
>
</view>
<view
style=
"display: flex; align-items: center"
>
<!-- #ifdef MP-WEIXIN -->
<button
open-type=
"contact"
class=
"jz_ConButton"
>
<img
style=
"width: 36rpx; height: 38rpx"
...
...
@@ -878,6 +879,7 @@
/>
<view
style=
"color: #111111; font-size: 22rpx"
>
客服
</view>
</button>
<!-- #endif -->
<view
class=
"jz_OrderNow"
@
click=
"goReserce()"
>
立即预定
</view>
</view>
</view>
...
...
@@ -896,6 +898,7 @@
<text
style=
"font-size: 22rpx"
>
/起
</text>
</view>
<view
style=
"display: flex; align-items: center"
>
<!-- #ifdef MP-WEIXIN -->
<button
open-type=
"contact"
class=
"jz_ConButton"
>
<img
style=
"width: 36rpx; height: 38rpx"
...
...
@@ -904,6 +907,7 @@
/>
<view
style=
"color: #111111; font-size: 22rpx"
>
客服
</view>
</button>
<!-- #endif -->
<view
class=
"jz_OrderNow"
@
click=
"openOrderPreview"
...
...
pages/jiuzhai/jz_MyOrder.vue
View file @
59232b8f
...
...
@@ -174,7 +174,7 @@
v-if=
"item.orderState == 2"
class=
"jz_Zailai"
style=
"width: 110rpx; margin-right: 10rpx"
@
click
=
"goZhifu.stop
(item)"
@
click
.
stop=
"goZhifu
(item)"
>
付款
</view
>
<!-- #endif -->
...
...
@@ -191,7 +191,7 @@
v-if=
"item.isApplyForCancel != 1"
class=
"jz_Zailai"
style=
"width: 110rpx"
@
click
=
"goCancel.stop
(item)"
@
click
.
stop=
"goCancel
(item)"
>
取消
</view
>
</view>
...
...
@@ -472,7 +472,15 @@ export default {
success
:
function
(
res
)
{
console
.
log
(
"success"
,
res
);
if
(
res
.
resultCode
==
"9000"
)
{
that
.
getOrderInfo
();
uni
.
showToast
({
title
:
"支付成功"
,
});
uni
.
redirectTo
({
url
:
"/pages/jiuzhai/paysuccess?PreferPrice="
+
that
.
price
+
"&isFrom=1"
,
});
}
else
if
(
res
.
resultCode
==
"6001"
)
{
uni
.
showToast
({
title
:
"支付取消"
,
...
...
pages/jiuzhai/jz_Reserve.vue
View file @
59232b8f
...
...
@@ -867,7 +867,16 @@ export default {
(
res
)
=>
{
this
.
orderInfo
=
JSON
.
parse
(
res
.
data
);
if
(
res
.
data
)
{
that
.
PayAli
(
res
.
data
,
data
);
// that.PayAli(res.data, data);
let
cbObj
=
{
TradeNo
:
res
.
data
,
OrderNo
:
data
.
OrderNo
,
OrderId
:
data
.
OrderId
,
preferPrice
:
data
.
PreferPrice
,
};
console
.
log
(
883
,
cbObj
);
this
.
payAliCallback
(
cbObj
);
console
.
log
(
884
);
}
else
{
uni
.
showToast
({
title
:
"获取交易号失败"
,
...
...
@@ -907,7 +916,7 @@ export default {
});
},
payAliCallback
(
obj
)
{
console
.
log
(
893
,
O
bj
);
console
.
log
(
893
,
o
bj
);
this
.
request2
(
{
url
:
"/api/AliPay/ALiPayCallBackDmcNotify"
,
...
...
@@ -925,11 +934,6 @@ export default {
uni
.
redirectTo
({
url
:
"/pages/jiuzhai/paysuccess?PreferPrice="
+
obj
.
PreferPrice
,
});
// setTimeout(() => {
// uni.redirectTo({
// url: "/pages/jiuzhai/jz_MyOrder",
// });
// }, 1000);
},
(
err
)
=>
{
console
.
log
(
"cb2"
,
err
);
...
...
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