success.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. <template>
  2. <view class="content">
  3. <!-- 个人信息 -->
  4. <view class="blur-bg-2"></view>
  5. <view class="top-btn">
  6. <view class="back x-c" @click="$navBack()">
  7. <image src='/static/image/new/icon_back.svg'></image>
  8. 返回
  9. </view>
  10. <view class="title x-c">
  11. <image src='/static/image/new/img_title1.svg'></image>
  12. <text>信息采集</text>
  13. <image src='/static/image/new/img_title2.svg'></image>
  14. </view>
  15. <view class="index x-c" @click="goIndex">
  16. <image src='/static/image/new/icon_home.svg'></image>
  17. 首页
  18. </view>
  19. </view>
  20. <view class="userBox y-bc">
  21. <view class="successBox">
  22. <image src='/static/image/new/img_finish.svg'></image>
  23. <view class="title">信息采集完成</view>
  24. <view class="text">接下来,我开始为您做健康检测啦~</view>
  25. </view>
  26. <view class="stepBox">
  27. <view class="title">检测环节</view>
  28. <view class="stepInfo x-bc">
  29. <view class="step y-c">
  30. <image src='/static/image/new/icon_face.svg'></image>
  31. <text>面诊</text>
  32. </view>
  33. <image class="arrow" src='/static/image/new/icon_arrow.svg'></image>
  34. <view class="step y-c">
  35. <image src='/static/image/new/icon_tone.svg'></image>
  36. <text>舌诊</text>
  37. </view>
  38. <image class="arrow" src='/static/image/new/icon_arrow.svg'></image>
  39. <view class="step y-c">
  40. <image src='/static/image/new/icon_question.svg'></image>
  41. <text>问诊</text>
  42. </view>
  43. <image class="arrow" src='/static/image/new/icon_arrow.svg'></image>
  44. <view class="step y-c">
  45. <image src='/static/image/new/icon_hand.svg'></image>
  46. <text>脉诊</text>
  47. </view>
  48. </view>
  49. </view>
  50. <view class="btnBox">
  51. <view class="timer">即将开始检测 {{countDown}}s</view>
  52. <view class="btn" @click="goTest">立即开始</view>
  53. </view>
  54. </view>
  55. </view>
  56. </template>
  57. <script>
  58. import {
  59. getUserInfoByUserId,
  60. getUserInfo
  61. } from '@/api/user.js';
  62. export default {
  63. data() {
  64. return {
  65. countDown: 5, // 初始倒计时5秒
  66. timer: null // 定时器标识
  67. }
  68. },
  69. onLoad(option) {
  70. this.startCountDown();
  71. },
  72. onShow() {
  73. if (this.countDown <= 0) {
  74. this.countDown = 5;
  75. this.startCountDown();
  76. }
  77. },
  78. onUnload() {
  79. // 页面销毁时清除定时器,避免内存泄漏
  80. clearInterval(this.timer);
  81. this.timer = null;
  82. },
  83. methods: {
  84. // 倒计时逻辑
  85. startCountDown() {
  86. this.timer = setInterval(() => {
  87. if (this.countDown > 0) {
  88. this.countDown--;
  89. } else {
  90. // 倒计时结束,清除定时器
  91. clearInterval(this.timer);
  92. this.timer = null;
  93. // uni.navigateTo({
  94. // url:"/pages/device/tongue/facePhoto"
  95. // });
  96. }
  97. }, 1000);
  98. },
  99. //首页
  100. goIndex(){
  101. uni.reLaunch({
  102. url: '/pages/index/index',
  103. animationType: 'none',
  104. animationDuration: 2000
  105. })
  106. },
  107. // 性别切换
  108. genderChange(sex) {
  109. this.form.sex = sex;
  110. },
  111. // 设置输入框高亮状态
  112. setHighlight(field, status) {
  113. this.$set(this.highlightStatus, field, status);
  114. },
  115. // 确认提交
  116. goTest(){
  117. uni.navigateTo({
  118. url:"/pages/device/tongue/facePhoto"
  119. });
  120. },
  121. }
  122. }
  123. </script>
  124. <style scoped lang="scss">
  125. page {
  126. background: #fff;
  127. font-size: 16px
  128. }
  129. .content {
  130. width: 100%;
  131. height: 100vh;
  132. background: #D8F6EF;
  133. padding: 28px;
  134. display: flex;
  135. flex-direction: column;
  136. .blur-bg-2 {
  137. width: 350px;
  138. height: 350px;
  139. background: #FFFDCC;
  140. // opacity: 0.47;
  141. filter: blur(200px);
  142. position: absolute;
  143. z-index: 1;
  144. top: 60px;
  145. right: calc(0px - 107px);
  146. pointer-events: none
  147. }
  148. }
  149. .top-btn {
  150. display: flex;
  151. align-items: center;
  152. justify-content: space-between;
  153. z-index:2;
  154. .back {
  155. width: 140px;
  156. height: 48px;
  157. background: rgba(255, 255, 255, 0.64);
  158. border-radius: 45px 45px 45px 45px;
  159. border: 2px solid #FFFFFF;
  160. font-family: PingFang SC, PingFang SC;
  161. font-weight: 500;
  162. font-size: 22px;
  163. color: #327E6F;
  164. image {
  165. margin-right: 4px;
  166. width: 24px;
  167. height: 24px;
  168. }
  169. }
  170. .title {
  171. font-family: PingFang SC, PingFang SC;
  172. font-weight: 600;
  173. font-size: 36px;
  174. color: #327E6F;
  175. line-height: 54px;
  176. text {
  177. margin: 0 14px;
  178. }
  179. image {
  180. width: 153px;
  181. height: 25px;
  182. }
  183. }
  184. .index {
  185. width: 140px;
  186. height: 48px;
  187. background: rgba(255, 255, 255, 0.64);
  188. border-radius: 55px 55px 55px 55px;
  189. border: 2px solid #FFFFFF;
  190. font-family: PingFang SC, PingFang SC;
  191. font-weight: 500;
  192. font-size: 22px;
  193. color: #327E6F;
  194. image {
  195. margin-right: 4px;
  196. width: 24px;
  197. height: 24px;
  198. }
  199. }
  200. }
  201. .userBox {
  202. flex: 1;
  203. margin-top: 28px;
  204. background: rgba(255, 255, 255, 0.7);
  205. border-radius: 24px 24px 24px 24px;
  206. padding: 27px 40px;
  207. z-index: 9;
  208. .successBox{
  209. display: flex;
  210. align-items: center;
  211. flex-direction: column;
  212. margin-top: 80px;
  213. image{
  214. width: 99px;
  215. height: 99px;
  216. }
  217. .title{
  218. margin-top: 42px;
  219. width: 468px;
  220. height: 57px;
  221. line-height: 57px;
  222. text-align: center;
  223. font-family: PingFang SC, PingFang SC;
  224. font-weight: 500;
  225. font-size: 35px;
  226. color: #333333;
  227. background-image:url(/static/image/new/img_cloud.svg);
  228. background-repeat: no-repeat;
  229. position: relative;
  230. background-size: 100% 100%;
  231. }
  232. .text{
  233. margin-top: 11px;
  234. font-family: PingFang SC, PingFang SC;
  235. font-weight: 400;
  236. font-size: 28px;
  237. color: #333333;
  238. }
  239. }
  240. .stepBox{
  241. display: flex;
  242. align-items: center;
  243. flex-direction: column;
  244. justify-content: center;
  245. width: 525px;
  246. height: 220px;
  247. background-image:url(/static/image/new/bg_step.svg);
  248. background-repeat: no-repeat;
  249. position: relative;
  250. background-size: 100% 100%;
  251. .title{
  252. position: absolute;
  253. top:-21px;
  254. width: 170px;
  255. height: 42px;
  256. display: flex;
  257. align-items: center;
  258. justify-content: center;
  259. background-image:url(/static/image/new/bg_title.svg);
  260. background-repeat: no-repeat;
  261. background-size: 100% 100%;
  262. font-family: PingFang SC, PingFang SC;
  263. font-weight: 500;
  264. font-size: 24px;
  265. color: #FFFFFF;
  266. }
  267. .arrow{
  268. width: 27px;
  269. height: 19px;
  270. margin: 0 12px;
  271. padding-top: 22px;
  272. }
  273. .step{
  274. image{
  275. width: 64px;
  276. height: 64px;
  277. }
  278. text{
  279. margin-top: 15px;
  280. font-family: PingFang SC, PingFang SC;
  281. font-weight: 400;
  282. font-size: 24px;
  283. color: #333333;
  284. }
  285. }
  286. }
  287. .btnBox{
  288. display: flex;
  289. align-items: center;
  290. flex-direction: column;
  291. .timer{
  292. font-family: PingFang SC, PingFang SC;
  293. font-weight: 400;
  294. font-size: 24px;
  295. color: #37C3A0;
  296. animation: pulse 1s infinite alternate;
  297. }
  298. .btn {
  299. margin-top: 28px;
  300. margin-bottom: 16px;
  301. display: flex;
  302. align-items: center;
  303. justify-content: center;
  304. width: 360px;
  305. height: 68px;
  306. background: #37C3A0;
  307. border-radius: 121px 121px 121px 121px;
  308. font-family: PingFang SC, PingFang SC;
  309. font-weight: 600;
  310. font-size: 28px;
  311. color: #FFFFFF;
  312. }
  313. }
  314. }
  315. @keyframes pulse {
  316. from { opacity: 0.8; }
  317. to { opacity: 1; }
  318. }
  319. </style>