htc 1 vecka sedan
förälder
incheckning
abf36804a7
1 ändrade filer med 9 tillägg och 7 borttagningar
  1. 9 7
      components/deviceBox/index.vue

+ 9 - 7
components/deviceBox/index.vue

@@ -64,13 +64,15 @@
 					title:'温馨提示',
 					content:'确定要解绑该设备吗?',
 					success: (res) => {
-						this.$api.post('/device/unbind',{deviceId:item.id}).then(res=>{
-							if(res.data.code!==0) return this.$showToast(res.data.msg)
-							this.$showToast('解绑成功');
-							setTimeout(()=>{
-								this.$emit('unbindSuccess')
-							},1000)
-						})
+						if(res.confirm){
+							this.$api.post('/device/unbind',{deviceId:item.id}).then(res=>{
+								if(res.data.code!==0) return this.$showToast(res.data.msg)
+								this.$showToast('解绑成功');
+								setTimeout(()=>{
+									this.$emit('unbindSuccess')
+								},1000)
+							})
+						}
 					}
 				})
 			}