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
3a8a3a32
Commit
3a8a3a32
authored
Oct 11, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Plain Diff
修改
parents
3862321f
bdd2af9b
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1369 additions
and
992 deletions
+1369
-992
style1.vue
components/educationteacher/style1.vue
+131
-98
style3.vue
components/goods/style3.vue
+250
-190
style4.vue
components/goods/style4.vue
+228
-179
style6.vue
components/goods/style6.vue
+251
-187
style7.vue
components/goods/style7.vue
+394
-261
jz_LineDetail.vue
pages/jiuzhai/jz_LineDetail.vue
+72
-54
jz_Reserve.vue
pages/jiuzhai/jz_Reserve.vue
+32
-2
detail.vue
pages/restaurant/detail.vue
+3
-17
detail.vue
pages/ticketCoupons/detail.vue
+8
-4
No files found.
components/educationteacher/style1.vue
View file @
3a8a3a32
<
template
>
<view
class=
"her-scoller"
:style=
"
{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : ''
}"
>
<view
class=
"good-five"
@
click=
"openGood(item)"
v-for=
"(item, gli) in goodList"
:key=
"gli"
:style=
"
{
border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
background: goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : ''
}"
>
<view
class=
"list-box"
>
<view
class=
"img-box"
>
<image
style=
"width: 100%; height: 100%; border-radius: 50%;"
mode=
"aspectFill"
:src=
"item.picUrl"
/>
</view>
<view
class=
"textone"
style=
"font-size: 14px;font-weight: bold;margin: 5px 0;"
>
{{
item
.
name
}}
</view>
<view
style=
"display: flex;align-items: center;margin-top: 5px;margin-bottom: 14px;"
>
<image
style=
"width: 23px; height: 15px;margin-right: 5px;"
mode=
"aspectFill"
:src=
"item.foreignersUrl"
/>
<text
>
{{
item
.
nationality
}}
</text>
</view>
<view
class=
"textone"
>
<text
v-for=
"(x, y) in item.lableNameList"
:key=
"y"
v-if=
"item.lableNameList!=null && item.lableNameList.length>0"
>
{{
x
}}{{
item
.
lableNameList
.
length
==
y
+
1
?
''
:
'、'
}}
</text>
<text
v-if=
"item.lableNameList==null || item.lableNameList.length==0"
>
教育
</text>
</view>
</view>
</view>
<good-sku
v-if=
"showSku"
:option-type=
"2"
borderRadius=
"20"
v-model=
"showSku"
:good=
"sku"
></good-sku>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
</view>
<view
class=
"her-scoller"
:style=
"
{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : '',
}"
>
<view
class=
"good-five"
@
click=
"openGood(item)"
v-for=
"(item, gli) in goodList"
:key=
"gli"
:style=
"
{
border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
background:
goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : '',
}"
>
<view
class=
"list-box"
>
<view
class=
"img-box"
>
<image
style=
"width: 100%; height: 100%; border-radius: 50%"
mode=
"aspectFill"
:src=
"item.picUrl"
/>
</view>
<view
class=
"textone"
style=
"font-size: 14px; font-weight: bold; margin: 5px 0"
>
{{
item
.
name
}}
</view
>
<view
style=
"
display: flex;
align-items: center;
margin-top: 5px;
margin-bottom: 14px;
"
>
<image
style=
"width: 23px; height: 15px; margin-right: 5px"
mode=
"aspectFill"
:src=
"item.foreignersUrl"
/>
<text>
{{
item
.
nationality
}}
</text>
</view>
<view
class=
"textone"
>
<text
v-for=
"(x, y) in item.lableNameList"
:key=
"y"
v-if=
"item.lableNameList != null && item.lableNameList.length > 0"
>
{{
x
}}{{
item
.
lableNameList
.
length
==
y
+
1
?
""
:
"、"
}}
</text>
<text
v-if=
"item.lableNameList == null || item.lableNameList.length == 0"
>
教育
</text>
</view>
</view>
</view>
<good-sku
v-if=
"showSku"
:option-type=
"2"
borderRadius=
"20"
v-model=
"showSku"
:good=
"sku"
></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
)
{
uni
.
navigateTo
({
url
:
'/pages/school/teacherDetails?ID='
+
item
.
id
});
},
}
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
)
{
uni
.
navigateTo
({
url
:
"/pages/school/teacherDetails?ID="
+
item
.
id
});
},
},
};
</
script
>
<
style
>
<
style
scoped
>
.her-scoller
{
overflow-x
:
auto
!important
;
padding
:
12px
;
/* display: flex; */
white-space
:
nowrap
;
overflow-x
:
auto
!important
;
padding
:
12px
;
/* display: flex; */
white-space
:
nowrap
;
}
/* .her-scoller::after {
clear: both;
...
...
@@ -90,31 +119,35 @@ export default {
display: block;
} */
.her-scoller
.good-five
{
position
:
relative
;
margin-right
:
12px
;
width
:
120px
;
border
:
1
rpx
solid
transparent
;
border-radius
:
10
rpx
;
padding
:
10px
;
display
:
inline-block
;
box-shadow
:
0
5px
10
upx
rgba
(
0
,
0
,
0
,
0.1
);
background
:
#FFF
;
/* float: left; */
position
:
relative
;
margin-right
:
12px
;
width
:
120px
;
border
:
1
rpx
solid
transparent
;
border-radius
:
10
rpx
;
padding
:
10px
;
display
:
inline-block
;
box-shadow
:
0
5px
10
upx
rgba
(
0
,
0
,
0
,
0.1
);
background
:
#fff
;
/* float: left; */
}
.her-scoller
.good-five
.img-box
{
width
:
40px
;
height
:
40px
;
border-radius
:
50%
;
width
:
40px
;
height
:
40px
;
border-radius
:
50%
;
}
.list-box
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
font-size
:
12px
;
color
:
#333F53
;
.list-box
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
font-size
:
12px
;
color
:
#333f53
;
}
.textone
{
width
:
100%
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
text-align
:
center
;
.textone
{
width
:
100%
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
text-align
:
center
;
}
</
style
>
components/goods/style3.vue
View file @
3a8a3a32
<
template
>
<div
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=
"4"
v-for=
"(item, gli) in goodList"
:key=
"gli"
>
<div
class=
"good-three"
@
click=
"openGood(item)"
:style=
"
{
border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
background: goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : ''
}"
>
<div
class=
"tips"
v-if=
"goodsInfo.showGoodsTag"
><image
:src=
"goodsInfo.goodsTagPicUrl"
mode=
"widthFix"
style=
"width:100%"
/></div>
<div
class=
"img-box"
>
<div
class=
"img-show"
>
<image
style=
"
<div
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=
"4"
v-for=
"(item, gli) in goodList"
:key=
"gli"
>
<div
class=
"good-three"
@
click=
"openGood(item)"
:style=
"
{
border:
goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
background:
goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2
? '#FFF'
: '',
}"
>
<div
class=
"tips"
v-if=
"goodsInfo.showGoodsTag"
>
<image
:src=
"goodsInfo.goodsTagPicUrl"
mode=
"widthFix"
style=
"width: 100%"
/>
</div>
<div
class=
"img-box"
>
<div
class=
"img-show"
>
<image
style=
"
width: 100%;
height: 100%;
border-radius: 10rpx 10rpx 0 0;
"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.picUrl"
/>
</div>
</div>
<div
class=
"good-info"
>
<div
class=
"good-name"
v-if=
"goodsInfo.showGoodsName"
>
{{
item
.
name
}}
</div>
<div
class=
"good-price-info"
>
<view
class=
"price"
:style=
"
{ color: mainColor }">
<span>
{{
goodsInfo
.
showGoodsPrice
?
getPrice
(
item
.
price
)
:
''
}}
</span>
<span
style=
'text-decoration: line-through;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.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>
</div>
</div>
</div>
</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>
</div>
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.picUrl"
/>
</div>
</div>
<div
class=
"good-info"
>
<div
class=
"good-name"
v-if=
"goodsInfo.showGoodsName"
>
{{
item
.
name
}}
</div>
<div
class=
"good-price-info"
>
<view
class=
"price"
:style=
"
{ color: mainColor }">
<span>
{{
goodsInfo
.
showGoodsPrice
?
getPrice
(
item
.
price
)
:
""
}}
</span>
<span
style=
"
text-decoration: line-through;
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.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>
</div>
</div>
</div>
</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>
</div>
</
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
;
console
.
log
(
"url3"
,
url
)
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
;
console
.
log
(
"url3"
,
url
);
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
>
<
style
scoped
>
.good-three
{
position
:
relative
;
margin-bottom
:
12px
;
border
:
1
rpx
solid
transparent
;
border-radius
:
10
rpx
;
overflow
:
hidden
;
padding-bottom
:
5px
;
position
:
relative
;
margin-bottom
:
12px
;
border
:
1
rpx
solid
transparent
;
border-radius
:
10
rpx
;
overflow
:
hidden
;
padding-bottom
:
5px
;
}
.good-three
.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-three
.img-box
{
width
:
100%
;
height
:
0
;
padding-top
:
100%
;
position
:
relative
;
width
:
100%
;
height
:
0
;
padding-top
:
100%
;
position
:
relative
;
}
.good-three
.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-three
.guding
{
position
:
relative
;
position
:
relative
;
}
.good-three
.guding
.img-box
{
position
:
absolute
;
left
:
0
;
right
:
0
;
bottom
:
0
;
top
:
0
;
position
:
absolute
;
left
:
0
;
right
:
0
;
bottom
:
0
;
top
:
0
;
}
.good-three
.good-info
{
padding
:
6
rpx
;
margin-top
:
-5px
;
padding-bottom
:
0
;
padding
:
6
rpx
;
margin-top
:
-5px
;
padding-bottom
:
0
;
}
.good-three
.good-info
.good-name
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
margin
:
3px
0
;
font-size
:
13px
;
word-break
:
break-all
;
height
:
37px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
margin
:
3px
0
;
font-size
:
13px
;
word-break
:
break-all
;
height
:
37px
;
}
.good-three
.good-info
.good-price-info
{
display
:
flex
;
justify-items
:
center
;
align-items
:
center
;
display
:
flex
;
justify-items
:
center
;
align-items
:
center
;
}
.good-three
.good-info
.good-price-info
.price
{
color
:
#ff4544
;
flex
:
1
;
font-size
:
14px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
display
:
flex
;
flex-direction
:
column
;
color
:
#ff4544
;
flex
:
1
;
font-size
:
14px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
display
:
flex
;
flex-direction
:
column
;
}
.good-three
.good-info
.good-price-info
.buy
{
width
:
24px
;
text-align
:
right
;
width
:
24px
;
text-align
:
right
;
}
</
style
>
components/goods/style4.vue
View file @
3a8a3a32
<
template
>
<view
style=
"padding: 12px; padding-bottom: 0;width:100%;min-height:450rpx;"
:style=
"
{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : ''
}"
>
<view
class=
"good-four"
v-for=
"(item, gli) in goodList"
:key=
"gli"
@
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"
><image
style=
"width: 100%; height: 100%;"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.picUrl"
/></view>
<view
class=
"good-info"
>
<view
class=
"good-name"
v-if=
"goodsInfo.showGoodsName"
>
{{
item
.
name
}}
</view>
<view
class=
"good-price-info"
>
<view
class=
"price"
:style=
"
{ color: mainColor }">
{{
goodsInfo
.
showGoodsPrice
?
getPrice
(
item
.
price
)
:
''
}}
</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.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>
<good-sku
v-if=
"showSku"
:option-type=
"2"
borderRadius=
"20"
v-model=
"showSku"
:good=
"sku"
></good-sku>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
</view>
<view
style=
"padding: 12px; padding-bottom: 0; width: 100%; min-height: 450rpx"
:style=
"
{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : '',
}"
>
<view
class=
"good-four"
v-for=
"(item, gli) in goodList"
:key=
"gli"
@
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"
><image
style=
"width: 100%; height: 100%"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.picUrl"
/></view>
<view
class=
"good-info"
>
<view
class=
"good-name"
v-if=
"goodsInfo.showGoodsName"
>
{{
item
.
name
}}
</view>
<view
class=
"good-price-info"
>
<view
class=
"price"
:style=
"
{ color: mainColor }">
{{
goodsInfo
.
showGoodsPrice
?
getPrice
(
item
.
price
)
:
""
}}
</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.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>
<good-sku
v-if=
"showSku"
:option-type=
"2"
borderRadius=
"20"
v-model=
"showSku"
:good=
"sku"
></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
;
console
.
log
(
"url4"
,
url
)
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
;
}
//格式化价格添加.00
// getPrice(value){
// var html,_val;
// value =Number(value).toFixed(2);
// if(value==0){
// value=0;
// return html = "¥0";
// }else if(value.split('.')[1].substring(1)==0){
// value = Number(value).toFixed(2);
// }
// _val = value.split('.');
// return html = '¥'+_val[0]+'.'+_val[1];
// }
}
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
;
console
.
log
(
"url4"
,
url
);
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
;
},
//格式化价格添加.00
// getPrice(value){
// var html,_val;
// value =Number(value).toFixed(2);
// if(value==0){
// value=0;
// return html = "¥0";
// }else if(value.split('.')[1].substring(1)==0){
// value = Number(value).toFixed(2);
// }
// _val = value.split('.');
// return html = '¥'+_val[0]+'.'+_val[1];
// }
},
};
</
script
>
<
style
>
<
style
scoped
>
.good-four
{
position
:
relative
;
margin-bottom
:
14px
;
display
:
flex
;
height
:
102px
;
border
:
1
rpx
solid
transparent
;
border-radius
:
10
rpx
;
box-sizing
:
border-box
;
padding
:
0
1px
1px
0
;
overflow
:
hidden
;
position
:
relative
;
margin-bottom
:
14px
;
display
:
flex
;
height
:
102px
;
border
:
1
rpx
solid
transparent
;
border-radius
:
10
rpx
;
box-sizing
:
border-box
;
padding
:
0
1px
1px
0
;
overflow
:
hidden
;
}
.good-four
.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-four
.img-box
{
width
:
100px
;
height
:
100px
;
width
:
100px
;
height
:
100px
;
}
.good-four
.good-info
{
padding
:
12px
;
flex
:
1
;
width
:
1
rpx
;
border
:
10
rpx
;
padding-bottom
:
0
;
display
:
flex
;
flex-direction
:
column
;
/* width:20%; */
padding
:
12px
;
flex
:
1
;
width
:
1
rpx
;
border
:
10
rpx
;
padding-bottom
:
0
;
display
:
flex
;
flex-direction
:
column
;
/* width:20%; */
}
.good-four
.good-info
.good-name
{
font-size
:
13px
;
height
:
34px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
font-size
:
13px
;
height
:
34px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
}
.good-four
.good-info
.good-price-info
{
display
:
flex
;
justify-items
:
center
;
align-items
:
flex-end
;
height
:
22px
;
flex
:
1
;
padding-bottom
:
10
rpx
;
display
:
flex
;
justify-items
:
center
;
align-items
:
flex-end
;
height
:
22px
;
flex
:
1
;
padding-bottom
:
10
rpx
;
}
.good-four
.good-info
.good-price-info
.price
{
color
:
#ff4544
;
flex
:
1
;
font-size
:
14px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
color
:
#ff4544
;
flex
:
1
;
font-size
:
14px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
.good-four
.good-info
.good-price-info
.buy
{
width
:
24px
;
text-align
:
right
;
width
:
24px
;
text-align
:
right
;
}
</
style
>
components/goods/style6.vue
View file @
3a8a3a32
<
template
>
<view
style=
"padding: 12px; padding-bottom: 0;width:100%;"
:style=
"
{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : ''
}">
<view
class=
"good-four"
v-for=
"(item, gli) in goodList"
:key=
"gli"
@
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"
>
<image
style=
"width: 100%; height: 100%;"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.picUrl"
/>
</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-price-info"
>
<view
class=
"price"
:style=
"
{ color: mainColor }">
{{
goodsInfo
.
showGoodsPrice
?
getPrice
(
item
.
price
)
:
''
}}
<!--
<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.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>
<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
style=
"padding: 12px; padding-bottom: 0; width: 100%"
:style=
"
{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : '',
}"
>
<view
class=
"good-four"
v-for=
"(item, gli) in goodList"
:key=
"gli"
@
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"
>
<image
style=
"width: 100%; height: 100%"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.picUrl"
/>
</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-price-info"
>
<view
class=
"price"
:style=
"
{ color: mainColor }"
>
{{
goodsInfo
.
showGoodsPrice
?
getPrice
(
item
.
price
)
:
""
}}
<!--
<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.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>
<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'
;
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
;
console
.
log
(
"url6"
,
url
)
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
;
}
}
};
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
;
console
.
log
(
"url6"
,
url
);
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-four
{
position
:
relative
;
margin-bottom
:
14px
;
display
:
flex
;
height
:
102px
;
border
:
1
rpx
solid
transparent
;
border-radius
:
10
rpx
;
box-sizing
:
border-box
;
padding
:
0
1px
1px
0
;
overflow
:
hidden
;
}
<
style
scoped
>
.good-four
{
position
:
relative
;
margin-bottom
:
14px
;
display
:
flex
;
height
:
102px
;
border
:
1
rpx
solid
transparent
;
border-radius
:
10
rpx
;
box-sizing
:
border-box
;
padding
:
0
1px
1px
0
;
overflow
:
hidden
;
}
.good-four
.tips
{
width
:
64
rpx
;
height
:
64
rpx
;
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
4
;
}
.good-four
.tips
{
width
:
64
rpx
;
height
:
64
rpx
;
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
4
;
}
.good-four
.img-box
{
width
:
100px
;
height
:
100px
;
}
.good-four
.img-box
{
width
:
100px
;
height
:
100px
;
}
.good-four
.good-info
{
padding
:
12px
;
flex
:
1
;
width
:
1
rpx
;
border
:
10
rpx
;
padding-bottom
:
0
;
display
:
flex
;
flex-direction
:
column
;
/* width:20%; */
}
.good-four
.good-info
{
padding
:
12px
;
flex
:
1
;
width
:
1
rpx
;
border
:
10
rpx
;
padding-bottom
:
0
;
display
:
flex
;
flex-direction
:
column
;
/* width:20%; */
}
.good-four
.good-info
.good-name
{
font-size
:
13px
;
height
:
34px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
}
.good-four
.good-info
.good-name
{
font-size
:
13px
;
height
:
34px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
}
.good-four
.good-info
.good-price-info
{
display
:
flex
;
justify-items
:
center
;
align-items
:
flex-end
;
height
:
22px
;
flex
:
1
;
padding-bottom
:
10
rpx
;
}
.good-four
.good-info
.good-price-info
{
display
:
flex
;
justify-items
:
center
;
align-items
:
flex-end
;
height
:
22px
;
flex
:
1
;
padding-bottom
:
10
rpx
;
}
.good-four
.good-info
.good-price-info
.price
{
color
:
#ff4544
;
flex
:
1
;
font-size
:
14px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
.good-four
.good-info
.good-price-info
.price
{
color
:
#ff4544
;
flex
:
1
;
font-size
:
14px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
.good-four
.good-info
.good-price-info
.buy
{
width
:
24px
;
text-align
:
right
;
}
.
.good-four
.good-info
.good-sub-name
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
/* -webkit-line-clamp: 2;
.good-four
.good-info
.good-price-info
.buy
{
width
:
24px
;
text-align
:
right
;
}
.
.good-four
.good-info
.good-sub-name
{
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; */
}
</
style
>
components/goods/style7.vue
View file @
3a8a3a32
<
template
>
<view
style=
"padding:0 15px;width:100%;"
:style=
"
{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : ''
}">
<view
class=
"good-seven"
v-for=
"(item, gli) in goodList"
:key=
"gli"
@
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"
>
<template
v-if=
"item.imglist&&item.imglist.length==1"
>
<image
class=
"img-0"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.imglist[0]"
/>
<image
class=
"img-1"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.imglist[0]"
/>
<image
class=
"img-2"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.imglist[0]"
/>
</
template
>
<
template
v-if=
"item.imglist&&item.imglist.length==2"
>
<image
class=
"img-0"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.imglist[0]"
/>
<image
class=
"img-1"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.imglist[1]"
/>
<image
class=
"img-2"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.imglist[0]"
/>
</
template
>
<
template
v-if=
"item.imglist&&item.imglist.length>=3"
>
<image
class=
"img-0"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.imglist[0]"
/>
<image
class=
"img-1"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.imglist[1]"
/>
<image
class=
"img-2"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.imglist[2]"
/>
</
template
>
</view>
<view
class=
"good-info"
>
<view
class=
"good-name"
v-if=
"goodsInfo.showGoodsName"
>
{{ item.name }}
</view>
<view
class=
"sencond-title"
v-if=
"item.subname"
>
{{item.subname}}
</view>
<view
class=
"good-price-info"
>
<view
style=
"display:none;"
>
<u-rate
:current=
"item.courseScore!=null &&item.courseScore>0?item.courseScore:'5'"
:active-color=
"mainColor"
inactive-color=
"#DDDDDD"
active-icon=
"star"
inactive-icon=
"star-o"
size=
"34"
:disabled=
"true"
></u-rate>
<text
class=
"good-rb-text"
>
{{item.courseScore!=null
&&
item.courseScore>0?item.courseScore.toFixed(1):'5.0'}}分
</text>
</view>
<view
class=
"price"
:style=
"{ color: mainColor }"
v-if=
"item.price>0 && goodsInfo.showGoodsPrice"
>
{{ goodsInfo.showGoodsPrice ? getPrice(item.price) : '' }}
<span
style=
'text-decoration: line-through;margin-left: 3px;font-size: 10px;color: gray;font-family: aa;'
>
原价:{{goodsInfo.showGoodsPrice ? getPrice(item.OriginalPrice) : ''}}
</span>
</view>
<view
class=
"price"
v-else-if=
"goodsInfo.showGoodsPrice"
style=
"font-size:13px;color:#999999"
>
免费
</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.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>
<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
style=
"padding: 0 15px; width: 100%"
:style=
"
{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : '',
}"
>
<view
class=
"good-seven"
v-for=
"(item, gli) in goodList"
:key=
"gli"
@
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"
>
<template
v-if=
"item.imglist && item.imglist.length == 1"
>
<image
class=
"img-0"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.imglist[0]"
/>
<image
class=
"img-1"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.imglist[0]"
/>
<image
class=
"img-2"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.imglist[0]"
/>
</
template
>
<
template
v-if=
"item.imglist && item.imglist.length == 2"
>
<image
class=
"img-0"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.imglist[0]"
/>
<image
class=
"img-1"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.imglist[1]"
/>
<image
class=
"img-2"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.imglist[0]"
/>
</
template
>
<
template
v-if=
"item.imglist && item.imglist.length >= 3"
>
<image
class=
"img-0"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.imglist[0]"
/>
<image
class=
"img-1"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.imglist[1]"
/>
<image
class=
"img-2"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.imglist[2]"
/>
</
template
>
</view>
<view
class=
"good-info"
>
<view
class=
"good-name"
v-if=
"goodsInfo.showGoodsName"
>
{{ item.name }}
</view>
<view
class=
"sencond-title"
v-if=
"item.subname"
>
{{
item.subname
}}
</view>
<view
class=
"good-price-info"
>
<view
style=
"display: none"
>
<u-rate
:current=
"
item.courseScore != null && item.courseScore > 0
? item.courseScore
: '5'
"
:active-color=
"mainColor"
inactive-color=
"#DDDDDD"
active-icon=
"star"
inactive-icon=
"star-o"
size=
"34"
:disabled=
"true"
></u-rate>
<text
class=
"good-rb-text"
>
{{
item.courseScore != null
&&
item.courseScore > 0
? item.courseScore.toFixed(1)
: "5.0"
}}分
</text
>
</view>
<view
class=
"price"
:style=
"{ color: mainColor }"
v-if=
"item.price > 0 && goodsInfo.showGoodsPrice"
>
{{ goodsInfo.showGoodsPrice ? getPrice(item.price) : "" }}
<span
style=
"
text-decoration: line-through;
margin-left: 3px;
font-size: 10px;
color: gray;
font-family: aa;
"
>
原价:{{
goodsInfo.showGoodsPrice ? getPrice(item.OriginalPrice) : ""
}}
</span
>
</view>
<view
class=
"price"
v-else-if=
"goodsInfo.showGoodsPrice"
style=
"font-size: 13px; color: #999999"
>
免费
</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.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>
<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'
;
export
default
{
components
:
{
goodSku
,
auth
},
props
:
[
'goodList'
,
'goodsInfo'
],
data
()
{
return
{
mainColor
:
''
,
activeKey
:
0
,
showSku
:
false
,
sku
:
{},
showAuth
:
false
,
u
:
{},
IsEducation
:
1
};
},
created
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
IsEducation
=
uni
.
getStorageSync
(
'basedata'
)
?
(
uni
.
getStorageSync
(
'basedata'
).
mall
.
setting
.
mallStyle
.
IsEducation
?
uni
.
getStorageSync
(
'basedata'
).
mall
.
setting
.
mallStyle
.
IsEducation
:
0
)
:
0
;
},
methods
:
{
openGood
(
item
)
{
//线路
if
(
item
.
goodType
==
4
)
{
var
url
=
"/pages/jiuzhai/jz_LineDetail?tcid="
+
item
.
id
+
'&configId='
+
item
.
subid
;
console
.
log
(
"url7"
,
url
)
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
;
}
}
};
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
:
{},
IsEducation
:
1
,
};
},
created
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
IsEducation
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
.
mallStyle
.
IsEducation
?
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
.
mallStyle
.
IsEducation
:
0
:
0
;
},
methods
:
{
openGood
(
item
)
{
//线路
if
(
item
.
goodType
==
4
)
{
var
url
=
"/pages/jiuzhai/jz_LineDetail?tcid="
+
item
.
id
+
"&configId="
+
item
.
subid
;
console
.
log
(
"url7"
,
url
);
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-seven
{
position
:
relative
;
margin-bottom
:
14px
;
display
:
flex
;
/* height: 102px; */
border
:
1
rpx
solid
transparent
;
border-radius
:
10
rpx
;
box-sizing
:
border-box
;
padding
:
0
1px
1px
0
;
overflow
:
hidden
;
padding-bottom
:
14px
;
border-bottom
:
1px
solid
#e2e2e2
;
}
<
style
scoped
>
.good-seven
{
position
:
relative
;
margin-bottom
:
14px
;
display
:
flex
;
/* height: 102px; */
border
:
1
rpx
solid
transparent
;
border-radius
:
10
rpx
;
box-sizing
:
border-box
;
padding
:
0
1px
1px
0
;
overflow
:
hidden
;
padding-bottom
:
14px
;
border-bottom
:
1px
solid
#e2e2e2
;
}
.good-seven
:last-child
{
padding-bottom
:
0
;
border-bottom
:
none
;
}
.good-seven
:last-child
{
padding-bottom
:
0
;
border-bottom
:
none
;
}
.good-seven
.tips
{
width
:
64
rpx
;
height
:
64
rpx
;
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
4
;
}
.good-seven
.tips
{
width
:
64
rpx
;
height
:
64
rpx
;
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
4
;
}
.good-seven
.img-box
{
width
:
266
rpx
;
height
:
260
rpx
;
overflow
:
hidden
;
position
:
relative
;
border-radius
:
20
rpx
;
}
.good-seven
.img-box
{
width
:
266
rpx
;
height
:
260
rpx
;
overflow
:
hidden
;
position
:
relative
;
border-radius
:
20
rpx
;
}
.good-seven
.img-box
.img-0
{
width
:
200
rpx
;
border-radius
:
20
rpx
;
overflow
:
hidden
;
position
:
absolute
;
left
:
0
;
top
:
0
;
height
:
260
rpx
;
z-index
:
3
;
}
.good-seven
.img-box
.img-0
{
width
:
200
rpx
;
border-radius
:
20
rpx
;
overflow
:
hidden
;
position
:
absolute
;
left
:
0
;
top
:
0
;
height
:
260
rpx
;
z-index
:
3
;
}
.good-seven
.img-box
.img-1
{
width
:
200
rpx
;
border-radius
:
20
rpx
;
overflow
:
hidden
;
position
:
absolute
;
left
:
40
rpx
;
top
:
20
rpx
;
height
:
220
rpx
;
opacity
:
0.6
;
z-index
:
2
;
}
.good-seven
.img-box
.img-1
{
width
:
200
rpx
;
border-radius
:
20
rpx
;
overflow
:
hidden
;
position
:
absolute
;
left
:
40
rpx
;
top
:
20
rpx
;
height
:
220
rpx
;
opacity
:
0.6
;
z-index
:
2
;
}
.good-seven
.img-box
.img-2
{
width
:
200
rpx
;
border-radius
:
20
rpx
;
overflow
:
hidden
;
position
:
absolute
;
left
:
66
rpx
;
top
:
40
rpx
;
height
:
180
rpx
;
opacity
:
0.3
;
z-index
:
1
;
}
.good-seven
.img-box
.img-2
{
width
:
200
rpx
;
border-radius
:
20
rpx
;
overflow
:
hidden
;
position
:
absolute
;
left
:
66
rpx
;
top
:
40
rpx
;
height
:
180
rpx
;
opacity
:
0.3
;
z-index
:
1
;
}
.good-seven
.good-info
{
padding-left
:
12px
;
flex
:
1
;
width
:
1
rpx
;
border
:
10
rpx
;
padding-bottom
:
0
;
display
:
flex
;
flex-direction
:
column
;
/* width:20%; */
}
.good-seven
.good-info
{
padding-left
:
12px
;
flex
:
1
;
width
:
1
rpx
;
border
:
10
rpx
;
padding-bottom
:
0
;
display
:
flex
;
flex-direction
:
column
;
/* width:20%; */
}
.good-seven
.good-info
.good-name
{
font-size
:
30
rpx
;
max-height
:
80
rpx
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
color
:
#111
;
}
.good-seven
.good-info
.good-name
{
font-size
:
30
rpx
;
max-height
:
80
rpx
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
color
:
#111
;
}
.good-seven
.good-info
.good-price-info
{
display
:
flex
;
justify-items
:
center
;
justify-content
:
space-between
;
align-items
:
flex-end
;
height
:
10px
;
flex
:
1
;
padding-bottom
:
10
rpx
;
}
.good-seven
.good-info
.good-price-info
{
display
:
flex
;
justify-items
:
center
;
justify-content
:
space-between
;
align-items
:
flex-end
;
height
:
10px
;
flex
:
1
;
padding-bottom
:
10
rpx
;
}
.good-seven
.good-info
.sencond-title
{
font-size
:
24
rpx
;
font-weight
:
500
;
color
:
#999999
;
line-height
:
32
rpx
;
margin-top
:
5px
;
text-overflow
:
-o-ellipsis-lastline
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
3
;
line-clamp
:
3
;
-webkit-box-orient
:
vertical
;
}
.good-seven
.good-info
.sencond-title
{
font-size
:
24
rpx
;
font-weight
:
500
;
color
:
#999999
;
line-height
:
32
rpx
;
margin-top
:
5px
;
text-overflow
:
-o-ellipsis-lastline
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
3
;
line-clamp
:
3
;
-webkit-box-orient
:
vertical
;
}
.good-seven
.good-rb-text
{
font-size
:
32
rpx
;
color
:
#999999
;
margin-left
:
2px
;
}
.good-seven
.good-rb-text
{
font-size
:
32
rpx
;
color
:
#999999
;
margin-left
:
2px
;
}
.good-seven
.good-info
.good-price-info
.price
{
color
:
#ff4544
;
font-size
:
14px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
.good-seven
.good-info
.good-price-info
.price
{
color
:
#ff4544
;
font-size
:
14px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
.good-seven
.good-info
.good-price-info
.buy
{
width
:
24px
;
text-align
:
right
;
}
.good-seven
.good-info
.good-price-info
.buy
{
width
:
24px
;
text-align
:
right
;
}
</
style
>
pages/jiuzhai/jz_LineDetail.vue
View file @
3a8a3a32
...
...
@@ -42,21 +42,20 @@
</view>
</view>
</view>
<!-- #ifdef MP-WEIXIN -->
<view
@
click=
"goback"
:style=
"[titleStyle,
{ opacity: '100% !important' }]"
style="position: fixed; top: 0; left: 0; padding-left: 6rpx"
>
<!-- #ifdef MP-WEIXIN -->
<u-icon
name=
"arrow-left"
size=
"44"
color=
"#FFF"
style=
"margin-top: 22rpx"
></u-icon>
<!-- #endif -->
</view>
<!-- #endif -->
</view>
<view
class=
"top-title"
:style=
"[titleStyle]"
>
<view
@
click=
"goback"
>
...
...
@@ -99,7 +98,7 @@
>
2728人出游
</text
>
</view>
<!--
<view
class=
"jz_OrderNow"
@
click=
"downloadFile"
>
下载
</view>
<!--
<view
class=
"jz_OrderNow"
@
click=
"downloadFile"
>
下载
</view>
<view
class=
"jz_OrderNow"
@
click=
"downloadFile2"
>
下载2
</view>
-->
<view
class=
"jz_MainTitle"
>
<text
v-if=
"dataList.title"
>
{{
dataList
.
title
}}
</text>
...
...
@@ -892,12 +891,11 @@
<view
class=
"jz_OrderDiv"
>
<view
style=
"color: #ff3166; font-weight: bold"
>
<text
style=
"font-size: 22rpx"
>
¥
</text>
<text
style=
"font-size: 40rpx"
>
{{
$utils.getretailer() == true
<!-- b2b -->
? currentPrice.b2CPrice
: currentPrice.b2CPrice
}}
</text>
<text
style=
"font-size: 40rpx"
>
{{ $utils.getretailer() == true
<!-- b2b -->
? currentPrice.b2CPrice : currentPrice.b2CPrice }}
</text
>
<text
style=
"font-size: 22rpx"
>
/起
</text>
</view>
<view
style=
"display: flex; align-items: center"
>
...
...
@@ -984,55 +982,75 @@ export default {
that
.
titleStyle
=
{
height
:
"45px"
,
paddingTop
:
`
${
res
.
statusBarHeight
}
px`
,
opacity
:
"0"
,
opacity
:
0
,
};
},
});
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
},
methods
:
{
downloadFile
(){
let
msg
=
{
"configId"
:
"7274"
,
"cityId"
:
"0"
,
"tcid"
:
"11409"
,
"orderId"
:
"0"
,
"FileName"
:
"2021-10-11飞猪平台九寨沟3天2晚3日游"
,
"isShowBase"
:
1
,
"isShowFlight"
:
1
,
"isShowFeature"
:
1
,
"isShowFee"
:
1
,
"isShowShop"
:
1
,
"isShowTip"
:
1
,
"isShowB2B"
:
1
,
"isShowTrip"
:
1
,
"isShowTitle"
:
0
,
"isShowGuest"
:
0
,
"isShowMan"
:
1
,
"isShowTCNUM"
:
1
,
"isShowTripImage"
:
1
,
"isShowVisa"
:
1
,
"isShowVideoImg"
:
1
,
"isPc"
:
2
,
"templateId"
:
3
,
"UId"
:
615
}
this
.
apipostDownload
(
"GetWebHtmlTwo_V2"
,
msg
,
(
res
)
=>
{
console
.
log
(
res
)
let
url
=
"https://reborn.oytour.com"
+
res
.
data
uni
.
downloadFile
({
url
:
url
,
success
:
(
res
)
=>
{
if
(
res
.
statusCode
===
200
)
{
console
.
log
(
'下载成功'
);
}
}
});
})
}
,
downloadFile2
(){
let
url
=
"https://reborn.oytour.com/Upload/Temporary/C7274_T11409_CTY0_OD0_MMDD637695432017412893_1_1.pdf"
uni
.
downloadFile
({
url
:
url
,
success
:
(
res
)
=>
{
console
.
log
(
'suc'
,
res
);
if
(
res
.
statusCode
===
200
)
{
console
.
log
(
'下载成功'
);
const
tempFilePath
=
res
.
tempFilePath
//返回的文件临时地址,用于后面打开本地预览所用
wx
.
openDocument
({
filePath
:
tempFilePath
,
showMenu
:
true
,
fileType
:
"pdf"
,
success
:
function
(
res
)
{}
})
}
},
fail
(
err
){
console
.
log
(
'err'
,
err
);
}
});
},
downloadFile
()
{
let
msg
=
{
configId
:
"7274"
,
cityId
:
"0"
,
tcid
:
"11409"
,
orderId
:
"0"
,
FileName
:
"2021-10-11飞猪平台九寨沟3天2晚3日游"
,
isShowBase
:
1
,
isShowFlight
:
1
,
isShowFeature
:
1
,
isShowFee
:
1
,
isShowShop
:
1
,
isShowTip
:
1
,
isShowB2B
:
1
,
isShowTrip
:
1
,
isShowTitle
:
0
,
isShowGuest
:
0
,
isShowMan
:
1
,
isShowTCNUM
:
1
,
isShowTripImage
:
1
,
isShowVisa
:
1
,
isShowVideoImg
:
1
,
isPc
:
2
,
templateId
:
3
,
UId
:
615
,
};
this
.
apipostDownload
(
"GetWebHtmlTwo_V2"
,
msg
,
(
res
)
=>
{
console
.
log
(
res
);
let
url
=
"https://reborn.oytour.com"
+
res
.
data
;
uni
.
downloadFile
({
url
:
url
,
success
:
(
res
)
=>
{
if
(
res
.
statusCode
===
200
)
{
console
.
log
(
"下载成功"
);
}
},
});
});
},
downloadFile2
()
{
let
url
=
"https://reborn.oytour.com/Upload/Temporary/C7274_T11409_CTY0_OD0_MMDD637695432017412893_1_1.pdf"
;
uni
.
downloadFile
({
url
:
url
,
success
:
(
res
)
=>
{
console
.
log
(
"suc"
,
res
);
if
(
res
.
statusCode
===
200
)
{
console
.
log
(
"下载成功"
);
const
tempFilePath
=
res
.
tempFilePath
;
//返回的文件临时地址,用于后面打开本地预览所用
wx
.
openDocument
({
filePath
:
tempFilePath
,
showMenu
:
true
,
fileType
:
"pdf"
,
success
:
function
(
res
)
{},
});
}
},
fail
(
err
)
{
console
.
log
(
"err"
,
err
);
},
});
},
openOrderPreview
()
{
if
(
this
.
canCreateOrder
&&
this
.
finishFirstLoad
)
{
this
.
showOrderPreviwe
=
true
;
...
...
@@ -1263,7 +1281,7 @@ export default {
encodeURIComponent
(
this
.
dataList
.
feature
.
importantTipText
),
});
},
// #ifdef MP-WEIXIN
//分享朋友圈
onShareTimeline
()
{
...
...
pages/jiuzhai/jz_Reserve.vue
View file @
3a8a3a32
...
...
@@ -864,13 +864,43 @@ export default {
},
(
res
)
=>
{
this
.
orderInfo
=
JSON
.
parse
(
res
.
data
);
// this.PayAli(OrderId);
if
(
res
.
data
)
{
this
.
PayAli
(
res
.
data
);
}
else
{
uni
.
showToast
({
title
:
"获取交易号失败"
,
duration
:
2000
,
});
}
console
.
log
(
873
,
res
);
}
);
},
PayAli
(
OrderId
)
{
PayAli
(
tradeNO
)
{
let
that
=
this
;
my
.
tradePay
({
tradeNO
:
tradeNO
,
success
:
function
(
res
)
{
console
.
log
(
"success"
,
res
);
uni
.
showToast
({
title
:
"支付成功"
,
});
setTimeout
(()
=>
{
uni
.
redirectTo
({
url
:
"/pages/jiuzhai/paysuccess?PreferPrice="
+
price
,
});
},
100
);
},
fail
:
function
(
err
)
{
console
.
log
(
"fail:"
,
err
);
uni
.
showToast
({
title
:
"支付失败"
,
icon
:
"none"
,
});
},
});
return
;
uni
.
requestPayment
({
provider
:
"wxpay"
,
timeStamp
:
this
.
orderInfo
.
timeStamp
,
...
...
pages/restaurant/detail.vue
View file @
3a8a3a32
...
...
@@ -16,21 +16,20 @@
name=
"picUrl"
v-if=
"active == 1"
></u-swiper>
<!-- #ifdef MP-WEIXIN -->
<view
@
click=
"goback"
:style=
"[titleStyle,
{ opacity: '100% !important' }]"
style="position: fixed; top: 0; left: 0; padding-left: 6rpx"
>
<!-- #ifdef MP-WEIXIN -->
<u-icon
name=
"arrow-left"
size=
"44"
color=
"#FFF"
style=
"margin-top: 22rpx"
></u-icon>
<!-- #endif -->
</view>
<!-- #endif -->
</view>
<view
class=
"restaurant-title"
:style=
"[titleStyle]"
>
<view
@
click=
"goback"
>
...
...
@@ -284,20 +283,7 @@ import calendar from "./components/uni-calendar/uni-calendar.vue";
export
default
{
data
()
{
return
{
imgsList
:
[
// {
// picUrl: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1622459632000_216.png"
// },
// {
// picUrl: "https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg"
// },
// {
// picUrl: "https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg"
// },
// {
// picUrl: "https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg"
// }
],
imgsList
:
[],
ID
:
0
,
details
:
{},
typeList
:
[
...
...
pages/ticketCoupons/detail.vue
View file @
3a8a3a32
...
...
@@ -17,6 +17,7 @@
"
:style=
"
{ opacity: 100 - boxOption + '%' }"
>
<!-- #ifdef MP-WEIXIN -->
<view
@
click=
"goback"
:style=
"[titleStyle,
{ opacity: '100% !important' }]"
...
...
@@ -28,15 +29,14 @@
padding-left: 6rpx;
"
>
<!-- #ifdef MP-WEIXIN -->
<u-icon
name=
"arrow-left"
size=
"44"
color=
"#ffffff"
style=
"margin-top: 22rpx"
></u-icon>
<!-- #endif -->
</view>
<!-- #endif -->
<image
class=
"banner-img"
:src=
"details.AllPicList[0].TagPicList[0].Path"
...
...
@@ -232,7 +232,7 @@
:class=
"
{ 'last-item': index == TicketList.length - 1 }"
v-if="TicketList.length > 0"
>
<view
class=
"ticket-key"
>
<view
class=
"ticket-key"
v-if=
"item.Key"
>
{{
item
.
Key
}}
</view>
<view
class=
"ticket-list"
>
...
...
@@ -553,7 +553,7 @@ export default {
that
.
titleStyle
=
{
height
:
"45px"
,
paddingTop
:
`
${
res
.
statusBarHeight
}
px`
,
opacity
:
"0"
,
opacity
:
0
,
};
},
});
...
...
@@ -1197,6 +1197,10 @@ export default {
position
:
relative
;
.TicketName
{
max-width
:
450rpx
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
font-size
:
28rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
...
...
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