freeze.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <template>
  2. <view class="flex">
  3. <image src="../../static/new_index/top.png" mode="widthFix" style="width: 642rpx;margin-top: 76rpx;"></image>
  4. <image src="../../static/new_index/bottom.png" mode="widthFix" style="width: 310rpx;margin-top: 116rpx;">
  5. </image>
  6. <view class="title">{{ type == 1? list[0].title : list[1].title }}</view>
  7. <view class="tip">{{ type == 1? list[0].tip : list[1].tip }}</view>
  8. <view class="login_out flexC" @tap="logout">退出绑定</view>
  9. </view>
  10. </template>
  11. <script>
  12. import {
  13. _API_Logout
  14. } from '@/apis/verify.js'
  15. export default {
  16. data() {
  17. return {
  18. type: '',
  19. list: [{
  20. title: '您长时间未登录被冻结,请联系客服',
  21. tip: '温馨提示:您已被冻结,暂不能使用系统!如有疑问请及时联系客服'
  22. }, {
  23. title: '您的账号已被系统删除',
  24. tip: '温馨提示:您已被删除,暂不能使用系统!如有疑问请及时联系客服'
  25. }]
  26. }
  27. },
  28. onLoad(option) {
  29. this.type = option.type
  30. },
  31. methods: {
  32. // 退出登录
  33. logout() {
  34. uni.showLoading({
  35. mask: true
  36. })
  37. _API_Logout().then(() => {
  38. if (this.$store.state.app.token) {
  39. this.$store.commit('app/LOGOUT')
  40. // window.history.replaceState({}, '', '/api/gzh/#/pages/login-reg/login-reg')
  41. // location.reload()
  42. this.toWxchatLogin("/pages/login-reg/login-reg", null)
  43. } else {
  44. this.$store.commit('app/LOGOUT')
  45. this.toWxchatLogin("/pages/login-reg/login-reg", null)
  46. }
  47. })
  48. uni.removeStorageSync('isHelper')
  49. },
  50. toWxchatLogin(url, state) {
  51. url = url || "/pages/index/index"
  52. state = state || "cli"
  53. const redirect_uri = encodeURIComponent(`${this.$config.redirect_uri}/api/gzh#${url}`)
  54. const auth = () => window.location.href =
  55. `${this.$config.wxURL}?appid=${this.$config.appid}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=${state}#wechat_redirect`
  56. auth()
  57. },
  58. }
  59. }
  60. </script>
  61. <style lang="scss">
  62. page {
  63. background-color: #fff;
  64. }
  65. .flex {
  66. display: flex;
  67. align-items: center;
  68. flex-direction: column;
  69. .title {
  70. color: #333333;
  71. font-size: 40rpx;
  72. font-weight: bold;
  73. margin-top: 136rpx;
  74. }
  75. .tip {
  76. width: 560rpx;
  77. font-size: 28rpx;
  78. font-weight: 400;
  79. color: #999999;
  80. margin-top: 40rpx;
  81. line-height: 44rpx;
  82. }
  83. }
  84. .login_out {
  85. width: 220rpx;
  86. height: 88rpx;
  87. // background: #007AFF;
  88. margin-top: 140rpx;
  89. color: #999;
  90. font-size: 30rpx;
  91. color: $base-color;
  92. }
  93. </style>