|
|
|
@ -10,9 +10,9 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
// import { |
|
|
|
// logout |
|
|
|
// } from '@/api/auth.js' |
|
|
|
import { |
|
|
|
logout |
|
|
|
} from '@/api/auth.js' |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
@ -67,40 +67,37 @@ |
|
|
|
// }, |
|
|
|
methods: { |
|
|
|
//注销 |
|
|
|
// logoutUser(){ |
|
|
|
// let that = this; |
|
|
|
// uni.showModal({ |
|
|
|
// title: "提示", |
|
|
|
// content: "确定注销吗!", |
|
|
|
// showCancel: true, |
|
|
|
// success: function(ress){ |
|
|
|
// if(ress.confirm){ |
|
|
|
// const param = { |
|
|
|
// phone: that.userInfo.phone |
|
|
|
// } |
|
|
|
// logout(param).then(res => { |
|
|
|
// if (res.data.data === true) { |
|
|
|
// uni.reLaunch({ |
|
|
|
// url: '/pages/login/login', |
|
|
|
// success() { |
|
|
|
// uni.clearStorage(); |
|
|
|
// uni.showToast({ |
|
|
|
// title: '注销成功!', |
|
|
|
// duration: 2000 |
|
|
|
// }); |
|
|
|
// } |
|
|
|
// }); |
|
|
|
// } else { |
|
|
|
// uni.showModal({ |
|
|
|
// content: "注销失败,请联系管理员!", |
|
|
|
// showCancel: false, |
|
|
|
// }); |
|
|
|
// } |
|
|
|
// }); |
|
|
|
// } |
|
|
|
// } |
|
|
|
// }); |
|
|
|
// } |
|
|
|
logoutUser(){ |
|
|
|
let that = this; |
|
|
|
uni.showModal({ |
|
|
|
title: "提示", |
|
|
|
content: "确定注销吗!", |
|
|
|
showCancel: true, |
|
|
|
success: function(ress){ |
|
|
|
if(ress.confirm){ |
|
|
|
logout().then(res => { |
|
|
|
if (res.data.code === 200) { |
|
|
|
uni.reLaunch({ |
|
|
|
url: '/pages/index/index', |
|
|
|
success() { |
|
|
|
uni.clearStorage(); |
|
|
|
uni.showToast({ |
|
|
|
title: '注销成功!', |
|
|
|
duration: 2000 |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
uni.showModal({ |
|
|
|
content: "注销失败,请联系管理员!", |
|
|
|
showCancel: false, |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|