achao 3 роки тому
батько
коміт
aa2154c0a2

+ 143 - 10
pages.json

@@ -5,42 +5,175 @@
 		"selectedColor": "#22C572",
 		"selectedColor": "#22C572",
 		"borderStyle": "black",
 		"borderStyle": "black",
 		"backgroundColor": "#ffffff",
 		"backgroundColor": "#ffffff",
-		"list": [
+		"list": [{
+				"pagePath": "pages/goodSource/index",
+				"iconPath": "static/logo.png",
+				"selectedIconPath": "static/logo.png",
+				"text": "货源"
+			},
 			{
 			{
-				"pagePath": "pages/index/index",
+				"pagePath": "pages/order/index",
 				"iconPath": "static/logo.png",
 				"iconPath": "static/logo.png",
 				"selectedIconPath": "static/logo.png",
 				"selectedIconPath": "static/logo.png",
-				"text": "资讯"
+				"text": "订单"
 			},
 			},
 			{
 			{
-				"pagePath": "pages/demo/demo",
+				"pagePath": "pages/news/index",
 				"iconPath": "static/logo.png",
 				"iconPath": "static/logo.png",
 				"selectedIconPath": "static/logo.png",
 				"selectedIconPath": "static/logo.png",
-				"text": "demo"
+				"text": "消息"
+			},
+			{
+				"pagePath": "pages/mine/index",
+				"iconPath": "static/logo.png",
+				"selectedIconPath": "static/logo.png",
+				"text": "我的"
 			}
 			}
 		]
 		]
 	},
 	},
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
 		{
 		{
-			"path": "pages/index/index",
+			"path": "pages/goodSource/index",
 			"style": {
 			"style": {
 				"navigationBarTitleText": "uni-app"
 				"navigationBarTitleText": "uni-app"
 			}
 			}
+		}, {
+			"path": "pages/order/index",
+			"style": {
+				"navigationBarTitleText": "订单",
+				"enablePullDownRefresh": false
+			}
+
+		}
+
+		, {
+			"path": "pages/news/index",
+			"style": {
+				"navigationBarTitleText": "消息",
+				"enablePullDownRefresh": false
+			}
+
+		},
+		{
+			"path": "pages/mine/index",
+			"style": {
+				"navigationBarTitleText": "我的",
+				"enablePullDownRefresh": false
+			}
+
+		},
+		{
+			"path": "pages/public/login",
+			"style": {
+				"navigationBarTitleText": "登录",
+				"enablePullDownRefresh": false
+			}
+
 		}
 		}
+
 	    ,{
 	    ,{
-            "path" : "pages/public/login",
+            "path" : "pages/goodSource/shippingDetails",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "发运详情",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/order/orderDetails",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "订单详情",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/order/confirmLoading",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "确认装车",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/order/confirmUnloading",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "确认卸车",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/mine/driverCertification",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "司机认证",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/mine/helpDescription",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "帮助说明",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/mine/manageVehicles/index",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "管理车辆",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/mine/manageVehicles/addVehicle",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "添加车辆",
+                "enablePullDownRefresh": false
+            }
+            
+        }   ,{
+            "path" : "pages/mine/manageVehicles/editVehicle",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "修改车辆",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/mine/manageBankCards/index",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "银行卡",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/mine/manageBankCards/addBankCard",
             "style" :                                                                                    
             "style" :                                                                                    
             {
             {
-                "navigationBarTitleText": "登录",
+                "navigationBarTitleText": "添加银行卡",
                 "enablePullDownRefresh": false
                 "enablePullDownRefresh": false
             }
             }
             
             
         }
         }
         ,{
         ,{
-            "path" : "pages/demo/demo",
+            "path" : "pages/mine/set",
             "style" :                                                                                    
             "style" :                                                                                    
             {
             {
-                "navigationBarTitleText": "",
+                "navigationBarTitleText": "设置",
                 "enablePullDownRefresh": false
                 "enablePullDownRefresh": false
             }
             }
             
             

+ 53 - 0
pages/goodSource/index.vue

@@ -0,0 +1,53 @@
+<!-- 货源 -->
+<template>
+	<view class="content">
+		
+		<!-- <u--image :showLoading="true" :src="src" width="80px" height="80px" @click="click"></u--image> -->
+		货源
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				src: 'https://cdn.uviewui.com/uview/album/1.jpg'
+			}
+		},
+		onLoad() {
+			let _isHave = this.$utils.getRoles('aaa')
+			console.log(_isHave)
+		},
+		methods: {
+		
+		}
+	}
+</script>
+
+<style>
+	.content {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.logo {
+		height: 200rpx;
+		width: 200rpx;
+		margin-top: 200rpx;
+		margin-left: auto;
+		margin-right: auto;
+		margin-bottom: 50rpx;
+	}
+
+	.text-area {
+		display: flex;
+		justify-content: center;
+	}
+
+	.title {
+		font-size: 36rpx;
+		color: #8f8f94;
+	}
+</style>

+ 20 - 0
pages/goodSource/shippingDetails.vue

@@ -0,0 +1,20 @@
+<!-- 发运详情 -->
+<template>
+	<view>
+		发运详情
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 20 - 0
pages/mine/driverCertification.vue

@@ -0,0 +1,20 @@
+<!-- 司机认证 -->
+<template>
+	<view>
+		司机认证
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 20 - 0
pages/mine/helpDescription.vue

@@ -0,0 +1,20 @@
+<!-- 帮助说明 -->
+<template>
+	<view>
+		帮助说明
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 20 - 0
pages/mine/index.vue

@@ -0,0 +1,20 @@
+<!-- 我的 -->
+<template>
+	<view>
+		我的
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 20 - 0
pages/mine/manageBankCards/addBankCard.vue

@@ -0,0 +1,20 @@
+<!-- 添加银行卡 -->
+<template>
+	<view>
+		添加银行卡
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 19 - 0
pages/mine/manageBankCards/index.vue

@@ -0,0 +1,19 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 20 - 0
pages/mine/manageVehicles/addVehicle.vue

@@ -0,0 +1,20 @@
+<!-- 添加车辆 -->
+<template>
+	<view>
+		添加车辆
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 20 - 0
pages/mine/manageVehicles/editVehicle.vue

@@ -0,0 +1,20 @@
+修改车辆
+<template>
+	<view>
+		修改车辆
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 20 - 0
pages/mine/manageVehicles/index.vue

@@ -0,0 +1,20 @@
+<!-- 管理车辆 -->
+<template>
+	<view>
+		管理车辆
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 20 - 0
pages/mine/set.vue

@@ -0,0 +1,20 @@
+<!-- 设置 -->
+<template>
+	<view>
+		设置
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 20 - 0
pages/news/index.vue

@@ -0,0 +1,20 @@
+<!-- 消息 -->
+<template>
+	<view>
+		消息
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 23 - 0
pages/order/confirmLoading.vue

@@ -0,0 +1,23 @@
+<!-- 确认装车 -->
+<template>
+	<view>
+		确认装车
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 23 - 0
pages/order/confirmUnloading.vue

@@ -0,0 +1,23 @@
+<!-- 确认卸车 -->
+<template>
+	<view>
+		确认卸车
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 77 - 0
pages/order/index.vue

@@ -0,0 +1,77 @@
+<!-- 订单-->
+<template>
+	 <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback">
+		<view class="notice">mescroll的极简示例,大部分情况就是这么用</view>
+		<good-list :list="goods"></good-list>
+	</mescroll-body>
+</template>
+
+<script>
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	import {apiGoods} from "@/api/mock.js"
+	
+	export default {
+		mixins: [MescrollMixin], // 使用mixin
+		data() {
+			return {
+				goods: [] // 数据列表
+			}
+		},
+		methods: {
+			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
+			upCallback(page) {
+				// 此处可以继续请求其他接口
+				// if(page.num == 1){
+				// 	// 请求其他接口...
+				// }
+				
+				// 如果希望先请求其他接口,再触发upCallback,可参考以下写法
+				// if(!this.isInitxx){
+				// 	apiGetxx().then(res=>{
+				// 		this.isInitxx = true
+				// 		this.mescroll.resetUpScroll() // 重新触发upCallback
+				// 	}).catch(()=>{
+				// 		this.mescroll.endErr()
+				// 	})
+				// 	return // 此处return,先获取xx
+				// }
+				
+				//联网加载数据
+				apiGoods(page.num, page.size).then(res=>{
+					//联网成功的回调,隐藏下拉刷新和上拉加载的状态;
+					//mescroll会根据传的参数,自动判断列表如果无任何数据,则提示空;列表无下一页数据,则提示无更多数据;
+
+					//方法一(推荐): 后台接口有返回列表的总页数 totalPage
+					//this.mescroll.endByPage(res.list.length, totalPage); //必传参数(当前页的数据个数, 总页数)
+
+					//方法二(推荐): 后台接口有返回列表的总数据量 totalSize
+					//this.mescroll.endBySize(res.list.length, totalSize); //必传参数(当前页的数据个数, 总数据量)
+
+					//方法三(推荐): 您有其他方式知道是否有下一页 hasNext
+					//this.mescroll.endSuccess(res.list.length, hasNext); //必传参数(当前页的数据个数, 是否有下一页true/false)
+
+					//方法四 (不推荐),会存在一个小问题:比如列表共有20条数据,每页加载10条,共2页.如果只根据当前页的数据个数判断,则需翻到第三页才会知道无更多数据
+					this.mescroll.endSuccess(res.list.length);
+
+					//设置列表数据
+					if(page.num == 1) this.goods = []; //如果是第一页需手动制空列表
+					this.goods=this.goods.concat(res.list); //追加新数据
+				}).catch(()=>{
+					//联网失败, 结束加载
+					this.mescroll.endErr();
+				})
+			}
+		}
+	}
+</script>
+
+<style>
+	/*说明*/
+	.notice{
+		font-size: 26upx;
+		padding: 40upx 0;
+		border-bottom: 1upx solid #eee;
+		text-align: center;
+		color:#555;
+	}
+</style>

+ 20 - 0
pages/order/orderDetails.vue

@@ -0,0 +1,20 @@
+<!-- 订单详情-->
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 77 - 0
scrolldemo.vue

@@ -0,0 +1,77 @@
+<!-- 订单-->
+<template>
+	 <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback">
+		<view class="notice">mescroll的极简示例,大部分情况就是这么用</view>
+		<good-list :list="goods"></good-list>
+	</mescroll-body>
+</template>
+
+<script>
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	import {apiGoods} from "@/api/mock.js"
+	
+	export default {
+		mixins: [MescrollMixin], // 使用mixin
+		data() {
+			return {
+				goods: [] // 数据列表
+			}
+		},
+		methods: {
+			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
+			upCallback(page) {
+				// 此处可以继续请求其他接口
+				// if(page.num == 1){
+				// 	// 请求其他接口...
+				// }
+				
+				// 如果希望先请求其他接口,再触发upCallback,可参考以下写法
+				// if(!this.isInitxx){
+				// 	apiGetxx().then(res=>{
+				// 		this.isInitxx = true
+				// 		this.mescroll.resetUpScroll() // 重新触发upCallback
+				// 	}).catch(()=>{
+				// 		this.mescroll.endErr()
+				// 	})
+				// 	return // 此处return,先获取xx
+				// }
+				
+				//联网加载数据
+				apiGoods(page.num, page.size).then(res=>{
+					//联网成功的回调,隐藏下拉刷新和上拉加载的状态;
+					//mescroll会根据传的参数,自动判断列表如果无任何数据,则提示空;列表无下一页数据,则提示无更多数据;
+
+					//方法一(推荐): 后台接口有返回列表的总页数 totalPage
+					//this.mescroll.endByPage(res.list.length, totalPage); //必传参数(当前页的数据个数, 总页数)
+
+					//方法二(推荐): 后台接口有返回列表的总数据量 totalSize
+					//this.mescroll.endBySize(res.list.length, totalSize); //必传参数(当前页的数据个数, 总数据量)
+
+					//方法三(推荐): 您有其他方式知道是否有下一页 hasNext
+					//this.mescroll.endSuccess(res.list.length, hasNext); //必传参数(当前页的数据个数, 是否有下一页true/false)
+
+					//方法四 (不推荐),会存在一个小问题:比如列表共有20条数据,每页加载10条,共2页.如果只根据当前页的数据个数判断,则需翻到第三页才会知道无更多数据
+					this.mescroll.endSuccess(res.list.length);
+
+					//设置列表数据
+					if(page.num == 1) this.goods = []; //如果是第一页需手动制空列表
+					this.goods=this.goods.concat(res.list); //追加新数据
+				}).catch(()=>{
+					//联网失败, 结束加载
+					this.mescroll.endErr();
+				})
+			}
+		}
+	}
+</script>
+
+<style>
+	/*说明*/
+	.notice{
+		font-size: 26upx;
+		padding: 40upx 0;
+		border-bottom: 1upx solid #eee;
+		text-align: center;
+		color:#555;
+	}
+</style>