index.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <view class="tabPage" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='设置' :showback="false"></cus-header>
  4. <div class="card">
  5. <div class="item">
  6. <div class="left">上班打卡提醒</div>
  7. <div class="right">
  8. <u-switch v-model="sbRemind" size="48" activeColor="#2E69EB" inactiveColor="#B9C0C8"></u-switch>
  9. </div>
  10. </div>
  11. <div class="item">
  12. <div class="left">提醒时间</div>
  13. <div class="right" @tap="sbShow=true">
  14. <span>上班前{{sbqMinutes}}分钟</span>
  15. <u-icon name="arrow-right" color="#606266" size="28"></u-icon>
  16. </div>
  17. </div>
  18. </div>
  19. <div class="card">
  20. <div class="item">
  21. <div class="left">下班打卡提醒</div>
  22. <div class="right">
  23. <u-switch v-model="xbRemind" size="48" activeColor="#2E69EB" inactiveColor="#B9C0C8"></u-switch>
  24. </div>
  25. </div>
  26. <div class="item">
  27. <div class="left">提醒时间</div>
  28. <div class="right" @tap="xbShow=true">
  29. <span>下班后{{xbhMinutes}}分钟</span>
  30. <u-icon name="arrow-right" color="#606266" size="28"></u-icon>
  31. </div>
  32. </div>
  33. </div>
  34. <u-picker :itemHeight="88" :immediateChange="true" :show="sbShow" :columns="[[5,10,15,20,25,30]]" @confirm="sbConfirm" @close="sbShow=false"></u-picker>
  35. <u-picker :itemHeight="88" :immediateChange="true" :show="xbShow" :columns="[[5,10,15,20,25,30]]" @confirm="xbConfirm" @close="xbShow=false"></u-picker>
  36. <Tabbar :tabbarIndex="2"></Tabbar>
  37. </view>
  38. </template>
  39. <script>
  40. import Tabbar from '@/components/CusTabbar/clock.vue'
  41. export default {
  42. components:{ Tabbar },
  43. data(){
  44. return {
  45. sbRemind:false,
  46. xbRemind:false,
  47. sbShow:false,
  48. xbShow:false,
  49. sbqMinutes:5,
  50. xbhMinutes:5
  51. }
  52. },
  53. methods:{
  54. sbConfirm(e){
  55. this.sbqMinutes = e.value[0];
  56. this.sbShow = false;
  57. },
  58. xbConfirm(e){
  59. this.xbhMinutes = e.value[0];
  60. this.xbShow = false;
  61. }
  62. }
  63. }
  64. </script>
  65. <style scoped lang="less">
  66. .tabPage{
  67. padding: 0 24rpx 188rpx;
  68. background: #F4F8FB;
  69. .card{
  70. background: #FFFFFF;
  71. border-radius: 16rpx;
  72. margin-top: 20rpx;
  73. padding: 0 24rpx;
  74. .item{
  75. height: 120rpx;
  76. display: flex;
  77. align-items: center;
  78. justify-content: space-between;
  79. &:last-child{
  80. border-top: 1rpx solid #EFEFEF;
  81. }
  82. .left{
  83. font-family: PingFangSC, PingFang SC;
  84. font-weight: 400;
  85. font-size: 32rpx;
  86. color: #1D2129;
  87. line-height: 45rpx;
  88. }
  89. .right{
  90. display: flex;
  91. align-items: center;
  92. span{
  93. font-family: PingFangSC, PingFang SC;
  94. font-weight: 400;
  95. font-size: 26rpx;
  96. color: #86909C;
  97. line-height: 37rpx;
  98. margin-right: 10rpx;
  99. }
  100. }
  101. }
  102. }
  103. }
  104. </style>