init.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <template>
  2. <view class="window-box container-box">
  3. <view class="flow-box" @click="changeStep">
  4. <view class="flow-info">
  5. <view class="flow-info-item">
  6. <image :src="`${imgUrl}/start_img_web.png`" />
  7. <view>网络检测</view>
  8. </view>
  9. <view class="flow-info-item">
  10. <image :src="curStep > 1 ? `${imgUrl}/start_img_log_selected.png` : `${imgUrl}/start_img_log_disabled.png`" />
  11. <view>登陆</view>
  12. </view>
  13. <view class="flow-info-item">
  14. <image
  15. :src="curStep > 2 ? `${imgUrl}/start_img_system_selected.png` : `${imgUrl}/start_img_system_disabled.png`" />
  16. <view>进入系统</view>
  17. </view>
  18. </view>
  19. <view class="flow-step">
  20. <view v-if="curStep == 1" class="flow-step-item flow-step-item1">1</view>
  21. <image v-else :src="`${imgUrl}/start_icon_done_blue.png`" />
  22. <view class="flow-step-point" :class="curStep > 1 ? 'flow-step-point-active1' : ''">········</view>
  23. <view v-if="curStep == 1" class="flow-step-item">2</view>
  24. <view v-else-if="curStep == 2" class="flow-step-item flow-step-item2">2</view>
  25. <image v-else :src="`${imgUrl}/start_icon_done_green.png`" />
  26. <view class="flow-step-point" :class="curStep > 2 ? 'flow-step-point-active2' : ''">········</view>
  27. <view v-if="curStep < 3" class="flow-step-item">3</view>
  28. <view v-else-if="curStep == 3" class="flow-step-item flow-step-item3">3</view>
  29. <image v-else :src="`${imgUrl}/start_icon_done_yellow.png`" />
  30. </view>
  31. </view>
  32. <view class="info-box">
  33. <view v-if="curStep == 1" class="step1-box">
  34. <image :src="`${imgUrl}/start_img_default.png`" />
  35. <view class="tips-box">
  36. <view class="tips">暂无网络连接,请重试</view>
  37. <view class="btn btn-primary" @click="toSelect">重新检测</view>
  38. </view>
  39. </view>
  40. <view v-else-if="curStep == 2" class="step2-box">
  41. <uv-input placeholder="请输入设备码" border="surround" fontSize="28upx" height="97upx" v-model="loginForm.mac"
  42. class="step2-input"></uv-input>
  43. <uv-input placeholder="请输入密码" border="surround" fontSize="28upx" v-model="loginForm.pwd" password="true"
  44. class="step2-input"></uv-input>
  45. <view style="display: flex;">
  46. <view class="btn btn-green" @click="toSelect">登录</view>
  47. </view>
  48. </view>
  49. <view v-else class="step3-box">
  50. <image :src="`${imgUrl}/start_img_system.png`" />
  51. <view class="tips-box">
  52. <view class="tips">正在进入系统中,请耐心等待...</view>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </template>
  58. <script setup>
  59. import { onActivated, onMounted, reactive, ref } from "vue";
  60. import config from "@/utils/config";
  61. const imgUrl = ref('/static/image/bmi-init')
  62. const curStep = ref(1)
  63. const loginForm = ref({
  64. mac: '',
  65. pwd: ''
  66. })
  67. const changeStep = () => {
  68. curStep.value += 1
  69. }
  70. // 挂载完成之后
  71. onMounted(() => {
  72. })
  73. </script>
  74. <style scoped>
  75. .btn {
  76. width: 480upx;
  77. border-radius: 21upx;
  78. margin: 0 auto;
  79. }
  80. .flow-box {
  81. margin: 50upx auto 0;
  82. width: 650upx;
  83. }
  84. .flow-info {
  85. display: flex;
  86. justify-content: space-between;
  87. }
  88. .flow-info-item {
  89. width: 200upx;
  90. height: 230upx;
  91. position: relative;
  92. border-radius: 21upx;
  93. }
  94. .flow-info-item view {
  95. text-align: center;
  96. font-weight: bold;
  97. font-size: 35upx;
  98. color: #FFF;
  99. margin-top: 24upx;
  100. z-index: 9;
  101. width: 200upx;
  102. height: 230upx;
  103. position: absolute;
  104. }
  105. .flow-info image {
  106. width: 200upx;
  107. height: 230upx;
  108. position: absolute;
  109. border-radius: 21upx;
  110. }
  111. .flow-step {
  112. display: flex;
  113. width: 550upx;
  114. line-height: 70upx;
  115. justify-content: space-around;
  116. margin: 20upx auto 0;
  117. }
  118. .flow-step-item {
  119. width: 70upx;
  120. height: 70upx;
  121. text-align: center;
  122. font-weight: bold;
  123. font-size: 35upx;
  124. border-radius: 50%;
  125. border: 8upx solid #D9D9D9;
  126. background: #fff;
  127. color: #D9D9D9;
  128. }
  129. .flow-step image {
  130. height: 86upx;
  131. width: 86upx;
  132. position: relative;
  133. }
  134. .flow-step-item1 {
  135. border: 8upx solid rgb(205, 223, 252);
  136. background: #2F87F5;
  137. color: #fff;
  138. }
  139. .flow-step-item2 {
  140. border: 8upx solid rgb(183, 232, 227);
  141. background: #01CF7A;
  142. color: #fff;
  143. }
  144. .flow-step-item3 {
  145. border: 8upx solid rgb(236, 230, 218);
  146. background: #FFC64D;
  147. color: #fff;
  148. }
  149. .flow-step-point {
  150. font-size: 40upx;
  151. font-weight: 700;
  152. position: relative;
  153. top: 10upx;
  154. color: #D9D9D9;
  155. }
  156. .flow-step-point-active1 {
  157. color: #0369E8;
  158. }
  159. .flow-step-point-active2 {
  160. color: #01CF7A;
  161. }
  162. .info-box {
  163. background: #fff;
  164. width: 650upx;
  165. height: 650upx;
  166. border-radius: 35upx;
  167. margin: 20upx auto 0;
  168. }
  169. .container-box {
  170. background-image: url('/static/image/bmi-init/img_bg.png');
  171. background-repeat: repeat-x;
  172. }
  173. .step2-box {
  174. width: 650upx;
  175. height: 650upx;
  176. padding-top: 60upx;
  177. box-sizing: border-box;
  178. }
  179. .step1-box image {
  180. width: 490upx;
  181. height: 313upx;
  182. margin: 0 auto 0;
  183. padding-top: 40upx;
  184. display: block;
  185. }
  186. .step3-box image {
  187. width: 479upx;
  188. height: 479upx;
  189. margin: 0 auto 0;
  190. padding-top: 40upx;
  191. display: block;
  192. }
  193. .tips-box {
  194. display: flex;
  195. flex-direction: column;
  196. }
  197. .tips {
  198. font-size: 21rpx;
  199. color: #6F6F6F;
  200. text-align: center;
  201. margin: 30upx 0;
  202. }
  203. .step2-box .step2-input {
  204. width: 547upx;
  205. height: 97upx !important;
  206. background: #FFFFFF;
  207. border-width: 3upx !important;
  208. border-color: #01CF7A !important;
  209. font-size: 28upx;
  210. color: #6F6F6F;
  211. border-radius: 20upx !important;
  212. line-height: 97upx !important;
  213. margin: 0 auto 60upx;
  214. }
  215. .btn-green {
  216. color: #FFFFFF;
  217. background: #01CF7A;
  218. border-color: #01CF7A;
  219. margin: 0 auto;
  220. }
  221. </style>