init.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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 { navTo, showToast } from "@/utils/app";
  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. if(curStep.value == 5){
  70. navTo('pages/index/index', {
  71. })
  72. }
  73. }
  74. // 挂载完成之后
  75. onMounted(() => {
  76. })
  77. </script>
  78. <style scoped>
  79. .btn {
  80. width: 480upx;
  81. border-radius: 21upx;
  82. margin: 0 auto;
  83. }
  84. .flow-box {
  85. margin: 50upx auto 0;
  86. width: 650upx;
  87. }
  88. .flow-info {
  89. display: flex;
  90. justify-content: space-between;
  91. }
  92. .flow-info-item {
  93. width: 200upx;
  94. height: 230upx;
  95. position: relative;
  96. border-radius: 21upx;
  97. }
  98. .flow-info-item view {
  99. text-align: center;
  100. font-weight: bold;
  101. font-size: 35upx;
  102. color: #FFF;
  103. margin-top: 24upx;
  104. z-index: 9;
  105. width: 200upx;
  106. height: 230upx;
  107. position: absolute;
  108. }
  109. .flow-info image {
  110. width: 200upx;
  111. height: 230upx;
  112. position: absolute;
  113. border-radius: 21upx;
  114. }
  115. .flow-step {
  116. display: flex;
  117. width: 550upx;
  118. line-height: 70upx;
  119. justify-content: space-around;
  120. margin: 20upx auto 0;
  121. }
  122. .flow-step-item {
  123. width: 70upx;
  124. height: 70upx;
  125. text-align: center;
  126. font-weight: bold;
  127. font-size: 35upx;
  128. border-radius: 50%;
  129. border: 8upx solid #D9D9D9;
  130. background: #fff;
  131. color: #D9D9D9;
  132. }
  133. .flow-step image {
  134. height: 86upx;
  135. width: 86upx;
  136. position: relative;
  137. }
  138. .flow-step-item1 {
  139. border: 8upx solid rgb(205, 223, 252);
  140. background: #2F87F5;
  141. color: #fff;
  142. }
  143. .flow-step-item2 {
  144. border: 8upx solid rgb(183, 232, 227);
  145. background: #01CF7A;
  146. color: #fff;
  147. }
  148. .flow-step-item3 {
  149. border: 8upx solid rgb(236, 230, 218);
  150. background: #FFC64D;
  151. color: #fff;
  152. }
  153. .flow-step-point {
  154. font-size: 40upx;
  155. font-weight: 700;
  156. position: relative;
  157. top: 10upx;
  158. color: #D9D9D9;
  159. }
  160. .flow-step-point-active1 {
  161. color: #0369E8;
  162. }
  163. .flow-step-point-active2 {
  164. color: #01CF7A;
  165. }
  166. .info-box {
  167. background: #fff;
  168. width: 650upx;
  169. height: 650upx;
  170. border-radius: 35upx;
  171. margin: 20upx auto 0;
  172. }
  173. .container-box {
  174. background-image: url('/static/image/bmi-init/img_bg.png');
  175. background-repeat: repeat-x;
  176. }
  177. .step2-box {
  178. width: 650upx;
  179. height: 650upx;
  180. padding-top: 60upx;
  181. box-sizing: border-box;
  182. }
  183. .step1-box image {
  184. width: 490upx;
  185. height: 313upx;
  186. margin: 0 auto 0;
  187. padding-top: 40upx;
  188. display: block;
  189. }
  190. .step3-box image {
  191. width: 479upx;
  192. height: 479upx;
  193. margin: 0 auto 0;
  194. padding-top: 40upx;
  195. display: block;
  196. }
  197. .tips-box {
  198. display: flex;
  199. flex-direction: column;
  200. }
  201. .tips {
  202. font-size: 21rpx;
  203. color: #6F6F6F;
  204. text-align: center;
  205. margin: 30upx 0;
  206. }
  207. .step2-box .step2-input {
  208. width: 547upx;
  209. height: 97upx !important;
  210. background: #FFFFFF;
  211. border-width: 3upx !important;
  212. border-color: #01CF7A !important;
  213. font-size: 28upx;
  214. color: #6F6F6F;
  215. border-radius: 20upx !important;
  216. line-height: 97upx !important;
  217. margin: 0 auto 60upx;
  218. }
  219. .btn-green {
  220. color: #FFFFFF;
  221. background: #01CF7A;
  222. border-color: #01CF7A;
  223. margin: 0 auto;
  224. }
  225. </style>