风险测评小程序前端代码仓库
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.

161 lines
3.5 KiB

15 hours ago
15 hours ago
15 hours ago
15 hours ago
  1. <template>
  2. <view class="page__view">
  3. <navbar :title="configList.page_answer_title" leftClick @leftClick="$utils.navigateBack" bgColor="transparent" />
  4. <view class="main">
  5. <view class="card">
  6. <view class="flex flex-column card-header">
  7. <text>{{ configList.page_answer_choose_title.replace(/\\n/g,'\n') }}</text>
  8. </view>
  9. <view class="card-content list">
  10. <uv-checkbox-group
  11. v-model="selectedArr"
  12. shape="circle"
  13. >
  14. <view class="flex list-item" v-for="item in list" :key="item.id">
  15. <view class="flex left">
  16. <image class="icon" src="@/static/image/icon.png" mode="widthFix"></image>
  17. <view>{{ item.title }}</view>
  18. </view>
  19. <view>
  20. <uv-checkbox
  21. size="40rpx"
  22. icon-size="40rpx"
  23. activeColor="#014FA2"
  24. :name="item.id"
  25. ></uv-checkbox>
  26. </view>
  27. </view>
  28. </uv-checkbox-group>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="bottom">
  33. <button class="btn" @click="onStart">开始答题</button>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. import mixinsList from '@/mixins/list.js'
  39. export default {
  40. mixins: [mixinsList],
  41. data() {
  42. return {
  43. list: [],
  44. selectedArr: [],
  45. mixinsListApi: 'queryCategoryList',
  46. }
  47. },
  48. computed: {
  49. },
  50. onLoad() {
  51. },
  52. methods: {
  53. onStart() {
  54. if (!this.selectedArr.length) {
  55. uni.showToast({
  56. title: this.configList.page_answer_choose_tips,
  57. icon:'none'
  58. })
  59. return
  60. }
  61. let ids = this.selectedArr.join(';')
  62. uni.redirectTo({
  63. url: `/pages_order/test/answer?ids=${ids}`
  64. })
  65. },
  66. },
  67. }
  68. </script>
  69. <style scoped lang="scss">
  70. .page__view {
  71. width: 100vw;
  72. min-height: 100vh;
  73. background: linear-gradient(164deg, #014FA2, #014FA2, #2E8AED);
  74. position: relative;
  75. }
  76. .main {
  77. width: 100%;
  78. padding: 54rpx 36rpx;
  79. padding-bottom: calc(env(safe-area-inset-bottom) + 152rpx + 73rpx);
  80. box-sizing: border-box;
  81. }
  82. .card {
  83. padding: 34rpx 43rpx 34rpx 19rpx;
  84. background: linear-gradient(rgba($color: #3381D4, $alpha: 0.50), rgba($color: #FCFDFE, $alpha: 0.90) 281rpx, rgba($color: #FCFDFE, $alpha: 0.90));
  85. border-radius: 25rpx;
  86. // border: 3rpx solid #FFFFFF;
  87. box-shadow: 0rpx 3rpx 6rpx 0rpx rgba(0,0,0,0.16);
  88. &-header {
  89. white-space: pre-wrap;
  90. align-items: flex-start;
  91. row-gap: 10rpx;
  92. padding: 0 0 27rpx 5rpx;
  93. font-size: 30rpx;
  94. line-height: 1.4;
  95. color: #FFFFFF;
  96. }
  97. &-content {
  98. // padding: 0 16rpx;
  99. }
  100. }
  101. .list {
  102. &-item {
  103. width: 100%;
  104. justify-content: space-between;
  105. padding: 30rpx 42rpx 30rpx 24rpx;
  106. box-sizing: border-box;
  107. font-size: 30rpx;
  108. color: #000000;
  109. background: rgba($color: #62BBFF, $alpha: 0.06);
  110. border-radius: 16rpx;
  111. & + & {
  112. margin-top: 17rpx;
  113. }
  114. .left {
  115. column-gap: 18rpx;
  116. }
  117. .icon {
  118. width: 48rpx;
  119. height: auto;
  120. }
  121. }
  122. }
  123. .bottom {
  124. position: fixed;
  125. left: 0;
  126. bottom: 0;
  127. width: 100%;
  128. padding: 17rpx 72rpx;
  129. padding-bottom: calc(env(safe-area-inset-bottom) + 17rpx);
  130. background: #FFFFFF;
  131. box-sizing: border-box;
  132. .btn {
  133. width: 100%;
  134. padding: 26rpx 0;
  135. font-size: 30rpx;
  136. line-height: 1.4;
  137. color: #FFFFFF;
  138. background: #014FA2;
  139. border-radius: 42rpx;
  140. }
  141. }
  142. </style>