普兆健康管家前端代码仓库
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.

73 lines
1.5 KiB

  1. <template>
  2. <view class="page__view">
  3. <navbar title="问卷测评" leftClick @leftClick="$utils.navigateBack" color="#191919" bgColor="transparent" />
  4. <view class="main">
  5. <view :class="['step', item.step === current ? 'is-active' : '']" v-for="item in steps" :key="item.step">
  6. <view class="step-zh">{{ `{ ${item.zh} }` }}</view>
  7. <view class="step-en">{{ item.en }}</view>
  8. </view>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. export default {
  14. data() {
  15. return {
  16. current: 0,
  17. steps: [
  18. { step: 0, zh: '基本信息', en: 'Personal Nutrition Survey' },
  19. { step: 1, zh: '营养目标', en: 'Nutritional Goal' },
  20. { step: 2, zh: '生活习惯', en: 'Living habits' },
  21. { step: 3, zh: '身体状况', en: 'Physical condition' },
  22. ],
  23. }
  24. },
  25. onLoad(arg) {
  26. this.current = parseInt(arg.step)
  27. setTimeout(() => {
  28. this.$utils.redirectTo(`/pages_order/report/test/answer?step=${this.current}`)
  29. }, 1500)
  30. }
  31. }
  32. </script>
  33. <style scoped lang="scss">
  34. .page__view {
  35. width: 100vw;
  36. min-height: 100vh;
  37. background-color: $uni-bg-color;
  38. position: relative;
  39. }
  40. .main {
  41. margin-top: 214rpx;
  42. }
  43. .step {
  44. text-align: center;
  45. font-family: PingFang SC;
  46. line-height: 1.4;
  47. color: #989898;
  48. &.is-active {
  49. color: #252545;
  50. }
  51. &-zh {
  52. font-weight: 600;
  53. font-size: 48rpx;
  54. }
  55. &-en {
  56. font-weight: 400;
  57. font-size: 26rpx;
  58. }
  59. & + & {
  60. margin-top: 80rpx;
  61. }
  62. }
  63. </style>