小欧追 2 лет назад
Родитель
Сommit
a7038e7324
43 измененных файлов с 1553 добавлено и 1256 удалено
  1. 49 8
      App.vue
  2. 23 0
      common/websocket.js
  3. 1 1
      components/x-tabbar.vue
  4. 13 1
      main.js
  5. 14 7
      pages.json
  6. 1 1
      pages/fuwu/fuwu.vue
  7. 7 3
      pages/index/change-address.vue
  8. 3 3
      pages/index/daijia.vue
  9. 1 0
      pages/index/home.vue
  10. 6 3
      pages/index/paotui.vue
  11. 1 0
      pages/index/weixiu.vue
  12. 39 26
      pages/mine/address-list.vue
  13. 11 9
      pages/mine/address-set.vue
  14. 3 0
      pages/mine/anquan.vue
  15. 7 1
      pages/mine/change-pwd.vue
  16. 4 0
      pages/mine/change-tel.vue
  17. 1 0
      pages/mine/forget-tel.vue
  18. 4 0
      pages/mine/forget-tel1.vue
  19. 2 1
      pages/mine/forget-wen.vue
  20. 2 0
      pages/mine/forget-wen1.vue
  21. 4 1
      pages/mine/fuwu-info.vue
  22. 2 0
      pages/mine/kaitong-fuwu.vue
  23. 86 86
      pages/mine/login-wx.vue
  24. 2 1
      pages/mine/mine.vue
  25. 4 2
      pages/mine/setting.vue
  26. 5 1
      pages/mine/tel-add.vue
  27. 177 157
      pages/mine/tel-list.vue
  28. 7 2
      pages/mine/userinfo.vue
  29. 3 1
      pages/mine/wenda-add.vue
  30. 176 156
      pages/mine/wenda-list.vue
  31. 115 100
      pages/mine/xiaoxi.vue
  32. 104 88
      pages/mine/yaoqing-user.vue
  33. 1 4
      pages/mine/yaoqing.vue
  34. 183 173
      pages/order/fuwu-orderinfo.vue
  35. 1 0
      pages/order/jindu.vue
  36. 146 138
      pages/order/order-info.vue
  37. 261 228
      pages/order/order.vue
  38. 1 0
      pages/shop/myshop.vue
  39. 52 42
      pages/shop/search.vue
  40. 24 10
      pages/shop/shop-order.vue
  41. 2 1
      pages/shop/shop-orderinfo.vue
  42. 2 1
      pages/shop/shop.vue
  43. 3 0
      pages/shop/xiadan.vue

+ 49 - 8
App.vue

@@ -3,13 +3,13 @@
 		onLaunch: function() {
 			console.log('App Launch')
 			uni.hideTabBar()
-			if (uni.getStorageSync("token")) {
-				this.$u.post('/User/getDetail').then(res => {
-					if (res.code == 0) {} else {
-						this.$u.toast(res.msg)
-						uni.removeStorageSync("token")
-					}
-				})
+			// this.getuser()
+			if (uni.getStorageSync("token")) {
+				this.$u.post('/User/getDetail').then(res => {
+					if (res.code == 0) {} else {
+						uni.removeStorageSync("token")
+					}
+				})
 			}
 			this.$u.post('/Version/initialization').then(res => {
 				if (res.response.is_open_bottom_business == 1) {
@@ -66,7 +66,7 @@
 							"text": "我的"
 						}
 					]
-				}
+				}
 				console.log(uni.$tabbar);
 			})
 			uni.login({
@@ -87,6 +87,47 @@
 		},
 		onHide: function() {
 			console.log('App Hide')
+		},
+		methods: {
+			getuser() {
+				if (getCurrentPages()[0] && getCurrentPages()[0].route != 'pages/index/index') {
+					// console.log(getCurrentPages()[0].route);
+					if (uni.getStorageSync("token")) {
+						this.$u.post('/User/getDetail').then(res => {
+							if (res.code == 0) {
+								setTimeout(() => {
+									this.getuser()
+								}, 1500)
+							} else {
+								uni.removeStorageSync("token")
+								setTimeout(() => {
+									this.getuser()
+								}, 2000)
+								if (res.msg == '请登录。' || res.msg == '账号在其他地方登录,请重新登录。') {
+									this.$u.toast(res.msg)
+									console.log(getCurrentPages()[0].route);
+									if (getCurrentPages()[0] && getCurrentPages()[0].route != 'pages/index/index') {
+										setTimeout(() => {
+											uni.navigateTo({
+												url: "/pages/mine/login-wx"
+											})
+										},800)
+									}
+									// console.log(getCurrentPages()[0].route);
+								}
+							}
+						})
+					} else {
+						setTimeout(() => {
+							this.getuser()
+						}, 2000)
+					}
+				} else {
+					setTimeout(() => {
+						this.getuser()
+					}, 2000)
+				}
+			}
 		}
 	}
 </script>

+ 23 - 0
common/websocket.js

@@ -0,0 +1,23 @@
+import md5Libs from "../uview-ui/libs/function/md5.js";
+
+function connectSocket() {
+	var token = uni.getStorageSync("token")
+	var timestamp = new Date().getTime()
+	var newtoken = md5Libs.md5('hRoalKzcVQrX7sq9o4LPnUxUcvYYyj69' + timestamp).toUpperCase()
+	uni.connectSocket({
+		url: `120.79.12.242:8080/xiaoma/message/${newtoken}/${timestamp}`,
+		success: (res) => {
+			console.log(res);
+		}
+	})
+}
+
+uni.onSocketOpen((res) => {
+	console.log('WebSocket连接已打开!');
+});
+uni.onSocketError((res) => {
+	console.log('WebSocket连接打开失败,请检查!');
+});
+export default {
+	connectSocket
+}

+ 1 - 1
components/x-tabbar.vue

@@ -14,7 +14,7 @@
 			};
 		},
 		created() {
-			console.log(this.$tabbar);
+			// console.log(this.$tabbar);
 			this.list = uni.$tabbar
 		},
 		methods:{

+ 13 - 1
main.js

@@ -3,8 +3,20 @@ import md5Libs from "./uview-ui/libs/function/md5.js";
 import url from "./common/url.js"
 // #ifndef VUE3
 import Vue from 'vue'
+import Socket from "./common/websocket.js"
 
-var amapFile = require('./common/amap-wx.js');
+var amapFile = require('./common/amap-wx.js');
+Vue.prototype.$Socket = Socket
+Vue.prototype.$tologin = function(msg){
+	if (msg == '请登录。' || msg == '账号在其他地方登录,请重新登录。'){
+		uni.removeStorageSync("token")
+		setTimeout(() => {
+			uni.navigateTo({
+				url:"/pages/mine/login-wx"
+			})
+		},800)
+	}
+},
 Vue.prototype.myAmapFun = new amapFile.AMapWX({
 	key: 'daba801a5b8eb18e2aee6d0838ea4c61'
 });

+ 14 - 7
pages.json

@@ -173,7 +173,8 @@
 			"style": {
 				"navigationBarTitleText": "店铺订单",
 				"navigationStyle": "custom",
-				"navigationBarTextStyle":"white"
+				"navigationBarTextStyle":"white",
+				"enablePullDownRefresh": true
 			}
 		},
 		{
@@ -197,7 +198,8 @@
 			"style": {
 				"navigationBarTitleText": "商品搜索",
 				"navigationBarBackgroundColor": "#2AA47F",
-				"navigationBarTextStyle": "white"
+				"navigationBarTextStyle": "white",
+				"enablePullDownRefresh": true
 			}
 		},
 		{
@@ -235,7 +237,8 @@
 			"style": {
 				"navigationBarTitleText": "地址管理",
 				"navigationBarBackgroundColor": "#09AA8C",
-				"navigationBarTextStyle": "white"
+				"navigationBarTextStyle": "white",
+				"enablePullDownRefresh": true
 			}
 		},
 		{
@@ -291,7 +294,8 @@
 			"style": {
 				"navigationBarTitleText": "设置手机号密码",
 				"navigationBarBackgroundColor": "#09AA8C",
-				"navigationBarTextStyle": "white"
+				"navigationBarTextStyle": "white",
+				"enablePullDownRefresh": true
 			}
 		},
 		{
@@ -307,7 +311,8 @@
 			"style": {
 				"navigationBarTitleText": "设置找回密码问答",
 				"navigationBarBackgroundColor": "#09AA8C",
-				"navigationBarTextStyle": "white"
+				"navigationBarTextStyle": "white",
+				"enablePullDownRefresh": true
 			}
 		},
 		{
@@ -339,7 +344,8 @@
 			"style": {
 				"navigationBarTitleText": "消息管理",
 				"navigationBarBackgroundColor": "#09AA8C",
-				"navigationBarTextStyle": "white"
+				"navigationBarTextStyle": "white",
+				"enablePullDownRefresh": true
 			}
 		},
 		{
@@ -355,7 +361,8 @@
 			"style": {
 				"navigationBarTitleText": "已邀请用户",
 				"navigationBarBackgroundColor": "#09AA8C",
-				"navigationBarTextStyle": "white"
+				"navigationBarTextStyle": "white",
+				"enablePullDownRefresh": true
 			}
 		},
 		{

+ 1 - 1
pages/fuwu/fuwu.vue

@@ -202,8 +202,8 @@
 							.facilitator.orders_end_time
 					} else {
 						this.$u.toast(res.msg)
-						uni.removeStorageSync("token")
 						this.userdata = {}
+						this.$tologin(res.msg)
 					}
 				})
 			},

+ 7 - 3
pages/index/change-address.vue

@@ -61,7 +61,7 @@
 		},
 		onLoad(option) {
 			var obj = JSON.parse(decodeURIComponent(option.obj))
-			console.log(obj);
+			// console.log(obj);
 			this.addresstext = obj.addressdesc
 			this.phone = obj.addressphone
 			this.address = obj.addresstext
@@ -162,6 +162,8 @@
 							lng:res.response.lng
 						});
 						uni.navigateBack()
+					}else{
+						this.$tologin(res.msg)
 					}
 				})
 			},
@@ -172,13 +174,15 @@
 						list_type: 'page',
 						page: this.page
 					}
-				}).then(res => {
+				}).then(res => {
+					
 					this.count = res.response.count
 					if (this.page == 1) {
 						this.list = res.response.data
 					} else {
 						this.list = this.list.concat(res.response.data)
-					}
+					}
+					this.$tologin(res.msg)
 				})
 			},
 		}

+ 3 - 3
pages/index/daijia.vue

@@ -70,7 +70,6 @@
 					this.tostart()
 				}
 			})
-
 		},
 		methods: {
 			cancel() {
@@ -157,7 +156,8 @@
 							})
 						}
 					} else {
-						this.$u.toast(res.msg)
+						this.$u.toast(res.msg)
+						this.$tologin(res.msg)
 					}
 				})
 			},
@@ -193,7 +193,7 @@
 						this.phone = res.response.phone
 					} else {
 						this.$u.toast(res.msg)
-						uni.removeStorageSync("token")
+						this.$tologin(res.msg)
 					}
 				})
 			},

+ 1 - 0
pages/index/home.vue

@@ -134,6 +134,7 @@
 				this.getorder()
 			}else{
 				this.$refs.nav.count = 0
+				this.$refs.tabbar.setbadge(0)
 				uni.removeTabBarBadge({
 					index:1,
 				})

+ 6 - 3
pages/index/paotui.vue

@@ -401,7 +401,8 @@
 							}
 
 						} else {
-							this.$u.toast(res.msg)
+							this.$u.toast(res.msg)
+							this.$tologin(res.msg)
 						}
 					})
 				} else if (this.type == 2) {
@@ -463,7 +464,8 @@
 							}
 
 						} else {
-							this.$u.toast(res.msg)
+							this.$u.toast(res.msg)
+							this.$tologin(res.msg)
 						}
 					})
 				} else if (this.type == 3) {
@@ -541,7 +543,8 @@
 							}
 
 						} else {
-							this.$u.toast(res.msg)
+							this.$u.toast(res.msg)
+							this.$tologin(res.msg)
 						}
 					})
 				}

+ 1 - 0
pages/index/weixiu.vue

@@ -184,6 +184,7 @@
 						
 					}else{
 						this.$u.toast(res.msg)
+						this.$tologin(res.msg)
 					}
 				})
 			},

+ 39 - 26
pages/mine/address-list.vue

@@ -5,17 +5,17 @@
 				<text @tap.stop="del(item)">删除</text>
 				<text @tap.stop="toset(item)">修改</text>
 			</view>
-			<view class="moren u-flex u-col-center u-row-right" v-if="item.is_default == 0">
-				<text @tap.stop="setmoren(item)">设为默认地址</text>
+			<view class="moren u-flex u-col-center u-row-right" v-if="item.is_default == 0">
+				<text @tap.stop="setmoren(item)">设为默认地址</text>
 			</view>
 			<view class="moren" v-if="item.is_default == 1" style="color: #F08A53;">默认地址</view>
 			<view class="name">
 				{{item.name}} {{item.phone}}
 			</view>
 			<view class="address-text">
-				{{item.location_address}} {{item.address}}
+				{{item.address}}{{item.location_address}}
 			</view>
-		</view>
+		</view>
 		<x-notdata v-if="list.length == 0" tips="数据为空,请添加" @shuaxin="getlist(1)"></x-notdata>
 		<view style="height: 120rpx;"></view>
 		<view class="add" @tap="toadd">
@@ -30,30 +30,36 @@
 			return {
 				page: 1,
 				list: [],
-				count: 0,
-				type:0
+				count: 0,
+				type: 0
 			}
-		},
-		onLoad(option) {
-			this.type = option.type
 		},
-		onShow() {
+		onLoad(option) {
+			this.type = option.type
+		},
+		onPullDownRefresh() {
 			this.page = 1
 			this.getlist()
 		},
+		onShow() {
+			if (uni.getStorageSync("token")) {
+				this.page = 1
+				this.getlist()
+			}
+		},
 		onReachBottom() {
 			if (this.count != this.list.length) {
 				this.page++
 				this.getlist()
 			}
 		},
-		methods: {
-			changeaddress(item){
-				if(this.type == 1){
-					const eventChannel = this.getOpenerEventChannel();
-					eventChannel.emit('changeadd', item);
-					uni.navigateBack()
-				}
+		methods: {
+			changeaddress(item) {
+				if (this.type == 1) {
+					const eventChannel = this.getOpenerEventChannel();
+					eventChannel.emit('changeadd', item);
+					uni.navigateBack()
+				}
 			},
 			del(item) {
 				uni.showModal({
@@ -105,16 +111,23 @@
 						list_type: 'page',
 						page: this.page
 					}
-				}).then(res => {
-					if(str == 1){
-						this.$u.toast("刷新成功")
-					}
-					this.count = res.response.count
-					if (this.page == 1) {
-						this.list = res.response.data
-					} else {
-						this.list = this.list.concat(res.response.data)
+				}).then(res => {
+					this.$tologin(res.msg)
+					if (res.codee == 0) {
+						if (str == 1) {
+							this.$u.toast("刷新成功")
+						}
+						uni.stopPullDownRefresh()
+						this.count = res.response.count
+						if (this.page == 1) {
+							this.list = res.response.data
+						} else {
+							this.list = this.list.concat(res.response.data)
+						}
+					}else{
+						this.$u.toast(res.msg)
 					}
+
 				})
 			},
 			toadd() {

+ 11 - 9
pages/mine/address-set.vue

@@ -47,8 +47,8 @@
 				var item = JSON.parse(decodeURIComponent(option.item))
 				this.name = item.name
 				this.tel = item.phone
-				this.address = item.location_address
-				this.addresstext = item.address
+				this.address = item.address
+				this.addresstext = item.location_address
 				this.latitude = item.lat
 				this.longitude = item.lng
 				this.id = item.id
@@ -76,13 +76,13 @@
 				if(this.id){
 					this.$u.post('/UserAddress/update',{
 						content:{
-							address:this.addresstext,
+							address:this.address,
 							id:this.id,
 							is_default:this.checked ? 1 : 0,
 							is_user_add:1,
 							lat:this.latitude,
 							lng:this.longitude,
-							location_address:this.address,
+							location_address:this.addresstext,
 							name:this.name,
 							phone:this.tel,
 						}
@@ -92,17 +92,19 @@
 							setTimeout(() => {
 								uni.navigateBack()
 							},800)
+						}else{
+							this.$tologin(res.msg)
 						}
 					})
 				}else{
 					this.$u.post('/UserAddress/add',{
 						content:{
-							address:this.addresstext,
+							address:this.address,
 							is_default:this.checked ? 1 : 0,
 							is_user_add:1,
 							lat:this.latitude,
 							lng:this.longitude,
-							location_address:this.address,
+							location_address:this.addresstext,
 							name:this.name,
 							phone:this.tel,
 						}
@@ -120,8 +122,8 @@
 			openmap(){
 				uni.chooseLocation({
 					success: (res) => {
-						this.address = res.name
-						this.addresstext = res.address
+						this.address = res.address
+						this.addresstext = res.name
 						this.latitude = res.latitude
 						this.longitude = res.longitude
 						console.log(res);
@@ -174,7 +176,7 @@
 				height: 100rpx;
 
 				.text {
-					width: 160rpx;
+					width: 180rpx;
 					font-size: 33rpx;
 					font-family: SimHei;
 					font-weight: 400;

+ 3 - 0
pages/mine/anquan.vue

@@ -31,6 +31,9 @@
 			this.$u.post('/User/getDetail').then(res => {
 				if (res.code == 0) {
 					this.is_set_password = res.response.is_set_password
+				}else{
+					this.$u.toast(res.msg)
+					this.$tologin(res.msg)
 				}
 			})
 		},

+ 7 - 1
pages/mine/change-pwd.vue

@@ -86,6 +86,8 @@
 							setTimeout(() => {
 								uni.navigateBack()
 							},800)
+						}else{
+							this.$tologin(res.msg)
 						}
 					})
 				}
@@ -113,6 +115,8 @@
 							setTimeout(() => {
 								uni.navigateBack()
 							},800)
+						}else{
+							this.$tologin(res.msg)
 						}
 					})
 				}
@@ -123,7 +127,7 @@
 						this.userdata = res.response
 					} else {
 						this.$u.toast(res.msg)
-						uni.removeStorageSync("token")
+						this.$tologin(res.msg)
 						this.userdata = {}
 					}
 				})
@@ -144,6 +148,8 @@
 						this.$u.toast(res.msg)
 						if (res.code == 0) {
 							this.$refs.uCode.start();
+						}else{
+							this.$tologin(res.msg)
 						}
 					})
 				} else {

+ 4 - 0
pages/mine/change-tel.vue

@@ -69,6 +69,8 @@
 						setTimeout(() => {
 							uni.navigateBack()
 						}, 800)
+					}else{
+						this.$tologin(res.msg)
 					}
 				})
 			},
@@ -88,6 +90,8 @@
 						this.$u.toast(res.msg)
 						if (res.code == 0) {
 							this.$refs.uCode.start();
+						}else{
+							this.$tologin(res.msg)
 						}
 					})
 				} else {

+ 1 - 0
pages/mine/forget-tel.vue

@@ -42,6 +42,7 @@
 						}
 					}else{
 						this.$u.toast(res.msg)
+						this.$tologin(res.msg)
 					}
 				})
 			}

+ 4 - 0
pages/mine/forget-tel1.vue

@@ -86,6 +86,8 @@
 								delta: 3
 							})
 						}, 800)
+					}else{
+						this.$tologin(res.msg)
 					}
 				})
 
@@ -106,6 +108,8 @@
 						this.$u.toast(res.msg)
 						if (res.code == 0) {
 							this.$refs.uCode.start();
+						}else{
+							this.$tologin(res.msg)
 						}
 					})
 				} else {

+ 2 - 1
pages/mine/forget-wen.vue

@@ -73,7 +73,8 @@
 							}))
 						})
 					} else {
-						this.$u.toast("答案错误")
+						this.$u.toast("答案错误")
+						this.$tologin(res.msg)
 					}
 				})
 

+ 2 - 0
pages/mine/forget-wen1.vue

@@ -62,6 +62,8 @@
 								delta:4
 							})
 						},800)
+					}else{
+						this.$tologin(res.msg)
 					}
 				})
 			}

+ 4 - 1
pages/mine/fuwu-info.vue

@@ -297,6 +297,8 @@
 						setTimeout(() => {
 							uni.navigateBack()
 						}, 800)
+					}else{
+						this.$tologin(res.msg)
 					}
 				})
 			},
@@ -389,7 +391,8 @@
 							this.imglist_code.push(val.code)
 						})
 					} else {
-						this.$u.toast(res.msg)
+						this.$u.toast(res.msg)
+						this.$tologin(res.msg)
 					}
 				})
 			}

+ 2 - 0
pages/mine/kaitong-fuwu.vue

@@ -439,6 +439,8 @@
 						setTimeout(() => {
 							uni.navigateBack()
 						}, 800)
+					}else{
+						this.$tologin(res.msg)
 					}
 				})
 			},

+ 86 - 86
pages/mine/login-wx.vue

@@ -4,14 +4,13 @@
 			<image src="../../static/images/logo-img.png" mode=""></image>
 		</view>
 		<view class="login-butt u-flex u-col-center u-row-center">
-			<image class="image1" src="../../static/images/login1-2.png" mode=""></image>
-			<button type="default" style="border: none;background-color: rgba(0,0,0,0);" class="button"
-				open-type="getPhoneNumber" @getphonenumber="wxlogin">
-				<view class="butt u-flex u-col-center u-row-center">
-					<image class="image2" src="../../static/images/login1-3.png" mode=""></image>
-					<image src="../../static/images/wx-login.png" style="width: 90rpx;height: 80rpx;position: relative;z-index: 10;margin-right: 20rpx;" mode=""></image>
-					<text>微信登录</text>
-				</view>
+			<image class="image1" src="../../static/images/login1-2.png" mode=""></image>
+			<button type="default" style="border: none;background-color: rgba(0,0,0,0);" class="button" open-type="getPhoneNumber" @getphonenumber="wxlogin">
+				<view class="butt u-flex u-col-center u-row-center">
+					<image class="image2" src="../../static/images/login1-3.png" mode=""></image>
+					<image src="../../static/images/wx-login.png" style="width: 90rpx;height: 80rpx;position: relative;z-index: 10;margin-right: 20rpx;" mode=""></image>
+					<text>微信登录</text>
+				</view>
 			</button>
 		</view>
 		<view class="xieyi u-flex u-col-center u-row-center">
@@ -49,8 +48,8 @@
 				tips: '获取验证码',
 				// refCode: null,
 				seconds: 60,
-				code1: '',
-				yqm:''
+				code1: '',
+				yqm: ''
 			}
 		},
 		onShow() {
@@ -62,25 +61,25 @@
 					}
 				})
 			}
-		},
-		onLoad(option) {
-			if(uni.getStorageSync("yqm")){
-				this.yqm = uni.getStorageSync("yqm")
-			}
-			if(option.yqm){
-				this.yqm = option.yqm
-				uni.setStorageSync("yqm",this.yqm)
-			}
-			if(option.scene){
-				this.yqm = option.scene
-				uni.setStorageSync("yqm",this.yqm)
-			}
 		},
-		methods: {
-			toxieyi(type){
-				uni.navigateTo({
-					url:"./all-tips?type=" + type
-				})
+		onLoad(option) {
+			if (uni.getStorageSync("yqm")) {
+				this.yqm = uni.getStorageSync("yqm")
+			}
+			if (option.yqm) {
+				this.yqm = option.yqm
+				uni.setStorageSync("yqm", this.yqm)
+			}
+			if (option.scene) {
+				this.yqm = option.scene
+				uni.setStorageSync("yqm", this.yqm)
+			}
+		},
+		methods: {
+			toxieyi(type) {
+				uni.navigateTo({
+					url: "./all-tips?type=" + type
+				})
 			},
 			opentips() {
 				this.$u.toast("请勾选登录/注册协议")
@@ -88,52 +87,53 @@
 			wxlogin(e) {
 				if (!e.detail.encryptedData) {
 					return
-				}
-				if (!this.checked) {
-					uni.showModal({
-						content:"请阅读并同意用户协议和隐私协议",
-						confirmText:"同意",
-						cancelText:"不同意",
-						success: (on) => {
-							if(on.confirm){
-								this.checked =  true
-								this.wxlogin(e)
-							}
-						}
-					})
-					return
+				}
+				if (!this.checked) {
+					uni.showModal({
+						content: "请阅读并同意用户协议和隐私协议",
+						confirmText: "同意",
+						cancelText: "不同意",
+						success: (on) => {
+							if (on.confirm) {
+								this.checked = true
+								this.wxlogin(e)
+							}
+						}
+					})
+					return
 				}
 				// console.log(e);
-				this.$u.post('/Auth/thirdPartyLogin', {
-					content: {
-						encrypted_data: e.detail.encryptedData,
-						iv: e.detail.iv,
-						login_code: this.code1,
-						openid:uni.getStorageSync("openid"),
-						type: 2,
-					}
-				}).then(res => {
-					this.code1 = ''
-					if (res.response.status == 0) {
-						uni.navigateTo({
-							url: "./bangding?phone=" + res.response.phone
-						})
-					} else {
-						this.$u.toast(res.msg)
-						if(res.code == 0){
-							uni.setStorageSync("token", res.response.token)
-							setTimeout(() => {
-								if(getCurrentPages().length == 1){
-									uni.switchTab({
-										url:"./mine"
-									})
-								}else{
-									uni.navigateBack()
-								}
-							}, 800)
-						}
-						
-					}
+				this.$u.post('/Auth/thirdPartyLogin', {
+					content: {
+						encrypted_data: e.detail.encryptedData,
+						iv: e.detail.iv,
+						login_code: this.code1,
+						openid: uni.getStorageSync("openid"),
+						type: 2,
+					}
+				}).then(res => {
+					this.code1 = ''
+					if (res.response.status == 0) {
+						uni.navigateTo({
+							url: "./bangding?phone=" + res.response.phone
+						})
+					} else {
+						this.$u.toast(res.msg)
+						if (res.code == 0) {
+							uni.setStorageSync("token", res.response.token)
+							this.$Socket.connectSocket()
+							setTimeout(() => {
+								if (getCurrentPages().length == 1) {
+									uni.switchTab({
+										url: "./mine"
+									})
+								} else {
+									uni.navigateBack()
+								}
+							}, 800)
+						}
+
+					}
 				})
 			},
 			tologin() {
@@ -151,25 +151,25 @@
 					return
 				}
 				if (!this.checked) {
-					uni.showModal({
-						content:"请阅读并同意用户协议和隐私协议",
-						confirmText:"同意",
-						cancelText:"不同意",
-						success: (on) => {
-							if(on.confirm){
-								this.checked =  true
-								this.login()
-							}
-						}
+					uni.showModal({
+						content: "请阅读并同意用户协议和隐私协议",
+						confirmText: "同意",
+						cancelText: "不同意",
+						success: (on) => {
+							if (on.confirm) {
+								this.checked = true
+								this.login()
+							}
+						}
 					})
 					return
 				}
 				this.$u.post('/Auth/phoneCaptchaLoginRegister', {
 					content: {
 						code: this.code,
-						phone: this.tel,
-						referral_code:this.yqm,
-						wechat_openid:uni.getStorageSync("openid"),
+						phone: this.tel,
+						referral_code: this.yqm,
+						wechat_openid: uni.getStorageSync("openid"),
 					}
 				}).then(res => {
 					this.$u.toast(res.msg)
@@ -244,7 +244,7 @@
 					top: 0;
 					left: 0;
 				}
-				
+
 				text {
 					text-align: center;
 					line-height: 132rpx;

+ 2 - 1
pages/mine/mine.vue

@@ -159,7 +159,8 @@
 				})
 			} else {
 				this.userdata = {}
-				this.$refs.nav.count = 0
+				this.$refs.nav.count = 0
+				this.$refs.tabbar.setbadge(0)
 				uni.removeTabBarBadge({
 					index: 1,
 				})

+ 4 - 2
pages/mine/setting.vue

@@ -31,7 +31,9 @@
 			}
 		},
 		onShow() {
-			this.getuser()
+			if (uni.getStorageSync("token")) {
+				this.getuser()
+			}
 		},
 		methods: {
 			getuser() {
@@ -40,7 +42,7 @@
 						this.userdata = res.response
 					} else {
 						this.$u.toast(res.msg)
-						uni.removeStorageSync("token")
+						this.$tologin(res.msg)
 						this.userdata = {}
 					}
 				})

+ 5 - 1
pages/mine/tel-add.vue

@@ -71,6 +71,8 @@
 						setTimeout(() => {
 							uni.navigateBack()
 						}, 800)
+					}else{
+						this.$tologin(res.msg)
 					}
 				})
 			},
@@ -80,7 +82,7 @@
 						this.userdata = res.response
 					} else {
 						this.$u.toast(res.msg)
-						uni.removeStorageSync("token")
+						this.$tologin(res.msg)
 						this.userdata = {}
 					}
 				})
@@ -101,6 +103,8 @@
 						this.$u.toast(res.msg)
 						if (res.code == 0) {
 							this.$refs.uCode.start();
+						}else{
+							this.$tologin(res.msg)
 						}
 					})
 				} else {

+ 177 - 157
pages/mine/tel-list.vue

@@ -1,158 +1,178 @@
-<template>
-	<view class="tel-list">
-		<view class="header u-flex u-col-center u-row-right" @tap="totips">
-			<u-icon name="info-circle" size="33" color="#08AA8C"></u-icon>
-			<text class="text">最多不能超过三个</text>
-		</view>
-		<view class="item" v-for="(item,index) in list" :key="index">
-			<view class="top u-flex u-col-center u-row-right">
-				<text @tap="del(item)">删除</text>
-			</view>
-			<view class="text2">
-				手机号{{index+1}}  {{item.phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')}}
-			</view>
-			<view class="text2">
-				{{item.create_time}}
-			</view>
-		</view>
-		<x-notdata v-if="list.length == 0" tips="数据为空,请添加" @shuaxin="getlist(1)"></x-notdata>
-		<view style="height: 120rpx;"></view>
-		<view class="down-botton" @tap="toadd" v-if="list.length < 3">
-			添加
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data(){
-			return{
-				page:1,
-				list:[],
-				count:0,
-				first:''
-			}
-		},
-		onLoad(option) {
-			this.first = option.first
-		},
-		onShow() {
-			this.page = 1
-			this.getlist()
-		},
-		onReachBottom() {
-			if(this.count != this.list.length){
-				this.page++
-				this.getlist()
-			}
-		},
-		methods:{
-			totips(){
-				// uni.navigateTo({
-				// 	url:"./all-tips?type=3"
-				// })
-			},
-			del(item){
-				uni.showModal({
-					content:"确定删除吗?",
-					success: (res) => {
-						if(res.confirm){
-							this.$u.post('/UserBindPhone/delete',{
-								content:{
-									id:item.id
-								}
-							}).then(res => {
-								if(res.code == 0){
-									this.$u.toast("删除成功")
-									setTimeout(() => {
-										this.page = 1
-										this.getlist()
-									},800)
-								}else{
-									this.$u.toast(res.msg)
-								}
-							})
-						}
-					}
-				})
-			},
-			getlist(str){
-				this.$u.post('/UserBindPhone/getBindRetrievePasswordPhoneList',{
-					content:{
-						limit:10,
-						list_type:'page',
-						page:this.page
-					}
-				}).then(res => {
-					if(str == 1){
-						this.$u.toast("刷新成功")
-					}
-					this.count = res.response.data.total
-					if(this.page == 1){
-						this.list = res.response.data.data
-						if(this.list.length == 0 && this.first == 1){
-							this.toadd()
-						}
-						this.first = 2
-					}else{
-						this.list = this.list.concat(res.response.data.data)
-					}
-				})
-			},
-			toadd(){
-				uni.navigateTo({
-					url:"./tel-add"
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.tel-list{
-		padding: 0 33rpx;
-		.down-botton{
-			position: fixed;
-			bottom: 20rpx;
-			left: 24rpx;
-			width: 702rpx;
-			height: 80rpx;
-			line-height: 80rpx;
-			border-radius: 10rpx;
-			color: #fff;
-			background-color: #08AA8C;
-			text-align: center;
-		}
-		.item{
-			margin-bottom: 20rpx;
-			border-radius: 20rpx;
-			background-color: #fff;
-			padding:0 24rpx;
-			.text2{
-				font-size: 33rpx;
-				font-family: SimHei;
-				font-weight: 400;
-				color: #08AA8C;
-				padding: 0 0 20rpx 0;
-			}
-			.top{
-				margin-bottom: 20rpx;
-				font-size: 33rpx;
-				font-family: SimHei;
-				font-weight: 400;
-				padding: 20rpx 0;
-				border-bottom: 2rpx solid rgba(0,0,0,0.2);
-			}
-		}
-		.header{
-			padding: 28rpx 0;
-			.text{
-				margin-left: 6rpx;
-				font-size: 33rpx;
-				font-family: SimHei;
-				font-weight: 400;
-				color: #08AA8C;
-			}
-		}
-	}
+<template>
+	<view class="tel-list">
+		<view class="header u-flex u-col-center u-row-right" @tap="totips">
+			<u-icon name="info-circle" size="33" color="#08AA8C"></u-icon>
+			<text class="text">最多不能超过三个</text>
+		</view>
+		<view class="item" v-for="(item,index) in list" :key="index">
+			<view class="top u-flex u-col-center u-row-right">
+				<text @tap="del(item)">删除</text>
+			</view>
+			<view class="text2">
+				手机号{{index+1}} {{item.phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')}}
+			</view>
+			<view class="text2">
+				{{item.create_time}}
+			</view>
+		</view>
+		<x-notdata v-if="list.length == 0" tips="数据为空,请添加" @shuaxin="getlist(1)"></x-notdata>
+		<view style="height: 120rpx;"></view>
+		<view class="down-botton" @tap="toadd" v-if="list.length < 3">
+			添加
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				page: 1,
+				list: [],
+				count: 0,
+				first: ''
+			}
+		},
+		onLoad(option) {
+			this.first = option.first
+		},
+		onShow() {
+			if (uni.getStorageSync("token")) {
+				this.page = 1
+				this.getlist()
+			}
+
+		},
+		onPullDownRefresh() {
+			this.page = 1
+			this.getlist()
+		},
+		onReachBottom() {
+			if (this.count != this.list.length) {
+				this.page++
+				this.getlist()
+			}
+		},
+		methods: {
+			totips() {
+				// uni.navigateTo({
+				// 	url:"./all-tips?type=3"
+				// })
+			},
+			del(item) {
+				uni.showModal({
+					content: "确定删除吗?",
+					success: (res) => {
+						if (res.confirm) {
+							this.$u.post('/UserBindPhone/delete', {
+								content: {
+									id: item.id
+								}
+							}).then(res => {
+								if (res.code == 0) {
+									this.$u.toast("删除成功")
+									setTimeout(() => {
+										this.page = 1
+										this.getlist()
+									}, 800)
+								} else {
+									this.$u.toast(res.msg)
+									this.$tologin(res.msg)
+								}
+							})
+						}
+					}
+				})
+			},
+			getlist(str) {
+				this.$u.post('/UserBindPhone/getBindRetrievePasswordPhoneList', {
+					content: {
+						limit: 10,
+						list_type: 'page',
+						page: this.page
+					}
+				}).then(res => {
+					if (res.code == 0) {
+						if (str == 1) {
+							this.$u.toast("刷新成功")
+						}
+						uni.stopPullDownRefresh()
+						this.count = res.response.data.total
+						if (this.page == 1) {
+							this.list = res.response.data.data
+							if (this.list.length == 0 && this.first == 1) {
+								this.toadd()
+							}
+							this.first = 2
+						} else {
+							this.list = this.list.concat(res.response.data.data)
+						}
+					} else {
+						this.$tologin(res.msg)
+					}
+
+				})
+			},
+			toadd() {
+				uni.navigateTo({
+					url: "./tel-add"
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.tel-list {
+		padding: 0 33rpx;
+
+		.down-botton {
+			position: fixed;
+			bottom: 20rpx;
+			left: 24rpx;
+			width: 702rpx;
+			height: 80rpx;
+			line-height: 80rpx;
+			border-radius: 10rpx;
+			color: #fff;
+			background-color: #08AA8C;
+			text-align: center;
+		}
+
+		.item {
+			margin-bottom: 20rpx;
+			border-radius: 20rpx;
+			background-color: #fff;
+			padding: 0 24rpx;
+
+			.text2 {
+				font-size: 33rpx;
+				font-family: SimHei;
+				font-weight: 400;
+				color: #08AA8C;
+				padding: 0 0 20rpx 0;
+			}
+
+			.top {
+				margin-bottom: 20rpx;
+				font-size: 33rpx;
+				font-family: SimHei;
+				font-weight: 400;
+				padding: 20rpx 0;
+				border-bottom: 2rpx solid rgba(0, 0, 0, 0.2);
+			}
+		}
+
+		.header {
+			padding: 28rpx 0;
+
+			.text {
+				margin-left: 6rpx;
+				font-size: 33rpx;
+				font-family: SimHei;
+				font-weight: 400;
+				color: #08AA8C;
+			}
+		}
+	}
 </style>

+ 7 - 2
pages/mine/userinfo.vue

@@ -44,8 +44,10 @@
 				head:''
 			}
 		},
-		onLoad() {
-			this.getuser()
+		onShow() {
+			if(uni.getStorageSync("token")){
+				this.getuser()
+			}
 		},
 		methods: {
 			save(){
@@ -64,6 +66,8 @@
 					this.$u.toast(res.msg)
 					if(res.code ==  0){
 						this.getuser()
+					}else{
+						this.$tologin(res.msg)
 					}
 				})
 			},
@@ -106,6 +110,7 @@
 						this.head = this.userdata.detail.headimgurl_image_src
 					}else{
 						this.$u.toast(res.msg)
+						this.$tologin(res.msg)
 					}
 				})
 			},

+ 3 - 1
pages/mine/wenda-add.vue

@@ -69,6 +69,8 @@
 						setTimeout(() => {
 							uni.navigateBack()
 						}, 800)
+					}else{
+						this.$tologin(res.msg)
 					}
 				})
 			},
@@ -89,7 +91,7 @@
 						this.userdata = res.response
 					} else {
 						this.$u.toast(res.msg)
-						uni.removeStorageSync("token")
+						this.$tologin(res.msg)
 						this.userdata = {}
 					}
 				})

+ 176 - 156
pages/mine/wenda-list.vue

@@ -1,157 +1,177 @@
-<template>
-	<view class="wenda-list">
-		<view class="header u-flex u-col-center u-row-right">
-			<u-icon name="info-circle" size="33" color="#08AA8C"></u-icon>
-			<text class="text">最多不能超过三个</text>
-		</view>
-		<view class="item" v-for="(item,index) in list" :key="index">
-			<view class="top u-flex u-col-center u-row-right">
-				<text @tap="del(item)">删除</text>
-			</view>
-			<view class="text2">
-				问题{{index+1}}  {{item.safety_problem}}
-			</view>
-			<view class="text2">
-				{{item.create_time}}
-			</view>
-		</view>
-		<x-notdata v-if="list.length == 0" tips="数据为空,请添加" @shuaxin="getlist(1)"></x-notdata>
-		<view style="height: 120rpx;"></view>
-		<view class="down-botton" @tap="toadd" v-if="list.length < 3">
-			添加
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data(){
-			return{
-				page:1,
-				list:[],
-				count:0
-			}
-		},
-		onLoad(option) {
-			this.first = option.first
-		},
-		onShow() {
-			this.page = 1
-			this.getlist()
-		},
-		onReachBottom() {
-			if(this.count != this.list.length){
-				this.page++
-				this.getlist()
-			}
-		},
-		methods:{
-			totips(){
-				uni.navigateTo({
-					url:"./all-tips?type=4"
-				})
-			},
-			del(item){
-				uni.showModal({
-					content:"确认删除吗?",
-					success: (res) => {
-						if(res.confirm){
-							this.$u.post('/UserSafetyProblem/delete',{
-								content:{
-									id:item.id
-								}
-							}).then(res => {
-								if(res.code == 0){
-									this.$u.toast("删除成功")
-									setTimeout(() => {
-										this.page = 1
-										this.getlist()
-									},800)
-								}else{
-									this.$u.toast(res.msg)
-								}
-							})
-						}
-					}
-				})
-			},
-			getlist(str){
-				this.$u.post('/UserSafetyProblem/list',{
-					content:{
-						limit:10,
-						list_type:'page',
-						page:this.page
-					}
-				}).then(res => {
-					if(str == 1){
-						this.$u.toast("刷新成功")
-					}
-					this.count = res.response.count
-					if(this.page == 1){
-						this.list = res.response.data
-						if(this.list.length == 0 && this.first == 1){
-							this.toadd()
-						}
-						this.first = 2
-					}else{
-						this.list = this.list.concat(res.response.data)
-					}
-				})
-			},
-			toadd(){
-				uni.navigateTo({
-					url:"./wenda-add"
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.wenda-list{
-		padding: 0 33rpx;
-		.down-botton{
-			position: fixed;
-			bottom: 20rpx;
-			left: 24rpx;
-			width: 702rpx;
-			height: 80rpx;
-			line-height: 80rpx;
-			border-radius: 10rpx;
-			color: #fff;
-			background-color: #08AA8C;
-			text-align: center;
-		}
-		.item{
-			margin-bottom: 20rpx;
-			border-radius: 20rpx;
-			background-color: #fff;
-			padding:0 24rpx;
-			.text2{
-				font-size: 33rpx;
-				font-family: SimHei;
-				font-weight: 400;
-				color: #08AA8C;
-				padding: 0 0 20rpx 0;
-			}
-			.top{
-				margin-bottom: 20rpx;
-				font-size: 33rpx;
-				font-family: SimHei;
-				font-weight: 400;
-				padding: 20rpx 0;
-				border-bottom: 2rpx solid rgba(0,0,0,0.2);
-			}
-		}
-		.header{
-			padding: 28rpx 0;
-			.text{
-				margin-left: 6rpx;
-				font-size: 33rpx;
-				font-family: SimHei;
-				font-weight: 400;
-				color: #08AA8C;
-			}
-		}
-	}
+<template>
+	<view class="wenda-list">
+		<view class="header u-flex u-col-center u-row-right">
+			<u-icon name="info-circle" size="33" color="#08AA8C"></u-icon>
+			<text class="text">最多不能超过三个</text>
+		</view>
+		<view class="item" v-for="(item,index) in list" :key="index">
+			<view class="top u-flex u-col-center u-row-right">
+				<text @tap="del(item)">删除</text>
+			</view>
+			<view class="text2">
+				问题{{index+1}} {{item.safety_problem}}
+			</view>
+			<view class="text2">
+				{{item.create_time}}
+			</view>
+		</view>
+		<x-notdata v-if="list.length == 0" tips="数据为空,请添加" @shuaxin="getlist(1)"></x-notdata>
+		<view style="height: 120rpx;"></view>
+		<view class="down-botton" @tap="toadd" v-if="list.length < 3">
+			添加
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				page: 1,
+				list: [],
+				count: 0
+			}
+		},
+		onLoad(option) {
+			this.first = option.first
+		},
+		onShow() {
+			if (uni.getStorageSync("token")) {
+				this.page = 1
+				this.getlist()
+			}
+
+		},
+		onPullDownRefresh() {
+			this.page = 1
+			this.getlist()
+		},
+		onReachBottom() {
+			if (this.count != this.list.length) {
+				this.page++
+				this.getlist()
+			}
+		},
+		methods: {
+			totips() {
+				uni.navigateTo({
+					url: "./all-tips?type=4"
+				})
+			},
+			del(item) {
+				uni.showModal({
+					content: "确认删除吗?",
+					success: (res) => {
+						if (res.confirm) {
+							this.$u.post('/UserSafetyProblem/delete', {
+								content: {
+									id: item.id
+								}
+							}).then(res => {
+								if (res.code == 0) {
+									this.$u.toast("删除成功")
+									setTimeout(() => {
+										this.page = 1
+										this.getlist()
+									}, 800)
+								} else {
+									this.$u.toast(res.msg)
+									this.$tologin(res.msg)
+								}
+							})
+						}
+					}
+				})
+			},
+			getlist(str) {
+				this.$u.post('/UserSafetyProblem/list', {
+					content: {
+						limit: 10,
+						list_type: 'page',
+						page: this.page
+					}
+				}).then(res => {
+					if (res.code == 0) {
+						if (str == 1) {
+							this.$u.toast("刷新成功")
+						}
+						uni.stopPullDownRefresh()
+						this.count = res.response.count
+						if (this.page == 1) {
+							this.list = res.response.data
+							if (this.list.length == 0 && this.first == 1) {
+								this.toadd()
+							}
+							this.first = 2
+						} else {
+							this.list = this.list.concat(res.response.data)
+						}
+					} else {
+						this.$tologin(res.msg)
+					}
+
+				})
+			},
+			toadd() {
+				uni.navigateTo({
+					url: "./wenda-add"
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.wenda-list {
+		padding: 0 33rpx;
+
+		.down-botton {
+			position: fixed;
+			bottom: 20rpx;
+			left: 24rpx;
+			width: 702rpx;
+			height: 80rpx;
+			line-height: 80rpx;
+			border-radius: 10rpx;
+			color: #fff;
+			background-color: #08AA8C;
+			text-align: center;
+		}
+
+		.item {
+			margin-bottom: 20rpx;
+			border-radius: 20rpx;
+			background-color: #fff;
+			padding: 0 24rpx;
+
+			.text2 {
+				font-size: 33rpx;
+				font-family: SimHei;
+				font-weight: 400;
+				color: #08AA8C;
+				padding: 0 0 20rpx 0;
+			}
+
+			.top {
+				margin-bottom: 20rpx;
+				font-size: 33rpx;
+				font-family: SimHei;
+				font-weight: 400;
+				padding: 20rpx 0;
+				border-bottom: 2rpx solid rgba(0, 0, 0, 0.2);
+			}
+		}
+
+		.header {
+			padding: 28rpx 0;
+
+			.text {
+				margin-left: 6rpx;
+				font-size: 33rpx;
+				font-family: SimHei;
+				font-weight: 400;
+				color: #08AA8C;
+			}
+		}
+	}
 </style>

+ 115 - 100
pages/mine/xiaoxi.vue

@@ -5,17 +5,17 @@
 			<text>一键已读</text>
 		</view>
 		<view class="item" v-for="(item,index) in list" :key="index" @click="toinfo(item)">
-			<view class="top u-flex u-col-center u-row-between">
+			<view class="top u-flex u-col-center u-row-between">
 				<text>{{item.create_time}}</text>
-				<text v-if="item.is_read == 1" style="color: #FDCE1C;">已读信息</text>
-				<text v-if="item.is_read == 0" style="color: #08AA8C;">未读信息</text>
-			</view>
-			<view class="item-content u-flex-col">
-				<text>{{item.title}}</text>
-				<text>{{item.content}}</text>
-			</view>
-			<view class="down-text">
-				<text>{{item.msg_text}}</text>
+				<text v-if="item.is_read == 1" style="color: #FDCE1C;">已读信息</text>
+				<text v-if="item.is_read == 0" style="color: #08AA8C;">未读信息</text>
+			</view>
+			<view class="item-content u-flex-col">
+				<text>{{item.title}}</text>
+				<text>{{item.content}}</text>
+			</view>
+			<view class="down-text">
+				<text>{{item.msg_text}}</text>
 			</view>
 		</view>
 	</view>
@@ -25,86 +25,97 @@
 	export default {
 		data() {
 			return {
-				page:1,
-				list:[],
-				count:0
+				page: 1,
+				list: [],
+				count: 0
 			}
 		},
 		onLoad() {
 			this.getlist()
-		},
-		onReachBottom() {
-			if(this.count != this.list.length){
-				this.page++
-				this.getlist()
-			}
 		},
-		methods: {
-			yuedu(){
-				this.$u.post('/UserMessage/setMessageAllReadTrue').then(res => {
-					if(res.code == 0){
-						this.$u.toast("设置成功")
-						setTimeout(() => {
-							this.page = 1
-							this.getlist()
-						},800)
-					}else{
-						this.$u.toast(res.msg)
-					}
-				})
-			},
-			toinfo(item){
-				// 跳转类型:0富文本 1链接 2用户订单 3加盟商订单 4服务商资质审核信息
-				if(item.is_read == 0){
-					this.$u.post('/UserMessage/get',{
-						content:{
-							id:item.id
-						}
-					}).then(res => {
-						item.is_read = 1
-					})
-				}
-				
-				if(item.jump_type == 0){
-					uni.navigateTo({
-						url:"./xiaoxi-info?id=" + item.id
-					})
-				}
-				if(item.jump_type == 1){
-					
-				}
-				if(item.jump_type == 2){
-					uni.navigateTo({
-						url:"../order/order-info?id=" + item.source_code
-					})
-				}
-				if(item.jump_type == 3){
-					uni.navigateTo({
-						url:"../order/fuwu-orderinfo?id=" + item.source_code
-					})
-				}
-				if(item.jump_type == 4){
-					uni.navigateTo({
-						url:"/pages/mine/kaitong-fuwu?id=" + item.source_code
-					})
-				}
-				
+		onPullDownRefresh() {
+			this.page = 1
+			this.getlist()
+		},
+		onReachBottom() {
+			if (this.count != this.list.length) {
+				this.page++
+				this.getlist()
+			}
+		},
+		methods: {
+			yuedu() {
+				this.$u.post('/UserMessage/setMessageAllReadTrue').then(res => {
+					if (res.code == 0) {
+						this.$u.toast("设置成功")
+						setTimeout(() => {
+							this.page = 1
+							this.getlist()
+						}, 800)
+					} else {
+						this.$u.toast(res.msg)
+					}
+				})
 			},
-			getlist(){
-				this.$u.post('/UserMessage/list',{
-					content:{
-						limit:10,
-						list_type:'page',
-						page:this.page
-					}
-				}).then(res => {
-					this.count = res.response.count
-					if(this.page == 1){
-						this.list = res.response.data
-					}else{
-						this.list = this.list.concat(res.response.data)
-					}
-				})
+			toinfo(item) {
+				// 跳转类型:0富文本 1链接 2用户订单 3加盟商订单 4服务商资质审核信息
+				if (item.is_read == 0) {
+					this.$u.post('/UserMessage/get', {
+						content: {
+							id: item.id
+						}
+					}).then(res => {
+						item.is_read = 1
+					})
+				}
+
+				if (item.jump_type == 0) {
+					uni.navigateTo({
+						url: "./xiaoxi-info?id=" + item.id
+					})
+				}
+				if (item.jump_type == 1) {
+
+				}
+				if (item.jump_type == 2) {
+					uni.navigateTo({
+						url: "../order/order-info?id=" + item.source_code
+					})
+				}
+				if (item.jump_type == 3) {
+					uni.navigateTo({
+						url: "../order/fuwu-orderinfo?id=" + item.source_code
+					})
+				}
+				if (item.jump_type == 4) {
+					uni.navigateTo({
+						url: "/pages/mine/kaitong-fuwu?id=" + item.source_code
+					})
+				}
+
+			},
+			getlist() {
+				this.$u.post('/UserMessage/list', {
+					content: {
+						limit: 10,
+						list_type: 'page',
+						page: this.page
+					}
+				}).then(res => {
+					uni.stopPullDownRefresh()
+					if (res.code == 0) {
+						this.count = res.response.count
+						if (this.page == 1) {
+							this.list = res.response.data
+						} else {
+							this.list = this.list.concat(res.response.data)
+						}
+					} else {
+						this.$u.toast(res.msg)
+						this.$tologin(res.msg)
+					}
+
+				})
 			}
 		}
 	}
@@ -119,28 +130,32 @@
 			background-color: #fff;
 			padding: 0 30rpx;
 			margin-bottom: 20rpx;
+
 			.top {
 				border-bottom: 2rpx solid rgba(0, 0, 0, 0.3);
 				padding: 12rpx 0;
 				font-size: 25rpx;
 				font-family: SimHei;
 				font-weight: 400;
-			}
-			.item-content{
-				text:first-child{
-					font-size: 26rpx;
-				}
-				text:last-child{
-					font-size: 24rpx;
-				}
-			}
-			.down-text{
-				text-align: right;
-				font-size: 33rpx;
-				font-family: SimHei;
-				font-weight: 400;
-				color: #08AA8C;
-				padding:10rpx 0 20rpx 0;
+			}
+
+			.item-content {
+				text:first-child {
+					font-size: 26rpx;
+				}
+
+				text:last-child {
+					font-size: 24rpx;
+				}
+			}
+
+			.down-text {
+				text-align: right;
+				font-size: 33rpx;
+				font-family: SimHei;
+				font-weight: 400;
+				color: #08AA8C;
+				padding: 10rpx 0 20rpx 0;
 			}
 		}
 

+ 104 - 88
pages/mine/yaoqing-user.vue

@@ -1,89 +1,105 @@
-<template>
-	<view class="yaoqing-user">
-		<view class="item" v-for="(item,index) in list" :key="index">
-			<view class="top u-flex u-col-center">
-				<image v-if="item.headimgurl_image_src" :src="item.headimgurl_image_src" mode=""></image>
-				<image v-else src="../../static/images/head-img.jpg" mode=""></image>
-				<view class="right u-flex-col">
-					<text>昵称:{{item.nickname}}</text>
-					<text>邀请码:{{item.referral_code}}</text>
-				</view>
-			</view>
-			<view class="time">
-				{{item.create_time}}
-			</view>
-		</view>
-		<x-notdata v-if="list.length == 0" title='稍后请刷新再试' tips="暂时没有您邀请的用户" @shuaxin="getlist(1)"></x-notdata>
-		<!-- <view class="notdata u-flex-col u-col-center u-row-center" v-if="list.length == 0">
-			<image class="image" src="../../static/images/yaoqing1-1.png" mode=""></image>
-			<text class="text1">暂时没有您邀请的用户</text>
-			<text class="text1" style="margin-bottom: 55rpx;">稍后请刷新再试</text>
-			<x-button @click="getlist(1)">点击刷新</x-button>
-		</view> -->
-	</view>
-</template>
-
-<script>
-	export default {
-		data(){
-			return{
-				list:[]
-			}
-		},
-		onLoad() {
-			this.getlist()
-		},
-		methods:{
-			getlist(a){
-				this.$u.post('/User/getMyTeam').then(res => {
-					if(res.code == 0){
-						this.list = res.response.data
-					}
-					if(a == 1){
-						this.$u.toast("刷新成功")
-					}
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.yaoqing-user{
-		.item{
-			padding:30rpx 20rpx;
-			background-color: #fff;
-			margin: 20rpx;
-			.time{
-				text-align: right;
-				font-size: 30rpx;
-			}
-			.top{
-				image{
-					width: 110rpx;
-					height: 110rpx;
-					border-radius: 100rpx;
-					margin-right: 20rpx;
-				}
-				.right{
-					flex: 1;
-					
-				}
-			}
-		}
-		.notdata{
-			height: 70vh;
-			.image{
-				width: 146rpx;
-				height: 146rpx;
-				margin-bottom: 70rpx;
-			}
-			.text1{
-				font-size: 33rpx;
-				font-family: SimHei;
-				font-weight: 400;
-				color: #AAAAAA;
-			}
-		}
-	}
+<template>
+	<view class="yaoqing-user">
+		<view class="item" v-for="(item,index) in list" :key="index">
+			<view class="top u-flex u-col-center">
+				<image v-if="item.headimgurl_image_src" :src="item.headimgurl_image_src" mode=""></image>
+				<image v-else src="../../static/images/head-img.jpg" mode=""></image>
+				<view class="right u-flex-col">
+					<text>昵称:{{item.nickname}}</text>
+					<text>邀请码:{{item.referral_code}}</text>
+				</view>
+			</view>
+			<view class="time">
+				{{item.create_time}}
+			</view>
+		</view>
+		<x-notdata v-if="list.length == 0" title='稍后请刷新再试' tips="暂时没有您邀请的用户" @shuaxin="getlist(1)"></x-notdata>
+		<!-- <view class="notdata u-flex-col u-col-center u-row-center" v-if="list.length == 0">
+			<image class="image" src="../../static/images/yaoqing1-1.png" mode=""></image>
+			<text class="text1">暂时没有您邀请的用户</text>
+			<text class="text1" style="margin-bottom: 55rpx;">稍后请刷新再试</text>
+			<x-button @click="getlist(1)">点击刷新</x-button>
+		</view> -->
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				list: []
+			}
+		},
+		onLoad() {
+			this.getlist()
+		},
+		onPullDownRefresh() {
+			this.getlist()
+		},
+		methods: {
+			getlist(a) {
+				this.$u.post('/User/getMyTeam').then(res => {
+					if (res.code == 0) {
+						uni.stopPullDownRefresh()
+						if (res.code == 0) {
+							this.list = res.response.data
+						}
+						if (a == 1) {
+							this.$u.toast("刷新成功")
+						}
+					} else {
+						this.$u.toast(res.msg)
+						this.$tologin(res.msg)
+					}
+
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.yaoqing-user {
+		.item {
+			padding: 30rpx 20rpx;
+			background-color: #fff;
+			margin: 20rpx;
+
+			.time {
+				text-align: right;
+				font-size: 30rpx;
+			}
+
+			.top {
+				image {
+					width: 110rpx;
+					height: 110rpx;
+					border-radius: 100rpx;
+					margin-right: 20rpx;
+				}
+
+				.right {
+					flex: 1;
+
+				}
+			}
+		}
+
+		.notdata {
+			height: 70vh;
+
+			.image {
+				width: 146rpx;
+				height: 146rpx;
+				margin-bottom: 70rpx;
+			}
+
+			.text1 {
+				font-size: 33rpx;
+				font-family: SimHei;
+				font-weight: 400;
+				color: #AAAAAA;
+			}
+		}
+	}
 </style>

+ 1 - 4
pages/mine/yaoqing.vue

@@ -74,10 +74,7 @@
 						this.userdata = res.response.detail
 					} else {
 						this.$u.toast(res.msg)
-						uni.removeStorageSync("token")
-						setTimeout(() => {
-							uni.navigateBack()
-						}, 800)
+						this.$tologin(res.msg)
 					}
 				})
 			},

+ 183 - 173
pages/order/fuwu-orderinfo.vue

@@ -71,11 +71,11 @@
 				<text>起</text>
 				<text>{{orderdata.detail.start_location_address}}</text>
 			</view>
-			<view class="tel-box u-flex u-col-center">
-				<text class="text1">联系电话:</text>
-				<u-icon name="phone-fill" color="#29B08A"></u-icon>
-				<text class="text2" @click.stop="$tophone(orderdata.detail.start_phone,'接单后才能拨打用户电话')" v-if="orderdata.order_status == 0">{{orderdata.detail.start_phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')}}</text>
-				<text class="text2" @click.stop="$tophone(orderdata.detail.start_phone)" v-else>{{orderdata.detail.start_phone}}</text>
+			<view class="tel-box u-flex u-col-center">
+				<text class="text1">联系电话:</text>
+				<u-icon name="phone-fill" color="#29B08A"></u-icon>
+				<text class="text2" @click.stop="$tophone(orderdata.detail.start_phone,'接单后才能拨打用户电话')" v-if="orderdata.order_status == 0">{{orderdata.detail.start_phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')}}</text>
+				<text class="text2" @click.stop="$tophone(orderdata.detail.start_phone)" v-else>{{orderdata.detail.start_phone}}</text>
 			</view>
 			<view class="dj-text">
 				(出发位置)
@@ -100,35 +100,35 @@
 				<view class="order-goods-box u-flex u-col-center">
 					<image src="../../static/images/t2.png" class="goods-img" mode=""></image>
 					<view class="goods-right">
-						<view class="goods-name" v-if="orderdata.run.type == 0">跑腿类型:帮我送</view>
-						<view class="goods-name" v-if="orderdata.run.type == 1">跑腿类型:帮我取</view>
-						<view class="goods-name" v-if="orderdata.run.type == 2">跑腿类型:帮我买</view>
-						<view class="goods-jieshao" v-if="orderdata.run.type == 2">
-							物品信息:{{orderdata.run.remark}} 预计商品费用:{{orderdata.run.fee}}元
-						</view>
-						<view class="goods-jieshao" v-else>
-							物品信息:{{orderdata.run.remark}} {{orderdata.run.weight}}公斤
-						</view>
-						<view class="goods-price">
-							<text v-if="orderdata.run.type == 2">预约送达时间:{{orderdata.run.come_time}}</text>
-							<text v-else>预约取件时间:{{orderdata.run.come_time}}</text>
+						<view class="goods-name" v-if="orderdata.run.type == 0">跑腿类型:帮我送</view>
+						<view class="goods-name" v-if="orderdata.run.type == 1">跑腿类型:帮我取</view>
+						<view class="goods-name" v-if="orderdata.run.type == 2">跑腿类型:帮我买</view>
+						<view class="goods-jieshao" v-if="orderdata.run.type == 2">
+							物品信息:{{orderdata.run.remark}} 预计商品费用:{{orderdata.run.fee}}元
+						</view>
+						<view class="goods-jieshao" v-else>
+							物品信息:{{orderdata.run.remark}} {{orderdata.run.weight}}公斤
+						</view>
+						<view class="goods-price">
+							<text v-if="orderdata.run.type == 2">预约送达时间:{{orderdata.run.come_time}}</text>
+							<text v-else>预约取件时间:{{orderdata.run.come_time}}</text>
 						</view>
 					</view>
 				</view>
-				<view class="taocan-box">
-					物品图{{orderdata.run.image_gather_code ? '' :'(无)'}}
-				</view>
-				<view class="u-flex u-col-center u-flex-wrap" style="margin-bottom: 20rpx;" v-if="orderdata.run.image_gather">
-					<image @click="openimage(index)" v-for="(item,index) in orderdata.run.image_gather" :key="index" :src="item.src" style="width: 150rpx;height: 150rpx;margin-right: 20rpx;" mode=""></image>
+				<view class="taocan-box">
+					物品图{{orderdata.run.image_gather_code ? '' :'(无)'}}
+				</view>
+				<view class="u-flex u-col-center u-flex-wrap" style="margin-bottom: 20rpx;" v-if="orderdata.run.image_gather">
+					<image @click="openimage(index)" v-for="(item,index) in orderdata.run.image_gather" :key="index" :src="item.src" style="width: 150rpx;height: 150rpx;margin-right: 20rpx;" mode=""></image>
 				</view>
 			</view>
 			<view class="qidian u-flex u-col-center">
 				<text>起</text>
-				<text v-if="orderdata.run.start_location_address">{{orderdata.run.start_location_address}}{{orderdata.run.start_address}}</text>
+				<text v-if="orderdata.run.start_location_address">{{orderdata.run.start_location_address}}{{orderdata.run.start_address}}</text>
 				<text v-else>骑手就近购买</text>
 			</view>
 			<view class="tel-box u-flex u-col-center">
-				<text class="text1">{{orderdata.run.start_name}}</text>
+				<text class="text1">{{orderdata.run.start_name}}</text>
 				<text class="text2">{{orderdata.run.start_phone}}</text>
 			</view>
 			<view class="dj-text">
@@ -139,16 +139,16 @@
 				<text>{{orderdata.run.end_location_address}}{{orderdata.run.end_address}}</text>
 			</view>
 			<view class="tel-box u-flex u-col-center">
-				<text class="text1">{{orderdata.run.end_name}}</text>
+				<text class="text1">{{orderdata.run.end_name}}</text>
 				<text class="text2">{{orderdata.run.end_phone}}</text>
 			</view>
 			<view class="dj-text">
 				(送件地址)
 			</view>
 			<view class="price-box u-flex-col u-col-top">
-				<text>需付金额:{{orderdata.run.payment_price_desc}}</text>
-				<text>
-					价格说明:{{orderdata.run.price_desc}}
+				<text>需付金额:{{orderdata.run.payment_price_desc}}</text>
+				<text>
+					价格说明:{{orderdata.run.price_desc}}
 				</text>
 			</view>
 		</view>
@@ -156,8 +156,8 @@
 			<view class="jiedan-top u-flex u-col-center u-row-between">
 				<text>接单人信息</text>
 				<text v-if="orderdata.order_facilitator.status == 0">待确认</text>
-				<text v-if="orderdata.order_facilitator.status == 1">{{orderdata.source_type == 1 ? '已接单' : '未出发'}}</text>
-				<text v-if="orderdata.order_facilitator.status == 2">{{orderdata.source_type == 1 ? '等待客户' : '已出发'}}</text>
+				<text v-if="orderdata.order_facilitator.status == 1">{{orderdata.source_type == 1 ? '已接单' : '未出发'}}</text>
+				<text v-if="orderdata.order_facilitator.status == 2">{{orderdata.source_type == 1 ? '等待客户' : '已出发'}}</text>
 				<text v-if="orderdata.order_facilitator.status == 3">{{orderdata.source_type == 1 ? '已出发' : '已到达'}}</text>
 				<text v-if="orderdata.order_facilitator.status == 4">已完成</text>
 				<text v-if="orderdata.order_facilitator.status == -1">用户取消</text>
@@ -187,7 +187,7 @@
 			<text v-if="orderdata.detail.payment_time">付款时间:{{orderdata.detail.payment_time}}</text>
 			<text v-if="orderdata.detail.write_off_time">核销时间:{{orderdata.detail.write_off_time}}</text>
 			<text v-if="orderdata.order_facilitator">接单时间:{{orderdata.order_facilitator.create_time}}</text>
-			<text v-if="orderdata.ing_time">发货时间:{{orderdata.ing_time}}</text>
+			<text v-if="orderdata.ing_time">到达时间:{{orderdata.ing_time}}</text>
 			<text v-if="orderdata.complete_time">完成时间:{{orderdata.complete_time}}</text>
 		</view>
 		<view style="height: 120rpx;"></view>
@@ -198,65 +198,66 @@
 			<x-button v-if="orderdata.order_facilitator.status == 1" style="margin-right: 20rpx;" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="chufa">确认出发</x-button>
 			<x-button v-if="orderdata.order_facilitator.status == 2" style="margin-right: 20rpx;" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="daoda">确认到达</x-button>
 			<x-button style="margin-right: 20rpx;" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao">取消接单</x-button>
-		</view>
-		<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 1 && type == 1">
-			<x-button v-if="orderdata.order_facilitator.status == 1" style="margin-right: 20rpx;" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="chufa">等待客户</x-button>
-			<x-button v-if="orderdata.order_facilitator.status == 2" style="margin-right: 20rpx;" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="daoda">确认完成</x-button>
-			<x-button style="margin-right: 20rpx;" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao">取消接单</x-button>
-		</view>
-		<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 1 && type == 2">
-			<x-button v-if="orderdata.order_facilitator.status == 1" style="margin-right: 20rpx;" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="chufa">确认出发</x-button>
-			<x-button v-if="orderdata.order_facilitator.status == 2" style="margin-right: 20rpx;" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="daoda">确认到达</x-button>
-			<x-button style="margin-right: 20rpx;" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao">取消接单</x-button>
-		</view>
-		<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 2">
-			<x-button style="margin-right: 20rpx;" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao">取消接单</x-button>
-			<x-button style="margin-right: 20rpx;" v-if="type == 0" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="wancheng">确认完成</x-button>
-			<x-button style="margin-right: 20rpx;" v-if="type == 1" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="wancheng1(orderdata,1)">确认完成</x-button>
-			<x-button style="margin-right: 20rpx;" v-if="type ==2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="wancheng">确认完成</x-button>
-		</view>
-		<u-popup v-model="showover" mode="bottom">
-			<view class="u-flex-col u-col-center" style="padding: 0 24rpx;">
-				<view style="padding: 20rpx 0;text-align: center;">
-					确认完成订单
-				</view>
-				<view style="width: 702rpx;text-align: right;color: #2AA47F;display: flex;align-items: center;justify-content:flex-end;">
-					当前位置:{{overaddress}}<u-icon name="reload" color="#9A9A9A" size="40" @click="getaddress"></u-icon>
-				</view>
-				<view style="padding: 10rpx 0;width: 702rpx;color: #9A9A9A;">
-					{{daijiaitem.order_no}}
-				</view>
-				<view class="u-flex u-col-center" style="width: 702rpx;">
-					<text style="width: 30rpx; line-height:30rpx;border-radius: 100rpx;font-size: 20rpx;color: #fff;background-color: #00A1EF;text-align: center;">起</text>
-					<text style="font-size: 26rpx;margin-left: 10rpx;flex: 1;color: #9A9A9A;">{{daijiaitem.detail.start_location_address}}</text>
-				</view>
-				<view style="width: 702rpx;padding: 0 20rpx;font-size: 20rpx;margin-bottom: 14rpx;color: #9A9A9A;">
-					(出发位置)
-				</view>
-				<view class="u-flex u-col-center" style="width: 702rpx;">
-					<text style="width: 30rpx; line-height:30rpx;border-radius: 100rpx;font-size: 20rpx;color: #fff;background-color: #f00;text-align: center;">终</text>
-					<text style="font-size: 26rpx;margin-left: 10rpx;flex: 1;color: #9A9A9A;">{{daijiaitem.detail.end_lng ? end_location_address : '上车后告知司机位置'}}</text>
-				</view>
-				<view style="width: 702rpx;padding: 0 20rpx;font-size: 20rpx;margin-bottom: 14rpx;color: #9A9A9A;">
-					(终点位置)
-				</view>
-				<view style="width:702rpx;color: #C6553C;font-size: 30rpx;text-align: right;">
-					需付金额:{{daijiaover.payment_price}}
-				</view>
-				<!-- <view style="width: 702rpx;font-size: 22rpx;text-align: right;">
-					起步价:¥{{daijiaover.start_price}}元 公里数:{{daijiaover.points}}km
-				</view>
-				<view style="width: 702rpx;font-size: 22rpx;text-align: right;">
-					总价:¥{{daijiaover.total_price}}元 优惠:¥{{daijiaover.discount_price}}
-				</view> -->
-				<view style="width: 702rpx;font-size: 22rpx;text-align: right;color: #9A9A9A;">
-					价格说明:{{daijiaover.price_desc}}
-				</view>
-				<!-- <view style="width: 702rpx;font-size: 20rpx;text-align: right;color: rgba(0,0,0,0.3);margin-bottom: 20rpx;">
-					计价说明:{{daijiaover.price_formula_desc}}
-				</view> -->
-				<x-button :height='80' style="margin:10rpx 0 30rpx 0;" @click="wancheng1(daijiaitem,0)">确认完成</x-button>
-			</view>
+		</view>
+		<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 1 && type == 1">
+			<x-button v-if="orderdata.order_facilitator.status == 1" style="margin-right: 20rpx;" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="chufa">等待客户</x-button>
+			<x-button v-if="orderdata.order_facilitator.status == 2" style="margin-right: 20rpx;" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="daoda">确认完成</x-button>
+			<x-button style="margin-right: 20rpx;" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao">取消接单</x-button>
+		</view>
+		<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 1 && type == 2">
+			<x-button v-if="orderdata.order_facilitator.status == 1" style="margin-right: 20rpx;" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="chufa">确认出发</x-button>
+			<x-button v-if="orderdata.order_facilitator.status == 2" style="margin-right: 20rpx;" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="daoda">确认到达</x-button>
+			<x-button style="margin-right: 20rpx;" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao">取消接单</x-button>
+		</view>
+		<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 2">
+			<x-button style="margin-right: 20rpx;" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao">取消接单</x-button>
+			<x-button style="margin-right: 20rpx;" v-if="type == 0" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="wancheng">确认完成</x-button>
+			<x-button style="margin-right: 20rpx;" v-if="type == 1" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="wancheng1(orderdata,1)">确认完成</x-button>
+			<x-button style="margin-right: 20rpx;" v-if="type ==2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="wancheng">确认完成</x-button>
+		</view>
+		<u-popup v-model="showover" mode="bottom">
+			<view class="u-flex-col u-col-center" style="padding: 0 24rpx;">
+				<view style="padding: 20rpx 0;text-align: center;">
+					确认完成订单
+				</view>
+				<view style="width: 702rpx;text-align: right;color: #2AA47F;display: flex;align-items: center;justify-content:flex-end;">
+					当前位置:{{overaddress}}
+					<u-icon name="reload" color="#9A9A9A" size="40" @click="getaddress"></u-icon>
+				</view>
+				<view style="padding: 10rpx 0;width: 702rpx;color: #9A9A9A;">
+					{{daijiaitem.order_no}}
+				</view>
+				<view class="u-flex u-col-center" style="width: 702rpx;">
+					<text style="width: 30rpx; line-height:30rpx;border-radius: 100rpx;font-size: 20rpx;color: #fff;background-color: #00A1EF;text-align: center;">起</text>
+					<text style="font-size: 26rpx;margin-left: 10rpx;flex: 1;color: #9A9A9A;">{{daijiaitem.detail.start_location_address}}</text>
+				</view>
+				<view style="width: 702rpx;padding: 0 20rpx;font-size: 20rpx;margin-bottom: 14rpx;color: #9A9A9A;">
+					(出发位置)
+				</view>
+				<view class="u-flex u-col-center" style="width: 702rpx;">
+					<text style="width: 30rpx; line-height:30rpx;border-radius: 100rpx;font-size: 20rpx;color: #fff;background-color: #f00;text-align: center;">终</text>
+					<text style="font-size: 26rpx;margin-left: 10rpx;flex: 1;color: #9A9A9A;">{{daijiaitem.detail.end_lng ? end_location_address : '上车后告知司机位置'}}</text>
+				</view>
+				<view style="width: 702rpx;padding: 0 20rpx;font-size: 20rpx;margin-bottom: 14rpx;color: #9A9A9A;">
+					(终点位置)
+				</view>
+				<view style="width:702rpx;color: #C6553C;font-size: 30rpx;text-align: right;">
+					需付金额:{{daijiaover.payment_price_desc}}
+				</view>
+				<!-- <view style="width: 702rpx;font-size: 22rpx;text-align: right;">
+					起步价:¥{{daijiaover.start_price}}元 公里数:{{daijiaover.points}}km
+				</view>
+				<view style="width: 702rpx;font-size: 22rpx;text-align: right;">
+					总价:¥{{daijiaover.total_price}}元 优惠:¥{{daijiaover.discount_price}}
+				</view> -->
+				<view style="width: 702rpx;font-size: 22rpx;text-align: right;color: #9A9A9A;">
+					价格说明:{{daijiaover.price_desc}}
+				</view>
+				<!-- <view style="width: 702rpx;font-size: 20rpx;text-align: right;color: rgba(0,0,0,0.3);margin-bottom: 20rpx;">
+					计价说明:{{daijiaover.price_formula_desc}}
+				</view> -->
+				<x-button :height='80' style="margin:10rpx 0 30rpx 0;" @click="wancheng1(daijiaitem,0)">确认完成</x-button>
+			</view>
 		</u-popup>
 	</view>
 </template>
@@ -269,74 +270,78 @@
 				id: '',
 				lat: '',
 				lng: '',
-				orderdata: {},
-				showover:false,
-				daijiaover:{},
-				overaddress:'',
-				daijiaitem:{}
+				orderdata: {},
+				showover: false,
+				daijiaover: {},
+				overaddress: '',
+				daijiaitem: {}
 			}
 		},
 		onLoad(option) {
 			this.id = option.id
 		},
 		onShow() {
-			this.getdata()
+			if (uni.getStorageSync("token")) {
+				this.getdata()
+			}
 		},
-		methods: {
-			openmap(){
-				uni.openLocation({
-					latitude:Number(this.orderdata.lat),
-					longitude:Number(this.orderdata.lng)
-				})
-			},
-			getaddress(){
-				this.wancheng1(this.daijiaitem,1)
-			},
-			wancheng1(item, type) {
-				this.daijiaitem = item
-				this.myAmapFun.getRegeo({
-					success: (res) => {
-						this.overaddress = res[0].name
-						console.log(res);
-						this.$u.post('/FacilitatorOrder/complete', {
-							content: {
-								is_check: type,
-								lat: res[0].latitude,
-								lng: res[0].longitude,
-								location_address: this.overaddress,
-								order_no: item.order_no,
-							}
-						}).then(res => {
-							if (res.code == 0) {
-								if(type == 1){
-									this.daijiaover = res.response
-									this.showover = true
-								}else{
-									this.showover = false
-									this.getorder()
-								}
-							} else {
+		methods: {
+			openmap() {
+				uni.openLocation({
+					latitude: Number(this.orderdata.lat),
+					longitude: Number(this.orderdata.lng)
+				})
+			},
+			getaddress() {
+				this.wancheng1(this.daijiaitem, 1)
+			},
+			wancheng1(item, type) {
+				this.daijiaitem = item
+				this.myAmapFun.getRegeo({
+					success: (res) => {
+						this.overaddress = res[0].name
+						console.log(res);
+						this.$u.post('/FacilitatorOrder/complete', {
+							content: {
+								is_check: type,
+								lat: res[0].latitude,
+								lng: res[0].longitude,
+								location_address: this.overaddress,
+								order_no: item.order_no,
+							}
+						}).then(res => {
+							if (res.code == 0) {
+								if (type == 1) {
+									this.daijiaover = res.response
+									this.showover = true
+								} else {
+									this.showover = false
+									this.getorder()
+								}
+							} else {
 								this.$u.toast(res.msg)
-							}
-						})
-					},
-					fail:(err) => {
-						console.log(err);
-					}
-				})
-			},
-			wancheng(){
-				this.$u.post('/FacilitatorOrder/complete', {
-					content: {
-						order_no: this.id
-					}
-				}).then(res => {
-					if (res.code == 0) {
-						this.getorder()
-					} else {
+								this.$tologin(res.msg)
+							}
+						})
+					},
+					fail: (err) => {
+						console.log(err);
+					}
+				})
+			},
+			wancheng() {
+				this.$u.post('/FacilitatorOrder/complete', {
+					content: {
+						order_no: this.id
+					}
+				}).then(res => {
+					if (res.code == 0) {
+						this.getorder()
+					} else {
 						this.$u.toast(res.msg)
-					}
-				})
+						this.$tologin(res.msg)
+					}
+				})
 			},
 			daoda() {
 				this.$u.post('/FacilitatorOrder/arrived', {
@@ -347,7 +352,8 @@
 					if (res.code == 0) {
 						this.getorder()
 					} else {
-						this.$u.toast(res.msg)
+						this.$u.toast(res.msg)
+						this.$tologin(res.msg)
 					}
 				})
 			},
@@ -360,7 +366,8 @@
 					if (res.code == 0) {
 						this.getorder()
 					} else {
-						this.$u.toast(res.msg)
+						this.$u.toast(res.msg)
+						this.$tologin(res.msg)
 					}
 				})
 			},
@@ -373,7 +380,8 @@
 					if (res.code == 0) {
 						this.getorder()
 					} else {
-						this.$u.toast(res.msg)
+						this.$u.toast(res.msg)
+						this.$tologin(res.msg)
 					}
 				})
 			},
@@ -383,28 +391,29 @@
 						order_no: this.id
 					}
 				}).then(res => {
-					if (res.code == 0) {
-						setTimeout(() => {
-							this.getorder()
-						},800)
-						if(this.type == 2){
-							this.$u.toast("接单成功")
-						}else{
-							uni.showModal({
-								content: "是否联系用户",
-								confirmText: "是",
-								cancelText: "否",
-								success: (on) => {
-									if (on.confirm) {
-										this.$tophone(this.orderdata.detail.phone)
-									}
-								}
-							})
+					if (res.code == 0) {
+						setTimeout(() => {
+							this.getorder()
+						}, 800)
+						if (this.type == 2) {
+							this.$u.toast("接单成功")
+						} else {
+							uni.showModal({
+								content: "是否联系用户",
+								confirmText: "是",
+								cancelText: "否",
+								success: (on) => {
+									if (on.confirm) {
+										this.$tophone(this.orderdata.detail.phone)
+									}
+								}
+							})
 						}
-						
-						
+
+
 					} else {
-						this.$u.toast(res.msg)
+						this.$u.toast(res.msg)
+						this.$tologin(res.msg)
 					}
 				})
 			},
@@ -425,7 +434,8 @@
 						lng: this.lng,
 						order_no: this.id
 					}
-				}).then(res => {
+				}).then(res => {
+					this.$tologin(res.msg)
 					this.type = res.response.source_type
 					this.orderdata = res.response
 					if (this.type == 0) {

+ 1 - 0
pages/order/jindu.vue

@@ -105,6 +105,7 @@
 					this.procedure = res.response.procedure
 					this.orderdata = res.response
 					this.type = res.response.source_type
+					this.$tologin(res.msg)
 					if (this.type == 0) {
 						uni.setNavigationBarTitle({
 							title: "维修服务订单"

+ 146 - 138
pages/order/order-info.vue

@@ -22,12 +22,12 @@
 			<text class="text2" v-if="orderdata.order_status == -1">已取消</text>
 			<text class="text2" v-if="orderdata.order_status == -2">已过期</text>
 		</view>
-		<view class="order-status u-flex u-col-center" v-if="orderdata.procedure.length > 0" @tap="tojindu()">
-			<u-icon name="car" size="32"></u-icon>
-			<view class="status-right u-flex-col">
-				<text>{{orderdata.procedure[0].desc}}</text>
-				<text>{{orderdata.procedure[0].create_time}}</text>
-			</view>
+		<view class="order-status u-flex u-col-center" v-if="orderdata.procedure.length > 0" @tap="tojindu()">
+			<u-icon name="car" size="32"></u-icon>
+			<view class="status-right u-flex-col">
+				<text>{{orderdata.procedure[0].desc}}</text>
+				<text>{{orderdata.procedure[0].create_time}}</text>
+			</view>
 		</view>
 		<view class="weixiu-box" v-if="type == 0">
 			<view class="weixiu-goods u-flex u-col-center">
@@ -74,12 +74,12 @@
 			</view>
 			<view class="qibu-price">
 				须付金额:{{orderdata.detail.payment_price_desc}}
-			</view>
-			<view class="price-tips">
-				<view>
-					价格说明:{{orderdata.detail.price_desc}}
-				</view>
-				<view style="color: #2AA47F;" v-if="orderdata.detail.actual_location_address">送达位置:{{orderdata.detail.actual_location_address}}</view>
+			</view>
+			<view class="price-tips">
+				<view>
+					价格说明:{{orderdata.detail.price_desc}}
+				</view>
+				<view style="color: #2AA47F;" v-if="orderdata.detail.actual_location_address">送达位置:{{orderdata.detail.actual_location_address}}</view>
 			</view>
 		</view>
 		<view class="paotui-box" v-if="type == 2">
@@ -87,31 +87,31 @@
 				<view class="order-goods-box u-flex u-col-center">
 					<image src="../../static/images/t2.png" class="goods-img" mode=""></image>
 					<view class="goods-right">
-						<view class="goods-name" v-if="orderdata.run.type == 0">跑腿类型:帮我送</view>
-						<view class="goods-name" v-if="orderdata.run.type == 1">跑腿类型:帮我取</view>
+						<view class="goods-name" v-if="orderdata.run.type == 0">跑腿类型:帮我送</view>
+						<view class="goods-name" v-if="orderdata.run.type == 1">跑腿类型:帮我取</view>
 						<view class="goods-name" v-if="orderdata.run.type == 2">跑腿类型:帮我买</view>
-						<view class="goods-jieshao" v-if="orderdata.run.type == 2">
-							物品信息:{{orderdata.run.remark}} 预计商品费用:{{orderdata.run.fee}}元
-						</view>
-						<view class="goods-jieshao" v-else>
-							物品信息:{{orderdata.run.remark}} {{orderdata.run.weight}}公斤
-						</view>
-						<view class="goods-price">
-							<text v-if="orderdata.run.type == 2">预约送达时间:{{orderdata.run.come_time}}</text>
-							<text v-else>预约取件时间:{{orderdata.run.come_time}}</text>
+						<view class="goods-jieshao" v-if="orderdata.run.type == 2">
+							物品信息:{{orderdata.run.remark}} 预计商品费用:{{orderdata.run.fee}}元
+						</view>
+						<view class="goods-jieshao" v-else>
+							物品信息:{{orderdata.run.remark}} {{orderdata.run.weight}}公斤
+						</view>
+						<view class="goods-price">
+							<text v-if="orderdata.run.type == 2">预约送达时间:{{orderdata.run.come_time}}</text>
+							<text v-else>预约取件时间:{{orderdata.run.come_time}}</text>
 						</view>
 					</view>
 				</view>
 				<view class="taocan-box">
 					物品图{{orderdata.run.image_gather_code ? '' :'(无)'}}
-				</view>
-				<view class="u-flex u-col-center u-flex-wrap" style="margin-bottom: 20rpx;" v-if="orderdata.run.image_gather">
-					<image @click="openimage(index)" v-for="(item,index) in orderdata.run.image_gather" :key="index" :src="item.src" style="width: 150rpx;height: 150rpx;margin-right: 20rpx;" mode=""></image>
+				</view>
+				<view class="u-flex u-col-center u-flex-wrap" style="margin-bottom: 20rpx;" v-if="orderdata.run.image_gather">
+					<image @click="openimage(index)" v-for="(item,index) in orderdata.run.image_gather" :key="index" :src="item.src" style="width: 150rpx;height: 150rpx;margin-right: 20rpx;" mode=""></image>
 				</view>
 			</view>
 			<view class="qidian u-flex u-col-center">
 				<text>起</text>
-				<text v-if="orderdata.run.start_location_address">{{orderdata.run.start_location_address}}{{orderdata.run.start_address}}</text>
+				<text v-if="orderdata.run.start_location_address">{{orderdata.run.start_location_address}}{{orderdata.run.start_address}}</text>
 				<text v-else>骑手就近购买</text>
 			</view>
 			<view class="tel-box u-flex u-col-center">
@@ -202,28 +202,28 @@
 		<view class="jiedan-box" v-if="orderdata.order_facilitator">
 			<view class="jiedan-top u-flex u-col-center u-row-between">
 				<text>接单人信息</text>
-				<text v-if="orderdata.order_facilitator.status == 0">待确认</text>
-				<text v-if="orderdata.order_facilitator.status == 1">{{orderdata.source_type == 1 ? '已接单' : '未出发'}}</text>
-				<text v-if="orderdata.order_facilitator.status == 2">{{orderdata.source_type == 1 ? '等待客户' : '已出发'}}</text>
-				<text v-if="orderdata.order_facilitator.status == 3">{{orderdata.source_type == 1 ? '已出发' : '已到达'}}</text>
-				<text v-if="orderdata.order_facilitator.status == 4">已完成</text>
-				<text v-if="orderdata.order_facilitator.status == -1">用户取消</text>
+				<text v-if="orderdata.order_facilitator.status == 0">待确认</text>
+				<text v-if="orderdata.order_facilitator.status == 1">{{orderdata.source_type == 1 ? '已接单' : '未出发'}}</text>
+				<text v-if="orderdata.order_facilitator.status == 2">{{orderdata.source_type == 1 ? '等待客户' : '已出发'}}</text>
+				<text v-if="orderdata.order_facilitator.status == 3">{{orderdata.source_type == 1 ? '已出发' : '已到达'}}</text>
+				<text v-if="orderdata.order_facilitator.status == 4">已完成</text>
+				<text v-if="orderdata.order_facilitator.status == -1">用户取消</text>
 				<text v-if="orderdata.order_facilitator.status == -2">服务商取消</text>
 			</view>
-			<view class="jiedan-user u-flex u-col-center">
-				<image :src="orderdata.order_facilitator.facilitator.headimgurl_image_src" @click="$openimg([orderdata.order_facilitator.facilitator.headimgurl_image_src])" mode=""></image>
-				<view class="user-right u-flex-col">
-					<text>姓名:{{orderdata.order_facilitator.facilitator.name}}</text>
-					<view class="u-flex u-col-center" @click="$tophone(orderdata.order_facilitator.facilitator.phone)">
-						<text>联系电话:</text>
-						<u-icon name="phone-fill" color="#0DA98C"></u-icon>
-						<text style="color: #0DA98C;">{{orderdata.order_facilitator.facilitator.phone}}</text>
-					</view>
-					<text>工号:{{orderdata.order_facilitator.facilitator.facilitator_uid}}</text>
-				</view>
-			</view>
-			<view class="jiedan-time">
-				接单时间:{{orderdata.order_facilitator.create_time}}
+			<view class="jiedan-user u-flex u-col-center">
+				<image :src="orderdata.order_facilitator.facilitator.headimgurl_image_src" @click="$openimg([orderdata.order_facilitator.facilitator.headimgurl_image_src])" mode=""></image>
+				<view class="user-right u-flex-col">
+					<text>姓名:{{orderdata.order_facilitator.facilitator.name}}</text>
+					<view class="u-flex u-col-center" @click="$tophone(orderdata.order_facilitator.facilitator.phone)">
+						<text>联系电话:</text>
+						<u-icon name="phone-fill" color="#0DA98C"></u-icon>
+						<text style="color: #0DA98C;">{{orderdata.order_facilitator.facilitator.phone}}</text>
+					</view>
+					<text>工号:{{orderdata.order_facilitator.facilitator.facilitator_uid}}</text>
+				</view>
+			</view>
+			<view class="jiedan-time">
+				接单时间:{{orderdata.order_facilitator.create_time}}
 			</view>
 		</view>
 		<view class="fapiao u-flex-col">
@@ -237,83 +237,83 @@
 			<text v-if="type == 3">购买商品</text>
 			<text v-if="orderdata.detail.create_time">下单时间:{{orderdata.detail.create_time}}</text>
 			<text v-if="orderdata.detail.payment_time">付款时间:{{orderdata.detail.payment_time}}</text>
-			<text v-if="orderdata.detail.write_off_time">核销时间:{{orderdata.detail.write_off_time}}</text>
+			<text v-if="orderdata.detail.write_off_time">核销时间:{{orderdata.detail.write_off_time}}</text>
 			<text v-if="orderdata.order_facilitator">接单时间:{{orderdata.order_facilitator.create_time}}</text>
-			<text v-if="orderdata.ing_time">发货时间:{{orderdata.ing_time}}</text>
+			<text v-if="orderdata.ing_time">{{type == 3 ? '发货时间' : '到达时间'}}:{{orderdata.ing_time}}</text>
 			<text v-if="orderdata.complete_time">完成时间:{{orderdata.complete_time}}</text>
 		</view>
-		<view style="height: 120rpx;"></view>
-		<view v-if="type == 0">
-			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 0">
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao()">取消订单</x-button>
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
-			</view>
-			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 1">
-				<x-button v-if="orderdata.order_facilitator.status == 1" class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao()">取消订单</x-button>
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
-			</view>
-			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 2">
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
-			</view>
-			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 3">
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="openpingjia()">评价订单</x-button>
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
-			</view>
-			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 4">
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
-			</view>
-			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == -1 || orderdata.order_status == -2">
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="shanchu()">删除订单</x-button>
-			</view>
-		</view>
-		<view v-if="type == 1">
-			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 0">
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao()">取消订单</x-button>
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
-			</view>
-			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 1">
-				<x-button v-if="orderdata.order_facilitator.status == 1" class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao()">取消订单</x-button>
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
-			</view>
-			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 2">
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
-			</view>
-			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 3">
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="openpingjia()">评价订单</x-button>
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
-			</view>
-			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 4">
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
-			</view>
-			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == -1 || orderdata.order_status == -2">
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="shanchu()">删除订单</x-button>
-			</view>
-		</view>
-		<view v-if="type == 2">
-			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 0">
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao()">取消订单</x-button>
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
-			</view>
-			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 1">
-				<x-button v-if="orderdata.order_facilitator.status == 1" class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao()">取消订单</x-button>
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
-			</view>
-			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 2">
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
-			</view>
-			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 3">
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="openpingjia()">评价订单</x-button>
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
-			</view>
-			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 4">
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
-			</view>
-			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == -1 || orderdata.order_status == -2">
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
-				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="shanchu()">删除订单</x-button>
-			</view>
+		<view style="height: 120rpx;"></view>
+		<view v-if="type == 0">
+			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 0">
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao()">取消订单</x-button>
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
+			</view>
+			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 1">
+				<x-button v-if="orderdata.order_facilitator.status == 1" class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao()">取消订单</x-button>
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
+			</view>
+			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 2">
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
+			</view>
+			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 3">
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="openpingjia()">评价订单</x-button>
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
+			</view>
+			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 4">
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
+			</view>
+			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == -1 || orderdata.order_status == -2">
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="shanchu()">删除订单</x-button>
+			</view>
+		</view>
+		<view v-if="type == 1">
+			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 0">
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao()">取消订单</x-button>
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
+			</view>
+			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 1">
+				<x-button v-if="orderdata.order_facilitator.status == 1" class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao()">取消订单</x-button>
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
+			</view>
+			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 2">
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
+			</view>
+			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 3">
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="openpingjia()">评价订单</x-button>
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
+			</view>
+			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 4">
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
+			</view>
+			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == -1 || orderdata.order_status == -2">
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="shanchu()">删除订单</x-button>
+			</view>
+		</view>
+		<view v-if="type == 2">
+			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 0">
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao()">取消订单</x-button>
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
+			</view>
+			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 1">
+				<x-button v-if="orderdata.order_facilitator.status == 1" class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao()">取消订单</x-button>
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
+			</view>
+			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 2">
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
+			</view>
+			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 3">
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="openpingjia()">评价订单</x-button>
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
+			</view>
+			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 4">
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
+			</view>
+			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == -1 || orderdata.order_status == -2">
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu()">服务进度</x-button>
+				<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="shanchu()">删除订单</x-button>
+			</view>
 		</view>
 		<view v-if="type == 3">
 			<view class="down-box u-flex u-col-center u-row-right" v-if="orderdata.order_status == 0 && orderdata.is_payment == 0">
@@ -366,7 +366,7 @@
 	export default {
 		data() {
 			return {
-				type: '',//0维修1代驾2跑腿3商品
+				type: '', //0维修1代驾2跑腿3商品
 				orderdata: {},
 				show: false,
 				hexiaourl: '',
@@ -378,18 +378,20 @@
 			this.id = option.id
 		},
 		onShow() {
-			this.getdata()
+			if (uni.getStorageSync("token")) {
+				this.getdata()
+			}
 		},
-		methods: {
-			openimage(index){
-				var arr  = []
-				this.orderdata.detail.image_gather.forEach(val => {
-					arr.push(val.src)
-				})
-				uni.previewImage({
-					urls:arr,
-					current:index
-				})
+		methods: {
+			openimage(index) {
+				var arr = []
+				this.orderdata.detail.image_gather.forEach(val => {
+					arr.push(val.src)
+				})
+				uni.previewImage({
+					urls: arr,
+					current: index
+				})
 			},
 			topingjia() {
 				this.$u.post('/Order/comment', {
@@ -404,6 +406,8 @@
 						setTimeout(() => {
 							this.getdata()
 						}, 800)
+					}else{
+						this.$tologin(res.msg)
 					}
 				})
 			},
@@ -439,7 +443,8 @@
 							}
 						})
 					} else {
-						this.$u.toast(res.msg)
+						this.$u.toast(res.msg)
+						this.$tologin(res.msg)
 					}
 				})
 			},
@@ -454,7 +459,8 @@
 						setTimeout(() => {
 							uni.navigateBack()
 						}, 800)
-					}
+					}
+					this.$tologin(res.msg)
 				})
 			},
 			quxiao() {
@@ -468,7 +474,8 @@
 						setTimeout(() => {
 							this.getdata()
 						}, 800)
-					}
+					}
+					this.$tologin(res.msg)
 				})
 			},
 			getdata() {
@@ -478,7 +485,8 @@
 					}
 				}).then(res => {
 					this.type = res.response.source_type
-					this.orderdata = res.response
+					this.orderdata = res.response
+					this.$tologin(res.msg)
 					if (this.type == 0) {
 						uni.setNavigationBarTitle({
 							title: "维修服务订单"
@@ -844,7 +852,7 @@
 				image {
 					width: 150rpx;
 					height: 150rpx;
-					margin-right: 10rpx;
+					margin-right: 10rpx;
 					border-radius: 100rpx;
 				}
 

+ 261 - 228
pages/order/order.vue

@@ -137,9 +137,9 @@
 								<view class="goods-name" v-if="item.run.type == 2">跑腿类型:帮我买</view>
 								<view class="goods-jieshao" v-if="item.run.type == 2">
 									物品信息:{{item.run.remark}} 预计商品费用:{{item.run.fee}}元
-								</view>
-								<view class="goods-jieshao" v-else>
-									物品信息:{{item.run.remark}} {{item.run.weight}}公斤
+								</view>
+								<view class="goods-jieshao" v-else>
+									物品信息:{{item.run.remark}} {{item.run.weight}}公斤
 								</view>
 								<view class="goods-price">
 									<text v-if="item.run.type == 2">预约送达时间:{{item.run.come_time}}</text>
@@ -258,124 +258,127 @@
 				<view class="weixiu-time u-flex-col" style="padding: 0 10rpx;" v-if="item.source_type == 0">
 					<text style="font-size: 30rpx;margin: 0;">维修服务</text>
 					<text style="font-size: 24rpx;">下单时间:{{item.create_time}}</text>
-					<text style="font-size: 24rpx;" v-if="item.ing_time">发货时间:{{item.ing_time}}</text>
+					<text style="font-size: 24rpx;" v-if="item.ing_time">到达时间:{{item.ing_time}}</text>
 				</view>
 				<view class="weixiu-time u-flex-col" style="padding: 0 10rpx;" v-if="item.source_type == 1">
 					<text style="font-size: 30rpx;margin: 0;">代驾服务</text>
 					<text style="font-size: 24rpx;">下单时间:{{item.create_time}}</text>
-				</view>
-				<view class="weixiu-time u-flex-col" style="padding: 0 10rpx;" v-if="item.source_type == 2">
-					<text style="font-size: 30rpx;margin: 0;">跑腿服务</text>
-					<text style="font-size: 24rpx;">下单时间:{{item.run.create_time}}</text>
-					<text style="font-size: 24rpx;" v-if="item.ing_time">发货时间:{{item.ing_time}}</text>
-				</view>
-				<view style="padding: 0 10rpx;" v-if="item.source_type == 3">
-					<view class="pay-title u-flex u-col-center">
-						<text class="text" style="font-size: 30rpx;color: #3BBAA2;">购买商品</text>
-					</view>
-					<view class="order-text" v-if="item.detail.create_time" style="font-size: 24rpx;">
-						下单时间:{{item.detail.create_time}}
-					</view>
-					<view class="order-text" v-if="item.detail.payment_time" style="font-size: 24rpx;">
-						付款时间:{{item.detail.payment_time}}
-					</view>
-					<view class="order-text" v-if="item.detail.write_off_time" style="font-size: 24rpx;">
-						核销时间:{{item.detail.write_off_time}}
-					</view>
+				</view>
+				<view class="weixiu-time u-flex-col" style="padding: 0 10rpx;" v-if="item.source_type == 2">
+					<text style="font-size: 30rpx;margin: 0;">跑腿服务</text>
+					<text style="font-size: 24rpx;">下单时间:{{item.run.create_time}}</text>
+					<text style="font-size: 24rpx;" v-if="item.ing_time">到达时间:{{item.ing_time}}</text>
+				</view>
+				<view style="padding: 0 10rpx;" v-if="item.source_type == 3">
+					<view class="pay-title u-flex u-col-center">
+						<text class="text" style="font-size: 30rpx;color: #3BBAA2;">购买商品</text>
+					</view>
+					<view class="order-text" v-if="item.detail.create_time" style="font-size: 24rpx;">
+						下单时间:{{item.detail.create_time}}
+					</view>
+					<view class="order-text" v-if="item.detail.payment_time" style="font-size: 24rpx;">
+						付款时间:{{item.detail.payment_time}}
+					</view>
+					<view class="order-text" v-if="item.ing_time" style="font-size: 24rpx;">
+						发货时间:{{item.ing_time}}
+					</view>
+					<view class="order-text" v-if="item.detail.write_off_time" style="font-size: 24rpx;">
+						核销时间:{{item.detail.write_off_time}}
+					</view>
 				</view>
 
 				<view class="butt-view" v-if="item.source_type == 0" @tap.stop>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == 0">
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao(item)">取消订单</x-button>
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao(item)">取消订单</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
 					</view>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == 1">
-						<x-button v-if="item.order_facilitator.status == 1" class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao(item)">取消订单</x-button>
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
+						<x-button v-if="item.order_facilitator.status == 1" class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao(item)">取消订单</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
 					</view>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == 2">
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
 					</view>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == 3">
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="openpingjia(item)">评价订单</x-button>
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="openpingjia(item)">评价订单</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
 					</view>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == 4">
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
 					</view>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == -1 || item.order_status == -2">
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="shanchu(item)">删除订单</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="shanchu(item)">删除订单</x-button>
 					</view>
 				</view>
 				<view class="butt-view" v-if="item.source_type == 1" @tap.stop>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == 0">
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao(item)">取消订单</x-button>
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao(item)">取消订单</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
 					</view>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == 1">
-						<x-button v-if="item.order_facilitator.status == 1" class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao(item)">取消订单</x-button>
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
+						<x-button v-if="item.order_facilitator.status == 1" class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao(item)">取消订单</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
 					</view>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == 2">
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
 					</view>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == 3">
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="openpingjia(item)">评价订单</x-button>
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="openpingjia(item)">评价订单</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
 					</view>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == 4">
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
 					</view>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == -1 || item.order_status == -2">
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="shanchu(item)">删除订单</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="shanchu(item)">删除订单</x-button>
 					</view>
 				</view>
 				<view class="butt-view" v-if="item.source_type == 2" @tap.stop>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == 0">
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao(item)">取消订单</x-button>
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao(item)">取消订单</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
 					</view>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == 1">
-						<x-button v-if="item.order_facilitator.status == 1" class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao(item)">取消订单</x-button>
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
+						<x-button v-if="item.order_facilitator.status == 1" class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao(item)">取消订单</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
 					</view>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == 2">
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
 					</view>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == 3">
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="openpingjia(item)">评价订单</x-button>
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="openpingjia(item)">评价订单</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
 					</view>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == 4">
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
 					</view>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == -1 || item.order_status == -2">
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="shanchu(item)">删除订单</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="shanchu(item)">删除订单</x-button>
 					</view>
 				</view>
 				<view class="butt-view" v-if="item.source_type == 3" @tap.stop>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == 0 && item.is_payment == 0">
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao(item)">取消订单</x-button>
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="topay(item)">去付款</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao(item)">取消订单</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="topay(item)">去付款</x-button>
 					</view>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == 0 && item.is_payment == 1">
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao(item)">取消订单</x-button>
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="hexiao(item)">核销码</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiao(item)">取消订单</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="hexiao(item)">核销码</x-button>
 					</view>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == -1">
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="shanchu(item)">删除订单</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="shanchu(item)">删除订单</x-button>
 					</view>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == 3">
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="openpingjia(item)">评价订单</x-button>
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="openpingjia(item)">评价订单</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
 					</view>
 					<view class="u-flex u-col-center u-row-right" v-if="item.order_status == 4">
-						<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
+						<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item)">服务进度</x-button>
 					</view>
 				</view>
 			</view>
@@ -478,15 +481,15 @@
 								<view class="goods-name" v-if="item.run.type == 0">跑腿类型:帮我送</view>
 								<view class="goods-name" v-if="item.run.type == 1">跑腿类型:帮我取</view>
 								<view class="goods-name" v-if="item.run.type == 2">跑腿类型:帮我买</view>
-								<view class="goods-jieshao" v-if="item.run.type == 2">
-									物品信息:{{item.run.remark}} 预计商品费用:{{item.run.fee}}元
-								</view>
-								<view class="goods-jieshao" v-else>
-									物品信息:{{item.run.remark}} {{item.run.weight}}公斤
-								</view>
-								<view class="goods-price">
-									<text v-if="item.run.type == 2">预约送达时间:{{item.run.come_time}}</text>
-									<text v-else>预约取件时间:{{item.run.come_time}}</text>
+								<view class="goods-jieshao" v-if="item.run.type == 2">
+									物品信息:{{item.run.remark}} 预计商品费用:{{item.run.fee}}元
+								</view>
+								<view class="goods-jieshao" v-else>
+									物品信息:{{item.run.remark}} {{item.run.weight}}公斤
+								</view>
+								<view class="goods-price">
+									<text v-if="item.run.type == 2">预约送达时间:{{item.run.come_time}}</text>
+									<text v-else>预约取件时间:{{item.run.come_time}}</text>
 								</view>
 							</view>
 						</view>
@@ -501,7 +504,7 @@
 					</view>
 					<view class="qidian u-flex u-col-center">
 						<text>起</text>
-						<text v-if="item.run.start_location_address">{{item.run.start_location_address}}{{item.run.start_address}}</text>
+						<text v-if="item.run.start_location_address">{{item.run.start_location_address}}{{item.run.start_address}}</text>
 						<text v-else>骑手就近购买</text>
 					</view>
 					<view class="tel-box u-flex u-col-center">
@@ -533,8 +536,8 @@
 					<view class="jiedan-top u-flex u-col-center u-row-between">
 						<text>接单人信息</text>
 						<text v-if="item.order_facilitator.status == 0">待确认</text>
-						<text v-if="item.order_facilitator.status == 1">{{item.source_type == 1 ? '已接单' : '未出发'}}</text>
-						<text v-if="item.order_facilitator.status == 2">{{item.source_type == 1 ? '等待客户' : '已出发'}}</text>
+						<text v-if="item.order_facilitator.status == 1">{{item.source_type == 1 ? '已接单' : '未出发'}}</text>
+						<text v-if="item.order_facilitator.status == 2">{{item.source_type == 1 ? '等待客户' : '已出发'}}</text>
 						<text v-if="item.order_facilitator.status == 3">{{item.source_type == 1 ? '已出发' : '已到达'}}</text>
 						<text v-if="item.order_facilitator.status == 4">已完成</text>
 						<text v-if="item.order_facilitator.status == -1">用户取消</text>
@@ -566,38 +569,38 @@
 						下单时间:{{item.create_time}}
 					</view>
 					<view class="down-time" v-if="item.ing_time">
-						发货时间:{{item.ing_time}}
+						到达时间:{{item.ing_time}}
 					</view>
 					<view class="butt-view" style="margin-top: 20rpx;">
 						<view class="u-flex u-col-center u-row-right" v-if="num == 5" @tap.stop>
-							<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="jiedan(item)">确认接单</x-button>
+							<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="jiedan(item)">确认接单</x-button>
 						</view>
 						<view class="u-flex u-col-center u-row-right" v-if="num == 6" @tap.stop>
-							<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiaojiedan(item)">取消接单</x-button>
+							<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="quxiaojiedan(item)">取消接单</x-button>
 							<view class="u-flex u-col-center u-row-right" v-if="item.source_type == 0">
-								<x-button v-if="item.order_facilitator.status == 1" class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="chufa(item)">确认出发</x-button>
-								<x-button v-if="item.order_facilitator.status == 2" class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="songda(item)">确认送达</x-button>
-								<x-button v-if="item.order_facilitator.status == 3" class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="wancheng(item)">确认完成</x-button>
+								<x-button v-if="item.order_facilitator.status == 1" class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="chufa(item)">确认出发</x-button>
+								<x-button v-if="item.order_facilitator.status == 2" class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="songda(item)">确认送达</x-button>
+								<x-button v-if="item.order_facilitator.status == 3" class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="wancheng(item)">确认完成</x-button>
 							</view>
 							<view class="u-flex u-col-center u-row-right" v-if="item.source_type == 1">
-								<x-button v-if="item.order_facilitator.status == 1" class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="chufa(item)">等待客户</x-button>
-								<x-button v-if="item.order_facilitator.status == 2" class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="songda(item)">确认出发</x-button>
-								<x-button v-if="item.order_facilitator.status == 3" class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="wancheng1(item,1)">确认完成</x-button>
-							</view>
-							<view class="u-flex u-col-center u-row-right" v-if="item.source_type == 2">
-								<x-button v-if="item.order_facilitator.status == 1" class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="chufa(item)">确认出发</x-button>
-								<x-button v-if="item.order_facilitator.status == 2" class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="songda(item)">确认送达</x-button>
-								<x-button v-if="item.order_facilitator.status == 3" class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="wancheng(item)">确认完成</x-button>
+								<x-button v-if="item.order_facilitator.status == 1" class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="chufa(item)">等待客户</x-button>
+								<x-button v-if="item.order_facilitator.status == 2" class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="songda(item)">确认出发</x-button>
+								<x-button v-if="item.order_facilitator.status == 3" class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="wancheng1(item,1)">确认完成</x-button>
+							</view>
+							<view class="u-flex u-col-center u-row-right" v-if="item.source_type == 2">
+								<x-button v-if="item.order_facilitator.status == 1" class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="chufa(item)">确认出发</x-button>
+								<x-button v-if="item.order_facilitator.status == 2" class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="songda(item)">确认送达</x-button>
+								<x-button v-if="item.order_facilitator.status == 3" class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="wancheng(item)">确认完成</x-button>
 							</view>
-							<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item,1)">服务进度</x-button>
+							<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item,1)">服务进度</x-button>
 						</view>
 						<view class="u-flex u-col-center u-row-right" v-if="num == 7" @tap.stop>
-							<x-button class="text2"  :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item,1)">服务进度</x-button>
+							<x-button class="text2" :width="160" :height="70" borderRadius="20rpx" fontSize="24rpx" @click="tojindu(item,1)">服务进度</x-button>
 						</view>
 					</view>
 				</view>
 			</view>
-		</view>
+		</view>
 		<x-notdata v-if="list.length == 0" tips="数据为空,请重试" @shuaxin="showfunction(1)"></x-notdata>
 		<u-popup v-model="show" mode="bottom">
 			<view class="hexiaoma u-flex-col u-col-center">
@@ -627,7 +630,8 @@
 					确认完成订单
 				</view>
 				<view style="width: 702rpx;text-align: right;color: #2AA47F;margin-right: 20rpx;display: flex;align-items: center;justify-content:flex-end;">
-					当前位置:{{overaddress}} <u-icon name="reload" color="#9A9A9A" size="40" @click="getaddress"></u-icon>
+					当前位置:{{overaddress}}
+					<u-icon name="reload" color="#9A9A9A" size="40" @click="getaddress"></u-icon>
 				</view>
 				<view style="padding: 10rpx 0;width: 702rpx;">
 					{{daijiaitem.order_no}}
@@ -647,7 +651,7 @@
 					(终点位置)
 				</view>
 				<view style="width:702rpx;color: #C6553C;font-size: 30rpx;text-align: right;">
-					需付金额:{{daijiaover.payment_price}}
+					需付金额:{{daijiaover.payment_price_desc}}
 				</view>
 				<!-- <view style="width: 702rpx;font-size: 22rpx;text-align: right;">
 					起步价:¥{{daijiaover.start_price}}元 公里数:{{daijiaover.points}}km
@@ -663,7 +667,7 @@
 				</view> -->
 				<x-button :height='80' style="margin:10rpx 0 30rpx 0;" @click="wancheng1(daijiaitem,0)">确认完成</x-button>
 			</view>
-		</u-popup>
+		</u-popup>
 		<x-tabbar ref="tabbar"></x-tabbar>
 	</view>
 </template>
@@ -691,92 +695,97 @@
 				daijiaitem: {},
 				daijiaover: {},
 				showover: false,
-				overaddress: '',
-				nottoken:false
+				overaddress: '',
+				nottoken: false
 			}
 		},
 		onLoad() {
 
-		},
-		onPullDownRefresh() {
-			this.showfunction()
+		},
+		onPullDownRefresh() {
+			this.showfunction()
 		},
 		onShow() {
 			this.showfunction()
-		},
-		onReachBottom() {
-			this.page++
-			this.getlist()
 		},
-		methods: {
-			showfunction(str){
-				if (uni.getStorageSync("token")) {
-					this.$u.post('/UserMessage/getMessageReadFalseCount').then(res => {
-						if (res.code == 0) {
-							this.$refs.nav.count = res.response.count
-						}
-					})
-					this.getordercount()
-					this.getuser()
-					if(uni.getStorageSync("ordertype")){
-						uni.showLoading({
-							mask:true,
-							title:"请稍后"
-						})
-						this.myAmapFun.getRegeo({
-							success: (res) => {
-								this.type = 2
-								this.num = uni.getStorageSync("ordertype")
-								this.lat = res[0].latitude
-								this.lng = res[0].longitude
-								this.page = 1
-								this.list = []
-								this.getlist(str)
-							},
-							fail: (err) => {
-								this.type = 2
-								this.num = uni.getStorageSync("ordertype")
-								this.lat = 39.865246
-								this.lng = 116.378517
-								this.page = 1
-								this.list = []
-								this.getlist(str)
-							}
-						})
-					}else{
-						this.getlist(str)
-					}
-				} else {
-					uni.stopPullDownRefresh()
-					this.$refs.nav.count = 0
-					this.nottoken = false
-					this.user = {}
-					this.facilitator = {}
-					this.list = []
-					this.type = 1
-					this.num = this.num < 5 ? this.num : 1
-					uni.removeTabBarBadge({
-						index:1,
+		onReachBottom() {
+			this.page++
+			this.getlist()
+		},
+		methods: {
+			showfunction(str) {
+				if (uni.getStorageSync("token")) {
+					this.$u.post('/UserMessage/getMessageReadFalseCount').then(res => {
+						if (res.code == 0) {
+							this.$refs.nav.count = res.response.count
+						}
+					})
+					this.getordercount()
+					this.getuser()
+					if (uni.getStorageSync("ordertype")) {
+						uni.showLoading({
+							mask: true,
+							title: "请稍后"
+						})
+						this.myAmapFun.getRegeo({
+							success: (res) => {
+								this.type = 2
+								this.num = uni.getStorageSync("ordertype")
+								this.lat = res[0].latitude
+								this.lng = res[0].longitude
+								this.page = 1
+								this.list = []
+								this.getlist(str)
+							},
+							fail: (err) => {
+								this.type = 2
+								this.num = uni.getStorageSync("ordertype")
+								this.lat = 39.865246
+								this.lng = 116.378517
+								this.page = 1
+								this.list = []
+								this.getlist(str)
+							}
+						})
+					} else {
+						this.getlist(str)
+					}
+				} else {
+					uni.stopPullDownRefresh()
+					this.$refs.nav.count = 0
+					this.nottoken = false
+					this.user = {}
+					this.facilitator = {}
+					this.list = []
+					this.type = 1
+					this.num = this.num < 5 ? this.num : 1
+					this.$refs.tabbar.setbadge(0)
+					uni.removeTabBarBadge({
+						index: 1,
 					})
-				}
-			},
-			openmap(item){
-				uni.openLocation({
-					latitude:Number(item.lat),
-					longitude:Number(item.lng)
-				})
-			},
-			getuser() {
-				this.$u.post('/User/getDetail').then(res => {
-					if (res.code == 0) {
-						if(res.response.is_facilitator == 2){
-							this.nottoken = true
-						}
-					}
-				})
-			},
-			getaddress(){
-				this.wancheng1(this.daijiaitem,1)
+					if(str == 1){
+						this.$u.toast("请登录")
+						this.$tologin('请登录。')
+					}
+				}
+			},
+			openmap(item) {
+				uni.openLocation({
+					latitude: Number(item.lat),
+					longitude: Number(item.lng)
+				})
+			},
+			getuser() {
+				this.$u.post('/User/getDetail').then(res => {
+					if (res.code == 0) {
+						if (res.response.is_facilitator == 2) {
+							this.nottoken = true
+						}
+					}
+				})
+			},
+			getaddress() {
+				this.wancheng1(this.daijiaitem, 1)
 			},
 			wancheng1(item, type) {
 				this.daijiaitem = item
@@ -804,6 +813,7 @@
 								}
 							} else {
 								this.$u.toast(res.msg)
+								this.$tologin(res.msg)
 							}
 						})
 					},
@@ -823,6 +833,7 @@
 						this.getordercount()
 					} else {
 						this.$u.toast(res.msg)
+						this.$tologin(res.msg)
 					}
 				})
 			},
@@ -837,6 +848,7 @@
 						this.getordercount()
 					} else {
 						this.$u.toast(res.msg)
+						this.$tologin(res.msg)
 					}
 				})
 			},
@@ -851,6 +863,7 @@
 						this.getordercount()
 					} else {
 						this.$u.toast(res.msg)
+						this.$tologin(res.msg)
 					}
 				})
 			},
@@ -865,6 +878,7 @@
 						this.getordercount()
 					} else {
 						this.$u.toast(res.msg)
+						this.$tologin(res.msg)
 					}
 				})
 			},
@@ -896,6 +910,7 @@
 
 					} else {
 						this.$u.toast(res.msg)
+						this.$tologin(res.msg)
 					}
 				})
 			},
@@ -910,11 +925,12 @@
 					if (res.code == 0) {
 						this.pingjia = false
 						setTimeout(() => {
-							this.page = 1
+							this.page = 1
 							this.getordercount()
 							this.getlist()
 						}, 800)
 					}
+					this.$tologin(res.msg)
 				})
 			},
 			openpingjia(item) {
@@ -951,6 +967,7 @@
 							}
 						})
 					} else {
+						this.$tologin(res.msg)
 						this.$u.toast(res.msg)
 					}
 				})
@@ -968,6 +985,7 @@
 							this.getlist()
 						}, 800)
 					}
+					this.$tologin(res.msg)
 				})
 			},
 			quxiao(item) {
@@ -980,13 +998,14 @@
 					if (res.code == 0) {
 						setTimeout(() => {
 							this.page = 1
-							this.getlist()
+							this.getlist()
 							this.getordercount()
 						}, 800)
 					}
+					this.$tologin(res.msg)
 				})
 			},
-			getlist(str) {
+			getlist(str) {
 				uni.removeStorageSync("ordertype")
 				if (this.type == 1) {
 					var order_status = ''
@@ -1006,17 +1025,23 @@
 							order_status: order_status,
 							page: this.page,
 						}
-					}).then(res => {
-						uni.stopPullDownRefresh()
-						if(str == 1){
-							this.$u.toast("刷新成功")
-						}
-						this.toast = res.response.count
-						if (this.page == 1) {
-							this.list = res.response.data
-						} else {
-							this.list = this.list.concat(res.response.data)
+					}).then(res => {
+						uni.stopPullDownRefresh()
+						if (res.code == 0) {
+							if (str == 1) {
+								this.$u.toast("刷新成功")
+							}
+							this.toast = res.response.count
+							if (this.page == 1) {
+								this.list = res.response.data
+							} else {
+								this.list = this.list.concat(res.response.data)
+							}
+						} else {
+							this.$u.toast(res.msg)
+							this.$tologin(res.msg)
 						}
+
 					})
 				} else {
 					var data = {}
@@ -1055,46 +1080,52 @@
 					}
 					this.$u.post('/FacilitatorOrder/list', {
 						content: data
-					}).then(res => {
-						if(str == 1){
-							this.$u.toast("刷新成功")
-						}
-						uni.stopPullDownRefresh()
-						this.toast = res.response.count
-						if (this.page == 1) {
-							this.list = res.response.data
-						} else {
-							this.list = this.list.concat(res.response.data)
+					}).then(res => {
+						if (res.code == 0) {
+							if (str == 1) {
+								this.$u.toast("刷新成功")
+							}
+							this.toast = res.response.count
+							if (this.page == 1) {
+								this.list = res.response.data
+							} else {
+								this.list = this.list.concat(res.response.data)
+							}
+						} else {
+							this.$u.toast(res.msg)
+							this.$tologin(res.msg)
 						}
+						uni.stopPullDownRefresh()
 					})
 				}
 			},
 			getordercount() {
 				this.$u.post('/Order/getOrderStatusCount').then(res => {
-					this.facilitator = res.response.facilitator
-					this.user = res.response.user
-					var num = 0
-					num = num + res.response.facilitator.pending_count
-					num = num + res.response.facilitator.received_count
-					this.facilitatorcount = num
-					num = 0
-					num = num + res.response.user.comments_count
-					num = num + res.response.user.pending_count
-					num = num + res.response.user.received_count
-					this.usercount = num
-					if((this.facilitatorcount + this.usercount) > 0){
-						uni.setTabBarBadge({
-							text: (this.facilitatorcount + this.usercount).toFixed(0).toString(),
-							index: 1,
-						})
-						this.$refs.tabbar.setbadge((this.facilitatorcount + this.usercount).toFixed(0).toString())
-					}else{
-						uni.removeTabBarBadge({
-							index:1,
-						})
-						this.$refs.tabbar.setbadge(0)
-					}
-					
+					if (res.code == 0) {
+						this.facilitator = res.response.facilitator
+						this.user = res.response.user
+						var num = 0
+						num = num + res.response.facilitator.pending_count
+						num = num + res.response.facilitator.received_count
+						this.facilitatorcount = num
+						num = 0
+						num = num + res.response.user.comments_count
+						num = num + res.response.user.pending_count
+						num = num + res.response.user.received_count
+						this.usercount = num
+						if ((this.facilitatorcount + this.usercount) > 0) {
+							uni.setTabBarBadge({
+								text: (this.facilitatorcount + this.usercount).toFixed(0).toString(),
+								index: 1,
+							})
+							this.$refs.tabbar.setbadge((this.facilitatorcount + this.usercount).toFixed(0).toString())
+						} else {
+							uni.removeTabBarBadge({
+								index: 1,
+							})
+							this.$refs.tabbar.setbadge(0)
+						}
+					}
 				})
 			},
 			tojindu(item, type) {
@@ -1113,8 +1144,8 @@
 
 				})
 			},
-			changenum(num) {
-				
+			changenum(num) {
+
 				this.page = 1
 				this.num = num
 				this.getlist()
@@ -1129,10 +1160,10 @@
 					this.page = 1
 					this.list = []
 					this.getlist()
-				} else {
-					uni.showLoading({
-						mask:true,
-						title:"请稍后"
+				} else {
+					uni.showLoading({
+						mask: true,
+						title: "请稍后"
 					})
 					this.myAmapFun.getRegeo({
 						success: (res) => {
@@ -1876,8 +1907,9 @@
 						margin: 10rpx 0;
 					}
 
-					.address-box {
-						font-size:28rpx;
+					.address-box {
+						font-size: 28rpx;
+
 						.address-text {
 							margin: 10rpx 0;
 						}
@@ -1938,8 +1970,9 @@
 					}
 				}
 
-				.butt-view {
+				.butt-view {
 					margin-top: 20rpx;
+
 					.text2 {
 						margin-right: 20rpx;
 

+ 1 - 0
pages/shop/myshop.vue

@@ -57,6 +57,7 @@
 					} else {
 						this.$u.toast(res.msg)
 						this.userdata = {}
+						this.$tologin(res.msg)
 					}
 				})
 			},

+ 52 - 42
pages/shop/search.vue

@@ -10,7 +10,7 @@
 					搜索
 				</view>
 			</view>
-			<view class="goods-box" v-if="goodslist.length > 0 && showgoods">
+			<view class="goods-box" v-if="showgoods">
 				<view class="shaixuan-box u-flex u-col-center u-row-between">
 					<view class="itme">
 						<view class="u-flex u-col-center u-row-center" @tap="show1 = true">
@@ -74,7 +74,6 @@
 					</view>
 				</view>
 			</view>
-			<x-notdata v-else-if="goodslist.length == 0 && showgoods" tips="无相关数据" @shuaxin="tosearch(1)"></x-notdata>
 			<view class="lishi-box" v-else>
 				<view class="top u-flex u-col-center u-row-between">
 					<text>搜索历史记录</text>
@@ -84,7 +83,8 @@
 					<text v-for="(item,index) in lishilist" :key="index" @tap="searchkey(item)">{{item}}</text>
 				</view>
 			</view>
-		</view>
+		</view>
+		<x-notdata v-if="goodslist.length == 0 && showgoods" tips="无相关数据" @shuaxin="tosearch(1)"></x-notdata>
 		<view class="goods-box">
 			<view class="goods-item" v-for="(item,index) in goodslist" :key="index" @tap="toinfo(item)">
 				<image :src="item.master_image" mode=""></image>
@@ -102,10 +102,10 @@
 					</view>
 				</view>
 			</view>
-		</view>
-		<view @tap="changeadd" class="change-add-box u-flex u-col-center u-row-right" style="padding: 10rpx 20rpx;background-color: rgba(256,256,256,1);border-radius: 100rpx;font-size: 24rpx;position: fixed;bottom: 50rpx;right: 20rpx;max-width: 700rpx;">
-			<span style="flex: 1;color: #2AA47F;margin-right: 10rpx;">{{nowaddresstext}}</span>
-			<image src="../../static/images/qiehuan.png" style="width: 40rpx;height: 40rpx;" mode=""></image>
+		</view>
+		<view @tap="changeadd" class="change-add-box u-flex u-col-center u-row-right" style="padding: 10rpx 20rpx;background-color: rgba(256,256,256,1);border-radius: 100rpx;font-size: 24rpx;position: fixed;bottom: 50rpx;right: 20rpx;max-width: 700rpx;">
+			<span style="flex: 1;color: #2AA47F;margin-right: 10rpx;">{{nowaddresstext}}</span>
+			<image src="../../static/images/qiehuan.png" style="width: 40rpx;height: 40rpx;" mode=""></image>
 		</view>
 	</view>
 </template>
@@ -129,16 +129,24 @@
 				paixuid: 'complex', //排序的数据
 				sort: 'desc', //大到小:desc 小到大:asc 
 				latitude: '',
-				longitude: '',
-				nowaddresstext:''
+				longitude: '',
+				nowaddresstext: ''
 			}
 		},
-		onLoad() {
+		onLoad() {
 			this.getaddress()
 			this.gettype()
 			if (uni.getStorageSync("lishi")) {
 				this.lishilist = uni.getStorageSync("lishi")
 			}
+		},
+		onPullDownRefresh() {
+			if(this.showgoods){
+				this.tosearch()
+			}else{
+				this.getaddress()
+				this.gettype()
+			}
 		},
 		onReachBottom() {
 			if (this.goodslist.length != this.count) {
@@ -146,35 +154,36 @@
 				this.getgoods()
 			}
 		},
-		methods: {
-			changeadd(){
-				uni.chooseLocation({
-					latitude: this.lat,
-					longitude: this.lng,
-					success: (res) => {
-						if(res.name){
-							this.latitude = res.latitude
-							this.longitude = res.longitude
-							this.nowaddresstext = res.name
-							this.page = 1
-							this.getgoods()
-						}
-					}
-				})
-			},
-			getaddress(){
-				this.myAmapFun.getRegeo({
-					success: (res) => {
-						this.nowaddresstext = res[0].name
-						this.latitude = res[0].latitude
+		methods: {
+			changeadd() {
+				uni.chooseLocation({
+					latitude: this.lat,
+					longitude: this.lng,
+					success: (res) => {
+						if (res.name) {
+							this.latitude = res.latitude
+							this.longitude = res.longitude
+							this.nowaddresstext = res.name
+							this.page = 1
+							this.getgoods()
+						}
+					}
+				})
+			},
+			getaddress() {
+				this.myAmapFun.getRegeo({
+					success: (res) => {
+						this.nowaddresstext = res[0].name
+						this.latitude = res[0].latitude
 						this.longitude = res[0].longitude
-					},
-					fail: (err) => {
-						this.latitude = 39.865246
-						this.longitude = 116.378517
-						this.nowaddresstext = "获取地址失败"
-					}
-				})
+						uni.stopPullDownRefresh()
+					},
+					fail: (err) => {
+						this.latitude = 39.865246
+						this.longitude = 116.378517
+						this.nowaddresstext = "获取地址失败"
+					}
+				})
 			},
 			dellishi() {
 				uni.showModal({
@@ -196,9 +205,9 @@
 				this.tosearch()
 			},
 			changepaixu(id, name) {
-				this.paixuid = id
-				this.paixu = name
-				this.show1 = false
+				this.paixuid = id
+				this.paixu = name
+				this.show1 = false
 				this.tosearch()
 			},
 			changepeisong(num) {
@@ -250,7 +259,8 @@
 				}).then(res => {
 					if (str == 1) {
 						this.$u.toast("刷新成功")
-					}
+					}
+					uni.stopPullDownRefresh()
 					this.count = res.response.count
 					if (this.page == 1) {
 						this.goodslist = res.response.data

+ 24 - 10
pages/shop/shop-order.vue

@@ -44,9 +44,9 @@
 				<view class="itme">
 					<view class="u-flex u-col-center u-row-center" @tap="show2 = true">
 						<text class="text">筛选</text>
-							<view class="image">
-								<image style="right: 0;" src="../../static/images/shaixuan.png" mode=""></image>
-							</view>
+						<view class="image">
+							<image style="right: 0;" src="../../static/images/shaixuan.png" mode=""></image>
+						</view>
 					</view>
 					<view class="shaixuan" @tap="show2 = false" v-if="show2">
 						<view class="shaixuan-body u-flex-col u-col-bottom" @tap.stop>
@@ -191,6 +191,13 @@
 			this.id = option.id
 		},
 		onShow() {
+			if (uni.getStorageSync('token')) {
+				this.getlist()
+			}
+
+		},
+		onPullDownRefresh() {
+			this.page = 1
 			this.getlist()
 		},
 		onReachBottom() {
@@ -263,15 +270,22 @@
 						sort: this.shaixuanleft + "," + this.shaixuancenter
 					}
 				}).then(res => {
-					if (str == 1) {
-						this.$u.toast("刷新成功")
-					}
-					this.count = res.response.count
-					if (this.page == 1) {
-						this.list = res.response.data
+					if (res.code == 0) {
+						if (str == 1) {
+							this.$u.toast("刷新成功")
+						}
+						this.count = res.response.count
+						if (this.page == 1) {
+							this.list = res.response.data
+						} else {
+							this.list = this.list.concat(res.response.data)
+						}
 					} else {
-						this.list = this.list.concat(res.response.data)
+						this.$tologin(res.msg)
 					}
+
+					uni.stopPullDownRefresh()
+
 				})
 			},
 			toinfo(item) {

+ 2 - 1
pages/shop/shop-orderinfo.vue

@@ -172,7 +172,8 @@
 								this.value = this.list[0].id
 							}
 						} else {
-							this.$u.toast(res.msg)
+							this.$u.toast(res.msg)
+							this.$tologin(res.msg)
 						}
 						// this.orderdata = res.response
 					})

+ 2 - 1
pages/shop/shop.vue

@@ -112,7 +112,8 @@
 				})
 				this.getorder()
 			} else {
-				this.$refs.nav.count = 0
+				this.$refs.nav.count = 0
+				this.$refs.tabbar.setbadge(0)
 				uni.removeTabBarBadge({
 					index: 1,
 				})

+ 3 - 0
pages/shop/xiadan.vue

@@ -147,6 +147,7 @@
 						}
 					}else{
 						this.$u.toast(res.msg)
+						this.$tologin(res.msg)
 					}
 				})
 			},
@@ -185,6 +186,7 @@
 						})
 					}else{
 						this.$u.toast(res.msg)
+						this.$tologin(res.msg)
 					}
 				})
 			},
@@ -217,6 +219,7 @@
 						}
 					}else{
 						this.address = {}
+						this.$tologin(res.msg)
 					}
 				})
 			},