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

216 lines
5.2 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
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 v-if="!isLogin" class="login">
  6. <image class="logo" src="/static/logo.png"></image>
  7. <form @submit="loginSubmit">
  8. <view class="uni-form-item uni-column">
  9. <input class="uni-input" name="phone" type="number" placeholder="登录账号" />
  10. </view>
  11. <view class="uni-form-item uni-column">
  12. <input class="uni-input" name="password" placeholder="密码" password="true" />
  13. </view>
  14. <view class="uni-btn-v"><button class="uni-login-btn" form-type="submit"> </button></view>
  15. </form>
  16. </view>
  17. <view v-else class="bind">
  18. <text class="bind-title">设备信息</text>
  19. <form @submit="bindSubmit">
  20. <view class="uni-form-item uni-column">
  21. <view class="title">设备账号</view>
  22. <input class="uni-input" name="phone" type="text" placeholder="设备账号" disabled />
  23. </view>
  24. <view class="uni-form-item uni-column">
  25. <view class="title">设备名称</view>
  26. <input class="uni-input" name="name" placeholder="设备名称" />
  27. </view>
  28. <view class="uni-form-item uni-column">
  29. <view class="title">选择设备方向</view>
  30. <image class="select_img" src="../../static/images/bind-select.png"></image>
  31. <view class="device_radio">
  32. <radio-group>
  33. <label class="radio"><radio value="r1" checked="true" />竖屏</label>
  34. <label class="radio"><radio value="r2" />横屏</label>
  35. </radio-group>
  36. </view>
  37. </view>
  38. <view class="uni-btn-v"><button class="uni-login-btn" form-type="submit">授权绑定</button></view>
  39. </form>
  40. </view>
  41. </view>
  42. <view class="login_bg"></view>
  43. </view>
  44. </template>
  45. <script>
  46. import Header from '@/pages/header.vue'
  47. export default {
  48. components: {
  49. Header
  50. },
  51. data() {
  52. return {
  53. isLogin: false
  54. };
  55. },
  56. methods: {
  57. loginSubmit: function(e) {
  58. console.log('form发生了submit事件,携带数据为:' + JSON.stringify(e.detail.value));
  59. var formdata = e.detail.value;
  60. // uni.showModal({
  61. // content: '表单数据内容:' + JSON.stringify(formdata),
  62. // showCancel: false
  63. // });
  64. // uni.navigateTo({
  65. // url: '../bind/bind'
  66. // });
  67. this.isLogin = true
  68. },
  69. bindSubmit: function(e){
  70. console.log('bindform发生了submit事件,携带数据为:' + JSON.stringify(e.detail.value));
  71. }
  72. }
  73. };
  74. </script>
  75. <style scoped>
  76. .login_bg {
  77. position: absolute;
  78. top: 50%;
  79. left: 50%;
  80. display: block;
  81. width: 530rpx;
  82. height: 648rpx;
  83. margin: -423rpx 0 0 -265rpx;
  84. background-color: #fcf4e8;
  85. border-radius: 30rpx 30rpx 0 0;
  86. box-shadow: 0 0 24rpx 2rpx rgba(0, 0, 0, 0.15);
  87. z-index: 9;
  88. }
  89. .login-bind {
  90. position: absolute;
  91. top: 50%;
  92. left: 50%;
  93. width: 625rpx;
  94. height: 764rpx;
  95. margin: -382rpx 0 0 -312rpx;
  96. background-color: #fff;
  97. border-radius: 30rpx;
  98. box-shadow: 0 0 24rpx 2rpx rgba(0, 0, 0, 0.15);
  99. z-index: 99;
  100. display: flex;
  101. flex-direction: column;
  102. align-items: center;
  103. justify-content: center;
  104. }
  105. .login{
  106. display: flex;
  107. flex-direction: column;
  108. align-items: center;
  109. justify-content: center;
  110. }
  111. .logo {
  112. width: 278rpx;
  113. height: 52rpx;
  114. margin-bottom: 69.44rpx;
  115. /* margin: 132rpx auto 70rpx auto; */
  116. }
  117. .login .uni-input {
  118. width: 520rpx;
  119. height: 86rpx;
  120. margin-bottom: 41.66rpx;
  121. text-align: center;
  122. border: 1px solid #cbcbcb;
  123. border-radius: 86rpx;
  124. background-color: #f6f6f6;
  125. }
  126. .fouce_txt{
  127. border-color: #363538;
  128. }
  129. .uni-login-btn {
  130. width: 520rpx;
  131. height: 86rpx;
  132. margin-top: 69.44rpx;
  133. font-size: 30.55rpx;
  134. line-height: 86rpx;
  135. background-color: #0096ff;
  136. border-radius: 86rpx;
  137. color: #fff;
  138. }
  139. .bind-title{
  140. display: block;
  141. margin-bottom: 37.5rpx;
  142. font-size: 37.5rpx;
  143. font-weight: bold;
  144. color: #333;
  145. text-align: center;
  146. }
  147. .bind .uni-form-item{
  148. position: relative;
  149. display: flex;
  150. justify-content: space-between;
  151. width: 409.72rpx;
  152. height: 86.11rpx;
  153. padding: 0 55.55rpx;
  154. line-height: 86.11rpx;
  155. margin-bottom: 27.77rpx;
  156. font-size: 27.77rpx;
  157. background-color: #f6f6f6;
  158. border-radius: 86.11rpx;
  159. }
  160. .bind .uni-form-item .title{
  161. min-width: 138.88rpx;
  162. }
  163. .bind .uni-input{
  164. width: auto;
  165. height: 86.11rpx;
  166. font-size: 27.77rpx;
  167. }
  168. .select_img{
  169. display: block;
  170. width: 21.52rpx;
  171. height: 13.88rpx;
  172. margin-top: 36.8rpx;
  173. }
  174. .device_radio{
  175. position: absolute;
  176. bottom: -145.83rpx;
  177. left: 0;
  178. z-index: 99;
  179. }
  180. .device_radio uni-radio-group{
  181. width: 520.83rpx;
  182. height: 145.83rpx;
  183. display: flex;
  184. justify-content: center;
  185. align-items: center;
  186. font-size: 25rpx;
  187. background-color: #FFFFFF;
  188. border-radius: 13.88rpx;
  189. box-shadow: 0 0 24rpx 2rpx rgba(0, 0, 0, 0.15);
  190. }
  191. .device_radio .radio {
  192. width: 50%;
  193. text-align: center;
  194. }
  195. .device_radio /deep/ uni-radio .uni-radio-input{
  196. width: 27.77rpx;
  197. height: 27.77rpx;
  198. background: url(../../static/images/an-wx.png) no-repeat left top;
  199. background-size: 100% 100%;
  200. border: none;
  201. }
  202. .device_radio /deep/ uni-radio .uni-radio-input.uni-radio-input-checked{
  203. background: none !important;
  204. border: none !important;
  205. }
  206. .device_radio /deep/ uni-radio .uni-radio-input.uni-radio-input-checked:before{
  207. content: "";
  208. width: 27.77rpx;
  209. height: 27.77rpx;
  210. background: url(../../static/images/an-xz.png) no-repeat left top;
  211. background-size: 100% 100%;
  212. transform: translate(-50%,-50%) scale(1);
  213. }
  214. </style>