金诚优选前端代码
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.

80 lines
1.4 KiB

  1. <template>
  2. <view class="page">
  3. <view class="content">
  4. <view class="title">请设置6位支付密码</view>
  5. <view class="password">
  6. <lf-jp-coded :width="686" @inputVal="inputVal"></lf-jp-coded>
  7. </view>
  8. </view>
  9. <button class="btn" hover-class="lf-opacity" @click="comfirm">确认</button>
  10. </view>
  11. </template>
  12. <script>
  13. import lfJpCoded from '@/components/lf-jpCoded/lf-jpCoded.vue'
  14. export default {
  15. components: {
  16. lfJpCoded
  17. },
  18. data(){
  19. return {
  20. code: ''
  21. }
  22. },
  23. created(){
  24. },
  25. methods: {
  26. inputVal(event){
  27. this.code = event;
  28. },
  29. comfirm(){
  30. if(this.code.length < 6){
  31. return this.$msg('请输入完整支付密码');
  32. }
  33. this.$emit('comfirm', this.code);
  34. }
  35. }
  36. }
  37. </script>
  38. <style lang="scss" scoped="scoped">
  39. .page{
  40. width: 750rpx;
  41. height: 100vh;
  42. position: fixed;
  43. top: 0;
  44. left: 0;
  45. background-color: #FFFFFF;
  46. z-index: 999;
  47. }
  48. .content{
  49. height: max-content;
  50. width: 750rpx;
  51. box-sizing: border-box;
  52. padding: 0rpx 32rpx 0;
  53. position: absolute;
  54. top: 350rpx;
  55. left: 0;
  56. .title{
  57. font-size: 28rpx;
  58. color: #222222;
  59. text-align: center;
  60. }
  61. .password{
  62. height: 100rpx;
  63. margin-top: 50rpx;
  64. }
  65. }
  66. .btn{
  67. position: absolute;
  68. width: 550rpx;
  69. height: 100rpx;
  70. background: #15716E;
  71. border-radius: 50rpx;
  72. bottom: 10vh;
  73. left: calc(50% - 275rpx);
  74. line-height: 100rpx;
  75. color: #FFFFFF;
  76. }
  77. </style>