hwq 1 年間 前
コミット
baba2b08b3
5 ファイル変更199 行追加175 行削除
  1. 3 2
      pages/index/index.vue
  2. 8 13
      pages/order/createOrder.vue
  3. 1 1
      pages/order/order.vue
  4. 186 158
      pages/set/address.vue
  5. 1 1
      pages/user/withdrawal.vue

+ 3 - 2
pages/index/index.vue

@@ -148,7 +148,7 @@
 				swiperLength: 0,
 				carouselList: [], //轮播列表
 				page: 1,
-				limit: 100,
+				limit: 10,
 				loadingType: 'more',
 				firstList: [],
 				shareImage: '',
@@ -220,7 +220,7 @@
 		},
 		onShow: function() {
 			this.page = 1;
-			this.limit = 100;
+			this.limit = 10;
 			this.loadingType = 'more';
 			this.firstList = []
 			this.loadData();
@@ -257,6 +257,7 @@
 				}) => {
 					console.log(data, '123456');
 					obj.firstList = obj.firstList.concat(data.list)
+					obj.page++
 					if (obj.limit == data.list.length) {
 						obj.loadingType = 'more'
 					} else {

ファイルの差分が大きいため隠しています
+ 8 - 13
pages/order/createOrder.vue


+ 1 - 1
pages/order/order.vue

@@ -59,7 +59,7 @@
 							实付款
 							<text class="price">{{ moneyNum(item.pay_price)}}</text>
 						</view>
-						<view class="action-box b-t" v-if="item.status != 5 && item.status != 0">
+						<view class="action-box b-t" v-if="item.status != 5 ">
 							<button v-if="item._status._title == '未支付'" class="action-btn"
 								@click.stop="cancelOrder(item)">取消订单</button>
 							<button v-if="item._status._title == '未支付'" @click.stop="orderPay(item)"

+ 186 - 158
pages/set/address.vue

@@ -7,12 +7,14 @@
 					<text class="mobile">{{ item.phone }}</text>
 				</view>
 				<view class="u-box">
-					<text class="address">{{ item.province + item.city + item.district }} {{ item.detail }}</text>
+					<text class="address">{{ item.province + item.city + item.district }} {{item.town}}
+						{{ item.detail }}</text>
 				</view>
 			</view>
 			<view class="buttom">
 				<view class="default-buttom" @click.stop="defaultUp(item,index)">
-					<view class="iconfont iconroundcheckfill checkbox" :class="{ checked: item.is_default == 1 }"></view>
+					<view class="iconfont iconroundcheckfill checkbox" :class="{ checked: item.is_default == 1 }">
+					</view>
 					<text class="text">设为默认地址</text>
 				</view>
 				<view class="operation">
@@ -33,176 +35,202 @@
 </template>
 
 <script>
-import { getAddressList,setAddressDefault,addressDel } from '@/api/user.js';
-export default {
-	data() {
-		return {
-			source: 0,
-			addressList: []
-		};
-	},
-	onLoad(option) {
-		this.source = option.source||0
-		this.loadAddress();
-	},
-	methods: {
-		// 加载地址
-		loadAddress() {
-			getAddressList({
-				page: 1,
-				limit: 100
-			}).then(({ data }) => {
-				this.addressList = data;
-			});
-		},
-		// 设为默认地址
-		defaultUp(data,ind) {
-			this.addressList=this.addressList.map((e) => {
-				e.is_default=0
-				return e
-			})
-			this.addressList[ind].is_default=1
-			setAddressDefault({
-				id: data.id
-			}).then(({ data }) => {
-				this.loadAddress();
-			}).catch((e) => {
-				console.log(e);
-			});
+	import {
+		getAddressList,
+		setAddressDefault,
+		addressDel
+	} from '@/api/user.js';
+	export default {
+		data() {
+			return {
+				source: 0,
+				addressList: []
+			};
 		},
-		//删除地址
-		delAddress(item) {
-			addressDel({
-				id:item.id
-			}).then(({data})=>{
-				this.$api.msg('删除成功')
-			})
-			let s = this.addressList.indexOf(item);
-			this.addressList.splice(s, 1);
+		onLoad(option) {
+			this.source = option.source || 0
+			this.loadAddress();
 		},
-		//选择地址
-		checkAddress(item) {
-			if (this.source == 1) {
-				//this.$api.prePage()获取上一页实例,在App.vue定义
-				this.$api.prePage().addressData = item;
-				uni.navigateBack();
+		methods: {
+			// 加载地址
+			loadAddress() {
+				getAddressList({
+					page: 1,
+					limit: 100
+				}).then(({
+					data
+				}) => {
+					this.addressList = data;
+				});
+			},
+			// 设为默认地址
+			defaultUp(data, ind) {
+				this.addressList = this.addressList.map((e) => {
+					e.is_default = 0
+					return e
+				})
+				this.addressList[ind].is_default = 1
+				setAddressDefault({
+					id: data.id
+				}).then(({
+					data
+				}) => {
+					this.loadAddress();
+				}).catch((e) => {
+					console.log(e);
+				});
+			},
+			//删除地址
+			delAddress(item) {
+				addressDel({
+					id: item.id
+				}).then(({
+					data
+				}) => {
+					this.$api.msg('删除成功')
+				})
+				let s = this.addressList.indexOf(item);
+				this.addressList.splice(s, 1);
+			},
+			//选择地址
+			checkAddress(item) {
+				if (this.source == 1) {
+					//this.$api.prePage()获取上一页实例,在App.vue定义
+					this.$api.prePage().addressData = item;
+					uni.navigateBack();
+				}
+			},
+			// 添加地址
+			addAddress(type, item) {
+				uni.navigateTo({
+					url: `/pages/set/addressManage?type=${type}&data=${JSON.stringify(item)}`
+				});
+			},
+			//添加或修改成功之后回调
+			refreshList() {
+				// 重新加载地址
+				this.loadAddress()
 			}
-		},
-		// 添加地址
-		addAddress(type, item) {
-			uni.navigateTo({
-				url: `/pages/set/addressManage?type=${type}&data=${JSON.stringify(item)}`
-			});
-		},
-		//添加或修改成功之后回调
-		refreshList() {
-			// 重新加载地址
-			this.loadAddress()
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-page {
-	padding-bottom: 120rpx;
-	padding-top: 20rpx;
-	background-color: $page-color-base;
-}
-.content {
-	position: relative;
-}
-.list {
-	align-items: center;
-	padding: 20rpx 30rpx;
-	background: #fff;
-	margin: 20rpx;
-	margin-top: 0;
-	.buttom {
-		display: flex;
+	page {
+		padding-bottom: 120rpx;
+		padding-top: 20rpx;
+		background-color: $page-color-base;
+	}
+
+	.content {
+		position: relative;
+	}
+
+	.list {
 		align-items: center;
-		justify-content: space-between;
-		padding-top: 10rpx;
-		.checkbox {
-			font-size: 44rpx;
-			line-height: 1;
-			padding: 4rpx;
-			color: $font-color-disabled;
-			background: #fff;
-			border-radius: 50px;
-		}
-		.checkbox.checked {
-			color: $base-color;
-		}
-		.default-buttom {
-			display: flex;
-			align-items: center;
-		}
-		.operation {
+		padding: 20rpx 30rpx;
+		background: #fff;
+		margin: 20rpx;
+		margin-top: 0;
+
+		.buttom {
 			display: flex;
 			align-items: center;
-			.blank {
-				width: 30rpx;
+			justify-content: space-between;
+			padding-top: 10rpx;
+
+			.checkbox {
+				font-size: 44rpx;
+				line-height: 1;
+				padding: 4rpx;
+				color: $font-color-disabled;
+				background: #fff;
+				border-radius: 50px;
+			}
+
+			.checkbox.checked {
+				color: $base-color;
+			}
+
+			.default-buttom {
+				display: flex;
+				align-items: center;
+			}
+
+			.operation {
+				display: flex;
+				align-items: center;
+
+				.blank {
+					width: 30rpx;
+				}
+			}
+
+			.text {
+				padding-left: 10rpx;
+				font-size: 24rpx;
+				color: #666666;
 			}
 		}
-		.text {
-			padding-left: 10rpx;
-			font-size: 24rpx;
-			color: #666666;
-		}
 	}
-}
-.wrapper {
-	display: flex;
-	flex-direction: column;
-	flex: 1;
-	border-bottom: 1px solid #f0f0f0;
-	padding-bottom: 20rpx;
-}
-.address-box {
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
-	.address {
-		font-size: $font-base + 2rpx;
-		color: $font-color-dark;
+
+	.wrapper {
+		display: flex;
+		flex-direction: column;
+		flex: 1;
+		border-bottom: 1px solid #f0f0f0;
+		padding-bottom: 20rpx;
+	}
+
+	.address-box {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+
+		.address {
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+		}
+
+		.mobile {
+			font-size: $font-base;
+			color: rgba(51, 51, 51, 1);
+		}
 	}
-	.mobile {
+
+	.u-box {
 		font-size: $font-base;
-		color: rgba(51, 51, 51, 1);
+		color: $font-color-light;
+		margin-top: 16rpx;
+
+		.name {
+			margin-right: 30rpx;
+		}
+	}
+
+	.icon-bianji {
+		display: flex;
+		align-items: center;
+		height: 80rpx;
+		font-size: 40rpx;
+		color: $font-color-light;
+		padding-left: 30rpx;
 	}
-}
-.u-box {
-	font-size: $font-base;
-	color: $font-color-light;
-	margin-top: 16rpx;
-	.name {
-		margin-right: 30rpx;
+
+	.add-btn {
+		position: fixed;
+		left: 30rpx;
+		right: 30rpx;
+		bottom: 16rpx;
+		z-index: 95;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 690rpx;
+		height: 80rpx;
+		font-size: $font-lg;
+		color: #fff;
+		background-color: $base-color;
+		border-radius: 10rpx;
 	}
-}
-.icon-bianji {
-	display: flex;
-	align-items: center;
-	height: 80rpx;
-	font-size: 40rpx;
-	color: $font-color-light;
-	padding-left: 30rpx;
-}
-
-.add-btn {
-	position: fixed;
-	left: 30rpx;
-	right: 30rpx;
-	bottom: 16rpx;
-	z-index: 95;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 690rpx;
-	height: 80rpx;
-	font-size: $font-lg;
-	color: #fff;
-	background-color: $base-color;
-	border-radius: 10rpx;
-}
-</style>
+</style>

+ 1 - 1
pages/user/withdrawal.vue

@@ -237,7 +237,7 @@
 				// 	});
 				// 	return;
 				// }
-				if (this.withdrawal < this.minPrice) {
+				if (this.withdrawal * 1 < this.minPrice * 1) {
 					uni.showToast({
 						title: '提现金额不可少于' + this.minPrice,
 						duration: 2000,

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません