my-invite.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <view>
  3. <!-- 蒙层 -->
  4. <view class="maskWrapper" v-if="isShowInvite">
  5. <view>
  6. <text>请您从下方列表中,选中一条课程或需求信息,作为邀请的具体内容,发给对方!</text>
  7. </view>
  8. <scroll-view class="scrollVertical" scroll-y>
  9. <radio-group class="chooseList">
  10. <view v-for="(item, index) in item11" :key="index">
  11. <radio class="chooseDetail" @click="clickRadio(item)">
  12. <view class="courseTitle">
  13. <text>课程号</text>
  14. <text class="courseDetail" v-if="item.courseId">{{item.courseId}}</text>
  15. <text class="courseDetail" v-if="item.requireId">{{item.requireId}}</text>
  16. </view>
  17. <view class="courseTitle">
  18. <text>辅导科目</text>
  19. <text class="courseDetail" v-if="item.subject">{{item.subject}}</text>
  20. <text class="courseDetail" v-else>{{item.subjectBig}}/{{item.subjectSmall}}</text>
  21. </view>
  22. </radio>
  23. </view>
  24. </radio-group>
  25. </scroll-view>
  26. <view class="commitAndCancel">
  27. <view class="cancel" @click="cancelChosed">取消</view>
  28. <view class="commit" @click="commitChosed">发送</view>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. name:"my-invite",
  36. data() {
  37. return {
  38. };
  39. },
  40. props: {
  41. isShowInvite: {
  42. type: Boolean,
  43. default: false
  44. },
  45. item11: {
  46. type: Array
  47. }
  48. },
  49. methods: {
  50. cancelChosed() {
  51. this.$emit("cancelChosed")
  52. },
  53. commitChosed() {
  54. this.$emit("commitChosed")
  55. },
  56. clickRadio(course) {
  57. this.$emit("clickRadio", course)
  58. }
  59. }
  60. }
  61. </script>
  62. <style lang="scss">
  63. /* 以下是蒙层样式 */
  64. .maskWrapper{
  65. z-index: 999;
  66. // margin-left: -20rpx;
  67. padding-left: 20rpx;
  68. position: fixed;
  69. height: 55%;
  70. bottom: 0;
  71. background-color: #D1D1D1;
  72. border-top-left-radius: 30rpx;
  73. border-top-right-radius: 30rpx;
  74. }
  75. /* 可滚动区域 */
  76. .scrollVertical{
  77. height: 76%;
  78. }
  79. /* 选项区 */
  80. .chooseList{
  81. display: flex;
  82. flex-direction: column;
  83. }
  84. /* 单个选项样式 */
  85. .chooseDetail{
  86. width: 94%;
  87. padding: 10rpx;
  88. margin: 10rpx 0;
  89. border: 1rpx solid gray;
  90. border-radius: 20rpx;
  91. background-color: #DEEBF7;
  92. }
  93. /* 设置选项与圆圈的距离 */
  94. .courseTitle{
  95. margin-left: 30rpx;
  96. }
  97. /* 课程号、辅导科目详情 */
  98. .courseDetail{
  99. margin-left: 20rpx;
  100. font-weight: bold;
  101. }
  102. /* 底部按钮 */
  103. .commitAndCancel{
  104. display: flex;
  105. width: 100%;
  106. justify-content: space-around;
  107. position: fixed;
  108. bottom: 40rpx;
  109. }
  110. .cancel,
  111. .commit{
  112. font-size: 40rpx;
  113. border: 1rpx solid gray;
  114. padding: 10rpx 60rpx;
  115. border-radius: 40rpx;
  116. background-color: #8FAADC;
  117. color: white;
  118. }
  119. </style>