exit.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <view>
  3. <scroll-view :scroll-y="modalName==null" class="page" :class="modalName!=null?'show':''">
  4. <cu-custom bgColor="bg-gradual-pink" :isBack="false">
  5. <!-- <block slot="backText">返回</block> -->
  6. <block slot="content">退出页</block>
  7. </cu-custom>
  8. <view class="solids-bottom padding-xs flex align-center">
  9. <view class="flex-sub text-center">
  10. <view class="solid-bottom text-xsl padding">
  11. <text class=" cuIcon-roundcheckfill text-green"></text>
  12. </view>
  13. <view class="padding">{{item.msg}}</view>
  14. </view>
  15. </view>
  16. <view class="padding flex flex-direction">
  17. <button class="cu-btn bg-green shadow-blur round lg" @tap="goback()">返回登录
  18. </button>
  19. </view>
  20. </scroll-view>
  21. </view>
  22. </template>
  23. <script>
  24. import api from "@/api/api";
  25. export default {
  26. data() {
  27. return {
  28. modalName: null,
  29. item:{msg:'退出成功'},
  30. }
  31. },
  32. onLoad: function (option) {
  33. api.logout().then(res=>{
  34. uni.clearStorageSync()
  35. })
  36. },
  37. methods: {
  38. goback(){
  39. uni.navigateTo({
  40. url:'/pages/login/login'
  41. })
  42. }
  43. }
  44. }
  45. </script>
  46. <style>
  47. </style>