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
79748862
Commit
79748862
authored
Oct 11, 2021
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/zk123/jz_travel
# Conflicts: # components/goods/style1.vue
parents
eb9cb869
3a8a3a32
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
730 additions
and
799 deletions
+730
-799
list.vue
components/goods/list.vue
+30
-37
style1.vue
components/goods/style1.vue
+178
-215
style2.vue
components/goods/style2.vue
+203
-249
style5.vue
components/goods/style5.vue
+215
-230
jz_Line.vue
pages/jiuzhai/jz_Line.vue
+11
-5
jz_LineDetail.vue
pages/jiuzhai/jz_LineDetail.vue
+3
-3
search.vue
pages/search/search.vue
+90
-60
No files found.
components/goods/list.vue
View file @
79748862
...
...
@@ -2,35 +2,23 @@
<view
class=
"u-good-list"
>
<u-row
gutter=
"20"
>
<u-col
span=
"6"
v-for=
"(cx, ci) in g"
:key=
"ci"
>
<view
class=
"good"
@
click=
"
click
Handler(cx)"
>
<view
class=
"good"
@
click=
"
showSku
Handler(cx)"
>
<view
class=
"good-img"
>
<image
mode=
"aspectFill"
:src=
"cx.cover_pic"
style=
"width: 100%; height: 100%;"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/plugins-out.png"
v-if=
"cx.totalStock==0&&setting.is_show_korea&&setting.is_show_korea==0"
style=
"width: 100%; height: 100%;position: absolute;left:0;top:0;background: #000;opacity: 0.6;"
/>
<image
mode=
"aspectFill"
:src=
"getImgs(cx.imgCover)"
style=
"width: 100%; height: 100%;"
>
</image>
</view>
<view
class=
"good-name"
v-if=
"setting.is_show_goods_name==1"
>
<view
v-if=
"cx.marketingLogo.iswords && cx.marketingLogo.iswords==1&& cx.marketingLogo.words!=''"
class=
"Logo"
:style=
"
{color: cx.marketingLogo.wordsColor,
background:cx.marketingLogo.wordsBack ,}">
{{
cx
.
marketingLogo
.
words
}}
</view>
<image
v-if=
"cx.marketingLogo.iswords&&cx.marketingLogo.iswords==2&& cx.marketingLogo.ico!=''"
mode=
"heightFix"
:src=
"cx.marketingLogo.ico"
style=
" height: 12px;margin-right: 5px"
/>
<view
style=
"color: #FF4048;background: #fdf6ec;padding: 0 5px;display: inline-block;height: 32rpx;font-size: 20rpx;margin-right: 5rpx;"
v-if=
"cx.freeShippingFullMoneyPinkage>0 || cx.freeShippingFullNumPinkage>0"
>
{{
cx
.
freeShippingFullMoneyPinkage
>
0
&&
cx
.
freeShippingFullNumPinkage
==
0
?
cx
.
freeShippingFullMoneyPinkage
+
'元包邮'
:
''
}}
{{
cx
.
freeShippingFullMoneyPinkage
==
0
&&
cx
.
freeShippingFullNumPinkage
>
0
?
cx
.
freeShippingFullNumPinkage
+
'件包邮'
:
''
}}
</view>
{{
cx
.
name
}}
<view
class=
"good-name"
>
{{
cx
.
title
}}
</view>
<view
class=
"goodsSubName"
v-if=
"setting&&setting.is_show_korea==1"
>
卖点:
<text
v-if=
"cx.subName"
>
{{
cx
.
subName
}}
</text>
<view
class=
"goodsSubName"
>
<text
v-if=
"cx.productRecommend"
>
{{
cx
.
productRecommend
}}
</text>
</view>
<view
class=
"good-info"
v-if=
"setting&&setting.is_show_korea==0"
>
<view
class=
"price"
:style=
"
{ color: mainColor }">¥
{{
cx
.
price
}}
</view>
<view
class=
"sell"
>
{{
cx
.
sales
}}
</view>
<view
v-if=
"setting.is_show_cart==1"
class=
"cart"
@
click
.
stop=
"showSkuHandler(cx)"
>
<u-icon
name=
"cart-o"
size=
"40"
:color=
"mainColor"
/>
<view
class=
"good-info"
>
<view
class=
"price"
>
{{
$utils
.
getretailer
()
==
true
?
cx
.
b2BPrice
:
cx
.
b2CPrice
}}
<text
class=
"sell"
>
起
</text>
</view>
<view
class=
"cart"
>
<u-icon
name=
"cart-o"
color=
"#ff4544"
size=
"40"
/>
</view>
</view>
</view>
...
...
@@ -60,6 +48,7 @@
mainColor
:
""
,
setting
:
{},
isShowKorea
:
0
,
//是否显示韩国的 0显示 1不显示
CityId
:
0
};
},
mounted
()
{
...
...
@@ -94,17 +83,9 @@
},
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
;
}
uni
.
navigateTo
({
url
:
"/pages/jiuzhai/jz_LineDetail?tcid="
+
g
.
tcid
+
'&configId='
+
g
.
configId
+
'&cityId='
+
this
.
CityId
});
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
...
...
@@ -113,6 +94,15 @@
gbAuth
()
{
this
.
showAuth
=
false
;
},
//获取第一张图
getImgs
(
imgObj
)
{
if
(
imgObj
){
let
imgArr
=
JSON
.
parse
(
imgObj
);
if
(
imgArr
&&
imgArr
.
length
>
0
)
{
return
imgArr
[
0
].
Url
}
}
}
},
};
</
script
>
...
...
@@ -165,6 +155,7 @@
margin-bottom
:
3px
;
font-size
:
13px
;
margin
:
7px
10px
;
font-weight
:
bold
;
}
.u-good-list
.good
.good-info
{
...
...
@@ -185,6 +176,7 @@
font-size
:
11px
;
color
:
gray
;
flex
:
1
;
margin-left
:
3
rpx
;
}
.u-good-list
.good
.good-info
.cart
{
...
...
@@ -203,8 +195,9 @@
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
overflow
:
hidden
;
font-size
:
1
3
px
;
margin
:
-7px
10px
10
px
10px
;
font-size
:
1
1
px
;
margin
:
0
10px
5
px
10px
;
height
:
17px
;
color
:
#999999
;
}
</
style
>
components/goods/style1.vue
View file @
79748862
<
template
>
<div
:style=
"
{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : '',
}"
>
<div
v-for=
"(item, gli) in goodList"
:key=
"gli"
class=
"good-one"
@
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%;border-top-left-radius: 10px; border-top-right-radius: 10px;"
/>
</div>
<image
style=
"width: calc(100vw - 24px); height: 50vw"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.picUrl"
v-if=
"goodsInfo.goodsCoverProportion == '3-2'"
/>
<image
style=
"
width: calc(100vw - 24px);
height: 100vw;
border-radius: 10rpx 10rpx 0 0;
"
v-if=
"goodsInfo.goodsCoverProportion == '1-1'"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.picUrl"
/>
<div
class=
"good-info"
>
<div
class=
"good-name"
v-if=
"goodsInfo.showGoodsName"
>
{{
item
.
name
}}
</div>
<view
class=
"good-sub-name"
v-if=
"item.subname"
>
{{
item
.
subname
}}
</view>
<div
class=
"good-price-info"
>
<span
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>
-->
</span>
<span
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>
</span>
</div>
</div>
</div>
<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>
</div>
<div
:style=
"
{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : ''
}"
>
<div
v-for=
"(item, gli) in goodList"
:key=
"gli"
class=
"good-one"
@
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>
<image
style=
"width: calc(100vw - 24px); height: 50vw;border-top-left-radius: 10px; border-top-right-radius: 10px;"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.picUrl"
v-if=
"goodsInfo.goodsCoverProportion == '3-2'"
/>
<image
style=
"
width: calc(100vw - 24px);
height: 100vw;
border-radius: 10rpx 10rpx 0 0;
border-top-left-radius: 10px; border-top-right-radius: 10px;
"
v-if=
"goodsInfo.goodsCoverProportion == '1-1'"
:mode=
"goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src=
"item.picUrl"
/>
<div
class=
"good-info"
>
<div
class=
"good-name"
v-if=
"goodsInfo.showGoodsName"
>
{{
item
.
name
}}
</div>
<view
class=
"good-sub-name"
v-if=
"item.subname"
>
{{
item
.
subname
}}
</view>
<div
class=
"good-price-info"
>
<span
class=
"price"
>
{{
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>
-->
</span>
<span
class=
"buy"
v-if=
"goodsInfo.showBuyBtn"
@
click
.
stop=
"showSkuHandler(item)"
>
<u-icon
name=
"cart-o"
size=
"40"
style=
"color:#ff4544"
v-if=
"goodsInfo.buyBtn == 'cart'"
/>
<u-icon
name=
"add-o"
size=
"40"
style=
"color:#ff4544"
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>
</span>
</div>
</div>
</div>
<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>
</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
(
"url1"
,
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
(
"url1"
,
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
scoped
>
<
style
>
.good-one
{
margin
:
12px
;
position
:
relative
;
...
...
@@ -204,46 +157,56 @@ export default {
box-shadow
:
0
4px
10px
1px
#D2D2D2
;
}
.good-one
.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-one
.guding
{
position
:
relative
;
position
:
relative
;
}
.good-one
.guding
.img-box
{
position
:
absolute
;
left
:
0
;
right
:
0
;
bottom
:
0
;
top
:
0
;
position
:
absolute
;
left
:
0
;
right
:
0
;
bottom
:
0
;
top
:
0
;
}
.good-one
.good-info
{
padding
:
12
rpx
;
padding-bottom
:
0
;
margin-top
:
-5px
;
padding
:
12
rpx
;
padding-bottom
:
0
;
margin-top
:
-5px
;
}
.good-one
.good-info
.good-name
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
margin-bottom
:
13px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
margin-bottom
:
10px
;
font-size
:
32
rpx
;
font-weight
:
bold
;
}
.good-one
.good-info
.good-sub-name
{
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
color
:
#999999
;
margin-bottom
:
10px
;
}
.good-one
.good-info
.good-price-info
{
display
:
flex
;
display
:
flex
;
}
.good-one
.good-info
.good-price-info
.price
{
color
:
#ff4544
;
font-size
:
14px
;
flex
:
1
;
color
:
#ff4544
;
font-size
:
16px
;
font-weight
:
600
;
flex
:
1
;
}
.good-one
.good-info
.good-price-info
.buy
{
/* width: 24px; */
text-align
:
right
;
/* width: 24px; */
text-align
:
right
;
}
</
style
>
components/goods/style2.vue
View file @
79748862
<
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=
"
<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"
>
<template
v-if=
"item.subname"
>
{{
item
.
subname
}}
</
template
>
</view>
<view
class=
"good-price-info"
>
<view
class=
"price"
>
{{ 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.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>
: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;"
>
<template
v-if=
"item.subname"
>
{{
item
.
subname
}}
</
template
>
</view>
-->
<view
class=
"good-price-info"
>
<view
class=
"price"
>
{{ 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.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>
<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
;
console
.
log
(
"url2"
,
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
;
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
scoped
>
<
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
;
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
;
}
.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
{
width
:
100%
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
margin-bottom
:
10
rpx
;
font-size
:
26
rpx
;
font-weight
:
600
;
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-sub-name
{
width
:
100%
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
margin-bottom
:
10
rpx
;
font-size
:
22
rpx
;
color
:
#999999
;
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; */
}
.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
>
components/goods/style5.vue
View file @
79748862
<
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=
"tips"
v-if=
"goodsInfo.showGoodsTag"
><image
:src=
"goodsInfo.goodsTagPicUrl"
mode=
"widthFix"
style=
"width: 100%"
/></view>
<view
class=
"img-box-style5"
>
<image
style=
"width: 100%; height: 100%; border-radius: 10rpx 10rpx 0 0"
: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 }">
<view
class=
"good-sub-name"
style=
"flex: 1"
>
{{
item
.
thirdname
}}
</view>
<span
style=
"color: #111"
>
{{
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>
</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=
"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"
style=
"height:35rpx;"
>
<template
v-if=
"item.subname"
>
{{
item
.
subname
}}
</
template
>
</view>
<view
class=
"good-price-info"
>
<view
class=
"price"
:style=
"{ color: mainColor }"
>
<view
class=
"good-sub-name"
style=
"flex:1;"
>
{{item.thirdname}}
</view>
<span
style=
"color: #111;"
>
{{ 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>
</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
(
"url5"
,
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
(
"url5"
,
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
scoped
>
<
style
>
.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;
...
...
@@ -196,67 +150,98 @@ export default {
display: block;
} */
.her-scoller
.good-five
{
position
:
relative
;
margin-right
:
30
rpx
;
width
:
560
rpx
;
box-shadow
:
0px
10px
30px
0px
rgba
(
36
,
36
,
36
,
0.2
);
border-radius
:
20
rpx
;
position
:
relative
;
margin-right
:
30
rpx
;
/* width: 30%; */
/* border: 1rpx solid transparent;
border-radius: 10rpx;
padding-bottom: 10rpx; */
display
:
inline-block
;
width
:
560
rpx
;
box-shadow
:
0px
10px
30px
0px
rgba
(
36
,
36
,
36
,
0.2
);
border-radius
:
20
rpx
;
/* float: left; */
}
.her-scoller
.good-five
.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
;
}
.her-scoller
.good-five
.img-box-style5
{
width
:
100%
;
height
:
224
rpx
;
border-radius
:
20
rpx
;
overflow
:
hidden
;
.her-scoller
.good-five
.img-box
{
width
:
100%
;
/* height: 0;
padding-top: 100%; */
position
:
relative
;
height
:
224
rpx
;
border-radius
:
20
rpx
;
overflow
:
hidden
;
}
.her-scoller
.good-five
.img-box
.img-show
{
position
:
absolute
;
left
:
0
;
top
:
0
;
bottom
:
0
;
right
:
0
;
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
z-index
:
2
;
}
.her-scoller
.good-five
.guding
{
position
:
relative
;
}
.her-scoller
.good-five
.guding
.img-box
{
position
:
absolute
;
left
:
0
;
right
:
0
;
bottom
:
0
;
top
:
0
;
}
.her-scoller
.good-five
.good-info
{
padding
:
30
rpx
;
padding
:
30
rpx
;
}
.her-scoller
.good-five
.good-info
.good-name
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
block
;
/* -webkit-line-clamp: 2;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
block
;
/* -webkit-line-clamp: 2;
-webkit-box-orient: vertical; */
white-space
:
nowrap
;
margin-bottom
:
10
rpx
;
font-size
:
26
rpx
;
width
:
100%
;
font-weight
:
600
;
white-space
:
nowrap
;
margin-bottom
:
10
rpx
;
font-size
:
26
rpx
;
width
:
100%
;
font-weight
:
600
;
}
.her-scoller
.good-five
.good-info
.good-sub-name
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
block
;
white-space
:
nowrap
;
font-size
:
22
rpx
;
color
:
#999999
;
margin-bottom
:
10
rpx
;
.her-scoller
.good-five
.good-info
.good-sub-name
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
block
;
white-space
:
nowrap
;
font-size
:
22
rpx
;
color
:
#999999
;
margin-bottom
:
10
rpx
;
}
.her-scoller
.good-five
.good-info
.good-price-info
{
display
:
flex
;
justify-items
:
center
;
align-items
:
center
;
display
:
flex
;
justify-items
:
center
;
align-items
:
center
;
}
.her-scoller
.good-five
.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; */
}
.her-scoller
.good-five
.good-info
.good-price-info
.buy
{
width
:
24px
;
text-align
:
right
;
width
:
24px
;
text-align
:
right
;
}
</
style
>
pages/jiuzhai/jz_Line.vue
View file @
79748862
...
...
@@ -291,7 +291,7 @@
<text
style=
"margin-left: 20rpx;"
>
{{
currentBrachName
}}
</text>
</view>
<view
style=
"width: 1px; flex: 1;"
>
<u-search
placeholder=
"目的地名称"
v-model=
"msg.searchKey"
input-align=
"left"
:value=
"msg.searchKey"
text-color=
"#111"
<u-search
placeholder=
"目的地名称"
v-model=
"msg.searchKey"
@
search=
"getList"
input-align=
"left"
:value=
"msg.searchKey"
text-color=
"#111"
bg-color=
"rgba(0,0,0,0)"
:show-action=
"false"
></u-search>
</view>
</view>
...
...
@@ -389,10 +389,15 @@
<u-tag
mode=
"plain"
border-color=
"#DFBE6E"
color=
"#DFBE6E"
:text=
"`$
{item.dayNum}天`" size="mini">
</u-tag>
</view>
</view>
<view
class=
"price"
>
<text>
¥
</text>
<text
class=
"money"
>
{{
$utils
.
getretailer
()
==
true
?
item
.
b2BPrice
:
item
.
b2CPrice
}}
</text>
<text>
起
</text>
<view
class=
"price"
style=
"display:flex;justify-content: space-between;align-items: center;"
>
<view
style=
"font-size:24rpx;color:#999999;"
>
最近团期:
{{
item
.
startDate
}}
</view>
<view>
<text>
¥
</text>
<text
class=
"money"
>
{{
$utils
.
getretailer
()
==
true
?
item
.
b2BPrice
:
item
.
b2CPrice
}}
</text>
<text>
起
</text>
</view>
</view>
</view>
</view>
...
...
@@ -679,6 +684,7 @@
},
//获取数据
getList
()
{
this
.
dataList
=
[];
uni
.
showLoading
({
title
:
'加载中'
,
icon
:
'none'
...
...
pages/jiuzhai/jz_LineDetail.vue
View file @
79748862
...
...
@@ -521,14 +521,14 @@
style=
"margin-right: 20px"
:key=
"sIndex2"
v-if=
"subItem.childItem.useDinnerType == '1'"
>
{{
subItem
.
childItem
.
dinnerName
}}
</text
>
早餐:
{{
subItem
.
childItem
.
dinnerName
}}
</text
>
<text
style=
"margin-right: 20px"
v-if=
"subItem.childItem.useDinnerType == '2'"
>
{{
subItem
.
childItem
.
dinnerName
}}
</text
>
午餐:
{{
subItem
.
childItem
.
dinnerName
}}
</text
>
<text
v-if=
"subItem.childItem.useDinnerType == '3'"
>
{{
<text
v-if=
"subItem.childItem.useDinnerType == '3'"
>
晚餐:
{{
subItem
.
childItem
.
dinnerName
}}
</text>
</
template
>
...
...
pages/search/search.vue
View file @
79748862
<
template
>
<view
class=
"searchpage"
>
<view
class=
"ctrl-box"
>
<u-search
action-text=
"搜索"
:focus=
"true"
:clearabled=
"true"
:show-action=
"true"
radius=
"40"
v-model=
"searchKey"
<u-search
action-text=
"搜索"
:focus=
"true"
:clearabled=
"true"
:show-action=
"true"
radius=
"40"
v-model=
"
msg.
searchKey"
@
search=
"searchHandler"
@
custom=
"searchHandler"
@
change=
"changeHandler"
></u-search>
</view>
<view
class=
"historys"
v-if=
"searchKey == '' || !loadSearch"
>
<view
class=
"historys"
v-if=
"
msg.
searchKey == '' || !loadSearch"
>
<view
class=
"title-box"
>
<view
class=
"title"
>
搜索历史
</view>
<view
class=
"editor"
v-if=
"searchHistory.length > 0"
>
...
...
@@ -40,13 +40,13 @@
</scroll-view>
<view
v-if=
"!loading && g.length == 0"
style=
"height: calc(100vh - 42px); overflow-y: auto;"
>
<u-empty
text=
"抱歉,没有找到商品额~"
mode=
"search"
font-size=
"24"
img-width=
"120"
margin-top=
"24"
padding-top=
"0"
></u-empty>
<view
:style=
"{'padding': IsEducation!=1?'12px':0,}"
>
<
!-- <
view :style="{'padding': IsEducation!=1?'12px':0,}">
<view class="recommed" :style="{'padding-left': IsEducation==1?'12px':0,}">
<view class="title">为你推荐</view>
</view>
<goodlist :list="recommedGoods" v-if="IsEducation!=1"></goodlist>
<glist :list="recommedGoods" v-if="IsEducation==1"></glist>
</view>
</view>
-->
</view>
</view>
</view>
...
...
@@ -74,6 +74,19 @@
loading
:
"努力加载中"
,
nomore
:
"没有更多了"
,
},
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
orderBy
:
""
,
team
:
[],
days
:
[
'<100'
],
startDate
:
''
,
endDate
:
''
,
startCityId
:
-
1
,
companyId
:
0
,
searchKey
:
''
,
//搜索数据
priceOrderByField
:
2
},
showLoading
:
false
,
g
:
[],
page
:
1
,
...
...
@@ -168,71 +181,88 @@
uni
.
setStorageSync
(
"search_his"
,
this
.
searchHistory
);
this
.
page
=
1
;
this
.
g
=
[];
this
.
searchKey
=
val
;
this
.
msg
.
searchKey
=
val
;
this
.
loadSearch
=
true
;
this
.
init
();
}
else
{
this
.
searchKey
=
""
;
this
.
msg
.
searchKey
=
""
;
this
.
loadSearch
=
false
;
}
},
init
()
{
this
.
isover
=
false
;
this
.
loading
=
true
;
this
.
showLoading
=
this
.
page
!=
1
;
var
UserPageType
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
0
;
let
url
let
StoreId
=
uni
.
getStorageSync
(
"storeId"
)?
uni
.
getStorageSync
(
"storeId"
).
storeId
:
0
;
let
IsOpenReserve
=
uni
.
getStorageSync
(
"GetAppConfig"
)?
uni
.
getStorageSync
(
"GetAppConfig"
).
IsOpenReserve
:
0
if
(
IsOpenReserve
==
0
){
//如果没开启 门店id赋值为0
StoreId
=
0
}
if
(
this
.
IsEducation
==
1
)
{
url
=
'/api/AppletSchool/GetAppletCoursePageList'
;
}
else
{
url
=
"/api/AppletGoods/GetAppletGoodsPageListForZY"
;
}
this
.
request2
({
url
:
url
,
data
:
{
pageIndex
:
this
.
page
,
pageSize
:
20
,
Name
:
this
.
searchKey
,
GoodsType
:
0
,
CategoryIds
:
''
,
OrderBy
:
1
,
GoodsPageType
:
UserPageType
,
StoreId
:
StoreId
},
},
(
res
)
=>
{
console
.
log
(
res
,
'搜索ress'
);
this
.
showLoading
=
true
;
if
(
res
.
data
.
pageData
.
length
>
0
)
{
console
.
log
(
res
.
data
.
pageData
)
res
.
data
.
pageData
.
forEach
(
x
=>
{
x
.
marketingLogo
=
JSON
.
parse
(
x
.
marketingLogo
)
x
.
totalStock
=
0
;
if
(
x
.
attr
&&
x
.
attr
.
length
>
0
)
{
x
.
attr
.
forEach
(
j
=>
{
x
.
totalStock
+=
j
.
stock
})
}
})
}
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
)
{
this
.
isover
=
true
;
this
.
status
=
"nomore"
;
}
else
{
this
.
status
=
"loadmore"
;
this
.
g
=
[];
uni
.
showLoading
({
title
:
'加载中'
,
icon
:
'none'
})
this
.
apipost
(
"b2b_get_GetB2BTravelPageList"
,
this
.
msg
,
res
=>
{
uni
.
hideLoading
();
if
(
res
.
resultCode
==
1
)
{
this
.
g
=
res
.
data
.
pageData
;
this
.
page_count
=
res
.
data
.
pageCount
;
}
this
.
loading
=
false
;
}
},
null
);
// this.isover = false;
// this.loading = true;
// this.showLoading = this.page != 1;
// var UserPageType = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserPageType : 0;
// let url
// let StoreId = uni.getStorageSync("storeId")?uni.getStorageSync("storeId").storeId:0;
// let IsOpenReserve = uni.getStorageSync("GetAppConfig")?uni.getStorageSync("GetAppConfig").IsOpenReserve:0
// if(IsOpenReserve==0){//如果没开启 门店id赋值为0
// StoreId=0
// }
// if (this.IsEducation == 1) {
// url = '/api/AppletSchool/GetAppletCoursePageList';
// } else {
// url = "/api/AppletGoods/GetAppletGoodsPageListForZY";
// }
// this.request2({
// url: url,
// data: {
// pageIndex: this.page,
// pageSize: 20,
// Name: this.searchKey,
// GoodsType: 0,
// CategoryIds: '',
// OrderBy: 1,
// GoodsPageType: UserPageType,
// StoreId:StoreId
// },
// },
// (res) => {
// console.log(res, '搜索ress');
// this.showLoading = true;
// if (res.data.pageData.length > 0) {
// console.log(res.data.pageData)
// res.data.pageData.forEach(x => {
// x.marketingLogo = JSON.parse(x.marketingLogo)
// x.totalStock = 0;
// if (x.attr && x.attr.length > 0) {
// x.attr.forEach(j => {
// x.totalStock += j.stock
// })
// }
// })
// }
// this.g = this.g.concat(res.data.pageData);
// this.page_count = res.data.pageCount;
// if (this.page_count == 1) {
// this.isover = true;
// this.status = "nomore";
// } else {
// this.status = "loadmore";
// }
// this.loading = false;
// }
// );
},
lower
(
e
)
{
if
(
this
.
page
<
this
.
page_count
)
{
...
...
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