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

103 lines
2.0 KiB

  1. <template>
  2. <uv-popup
  3. ref="popup"
  4. :overlayOpacity="0.17"
  5. mode="center"
  6. bgColor="none"
  7. :zIndex="1000000"
  8. >
  9. <view class="popup__view">
  10. <view class="header">您还有未完成的题是否继续答题</view>
  11. <view class="flex flex-column content">
  12. <image class="icon" src="@/static/image/icon-unfinish.png" mode="widthFix"></image>
  13. <view>{{ `您还有${unfinishCount}道题未完成` }}</view>
  14. </view>
  15. <view class="flex footer">
  16. <button class="btn" @click="close">取消</button>
  17. <button class="btn btn-primary" @click="onContinue">继续答题</button>
  18. </view>
  19. </view>
  20. </uv-popup>
  21. </template>
  22. <script>
  23. export default {
  24. data() {
  25. return {
  26. detail: {}
  27. }
  28. },
  29. computed: {
  30. unfinishCount() {
  31. const { allNum, finishNum } = this.detail
  32. return allNum - finishNum
  33. },
  34. },
  35. methods: {
  36. open(data) {
  37. this.detail = data
  38. this.$refs.popup.open();
  39. },
  40. close() {
  41. this.$refs.popup.close();
  42. },
  43. onContinue() {
  44. uni.navigateTo({
  45. // url: `/pages_order/test/answer?id=${this.detail.id}&current=${this.detail.current}`,
  46. url: `/pages_order/test/list`,
  47. success: () => {
  48. this.close()
  49. },
  50. })
  51. },
  52. },
  53. }
  54. </script>
  55. <style scoped lang="scss">
  56. .popup__view {
  57. padding: 60rpx 45rpx 53rpx 45rpx;
  58. background: #FFFFFF;
  59. border-radius: 16rpx;
  60. }
  61. .header {
  62. text-align: center;
  63. font-size: 30rpx;
  64. font-weight: 600;
  65. color: #000000;
  66. }
  67. .content {
  68. padding: 90rpx 0 103rpx 0;
  69. row-gap: 24rpx;
  70. font-size: 28rpx;
  71. color: #999999;
  72. .icon {
  73. width: 120rpx;
  74. }
  75. }
  76. .footer {
  77. column-gap: 25rpx;
  78. }
  79. .btn {
  80. flex: 1;
  81. padding: 17rpx 0;
  82. box-sizing: border-box;
  83. font-family: PingFang SC;
  84. font-size: 30rpx;
  85. line-height: 1.4;
  86. color: #014FA2;
  87. border: 3rpx solid #014FA2;
  88. border-radius: 40rpx;
  89. &-primary {
  90. color: #FFFFFF;
  91. background: #014FA2;
  92. }
  93. }
  94. </style>