Merge pull request 'zhy' (#32) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/32
This commit is contained in:
		
						commit
						2cbcb81dc7
					
				@ -81,7 +81,20 @@ export default {
 | 
			
		||||
			// 用户收货地址列表
 | 
			
		||||
			getAddressList() {
 | 
			
		||||
				return vm.$u.post('MemberAddress/addressList');
 | 
			
		||||
			}
 | 
			
		||||
        } 
 | 
			
		||||
			},
 | 
			
		||||
			// 美甲
 | 
			
		||||
			getManicureList({ page }) {
 | 
			
		||||
				return vm.$u.post('MemberManicure/getManicureList', {
 | 
			
		||||
					page: page
 | 
			
		||||
				});
 | 
			
		||||
			},
 | 
			
		||||
			// 美甲-提交订单
 | 
			
		||||
			addManicure({ name, time }) {
 | 
			
		||||
				return vm.$u.post('MemberManicure/addManicure', {
 | 
			
		||||
					name: name,
 | 
			
		||||
					time: time
 | 
			
		||||
				});
 | 
			
		||||
			},
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@ -22,7 +22,7 @@
 | 
			
		||||
		</view>
 | 
			
		||||
		<view class="edit-btn">保存地址</view>
 | 
			
		||||
		<!-- <u-picker mode="region" v-model="show" @confirm="setArea"></u-picker> -->
 | 
			
		||||
		<!-- <u-select v-model="show" mode="mutil-column-auto" :list="areaList" @confirm="setArea"></u-select> -->
 | 
			
		||||
		<u-select v-model="show" mode="mutil-column-auto" :list="areaList" @confirm="setArea"></u-select>
 | 
			
		||||
	</view>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
 | 
			
		||||
@ -5,14 +5,17 @@
 | 
			
		||||
		</view>
 | 
			
		||||
		<swiper :current="swiperCurrent" @animationfinish="animationfinish">
 | 
			
		||||
			<swiper-item class="swiper-item">
 | 
			
		||||
				<scroll-view scroll-y class="order-list">
 | 
			
		||||
					<view v-for="(item, index) in 6" :key="index" class="order-item">
 | 
			
		||||
						<view class="order-title">
 | 
			
		||||
							<view class="order-text">订单</view>
 | 
			
		||||
							<view class="order-status">已预约</view>
 | 
			
		||||
				<scroll-view scroll-y class="order-list" @scrolltolower="reachBottom">
 | 
			
		||||
					<view>
 | 
			
		||||
						<view v-for="(item, index) in orderList" :key="index" class="order-item">
 | 
			
		||||
							<view class="order-title">
 | 
			
		||||
								<view class="order-text">订单</view>
 | 
			
		||||
								<view class="order-status">已预约</view>
 | 
			
		||||
							</view>
 | 
			
		||||
							<view class="order-name">美甲人姓名:xxx</view>
 | 
			
		||||
							<view class="order-date">时间:2020-04-12</view>
 | 
			
		||||
						</view>
 | 
			
		||||
						<view class="order-name">美甲人姓名:xxx</view>
 | 
			
		||||
						<view class="order-date">时间:2020-04-12</view>
 | 
			
		||||
						<u-loadmore :status="loadStatus" bgColor="#ECECEC" margin-bottom="20"></u-loadmore>
 | 
			
		||||
					</view>
 | 
			
		||||
				</scroll-view>
 | 
			
		||||
			</swiper-item>
 | 
			
		||||
@ -34,7 +37,10 @@ export default {
 | 
			
		||||
				name: '申请表'
 | 
			
		||||
			}],
 | 
			
		||||
			current: 0,
 | 
			
		||||
			swiperCurrent: 0
 | 
			
		||||
			swiperCurrent: 0,
 | 
			
		||||
			page: 1,
 | 
			
		||||
			orderList: 5,
 | 
			
		||||
			loadStatus: 'loadmore',
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	onShow() {
 | 
			
		||||
@ -42,6 +48,25 @@ export default {
 | 
			
		||||
		this.swiperCurrent = 0;
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		getManicureList() {
 | 
			
		||||
			this.$u.api.getManicureList({
 | 
			
		||||
				page: this.page
 | 
			
		||||
			}).then((res)=>{
 | 
			
		||||
				if (res.errCode == 0) {}
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
		reachBottom() {
 | 
			
		||||
			// console.log(this.page);
 | 
			
		||||
			if(this.page >= 3) return;
 | 
			
		||||
			// 修改当前的 loadStatus
 | 
			
		||||
			console.log(this.loadStatus);
 | 
			
		||||
			this.loadStatus.splice(this.current, 1, "loading");
 | 
			
		||||
			this.page++;
 | 
			
		||||
			setTimeout(() => {
 | 
			
		||||
				this.orderList += 5;
 | 
			
		||||
				this.loadStatus.splice(this.current, 1, "nomore");
 | 
			
		||||
			}, 1200);
 | 
			
		||||
		},
 | 
			
		||||
		tabsChange(index) {
 | 
			
		||||
			this.swiperCurrent = index;
 | 
			
		||||
			this.toApplyPage(index);
 | 
			
		||||
 | 
			
		||||
@ -33,6 +33,14 @@ export default {
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		addManicureOrder() {
 | 
			
		||||
			this.$u.api.addManicure({
 | 
			
		||||
				name: this.name,
 | 
			
		||||
				time: this.time
 | 
			
		||||
			}).then((res)=>{
 | 
			
		||||
				if (res.errCode == 0) {}
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
		chooseDate(e) {
 | 
			
		||||
			let time = e.year + '年' + e.month + '月' + e.day + '日' + e.hour + '时' + e.minute + '分'
 | 
			
		||||
			this.time = time
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user