Browse Source

拼团列表

master
tianyi 3 months ago
parent
commit
faf316c9ab
  1. 539
      package1/group/groupBuySingle.vue

539
package1/group/groupBuySingle.vue

@ -2,7 +2,8 @@
<!-- 拼团单一商家 -->
<view class="page1">
<!-- 固定顶部导航栏悬浮在背景图之上 -->
<view class="nav-bar" :style="{'padding-top': menuButtonInfo.top +'px','background':lastScrollTop>200?'#fff':''}">
<view class="nav-bar"
:style="{'padding-top': menuButtonInfo.top +'px','background':lastScrollTop>200?'#fff':''}">
<view class="back-btn" @tap="back">
<uni-icons type="left" size="28"></uni-icons>
</view>
@ -81,14 +82,19 @@
</view>
</view>
<!-- 分类栏移到goods-list外层position:sticky才能生效 -->
<view class="menu-list" id="menuList" :style="{'top': navBarHeight + 'px','background':lastScrollTop>200?'#fff':''}">
<view class="menu1" @tap="checkTab(index)" v-for="(item,index) in menuList" :key="index" :style="{'font-size':item.checked?'40rpx':'30rpx','color':item.checked?'rgba(0, 35, 28, 1)':'#777'}">
<view class="menu-list" id="menuList"
:style="{'top': navBarHeight + 'px','background':lastScrollTop>200?'#fff':''}">
<view class="menu1" @tap="checkTab(index)" v-for="(item,index) in menuList" :key="index"
:style="{'font-size':item.checked?'40rpx':'30rpx','color':item.checked?'rgba(0, 35, 28, 1)':'#777'}">
<view style="width: 90px;">{{item.categoryName}}</view>
<img v-if="item.checked" class="checked-img" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/4bb5fc7725cb4a7a84d1d3a15f05b39c.png" alt="" />
<img v-if="item.checked" class="checked-img"
src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/4bb5fc7725cb4a7a84d1d3a15f05b39c.png"
alt="" />
</view>
</view>
<view class="goods-list">
<view class="goods-member" v-for="(item,index) in productItem" :key="index" @tap="goDetail('product',item)">
<view class="goods-member" v-for="(item,index) in productItem" :key="index"
@tap="goDetail('product',item)">
<view class="goods-top">
<view class="goods-img">
<img :src="item.productPicture" alt="" style="border-radius: 10px;">
@ -139,18 +145,20 @@
<view style="width: 100%;height: 160rpx;"></view>
<view class="bottom">
<view class="bottom-left">
<view style="position: relative;width: 60rpx;height: 80rpx;margin-top: 20rpx;" @tap="openPopup('car','','')">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/60db52398a65459e9541881c926986a4.png" alt="" />
<view style="position: relative;width: 60rpx;height: 80rpx;margin-top: 20rpx;"
@tap="openPopup('car','','')">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/60db52398a65459e9541881c926986a4.png"
alt="" />
<view class="bottom-dot" v-if="cartTotalCount > 0">{{cartTotalCount}}</view>
</view>
<view class="bottom-price">{{cartTotalPrice}}</view>
</view>
<view class="bottom-right" @tap="submitCartCheckout">
<view class="bottom-right" @tap="submitCartCheckout">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/d93d893296ed46ea99cfd0e8e2835eaa.png" alt="" />
</view>
</view>
<!-- 购物车弹窗 -->
<uni-popup ref="carPopup" background-color="#fff">
<view class="car-content">
@ -160,11 +168,13 @@
<view class="car-title">
已加购商品{{cartTotalCount}}
</view>
<scroll-view scroll-y style="max-height: 400rpx;">
<view class="goods-top" style="padding: 10px 0;" v-for="(cartItem, index) in cartItems" :key="index">
<view class="goods-top" style="padding: 10px 0;" v-for="(cartItem, index) in cartItems"
:key="index">
<view class="goods-img" style="width: 120rpx;height: 120rpx;">
<img :src="cartItem.item.productPicture" alt="" style="border-radius: 10px;width:100%;height:100%;">
<img :src="cartItem.item.productPicture" alt=""
style="border-radius: 10px;width:100%;height:100%;">
</view>
<view class="goods-content" style="padding-left: 20rpx;">
<view class="goods-name">
@ -172,15 +182,18 @@
</view>
<view class="goods-content-center">
<view class="goods-deal1" v-if="cartItem.specs">
<text style="color: #999; font-size: 20rpx;">已选规格: {{getSpecDisplayString(cartItem.specs)}}</text>
<text style="color: #999; font-size: 20rpx;">已选规格:
{{getSpecDisplayString(cartItem.specs)}}</text>
</view>
</view>
<view class="goods-content-bottom" style="margin-top: 10rpx;">
<view style="font-size: 28rpx;line-height: 54rpx;margin-right: 20rpx;flex: 1;color: red;">
<view
style="font-size: 28rpx;line-height: 54rpx;margin-right: 20rpx;flex: 1;color: red;">
{{cartItem.price}}
</view>
<view class="goods-num">
<view class="num-plus" style="background: #999;color: #fff;" @tap="adjustCart(cartItem.cartId, -1)">
<view class="num-plus" style="background: #999;color: #fff;"
@tap="adjustCart(cartItem.cartId, -1)">
-
</view>
<view class="num">
@ -199,25 +212,29 @@
<view class="bottom" style="padding-bottom: 10px;">
<view class="bottom-left">
<view style="width: 60rpx;height: 80rpx;margin-top: 10rpx;" @tap="$refs.carPopup.close()">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/60db52398a65459e9541881c926986a4.png" alt="" />
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/60db52398a65459e9541881c926986a4.png"
alt="" />
</view>
<view class="bottom-price" style="line-height: 24px;">
<view>{{cartTotalPrice}}</view>
</view>
</view>
<view class="bottom-right" @tap="submitCartCheckout">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/d93d893296ed46ea99cfd0e8e2835eaa.png" alt="" />
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/d93d893296ed46ea99cfd0e8e2835eaa.png"
alt="" />
</view>
</view>
</view>
</uni-popup>
<!-- 警告弹出层 -->
<uni-popup ref="warnPopup" background-color="#fff">
<view class="warnImg">
<img @tap="$refs.warnPopup.close()" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/4996043b3987401794b974d359429b8e.png" alt="购物车是空的" style="width:300px;height:370px;" />
</view>
</uni-popup>
<!-- 警告弹出层 -->
<uni-popup ref="warnPopup" background-color="#fff">
<view class="warnImg">
<img @tap="$refs.warnPopup.close()"
src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/4996043b3987401794b974d359429b8e.png"
alt="购物车是空的" style="width:300px;height:370px;" />
</view>
</uni-popup>
<!-- 拼团和选规格弹窗 -->
<uni-popup ref="pintuanPopup" background-color="#fff">
<view class="car-content">
@ -244,8 +261,9 @@
<view style="font-size: 28rpx;line-height: 54rpx;margin-right: 20rpx;">
{{currentItem.attributeListPrice | sliceMsg}}
</view>
<view class="pintuan-left-price" v-if="currentItem.productGroupBuyPrices && currentItem.productGroupBuyPrices.length > 0">
拼团<text style="color: red;">{{currentItem.productGroupBuyPrices | slicePrice}}</text>
<view class="pintuan-left-price"
v-if="currentItem.productGroupBuyPrices && currentItem.productGroupBuyPrices.length > 0">
拼团<text style="color: red;">{{currentItem.productGroupBuyPrices | slicePrice}}</text>
</view>
</view>
</view>
@ -256,25 +274,26 @@
<view class="spec11">
{{spec.name}}
</view>
<view class="spec22" >
<view :class="spec.selected === option ? 'spec-check' : 'spec222'"
v-for="(option, oIndex) in spec.options"
:key="oIndex"
@tap="selectSpec(sIndex, option)">
<view class="spec22">
<view :class="spec.selected === option ? 'spec-check' : 'spec222'"
v-for="(option, oIndex) in spec.options" :key="oIndex"
@tap="selectSpec(sIndex, option)">
{{option}}
</view>
</view>
</view>
</view>
<template v-if="isPintuan && currentItem.productGroupBuyPrices && currentItem.productGroupBuyPrices.length > 0">
<template
v-if="isPintuan && currentItem.productGroupBuyPrices && currentItem.productGroupBuyPrices.length > 0">
<view class="spec11">
成团选择
</view>
<view class="goods-team">
<view :class="selectedGroupRule && selectedGroupRule.groupCount === rule.groupCount ? 'team-check' : 'team1'"
v-for="(rule, rIndex) in currentItem.productGroupBuyPrices" :key="rIndex"
@tap="selectGroupRule(rule)">
<view
:class="selectedGroupRule && selectedGroupRule.groupCount === rule.groupCount ? 'team-check' : 'team1'"
v-for="(rule, rIndex) in currentItem.productGroupBuyPrices" :key="rIndex"
@tap="selectGroupRule(rule)">
<view class="team11">
{{parseFloat(rule.groupPrice).toFixed(2)}}
</view>
@ -283,9 +302,10 @@
</view>
</view>
</view>
<view class="spec11">
<view class="spec11" @tap="$refs.pintuanGroupPopup.open('bottom')">
他们都在拼
<uni-icons type="right" size="12"></uni-icons>
</view>
<!-- 占位假数据展示 -->
<view class="">
@ -298,15 +318,12 @@
</view>
<view class="list-right-cha">
<view class="cha11">
不限
二人
</view>
<view class="">
<view style="line-height: 20px;padding-left: 5px;">
<text style="color: red;">1</text>拼成
</view>
</view>
<view class="list-right-price">
去凑单
</view>
</view>
<view class="list-btn" @tap="submitPintuan">
去拼单
@ -319,15 +336,20 @@
<view class="bottom" style="padding-bottom: 20px;height: 80px;z-index: 10;">
<view v-if="isPintuan" class="pintuan1">
<template v-if="!groupId">
<view class="pintuan2" style="border-bottom-left-radius: 50px;border-top-left-radius: 50px;" @tap="submitPintuan(true)">
<view class="pintuan2" style="border-bottom-left-radius: 50px;border-top-left-radius: 50px;"
@tap="submitPintuan(true)">
面对面团
</view>
<view class="pintuan2" style="background: rgba(0, 35, 28, 1);border-bottom-right-radius: 50px;border-top-right-radius: 50px;color: rgba(166, 255, 234, 1);" @tap="submitPintuan(false)">
<view class="pintuan2"
style="background: rgba(0, 35, 28, 1);border-bottom-right-radius: 50px;border-top-right-radius: 50px;color: rgba(166, 255, 234, 1);"
@tap="submitPintuan(false)">
发起拼团{{selectedGroupRule && selectedGroupRule.groupPrice ? parseFloat(selectedGroupRule.groupPrice).toFixed(2) : '0.00'}}
</view>
</template>
<template v-else>
<view class="pintuan2" style="width: 100%; border-radius: 50px; background: rgba(0, 35, 28, 1); color: rgba(166, 255, 234, 1);" @tap="submitPintuan(false)">
<view class="pintuan2"
style="width: 100%; border-radius: 50px; background: rgba(0, 35, 28, 1); color: rgba(166, 255, 234, 1);"
@tap="submitPintuan(false)">
参与拼团{{selectedGroupRule && selectedGroupRule.groupPrice ? parseFloat(selectedGroupRule.groupPrice).toFixed(2) : '0.00'}}
</view>
</template>
@ -338,6 +360,114 @@
</view>
</view>
</uni-popup>
<!-- 拼团和选规格弹窗 -->
<uni-popup ref="pintuanGroupPopup" background-color="#fff">
<view class="car-content">
<view class="car-close" @tap="$refs.pintuanPopup.close()">
<uni-icons type="close" size="30" color="#fff"></uni-icons>
</view>
<view class="goods-top">
<view class="goods-img">
<img :src="currentItem.productPicture" alt="" style="border-radius: 10px;">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/6c4ab92a43c842d8bb22035bce1f65cc.png"
alt=""
style="width:30rpx;height:30rpx;position: absolute;top: 0;left: 0;background-size: 100%;" />
</view>
<view class="goods-content">
<view class="goods-name">
{{currentItem.productName}}
</view>
<view class="goods-content-center">
<view class="goods-deal1">
月售 <text> 100+</text>
</view>
</view>
<view class="goods-content-bottom">
<view style="font-size: 28rpx;line-height: 54rpx;margin-right: 20rpx;">
{{currentItem.attributeListPrice | sliceMsg}}
</view>
<view class="pintuan-left-price"
v-if="currentItem.productGroupBuyPrices && currentItem.productGroupBuyPrices.length > 0">
拼团<text style="color: red;">{{currentItem.productGroupBuyPrices | slicePrice}}</text>
</view>
</view>
</view>
</view>
<scroll-view scroll-y style="max-height: 50vh;">
<template
v-if="isPintuan && currentItem.productGroupBuyPrices && currentItem.productGroupBuyPrices.length > 0">
<!-- 占位假数据展示 -->
<view class="">
<view class="goods-center">
<view class="list-right">
<view class="list-right-img">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/94f91382e76c4f289d53fbf858e8732b.png"
alt="" />
<view class="list-weipincheng">+</view>
</view>
<view class="list-right-cha">
<view class="cha11">
二人拼
</view>
<view style="line-height: 20px;padding-left: 5px;">
<text style="color: red;">1</text>拼成
</view>
</view>
</view>
<view class="list-btn" @tap="submitPintuan">
去拼单
</view>
</view>
</view>
<view class="">
<view class="goods-center">
<view class="list-right">
<view class="list-right-img">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/94f91382e76c4f289d53fbf858e8732b.png"
alt="" />
<view class="list-weipincheng">+</view>
</view>
<view class="list-right-cha">
<view class="cha11">
二人拼
</view>
<view style="line-height: 20px;padding-left: 5px;">
<text style="color: red;">1</text>拼成
</view>
</view>
</view>
<view class="list-btn" @tap="submitPintuan">
去拼单
</view>
</view>
</view>
<view class="">
<view class="goods-center">
<view class="list-right">
<view class="list-right-img">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/94f91382e76c4f289d53fbf858e8732b.png"
alt="" />
<view class="list-weipincheng">+</view>
</view>
<view class="list-right-cha">
<view class="cha11">
二人拼
</view>
<view style="line-height: 20px;padding-left: 5px;">
<text style="color: red;">1</text>拼成
</view>
</view>
</view>
<view class="list-btn" @tap="submitPintuan">
去拼单
</view>
</view>
</view>
</template>
<view style="width: 100%;height: 160rpx;"></view>
</scroll-view>
</view>
</uni-popup>
</view>
</template>
@ -346,17 +476,17 @@
data() {
return {
loadStatus: 'more',
type:'',
shopId:'',
shopItem:{},
productId:'',
productItem:[],
type: '',
shopId: '',
shopItem: {},
productId: '',
productItem: [],
cartItems: [],
currentItem: {},
parsedSpecs: [],
selectedGroupRule: {},
pageNum:1,
total:1,
pageNum: 1,
total: 1,
// sticky top
navBarHeight: 0,
//
@ -364,21 +494,21 @@
lastScrollTop: 0,
// onPageScroll
isSwitching: false,
searchForm:{
shopId:'',
searchForm: {
shopId: '',
delFlag: 1,
pageNum: 1,
pageSize: '10',
categoryId:''
categoryId: ''
},
menuButtonInfo: {},
isPintuan:true,
isPintuan: true,
groupId: '',
isFaceToFaceGroup: false,
menuList:[{
categoryName:'猜你喜欢',
id:'',
checked:true
menuList: [{
categoryName: '猜你喜欢',
id: '',
checked: true
}]
}
},
@ -407,15 +537,15 @@
sliceMsg1(val) {
var name = '正在有'
let aa = Math.floor(Math.random() * (15 - 5 + 1)) + 1;
name+=aa+'人下单'
name += aa + '人下单'
return name;
},
slicePrice(val){
slicePrice(val) {
let begin = ''
if(val != null){
if (val != null) {
begin = val[0].groupPrice
for(let i = 0;i < val.length;i++){
if(val[i].groupPrice < begin){
for (let i = 0; i < val.length; i++) {
if (val[i].groupPrice < begin) {
begin = val[i].groupPrice
}
}
@ -488,41 +618,41 @@
this.searchForm.categoryId = categoryId;
that.tui.request("/app/product/getShareList", "POST", this.searchForm, false, false).then((res) => {
that.loadStatus = 'nomore';
if (res.code == 200) {
if (that.searchForm.pageNum == 1) {
that.productItem = res.result.records;
} else {
that.productItem = [...that.productItem, ...res.result.records];
}
console.log(res.result.records)
that.total = res.result.pages; // pages =
that.pageNum = that.searchForm.pageNum;
//
// isSwitching_switchCategory isSwitching=true
if (res.result.records.length === 0) {
const currIdx = that.menuList.findIndex(m => m.checked);
if (currIdx !== -1 && currIdx < that.menuList.length - 1) {
//
that.isSwitching = false;
that._switchCategory(currIdx + 1);
if (res.code == 200) {
if (that.searchForm.pageNum == 1) {
that.productItem = res.result.records;
} else {
that.productItem = [...that.productItem, ...res.result.records];
}
console.log(res.result.records)
that.total = res.result.pages; // pages =
that.pageNum = that.searchForm.pageNum;
//
// isSwitching_switchCategory isSwitching=true
if (res.result.records.length === 0) {
const currIdx = that.menuList.findIndex(m => m.checked);
if (currIdx !== -1 && currIdx < that.menuList.length - 1) {
//
that.isSwitching = false;
that._switchCategory(currIdx + 1);
}
}
that.$forceUpdate();
} else {
that.tui.toast(res.message);
return;
}
that.$forceUpdate();
} else {
that.tui.toast(res.message);
return;
}
uni.hideLoading();
}).catch((res) => {});
uni.hideLoading();
}).catch((res) => {});
},
getCategory(id){
getCategory(id) {
let that = this
that.tui.request("/app/productCategory/list", "GET", {
shopId:id
shopId: id
}, false, true).then((res) => {
if (res.code == 200) {
if(res.result.length >0){
for(let i = 0;i<res.result.length;i++){
if (res.result.length > 0) {
for (let i = 0; i < res.result.length; i++) {
res.result[i].checked = false
that.menuList.push(res.result[i])
}
@ -541,7 +671,9 @@
this.isSwitching = true;
this.checkTab(index);
// 400ms200ms200ms
setTimeout(() => { this.isSwitching = false; }, 400);
setTimeout(() => {
this.isSwitching = false;
}, 400);
},
checkTab(index) {
for (let i = 0; i < this.menuList.length; i++) {
@ -556,20 +688,24 @@
// nav-bar
// menuListOffsetTop - navBarHeight 使sticky
const target = this.menuListOffsetTop - this.navBarHeight;
uni.pageScrollTo({ scrollTop: target > 0 ? target : 0, duration: 200 });
uni.pageScrollTo({
scrollTop: target > 0 ? target : 0,
duration: 200
});
},
openPopup(type,index,item){
if(type == 'car'){
openPopup(type, index, item) {
if (type == 'car') {
this.$refs.carPopup.open('bottom')
}else if(type == 'xiadan'){
} else if (type == 'xiadan') {
this.currentItem = item;
// Parse specifications
this.parsedSpecs = [];
if(item.attributeList && item.attributeList !== '{}') {
if (item.attributeList && item.attributeList !== '{}') {
try {
let attrs = typeof item.attributeList === 'string' ? JSON.parse(item.attributeList) : item.attributeList;
for(let key in attrs) {
if(attrs[key] && attrs[key].title && attrs[key].title.length > 0) {
let attrs = typeof item.attributeList === 'string' ? JSON.parse(item.attributeList) : item
.attributeList;
for (let key in attrs) {
if (attrs[key] && attrs[key].title && attrs[key].title.length > 0) {
this.parsedSpecs.push({
name: key,
options: attrs[key].title,
@ -577,15 +713,15 @@
});
}
}
} catch(e) {
} catch (e) {
console.error("Failed to parse specifications", e);
}
}
if(index == 'pintuan'){
if (index == 'pintuan') {
this.isPintuan = true;
// Set default group rule
if(item.productGroupBuyPrices && item.productGroupBuyPrices.length > 0) {
if (item.productGroupBuyPrices && item.productGroupBuyPrices.length > 0) {
this.selectedGroupRule = item.productGroupBuyPrices[0];
} else {
this.selectedGroupRule = {};
@ -594,9 +730,12 @@
} else {
this.isPintuan = false;
// If solo buy and NO specs, add immediately to cart
if(this.parsedSpecs.length === 0) {
if (this.parsedSpecs.length === 0) {
this.addToCart(item, null);
uni.showToast({ title: '已加入购物车', icon: 'none' });
uni.showToast({
title: '已加入购物车',
icon: 'none'
});
} else {
// Open popup to select specs
this.$refs.pintuanPopup.open('bottom');
@ -617,7 +756,10 @@
specChoices[spec.name] = spec.selected;
}
this.addToCart(this.currentItem, specChoices);
uni.showToast({ title: '已加入购物车', icon: 'none' });
uni.showToast({
title: '已加入购物车',
icon: 'none'
});
this.$refs.pintuanPopup.close();
},
submitPintuan(isFaceToFace) {
@ -637,7 +779,9 @@
};
// Directly navigate to checkout
uni.navigateTo({
url: '/package1/buyFood/buyFood?item=' + encodeURIComponent(JSON.stringify(goData)) + '&shopItem=' + encodeURIComponent(JSON.stringify(this.shopItem)) + '&packageFee=' + packageFee
url: '/package1/buyFood/buyFood?item=' + encodeURIComponent(JSON.stringify(goData)) +
'&shopItem=' + encodeURIComponent(JSON.stringify(this.shopItem)) + '&packageFee=' +
packageFee
});
this.$refs.pintuanPopup.close();
},
@ -645,19 +789,23 @@
let specStr = specs ? JSON.stringify(specs) : '';
let cartId = item.id + '_' + specStr;
let existingItem = this.cartItems.find(c => c.cartId === cartId);
if(existingItem) {
if (existingItem) {
existingItem.quantity++;
} else {
let priceToUse = 0;
if(item.attributeListPrice) {
if (item.attributeListPrice) {
try {
let pObj = typeof item.attributeListPrice === 'string' ? JSON.parse(item.attributeListPrice) : item.attributeListPrice;
if(Array.isArray(pObj) && pObj.length > 0) {
let pObj = typeof item.attributeListPrice === 'string' ? JSON.parse(item.attributeListPrice) :
item.attributeListPrice;
if (Array.isArray(pObj) && pObj.length > 0) {
priceToUse = parseFloat(pObj[0].specPrice);
} else {
for(let k in pObj) { priceToUse = parseFloat(pObj[k].specPrice); break; }
for (let k in pObj) {
priceToUse = parseFloat(pObj[k].specPrice);
break;
}
}
} catch(e){}
} catch (e) {}
}
this.cartItems.push({
cartId: cartId,
@ -670,9 +818,9 @@
},
adjustCart(cartId, delta) {
let index = this.cartItems.findIndex(c => c.cartId === cartId);
if(index !== -1) {
if (index !== -1) {
let newQty = this.cartItems[index].quantity + delta;
if(newQty <= 0) {
if (newQty <= 0) {
this.cartItems.splice(index, 1);
} else {
this.cartItems[index].quantity = newQty;
@ -680,17 +828,19 @@
}
},
getSpecDisplayString(specs) {
if(!specs) return '';
if (!specs) return '';
let arr = [];
for(let k in specs) { arr.push(specs[k]); }
for (let k in specs) {
arr.push(specs[k]);
}
return arr.join(',');
},
submitCartCheckout() {
if(this.cartItems.length === 0) {
if (this.cartItems.length === 0) {
this.$refs.warnPopup.open()
return;
}
let totalPackageFee = 0;
for (let cartItem of this.cartItems) {
totalPackageFee += parseFloat(cartItem.item.lunchBox || 0) * cartItem.quantity;
@ -698,7 +848,9 @@
//
uni.navigateTo({
url: '/package1/buyFood/buyFood?cart=' + encodeURIComponent(JSON.stringify(this.cartItems)) + '&shopItem=' + encodeURIComponent(JSON.stringify(this.shopItem)) + '&packageFee=' + totalPackageFee
url: '/package1/buyFood/buyFood?cart=' + encodeURIComponent(JSON.stringify(this.cartItems)) +
'&shopItem=' + encodeURIComponent(JSON.stringify(this.shopItem)) + '&packageFee=' +
totalPackageFee
});
},
goDetail(type) {
@ -706,11 +858,11 @@
uni.navigateTo({
url: '/package1/goods/goodsDetail'
})
}else if(type == 'shopDetail'){
} else if (type == 'shopDetail') {
uni.navigateTo({
url: '/package1/group/groupBuyDetail?item=' + JSON.stringify(this.shopItem)
})
}else if(type == 'shopEvaluate'){
} else if (type == 'shopEvaluate') {
uni.navigateTo({
url: '/package1/group/shopEvaluate?item=' + JSON.stringify(this.shopItem)
})
@ -764,7 +916,7 @@
.title-search {
display: flex;
flex: 1;
background: rgba(255,255,255,0.9);
background: rgba(255, 255, 255, 0.9);
height: 54rpx;
margin-left: 20rpx;
border-radius: 54rpx;
@ -852,7 +1004,7 @@
line-height: 40rpx;
text-align: right;
}
.shop-tag1 {
flex: 1;
line-height: 40rpx;
@ -946,9 +1098,12 @@
z-index: 97;
}
.pintuan-right-cha {}
.goods-member{
.pintuan-right-cha {
line-height: 20px;
padding-left: 5px;
}
.goods-member {
padding: 10px 0;
margin-top: 10px;
border-radius: 10px;
@ -1066,7 +1221,7 @@
.bottom-left {
flex: 1;
display: flex;
padding: 20rpx;
padding: 20rpx;
img {
width: 60rpx;
@ -1074,13 +1229,13 @@
background-size: 100%;
}
}
.bottom-price{
.bottom-price {
margin-left: 40rpx;
font-size: 40rpx;
color: red;
font-weight: 700;
line-height: 110rpx;
font-size: 40rpx;
color: red;
font-weight: 700;
line-height: 110rpx;
}
.bottom-right {
@ -1093,20 +1248,21 @@
background-size: 100%;
}
}
.bottom-dot{
position: absolute;
top: 0;
right: -20rpx;
background: red;
color: #fff;
width: 32rpx;
height: 32rpx;
border-radius: 32rpx;
text-align: center;
line-height: 32rpx;
}
.car-content{
.bottom-dot {
position: absolute;
top: 0;
right: -20rpx;
background: red;
color: #fff;
width: 32rpx;
height: 32rpx;
border-radius: 32rpx;
text-align: center;
line-height: 32rpx;
}
.car-content {
position: relative;
height: 600px;
width: 100%;
@ -1115,23 +1271,24 @@
padding: 10px;
overflow: scroll;
}
.car-close{
.car-close {
width: 30px;
height: 30px;
position: absolute;
top: -40px;
right: 10px;
}
.car-title{
.car-title {
height: 48px;
line-height: 30px;
margin: 0 auto;
font-size: 14px;
font-weight: 700;
}
.num-plus{
.num-plus {
width: 28px;
height: 28px;
font-size: 18px;
@ -1139,25 +1296,28 @@
font-weight: 700;
line-height: 24px;
border-radius: 5px;
background: rgba(0, 35, 28, 1);
color: rgba(166, 255, 234, 1);
}
.num{
.num {
width: 40px;
height: 28px;
text-align: center;
line-height: 28px;
font-size: 14px;
}
.goods-num{
.goods-num {
display: flex;
height: 28px;
flex: 1;
margin-left: 20px;
}
.pintuan0{
.pintuan0 {
width: 90%;
height: 50px;
border-radius: 50px;
@ -1168,7 +1328,8 @@
line-height: 50px;
margin: auto;
}
.pintuan1{
.pintuan1 {
width: 90%;
height: 50px;
line-height: 50px;
@ -1178,18 +1339,20 @@
font-size: 13px;
font-weight: 700;
}
.pintuan2{
.pintuan2 {
flex: 1;
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
}
.spec11{
.spec11 {
height: 48px;
line-height: 48px;
font-size: 14px;
font-weight: 700;
}
.spec222{
.spec222 {
display: inline-block;
padding: 0 10px;
background: #eee;
@ -1200,7 +1363,8 @@
border-radius: 10px;
margin-right: 10px;
}
.spec-check{
.spec-check {
display: inline-block;
padding: 0 10px;
background: rgba(166, 255, 234, 1);
@ -1210,7 +1374,8 @@
border-radius: 10px;
margin-right: 10px;
}
.team1{
.team1 {
width: 77px;
height: 83px;
background: #eee;
@ -1221,7 +1386,8 @@
float: left;
margin-right: 20px;
}
.team-check{
.team-check {
width: 77px;
height: 83px;
background: rgba(166, 255, 234, 1);
@ -1232,24 +1398,27 @@
float: left;
margin-right: 20px;
}
.team11{
.team11 {
margin-top: 10px;
}
.goods-team{
.goods-team {
width: 100%;
min-height: 90px;
}
.list-right {
display: flex;
width: 100%;
padding: 15px 0 15px 15px;
flex: 1;
}
.list-right-img {
height: 40px;
display: flex;
img {
width: 40px;
height: 40px;
@ -1257,7 +1426,7 @@
background-size: 100%;
}
}
.list-weipincheng {
width: 40px;
height: 40px;
@ -1270,7 +1439,7 @@
z-index: 97;
line-height: 40px;
}
.goods-center {
width: 100%;
margin: 0 auto 10px;
@ -1280,11 +1449,12 @@
overflow: hidden;
display: flex;
}
.list-right-cha {
margin-left: 10px;
}
.list-right-price{
.list-right-price {
flex: 1;
text-align: right;
line-height: 40px;
@ -1292,7 +1462,7 @@
font-size: 14px;
font-weight: 700;
}
.list-btn {
background: linear-gradient(90deg, #e3ff96, #a6ffea);
width: 130rpx;
@ -1304,7 +1474,8 @@
line-height: 30px;
margin: 20px;
}
.cha11{
.cha11 {
font-size: 11px;
background: rgba(255, 57, 57, 0.2);
color: red;
@ -1313,7 +1484,8 @@
border-radius: 5px;
margin-bottom: 5px;
}
.menu-list{
.menu-list {
height: 45px;
width: 100%;
overflow-x: scroll;
@ -1326,15 +1498,16 @@
align-items: center;
padding-bottom: 4px;
}
.checked-img{
.checked-img {
width: 90px;
height: 10px;
position: absolute;
bottom: 0;
left: 0;
}
.menu1{
.menu1 {
width: 90px;
height: 35px;
position: relative;

Loading…
Cancel
Save