Commit 3862321f authored by zhengke's avatar zhengke

修改

parent 702483d7
...@@ -2,35 +2,23 @@ ...@@ -2,35 +2,23 @@
<view class="u-good-list"> <view class="u-good-list">
<u-row gutter="20"> <u-row gutter="20">
<u-col span="6" v-for="(cx, ci) in g" :key="ci"> <u-col span="6" v-for="(cx, ci) in g" :key="ci">
<view class="good" @click="clickHandler(cx)"> <view class="good" @click="showSkuHandler(cx)">
<view class="good-img"> <view class="good-img">
<image mode="aspectFill" :src="cx.cover_pic" style="width: 100%; height: 100%;"> <image mode="aspectFill" :src="getImgs(cx.imgCover)" 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> </image>
</view> </view>
<view class="good-name" v-if="setting.is_show_goods_name==1"> <view class="good-name">
<view v-if="cx.marketingLogo.iswords && cx.marketingLogo.iswords==1&& cx.marketingLogo.words!=''" class="Logo" {{cx.title}}
: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> </view>
<view class="goodsSubName" v-if="setting&&setting.is_show_korea==1"> <view class="goodsSubName">
卖点:<text v-if="cx.subName">{{cx.subName}}</text> <text v-if="cx.productRecommend">{{cx.productRecommend}}</text>
</view> </view>
<view class="good-info" v-if="setting&&setting.is_show_korea==0"> <view class="good-info">
<view class="price" :style="{ color: mainColor }">¥{{cx.price}}</view> <view class="price">
<view class="sell">{{ cx.sales }}</view> {{$utils.getretailer()==true? cx.b2BPrice:cx.b2CPrice}}<text class="sell"></text>
<view v-if="setting.is_show_cart==1" class="cart" @click.stop="showSkuHandler(cx)"> </view>
<u-icon name="cart-o" size="40" :color="mainColor" /> <view class="cart">
<u-icon name="cart-o" color="#ff4544" size="40" />
</view> </view>
</view> </view>
</view> </view>
...@@ -60,6 +48,7 @@ ...@@ -60,6 +48,7 @@
mainColor: "", mainColor: "",
setting: {}, setting: {},
isShowKorea: 0, //是否显示韩国的 0显示 1不显示 isShowKorea: 0, //是否显示韩国的 0显示 1不显示
CityId:0
}; };
}, },
mounted() { mounted() {
...@@ -94,17 +83,9 @@ ...@@ -94,17 +83,9 @@
}, },
showSkuHandler(g) { showSkuHandler(g) {
this.sku = g; uni.navigateTo({
this.u = uni.getStorageSync("mall_UserInfo"); url: "/pages/jiuzhai/jz_LineDetail?tcid=" + g.tcid + '&configId=' + g.configId + '&cityId=' + this.CityId
if (!this.u) { });
this.u = {
nickName: "未登录",
avatarUrl: "",
};
this.showAuth = true;
} else {
this.showSku = true;
}
}, },
reloadUserinfo() { reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
...@@ -113,6 +94,15 @@ ...@@ -113,6 +94,15 @@
gbAuth() { gbAuth() {
this.showAuth = false; this.showAuth = false;
}, },
//获取第一张图
getImgs(imgObj) {
if(imgObj){
let imgArr = JSON.parse(imgObj);
if (imgArr && imgArr.length > 0) {
return imgArr[0].Url
}
}
}
}, },
}; };
</script> </script>
...@@ -165,6 +155,7 @@ ...@@ -165,6 +155,7 @@
margin-bottom: 3px; margin-bottom: 3px;
font-size: 13px; font-size: 13px;
margin: 7px 10px; margin: 7px 10px;
font-weight: bold;
} }
.u-good-list .good .good-info { .u-good-list .good .good-info {
...@@ -185,6 +176,7 @@ ...@@ -185,6 +176,7 @@
font-size: 11px; font-size: 11px;
color: gray; color: gray;
flex: 1; flex: 1;
margin-left:3rpx;
} }
.u-good-list .good .good-info .cart { .u-good-list .good .good-info .cart {
...@@ -203,8 +195,9 @@ ...@@ -203,8 +195,9 @@
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
font-size: 13px; font-size: 11px;
margin: -7px 10px 10px 10px; margin: 0 10px 5px 10px;
height:17px; height:17px;
color:#999999;
} }
</style> </style>
...@@ -37,12 +37,12 @@ ...@@ -37,12 +37,12 @@
<div class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }}</div> <div class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }}</div>
<view class="good-sub-name" v-if="item.subname">{{item.subname}}</view> <view class="good-sub-name" v-if="item.subname">{{item.subname}}</view>
<div class="good-price-info"> <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 style='text-decoration: line-through;margin-left: 10px;font-size: 10px;color: gray;font-family: aa;'>原价:{{goodsInfo.showGoodsPrice ? getPrice(item.OriginalPrice) : ''}}</span> -->
</span> </span>
<span class="buy" v-if="goodsInfo.showBuyBtn" @click.stop="showSkuHandler(item)"> <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="cart-o" size="40" style="color:#ff4544" v-if="goodsInfo.buyBtn == 'cart'" />
<u-icon name="add-o" size="40" :color="mainColor" v-else-if="goodsInfo.buyBtn == 'add'" /> <u-icon name="add-o" size="40" style="color:#ff4544" v-else-if="goodsInfo.buyBtn == 'add'" />
<u-button <u-button
type="primary" type="primary"
size="mini" size="mini"
...@@ -183,7 +183,16 @@ export default { ...@@ -183,7 +183,16 @@ export default {
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
margin-bottom: 13px; margin-bottom: 10px;
font-size:32rpx;
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 { .good-one .good-info .good-price-info {
display: flex; display: flex;
......
...@@ -34,9 +34,9 @@ ...@@ -34,9 +34,9 @@
<view class="good-info"> <view class="good-info">
<view class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }}</view> <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" 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> <template v-if="item.subname">{{item.subname}}</template>
</view> </view> -->
<view class="good-price-info"> <view class="good-price-info">
<view class="price"> <view class="price">
{{ goodsInfo.showGoodsPrice ? getPrice(item.price) : '' }} {{ goodsInfo.showGoodsPrice ? getPrice(item.price) : '' }}
...@@ -98,7 +98,6 @@ export default { ...@@ -98,7 +98,6 @@ export default {
//线路 //线路
if (item.goodType == 4) { if (item.goodType == 4) {
var url="/pages/jiuzhai/jz_LineDetail?tcid=" + item.id + '&configId=' + item.subid; var url="/pages/jiuzhai/jz_LineDetail?tcid=" + item.id + '&configId=' + item.subid;
console.log("url2",url)
uni.navigateTo({ uni.navigateTo({
url: url url: url
}); });
...@@ -200,16 +199,17 @@ export default { ...@@ -200,16 +199,17 @@ export default {
padding-bottom: 0; */ padding-bottom: 0; */
} }
.good-two .good-info .good-name { .good-two .good-info .good-name {
text-overflow: -o-ellipsis-lastline;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
/* -webkit-line-clamp: 2; -webkit-line-clamp: 2;
-webkit-box-orient: vertical; */ line-clamp: 2;
white-space: nowrap; -webkit-box-orient: vertical;
margin-bottom: 10rpx; margin-bottom: 10rpx;
font-size: 26rpx; font-size: 26rpx;
font-weight: 600; font-weight: 600;
/* height: 37px; */ height: 68rpx;
} }
.good-two .good-info .good-sub-name { .good-two .good-info .good-sub-name {
overflow: hidden; overflow: hidden;
......
...@@ -25,7 +25,9 @@ ...@@ -25,7 +25,9 @@
</view> </view>
<view class="good-info"> <view class="good-info">
<view class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }}</view> <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="good-price-info">
<view class="price" :style="{ color: mainColor }"> <view class="price" :style="{ color: mainColor }">
<view class="good-sub-name" style="flex:1;">{{item.thirdname}}</view> <view class="good-sub-name" style="flex:1;">{{item.thirdname}}</view>
......
...@@ -291,7 +291,7 @@ ...@@ -291,7 +291,7 @@
<text style="margin-left: 20rpx;">{{currentBrachName}}</text> <text style="margin-left: 20rpx;">{{currentBrachName}}</text>
</view> </view>
<view style="width: 1px; flex: 1;"> <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> bg-color="rgba(0,0,0,0)" :show-action="false"></u-search>
</view> </view>
</view> </view>
...@@ -389,10 +389,15 @@ ...@@ -389,10 +389,15 @@
<u-tag mode="plain" border-color="#DFBE6E" color="#DFBE6E" :text="`${item.dayNum}天`" size="mini"></u-tag> <u-tag mode="plain" border-color="#DFBE6E" color="#DFBE6E" :text="`${item.dayNum}天`" size="mini"></u-tag>
</view> </view>
</view> </view>
<view class="price"> <view class="price" style="display:flex;justify-content: space-between;align-items: center;">
<text></text> <view style="font-size:24rpx;color:#999999;">
<text class="money">{{$utils.getretailer()==true? item.b2BPrice:item.b2CPrice}}</text> 最近团期:{{item.startDate}}
<text></text> </view>
<view>
<text></text>
<text class="money">{{$utils.getretailer()==true? item.b2BPrice:item.b2CPrice}}</text>
<text></text>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -679,6 +684,7 @@ ...@@ -679,6 +684,7 @@
}, },
//获取数据 //获取数据
getList() { getList() {
this.dataList=[];
uni.showLoading({ uni.showLoading({
title:'加载中', title:'加载中',
icon:'none' icon:'none'
......
...@@ -522,14 +522,14 @@ ...@@ -522,14 +522,14 @@
style="margin-right: 20px" style="margin-right: 20px"
:key="sIndex2" :key="sIndex2"
v-if="subItem.childItem.useDinnerType == '1'" v-if="subItem.childItem.useDinnerType == '1'"
>{{ subItem.childItem.dinnerName }}</text >早餐:{{ subItem.childItem.dinnerName }}</text
> >
<text <text
style="margin-right: 20px" style="margin-right: 20px"
v-if="subItem.childItem.useDinnerType == '2'" 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 subItem.childItem.dinnerName
}}</text> }}</text>
</template> </template>
......
<template> <template>
<view class="searchpage"> <view class="searchpage">
<view class="ctrl-box"> <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> @search="searchHandler" @custom="searchHandler" @change="changeHandler"></u-search>
</view> </view>
<view class="historys" v-if="searchKey == '' || !loadSearch"> <view class="historys" v-if="msg.searchKey == '' || !loadSearch">
<view class="title-box"> <view class="title-box">
<view class="title">搜索历史</view> <view class="title">搜索历史</view>
<view class="editor" v-if="searchHistory.length > 0"> <view class="editor" v-if="searchHistory.length > 0">
...@@ -40,13 +40,13 @@ ...@@ -40,13 +40,13 @@
</scroll-view> </scroll-view>
<view v-if="!loading && g.length == 0" style="height: calc(100vh - 42px); overflow-y: auto;"> <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> <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="recommed" :style="{'padding-left': IsEducation==1?'12px':0,}">
<view class="title">为你推荐</view> <view class="title">为你推荐</view>
</view> </view>
<goodlist :list="recommedGoods" v-if="IsEducation!=1"></goodlist> <goodlist :list="recommedGoods" v-if="IsEducation!=1"></goodlist>
<glist :list="recommedGoods" v-if="IsEducation==1"></glist> <glist :list="recommedGoods" v-if="IsEducation==1"></glist>
</view> </view> -->
</view> </view>
</view> </view>
</view> </view>
...@@ -74,6 +74,19 @@ ...@@ -74,6 +74,19 @@
loading: "努力加载中", loading: "努力加载中",
nomore: "没有更多了", nomore: "没有更多了",
}, },
msg: {
pageIndex: 1,
pageSize: 15,
orderBy: "",
team: [],
days: ['<100'],
startDate: '',
endDate: '',
startCityId: -1,
companyId: 0,
searchKey: '', //搜索数据
priceOrderByField:2
},
showLoading: false, showLoading: false,
g: [], g: [],
page: 1, page: 1,
...@@ -168,71 +181,88 @@ ...@@ -168,71 +181,88 @@
uni.setStorageSync("search_his", this.searchHistory); uni.setStorageSync("search_his", this.searchHistory);
this.page = 1; this.page = 1;
this.g = []; this.g = [];
this.searchKey = val; this.msg.searchKey=val;
this.loadSearch = true; this.loadSearch = true;
this.init(); this.init();
} else { } else {
this.searchKey = ""; this.msg.searchKey = "";
this.loadSearch = false; this.loadSearch = false;
} }
}, },
init() { init() {
this.isover = false; this.g=[];
this.loading = true; uni.showLoading({
this.showLoading = this.page != 1; title:'加载中',
var UserPageType = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserPageType : 0; icon:'none'
let url })
let StoreId = uni.getStorageSync("storeId")?uni.getStorageSync("storeId").storeId:0; this.apipost(
let IsOpenReserve = uni.getStorageSync("GetAppConfig")?uni.getStorageSync("GetAppConfig").IsOpenReserve:0 "b2b_get_GetB2BTravelPageList",
if(IsOpenReserve==0){//如果没开启 门店id赋值为0 this.msg,
StoreId=0 res => {
} uni.hideLoading();
if (res.resultCode == 1) {
if (this.IsEducation == 1) { this.g = res.data.pageData;
url = '/api/AppletSchool/GetAppletCoursePageList'; this.page_count = res.data.pageCount;
} 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; },
} 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) { lower(e) {
if (this.page < this.page_count) { if (this.page < this.page_count) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment