Merge pull request '个人中心' (#28) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/28
This commit is contained in:
		
						commit
						af5f075861
					
				@ -6,6 +6,10 @@ export default {
 | 
				
			|||||||
                return vm.$u.post('Goods/getGoodsRecommend', {
 | 
					                return vm.$u.post('Goods/getGoodsRecommend', {
 | 
				
			||||||
					page: page
 | 
										page: page
 | 
				
			||||||
				});
 | 
									});
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								// 购物车商品列表
 | 
				
			||||||
 | 
								getCartList() {
 | 
				
			||||||
 | 
									return vm.$u.post('cart/cartList');
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -54,7 +54,20 @@ export default {
 | 
				
			|||||||
					member_mobile: member_mobile, 
 | 
										member_mobile: member_mobile, 
 | 
				
			||||||
					sms_code: sms_code
 | 
										sms_code: sms_code
 | 
				
			||||||
				});
 | 
									});
 | 
				
			||||||
			}
 | 
								},
 | 
				
			||||||
 | 
								// 使用帮助&售后政策列表
 | 
				
			||||||
 | 
								getUseHelpList({page, tid}) {
 | 
				
			||||||
 | 
									return vm.$u.post('Member/UseHelpList', {
 | 
				
			||||||
 | 
										page: page, 
 | 
				
			||||||
 | 
										tid: tid
 | 
				
			||||||
 | 
									});
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								// 使用帮助&售后政策详情
 | 
				
			||||||
 | 
								getUseHelpInfo({ launch_id }) {
 | 
				
			||||||
 | 
									return vm.$u.post('Member/UseHelpInfo', {
 | 
				
			||||||
 | 
										launch_id: launch_id
 | 
				
			||||||
 | 
									});
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -23,7 +23,9 @@ const install = (Vue, vm) => {
 | 
				
			|||||||
		// 方式四,如果token放在了Storage本地存储中,拦截是每次请求都执行的
 | 
							// 方式四,如果token放在了Storage本地存储中,拦截是每次请求都执行的
 | 
				
			||||||
		// 所以哪怕您重新登录修改了Storage,下一次的请求将会是最新值
 | 
							// 所以哪怕您重新登录修改了Storage,下一次的请求将会是最新值
 | 
				
			||||||
		const token = uni.getStorageSync('token');
 | 
							const token = uni.getStorageSync('token');
 | 
				
			||||||
		config.header.token = token;
 | 
							// console.log(token);
 | 
				
			||||||
 | 
							// config.header.token = token;
 | 
				
			||||||
 | 
							config.header.Authorization = token;
 | 
				
			||||||
		// config.header.Token = 'xxxxxx';
 | 
							// config.header.Token = 'xxxxxx';
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		// 可以对某个url进行特别处理,此url参数为this.$u.get(url)中的url值 
 | 
							// 可以对某个url进行特别处理,此url参数为this.$u.get(url)中的url值 
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<view class="article-list">
 | 
						<view class="article-list">
 | 
				
			||||||
		<view v-for="(item, index) in articleList" :key="index" class="list-item" @click="toDetailsPage()">
 | 
							<view v-for="(item, index) in articleList" :key="index" class="list-item" @click="toDetailsPage(item)">
 | 
				
			||||||
			<view>{{ type }}</view>
 | 
								<view>{{ item.help_title }}</view>
 | 
				
			||||||
			<image src="@/pageE/static/mine/21.png"></image>
 | 
								<image src="@/pageE/static/mine/21.png"></image>
 | 
				
			||||||
		</view>
 | 
							</view>
 | 
				
			||||||
	</view>
 | 
						</view>
 | 
				
			||||||
@ -13,13 +13,17 @@ export default {
 | 
				
			|||||||
	},
 | 
						},
 | 
				
			||||||
	props: {
 | 
						props: {
 | 
				
			||||||
		articleList: Array,
 | 
							articleList: Array,
 | 
				
			||||||
		type: String
 | 
					 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
		toDetailsPage() {
 | 
							toDetailsPage(item) {
 | 
				
			||||||
			uni.navigateTo({
 | 
								this.$u.route({
 | 
				
			||||||
				url: '/pageE/mine/ArticleDetails?title=' + this.type + "详情"
 | 
									type: 'navigateTo',
 | 
				
			||||||
			});
 | 
									url: '/pageE/mine/ArticleDetails',
 | 
				
			||||||
 | 
									params: {
 | 
				
			||||||
 | 
										title: item.help_title,
 | 
				
			||||||
 | 
										id: item.help_id
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -1,15 +1,12 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
    <view class="shop-item">
 | 
					    <view class="shop-item">
 | 
				
			||||||
        <image></image>
 | 
					        <image></image>
 | 
				
			||||||
        <text>{{ info.gc_name }}</text>
 | 
					        <text>1</text>
 | 
				
			||||||
    </view>    
 | 
					    </view>    
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
	name:"shopItem",
 | 
						name:"shopItem",
 | 
				
			||||||
	props: {
 | 
					 | 
				
			||||||
		info: Object
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
				
			|||||||
@ -73,7 +73,18 @@ export default {
 | 
				
			|||||||
			checkedAll: false
 | 
								checkedAll: false
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
						onLoad() {
 | 
				
			||||||
 | 
							this.getCartList();
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							getCartList() {
 | 
				
			||||||
 | 
								this.$u.api.getCartList().then((res)=>{
 | 
				
			||||||
 | 
									if (res.errCode == 0) {
 | 
				
			||||||
 | 
										console.log(res);
 | 
				
			||||||
 | 
										
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		reduce(value, store) {
 | 
							reduce(value, store) {
 | 
				
			||||||
			console.log(value, store)
 | 
								console.log(value, store)
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
				
			|||||||
@ -11,7 +11,9 @@ export default {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	onLoad(option) {
 | 
						onLoad(option) {
 | 
				
			||||||
 | 
							console.log(option);
 | 
				
			||||||
		this.setTitle(option.title);
 | 
							this.setTitle(option.title);
 | 
				
			||||||
 | 
							this.getUseHelpInfo(option.id);
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
		setTitle(title){
 | 
							setTitle(title){
 | 
				
			||||||
@ -19,6 +21,21 @@ export default {
 | 
				
			|||||||
				title: title
 | 
									title: title
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
							unescapeHTML (temp){
 | 
				
			||||||
 | 
								temp = "" + temp;
 | 
				
			||||||
 | 
								return temp.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/"/g, '"').replace(/'/g, "'");
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							getUseHelpInfo(id) {
 | 
				
			||||||
 | 
								this.$u.api.getUseHelpInfo({
 | 
				
			||||||
 | 
								    launch_id: id,
 | 
				
			||||||
 | 
								}).then((res)=>{
 | 
				
			||||||
 | 
									// console.log(res)
 | 
				
			||||||
 | 
									if (res.errCode == 0) {
 | 
				
			||||||
 | 
										this.nodes = this.unescapeHTML(res.data.info[0].help_info);
 | 
				
			||||||
 | 
										this.setTitle(res.data.info[0].help_title);
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
				
			|||||||
@ -4,34 +4,46 @@
 | 
				
			|||||||
			<view class="old-phone">
 | 
								<view class="old-phone">
 | 
				
			||||||
				<view class="phone-number">
 | 
									<view class="phone-number">
 | 
				
			||||||
					<view class="title">原手机号</view>
 | 
										<view class="title">原手机号</view>
 | 
				
			||||||
					<input type="text" placeholder="请输入手机号码" />
 | 
										<input type="text" v-model="oldNumber" placeholder="请输入手机号码" />
 | 
				
			||||||
				</view>
 | 
									</view>
 | 
				
			||||||
				<view class="code">
 | 
									<view class="code">
 | 
				
			||||||
					<view class="title">验证码</view>
 | 
										<view class="title">验证码</view>
 | 
				
			||||||
					<input type="text" placeholder="请输入验证码" />
 | 
										<input type="text" v-model="oldCode" placeholder="请输入验证码" />
 | 
				
			||||||
					<view class="get-code">获取验证码</view>
 | 
										<view class="get-code">获取验证码</view>
 | 
				
			||||||
				</view>
 | 
									</view>
 | 
				
			||||||
			</view>
 | 
								</view>
 | 
				
			||||||
			<view class="new-phone">
 | 
								<view class="new-phone">
 | 
				
			||||||
				<view class="phone-number">
 | 
									<view class="phone-number">
 | 
				
			||||||
					<view class="title">新手机号</view>
 | 
										<view class="title">新手机号</view>
 | 
				
			||||||
					<input type="text" placeholder="请输入手机号码" />
 | 
										<input type="text" v-model="newNumber" placeholder="请输入手机号码" />
 | 
				
			||||||
				</view>
 | 
									</view>
 | 
				
			||||||
				<view class="code">
 | 
									<view class="code">
 | 
				
			||||||
					<view class="title">验证码</view>
 | 
										<view class="title">验证码</view>
 | 
				
			||||||
					<input type="text" placeholder="请输入验证码" />
 | 
										<input type="text" v-model="newCode" placeholder="请输入验证码" />
 | 
				
			||||||
					<view class="get-code">获取验证码</view>
 | 
										<view class="get-code">获取验证码</view>
 | 
				
			||||||
				</view>
 | 
									</view>
 | 
				
			||||||
			</view>
 | 
								</view>
 | 
				
			||||||
		</view>
 | 
							</view>
 | 
				
			||||||
		<view class="tips">注意:修改手机号需要原手机号获取验证码,无原手机验证码,请联系后台</view>
 | 
							<view class="tips">注意:修改手机号需要原手机号获取验证码,无原手机验证码,请联系后台</view>
 | 
				
			||||||
 | 
							<view class="btn">保存</view>
 | 
				
			||||||
	</view>
 | 
						</view>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
	data() {
 | 
						data() {
 | 
				
			||||||
		return {}
 | 
							return {
 | 
				
			||||||
	}
 | 
								oldNumber: '',
 | 
				
			||||||
 | 
								oldCode: '',
 | 
				
			||||||
 | 
								newNumber: '',
 | 
				
			||||||
 | 
								newCode: ''
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						methods: {
 | 
				
			||||||
 | 
							verifyValue() {
 | 
				
			||||||
 | 
								if (this.$u.test.mobile(this.oldNumber)) this.$u.toast('请填写正确的原手机号');
 | 
				
			||||||
 | 
								if (this.$u.test.mobile(this.newNumber)) this.$u.toast('请填写正确的新手机号');
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
@ -73,16 +85,6 @@ export default {
 | 
				
			|||||||
					}
 | 
										}
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			// .phone-number::after {
 | 
					 | 
				
			||||||
			// 	position: absolute;
 | 
					 | 
				
			||||||
			// 	content: "";
 | 
					 | 
				
			||||||
			// 	width: 2rpx;
 | 
					 | 
				
			||||||
			// 	height: 43rpx;
 | 
					 | 
				
			||||||
			// 	background: rgba(242,242,242,1);
 | 
					 | 
				
			||||||
			// 	left: 0;
 | 
					 | 
				
			||||||
			// 	top: 50%;
 | 
					 | 
				
			||||||
			// 	transform: translate(0, -50%);
 | 
					 | 
				
			||||||
			// }
 | 
					 | 
				
			||||||
			.code {
 | 
								.code {
 | 
				
			||||||
				display: flex;
 | 
									display: flex;
 | 
				
			||||||
				align-items: center;
 | 
									align-items: center;
 | 
				
			||||||
@ -105,5 +107,16 @@ export default {
 | 
				
			|||||||
		color: rgba(102,102,102,1);
 | 
							color: rgba(102,102,102,1);
 | 
				
			||||||
		line-height: 40rpx;
 | 
							line-height: 40rpx;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						.btn {
 | 
				
			||||||
 | 
							margin: 120rpx auto 0;
 | 
				
			||||||
 | 
							width: 690rpx;
 | 
				
			||||||
 | 
							height: 98rpx;
 | 
				
			||||||
 | 
							background: rgba(255,120,15,1);
 | 
				
			||||||
 | 
							border-radius: 49rpx;
 | 
				
			||||||
 | 
							font-size: 36rpx;
 | 
				
			||||||
 | 
							color: rgba(255,255,255,1);
 | 
				
			||||||
 | 
							line-height: 98rpx;
 | 
				
			||||||
 | 
							text-align: center;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<view class="after-sale">
 | 
						<view class="after-sale">
 | 
				
			||||||
		<ArticleList :articleList="policyList" :type="type"></ArticleList>
 | 
							<ArticleList :articleList="policyList"></ArticleList>
 | 
				
			||||||
	</view>
 | 
						</view>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
@ -8,14 +8,29 @@ import ArticleList from '@/components/mine/article-list/index'
 | 
				
			|||||||
export default {
 | 
					export default {
 | 
				
			||||||
	data() {
 | 
						data() {
 | 
				
			||||||
		return {
 | 
							return {
 | 
				
			||||||
 | 
								page: 1,
 | 
				
			||||||
			type: '售后政策',
 | 
								type: '售后政策',
 | 
				
			||||||
			policyList: [1,1,1,1, 1, 1, 1]
 | 
								policyList: []
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	components: {
 | 
						components: {
 | 
				
			||||||
		ArticleList
 | 
							ArticleList
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {},
 | 
						onLoad() {
 | 
				
			||||||
 | 
							this.getPolicyList();
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						methods: {
 | 
				
			||||||
 | 
							getPolicyList () {
 | 
				
			||||||
 | 
								this.$u.api.getUseHelpList({
 | 
				
			||||||
 | 
								    page: this.page,
 | 
				
			||||||
 | 
								    tid: 2 // 1:使用帮助列表 2: 售后政策列表
 | 
				
			||||||
 | 
								}).then((res)=>{
 | 
				
			||||||
 | 
									if (res.errCode == 0) {
 | 
				
			||||||
 | 
										this.policyList = res.data.helpList;
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<view class="mine-help">
 | 
						<view class="mine-help">
 | 
				
			||||||
		<ArticleList :articleList="helpList" :type="type"></ArticleList>
 | 
							<ArticleList :articleList="helpList"></ArticleList>
 | 
				
			||||||
	</view>
 | 
						</view>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
@ -8,14 +8,28 @@ import ArticleList from '@/components/mine/article-list/index'
 | 
				
			|||||||
export default {
 | 
					export default {
 | 
				
			||||||
	data() {
 | 
						data() {
 | 
				
			||||||
		return {
 | 
							return {
 | 
				
			||||||
			type: '使用帮助',
 | 
								page: 1,
 | 
				
			||||||
			helpList: [1,1,1,1, 1, 1, 1]
 | 
								helpList: []
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	components: {
 | 
						components: {
 | 
				
			||||||
		ArticleList
 | 
							ArticleList
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {},
 | 
						onLoad() {
 | 
				
			||||||
 | 
							this.getUseHelpList();
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						methods: {
 | 
				
			||||||
 | 
							getUseHelpList() {
 | 
				
			||||||
 | 
								this.$u.api.getUseHelpList({
 | 
				
			||||||
 | 
								    page: this.page,
 | 
				
			||||||
 | 
								    tid: 1 // 1:使用帮助列表 2: 售后政策列表
 | 
				
			||||||
 | 
								}).then((res)=>{
 | 
				
			||||||
 | 
									if (res.errCode == 0) {
 | 
				
			||||||
 | 
										this.helpList = res.data.helpList;
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
				
			|||||||
@ -5,51 +5,72 @@
 | 
				
			|||||||
		</view>
 | 
							</view>
 | 
				
			||||||
		<swiper :current="swiperCurrent" @animationfinish="animationfinish">
 | 
							<swiper :current="swiperCurrent" @animationfinish="animationfinish">
 | 
				
			||||||
			<swiper-item class="swiper-item">
 | 
								<swiper-item class="swiper-item">
 | 
				
			||||||
				<scroll-view scroll-y style="height: 100%;">
 | 
									<scroll-view scroll-y style="height: 100%;" @scrolltolower="reachBottom">
 | 
				
			||||||
					<view class="item-container" v-for="(item, index) in 4" :key="index">
 | 
										<view>
 | 
				
			||||||
						<OrderItem :current="current"></OrderItem>
 | 
											<view class="item-container" v-for="(item, index) in orderList" :key="index">
 | 
				
			||||||
 | 
												<OrderItem :current="current"></OrderItem>
 | 
				
			||||||
 | 
											</view>
 | 
				
			||||||
 | 
											<u-loadmore :status="loadStatus[5]" bgColor="#ECECEC" margin-bottom="20"></u-loadmore>
 | 
				
			||||||
					</view>
 | 
										</view>
 | 
				
			||||||
				</scroll-view>
 | 
									</scroll-view>
 | 
				
			||||||
			</swiper-item>
 | 
								</swiper-item>
 | 
				
			||||||
			<swiper-item class="swiper-item">
 | 
								<swiper-item class="swiper-item">
 | 
				
			||||||
				<scroll-view scroll-y style="height: 100%;">
 | 
									<scroll-view scroll-y style="height: 100%;">
 | 
				
			||||||
					<view class="item-container">
 | 
										<view>
 | 
				
			||||||
						<OrderItem :current="current"></OrderItem>
 | 
											<view class="item-container" v-for="(item, index) in orderList" :key="index">
 | 
				
			||||||
 | 
												<OrderItem :current="current"></OrderItem>
 | 
				
			||||||
 | 
											</view>
 | 
				
			||||||
 | 
											<u-loadmore :status="loadStatus[5]" bgColor="#ECECEC" margin-bottom="20"></u-loadmore>
 | 
				
			||||||
					</view>
 | 
										</view>
 | 
				
			||||||
				</scroll-view>
 | 
									</scroll-view>
 | 
				
			||||||
			</swiper-item>
 | 
								</swiper-item>
 | 
				
			||||||
			<swiper-item class="swiper-item">
 | 
								<swiper-item class="swiper-item">
 | 
				
			||||||
				<scroll-view scroll-y style="height: 100%;">
 | 
									<scroll-view scroll-y style="height: 100%;">
 | 
				
			||||||
					<view class="item-container">
 | 
										<view>
 | 
				
			||||||
						<OrderItem :current="current"></OrderItem>
 | 
											<view class="item-container" v-for="(item, index) in orderList" :key="index">
 | 
				
			||||||
 | 
												<OrderItem :current="current"></OrderItem>
 | 
				
			||||||
 | 
											</view>
 | 
				
			||||||
 | 
											<u-loadmore :status="loadStatus[5]" bgColor="#ECECEC" margin-bottom="20"></u-loadmore>
 | 
				
			||||||
					</view>
 | 
										</view>
 | 
				
			||||||
				</scroll-view>
 | 
									</scroll-view>
 | 
				
			||||||
			</swiper-item>
 | 
								</swiper-item>
 | 
				
			||||||
			<swiper-item class="swiper-item">
 | 
								<swiper-item class="swiper-item">
 | 
				
			||||||
				<scroll-view scroll-y style="height: 100%;">
 | 
									<scroll-view scroll-y style="height: 100%;">
 | 
				
			||||||
					<view class="item-container">
 | 
										<view>
 | 
				
			||||||
						<OrderItem :current="current"></OrderItem>
 | 
											<view class="item-container" v-for="(item, index) in orderList" :key="index">
 | 
				
			||||||
 | 
												<OrderItem :current="current"></OrderItem>
 | 
				
			||||||
 | 
											</view>
 | 
				
			||||||
 | 
											<u-loadmore :status="loadStatus[5]" bgColor="#ECECEC" margin-bottom="20"></u-loadmore>
 | 
				
			||||||
					</view>
 | 
										</view>
 | 
				
			||||||
				</scroll-view>
 | 
									</scroll-view>
 | 
				
			||||||
			</swiper-item>
 | 
								</swiper-item>
 | 
				
			||||||
			<swiper-item class="swiper-item">
 | 
								<swiper-item class="swiper-item">
 | 
				
			||||||
				<scroll-view scroll-y style="height: 100%;">
 | 
									<scroll-view scroll-y style="height: 100%;">
 | 
				
			||||||
					<view class="item-container">
 | 
										<view>
 | 
				
			||||||
						<OrderItem :current="current"></OrderItem>
 | 
											<view class="item-container" v-for="(item, index) in orderList" :key="index">
 | 
				
			||||||
 | 
												<OrderItem :current="current"></OrderItem>
 | 
				
			||||||
 | 
											</view>
 | 
				
			||||||
 | 
											<u-loadmore :status="loadStatus[5]" bgColor="#ECECEC" margin-bottom="20"></u-loadmore>
 | 
				
			||||||
					</view>
 | 
										</view>
 | 
				
			||||||
				</scroll-view>
 | 
									</scroll-view>
 | 
				
			||||||
			</swiper-item>
 | 
								</swiper-item>
 | 
				
			||||||
			<swiper-item class="swiper-item">
 | 
								<swiper-item class="swiper-item">
 | 
				
			||||||
				<scroll-view scroll-y style="height: 100%;">
 | 
									<scroll-view scroll-y style="height: 100%;" @scrolltolower="reachBottom">
 | 
				
			||||||
					<view class="item-container">
 | 
										<view>
 | 
				
			||||||
						<OrderItem :current="current"></OrderItem>
 | 
											<view class="item-container" v-for="(item, index) in orderList" :key="index">
 | 
				
			||||||
 | 
												<OrderItem :current="current"></OrderItem>
 | 
				
			||||||
 | 
											</view>
 | 
				
			||||||
 | 
											<u-loadmore :status="loadStatus[5]" bgColor="#ECECEC" margin-bottom="20"></u-loadmore>
 | 
				
			||||||
					</view>
 | 
										</view>
 | 
				
			||||||
				</scroll-view>
 | 
									</scroll-view>
 | 
				
			||||||
			</swiper-item>
 | 
								</swiper-item>
 | 
				
			||||||
			<swiper-item class="swiper-item">
 | 
								<swiper-item class="swiper-item">
 | 
				
			||||||
				<scroll-view scroll-y style="height: 100%;">
 | 
									<scroll-view scroll-y style="height: 100%;" @scrolltolower="reachBottom">
 | 
				
			||||||
					<view class="item-container">
 | 
										<view>
 | 
				
			||||||
						<OrderItem :current="current"></OrderItem>
 | 
											<view class="item-container" v-for="(item, index) in orderList" :key="index">
 | 
				
			||||||
 | 
												<OrderItem :current="current"></OrderItem>
 | 
				
			||||||
 | 
											</view>
 | 
				
			||||||
 | 
											<u-loadmore :status="loadStatus[6]" bgColor="#ECECEC" margin-bottom="20"></u-loadmore>
 | 
				
			||||||
					</view>
 | 
										</view>
 | 
				
			||||||
				</scroll-view>
 | 
									</scroll-view>
 | 
				
			||||||
			</swiper-item>
 | 
								</swiper-item>
 | 
				
			||||||
@ -76,8 +97,11 @@ export default {
 | 
				
			|||||||
			}, {
 | 
								}, {
 | 
				
			||||||
				name: '售后'
 | 
									name: '售后'
 | 
				
			||||||
			}],
 | 
								}],
 | 
				
			||||||
 | 
								orderList: 5,
 | 
				
			||||||
 | 
								loadStatus: ['loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore'],
 | 
				
			||||||
 | 
								page: 0,
 | 
				
			||||||
			current: 0,
 | 
								current: 0,
 | 
				
			||||||
			swiperCurrent: 0
 | 
								swiperCurrent: 0,
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	components: {
 | 
						components: {
 | 
				
			||||||
@ -90,7 +114,20 @@ export default {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							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) {
 | 
							tabsChange(index) {
 | 
				
			||||||
 | 
								this.current = Number(index);
 | 
				
			||||||
			this.swiperCurrent = Number(index);
 | 
								this.swiperCurrent = Number(index);
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		animationfinish(e) {
 | 
							animationfinish(e) {
 | 
				
			||||||
 | 
				
			|||||||
@ -29,7 +29,7 @@
 | 
				
			|||||||
            </view>
 | 
					            </view>
 | 
				
			||||||
        </view>
 | 
					        </view>
 | 
				
			||||||
        <view class="fenlei">
 | 
					        <view class="fenlei">
 | 
				
			||||||
            <shopitem v-for="item in classifyList" :key="item.gc_id" class="item" :info="item"></shopitem>
 | 
					            <shopitem v-for="item in 5" class="item"></shopitem>
 | 
				
			||||||
        </view>
 | 
					        </view>
 | 
				
			||||||
        <view class="fenlei">
 | 
					        <view class="fenlei">
 | 
				
			||||||
            <shopitem v-for="item in 5" class="item"></shopitem>
 | 
					            <shopitem v-for="item in 5" class="item"></shopitem>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user