You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

210 lines
5.1 KiB

9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
  1. <!-- 修改用户信息(二合一) -->
  2. <template>
  3. <view class="modify-user">
  4. <navbar :leftClick="leftClick"></navbar>
  5. <view class="edit-user content" v-if="$route.query.type == 2">
  6. <view class="edit-list">
  7. <view class="edit-item">
  8. <view class="title">{{ $t('page.modifyUser.network') }}</view>
  9. <input type="text" disabled value="USDT-TRC20" />
  10. </view>
  11. <view class="edit-item">
  12. <view class="title">{{ $t('page.center.wallet') }}</view>
  13. <input type="text" :placeholder="$t('page.modifyUser.wallet-placeholder')"
  14. v-model="form.moneyAddress" />
  15. </view>
  16. <view class="edit-item">
  17. <view class="title">{{ $t('page.modifyUser.payment') }}</view>
  18. <input type="password" :placeholder="$t('page.modifyUser.payment-placeholder')"
  19. v-model="form.newPassword" />
  20. </view>
  21. </view>
  22. </view>
  23. <!-- 修改pin -->
  24. <view class="edit-user content" v-else>
  25. <view class="edit-list">
  26. <view class="edit-item">
  27. <view class="title">{{ $t('page.modifyUser.oldPassword') }}</view>
  28. <input type="password" v-model="form.oldPassword" />
  29. </view>
  30. <view class="edit-item">
  31. <view class="title">{{ $t('page.modifyUser.newPassword') }}</view>
  32. <input type="password" v-model="form.newPassword" />
  33. </view>
  34. <!-- <view class="edit-item">
  35. <view class="title">{{ $t('page.modifyUser.confirmNewPassword') }}</view>
  36. <input type="text" :placeholder="$t('page.modifyUser.newPassword')" v-model="form.confirmNewPassword"/>
  37. </view> -->
  38. </view>
  39. </view>
  40. <!-- <view class="box">
  41. <view class="edit-item">
  42. <view class="title">{{ $t('page.modifyUser.oldPassword') }}</view>
  43. <input type="text" :placeholder="$t('page.modifyUser.oldPasswordPlaceholder')" v-model="form.oldPassword"/>
  44. </view>
  45. <view class="edit-item">
  46. <view class="title">{{ $t('page.modifyUser.newPassword') }}</view>
  47. <input type="text" :placeholder="$t('page.modifyUser.newPasswordPlaceholder')" v-model="form.newPassword"/>
  48. </view>
  49. </view> -->
  50. <!-- 提交按钮 -->
  51. <view class="confirm content" @click="submit">{{ $t('page.modifyUser.confirm') }}</view>
  52. <!-- 提示信息 -->
  53. <!-- <view class="tips content">{{ $t(`page.modifyUser.${tips[$route.query.type]}`) }}</view> -->
  54. </view>
  55. </template>
  56. <script>
  57. import navbar from '@/components/base/m-navbar.vue'
  58. export default {
  59. components: {
  60. navbar
  61. },
  62. data() {
  63. return {
  64. titles: ['editPinTitle', 'editPasswordTitle'],
  65. tips: ['pinTips', 'passwordTips'],
  66. form: {
  67. oldPassword: '',
  68. newPassword: '',
  69. confirmNewPassword: '',
  70. moneyAddress : ''
  71. }
  72. }
  73. },
  74. methods: {
  75. leftClick() {
  76. uni.navigateTo({
  77. url: '/pages/center/center'
  78. })
  79. },
  80. //提交
  81. submit() {
  82. this.$play()
  83. if (this.$route.query.type == 0) { //修改pin逻辑
  84. this.request('editPayPass', {}, {
  85. oldPayPass: this.form.oldPassword,
  86. payPass: this.form.newPassword,
  87. okPayPass: this.form.confirmNewPassword,
  88. }).then(res => {
  89. if (res.code == 200) {
  90. console.log(res.message);
  91. uni.$u.toast(this.$t(`message.${res.message}`))
  92. setTimeout(() => uni.navigateTo({
  93. url: '/pages/center/center'
  94. }), 1000)
  95. }
  96. })
  97. } else if (this.$route.query.type == 1) { //修改密码逻辑
  98. this.request('editPass', {}, {
  99. oldPass: this.form.oldPassword,
  100. password: this.form.newPassword,
  101. okPassword: this.form.confirmNewPassword,
  102. }).then(res => {
  103. if (res.code == 200) {
  104. uni.$u.toast(this.$t(`message.${res.message}`))
  105. setTimeout(() => uni.navigateTo({
  106. url: '/pages/center/center'
  107. }), 1000)
  108. }
  109. })
  110. } else { //修改钱包地址
  111. this.request('editMoneyAddress', {}, {
  112. moneyAddress : this.form.moneyAddress,
  113. payPass : this.form.newPassword
  114. }).then(res => {
  115. if (res.code == 200) {
  116. uni.$u.toast(this.$t(`message.${res.message}`))
  117. setTimeout(() => uni.navigateTo({
  118. url: '/pages/center/center'
  119. }), 500)
  120. }
  121. })
  122. }
  123. }
  124. }
  125. }
  126. </script>
  127. <style lang="scss" scoped>
  128. .modify-user {
  129. width: 750rpx;
  130. min-height: 100vh;
  131. // background-color: black;
  132. margin: 0 auto;
  133. background-size: 100%;
  134. background-repeat: no-repeat;
  135. .content {
  136. width: 96%;
  137. margin: 0 auto;
  138. }
  139. .edit-user {
  140. padding-top: 20rpx;
  141. .edit-list {
  142. .edit-item {
  143. box-sizing: border-box;
  144. padding: 15rpx;
  145. display: flex;
  146. align-items: center;
  147. border-bottom: 1px solid #33333333;
  148. .title {
  149. color: $uni-text-color;
  150. font-size: 28rpx;
  151. margin-top: 10rpx;
  152. min-width: 25%;
  153. }
  154. input {
  155. color: $uni-text-color;
  156. text-indent: 1em;
  157. height: 60rpx;
  158. font-size: 28rpx;
  159. margin-top: 15rpx;
  160. }
  161. }
  162. }
  163. }
  164. .confirm {
  165. display: flex;
  166. align-items: center;
  167. justify-content: center;
  168. background: $uni-bg-color-app;
  169. margin: 30rpx auto;
  170. border-radius: 20rpx;
  171. height: 100rpx;
  172. font-size: 35rpx;
  173. font-weight: bold;
  174. color: $uni-text-color-inverse;
  175. }
  176. .tips {
  177. color: rgb(191, 118, 112);
  178. text-align: center;
  179. font-size: 26rpx;
  180. padding: 0rpx 20rpx;
  181. box-sizing: border-box;
  182. }
  183. }
  184. </style>