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.

209 lines
5.1 KiB

11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 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="text" :placeholder="$t('page.modifyUser.payment-placeholder')"
  19. v-model="form.confirmNewPassword" />
  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="text" v-model="form.oldPassword" />
  29. </view>
  30. <view class="edit-item">
  31. <view class="title">{{ $t('page.modifyUser.newPassword') }}</view>
  32. <input type="text" 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/personalInfo/personalInfo'
  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/personalInfo/personalInfo'
  107. }), 1000)
  108. }
  109. })
  110. } else { //修改钱包地址
  111. this.request('editMoneyAddress', {}, {
  112. moneyAddress : this.form.moneyAddress
  113. }).then(res => {
  114. if (res.code == 200) {
  115. uni.$u.toast(this.$t(`message.${res.message}`))
  116. setTimeout(() => uni.navigateTo({
  117. url: '/pages/center/center'
  118. }), 500)
  119. }
  120. })
  121. }
  122. }
  123. }
  124. }
  125. </script>
  126. <style lang="scss" scoped>
  127. .modify-user {
  128. width: 750rpx;
  129. min-height: 100vh;
  130. // background-color: black;
  131. margin: 0 auto;
  132. background-size: 100%;
  133. background-repeat: no-repeat;
  134. .content {
  135. width: 96%;
  136. margin: 0 auto;
  137. }
  138. .edit-user {
  139. padding-top: 20rpx;
  140. .edit-list {
  141. .edit-item {
  142. box-sizing: border-box;
  143. padding: 15rpx;
  144. display: flex;
  145. align-items: center;
  146. border-bottom: 1px solid #33333333;
  147. .title {
  148. color: $uni-text-color;
  149. font-size: 28rpx;
  150. margin-top: 10rpx;
  151. min-width: 25%;
  152. }
  153. input {
  154. color: $uni-text-color;
  155. text-indent: 1em;
  156. height: 60rpx;
  157. font-size: 28rpx;
  158. margin-top: 15rpx;
  159. }
  160. }
  161. }
  162. }
  163. .confirm {
  164. display: flex;
  165. align-items: center;
  166. justify-content: center;
  167. background: $uni-bg-color-app;
  168. margin: 30rpx auto;
  169. border-radius: 20rpx;
  170. height: 100rpx;
  171. font-size: 35rpx;
  172. font-weight: bold;
  173. color: $uni-text-color-inverse;
  174. }
  175. .tips {
  176. color: rgb(191, 118, 112);
  177. text-align: center;
  178. font-size: 26rpx;
  179. padding: 0rpx 20rpx;
  180. box-sizing: border-box;
  181. }
  182. }
  183. </style>