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
3862321f
Commit
3862321f
authored
Oct 11, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
702483d7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
157 additions
and
117 deletions
+157
-117
list.vue
components/goods/list.vue
+30
-37
style1.vue
components/goods/style1.vue
+13
-4
style2.vue
components/goods/style2.vue
+7
-7
style5.vue
components/goods/style5.vue
+3
-1
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 @
3862321f
...
...
@@ -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 @
3862321f
...
...
@@ -37,12 +37,12 @@
<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
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"
:color=
"mainColor
"
v-if=
"goodsInfo.buyBtn == 'cart'"
/>
<u-icon
name=
"add-o"
size=
"40"
:color=
"mainColor
"
v-else-if=
"goodsInfo.buyBtn == 'add'"
/>
<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"
...
...
@@ -183,7 +183,16 @@ export default {
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
margin-bottom
:
13px
;
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
;
...
...
components/goods/style2.vue
View file @
3862321f
...
...
@@ -34,9 +34,9 @@
<view
class=
"good-info"
>
<view
class=
"good-name"
v-if=
"goodsInfo.showGoodsName"
>
{{
item
.
name
}}
</view>
<!--
<view
class=
"good-sub-name"
v-if=
"item.subname"
>
{{
item
.
subname
}}
</view>
-->
<view
class=
"good-sub-name"
style=
"height:30rpx;"
>
<
!--
<
view
class=
"good-sub-name"
style=
"height:30rpx;"
>
<template
v-if=
"item.subname"
>
{{
item
.
subname
}}
</
template
>
</view>
</view>
-->
<view
class=
"good-price-info"
>
<view
class=
"price"
>
{{ goodsInfo.showGoodsPrice ? getPrice(item.price) : '' }}
...
...
@@ -98,7 +98,6 @@ export default {
//线路
if
(
item
.
goodType
==
4
)
{
var
url
=
"/pages/jiuzhai/jz_LineDetail?tcid="
+
item
.
id
+
'&configId='
+
item
.
subid
;
console
.
log
(
"url2"
,
url
)
uni
.
navigateTo
({
url
:
url
});
...
...
@@ -200,16 +199,17 @@ export default {
padding-bottom: 0; */
}
.good-two
.good-info
.good-name
{
text-overflow
:
-o-ellipsis-lastline
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
/*
-webkit-line-clamp: 2;
-webkit-box-orient: vertical; */
white-space
:
nowrap
;
-webkit-line-clamp
:
2
;
line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
margin-bottom
:
10
rpx
;
font-size
:
26
rpx
;
font-weight
:
600
;
/* height: 37px; */
height
:
68
rpx
;
}
.good-two
.good-info
.good-sub-name
{
overflow
:
hidden
;
...
...
components/goods/style5.vue
View file @
3862321f
...
...
@@ -25,7 +25,9 @@
</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: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>
...
...
pages/jiuzhai/jz_Line.vue
View file @
3862321f
...
...
@@ -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 @
3862321f
...
...
@@ -522,14 +522,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 @
3862321f
<
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