123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- <template>
- <view>
- <!-- 蒙层 -->
- <view class="maskWrapper" v-if="isShowInvite && item11.length != 0">
- <view class="requireText">
- <text>请您从下方列表中,选中一条课程或需求信息,作为邀请的具体内容,发给对方!</text>
- </view>
- <scroll-view class="scrollVertical" scroll-y>
- <radio-group class="chooseList">
- <view v-for="(item, index) in item11" :key="index">
- <radio class="chooseDetail" @click="clickRadio(item)">
- <view class="courseTitle">
- <text>课程号</text>
- <text class="courseDetail" v-if="item.courseId">{{item.courseId}}</text>
- <text class="courseDetail" v-if="item.requireId">{{item.requireId}}</text>
- </view>
- <view class="courseTitle">
- <text>辅导科目</text>
- <text class="courseDetail" v-if="item.subject">{{item.subject}}</text>
- <text class="courseDetail" v-else>{{item.subjectBig}}/{{item.subjectSmall}}</text>
- </view>
- </radio>
- </view>
-
- </radio-group>
- </scroll-view>
- <view class="commitAndCancel">
- <view class="cancel" @click="cancelChosed">取消</view>
- <view class="commit" @click="commitChosed">发送</view>
- </view>
- </view>
- <view class="maskWrapper" v-else-if="isShowInvite && item11.length == 0">
- <view class="requireText">
- <text>您尚未发布课程信息或需求信息,暂不能使用邀请功能。请您先发布课程信息或需求信息并成功上架后再试</text>
- </view>
- <view class="commitAndCancel">
- <view class="cancel-publish" @click="cancelChosed">取消</view>
- <view class="commit-publish" @click="toNav">去发布</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- name:"my-invite",
- data() {
- return {
- };
- },
- props: {
- isShowInvite: {
- type: Boolean,
- default: false
- },
- item11: {
- type: Array
- }
- },
- methods: {
- cancelChosed() {
- this.$emit("cancelChosed")
- },
- commitChosed() {
- this.$emit("commitChosed")
- },
- clickRadio(course) {
- this.$emit("clickRadio", course)
- },
- // “去发布”按钮
- toNav(){
- // 获取页面栈
- var pages = getCurrentPages()
- var page = pages[pages.length - 1]
- console.log(page)
- if(page.route.includes('course')){
- //判断:路径中包含course,跳转到需求发布页面
- uni.navigateTo({
- url:'/subpkg/student/require/student_require_add'
- })
- }else if(page.route.includes('require')){
- //判断:路径中包含require,跳转到课程发布页面
- uni.navigateTo({
- url:'/subpkg/teacher/course/teacher_course_add'
- })
- }
- }
- }
- }
- </script>
- <style lang="scss">
- /* 以下是蒙层样式 */
- .maskWrapper{
- z-index: 999;
- // margin-left: -20rpx;
- padding-left: 20rpx;
- position: fixed;
- height: 55%;
- bottom: 0;
- background-color: #D1D1D1;
- border-top-left-radius: 30rpx;
- border-top-right-radius: 30rpx;
- }
- /* 可滚动区域 */
- .scrollVertical{
- height: 76%;
- }
- /* 选项区 */
- .chooseList{
- display: flex;
- flex-direction: column;
- }
- /* 单个选项样式 */
- .chooseDetail{
- width: 94%;
- padding: 10rpx;
- margin: 10rpx 0;
- border: 1rpx solid gray;
- border-radius: 20rpx;
- background-color: #fff;
- }
- /* 设置选项与圆圈的距离 */
- .courseTitle{
- margin-left: 30rpx;
- }
- /* 课程号、辅导科目详情 */
- .courseDetail{
- margin-left: 20rpx;
- font-weight: bold;
- }
- /* 底部按钮 */
- .commitAndCancel{
- display: flex;
- width: 100%;
- justify-content: space-around;
- position: fixed;
- bottom: 40rpx;
- }
- .cancel,
- .commit{
- font-size: 40rpx;
- padding: 10rpx 60rpx;
- border-radius: 40rpx;
- color: white;
- }
- .commit{
- background-color: #35b882;
- }
- .cancel{
- background-color: #3ed598;
- }
- .requireText{
- margin-top: 20rpx;
- }
- .cancel-publish,
- .commit-publish{
- font-size: 40rpx;
- padding: 10rpx 30rpx;
- border-radius: 40rpx;
- color: white;
- text-align: center;
- height: 60rpx;
- line-height: 60rpx;
- width: 120rpx;
- }
- .cancel-publish{
- background-color: #3ed598;
- }
- .commit-publish{
- background-color: #35b882;
- }
- </style>
|