| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251 | <template>	<view>		<!-- 线上订货详情页 -->		<view class="demo-warter">			<u-swiper height="750" :list="goodsDetails.imageList" image="image"></u-swiper>			<view class="demo-info">				<view class="demo-title">					{{goodsDetails.title}}				</view>				<!-- <view class="demo-price">					{{goodsDetails.price}}元				</view> -->				<!-- <view class="demo-tag">					<view class="demo-tag-owner">						自营					</view>					<view class="demo-tag-text">						放心购					</view>				</view> -->				<view class="demo-shop">					库存:{{goodsDetails.count}}				</view>				<view class="demo-count">					<view class="demo-count-seleced">						已选:{{selectedCount}}					</view>					<view class="demo-count-box">						<u-number-box v-model="selectedCount" :min="1" @change="selectedCountChange"></u-number-box>					</view>				</view>			</view>		</view>		<u-sticky :enable="tabEnable" :offset-top="tabOffset">			<u-tabs class="tabCustomStyle" :list="tabList" :is-scroll="false" :current="tabCurrent" @change="tabChange"			 :bg-color="tabBg"></u-tabs>		</u-sticky>		<!-- 这里装商品和详情的内容 -->		<view style="height: 750px;"></view>		<view class="navigation">			<!-- <view class="left">				<view class="item">					<u-icon name="server-fill" :size="40" :color="$u.color['contentColor']"></u-icon>					<view class="text u-line-1">客服</view>				</view>				<view class="item">					<u-icon name="home" :size="40" :color="$u.color['contentColor']"></u-icon>					<view class="text u-line-1">店铺</view>				</view>				<view class="item car">					<u-badge class="car-num" :count="9" type="error" :offset="[-3, -6]"></u-badge>					<u-icon name="shopping-cart" :size="40" :color="$u.color['contentColor']"></u-icon>					<view class="text u-line-1">购物车</view>				</view>			</view> -->			<view class="right">				<view class="cart btn u-line-1" @click="inShopcar">加入购物车</view>				<view class="buy btn u-line-1">立即购买</view>			</view>		</view>	</view></template><script>	export default {		data() {			return {				goodsDetails: {					price: 35,					title: '175/70R14 88T XL SH08 BGSL',					count: '100',					image: 'https://img12.360buyimg.com/n7/jfs/t16642/126/2693663818/450163/6879e8ce/5b06d93bN6305bd94.png',					imageList: [{						price: 35,						title: '175/70R14 88T XL SH08 BGSL',						count: '100',						image: 'https://img12.360buyimg.com/n7/jfs/t16642/126/2693663818/450163/6879e8ce/5b06d93bN6305bd94.png',					}, {						price: 35,						title: '175/70R14 88T XL SH08 BGSL',						count: '100',						image: 'https://img12.360buyimg.com/n7/jfs/t1/47645/22/6120/140457/5d3d17deEec9f8e8d/3687ff03ca89b48c.jpg',					}],				},				selectedCount: 0, //选中的商品数量				tabList: [{					name: '商品'				}, {					name: '详情'				}],				tabCurrent: 0,				tabBg: "#ffffff",				tabEnable: false,				tabOffset: 0			}		},		methods: {			selectedCountChange: function() {},			tabChange: function(params) {				this.tabCurrent = params				console.log(params)			},			inShopcar(){				this.$u.route({					url: 'pages/home/shopping/shopping_car',				})			}		}	}</script><style lang="scss" scoped>	.demo-warter {		border-radius: 8px;		background-color: #ffffff;		position: relative;	}	.demo-info {		margin: 5px;		padding: 8px;	}	.u-close {		position: absolute;		top: 32rpx;		right: 32rpx;	}	.demo-image {		width: 100%;		border-radius: 4px;	}	.demo-title {		font-size: 30rpx;		margin-top: 5px;		color: $u-main-color;	}	.demo-tag {		display: flex;		margin-top: 5px;	}	.demo-tag-owner {		background-color: $u-type-error;		color: #FFFFFF;		display: flex;		align-items: center;		padding: 4rpx 14rpx;		border-radius: 50rpx;		font-size: 20rpx;		line-height: 1;	}	.demo-tag-text {		border: 1px solid $u-type-primary;		color: $u-type-primary;		margin-left: 10px;		border-radius: 50rpx;		line-height: 1;		padding: 4rpx 14rpx;		display: flex;		align-items: center;		border-radius: 50rpx;		font-size: 20rpx;	}	.demo-price {		font-size: 30rpx;		color: $u-type-error;		margin-top: 5px;	}	.demo-shop {		font-size: 22rpx;		color: $u-tips-color;		margin-top: 5px;	}	.demo-count {		display: flex;		font-size: 22rpx;		margin-top: 5px;		justify-content: space-between;		font-weight: 600;	}	.tabCustomStyle {		border-top: 8rpx solid #EFEFEF;		border-bottom: 8rpx solid #EFEFEF;	}	/* 底部提交栏目 */	.navigation {		display: flex;		width: 100%;		margin-top: 100rpx;		border: solid 2rpx #f2f2f2;		background-color: #ffffff;		padding: 16rpx 26rpx;		position: fixed;		bottom: 0;		z-index: 100;		.left {			display: flex;			font-size: 20rpx;			.item {				margin: 0 30rpx;				&.car {					text-align: center;					position: relative;					.car-num {						position: absolute;						top: -10rpx;						right: -10rpx;					}				}			}		}		.right {			display: flex;			font-size: 28rpx;			align-items: center;			width: 100%;			.btn {				line-height: 66rpx;				padding: 0 30rpx;				border-radius: 36rpx;				color: #ffffff;				text-align: center;			}			.cart {				background-color: #ed3f14;				width: 50%;				margin-right: 30rpx;			}			.buy {				width: 50%;				background-color: #ff7900;			}		}	}</style>
 |