Prechádzať zdrojové kódy

feat:叫号,结算添加加载弹窗

zhanghui 2 rokov pred
rodič
commit
a215f48154
2 zmenil súbory, kde vykonal 19 pridanie a 2 odobranie
  1. 18 1
      pages/index/index.vue
  2. 1 1
      pages/login/login.vue

+ 18 - 1
pages/index/index.vue

@@ -98,7 +98,7 @@
 
 				<view class="flex-row justify-center" v-if="currService.balanceFlag && currService.balance *1 <= 200">
 					<view class="flex-row justify-center hintView"
-						  :class="{hintViewBgColor2: currService.balance *1 > 38 && currService.balance *1 <= 100,
+						  :class="{hintViewBgColor2: currService.balance *1 <= 100,
 						  		   hintViewBgColor3: currService.balance *1 > 100 && currService.balance *1 <= 200}">
 						<view class="hint">
 							<text>!</text>
@@ -521,13 +521,20 @@
 					content:'是否确定结算',
 					editable:false,
 					success:(e)=>{
+						console.log(e)
 						if (e.confirm){
 							that.previousServiceOrderId = that.currService.serviceObjectId
+							uni.showLoading({
+								title: '结算中...'
+							});
 							that.$api.service.settle({
 								orderServiceId: that.currService.orderServiceId
 							}).then(res => {
+								uni.hideLoading();
 								that.currServiceInfo()
 								that.$refs.reminderPopup.open()
+							}).catch(err =>{
+								uni.hideLoading();
 							})
 						}
 					}
@@ -573,11 +580,16 @@
 					success:(e)=>{
 						if (e.confirm){
 							console.log(e.confirm)
+							uni.showLoading({
+								title: '叫号中...'
+							});
 							this.$api.service.next({
 								orderServiceId: this.currService ? this.currService.orderServiceId : null,
 								storeId:this.storeId
 							}).then(res => {
 								this.currServiceInfo(true)
+							}).catch(err=>{
+								uni.hideLoading();
 							})
 						}
 					}
@@ -593,6 +605,9 @@
 					});
 					return
 				}
+				uni.showLoading({
+					title: '叫号中...'
+				});
 				this.$api.service.currServiceInfo({
 					storeId: this.userInfo.workStoreId
 				}).then(res => {
@@ -612,10 +627,12 @@
 							})
 						}
 					}
+					uni.hideLoading();
 					this.currService = res.data.data
 					this.setButtomState(this.currService)
 					this.currService.avatar=this.currService.avatar.replace(/^http:/, "https:")
 				}).catch(err=>{
+					uni.hideLoading();
 					console.log("出错了+++++++++++出错了+++++++",err)
 
 				})

+ 1 - 1
pages/login/login.vue

@@ -54,7 +54,7 @@
 	export default {
 		data() {
 			return {
-				savePassword:false,
+				savePassword:true,
 				form: {
 					username: '',
 					password: ''