exit.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. import store from '@/store/index.js'
  26. export default {
  27. data() {
  28. return {
  29. modalName: null,
  30. item:{msg:'退出成功'},
  31. }
  32. },
  33. onLoad: function (option) {
  34. api.logout().then(res=>{
  35. uni.clearStorageSync()
  36. store.commit('SET_TOKEN',"");
  37. store.commit('SET_USERID',"");
  38. })
  39. },
  40. methods: {
  41. goback(){
  42. /* window.location.reload() */
  43. // uni.navigateTo({
  44. // url:'/pages/login/login'
  45. // })
  46. window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww7c43b4b5f33945ad&redirect_uri=hr3.gksports.net.cn:8082&response_type=code&scope=snsapi_userinfo&agentid=1000018&state=STATE#wechat_redirect";
  47. //window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wwd372e7740b9b586f&redirect_uri=zdd.g.dr1997.com&response_type=code&scope=snsapi_userinfo&agentid=1000003&state=STATE#wechat_redirect";
  48. }
  49. }
  50. }
  51. </script>
  52. <style>
  53. </style>