index.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <template>
  2. <v-page>
  3. <v-header :title="$t('safe.c7')"></v-header>
  4. <main class=" m-x-lg m-y-lg p-x-md bg-panel-3 rounded-md box-shadow">
  5. <view class="list">
  6. <!-- --------google------ -->
  7. <v-link
  8. tag="li"
  9. to="/pages/safe/google"
  10. class="item link-active d-flex p-x-md p-y-md align-center border-b"
  11. >
  12. <view class="flex-fill d-flex justify-between m-r-xs">
  13. <view class="color-light">{{$t('safe.b9')}}</view>
  14. <van-switch v-if="user.google_token" @click.native.stop @input="switchVer(3)" size="28rpx" :checked="user.google_status==1" />
  15. </view>
  16. <van-icon name="arrow" />
  17. </v-link>
  18. <!-- -------login---------- -->
  19. <v-link
  20. tag="li"
  21. to="/pages/safe/login-password"
  22. class="item link-active d-flex p-x-md p-y-md align-center border-b"
  23. >
  24. <view class="flex-fill d-flex justify-between m-r-xs">
  25. <view class="color-light">{{$t('safe.c8')}}</view>
  26. </view>
  27. <van-icon name="arrow" />
  28. </v-link>
  29. <!-- ----------交易密码---------- -->
  30. <v-link
  31. tag="li"
  32. to="/pages/safe/transaction-password"
  33. class="item link-active d-flex p-x-md p-y-md align-center border-b"
  34. >
  35. <view class="flex-fill d-flex justify-between m-r-xs">
  36. <view class="color-light">{{$t('safe.d1')}}</view>
  37. </view>
  38. <van-icon name="arrow" />
  39. </v-link>
  40. <!-- -----------邮箱--------- -->
  41. <v-link
  42. tag="li"
  43. to="/pages/safe/email"
  44. class="item link-active d-flex p-x-md p-y-md align-center border-b"
  45. >
  46. <view class="flex-fill d-flex justify-between m-r-xs">
  47. <view class="color-light">{{$t('safe.a2')}}</view>
  48. <van-switch v-if="user.email" @click.native.stop @input="switchVer(2)" size="28rpx" :checked="user.email_status==1" />
  49. </view>
  50. <van-icon name="arrow" />
  51. </v-link>
  52. <!-- ----------手机---------- -->
  53. <!-- <v-link
  54. tag="li"
  55. to="/pages/safe/phone"
  56. class="item link-active d-flex p-x-md p-y-md align-center border-b"
  57. >
  58. <view class="flex-fill d-flex justify-between m-r-xs">
  59. <view class="color-light">{{$t('safe.d2')}}</view>
  60. <van-switch v-if="user.phone" @click.native.stop @input="switchVer(1)" size="28rpx" :checked="user.phone_status==1" />
  61. </view>
  62. <van-icon name="arrow" />
  63. </v-link> -->
  64. </view>
  65. </main>
  66. <van-popup
  67. :show="switchShow"
  68. @close="switchShow=false"
  69. closeable
  70. close-on-popstate
  71. position="bottom"
  72. custom-style="height:60%"
  73. >
  74. <switch-page v-if="switchShow" @close="switchShow=false" :type="switchType" />
  75. </van-popup>
  76. <van-toast id="van-toast" />
  77. </v-page>
  78. </template>
  79. <script>
  80. import { mapState ,mapActions} from "vuex";
  81. import switchPage from "./switch";
  82. export default {
  83. components: {
  84. switchPage,
  85. },
  86. computed: {
  87. ...mapState({
  88. user: "user",
  89. }),
  90. },
  91. data() {
  92. return {
  93. switchShow: false,
  94. switchType: 0,
  95. };
  96. },
  97. methods: {
  98. ...mapActions({
  99. setUserInfo: "setUserInfo",
  100. }),
  101. switchVer(idx) {
  102. this.switchType = idx;
  103. this.switchShow = true;
  104. },
  105. },
  106. onShow() {
  107. this.setUserInfo()
  108. },
  109. mounted(){
  110. }
  111. };
  112. </script>