智慧画屏客户端
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.

143 lines
3.6 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <template>
  2. <view class="main_container">
  3. <Header></Header>
  4. <view class="login-bind">
  5. <view class="bind">
  6. <text class="bind-title">设备信息</text>
  7. <form @submit="bindSubmit">
  8. <view class="uni-form-item uni-column">
  9. <view class="title">设备账号</view>
  10. <input class="uni-input" v-model="account" name="account" type="text" placeholder="设备账号" disabled />
  11. </view>
  12. <view class="uni-form-item uni-column">
  13. <view class="title">设备名称</view>
  14. <input class="uni-input" name="name" placeholder="设备名称" />
  15. </view>
  16. <view class="uni-form-item uni-column" @click.native.stop="radioDirection = !radioDirection">
  17. <view class="bind-radio-label" >
  18. <view class="title" >选择设备方向</view>
  19. <image class="select_img" src="../../static/images/bind-select.png"></image>
  20. </view>
  21. <view v-show="radioDirection" class="device_radio">
  22. <radio-group name="device_direction">
  23. <label class="radio"><radio value="0" checked="true" />竖屏</label>
  24. <label class="radio"><radio value="1" />横屏</label>
  25. </radio-group>
  26. </view>
  27. </view>
  28. <view class="uni-btn-v"><button class="uni-login-btn" form-type="submit">授权绑定</button></view>
  29. </form>
  30. </view>
  31. </view>
  32. <view class="login_bg"></view>
  33. </view>
  34. </template>
  35. <script>
  36. import Header from '@/pages/header.vue'
  37. export default {
  38. components: {
  39. Header
  40. },
  41. data() {
  42. return {
  43. account: '1234568736',
  44. radioDirection: false
  45. };
  46. },
  47. mounted(){
  48. // this.account = this.account.slice(-8)
  49. },
  50. methods: {
  51. bindSubmit: function(e){
  52. console.log(this.account.substring(this.account.length-8, this.account.length))
  53. console.log(this.account.slice(-8))
  54. console.log('bindform发生了submit事件,携带数据为:' + JSON.stringify(e.detail.value));
  55. }
  56. }
  57. };
  58. </script>
  59. <style scoped>
  60. .bind-title{
  61. display: block;
  62. margin-bottom: 37.5rpx;
  63. font-size: 37.5rpx;
  64. font-weight: bold;
  65. color: #333;
  66. text-align: center;
  67. }
  68. .bind .uni-form-item{
  69. position: relative;
  70. display: flex;
  71. justify-content: space-between;
  72. width: 409.72rpx;
  73. height: 86.11rpx;
  74. padding: 0 55.55rpx;
  75. line-height: 86.11rpx;
  76. margin-bottom: 27.77rpx;
  77. font-size: 27.77rpx;
  78. background-color: #f6f6f6;
  79. border-radius: 86.11rpx;
  80. }
  81. .bind .uni-form-item .title{
  82. min-width: 138.88rpx;
  83. }
  84. .bind-radio-label{
  85. display: flex;
  86. justify-content: space-between;
  87. width: 100%;
  88. }
  89. .bind .uni-input{
  90. width: auto;
  91. height: 86.11rpx;
  92. font-size: 27.77rpx;
  93. }
  94. .select_img{
  95. display: block;
  96. width: 21.52rpx;
  97. height: 13.88rpx;
  98. margin-top: 36.8rpx;
  99. }
  100. .device_radio{
  101. position: absolute;
  102. bottom: -145.83rpx;
  103. left: 0;
  104. z-index: 99;
  105. }
  106. .device_radio uni-radio-group{
  107. width: 520.83rpx;
  108. height: 145.83rpx;
  109. display: flex;
  110. justify-content: center;
  111. align-items: center;
  112. font-size: 25rpx;
  113. background-color: #FFFFFF;
  114. border-radius: 13.88rpx;
  115. box-shadow: 0 0 24rpx 2rpx rgba(0, 0, 0, 0.15);
  116. }
  117. .device_radio .radio {
  118. width: 50%;
  119. text-align: center;
  120. }
  121. .device_radio /deep/ uni-radio .uni-radio-input{
  122. width: 27.77rpx;
  123. height: 27.77rpx;
  124. background: url(../../static/images/an-wx.png) no-repeat left top;
  125. background-size: 100% 100%;
  126. border: none;
  127. }
  128. .device_radio /deep/ uni-radio .uni-radio-input.uni-radio-input-checked{
  129. background: none !important;
  130. border: none !important;
  131. }
  132. .device_radio /deep/ uni-radio .uni-radio-input.uni-radio-input-checked:before{
  133. content: "";
  134. width: 27.77rpx;
  135. height: 27.77rpx;
  136. background: url(../../static/images/an-xz.png) no-repeat left top;
  137. background-size: 100% 100%;
  138. transform: translate(-50%,-50%) scale(1);
  139. }
  140. </style>