index.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <template>
  2. <view class="passwordset-content" :style="{'--status-bar-': statusBarHeight}">
  3. <view class="passwordset-content-info">
  4. <!-- 头部主要内容 开始 -->
  5. <view class="passwordset-content-header">
  6. <customNavbar
  7. title="支付密码设置"
  8. bgColor="var(--gd-bgm-color)"
  9. :contentStyle="{color: '#fff'}"
  10. :leftStyle="{color: '#fff'}"
  11. ></customNavbar>
  12. </view>
  13. <!-- 头部主要内容 结束 -->
  14. <!-- userInfo内容 开始 -->
  15. <view class="passwordset-content-password">
  16. <text>{{ tip[actionIndex] }}</text>
  17. <view>
  18. <u-code-input v-model="value" @finish="finish" :focus="true" dot></u-code-input>
  19. </view>
  20. </view>
  21. <!-- userInfo内容 结束 -->
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. import { navigateTo } from "@/utils/util.js"
  27. export default {
  28. data() {
  29. return {
  30. title: '这是我的',
  31. statusBarHeight: 0, // 状态栏安全距离
  32. value: "",
  33. tip: ["输入当前密码,已确认身份","设置六位数数字密码","再次输入"],
  34. actionIndex: 0
  35. }
  36. },
  37. onLoad() {
  38. },
  39. onShow() {
  40. this.statusBarHeight = getApp().globalData.statusBarHeight
  41. },
  42. methods: {
  43. /**
  44. * @author ygh
  45. * @data 2023-12-20
  46. */
  47. navigateToFun(item){
  48. navigateTo(item.url)
  49. },
  50. finish(){
  51. uni.showLoading({
  52. title: "认证中..."
  53. })
  54. setTimeout(()=>{
  55. this.actionIndex += 1
  56. this.value = ''
  57. uni.hideLoading({
  58. })
  59. },2000)
  60. }
  61. }
  62. }
  63. </script>
  64. <style lang="scss" scoped>
  65. .passwordset-content {
  66. display: flex;
  67. flex-direction: column;
  68. align-items: center;
  69. justify-content: center;
  70. --header-h: 90rpx;
  71. .passwordset-content-info {
  72. width: 100%;
  73. box-sizing: border-box;
  74. }
  75. }
  76. /** 头部主要内容 开始 */
  77. .passwordset-content-header {
  78. width: 100%;
  79. height: var(--header-h);
  80. box-sizing: border-box;
  81. ::v-deep .u-search {
  82. padding: 0 30rpx !important;
  83. }
  84. ::v-deep .u-search__action {
  85. color: #fff !important;
  86. }
  87. }
  88. /** 头部主要内容 结束 **/
  89. /** password内容 开始 */
  90. .passwordset-content-password {
  91. width: 100%;
  92. padding: 40rpx 40rpx 0;
  93. box-sizing: border-box;
  94. display: flex;
  95. flex-direction: column;
  96. justify-content: center;
  97. >text {
  98. text-align: center;
  99. }
  100. >view {
  101. margin-top: 40rpx;
  102. display: flex;
  103. justify-content: center;
  104. }
  105. }
  106. /** password内容 结束 */
  107. </style>