Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into xbx
This commit is contained in:
		
						commit
						79ce809325
					
				
							
								
								
									
										280
									
								
								pageC/cart/ConfirmOrder.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										280
									
								
								pageC/cart/ConfirmOrder.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,280 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<view class="order">
 | 
			
		||||
		<view class="info-address" @click="changeAddress">
 | 
			
		||||
			<image src="../static/image/2.png" class="address-icon"></image>
 | 
			
		||||
			<view class="address">
 | 
			
		||||
				<view class="user-info">
 | 
			
		||||
					<view>胖胖</view>
 | 
			
		||||
					<view>18220171014</view>
 | 
			
		||||
				</view>
 | 
			
		||||
				<view class="address-text u-line-2">山东省泰安市泰山区东岳大街与克山路交汇口银山店四楼橙天影视南邻山东省泰安市泰山区东岳大街与克山路交汇口银山店四楼橙天影视南邻</view>
 | 
			
		||||
			</view>
 | 
			
		||||
			<image src="../static/image/1.png" class="right"></image>
 | 
			
		||||
		</view>
 | 
			
		||||
		<view class="main">
 | 
			
		||||
			<view class="goods-info">
 | 
			
		||||
				<view class="store">
 | 
			
		||||
					<image class="avatar"></image>
 | 
			
		||||
					<view>胖胖的店</view>
 | 
			
		||||
					<image src="../static/image/1.png" class="right"></image>
 | 
			
		||||
				</view>
 | 
			
		||||
				<view class="goods">
 | 
			
		||||
					<view v-for="(goods, g_index) in 1" :key="g_index" class="goods-item">
 | 
			
		||||
						<image></image>
 | 
			
		||||
						<view class="info">
 | 
			
		||||
							<view class="name u-line-2">木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子</view>
 | 
			
		||||
							<view class="cart-info">
 | 
			
		||||
								<view class="price">¥99</view>
 | 
			
		||||
								<u-number-box :input-width="38" :input-height="39" :size="22" bg-color="#FFFFFF" color="#FF780F" :index="g_index"></u-number-box>
 | 
			
		||||
							</view>
 | 
			
		||||
						</view>
 | 
			
		||||
					</view>
 | 
			
		||||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
			<view class="order-info">
 | 
			
		||||
				<view>
 | 
			
		||||
					<view class="title">优惠券折扣</view>
 | 
			
		||||
					<view class="value">
 | 
			
		||||
						<view>-¥10.00</view>
 | 
			
		||||
						<image src="../static/image/1.png"></image>
 | 
			
		||||
					</view>
 | 
			
		||||
				</view>
 | 
			
		||||
				<view>
 | 
			
		||||
					<view class="title">配送方式</view>
 | 
			
		||||
					<view class="value">
 | 
			
		||||
						<view>快递</view>
 | 
			
		||||
						<image src="../static/image/1.png"></image>
 | 
			
		||||
					</view>
 | 
			
		||||
				</view>
 | 
			
		||||
				<view>
 | 
			
		||||
					<view class="title">支付方式</view>
 | 
			
		||||
					<view class="value">
 | 
			
		||||
						<view>微信</view>
 | 
			
		||||
						<image src="../static/image/1.png"></image>
 | 
			
		||||
					</view>
 | 
			
		||||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
		</view>
 | 
			
		||||
		<view class="bottom">
 | 
			
		||||
			<view class="left">
 | 
			
		||||
				<view class="title">合计:</view>
 | 
			
		||||
				<view class="price">¥9.80</view>
 | 
			
		||||
			</view>
 | 
			
		||||
			<view class="right">
 | 
			
		||||
				<view class="num">共1件商品</view>
 | 
			
		||||
				<view class="btn" @click="settlement">结算</view>
 | 
			
		||||
			</view>
 | 
			
		||||
		</view>
 | 
			
		||||
	</view>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
	data() {
 | 
			
		||||
		return {}
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		settlement() {
 | 
			
		||||
			uni.navigateTo({
 | 
			
		||||
				url: '/pageE/order/Details'
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		changeAddress() {
 | 
			
		||||
			uni.navigateTo({
 | 
			
		||||
				url: '/pageE/more/Address'
 | 
			
		||||
			});
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.order {
 | 
			
		||||
	min-height: calc(100vh - var(--window-top));
 | 
			
		||||
	background-color: #ECECEC;
 | 
			
		||||
	padding-top: 1rpx;
 | 
			
		||||
	.info-address {
 | 
			
		||||
		padding: 30rpx;
 | 
			
		||||
		display: flex;
 | 
			
		||||
		align-items: center;
 | 
			
		||||
		margin-bottom: 10rpx;
 | 
			
		||||
		background:rgba(255,255,255,1);
 | 
			
		||||
		.address-icon {
 | 
			
		||||
			width: 28rpx;
 | 
			
		||||
			height: 34rpx;
 | 
			
		||||
			margin-right: 31rpx;
 | 
			
		||||
			flex-shrink: 0;
 | 
			
		||||
		}
 | 
			
		||||
		.address {
 | 
			
		||||
			width: 570rpx;
 | 
			
		||||
			.user-info {
 | 
			
		||||
				display: flex;
 | 
			
		||||
				align-items: center;
 | 
			
		||||
				font-size: 28rpx;
 | 
			
		||||
				color: rgba(51,51,51,1);
 | 
			
		||||
				margin-bottom: 20rpx;
 | 
			
		||||
				margin-right: 13rpx;
 | 
			
		||||
			}
 | 
			
		||||
			.address-text {
 | 
			
		||||
				font-size: 24rpx;
 | 
			
		||||
				color: rgba(102,102,102,1);
 | 
			
		||||
				line-height: 42rpx;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		.right {
 | 
			
		||||
			flex-shrink: 0;
 | 
			
		||||
			margin-left: auto;
 | 
			
		||||
			width: 12rpx;
 | 
			
		||||
			height: 22rpx;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	.main {
 | 
			
		||||
		.goods-info {
 | 
			
		||||
			background-color: #ffffff;
 | 
			
		||||
			padding: 30rpx;
 | 
			
		||||
			margin-bottom: 2rpx;
 | 
			
		||||
			.store {
 | 
			
		||||
				display: flex;
 | 
			
		||||
				align-items: center;
 | 
			
		||||
				margin-bottom: 20rpx;
 | 
			
		||||
				.avatar {
 | 
			
		||||
					width: 60rpx;
 | 
			
		||||
					height: 60rpx;
 | 
			
		||||
					border-radius: 50%;
 | 
			
		||||
					border: 1rpx solid #000;
 | 
			
		||||
					margin-right: 15rpx;
 | 
			
		||||
				}
 | 
			
		||||
				> view {
 | 
			
		||||
					font-size: 28rpx;
 | 
			
		||||
					color: rgba(51,51,51,1);
 | 
			
		||||
					margin-right: 15rpx;
 | 
			
		||||
				}
 | 
			
		||||
				.right {
 | 
			
		||||
					flex-shrink: 0;
 | 
			
		||||
					width: 11rpx;
 | 
			
		||||
					height: 22rpx;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			.goods {
 | 
			
		||||
				.goods-item {
 | 
			
		||||
					display: flex;
 | 
			
		||||
					align-items: center;
 | 
			
		||||
					&:not(:last-child) {
 | 
			
		||||
						margin-bottom: 20rpx;
 | 
			
		||||
					}
 | 
			
		||||
					> image {
 | 
			
		||||
						margin-right: 30rpx; 
 | 
			
		||||
						width: 180rpx;
 | 
			
		||||
						height: 160rpx;
 | 
			
		||||
						border-radius: 10rpx;
 | 
			
		||||
						background-color: aqua;
 | 
			
		||||
						flex-shrink: 0;
 | 
			
		||||
					}
 | 
			
		||||
					.info {
 | 
			
		||||
						// width: 418rpx;
 | 
			
		||||
						height: 160rpx;
 | 
			
		||||
						display: flex;
 | 
			
		||||
						flex-direction: column;
 | 
			
		||||
						justify-content: space-between;
 | 
			
		||||
						.name {
 | 
			
		||||
							font-size: 30rpx;
 | 
			
		||||
							color: rgba(51,51,51,1);
 | 
			
		||||
						}
 | 
			
		||||
						.cart-info {
 | 
			
		||||
							display: flex;
 | 
			
		||||
							align-items: center;
 | 
			
		||||
							justify-content: space-between;
 | 
			
		||||
							.price {
 | 
			
		||||
								font-size: 30rpx;
 | 
			
		||||
								font-weight: 500;
 | 
			
		||||
								color: rgba(255,49,49,1);
 | 
			
		||||
							}
 | 
			
		||||
							.u-numberbox {
 | 
			
		||||
								border: 1rpx solid rgba(217,215,215,1);
 | 
			
		||||
								border-radius:4px;
 | 
			
		||||
								/deep/ .u-number-input {
 | 
			
		||||
									margin: 0;
 | 
			
		||||
									color: #333 !important;
 | 
			
		||||
									border: 1rpx #D9D7D7 solid {
 | 
			
		||||
										top: 0px;
 | 
			
		||||
										bottom: 0px;
 | 
			
		||||
									}
 | 
			
		||||
								}
 | 
			
		||||
							}
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		.order-info {
 | 
			
		||||
			> view {
 | 
			
		||||
				height: 98rpx;
 | 
			
		||||
				background: rgba(255,255,255,1);
 | 
			
		||||
				padding: 35rpx 30rpx;
 | 
			
		||||
				display: flex;
 | 
			
		||||
				align-items: center;
 | 
			
		||||
				justify-content: space-between;
 | 
			
		||||
				margin-bottom: 2rpx;
 | 
			
		||||
				.title {
 | 
			
		||||
					font-size: 28rpx;
 | 
			
		||||
					color: rgba(102,102,102,1);
 | 
			
		||||
				}
 | 
			
		||||
				.value {
 | 
			
		||||
					display: flex;
 | 
			
		||||
					align-items: center;
 | 
			
		||||
					font-size: 30rpx;
 | 
			
		||||
					color:rgba(51,51,51,1);
 | 
			
		||||
					> image {
 | 
			
		||||
						width: 12rpx;
 | 
			
		||||
						height: 22rpx;
 | 
			
		||||
						flex-shrink: 0;
 | 
			
		||||
						margin-left: 20rpx;
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	.bottom {
 | 
			
		||||
		padding: 35rpx 30rpx;
 | 
			
		||||
		position: fixed;
 | 
			
		||||
		bottom: 0;
 | 
			
		||||
		left: 0;
 | 
			
		||||
		width: 100%;
 | 
			
		||||
		height: 98rpx;
 | 
			
		||||
		background-color: rgba(255,255,255,1);
 | 
			
		||||
		box-shadow: 0rpx 10rpx 14rpx 2rpx rgba(0, 0, 0, 0.34);
 | 
			
		||||
		display: flex;
 | 
			
		||||
		align-items: center;
 | 
			
		||||
		justify-content: space-between;
 | 
			
		||||
		.left {
 | 
			
		||||
			display: flex;
 | 
			
		||||
			align-items: center;
 | 
			
		||||
			font-size: 30rpx;
 | 
			
		||||
			.title {
 | 
			
		||||
				color:rgba(153,153,153,1);
 | 
			
		||||
				margin-right: 10rpx;
 | 
			
		||||
			}
 | 
			
		||||
			.price {
 | 
			
		||||
				color: #F40E0E;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		.right {
 | 
			
		||||
			display: flex;
 | 
			
		||||
			align-items: center;
 | 
			
		||||
			.num {
 | 
			
		||||
				font-size: 26rpx;
 | 
			
		||||
				color: rgba(153,153,153,1);
 | 
			
		||||
				margin-right: 50rpx;
 | 
			
		||||
			}
 | 
			
		||||
			.btn {
 | 
			
		||||
				width: 160rpx;
 | 
			
		||||
				height: 60rpx;
 | 
			
		||||
				background: rgba(255,120,15,1);
 | 
			
		||||
				border-radius: 30rpx;
 | 
			
		||||
				font-size: 30rpx;
 | 
			
		||||
				color: rgba(255,255,255,1);
 | 
			
		||||
				line-height: 60rpx;
 | 
			
		||||
				text-align: center;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
							
								
								
									
										317
									
								
								pageC/cart/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										317
									
								
								pageC/cart/index.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,317 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<view class="cart">
 | 
			
		||||
		<u-checkbox-group class="cart-main" @change="storeChange">
 | 
			
		||||
			<view v-for="(store, s_index) in list" :key="s_index" class="cart-item">
 | 
			
		||||
				<view class="store">
 | 
			
		||||
					<u-checkbox v-model="store.checked" shape="circle" active-color="#FF780F" icon-size="35" :name="s_index" @change="storeaAloneChange"></u-checkbox>
 | 
			
		||||
					<view class="name">
 | 
			
		||||
						<image></image>
 | 
			
		||||
						<view>胖胖的店</view>
 | 
			
		||||
					</view>
 | 
			
		||||
				</view>
 | 
			
		||||
				<view class="goods">
 | 
			
		||||
					<u-checkbox-group @change="goodsChange($event, s_index)">
 | 
			
		||||
						<view v-for="(goods, g_index) in store.goods" :key="g_index" class="goods-item">
 | 
			
		||||
							<u-checkbox v-model="goods.checked" shape="circle" active-color="#FF780F" icon-size="35" :name="g_index" ></u-checkbox>
 | 
			
		||||
							<image></image>
 | 
			
		||||
							<view class="info">
 | 
			
		||||
								<view class="name u-line-2">木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子</view>
 | 
			
		||||
								<view class="cart-info">
 | 
			
		||||
									<view class="price">¥99</view>
 | 
			
		||||
									<u-number-box :input-width="38" :input-height="39" :size="22" bg-color="#FFFFFF" color="#FF780F" :index="g_index" @minus="reduce($event, s_index)" @plus="plus($event, s_index)"></u-number-box>
 | 
			
		||||
								</view>
 | 
			
		||||
							</view>
 | 
			
		||||
						</view>
 | 
			
		||||
					</u-checkbox-group>
 | 
			
		||||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
		</u-checkbox-group>
 | 
			
		||||
		<view class="balance">
 | 
			
		||||
			<u-checkbox-group>
 | 
			
		||||
				<u-checkbox v-model="checkedAll" shape="circle" active-color="#FF780F" icon-size="35" label-size="30" @change="totalChange">
 | 
			
		||||
					全选
 | 
			
		||||
				</u-checkbox>
 | 
			
		||||
			</u-checkbox-group>
 | 
			
		||||
			<view class="total-price" v-if="status == '编辑'">
 | 
			
		||||
				<view class="title">合计:</view>
 | 
			
		||||
				<view class="value">¥9.80</view>
 | 
			
		||||
			</view>
 | 
			
		||||
			<view class="cart-btn" v-if="status == '编辑'" @click="settlement">结算</view>
 | 
			
		||||
			<view class="delete-btn" v-if="status == '完成'">删除</view>
 | 
			
		||||
		</view>
 | 
			
		||||
	</view>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			status: '编辑',
 | 
			
		||||
			list: [
 | 
			
		||||
				{
 | 
			
		||||
					goods: [
 | 
			
		||||
						{
 | 
			
		||||
							checked: false
 | 
			
		||||
						},
 | 
			
		||||
						{
 | 
			
		||||
							checked: false
 | 
			
		||||
						}
 | 
			
		||||
					],
 | 
			
		||||
					checked: false
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					goods: [
 | 
			
		||||
						{
 | 
			
		||||
							checked: false
 | 
			
		||||
						},
 | 
			
		||||
						{
 | 
			
		||||
							checked: false
 | 
			
		||||
						}
 | 
			
		||||
					],
 | 
			
		||||
					checked: false
 | 
			
		||||
				}
 | 
			
		||||
			],
 | 
			
		||||
			checkedAll: false
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		reduce(value, store) {
 | 
			
		||||
			console.log(value, store)
 | 
			
		||||
		},
 | 
			
		||||
		plus(value, store) {
 | 
			
		||||
			console.log(value, store)
 | 
			
		||||
		},
 | 
			
		||||
		settlement() {
 | 
			
		||||
			uni.navigateTo({
 | 
			
		||||
				url: './ConfirmOrder'
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		totalChange(e) {
 | 
			
		||||
			// 切换所有商品的状态
 | 
			
		||||
			this.list.forEach(store => {
 | 
			
		||||
				store.checked = e.value;
 | 
			
		||||
				store.goods.forEach(goods => {
 | 
			
		||||
					goods.checked = store.checked;
 | 
			
		||||
				})
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
		storeChange() {
 | 
			
		||||
			// 判断所有商家状态
 | 
			
		||||
			let checked = true;
 | 
			
		||||
			this.list.forEach(item => {
 | 
			
		||||
				if(!item.checked) checked = false;
 | 
			
		||||
			})
 | 
			
		||||
			this.checkedAll = checked;
 | 
			
		||||
		},
 | 
			
		||||
		storeaAloneChange(e) {
 | 
			
		||||
			// 切换当前商家的商品状态
 | 
			
		||||
			this.list[e.name].goods.forEach(goods => {
 | 
			
		||||
				goods.checked = e.value;
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
		goodsChange(...value) {
 | 
			
		||||
			// console.log(value)
 | 
			
		||||
			// 判断商品是否全选
 | 
			
		||||
			let checked = true;
 | 
			
		||||
			this.list[value[1]].goods.forEach(item => {
 | 
			
		||||
				if(!item.checked) checked = false;
 | 
			
		||||
			})
 | 
			
		||||
			this.list[value[1]].checked = checked;
 | 
			
		||||
			this.storeChange();
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	onNavigationBarButtonTap(btn) {
 | 
			
		||||
		console.log(btn);
 | 
			
		||||
		// this.status = btn.text;
 | 
			
		||||
		// #ifdef H5
 | 
			
		||||
		if(this.status == '编辑'){
 | 
			
		||||
			this.status = "完成";
 | 
			
		||||
		} else {
 | 
			
		||||
			this.status = "编辑";
 | 
			
		||||
		}
 | 
			
		||||
		console.log(this.status);
 | 
			
		||||
		// #endif
 | 
			
		||||
		if(btn.index == 0){
 | 
			
		||||
			let pages = getCurrentPages();
 | 
			
		||||
			let page = pages[pages.length - 1];
 | 
			
		||||
			// #ifdef APP-PLUS
 | 
			
		||||
			let currentWebview = page.$getAppWebview();
 | 
			
		||||
			let titleObj = currentWebview.getStyle().titleNView;
 | 
			
		||||
			console.log(1);
 | 
			
		||||
			console.log(JSON.stringify(titleObj.buttons[0]));
 | 
			
		||||
			if (!titleObj.buttons) {
 | 
			
		||||
				return;
 | 
			
		||||
			}
 | 
			
		||||
			if(titleObj.buttons[0].text == '编辑'){
 | 
			
		||||
				titleObj.buttons[0].text = "完成";
 | 
			
		||||
			}else{
 | 
			
		||||
				titleObj.buttons[0].text = "编辑";
 | 
			
		||||
			}
 | 
			
		||||
			currentWebview.setStyle({
 | 
			
		||||
				titleNView: titleObj
 | 
			
		||||
			});
 | 
			
		||||
			// #endif
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.cart {
 | 
			
		||||
	padding-bottom: 100rpx;
 | 
			
		||||
	.cart-main {
 | 
			
		||||
		display: block;
 | 
			
		||||
		.cart-item {
 | 
			
		||||
			padding: 40rpx 30rpx;
 | 
			
		||||
			.store {
 | 
			
		||||
				display: flex;
 | 
			
		||||
				align-items: center;
 | 
			
		||||
				margin-bottom: 20rpx;
 | 
			
		||||
				.u-checkbox {
 | 
			
		||||
					margin-right: 20rpx;
 | 
			
		||||
				}
 | 
			
		||||
				.name {
 | 
			
		||||
					display: flex;
 | 
			
		||||
					align-items: center;
 | 
			
		||||
					> image {
 | 
			
		||||
						width: 60rpx;
 | 
			
		||||
						height: 60rpx;
 | 
			
		||||
						border-radius: 50%;
 | 
			
		||||
						border: 1rpx solid #000;
 | 
			
		||||
						margin-right: 15rpx;
 | 
			
		||||
					}
 | 
			
		||||
					> view {
 | 
			
		||||
						font-size: 28rpx;
 | 
			
		||||
						color: rgba(51,51,51,1);
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			.goods {
 | 
			
		||||
				.u-checkbox-group {
 | 
			
		||||
					display: flex;
 | 
			
		||||
					flex-direction: column;
 | 
			
		||||
					.goods-item {
 | 
			
		||||
						display: flex;
 | 
			
		||||
						align-items: center;
 | 
			
		||||
						&:not(:last-child) {
 | 
			
		||||
							margin-bottom: 20rpx;
 | 
			
		||||
						}
 | 
			
		||||
						> image {
 | 
			
		||||
							margin: 0 30rpx 0 20rpx; 
 | 
			
		||||
							width: 180rpx;
 | 
			
		||||
							height: 160rpx;
 | 
			
		||||
							border-radius: 10rpx;
 | 
			
		||||
							background-color: aqua;
 | 
			
		||||
							flex-shrink: 0;
 | 
			
		||||
						}
 | 
			
		||||
						.info {
 | 
			
		||||
							width: 418rpx;
 | 
			
		||||
							height: 160rpx;
 | 
			
		||||
							display: flex;
 | 
			
		||||
							flex-direction: column;
 | 
			
		||||
							justify-content: space-between;
 | 
			
		||||
							.name {
 | 
			
		||||
								font-size: 30rpx;
 | 
			
		||||
								color: rgba(51,51,51,1);
 | 
			
		||||
							}
 | 
			
		||||
							.cart-info {
 | 
			
		||||
								display: flex;
 | 
			
		||||
								align-items: center;
 | 
			
		||||
								justify-content: space-between;
 | 
			
		||||
								.price {
 | 
			
		||||
									font-size: 30rpx;
 | 
			
		||||
									font-weight: 500;
 | 
			
		||||
									color: rgba(255,49,49,1);
 | 
			
		||||
								}
 | 
			
		||||
								.u-numberbox {
 | 
			
		||||
									border: 1rpx solid rgba(217,215,215,1);
 | 
			
		||||
									border-radius:4px;
 | 
			
		||||
									/deep/ .u-number-input {
 | 
			
		||||
										margin: 0;
 | 
			
		||||
										color: #333 !important;
 | 
			
		||||
										border: 1rpx #D9D7D7 solid {
 | 
			
		||||
											top: 0px;
 | 
			
		||||
											bottom: 0px;
 | 
			
		||||
										}
 | 
			
		||||
									}
 | 
			
		||||
								}
 | 
			
		||||
								// .num {
 | 
			
		||||
								// 	display: flex;
 | 
			
		||||
								// 	width: 118rpx;
 | 
			
		||||
								// 	height: 39rpx;
 | 
			
		||||
								// 	border: 1rpx solid rgba(217,215,215,1);
 | 
			
		||||
								// 	border-radius:4px;
 | 
			
		||||
								// 	.reduce, .increase {
 | 
			
		||||
								// 		flex: 1;
 | 
			
		||||
								// 		font-size: 11rpx;
 | 
			
		||||
								// 		color: #FF780F;
 | 
			
		||||
								// 		line-height: 39rpx;
 | 
			
		||||
								// 		text-align: center;
 | 
			
		||||
								// 	}
 | 
			
		||||
								// 	.value {
 | 
			
		||||
								// 		flex: 1;
 | 
			
		||||
								// 		font-size: 22rpx;
 | 
			
		||||
								// 		color:rgba(51,51,51,1);
 | 
			
		||||
								// 		line-height: 39rpx;
 | 
			
		||||
								// 		text-align: center;
 | 
			
		||||
								// 		border: 1rpx #D9D7D7 solid {
 | 
			
		||||
								// 			top: 0px;
 | 
			
		||||
								// 			bottom: 0px;
 | 
			
		||||
								// 		}
 | 
			
		||||
								// 	}
 | 
			
		||||
								// }
 | 
			
		||||
							}
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	.balance {
 | 
			
		||||
		position: fixed;
 | 
			
		||||
		bottom: 0;
 | 
			
		||||
		left: 0;
 | 
			
		||||
		z-index: 9;
 | 
			
		||||
		width: 100%;
 | 
			
		||||
		height: 98rpx;
 | 
			
		||||
		background: rgba(255,255,255,1);
 | 
			
		||||
		display: flex;
 | 
			
		||||
		align-items: center;
 | 
			
		||||
		padding: 30rpx;
 | 
			
		||||
		.total-price {
 | 
			
		||||
			margin-left: auto;
 | 
			
		||||
			font-size: 30rpx;
 | 
			
		||||
			display: flex;
 | 
			
		||||
			align-items: center;
 | 
			
		||||
			.title {
 | 
			
		||||
				color: #333333;
 | 
			
		||||
			}
 | 
			
		||||
			.value {
 | 
			
		||||
				color: #FF3131;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		.cart-btn {
 | 
			
		||||
			margin-left: 50rpx;
 | 
			
		||||
			justify-items: flex-end;
 | 
			
		||||
			width: 160rpx;
 | 
			
		||||
			height: 60rpx;
 | 
			
		||||
			background: rgba(255,120,15,1);
 | 
			
		||||
			border-radius: 30rpx;
 | 
			
		||||
			font-size: 30rpx;
 | 
			
		||||
			color: rgba(255,255,255,1);
 | 
			
		||||
			line-height: 60rpx;
 | 
			
		||||
			text-align: center;
 | 
			
		||||
		}
 | 
			
		||||
		.delete-btn {
 | 
			
		||||
			margin-left: auto;
 | 
			
		||||
			width: 160rpx;
 | 
			
		||||
			height: 60rpx;
 | 
			
		||||
			background: rgba(255,49,49,1);
 | 
			
		||||
			border-radius: 30rpx;
 | 
			
		||||
			font-size: 30rpx;
 | 
			
		||||
			color: rgba(255,255,255,1);
 | 
			
		||||
			line-height: 60rpx;
 | 
			
		||||
			text-align: center;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
							
								
								
									
										265
									
								
								pageC/classify/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										265
									
								
								pageC/classify/index.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,265 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<view class="u-wrap">
 | 
			
		||||
		<view class="u-menu-wrap">
 | 
			
		||||
			<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop"
 | 
			
		||||
			 :scroll-into-view="itemId">
 | 
			
		||||
				<view v-for="(item,index) in tabbar" :key="index" class="u-tab-item" :class="[current == index ? 'u-tab-item-active' : '']"
 | 
			
		||||
				 @tap.stop="swichMenu(index)">
 | 
			
		||||
					<text class="u-line-1">{{item.name}}</text>
 | 
			
		||||
				</view>
 | 
			
		||||
			</scroll-view>
 | 
			
		||||
			<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box" @scroll="rightScroll">
 | 
			
		||||
				<view class="page-view">
 | 
			
		||||
					<view class="class-item" :id="'item' + index" v-for="(item , index) in tabbar" :key="index">
 | 
			
		||||
						<view class="item-title">
 | 
			
		||||
							<text>{{item.name}}</text>
 | 
			
		||||
						</view>
 | 
			
		||||
						<view class="item-container">
 | 
			
		||||
							<view class="thumb-box" v-for="(item1, index1) in item.foods" :key="index1">
 | 
			
		||||
								<image class="item-menu-image" :src="item1.icon" mode=""></image>
 | 
			
		||||
								<view class="item-menu-name">{{item1.name}}</view>
 | 
			
		||||
							</view>
 | 
			
		||||
						</view>
 | 
			
		||||
					</view>
 | 
			
		||||
				</view>
 | 
			
		||||
			</scroll-view>
 | 
			
		||||
		</view>
 | 
			
		||||
	</view>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
	import classifyData from '@/static/js/classify.data.js';
 | 
			
		||||
	export default {
 | 
			
		||||
		data() {
 | 
			
		||||
			return {
 | 
			
		||||
				scrollTop: 0, //tab标题的滚动条位置
 | 
			
		||||
				oldScrollTop: 0,
 | 
			
		||||
				current: 0, // 预设当前项的值
 | 
			
		||||
				menuHeight: 0, // 左边菜单的高度
 | 
			
		||||
				menuItemHeight: 0, // 左边菜单item的高度
 | 
			
		||||
				itemId: '', // 栏目右边scroll-view用于滚动的id
 | 
			
		||||
				tabbar: classifyData,
 | 
			
		||||
				menuItemPos: [],
 | 
			
		||||
				arr: [],
 | 
			
		||||
				scrollRightTop: 0, // 右边栏目scroll-view的滚动条高度
 | 
			
		||||
				timer: null, // 定时器
 | 
			
		||||
				
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		onLoad() {
 | 
			
		||||
			
 | 
			
		||||
		},
 | 
			
		||||
		onReady() {
 | 
			
		||||
			this.getMenuItemTop()
 | 
			
		||||
		},
 | 
			
		||||
		methods: {
 | 
			
		||||
			// 点击左边的栏目切换
 | 
			
		||||
			async swichMenu(index) {
 | 
			
		||||
				if(this.arr.length == 0) {
 | 
			
		||||
					await this.getMenuItemTop();
 | 
			
		||||
				}
 | 
			
		||||
				if (index == this.current) return;
 | 
			
		||||
				this.scrollRightTop = this.oldScrollTop;
 | 
			
		||||
				this.$nextTick(function(){
 | 
			
		||||
					this.scrollRightTop = this.arr[index];
 | 
			
		||||
					this.current = index;
 | 
			
		||||
					this.leftMenuStatus(index);
 | 
			
		||||
				})
 | 
			
		||||
			},
 | 
			
		||||
			// 获取一个目标元素的高度
 | 
			
		||||
			getElRect(elClass, dataVal) {
 | 
			
		||||
				new Promise((resolve, reject) => {
 | 
			
		||||
					const query = uni.createSelectorQuery().in(this);
 | 
			
		||||
					query.select('.' + elClass).fields({
 | 
			
		||||
						size: true
 | 
			
		||||
					}, res => {
 | 
			
		||||
						// 如果节点尚未生成,res值为null,循环调用执行
 | 
			
		||||
						if (!res) {
 | 
			
		||||
							setTimeout(() => {
 | 
			
		||||
								this.getElRect(elClass);
 | 
			
		||||
							}, 10);
 | 
			
		||||
							return;
 | 
			
		||||
						}
 | 
			
		||||
						this[dataVal] = res.height;
 | 
			
		||||
						resolve();
 | 
			
		||||
					}).exec();
 | 
			
		||||
				})
 | 
			
		||||
			},
 | 
			
		||||
			// 观测元素相交状态
 | 
			
		||||
			async observer() {
 | 
			
		||||
				this.tabbar.map((val, index) => {
 | 
			
		||||
					let observer = uni.createIntersectionObserver(this);
 | 
			
		||||
					// 检测右边scroll-view的id为itemxx的元素与right-box的相交状态
 | 
			
		||||
					// 如果跟.right-box底部相交,就动态设置左边栏目的活动状态
 | 
			
		||||
					observer.relativeTo('.right-box', {
 | 
			
		||||
						top: 0
 | 
			
		||||
					}).observe('#item' + index, res => {
 | 
			
		||||
						if (res.intersectionRatio > 0) {
 | 
			
		||||
							let id = res.id.substring(4);
 | 
			
		||||
							this.leftMenuStatus(id);
 | 
			
		||||
						}
 | 
			
		||||
					})
 | 
			
		||||
				})
 | 
			
		||||
			},
 | 
			
		||||
			// 设置左边菜单的滚动状态
 | 
			
		||||
			async leftMenuStatus(index) {
 | 
			
		||||
				this.current = index;
 | 
			
		||||
				// 如果为0,意味着尚未初始化
 | 
			
		||||
				if (this.menuHeight == 0 || this.menuItemHeight == 0) {
 | 
			
		||||
					await this.getElRect('menu-scroll-view', 'menuHeight');
 | 
			
		||||
					await this.getElRect('u-tab-item', 'menuItemHeight');
 | 
			
		||||
				}
 | 
			
		||||
				// 将菜单活动item垂直居中
 | 
			
		||||
				this.scrollTop = index * this.menuItemHeight + this.menuItemHeight / 2 - this.menuHeight / 2;
 | 
			
		||||
			},
 | 
			
		||||
			// 获取右边菜单每个item到顶部的距离
 | 
			
		||||
			getMenuItemTop() {
 | 
			
		||||
				new Promise(resolve => {
 | 
			
		||||
					let selectorQuery = uni.createSelectorQuery();
 | 
			
		||||
					selectorQuery.selectAll('.class-item').boundingClientRect((rects) => {
 | 
			
		||||
						// 如果节点尚未生成,rects值为[](因为用selectAll,所以返回的是数组),循环调用执行
 | 
			
		||||
						if(!rects.length) {
 | 
			
		||||
							setTimeout(() => {
 | 
			
		||||
								this.getMenuItemTop();
 | 
			
		||||
							}, 10);
 | 
			
		||||
							return ;
 | 
			
		||||
						}
 | 
			
		||||
						rects.forEach((rect) => {
 | 
			
		||||
							// 这里减去rects[0].top,是因为第一项顶部可能不是贴到导航栏(比如有个搜索框的情况)
 | 
			
		||||
							this.arr.push(rect.top - rects[0].top);
 | 
			
		||||
							resolve();
 | 
			
		||||
						})
 | 
			
		||||
					}).exec()
 | 
			
		||||
				})
 | 
			
		||||
			},
 | 
			
		||||
			// 右边菜单滚动
 | 
			
		||||
			async rightScroll(e) {
 | 
			
		||||
				this.oldScrollTop = e.detail.scrollTop;
 | 
			
		||||
				if(this.arr.length == 0) {
 | 
			
		||||
					await this.getMenuItemTop();
 | 
			
		||||
				}
 | 
			
		||||
				if(this.timer) return ;
 | 
			
		||||
				if(!this.menuHeight) {
 | 
			
		||||
					await this.getElRect('menu-scroll-view', 'menuHeight');
 | 
			
		||||
				}
 | 
			
		||||
				setTimeout(() => { // 节流
 | 
			
		||||
					this.timer = null;
 | 
			
		||||
					// scrollHeight为右边菜单垂直中点位置
 | 
			
		||||
					let scrollHeight = e.detail.scrollTop + this.menuHeight / 2;
 | 
			
		||||
					for (let i = 0; i < this.arr.length; i++) {
 | 
			
		||||
						let height1 = this.arr[i];
 | 
			
		||||
						let height2 = this.arr[i + 1];
 | 
			
		||||
						// 如果不存在height2,意味着数据循环已经到了最后一个,设置左边菜单为最后一项即可
 | 
			
		||||
						if (!height2 || scrollHeight >= height1 && scrollHeight < height2) {
 | 
			
		||||
							this.leftMenuStatus(i);
 | 
			
		||||
							return ;
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				}, 10)
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
	.u-wrap {
 | 
			
		||||
		height: calc(100vh);
 | 
			
		||||
		/* #ifdef H5 */
 | 
			
		||||
		height: calc(100vh - var(--window-top));
 | 
			
		||||
		/* #endif */
 | 
			
		||||
		display: flex;
 | 
			
		||||
		flex-direction: column;
 | 
			
		||||
	}
 | 
			
		||||
	.u-search-box {
 | 
			
		||||
		padding: 18rpx 30rpx;
 | 
			
		||||
	}
 | 
			
		||||
	.u-menu-wrap {
 | 
			
		||||
		flex: 1;
 | 
			
		||||
		display: flex;
 | 
			
		||||
		overflow: hidden;
 | 
			
		||||
	}
 | 
			
		||||
	.u-search-inner {
 | 
			
		||||
		background-color: rgb(234, 234, 234);
 | 
			
		||||
		border-radius: 100rpx;
 | 
			
		||||
		display: flex;
 | 
			
		||||
		align-items: center;
 | 
			
		||||
		padding: 10rpx 16rpx;
 | 
			
		||||
	}
 | 
			
		||||
	.u-search-text {
 | 
			
		||||
		font-size: 26rpx;
 | 
			
		||||
		color: $u-tips-color;
 | 
			
		||||
		margin-left: 10rpx;
 | 
			
		||||
	}
 | 
			
		||||
	.u-tab-view {
 | 
			
		||||
		width: 200rpx;
 | 
			
		||||
		height: 100%;
 | 
			
		||||
	}
 | 
			
		||||
	.u-tab-item {
 | 
			
		||||
		width: 180rpx;
 | 
			
		||||
		height: 88rpx;
 | 
			
		||||
		border-bottom: 1rpx solid rgba(236,236,236,1);
 | 
			
		||||
		// height: 110rpx;
 | 
			
		||||
		background: rgba(247,247,247,1);
 | 
			
		||||
		box-sizing: border-box;
 | 
			
		||||
		display: flex;
 | 
			
		||||
		align-items: center;
 | 
			
		||||
		justify-content: center;
 | 
			
		||||
		font-size: 28rpx;
 | 
			
		||||
		color: #666666;
 | 
			
		||||
	}
 | 
			
		||||
	.u-tab-item-active {
 | 
			
		||||
		position: relative;
 | 
			
		||||
		color: #FF780F;
 | 
			
		||||
		background: #fff;
 | 
			
		||||
	}
 | 
			
		||||
	// .u-tab-item-active::before {
 | 
			
		||||
	// 	content: "";
 | 
			
		||||
	// 	position: absolute;
 | 
			
		||||
	// 	border-left: 4px solid $u-type-primary;
 | 
			
		||||
	// 	height: 32rpx;
 | 
			
		||||
	// 	left: 0;
 | 
			
		||||
	// 	top: 39rpx;
 | 
			
		||||
	// }
 | 
			
		||||
	.u-tab-view {
 | 
			
		||||
		height: 100%;
 | 
			
		||||
	}
 | 
			
		||||
	.right-box {
 | 
			
		||||
		background-color: rgb(250, 250, 250);
 | 
			
		||||
	}
 | 
			
		||||
	.page-view {
 | 
			
		||||
		padding: 16rpx;
 | 
			
		||||
	}
 | 
			
		||||
	.class-item {
 | 
			
		||||
		margin-bottom: 30rpx;
 | 
			
		||||
		background-color: #fff;
 | 
			
		||||
		padding: 16rpx;
 | 
			
		||||
		border-radius: 8rpx;
 | 
			
		||||
	}
 | 
			
		||||
	.class-item:last-child {
 | 
			
		||||
		min-height: 100vh;
 | 
			
		||||
	}
 | 
			
		||||
	.item-title {
 | 
			
		||||
		font-size: 26rpx;
 | 
			
		||||
		color: #333333;
 | 
			
		||||
	}
 | 
			
		||||
	.item-menu-name {
 | 
			
		||||
		font-weight: normal;
 | 
			
		||||
		font-size: 24rpx;
 | 
			
		||||
		color: #666666;
 | 
			
		||||
	}
 | 
			
		||||
	.item-container {
 | 
			
		||||
		display: flex;
 | 
			
		||||
		flex-wrap: wrap;
 | 
			
		||||
	}
 | 
			
		||||
	.thumb-box {
 | 
			
		||||
		width: 33.333333%;
 | 
			
		||||
		display: flex;
 | 
			
		||||
		align-items: center;
 | 
			
		||||
		justify-content: center;
 | 
			
		||||
		flex-direction: column;
 | 
			
		||||
		margin-top: 20rpx;
 | 
			
		||||
	}
 | 
			
		||||
	.item-menu-image {
 | 
			
		||||
		width: 150rpx;
 | 
			
		||||
		height: 150rpx;
 | 
			
		||||
	}
 | 
			
		||||
</style>
 | 
			
		||||
							
								
								
									
										129
									
								
								pageC/merchant/details.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										129
									
								
								pageC/merchant/details.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,129 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<view class="details">
 | 
			
		||||
		<view class="top">
 | 
			
		||||
			<image></image>
 | 
			
		||||
			<view class="name">店铺名称</view>
 | 
			
		||||
			<view class="info">创建时间:2020年04月10日 | 浙江金华市</view>
 | 
			
		||||
			<view class="num">
 | 
			
		||||
				<view>
 | 
			
		||||
					<view class="value">23435</view>
 | 
			
		||||
					<view class="title">粉丝数</view>
 | 
			
		||||
				</view>
 | 
			
		||||
				<view>
 | 
			
		||||
					<view class="value">23435</view>
 | 
			
		||||
					<view class="title">评价</view>
 | 
			
		||||
				</view>
 | 
			
		||||
				<view>
 | 
			
		||||
					<view class="value">23435</view>
 | 
			
		||||
					<view class="title">信用等级</view>
 | 
			
		||||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
		</view>
 | 
			
		||||
		<view class="bottom">
 | 
			
		||||
			<view class="title">
 | 
			
		||||
				<view>工商执照</view>
 | 
			
		||||
				<image></image>
 | 
			
		||||
			</view>
 | 
			
		||||
			<view class="image-list">
 | 
			
		||||
				<image></image>
 | 
			
		||||
			</view>
 | 
			
		||||
		</view>
 | 
			
		||||
	</view>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
	data() {
 | 
			
		||||
		return {}
 | 
			
		||||
	}
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.details {
 | 
			
		||||
	min-height: calc(100vh - var(--window-top));
 | 
			
		||||
	background-color: #ECECEC;
 | 
			
		||||
	.top {
 | 
			
		||||
		margin-top: 1rpx;
 | 
			
		||||
		padding: 40rpx 80rpx;
 | 
			
		||||
		text-align: center;
 | 
			
		||||
		background-color: #ffffff;
 | 
			
		||||
		> image {
 | 
			
		||||
			width: 140rpx;
 | 
			
		||||
			height: 140rpx;
 | 
			
		||||
			border-radius: 70rpx;
 | 
			
		||||
			margin-bottom: 29rpx;
 | 
			
		||||
			background-color: aqua;
 | 
			
		||||
		}
 | 
			
		||||
		.name {
 | 
			
		||||
			font-size: 28rpx;
 | 
			
		||||
			font-weight: 500;
 | 
			
		||||
			color: rgba(51,51,51,1);
 | 
			
		||||
			margin-bottom: 29rpx;
 | 
			
		||||
		}
 | 
			
		||||
		.info {
 | 
			
		||||
			font-size: 24rpx;
 | 
			
		||||
			color: rgba(51,51,51,1);
 | 
			
		||||
			margin-bottom: 37rpx;
 | 
			
		||||
		}
 | 
			
		||||
		.num {
 | 
			
		||||
			display: flex;
 | 
			
		||||
			justify-content: space-between;
 | 
			
		||||
			> view {
 | 
			
		||||
				text-align: center;
 | 
			
		||||
				color: rgba(51,51,51,1);
 | 
			
		||||
				position: relative;
 | 
			
		||||
				&:not(:last-child)::after {
 | 
			
		||||
					content: "";
 | 
			
		||||
					position: absolute;
 | 
			
		||||
					right: -77rpx;
 | 
			
		||||
					top: 50%;
 | 
			
		||||
					transform: translate(0, -50%);
 | 
			
		||||
					width: 2rpx;
 | 
			
		||||
					height: 60rpx;
 | 
			
		||||
					background: rgba(51,51,51,1);
 | 
			
		||||
				}
 | 
			
		||||
				.value {
 | 
			
		||||
					font-size: 32rpx;
 | 
			
		||||
					font-weight: 500;
 | 
			
		||||
					margin-bottom: 20rpx;
 | 
			
		||||
				}
 | 
			
		||||
				.title {
 | 
			
		||||
					font-size: 24rpx;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	.bottom {
 | 
			
		||||
		.title {
 | 
			
		||||
			padding: 30rpx;
 | 
			
		||||
			display: flex;
 | 
			
		||||
			align-items: center;
 | 
			
		||||
			justify-content: space-between;
 | 
			
		||||
			background-color: #ffffff;
 | 
			
		||||
			margin-bottom: 1rpx;
 | 
			
		||||
			> view {
 | 
			
		||||
				font-size: 30rpx;
 | 
			
		||||
				font-weight: 500;
 | 
			
		||||
				color: rgba(51,51,51,1);
 | 
			
		||||
			}
 | 
			
		||||
			> image {
 | 
			
		||||
				width: 24rpx;
 | 
			
		||||
				height: 14rpx;
 | 
			
		||||
				background-color: aqua;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		.image-list {
 | 
			
		||||
			background-color: #ffffff;
 | 
			
		||||
			padding: 20rpx 30rpx;
 | 
			
		||||
			display: flex;
 | 
			
		||||
			flex-wrap: wrap;
 | 
			
		||||
			justify-content: space-between;
 | 
			
		||||
			> image {
 | 
			
		||||
				width: 239rpx;
 | 
			
		||||
				height: 170rpx;
 | 
			
		||||
				flex-shrink: 0;
 | 
			
		||||
				background-color: aqua;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
							
								
								
									
										222
									
								
								pageC/merchant/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										222
									
								
								pageC/merchant/index.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,222 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<view class="merchant">
 | 
			
		||||
		<view v-if="show">
 | 
			
		||||
			<view>
 | 
			
		||||
				<image></image>
 | 
			
		||||
				<view>消息</view>
 | 
			
		||||
			</view>
 | 
			
		||||
			<view>
 | 
			
		||||
				<image></image>
 | 
			
		||||
				<view>首页</view>
 | 
			
		||||
			</view>
 | 
			
		||||
			<view>
 | 
			
		||||
				<image></image>
 | 
			
		||||
				<view>我的</view>
 | 
			
		||||
			</view>
 | 
			
		||||
		</view>
 | 
			
		||||
		<view class="top">
 | 
			
		||||
			<image></image>
 | 
			
		||||
			<view class="info">
 | 
			
		||||
				<view class="name u-line-1">小米官方旗舰店</view>
 | 
			
		||||
				<view class="num">粉丝数:234</view>
 | 
			
		||||
			</view>
 | 
			
		||||
			<view class="btn">
 | 
			
		||||
				<image></image>
 | 
			
		||||
				<view>{{ 0 ? "关注" : "已关注" }}</view>
 | 
			
		||||
			</view>
 | 
			
		||||
		</view>
 | 
			
		||||
		<view class="follow">
 | 
			
		||||
			<view class="title">关注</view>
 | 
			
		||||
			<scroll-view scroll-x class="list">
 | 
			
		||||
				<view class="list-items">
 | 
			
		||||
					<view v-for="(item, index) in 9" :key="index" class="item">
 | 
			
		||||
						<image></image>
 | 
			
		||||
						<view class="nickname u-line-1">用户昵称</view>
 | 
			
		||||
					</view>
 | 
			
		||||
				</view>
 | 
			
		||||
			</scroll-view>
 | 
			
		||||
		</view>
 | 
			
		||||
		<view class="main">
 | 
			
		||||
			<view class="classify" v-if="cur==0">
 | 
			
		||||
				111
 | 
			
		||||
			</view>
 | 
			
		||||
			<view class="list" v-if="cur==1">
 | 
			
		||||
				222
 | 
			
		||||
			</view>
 | 
			
		||||
		</view>
 | 
			
		||||
		<view class="tabbar">
 | 
			
		||||
			<view @click="cur=0">
 | 
			
		||||
				<image></image>
 | 
			
		||||
				<view>商品分类</view>
 | 
			
		||||
			</view>
 | 
			
		||||
			<view @click="cur=1">
 | 
			
		||||
				<image></image>
 | 
			
		||||
				<view>商品列表</view>
 | 
			
		||||
			</view>
 | 
			
		||||
			<view @click="toDetailsPage">
 | 
			
		||||
				<image></image>
 | 
			
		||||
				<view>店铺信息</view>
 | 
			
		||||
			</view>
 | 
			
		||||
			<view>
 | 
			
		||||
				<image></image>
 | 
			
		||||
				<view>联系客服</view>
 | 
			
		||||
			</view>
 | 
			
		||||
		</view>
 | 
			
		||||
	</view>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			show: false,
 | 
			
		||||
			cur: 0
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		toDetailsPage() {
 | 
			
		||||
			uni.navigateTo({
 | 
			
		||||
				url: './details'
 | 
			
		||||
			});
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.merchant {
 | 
			
		||||
	min-height: 100vh;
 | 
			
		||||
	background-color: #ECECEC;
 | 
			
		||||
	padding-top: calc(350rpx - var(--window-top));
 | 
			
		||||
	.top {
 | 
			
		||||
		position: fixed;
 | 
			
		||||
		top: 0;
 | 
			
		||||
		left: 0;
 | 
			
		||||
		z-index: 9;
 | 
			
		||||
		width: 750rpx;
 | 
			
		||||
		height: 350rpx;
 | 
			
		||||
		background-color: #999999;
 | 
			
		||||
		display: flex;
 | 
			
		||||
		align-items: center;
 | 
			
		||||
		padding: 168rpx 60rpx 0 30rpx;
 | 
			
		||||
		> image {
 | 
			
		||||
			margin-right: 40rpx;
 | 
			
		||||
			width: 140rpx;
 | 
			
		||||
			height: 140rpx;
 | 
			
		||||
			border-radius: 50%;
 | 
			
		||||
			background-color: aqua;
 | 
			
		||||
		}
 | 
			
		||||
		.info {
 | 
			
		||||
			width: 220rpx;
 | 
			
		||||
			color: rgba(255,255,255,1);
 | 
			
		||||
			.name {
 | 
			
		||||
				margin-bottom: 30rpx;
 | 
			
		||||
				font-size: 28rpx;
 | 
			
		||||
				font-weight: 500;
 | 
			
		||||
			}
 | 
			
		||||
			.num {
 | 
			
		||||
				font-size: 24rpx;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		.btn {
 | 
			
		||||
			margin-left: auto;
 | 
			
		||||
			width: 162rpx;
 | 
			
		||||
			height: 60rpx;
 | 
			
		||||
			border: 2rpx solid rgba(255,255,255,1);
 | 
			
		||||
			border-radius: 30rpx;
 | 
			
		||||
			display: flex;
 | 
			
		||||
			align-items: center;
 | 
			
		||||
			justify-content: center;
 | 
			
		||||
			> image {
 | 
			
		||||
				width: 28rpx;
 | 
			
		||||
				height: 28rpx;
 | 
			
		||||
				flex-shrink: 0;
 | 
			
		||||
				margin-right: 14rpx;
 | 
			
		||||
				background-color: aqua;
 | 
			
		||||
			}
 | 
			
		||||
			> view {
 | 
			
		||||
				white-space: nowrap;
 | 
			
		||||
				font-size: 26rpx;
 | 
			
		||||
				color: rgba(255,255,255,1);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	.follow {
 | 
			
		||||
		background-color: #ffffff;
 | 
			
		||||
		width: 100%;
 | 
			
		||||
		margin-bottom: 20rpx;
 | 
			
		||||
		height: 140rpx;
 | 
			
		||||
		display: flex;
 | 
			
		||||
		align-items: center;
 | 
			
		||||
		padding: 20rpx 30rpx;
 | 
			
		||||
		.title {
 | 
			
		||||
			position: relative;
 | 
			
		||||
			font-size: 30rpx;
 | 
			
		||||
			font-weight: 500;
 | 
			
		||||
			color: rgba(51,51,51,1);
 | 
			
		||||
			margin: 0 30rpx;
 | 
			
		||||
			&::before {
 | 
			
		||||
				content: "";
 | 
			
		||||
				position: absolute;
 | 
			
		||||
				left: -14rpx;
 | 
			
		||||
				top: 0;
 | 
			
		||||
				width: 6rpx;
 | 
			
		||||
				height: 30rpx;
 | 
			
		||||
				background: rgba(255,120,15,1);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		.list {
 | 
			
		||||
			width: 570rpx;
 | 
			
		||||
			display: flex;
 | 
			
		||||
			align-items: center;
 | 
			
		||||
			.list-items {
 | 
			
		||||
				display: flex;
 | 
			
		||||
				.item {
 | 
			
		||||
					&:not(:last-child) {
 | 
			
		||||
						margin-right: 35rpx;
 | 
			
		||||
					}
 | 
			
		||||
					text-align: center;
 | 
			
		||||
					width: 90rpx;
 | 
			
		||||
					> image {
 | 
			
		||||
						width: 60rpx;
 | 
			
		||||
						height: 60rpx;
 | 
			
		||||
						border-radius: 50%;
 | 
			
		||||
						flex-shrink: 0;
 | 
			
		||||
						margin-bottom: 20rpx;
 | 
			
		||||
						background-color: aqua;
 | 
			
		||||
					}
 | 
			
		||||
					.nickname {
 | 
			
		||||
						font-size: 22rpx;
 | 
			
		||||
						color: rgba(51,51,51,1);
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	.tabbar {
 | 
			
		||||
		border-top: 1rpx #DBDADA solid;
 | 
			
		||||
		width: 100%;
 | 
			
		||||
		height: 98rpx;
 | 
			
		||||
		background: rgb(95, 64, 64);
 | 
			
		||||
		display: flex;
 | 
			
		||||
		padding: 10rpx 55rpx;
 | 
			
		||||
		position: fixed;
 | 
			
		||||
		bottom: 0;
 | 
			
		||||
		left: 0;
 | 
			
		||||
		z-index: 9;
 | 
			
		||||
		> view {
 | 
			
		||||
			flex: 1;
 | 
			
		||||
			text-align: center;
 | 
			
		||||
			> image {
 | 
			
		||||
				flex-shrink: 0;
 | 
			
		||||
				width: 40rpx;
 | 
			
		||||
				height: 40rpx;
 | 
			
		||||
				margin-bottom: 15rpx;
 | 
			
		||||
				background-color: aqua;
 | 
			
		||||
			}
 | 
			
		||||
			> view {
 | 
			
		||||
				font-size: 24rpx;
 | 
			
		||||
				color: rgba(153,153,153,1);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								pageC/static/image/1.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								pageC/static/image/1.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 1.7 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								pageC/static/image/2.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								pageC/static/image/2.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 4.3 KiB  | 
@ -27,7 +27,7 @@
 | 
			
		||||
			</swiper-item>
 | 
			
		||||
			<swiper-item class="swiper-item">
 | 
			
		||||
				<scroll-view scroll-y class="coupon">
 | 
			
		||||
					<view v-for="(item, index) in 3" :key="index" class="coupon-item">
 | 
			
		||||
					<view v-for="(item, index) in 13" :key="index" class="coupon-item">
 | 
			
		||||
						<img src="../static/mine/23.png" />
 | 
			
		||||
						<view class="coupon-main">
 | 
			
		||||
							<view class="coupon-title">萌店十元优惠券</view>
 | 
			
		||||
@ -43,7 +43,7 @@
 | 
			
		||||
			</swiper-item>
 | 
			
		||||
			<swiper-item class="swiper-item">
 | 
			
		||||
				<scroll-view scroll-y class="details">
 | 
			
		||||
					<view v-for="(item, index) in 6" :key="index" class="details-item">
 | 
			
		||||
					<view v-for="(item, index) in 16" :key="index" class="details-item">
 | 
			
		||||
						<view class="item-left">
 | 
			
		||||
							<view class="item-title">积分商城兑换礼品</view>
 | 
			
		||||
							<view class="item-date">2020-03-11</view>
 | 
			
		||||
@ -132,6 +132,7 @@ export default {
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		.coupon {
 | 
			
		||||
			height: 100%;
 | 
			
		||||
			.coupon-item {
 | 
			
		||||
				padding: 30rpx;
 | 
			
		||||
				background-color: #ffffff;
 | 
			
		||||
@ -183,6 +184,7 @@ export default {
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		.details {
 | 
			
		||||
			height: 100%;
 | 
			
		||||
			.details-item {
 | 
			
		||||
				background-color: #ffffff;
 | 
			
		||||
				padding: 23rpx 30rpx;
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										122
									
								
								pages.json
									
									
									
									
									
								
							
							
						
						
									
										122
									
								
								pages.json
									
									
									
									
									
								
							@ -82,6 +82,128 @@
 | 
			
		||||
				}
 | 
			
		||||
			]
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"root": "pageC",
 | 
			
		||||
			"pages": [
 | 
			
		||||
				{
 | 
			
		||||
					"path": "classify/index",
 | 
			
		||||
					"style": {
 | 
			
		||||
						"app-plus": {
 | 
			
		||||
							"titleNView": {
 | 
			
		||||
								"titleColor": "#333333",
 | 
			
		||||
								"backgroundColor": "#FFFFFF",
 | 
			
		||||
								"buttons": [
 | 
			
		||||
									{  
 | 
			
		||||
										"type":"none",
 | 
			
		||||
										"text":"搜索",
 | 
			
		||||
										"float":"right",
 | 
			
		||||
										"fontSize":"16"
 | 
			
		||||
									},
 | 
			
		||||
									{  
 | 
			
		||||
										"type":"none",
 | 
			
		||||
										"text":"\ue582",
 | 
			
		||||
										"float":"left",
 | 
			
		||||
										"fontSize":"16"
 | 
			
		||||
									}
 | 
			
		||||
								],
 | 
			
		||||
								"searchInput": {
 | 
			
		||||
									"align": "left",
 | 
			
		||||
									"borderRadius": "15px",
 | 
			
		||||
									"placeholder": "搜索您需要的商品",
 | 
			
		||||
									"backgroundColor": "rgb(236,236,236)",
 | 
			
		||||
									"disabled": true
 | 
			
		||||
								}
 | 
			
		||||
							}
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					"path": "cart/index",
 | 
			
		||||
					"style": {
 | 
			
		||||
						"navigationBarTitleText": "购物车",
 | 
			
		||||
						"app-plus": {
 | 
			
		||||
							"titleSize": "36px",
 | 
			
		||||
							"titleNView": {
 | 
			
		||||
								"titleColor": "#333333",
 | 
			
		||||
								"backgroundColor": "#FFFFFF",
 | 
			
		||||
								"buttons": [
 | 
			
		||||
									{  
 | 
			
		||||
										"type":"none",
 | 
			
		||||
										"text":"编辑",
 | 
			
		||||
										"float":"right",
 | 
			
		||||
										"fontSize":"14"
 | 
			
		||||
									}
 | 
			
		||||
								]
 | 
			
		||||
							}
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					"path": "merchant/index",
 | 
			
		||||
					"style": {
 | 
			
		||||
						"app-plus": {
 | 
			
		||||
							"titleSize": "36px",
 | 
			
		||||
							"titleNView": {
 | 
			
		||||
								"titleColor": "#333333",
 | 
			
		||||
								"backgroundColor": "rgba(255,255,255,0)",
 | 
			
		||||
								"buttons": [
 | 
			
		||||
									{  
 | 
			
		||||
										"type":"none",
 | 
			
		||||
										"text":"...",
 | 
			
		||||
										"float":"right",
 | 
			
		||||
										"fontSize":"16"
 | 
			
		||||
									},
 | 
			
		||||
									{
 | 
			
		||||
										"type":"none",
 | 
			
		||||
										"text":"\ue582",
 | 
			
		||||
										"float":"right",
 | 
			
		||||
										"fontSize":"16"
 | 
			
		||||
									}
 | 
			
		||||
								],
 | 
			
		||||
								"searchInput": {
 | 
			
		||||
									"align": "left",
 | 
			
		||||
									"borderRadius": "15px",
 | 
			
		||||
									"placeholder": "搜索您需要的商品",
 | 
			
		||||
									"backgroundColor": "rgb(236,236,236)",
 | 
			
		||||
									"disabled": true
 | 
			
		||||
								}
 | 
			
		||||
							}
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					"path": "merchant/details",
 | 
			
		||||
					"style": {
 | 
			
		||||
						"navigationBarTitleText": "店铺信息",
 | 
			
		||||
						"app-plus": {
 | 
			
		||||
							"titleSize": "36px",
 | 
			
		||||
							"titleNView": {
 | 
			
		||||
								"titleColor": "#333333",
 | 
			
		||||
								"backgroundColor": "#FFFFFF"
 | 
			
		||||
							}
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					"path": "cart/ConfirmOrder",
 | 
			
		||||
					"style": {
 | 
			
		||||
						"navigationBarTitleText": "确认订单",
 | 
			
		||||
						"app-plus": {
 | 
			
		||||
							"titleSize": "36px",
 | 
			
		||||
							"titleNView": {
 | 
			
		||||
								"titleColor": "#333333",
 | 
			
		||||
								"backgroundColor": "#FFFFFF"
 | 
			
		||||
							}
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				
 | 
			
		||||
				}
 | 
			
		||||
			]
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"root": "pageE",
 | 
			
		||||
			"pages":[
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1087
									
								
								static/js/classify.data.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1087
									
								
								static/js/classify.data.js
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user