11 changed files with 212 additions and 77 deletions
			
			
		- 
					7pages.json
 - 
					11pages/address/add/add.less
 - 
					7pages/address/add/add.vue
 - 
					13pages/business/withdrawal/withdrawal.vue
 - 
					6pages/index/index/index.vue
 - 
					32pages/order/cashier/cashier.vue
 - 
					51pages/route/index.vue
 - 
					79pages/shop/goodsdetail.vue
 - 
					2pages/shop/seckillList.vue
 - 
					10pages/shop/shopdetail.vue
 - 
					25pages/user/member/code.vue
 
@ -0,0 +1,51 @@ | 
				
			|||
<template> | 
				
			|||
	<view></view> | 
				
			|||
</template> | 
				
			|||
 | 
				
			|||
<script> | 
				
			|||
	/* 路由分发页面仅供跳转页面 */ | 
				
			|||
	export default { | 
				
			|||
		onLoad(options){ | 
				
			|||
			this.routeToPage(options); | 
				
			|||
		}, | 
				
			|||
		methods: { | 
				
			|||
			// 路由分发 | 
				
			|||
			routeToPage(options){ | 
				
			|||
				if(options.route == 'detail'){ | 
				
			|||
					options.page_url = '/pages/shop/goodsdetail'; | 
				
			|||
					this.joinPagePath(options); | 
				
			|||
				}else if(options.route == 'home'){ | 
				
			|||
					options.page_url = '/pages/index/index/index'; | 
				
			|||
					this.joinPagePath(options); | 
				
			|||
				}else if(options.route == 'shop'){ | 
				
			|||
					options.page_url = '/pages/shop/shopdetail'; | 
				
			|||
					this.joinPagePath(options); | 
				
			|||
				}else{ | 
				
			|||
					let obj = { | 
				
			|||
						page_url: '/pages/index/index/index' // 啥都不填,默认跳转到首页 | 
				
			|||
					}; | 
				
			|||
					this.joinPagePath(obj); | 
				
			|||
				} | 
				
			|||
			}, | 
				
			|||
			// 拼接地址,并相应跳转 | 
				
			|||
			joinPagePath(par){ | 
				
			|||
				let path = par.page_url; | 
				
			|||
				let flag = true; // 标志,用于判断拼接次数,?只能出现一次 | 
				
			|||
				for(let i in par){ | 
				
			|||
					if(i != 'route' && i != 'page_url' && i != 'is_tabbar'){ // 跳过route、page_url、is_tabbar | 
				
			|||
						if(flag){ | 
				
			|||
							path += '?'+ i +'='+ par[i]; | 
				
			|||
							flag = false; | 
				
			|||
						}else{ | 
				
			|||
							path += '&'+ i +'='+ par[i]; | 
				
			|||
						} | 
				
			|||
					} | 
				
			|||
				} | 
				
			|||
				this.$url(path, {type: 'redirect'}); | 
				
			|||
			} | 
				
			|||
		} | 
				
			|||
	} | 
				
			|||
</script> | 
				
			|||
 | 
				
			|||
<style> | 
				
			|||
</style> | 
				
			|||
						Write
						Preview
					
					
					Loading…
					
					Cancel
						Save
					
		Reference in new issue