Explorar o código

Merge branch 'master' of http://git.liuniu946.com/cmy/waterDelivery

lhl %!s(int64=2) %!d(string=hai) anos
pai
achega
0edca26313

+ 28 - 0
api/water.js

@@ -49,4 +49,32 @@ export function use_certificate(data) {
 		data
 	});
 }
+// 获取门店可用时间段
+export function storeday(data) {
+	return request({
+		url: '/api/order/storeday',
+		method: 'get',
+		data
+	});
+}
+// 创建押桶订单
+export function createPledge(data) {
+	return request({
+		url: '/api/pledge/create',
+		method: 'post',
+		data
+	});
+}
+// 
+export function delPledge(data) {
+	return request({
+		url: '/api/order/storeday',
+		method: 'get',
+		data
+	});
+}
+
+
+
+
 

+ 4 - 1
pages/home/order.vue

@@ -80,7 +80,7 @@
 						</view>
 					</view>
 
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+					<uni-load-more v-if="tabItem.orderList.length>0" :status="tabItem.loadingType"></uni-load-more>
 				</scroll-view>
 			</swiper-item>
 		</swiper>
@@ -710,4 +710,7 @@
 			opacity: 0.2;
 		}
 	}
+	/deep/ .empty-content{
+		background: transparent;
+	}
 </style>

+ 300 - 40
pages/order/createOrder.vue

@@ -14,8 +14,8 @@
 			</view>
 		</view>
 		<!-- 地址 -->
-		<navigator v-if="tabCurrentIndex == 1" url="/pages/set/address?source=1" class="address-section">
-			<view class="order-content" v-if="addressData.real_name">
+		<navigator v-if="tabCurrentIndex == 1" url="/pages/set/address?source=1" class="address-section margin-b-30">
+			<view class="order-content " v-if="addressData.real_name">
 				<view class="cen">
 					<view class="top">
 						<text class="name">{{ addressData.real_name }}</text>
@@ -33,7 +33,7 @@
 				</view>
 			</view>
 		</navigator>
-		<navigator v-if="tabCurrentIndex == 2" url="/pages/order/shopList?type=1" class="address-section">
+		<navigator url="/pages/order/shopList?type=1" class="address-section">
 			<view class="shop-box" v-if="shopAddress.name">
 				<view class="shop-top flex">
 					<view class="flex shop-title">
@@ -49,7 +49,7 @@
 						电话:{{ shopAddress.phone }}
 					</view>
 					<text class="shop-address">
-						地区:{{ shopAddress._detailed_address }}
+						地区:{{shopAddress.address+shopAddress.detailed_address}}
 					</text>
 				</view>
 			</view>
@@ -61,7 +61,6 @@
 			</view>
 		</navigator>
 		<view class="goodsList">
-
 			<view class="goods-section" v-for="(ls, ind) in shopList" :key="ind">
 				<!-- 商品列表 -->
 				<view class="g-item">
@@ -84,14 +83,38 @@
 		</view>
 		<!-- 金额明细 -->
 		<view class="yt-list">
-			<view class="yt-list-cell b-b"  v-if="tabCurrentIndex == 2">
-				<text class="cell-tit clamp">姓名</text>
-				<input class="desc" type="text" v-model="addressData.real_name" placeholder="请填写备注信息" placeholder-class="placeholder" />
-			</view>
-			<view class="yt-list-cell b-b"  v-if="tabCurrentIndex == 2">
-				<text class="cell-tit clamp">手机号</text>
-				<input class="desc" type="text" v-model="addressData.phone" placeholder="请填写备注信息" placeholder-class="placeholder" />
+			<view class="yt-list-cell b-b" v-if="certificate_info.num>0">
+				<text class="cell-tit clamp">使用卡券({{certificate_info.num}})</text>
+				<view class="desc">
+					<switch class="switchCard" :checked='certificate_info.checked' style="transform:scale(0.7)"
+						@change="switchChange" />
+				</view>
 			</view>
+			<template v-if="tabCurrentIndex == 1">
+				<view class="yt-list-cell b-b">
+					<text class="cell-tit clamp">送货日期</text>
+					<view @click="openTime" class="desc">
+						<text v-if="day.day">
+							{{timeList[checkedTime].name+day.time}}
+						</text>
+						<text v-else>
+							请选择送货日期
+						</text>
+					</view>
+				</view>
+			</template>
+			<template v-if="tabCurrentIndex == 2">
+				<view class="yt-list-cell b-b">
+					<text class="cell-tit clamp">姓名</text>
+					<input class="desc" type="text" v-model="addressData.real_name" placeholder="请填写姓名"
+						placeholder-class="placeholder" />
+				</view>
+				<view class="yt-list-cell b-b">
+					<text class="cell-tit clamp">手机号</text>
+					<input class="desc" type="text" v-model="addressData.phone" placeholder="请填写手机号"
+						placeholder-class="placeholder" />
+				</view>
+			</template>
 			<view class="yt-list-cell b-b">
 				<text class="cell-tit clamp">运费</text>
 				<text class="cell-tip disabled">{{ Postage }}</text>
@@ -104,7 +127,7 @@
 
 
 		<view class="yt-list">
-			<view class="yt-list-cell b-b" v-if="fx" @click="payType='weixin'">
+			<view class="yt-list-cell b-b" @click="payType='weixin'">
 				<view class="cell-tit flex">
 					<image class="orderIcon" src="../../static/icon/orderWx.png" mode="widthFix"></image>
 					<text class="margin-l-10">微信支付</text>
@@ -133,6 +156,16 @@
 				</image>
 				<view v-else class="noChecked"></view>
 			</view>
+			<view class="yt-list-cell b-b" v-if="!certificate_info.checked" @click="payType='offline'">
+				<view class="cell-tit flex">
+					<image class="orderIcon" src="../../static/icon/yh.png" mode="widthFix"></image>
+					<text class="margin-l-10">线下支付</text>
+				</view>
+				<image class="checked" v-if="payType=='offline'" src="../../static/icon/addressIconXz.png"
+					mode="widthFix">
+				</image>
+				<view v-else class="noChecked"></view>
+			</view>
 		</view>
 
 
@@ -145,6 +178,34 @@
 			</view>
 			<text class="submit" :class="{submitNo:payLoding}" @click="payLoding?'':submit()">提交订单</text>
 		</view>
+
+		<uni-popup class="alertTime" ref="popup" type="bottom">
+			<view class="alert-box position-relative">
+				<view class="alert-title ">
+					选择预计送达时间
+				</view>
+				<view class="tip iconfont iconclose" @click="$refs.popup.close()"></view>
+				<view class="flex">
+					<view class="left-title">
+						<view class="title" :class="{action:checkedTime==ind}" v-for="(item,ind) in  timeList"
+							@click="changeCheckedTime(item,ind)">
+							{{item.name+'('+item.day+')'}}
+						</view>
+					</view>
+					<view class="right-content">
+						<view class="list flex" v-for="(item,ind) in  timeList[checkedTime].list"
+							@click="checkedShopTime(item)">
+							<view class="time">
+								{{item.time}}
+							</view>
+							<view class="checked">
+								剩余:{{item.door_number-item.day_number}}
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</uni-popup>
 	</view>
 </template>
 
@@ -161,6 +222,9 @@
 	import {
 		getUserInfo
 	} from '@/api/user.js';
+	import {
+		storeday
+	} from '@/api/water.js';
 	// #ifdef H5
 	import weixinObj from "@/plugin/jweixin-module/index.js";
 	// #endif
@@ -204,9 +268,63 @@
 				orderId: '', //订单id
 				now_money: 0, //余额
 				onShopId: -1, //默认-1为不存在商家id
-				system_store: [], //到店自提列表仓库
+				// 下单日期
+				day: {
+					day: '',
+					id: '',
+					time: ''
+				},
+				// 当前选中的日期对象
+				checkedTime: 0,
+				// 保存每周日子
+				timeName: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
+				// 保存日期列表
+				timeList: [{
+					name: '今天',
+					day: '',
+					time: '',
+					list: []
+				}, {
+					name: '明天',
+					day: '',
+					time: '',
+					list: []
+				}, {
+					name: '',
+					day: '',
+					time: '',
+					list: []
+				}, {
+					name: '',
+					day: '',
+					time: '',
+					list: []
+				}],
+				// 可使用的水票
+				certificate_info: {
+					id: '',
+					num: 0,
+					checked: false
+				}
 			};
 		},
+		watch: {
+			shopAddress(newValue, oldValue) {
+				console.log(newValue, 'newValue');
+				for (let i = 0; i < this.timeList.length; i++) {
+					const item = this.timeList[i];
+					const day = `${item.time.getFullYear()}-${item.time.getMonth()+1}-${item.time.getDate()}`
+					storeday({
+						store_id: newValue.id,
+						day
+					}).then(({
+						data
+					}) => {
+						item.list = data;
+					});
+				}
+			}
+		},
 		onLoad(option) {
 			// 保存当前商品在购物车中的id
 			this.cartId = option.id;
@@ -216,8 +334,11 @@
 			}
 			this.loadData();
 			this.userinfo();
+			// 初始化送货时间
+			this.timeInit();
 		},
 		computed: {
+			// 计算是否免运费
 			Postage() {
 				let money = +this.moneyAll.storePostage;
 				if (money == 0) {
@@ -229,10 +350,61 @@
 			payAllMoney() {
 				return +this.moneyAll.totalPrice + +this.moneyAll.vipPrice;
 			},
-			...mapState('shop', ['shopDetail']),
-			...mapState(['fx'])
+			...mapState('shop', ['shopDetail'])
 		},
 		methods: {
+			// 是否使用卡券切换
+			switchChange(res) {
+				this.certificate_info.checked = res.detail.value;
+				if (this.payType == 'offline') {
+					this.payType = 'weixin'
+				}
+				// 重新计算价格
+				this.payMoneyNub();
+			},
+			checkedShopTime(item) {
+
+				if (item.door_number - item.day_number == 0) {
+					uni.showModal({
+						title: '提示',
+						content: '该时间段预约已满!',
+						showCancel: false,
+					});
+					return
+				}
+				this.day = item;
+				this.$refs.popup.close();
+			},
+			// 选中的时间对象
+			changeCheckedTime(item, ind) {
+				this.checkedTime = ind;
+			},
+			// 打开弹窗
+			openTime() {
+				// 打开弹出窗
+				this.$refs.popup.open();
+			},
+			// 初始化送货时间
+			timeInit() {
+				// 保存当前时间
+				const startTime = new Date();
+				for (let i = 0; i < this.timeList.length; i++) {
+					const item = this.timeList[i]
+					// 保存今天时间戳
+					item.time = new Date(startTime.getTime() + 86400000 * i);
+					// 获取今日周几
+					item.day = this.timeName[item.time.getDay()];
+					if (!item.name) {
+						// 获取今日日期
+						item.name = `${item.time.getMonth()+1}月${item.time.getDate()}日`
+					}
+				}
+				console.log(this.timeList, 'this.timeList');
+			},
+			// 送货时间修改
+			changeTime(res) {
+				console.log(res);
+			},
 			// 加载用户基础信息
 			userinfo() {
 				getUserInfo({}).then(({
@@ -243,11 +415,16 @@
 			},
 			// 计算支付金额
 			payMoneyNub() {
-				computedOrderkey({
-						orderkey: this.orderKey,
-						useIntegral: 0, //是否积分抵扣
-						addressId: this.addressData.id //地址编号
-					})
+				let updata = {
+					orderkey: this.orderKey,
+					useIntegral: 0, //是否积分抵扣
+					addressId: this.addressData.id //地址编号
+				}
+				// 判断是卡券支付
+				if (this.certificate_info.checked) {
+					updata.use_certificate_id = this.certificate_info.id
+				}
+				computedOrderkey(updata)
 					.then(({
 						data
 					}) => {
@@ -267,15 +444,18 @@
 				confirm({
 					cartId: obj.cartId + '',
 					longitude: uni.getStorageSync('CACHE_LONGITUDE'),
-					latitude:uni.getStorageSync('CACHE_LATITUDE'),
+					latitude: uni.getStorageSync('CACHE_LATITUDE'),
 				}).then(({
 					data
 				}) => {
+					obj.certificate_info.id = data.certificate_info.id;
+					obj.certificate_info.num = data.certificate_info.num;
 					obj.addressData = data.addressInfo || {};
 					obj.shopList = data.cartInfo; //商品列表
 					obj.moneyAll = data.priceGroup; //金额数据
 					obj.orderKey = data.orderKey; //订单key
 					obj.shopAddress = data.system_store; //到店自提列表
+					obj.shopAddress.address = data.system_store.address.join(','); //到店自提列表
 					// 计算金额
 					this.payMoneyNub();
 				});
@@ -296,6 +476,14 @@
 					});
 					return;
 				}
+				if (!obj.day.day) {
+					uni.showModal({
+						title: '提示',
+						content: '请选择送水时间!',
+						showCancel: false,
+					});
+					return
+				}
 
 				uni.showLoading({
 					title: '支付中',
@@ -404,15 +592,14 @@
 			// 初次订单创建
 			firstCreateOrder() {
 				let obj = this;
-				// 获取下单页面数据
-				let prepage = obj;
+				console.log(obj.day, 'obj.day');
 				let data = {
-					real_name: prepage.addressData.real_name, //联系人名称
-					phone: prepage.addressData.phone, //联系人号码
-					addressId: prepage.addressData.id, //支付地址id
+					real_name: obj.addressData.real_name, //联系人名称
+					phone: obj.addressData.phone, //联系人号码
+					addressId: obj.addressData.id, //支付地址id
 					useIntegral: 0, //是否积分抵扣1为是0为否
 					payType: obj.payType, //支付类型  weixin-微信 yue-余额
-					mark: prepage.desc, //备注
+					mark: obj.desc, //备注
 					// #ifdef H5
 					from: 'weixin', //来源
 					// #endif
@@ -423,10 +610,12 @@
 					from: 'app', //来源
 					// #endif
 					shipping_type: obj.tabCurrentIndex, //提货方式 1 快递 2自提
-					store_id:obj.shopAddress.id||''
+					store_id: obj.shopAddress.id || '',
+					day: obj.day.day,
+					door_id: obj.day.door_id
 				};
-				if(obj.tabCurrentIndex == 2) {
-					data.store_id = obj.shopAddress.id
+				if (obj.certificate_info.checked) {
+					data.use_certificate_id = obj.certificate_info.id
 				}
 				// 生成订单
 				createOrderkey(data, obj.orderKey)
@@ -449,7 +638,7 @@
 						// 保存订单号
 						obj.orderId = data.result.orderId;
 						// 判断是否为余额支付
-						if (obj.payType == 'yue') {
+						if (obj.payType == 'yue' || obj.payType == 'offline') {
 							console.log('余额支付', status == 200 && data.status == 'SUCCESS');
 							if (status == 200 && data.status == 'SUCCESS') {
 								obj.paySuccessTo();
@@ -472,9 +661,10 @@
 </script>
 
 <style lang="scss">
-	.content{
+	.content {
 		padding-bottom: 100rpx;
 	}
+
 	.address-section {
 		border-radius: 20rpx;
 		padding: 30rpx;
@@ -700,6 +890,11 @@
 			text-align: right;
 			font-size: $font-base;
 			color: $font-color-light;
+
+			.switchCard {
+				margin-right: -20rpx;
+
+			}
 		}
 	}
 
@@ -820,13 +1015,16 @@
 			}
 		}
 	}
-	.shop-box{
+
+	.shop-box {
 		.shop-top {
 			width: 100%;
-			.shop-title{
+
+			.shop-title {
 				width: 0px;
 				flex-grow: 1;
 				justify-content: flex-start;
+
 				.shopImg {
 					height: 65rpx;
 					width: 65rpx;
@@ -834,12 +1032,14 @@
 					margin-right: 20rpx;
 					flex-shrink: 0;
 				}
-				.shop-name{
+
+				.shop-name {
 					font-weight: bold;
 					font-size: $font-lg;
 				}
 			}
-			.shop-tip{
+
+			.shop-tip {
 				color: #FFF;
 				padding: 5rpx 10rpx;
 				font-size: $font-sm;
@@ -847,10 +1047,70 @@
 				border-radius: 5rpx;
 			}
 		}
-		.shop-content{
-			color:  $font-color-light;
+
+		.shop-content {
+			color: $font-color-light;
 			font-size: $font-sm;
 		}
 	}
-	
+
+	.alertTime {
+		z-index: 1000;
+
+		.alert-box {
+			background-color: #FFF;
+			border-top-right-radius: 20rpx;
+			border-top-left-radius: 20rpx;
+			min-height: 70vh;
+
+			.right-content {
+				width: 70%;
+
+				.list {
+					padding: 20rpx 30rpx;
+					font-size: $font-sm;
+					border-bottom: 1px solid $border-color-light;
+				}
+			}
+
+			.left-title {
+				width: 30%;
+				align-self: flex-start;
+
+				.title {
+					padding: 30rpx;
+					text-align: center;
+					font-weight: bold;
+					font-size: $font-sm;
+					background-color: rgba(246, 246, 246, 1);
+
+					&.action {
+						background-color: #FFF;
+					}
+				}
+			}
+
+			.alert-title {
+				text-align: center;
+				padding: 30rpx;
+				line-height: 1;
+				font-weight: bold;
+			}
+
+			.tip {
+				position: absolute;
+				top: 30rpx;
+				right: 30rpx;
+				color: $font-color-disabled;
+				font-weight: bold;
+			}
+		}
+	}
+
+	/deep/ .uni-switch-input {
+		&.uni-switch-input-checked {
+			border-color: $base-color !important;
+			background-color: $base-color !important;
+		}
+	}
 </style>

+ 4 - 0
pages/order/orderDetail.vue

@@ -81,6 +81,10 @@
 			<text class="tit">优惠券</text>
 			<view class="input">-¥{{ item.coupon_price }}</view>
 		</view>
+		<view class="row b-b flex" v-if="item.use_certificate_num > 0">
+			<text class="tit">水劵</text>
+			<view class="input">-{{ item.use_certificate_num }}张</view>
+		</view>
 		<view class="row b-b flex" v-if="item.use_integral > 0">
 			<text class="tit">积分抵扣</text>
 			<view class="input">-¥{{ item.use_integral }}</view>

+ 2 - 0
pages/set/address.vue

@@ -169,6 +169,8 @@
 						district: data.countyName
 					},
 					detail: data.detailInfo,
+					longitude: data.longitude, //经度
+					latitude:data.latitude, //纬度
 					type: 1
 				}).then(function(e) {
 					uni.showToast({

+ 43 - 22
pages/set/addressManage.vue

@@ -22,7 +22,7 @@
 				</view>
 				<view class="flex listItem" >
 					<view class="flex titleBox">
-						<text class="title">地址</text>
+						<text class="title">省市区</text>
 					</view>
 					<view class="right flex">
 						<pickerAddress class="input" @change="onCityClick">{{addressDetail||'请选择地址'}}</pickerAddress>
@@ -30,27 +30,35 @@
 				</view>
 				<view class="flex listItem" >
 					<view class="flex titleBox">
-						<text class="title">门牌号</text>
+						<text class="title">定位</text>
+					</view>
+					<view class="right flex">
+						<input :disabled='true' class="input" type="text" v-model="addressData.locate_address" placeholder="请选择定位"
+							placeholder-class="placeholder"  @click="openAddress"/>
+					</view>
+				</view>
+				<view class="flex listItem" >
+					<view class="flex titleBox">
+						<text class="title">详细地址</text>
 					</view>
 					<view class="right flex">
 						<input class="input" type="text" v-model="addressData.area" placeholder="楼号、门牌"
 							placeholder-class="placeholder" />
 					</view>
 				</view>
+				<view class="list">
+					<view class="flex listItem" >
+						<view class="flex titleBox">
+							<text class="title">默认</text>
+						</view>
+						<view class="flex" style="justify-content: flex-end; margin-right: -20rpx;">
+							<switch :checked='addressData.default==1' style="transform:scale(0.7)" @change="switchChange"/>
+						</view>
+					</view>
+				</view>
 			</view>
-
 		</view>
-		<uni-list class="margin-t-20 margin-l-30 margin-r-30" style="border-radius: 20rpx;">
-			<uni-list-item
-				title="设为默认"
-				:switch-checked="addressData.default"
-				:show-switch="true"
-				:show-arrow="false"
-				switch-color="#5dbc7c"
-				@switchChange="switchChange"
-			></uni-list-item>
-		</uni-list>
-
+		
 		<view class="base-buttom" @click="confirm">提交</view>
 	</view>
 </template>
@@ -77,7 +85,10 @@
 						district: ''
 					},
 					area: '',
-					default: false
+					default: false,
+					longitude: '', //经度
+					latitude:'', //纬度
+					locate_address:''
 				},
 			};
 		},
@@ -96,9 +107,12 @@
 						city: data.city,
 						district: data.district
 					},
+					longitude: data.longitude, //经度
+					latitude:data.latitude, //纬度
 					area: data.detail,
-					default: data.is_default == 1,
-					id: data.id
+					default: data.is_default,
+					id: data.id,
+					locate_address:data.locate_address
 				};
 				this.addressDetail = data.province + data.city + data.district;
 			}
@@ -119,18 +133,21 @@
 				this.addressDetail = data.join('');
 			},
 			//地图选择地址
-			chooseLocation() {
+			openAddress() {
 				uni.chooseLocation({
 					success: data => {
 						console.log(data);
-						this.addressData.addressName = data.name;
-						this.addressData.address = data.name;
+						this.addressData.area = data.name;
+						this.addressData.locate_address = data.address;
+						this.addressData.longitude = data.longitude;
+						this.addressData.latitude = data.latitude;
+						
 					}
 				});
 			},
 			// 设置是否为默认地址
 			switchChange(e) {
-				this.addressData.default = e.value;
+				this.addressData.default = e.detail.value?1:0;
 			},
 			//提交
 			confirm() {
@@ -165,7 +182,10 @@
 					detail: data.area,
 					is_default: data.default,
 					id: data.id || "",
-					type: 1
+					type: 1,
+					longitude: data.longitude, //经度
+					latitude:data.latitude, //纬度
+					locate_address:data.locate_address
 				}).then(function(e) {
 					obj.$api.prePage().refreshList();
 					uni.showToast({
@@ -226,6 +246,7 @@
 		}
 
 		.titleBox {
+			margin-right: 10rpx;
 			.title {
 				color: $font-color-base;
 				font-size: $font-base;

+ 190 - 77
pages/water/deposit.vue

@@ -1,37 +1,62 @@
 <template>
 	<view class="good-list">
-		<uni-nav-bar class="nav" @clickLeft='back' :border='false' backgroundColor='transparent' leftIcon='left'
-			color='#FFF' title="我的余额" />
-		<view class="good flex" v-for="item in navList[tabCurrentIndex].orderList">
-			<image :src="item.image" mode="" class="good-image"></image>
-			<view class="right">
-				<view class="good-name ">
-					<view class="clamp2">
-						{{item.store_name}}
-					</view>
-				</view>
-				<view class="good-key">
-					{{item.keyword}}
-				</view>
-				<view class="good-price flex">
-					<view class="price">
-						¥{{item.price}}/{{item.unit_name}}
+
+		<view class="flex nav-box">
+			<view class="tab">
+				总计:<text class="font-color-red">{{total_count}}</text>(个)
+			</view>
+			<view class="line"></view>
+			<view class="tab">
+				押金:<text class="font-color-red">{{total_pledge_money}}</text>(元)
+			</view>
+		</view>
+		<view class="deposit-item">
+			<view class="list flex" v-for="(item,index) in navList[tabCurrentIndex].orderList" @click="open(item)">
+				<view class="content">
+					<view class="title">
+						小金康泉矿泉水
 					</view>
-					<navigator :url="'/pages/water/waterDetail?id='+item.id">
-						<view class="xl">
-							立即购买
+					<view class="flex type-list">
+						<view class="ls">
+							余桶:<text class="font-color-red">{{item.remain_num}}</text>
+						</view>
+						<view class="ls">
+							押桶:<text class="font-color-red">{{item.pledge_num}}</text>
+						</view>
+						<view class="ls">
+							借桶:<text class="font-color-red">{{item.borrow_num}}</text>
 						</view>
-					</navigator>
+					</view>
+				</view>
+				<view class="iconfont iconenter">
+
 				</view>
 			</view>
 		</view>
 		<uni-load-more :status="navList[tabCurrentIndex].loadingType"></uni-load-more>
+		<uni-popup ref="popup" type="bottom">
+			<view class="buttomBox">
+				<view class="item borde-b" @click="addBarrel">
+					押桶
+				</view>
+				<view class="item borde-b" @click="delBarrel">
+					退桶
+				</view>
+			</view>
+			<view class="buttomBox" @click="$refs.popup.close()">
+				<view class="item qx">
+					取消
+				</view>
+			</view>
+		</uni-popup>
 	</view>
 </template>
 
 <script>
 	import {
-		certificate
+		certificate,
+		createPledge,
+		delPledge
 	} from '@/api/water.js';
 	export default {
 		data() {
@@ -44,7 +69,11 @@
 					orderList: [],
 					page: 1, //当前页数
 					limit: 10 //每次信息条数
-				}]
+				}],
+				// 保存当前选中的桶对象
+				actionItem: {},
+				total_pledge_money:0,//押金
+				total_count:0,//总数
 			};
 		},
 		onReachBottom() {
@@ -54,6 +83,73 @@
 			this.getGoodList();
 		},
 		methods: {
+			// 押桶
+			addBarrel() {
+				const that = this;
+				uni.showModal({
+					title: '押桶',
+					placeholderText: '请输入押桶数量',
+					editable: true,
+					cancelText: '关闭',
+					confirmText: '押桶',
+					success: res => {
+						if (res.confirm) {
+							createPledge({
+								id:that.actionItem.id,
+								num:res.content,
+								pay_type:'yue'
+							}).then(() => {
+								that.$refs.popup.close();
+								uni.showToast({
+									title: '押桶成功'
+								})
+							}).catch(e => {
+								console.log(e);
+							});
+						}
+					},
+				});
+			},
+			// 退桶
+			delBarrel() {
+				uni.showModal({
+					title: '退桶',
+					placeholderText: '请输入退桶数量',
+					editable: true,
+					cancelText: '关闭',
+					confirmText: '退桶',
+					success: res => {
+						if (res.confirm) {
+							certificate({
+
+							}).then(() => {
+								uni.showToast({
+									title: '退桶成功'
+								})
+							}).catch(e => {
+								console.log(e);
+							});
+						}
+					},
+				});
+			},
+			// 重新加载数据
+			reloadList() {
+				this.navList = [{
+					state: 0,
+					text: '全部',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				}];
+				this.getGoodList();
+			},
+			// 打开选择弹窗
+			open(item) {
+				this.actionItem = item;
+				this.$refs.popup.open()
+			},
 			// 加载数据
 			getGoodList(source) {
 				//这里是将订单挂载到tab列表下
@@ -75,14 +171,19 @@
 				}
 				// 修改当前对象状态为加载中
 				navItem.loadingType = 'loading';
-
-				certificate({})
+				certificate({
+						page: navItem.page,
+						limit: navItem.limit
+					})
 					.then(({
 						data
 					}) => {
+						this.total_pledge_money = data.total_pledge_money;
+						this.total_count = data.total_count;
 						let arr = data.data.map(e => {
 							return e;
 						});
+						
 						navItem.orderList = navItem.orderList.concat(arr);
 						// console.log(navItem.orderList);
 						navItem.page++;
@@ -108,73 +209,85 @@
 
 <style lang="scss">
 	.good-list {
-		padding: 20rpx 28rpx;
+		padding: 30rpx 0;
 		width: 750rpx;
 
-		.good {
-			background: #FFFFFF;
-			box-shadow: 0px 0px 20px 0px rgba(50, 50, 52, 0.06);
-			width: 100%;
-			border-radius: 14rpx;
-			margin-bottom: 20rpx;
-			position: relative;
-			padding: 20rpx;
-
-			.good-image {
-				width: 180rpx;
-				height: 180rpx;
-				background-color: #eee;
-				border-radius: 10rpx;
-				flex-shrink: 0;
+		.nav-box {
+			border-radius: 10rpx;
+			background-color: #FFF;
+			border-bottom: 2px solid $page-color-base;
+
+			.tab {
+				width: 50%;
+				height: 95rpx;
+				text-align: center;
+				flex-shrink: 1;
+				font-size: $font-lg;
+				font-weight: bold;
+				line-height: 95rpx;
+			}
 
+			.line {
+				height: 55rpx;
+				width: 3px;
+				background-color: $page-color-base;
 			}
+		}
+	}
 
-			.right {
-				height: 180rpx;
-				position: relative;
+	.deposit-item {
+		padding: 0 30rpx;
+		background-color: #FFF;
+		line-height: 1;
 
-				.good-name {
-					font-size: 28rpx;
+		.list {
+			border-bottom: 2px solid $page-color-base;
+			padding: 30rpx 0;
+
+			.content {
+				width: 0;
+				flex-grow: 1;
+
+				.title {
+					font-size: $font-lg;
 					font-weight: bold;
-					color: #333333;
-					padding-left: 20rpx;
 				}
 
-				.good-key {
-					font-size: 22rpx;
-					font-weight: 500;
-					color: #999999;
-					padding-left: 20rpx
-				}
+				.type-list {
+					padding-top: 30rpx;
+					font-size: $font-sm;
+					color: $font-color-base;
 
-				.good-price {
-					display: flex;
-					justify-content: space-between;
-					align-items: flex-end;
-					font-size: 28rpx;
-					font-weight: bold;
-					color: #FF1A1A;
-					position: absolute;
-					bottom: 0rpx;
-					padding: 0 20rpx;
-					left: 0;
-					right: 0rpx;
-
-					.xl {
-						background: linear-gradient(90deg, #3C82E6, #5395F5);
-						border-radius: $font-base;
-						padding: 10rpx 20rpx;
-						color: #fff;
+					.ls {
+						width: 33%;
 					}
 				}
 			}
 		}
 	}
-	.nav {
-		position: fixed;
-		top: 0;
-		right: 0;
-		left: 0;
-		z-index: 998;
+
+	.buttomBox {
+		border-radius: 20rpx;
+		margin: 0 $page-row-spacing;
+		margin-bottom: 30rpx;
+		color: $font-color-dark;
+		background-color: #FFFFFF;
+		overflow: hidden;
+
+		.item {
+			line-height: 100rpx;
+			height: 100rpx;
+			text-align: center;
+			font-size: 32rpx;
+			color: $base-color;
+
+			&.qx {
+				color: $color-red;
+			}
+		}
+
+		.border_b {
+			border-bottom: 1px solid $page-color-light;
+		}
 	}
 </style>

+ 5 - 1
pages/water/myWaterList.vue

@@ -44,7 +44,7 @@
 					</view>
 				</view>
 			</view>
-			<uni-load-more :status="navList[tabCurrentIndex].loadingType"></uni-load-more>
+			<uni-load-more v-if="navList[tabCurrentIndex].orderList.length>0" :status="navList[tabCurrentIndex].loadingType"></uni-load-more>
 		</scroll-view>
 
 	</view>
@@ -249,4 +249,8 @@
 			}
 		}
 	}
+	/deep/ .empty-content{
+		background: transparent;
+		position: absolute;
+	}
 </style>

+ 478 - 477
static/css/cmy.css

@@ -1,489 +1,490 @@
 /*初始化类*/
-	@font-face {
-		font-family: 'iconfont';
-		/* project id 1482221 */
-		src: url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.eot');
-		src: url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.eot?#iefix') format('embedded-opentype'),
-			url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.woff2') format('woff2'),
-			url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.woff') format('woff'),
-			url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.ttf') format('truetype'),
-			url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.svg#iconfont') format('svg');
-	}
-
-	.iconfont {
-		font-family: "iconfont" !important;
-		font-size: 34rpx;
-		font-style: normal;
-		-webkit-font-smoothing: antialiased;
-		-webkit-text-stroke-width: 0rpx;
-		-moz-osx-font-smoothing: grayscale;
-	}
-
-	.iconedit:before {
-		content: "\e649";
-	}
-
-	.iconfavorfill:before {
-		content: "\e64b";
-	}
-
-	.iconfavor:before {
-		content: "\e64c";
-	}
-
-	.iconlocation:before {
-		content: "\e651";
-	}
-
-	.iconroundcheckfill:before {
-		content: "\e656";
-	}
-
-	.iconroundcheck:before {
-		content: "\e657";
-	}
-
-	.iconunfold:before {
-		content: "\e661";
-	}
-
-	.iconlikefill:before {
-		content: "\e668";
-	}
-
-	.iconlike:before {
-		content: "\e669";
-	}
-
-	.iconshop:before {
-		content: "\e676";
-	}
-
-	.iconcart:before {
-		content: "\e6af";
-	}
-
-	.icondelete:before {
-		content: "\e6b4";
-	}
-
-	.iconhome:before {
-		content: "\e6b8";
-	}
-
-	.iconcartfill:before {
-		content: "\e6b9";
-	}
-
-	.iconhomefill:before {
-		content: "\e6bb";
-	}
-
-	.iconlock:before {
-		content: "\e6c0";
-	}
-
-	.iconfriendadd:before {
-		content: "\e6ca";
-	}
-
-	.iconfold:before {
-		content: "\e6de";
-	}
-
-	.iconapps:before {
-		content: "\e729";
-	}
-
-	.iconadd:before {
-		content: "\e767";
-	}
-
-	.iconmove:before {
-		content: "\e768";
-	}
-
-	.icontriangledownfill:before {
-		content: "\e79b";
-	}
-
-	.icontriangleupfill:before {
-		content: "\e79c";
-	}
-
-	.iconshaixuan:before {
-		content: "\e74a";
-	}
+@font-face {
+	font-family: 'iconfont';
+	/* project id 1482221 */
+	src: url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.eot');
+	src: url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.eot?#iefix') format('embedded-opentype'),
+		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.woff2') format('woff2'),
+		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.woff') format('woff'),
+		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.ttf') format('truetype'),
+		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.svg#iconfont') format('svg');
+}
+
+.iconfont {
+	font-family: "iconfont" !important;
+	font-size: 34rpx;
+	font-style: normal;
+	-webkit-font-smoothing: antialiased;
+	-webkit-text-stroke-width: 0rpx;
+	-moz-osx-font-smoothing: grayscale;
+}
+
+.iconedit:before {
+	content: "\e649";
+}
+
+.iconfavorfill:before {
+	content: "\e64b";
+}
+
+.iconfavor:before {
+	content: "\e64c";
+}
+
+.iconfold:before {
+	content: "\e6de";
+}
+
+.iconunfold:before {
+	content: "\e661";
+}
+
+.iconenter:after {
+	content: "\e6f8";
+}
+
+.iconlocation:before {
+	content: "\e651";
+}
+
+.iconroundcheckfill:before {
+	content: "\e656";
+}
+
+.iconroundcheck:before {
+	content: "\e657";
+}
+
+.iconlikefill:before {
+	content: "\e668";
+}
+
+.iconlike:before {
+	content: "\e669";
+}
+
+.iconshop:before {
+	content: "\e676";
+}
+
+.iconcart:before {
+	content: "\e6af";
+}
+
+.icondelete:before {
+	content: "\e6b4";
+}
+
+.iconhome:before {
+	content: "\e6b8";
+}
+
+.iconcartfill:before {
+	content: "\e6b9";
+}
+
+.iconhomefill:before {
+	content: "\e6bb";
+}
+
+.iconlock:before {
+	content: "\e6c0";
+}
+
+.iconfriendadd:before {
+	content: "\e6ca";
+}
+
+.iconapps:before {
+	content: "\e729";
+}
+
+.iconadd:before {
+	content: "\e767";
+}
+
+.iconmove:before {
+	content: "\e768";
+}
+
+.icontriangledownfill:before {
+	content: "\e79b";
+}
+
+.icontriangleupfill:before {
+	content: "\e79c";
+}
 
-	.iconyanzhengma:before {
-		content: "\e684";
-	}
+.iconshaixuan:before {
+	content: "\e74a";
+}
 
-	.iconjifen:before {
-		content: "\e60f";
-	}
+.iconyanzhengma:before {
+	content: "\e684";
+}
 
-	.iconwuliuxinxi:before {
-		content: "\e62b";
-	}
+.iconjifen:before {
+	content: "\e60f";
+}
 
-	.iconmessage:before {
-		content: "\e78a";
-	}
+.iconwuliuxinxi:before {
+	content: "\e62b";
+}
 
-	.iconsetting:before {
-		content: "\e78e";
-	}
+.iconmessage:before {
+	content: "\e78a";
+}
 
-	.iconaddition:before {
-		content: "\e6e0";
-	}
+.iconsetting:before {
+	content: "\e78e";
+}
 
-	.iconclose:before {
-		content: "\e6e9";
-	}
+.iconaddition:before {
+	content: "\e6e0";
+}
 
-	.iconenter:after {
-		content: "\e6f8";
-	}
+.iconclose:before {
+	content: "\e6e9";
+}
 
-	.iconprompt:before {
-		content: "\e71b";
-	}
 
-	.iconreturn:before {
-		content: "\e720";
-	}
+.iconprompt:before {
+	content: "\e71b";
+}
 
-	.iconsearch:before {
-		content: "\e741";
-	}
-
-	.iconpengyouquan:before {
-		content: "\e62c";
-	}
-
-	.iconweixin:before {
-		content: "\e60e";
-	}
-
-	.iconzhifubao:before {
-		content: "\e673";
-	}
-
-	.iconyue:before {
-		content: "\e618";
-	}
-
-	.iconweixin1:before {
-		content: "\e622";
-	}
-
-	.iconlock1:before {
-		content: "\e64d";
-	}
-
-	.iconuser:before {
-		content: "\e64e";
-	}
-
-	.iconchenggongtixianshouyi:before {
-		content: "\e64f";
-	}
-
-	.iconviptuiguangdingdan:before {
-		content: "\e650";
-	}
-
-	.icondaifukuan:before {
-		content: "\e652";
-	}
-
-	.icondaijiesuanshouyi:before {
-		content: "\e653";
-	}
-
-	.icondaidakuanshouyi:before {
-		content: "\e654";
-	}
-
-	.icondaifahuo:before {
-		content: "\e655";
-	}
-
-	.icondaishouhuoshouyi:before {
-		content: "\e658";
-	}
-
-	.icondaishouhuo:before {
-		content: "\e659";
-	}
-
-	.iconwuxiaoshouyi:before {
-		content: "\e65a";
-	}
-
-	.icontixianmingxi:before {
-		content: "\e65b";
-	}
-
-	.iconshouyi:before {
-		content: "\e65c";
-	}
-
-	.iconkouchutixianshouxufei:before {
-		content: "\e65d";
-	}
-
-	.iconyishenqingshouyi:before {
-		content: "\e65e";
-	}
-
-	.icontuihuanhuo:before {
-		content: "\e65f";
-	}
-
-	.bg-color-red {
-		background-color: #e93323 !important;
-	}
-
-	/*水平线*/
-	.hr {
-		width: 100%;
-		position: relative;
-		border-bottom: 1px solid #dddddd;
-		/* height: 0.5rpx; */
-	}
-
-	/* 一行显示 */
-	.clamp {
-		overflow: hidden;
-		text-overflow: ellipsis;
-		white-space: nowrap;
-		display: block;
-	}
-
-	/* 二行显示 */
-	.clamp2 {
-		overflow: hidden;
-		text-overflow: ellipsis;
-		display: -webkit-box;
-		-webkit-line-clamp: 2;
-		-webkit-box-orient: vertical;
-	}
-
-	/* 二行显示 */
-	.ellipsis {
-		overflow: hidden;
-		text-overflow: ellipsis;
-		display: -webkit-box;
-		-webkit-box-orient: vertical;
-		-webkit-line-clamp: 2;
-	}
-
-	.common-hover {
-		background: #f5f5f5;
-	}
-
-	/* 角标 */
-	.corner {
-		background-color: #e51c23;
-		position: absolute;
-		right: -18rpx;
-		top: -18rpx;
-		color: #FFFFFF;
-		text-align: center;
-		border-radius: 999px;
-		font-size: 24rpx !important;
-		min-width: 35rpx;
-		min-height: 35rpx;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		line-height: 1;
-	}
-
-	.flex_item {
-		display: flex;
-		align-items: center;
-		/* justify-content: space-between; */
-	}
-
-	/* 左右顶格加上下居中 */
-	.flex-between-center {
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-	}
-
-	/* flex布局-整体居中 */
-	.flex-center {
-		display: flex;
-		align-items: center;
-		justify-content: center;
-	}
-
-	/* flex-开始居中 */
-	.flex-start {
-		display: flex;
-		align-items: center;
-		justify-content: flex-start;
-	}
-
-	/* 一行居中显示 */
-	.flex-line {
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		flex-direction: column;
-	}
-
-	/*文字对齐*/
-	.text-left {
-		text-align: left !important;
-	}
-
-	.text-center {
-		text-align: center !important;
-	}
-
-	.text-justify {
-		text-align: justify !important;
-	}
-
-	.text-right {
-		text-align: right !important;
-	}
-
-	.text-default {
-		color: #212121 !important;
-	}
-
-	.text-white {
-		color: #ffffff !important;
-	}
-
-	.text-primary {
-		color: #00bcd4 !important;
-	}
-
-	.text-success {
-		color: #009688 !important;
-	}
-
-	.text-info {
-		color: #03a9f4 !important;
-	}
-
-	.text-warning {
-		color: #ffc107 !important;
-	}
-
-	.text-danger {
-		color: #e51c23 !important;
-	}
-
-	.text-pink {
-		color: #e91e63 !important;
-	}
-
-	.text-purple {
-		color: #673ab7 !important;
-	}
-
-	.text-indigo {
-		color: #3f51b5 !important;
-	}
-
-	.text-gray {
-		color: #999999 !important;
-	}
-
-	.bg-default {
-		background-color: #f5f5f5 !important;
-	}
-
-	.bg-primary {
-		background-color: #00bcd4 !important;
-	}
-
-	.bg-success {
-		background-color: #009688 !important;
-	}
-
-	.bg-info {
-		background-color: #03a9f4 !important;
-	}
-
-	.bg-warning {
-		background-color: #FFB238 !important;
-	}
-
-	.bg-danger {
-		background-color: #DC4D46 !important;
-	}
-
-	.bg-pink {
-		background-color: #e91e63 !important;
-	}
-
-	.bg-purple {
-		background-color: #673ab7 !important;
-	}
-
-	.bg-indigo {
-		background-color: #3f51b5 !important;
-	}
-
-	.bg-white {
-		background-color: white !important;
-	}
-
-	.bg-gray {
-		background-color: #e3e3e3 !important;
-	}
-
-	/* 边框 */
-	.border-radius-15 {
-		border-radius: 15rpx;
-	}
-
-	.border-radius-10 {
-		border-radius: 10rpx;
-	}
-
-	.border-radius-all {
-		border-radius: 1000rpx;
-	}
-
-	/* 底部边线 */
-	.borde-b {
-		border-bottom: 1px solid #dddddd;
-	}
-
-	/* 弹性盒子 */
-	.flex {
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-	}
-
-	.items-left {
-		justify-content: flex-start;
-	}
-
-	.items-right {
-		justify-content: flex-end;
-	}
-
-	.flex-shrink-false {
-		flex-shrink: 0;
-	}
-
-	.flex-grow-true {
-		flex-grow: 1;
-	}
-
-	.position-relative {
-		position: relative;
-	}
+.iconreturn:before {
+	content: "\e720";
+}
+
+.iconsearch:before {
+	content: "\e741";
+}
+
+.iconpengyouquan:before {
+	content: "\e62c";
+}
+
+.iconweixin:before {
+	content: "\e60e";
+}
+
+.iconzhifubao:before {
+	content: "\e673";
+}
+
+.iconyue:before {
+	content: "\e618";
+}
+
+.iconweixin1:before {
+	content: "\e622";
+}
+
+.iconlock1:before {
+	content: "\e64d";
+}
+
+.iconuser:before {
+	content: "\e64e";
+}
+
+.iconchenggongtixianshouyi:before {
+	content: "\e64f";
+}
+
+.iconviptuiguangdingdan:before {
+	content: "\e650";
+}
+
+.icondaifukuan:before {
+	content: "\e652";
+}
+
+.icondaijiesuanshouyi:before {
+	content: "\e653";
+}
+
+.icondaidakuanshouyi:before {
+	content: "\e654";
+}
+
+.icondaifahuo:before {
+	content: "\e655";
+}
+
+.icondaishouhuoshouyi:before {
+	content: "\e658";
+}
+
+.icondaishouhuo:before {
+	content: "\e659";
+}
+
+.iconwuxiaoshouyi:before {
+	content: "\e65a";
+}
+
+.icontixianmingxi:before {
+	content: "\e65b";
+}
+
+.iconshouyi:before {
+	content: "\e65c";
+}
+
+.iconkouchutixianshouxufei:before {
+	content: "\e65d";
+}
+
+.iconyishenqingshouyi:before {
+	content: "\e65e";
+}
+
+.icontuihuanhuo:before {
+	content: "\e65f";
+}
+
+.bg-color-red {
+	background-color: #e93323 !important;
+}
+
+/*水平线*/
+.hr {
+	width: 100%;
+	position: relative;
+	border-bottom: 1px solid #dddddd;
+	/* height: 0.5rpx; */
+}
+
+/* 一行显示 */
+.clamp {
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: nowrap;
+	display: block;
+}
+
+/* 二行显示 */
+.clamp2 {
+	overflow: hidden;
+	text-overflow: ellipsis;
+	display: -webkit-box;
+	-webkit-line-clamp: 2;
+	-webkit-box-orient: vertical;
+}
+
+/* 二行显示 */
+.ellipsis {
+	overflow: hidden;
+	text-overflow: ellipsis;
+	display: -webkit-box;
+	-webkit-box-orient: vertical;
+	-webkit-line-clamp: 2;
+}
+
+.common-hover {
+	background: #f5f5f5;
+}
+
+/* 角标 */
+.corner {
+	background-color: #e51c23;
+	position: absolute;
+	right: -18rpx;
+	top: -18rpx;
+	color: #FFFFFF;
+	text-align: center;
+	border-radius: 999px;
+	font-size: 24rpx !important;
+	min-width: 35rpx;
+	min-height: 35rpx;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	line-height: 1;
+}
+
+.flex_item {
+	display: flex;
+	align-items: center;
+	/* justify-content: space-between; */
+}
+
+/* 左右顶格加上下居中 */
+.flex-between-center {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+}
+
+/* flex布局-整体居中 */
+.flex-center {
+	display: flex;
+	align-items: center;
+	justify-content: center;
+}
+
+/* flex-开始居中 */
+.flex-start {
+	display: flex;
+	align-items: center;
+	justify-content: flex-start;
+}
+
+/* 一行居中显示 */
+.flex-line {
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	flex-direction: column;
+}
+
+/*文字对齐*/
+.text-left {
+	text-align: left !important;
+}
+
+.text-center {
+	text-align: center !important;
+}
+
+.text-justify {
+	text-align: justify !important;
+}
+
+.text-right {
+	text-align: right !important;
+}
+
+.text-default {
+	color: #212121 !important;
+}
+
+.text-white {
+	color: #ffffff !important;
+}
+
+.text-primary {
+	color: #00bcd4 !important;
+}
+
+.text-success {
+	color: #009688 !important;
+}
+
+.text-info {
+	color: #03a9f4 !important;
+}
+
+.text-warning {
+	color: #ffc107 !important;
+}
+
+.text-danger {
+	color: #e51c23 !important;
+}
+
+.text-pink {
+	color: #e91e63 !important;
+}
+
+.text-purple {
+	color: #673ab7 !important;
+}
+
+.text-indigo {
+	color: #3f51b5 !important;
+}
+
+.text-gray {
+	color: #999999 !important;
+}
+
+.bg-default {
+	background-color: #f5f5f5 !important;
+}
+
+.bg-primary {
+	background-color: #00bcd4 !important;
+}
+
+.bg-success {
+	background-color: #009688 !important;
+}
+
+.bg-info {
+	background-color: #03a9f4 !important;
+}
+
+.bg-warning {
+	background-color: #FFB238 !important;
+}
+
+.bg-danger {
+	background-color: #DC4D46 !important;
+}
+
+.bg-pink {
+	background-color: #e91e63 !important;
+}
+
+.bg-purple {
+	background-color: #673ab7 !important;
+}
+
+.bg-indigo {
+	background-color: #3f51b5 !important;
+}
+
+.bg-white {
+	background-color: white !important;
+}
+
+.bg-gray {
+	background-color: #e3e3e3 !important;
+}
+
+/* 边框 */
+.border-radius-15 {
+	border-radius: 15rpx;
+}
+
+.border-radius-10 {
+	border-radius: 10rpx;
+}
+
+.border-radius-all {
+	border-radius: 1000rpx;
+}
+
+/* 底部边线 */
+.borde-b {
+	border-bottom: 1px solid #dddddd;
+}
+
+/* 弹性盒子 */
+.flex {
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+}
+
+.items-left {
+	justify-content: flex-start;
+}
+
+.items-right {
+	justify-content: flex-end;
+}
+
+.flex-shrink-false {
+	flex-shrink: 0;
+}
+
+.flex-grow-true {
+	flex-grow: 1;
+}
+
+.position-relative {
+	position: relative;
+}

BIN=BIN
static/error/emptyList.png


BIN=BIN
static/error/emptyMyCart.png


BIN=BIN
static/icon/addressIconXz.png


BIN=BIN
static/icon/yh.png


+ 12 - 0
uni_modules/uni-popup/changelog.md

@@ -1,3 +1,15 @@
+## 1.8.3(2023-04-17)
+- 修复 uni-popup 重复打开时的 bug
+## 1.8.2(2023-02-02)
+- uni-popup-dialog 组件新增 inputType 属性
+## 1.8.1(2022-12-01)
+- 修复 nvue 下 v-show 报错
+## 1.8.0(2022-11-29)
+- 优化 主题样式
+## 1.7.9(2022-04-02)
+- 修复 弹出层内部无法滚动的bug
+## 1.7.8(2022-03-28)
+- 修复 小程序中高度错误的bug
 ## 1.7.7(2022-03-17)
 - 修复 快速调用open出现问题的Bug
 ## 1.7.6(2022-02-14)

+ 5 - 1
uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue

@@ -10,7 +10,7 @@
 		</view>
 		<view v-else class="uni-dialog-content">
 			<slot>
-				<input class="uni-dialog-input" v-model="val" type="text" :placeholder="placeholderText" :focus="focus" >
+				<input class="uni-dialog-input" v-model="val" :type="inputType" :placeholder="placeholderText" :focus="focus" >
 			</slot>
 		</view>
 		<view class="uni-dialog-button-group">
@@ -57,6 +57,10 @@
 		mixins: [popup],
 		emits:['confirm','close'],
 		props: {
+			inputType:{
+				type: String,
+				default: 'text'
+			},
 			value: {
 				type: [String, Number],
 				default: ''

+ 4 - 6
uni_modules/uni-popup/components/uni-popup/uni-popup.vue

@@ -1,6 +1,5 @@
 <template>
-	<view v-if="showPopup" class="uni-popup" :class="[popupstyle, isDesktop ? 'fixforpc-z-index' : '']"
-		@touchmove.stop.prevent="clear">
+	<view v-if="showPopup" class="uni-popup" :class="[popupstyle, isDesktop ? 'fixforpc-z-index' : '']">
 		<view @touchstart="touchstart">
 			<uni-transition key="1" v-if="maskShow" name="mask" mode-class="fade" :styles="maskClass"
 				:duration="duration" :show="showTrans" @click="onTap" />
@@ -189,7 +188,7 @@
 					safeAreaInsets
 				} = uni.getSystemInfoSync()
 				this.popupWidth = windowWidth
-				this.popupHeight = windowHeight + windowTop
+				this.popupHeight = windowHeight + (windowTop || 0)
 				// TODO fix by mehaotian 是否适配底部安全区 ,目前微信ios 、和 app ios 计算有差异,需要框架修复
 				if (safeArea && this.safeArea) {
 					// #ifdef MP-WEIXIN
@@ -269,9 +268,8 @@
 
 			open(direction) {
 				// fix by mehaotian 处理快速打开关闭的情况
-				if(this.showPopup){
-					clearTimeout(this.timer)
-					this.showPopup = false
+				if (this.showPopup) {
+					return
 				}
 				let innerType = ['top', 'center', 'bottom', 'left', 'right', 'message', 'dialog', 'share']
 				if (!(direction && innerType.indexOf(direction) !== -1)) {

+ 5 - 8
uni_modules/uni-popup/package.json

@@ -1,7 +1,7 @@
 {
 	"id": "uni-popup",
 	"displayName": "uni-popup 弹出层",
-	"version": "1.7.7",
+	"version": "1.8.3",
 	"description": " Popup 组件,提供常用的弹层",
 	"keywords": [
         "uni-ui",
@@ -17,12 +17,8 @@
 	"directories": {
 		"example": "../../temps/example_temps"
 	},
-	"dcloudext": {
-		"category": [
-			"前端组件",
-			"通用组件"
-		],
-		"sale": {
+    "dcloudext": {
+        "sale": {
 			"regular": {
 				"price": "0.00"
 			},
@@ -38,7 +34,8 @@
 			"data": "无",
 			"permissions": "无"
 		},
-		"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+        "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+        "type": "component-vue"
 	},
 	"uni_modules": {
 		"dependencies": [

+ 2 - 0
uni_modules/uni-transition/changelog.md

@@ -1,3 +1,5 @@
+## 1.3.2(2023-05-04)
+- 修复 NVUE 平台报错的问题
 ## 1.3.1(2021-11-23)
 - 修复 init 方法初始化问题
 ## 1.3.0(2021-11-19)

+ 4 - 1
uni_modules/uni-transition/components/uni-transition/createAnimation.js

@@ -10,7 +10,10 @@ const nvueAnimation = uni.requireNativePlugin('animation')
 class MPAnimation {
 	constructor(options, _this) {
 		this.options = options
-		this.animation = uni.createAnimation(options)
+		// 在iOS10+QQ小程序平台下,传给原生的对象一定是个普通对象而不是Proxy对象,否则会报parameter should be Object instead of ProxyObject的错误
+		this.animation = uni.createAnimation({
+			...options
+		})
 		this.currentStepAnimates = {}
 		this.next = 0
 		this.$ = _this

+ 11 - 2
uni_modules/uni-transition/components/uni-transition/uni-transition.vue

@@ -1,5 +1,10 @@
 <template>
-	<view v-if="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
+  <!-- #ifndef APP-NVUE -->
+  <view v-show="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
+  <!-- #endif -->
+  <!-- #ifdef APP-NVUE -->
+  <view v-if="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
+  <!-- #endif -->
 </template>
 
 <script>
@@ -48,7 +53,11 @@ export default {
 		customClass:{
 			type: String,
 			default: ''
-		}
+		},
+		onceRender:{
+			type:Boolean,
+			default:false
+		},
 	},
 	data() {
 		return {

+ 4 - 7
uni_modules/uni-transition/package.json

@@ -1,7 +1,7 @@
 {
   "id": "uni-transition",
   "displayName": "uni-transition 过渡动画",
-  "version": "1.3.1",
+  "version": "1.3.2",
   "description": "元素的简单过渡动画",
   "keywords": [
     "uni-ui",
@@ -17,11 +17,7 @@
   "directories": {
     "example": "../../temps/example_temps"
   },
-  "dcloudext": {
-    "category": [
-      "前端组件",
-      "通用组件"
-    ],
+"dcloudext": {
     "sale": {
       "regular": {
         "price": "0.00"
@@ -38,7 +34,8 @@
       "data": "无",
       "permissions": "无"
     },
-    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+    "type": "component-vue"
   },
   "uni_modules": {
     "dependencies": ["uni-scss"],