Explorar el Código

Merge branch 'master' into master-pro

付晓文。 hace 2 meses
padre
commit
520fb2a4c4
Se han modificado 2 ficheros con 36 adiciones y 23 borrados
  1. 35 22
      pages/order/index.vue
  2. 1 1
      pages/store/advertising.vue

+ 35 - 22
pages/order/index.vue

@@ -501,6 +501,7 @@
 			},
 			mescrollInit(mescroll) {
 				this.mescroll = mescroll;
+				mescroll.optDown.use = false;
 			},
 			InputBlur(e) {
 				this.search = e.detail.value
@@ -577,11 +578,14 @@
 					this.orderList.forEach(item => {
 						item.isShow = false
 					})
-					console.log(this.orderList)
-					this.mescroll.endSuccess(res.data.result.records.length, res.data.result.total);
+					if (this.mescroll) {
+						this.mescroll.endSuccess(res.data.result.records.length, res.data.result.total);
+					}
 					uni.showTabBar()
 				}).catch(() => {
-					this.mescroll.endErr()
+					if (this.mescroll) {
+						this.mescroll.endErr()
+					}
 				})
 			},
 			geDetail(item) {
@@ -602,10 +606,14 @@
 				}
 				this.$http.post("/ts/merchant/serviceOrder", data).then(res => {
 						this.serviceList = this.serviceList.concat(res.data.result.records)
-						this.mescroll.endSuccess(res.data.result.records.length, res.data.result.total);
+						if (this.mescroll) {
+							this.mescroll.endSuccess(res.data.result.records.length, res.data.result.total);
+						}
 					})
 					.catch(() => {
-						this.mescroll.endErr()
+						if (this.mescroll) {
+							this.mescroll.endErr()
+						}
 					})
 
 			},
@@ -985,31 +993,36 @@
 				})
 			}
 		},
-		mounted() {
-			this.mescroll.optDown.use = false
-			// this.getList()
-		},
 		onShow() {
-			let that = this
+			const app = getApp()
+			if (app.globalData) {
+				const { currentIndex, tabIndex } = app.globalData
+				if (currentIndex !== '' && currentIndex != null) {
+					this.currentIndex = currentIndex
+				}
+				if (tabIndex !== '' && tabIndex != null) {
+					this.tabIndex = tabIndex
+				}
+				app.globalData.currentIndex = ''
+				app.globalData.tabIndex = ''
+			}
+			const that = this
 			uni.getStorage({
 				key: 'login_user_info',
-				success: function(res) {
+				success(res) {
 					that.merchantId = res.data.merchantId
 					that.serviceList = []
 					that.orderList = []
-					let page = {
-						num: 1,
-						size: 10
-					}
-					that.getList(page)
-					that.getserviceList(page)
+					const page = { num: 1, size: 10 }
+					that.$nextTick(() => {
+						if (that.tabIndex == 0) {
+							that.getList(page)
+						} else if (that.tabIndex == 1) {
+							that.getserviceList(page)
+						}
+					})
 				}
 			})
-			const app = getApp();
-      this.currentIndex=app.globalData.currentIndex
-			this.tabIndex=app.globalData.tabIndex
-			app.globalData.currentIndex=''
-			app.globalData.tabIndex=''
 		},
 	}
 </script>

+ 1 - 1
pages/store/advertising.vue

@@ -20,7 +20,7 @@
 							<view class="uni-uploader__file" v-if="video">
 								<view class="uploader_video">
 									<uni-icons class="icon iconfont icon-cuo" type="trash-filled" size="20"
-										@tap="delectVideo"></uni-icons>
+										@tap="delectVideo"  color="#ffffff"></uni-icons>
 									<video :src="video" class="video-container"></video>
 								</view>
 							</view>