safety-set.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <view>
  3. <headContent>
  4. <template #left>
  5. <reverse-back />
  6. </template>
  7. <template #content>
  8. <view class="haed-title">
  9. 安全设置
  10. </view>
  11. </template>
  12. </headContent>
  13. <view class="safety-set">
  14. <view class="safety-set-item" @click.stop="changePassword()">
  15. <text class="safety-set-lable">登录密码</text>
  16. <view class="safety-set-more">
  17. <text class="more-lable">修改</text>
  18. <text class="more-icon iconfont">&#xe88e;</text>
  19. </view>
  20. </view>
  21. <view class="safety-set-item" @click.stop="setGoogle()">
  22. <text class="safety-set-lable">谷歌验证</text>
  23. <view class="safety-set-more">
  24. <text class="more-lable">绑定</text>
  25. <text class="more-icon iconfont">&#xe88e;</text>
  26. </view>
  27. </view>
  28. <view class="safety-set-item" @click.stop="bindContactAccount(2)">
  29. <text class="safety-set-lable">邮箱</text>
  30. <view class="safety-set-more">
  31. <template v-if="userInfo && userInfo.email">
  32. <text class="more-lable active-more-lable">已绑定</text>
  33. </template>
  34. <template v-else>
  35. <text class="more-lable">绑定</text>
  36. <text class="more-icon iconfont">&#xe88e;</text>
  37. </template>
  38. </view>
  39. </view>
  40. <view class="safety-set-item" @click.stop="bindContactAccount(1)">
  41. <text class="safety-set-lable">手机</text>
  42. <view class="safety-set-more">
  43. <template v-if="userInfo && userInfo.phone">
  44. <text class="more-lable active-more-lable">已绑定</text>
  45. </template>
  46. <template v-else>
  47. <text class="more-lable">绑定</text>
  48. <text class="more-icon iconfont">&#xe88e;</text>
  49. </template>
  50. </view>
  51. </view>
  52. </view>
  53. <view class="safety-title">
  54. 交易设置
  55. </view>
  56. <view class="safety-set item-border">
  57. <view class="safety-set-item">
  58. <text class="safety-set-lable">法币收款设置</text>
  59. <view class="safety-set-more">
  60. <text class="more-icon iconfont">&#xe88e;</text>
  61. </view>
  62. </view>
  63. <view class="safety-set-item " @click.stop="setMoneyPassword()">
  64. <text class="safety-set-lable">资金密码{法币、转账}</text>
  65. <view class="safety-set-more">
  66. <text class="more-lable">去设置</text>
  67. <text class="more-icon iconfont">&#xe88e;</text>
  68. </view>
  69. </view>
  70. </view>
  71. </view>
  72. </template>
  73. <script>
  74. import {
  75. Way_getUserInfo
  76. } from "@/utils/common-request.js"
  77. export default {
  78. name: 'safety-set',
  79. data() {
  80. return {
  81. userInfo:{},
  82. account:''
  83. };
  84. },
  85. onShow() {
  86. this.getUserInfo()
  87. },
  88. methods: {
  89. getUserInfo() {
  90. Way_getUserInfo().then(res => {
  91. this.userInfo = res
  92. this.account = res.email || res.phone
  93. })
  94. },
  95. changePassword() {
  96. uni.navigateTo({
  97. url: '/pages/content/change-password'
  98. })
  99. },
  100. bindContactAccount(type) {
  101. uni.navigateTo({
  102. url: `/pages/content/bind?type=${type}`
  103. })
  104. },
  105. setMoneyPassword(){
  106. uni.navigateTo({
  107. url:'/pages/content/money-password'
  108. })
  109. },
  110. setGoogle(){
  111. uni.navigateTo({
  112. url:`/pages/content/Google?account=${this.account}`
  113. })
  114. }
  115. }
  116. }
  117. </script>
  118. <style lang="scss" scoped>
  119. .safety-set {
  120. width: 100%;
  121. .safety-set-item {
  122. width: 100%;
  123. height: 80rpx;
  124. display: flex;
  125. align-items: center;
  126. justify-content: space-between;
  127. padding: 0 $pages-padding;
  128. font-size: 28rpx;
  129. .safety-set-lable {
  130. // font-weight: 700;
  131. flex-shrink: 0;
  132. }
  133. border-top: 1rpx solid $border-color;
  134. .safety-set-more {
  135. flex-shrink: 0;
  136. display: flex;
  137. align-items: center;
  138. .more-lable {
  139. color: $Theme-Color;
  140. }
  141. .active-more-lable {
  142. color: #ccc;
  143. }
  144. .more-icon {
  145. width: 32rpx;
  146. height: 32rpx;
  147. color: #ccc;
  148. font-size: 32rpx;
  149. }
  150. }
  151. // <view class="safety-set-item">
  152. // <text class="safety-set-lable">邮箱</text>
  153. // <view class="safety-set-more">
  154. // <text class="more-lable active-more-lable">已绑定</text>
  155. // <text class="more-icon iconfont">&#xe88e;</text>
  156. // </view>
  157. // </view>
  158. }
  159. }
  160. .safety-title {
  161. width: 100%;
  162. height: 80rpx;
  163. line-height: 80rpx;
  164. font-size: 28rpx;
  165. color: $Theme-Color;
  166. padding: 0 $pages-padding;
  167. background-color: $page-bg;
  168. }
  169. .item-border {
  170. .safety-set-item {
  171. border-top: none;
  172. border-bottom: 1rpx solid $border-color;
  173. }
  174. }
  175. </style>