myPassword.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view class="container">
  3. <view class="password_top">
  4. <image mode="aspectFill" src="http://139.9.103.171:1888/img/image/wechat.png"></image>
  5. </view>
  6. <view class="password_bg">
  7. <view class="tips">请妥善保管!</view>
  8. <view class="password"><text class="w200">动态密码:</text><text class="col">{{password}}</text></view>
  9. <view class="date"><text class="w200">有效次数:</text><text class="col">{{valid_count}}次</text></view>
  10. <view class="time"><text class="w200">有效期至:</text><text class="col">{{end_date}}</text></view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. data() {
  17. return {
  18. valid_count: null,
  19. password: null,
  20. end_date: null
  21. };
  22. },
  23. components: {},
  24. props: {},
  25. /**
  26. * 生命周期函数--监听页面加载
  27. */
  28. onLoad: function (options) {
  29. this.setData({
  30. valid_count: options.valid_count || 1,
  31. password: options.password || '123456',
  32. end_date: options.end_date || '2021年1月5日 15点15分'
  33. });
  34. },
  35. methods: {}
  36. };
  37. </script>
  38. <style lang="scss" scoped>
  39. /* pages/myPassword/myPassword.wxss */
  40. .password_top{
  41. text-align: center;
  42. height: 300rpx;
  43. background: $base-btn-color;
  44. padding:80rpx;
  45. }
  46. .password_top image{
  47. width: 160rpx;
  48. height: 160rpx;
  49. border-radius: 50%;
  50. }
  51. .password_bg{
  52. background: #fff;
  53. width: 80%;
  54. border-radius: 10rpx;
  55. position: fixed;
  56. left: 50%;
  57. top: 50%;
  58. transform: translate(-50%,-50%);
  59. padding:40rpx 20rpx;
  60. }
  61. .password_bg view{
  62. line-height: 100rpx;
  63. box-shadow:0px 30rpx 20px -30rpx #e2e2e2;
  64. }
  65. .password_bg view text.w200{
  66. width: 200rpx;
  67. text-align: right;
  68. display: inline-block;
  69. }
  70. .password_bg .tips{
  71. text-align: center;
  72. color: #d24a58;
  73. }
  74. .password_bg .col{
  75. font-size: 700;
  76. color: $base-btn-color;
  77. }
  78. </style>