代码格式优化,去除多余的引入
This commit is contained in:
@@ -121,9 +121,6 @@
|
||||
|
||||
const popup = ref(null);
|
||||
const popup_input_bottom = ref('0px');
|
||||
|
||||
const inputValue = ref('');
|
||||
const placeholder = ref('');
|
||||
const message_list = reactive([]);
|
||||
const status = ref(''); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const limit = 20;
|
||||
@@ -182,7 +179,7 @@
|
||||
};
|
||||
|
||||
const getData = (from = '') => {
|
||||
if (from == 'submit') {
|
||||
if (from === 'submit') {
|
||||
status.value = '';
|
||||
total.value = -1;
|
||||
page.value = 1;
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import common from '@/common/common';
|
||||
const props = defineProps({
|
||||
modelValue: Object
|
||||
});
|
||||
|
||||
@@ -27,12 +27,12 @@
|
||||
modelValue: Object
|
||||
})
|
||||
const min_no_success_id = computed(() => {
|
||||
const find_item = props.modelValue?.pgrphData.find(res => (res.pgrphStdyStateName == '未学习' || res.pgrphStdyStateName == '学习中'))
|
||||
const find_item = props.modelValue?.pgrphData.find(res => (res.pgrphStdyStateName === '未学习' || res.pgrphStdyStateName === '学习中'))
|
||||
return find_item?.pgrphId || ''
|
||||
})
|
||||
|
||||
const toDetail = (item) => {
|
||||
if (item.pgrphStdyStateName == '已学习' || item.pgrphStdyStateName == '学习中' || min_no_success_id.value == item.pgrphId) {
|
||||
if (item.pgrphStdyStateName === '已学习' || item.pgrphStdyStateName === '学习中' || min_no_success_id.value === item.pgrphId) {
|
||||
emit('toStudyPrgh', item)
|
||||
} else {
|
||||
common.msg('请按顺序学习知识点')
|
||||
|
||||
@@ -76,15 +76,15 @@
|
||||
</view>
|
||||
</uv-sticky>
|
||||
<!-- <swiper class="body-swiper" @change="swiper_change" :current="tabAct"><swiper-item> -->
|
||||
<view class="course-info" v-if="tabAct == 0">
|
||||
<view class="course-info" v-if="tabAct === 0">
|
||||
<introduceVue v-model="form"></introduceVue>
|
||||
</view>
|
||||
<!--</swiper-item><swiper-item>-->
|
||||
<view class="point" v-if="tabAct == 1">
|
||||
<view class="point" v-if="tabAct === 1">
|
||||
<knowledge v-model="form" @toStudyPrgh="toStudyPrgh"></knowledge>
|
||||
</view>
|
||||
<!--</swiper-item><swiper-item>-->
|
||||
<view class="evaluate" v-if="tabAct == 2 && form">
|
||||
<view class="evaluate" v-if="tabAct === 2 && form">
|
||||
<comment ref="commentRef" :crsId="crsId" :imgId="form.imgId"></comment>
|
||||
</view>
|
||||
<!--</swiper-item></swiper>-->
|
||||
@@ -120,7 +120,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref, computed, onMounted } from 'vue';
|
||||
import { ref, computed, onMounted } from 'vue';
|
||||
import { onShow, onLoad, onUnload } from '@dcloudio/uni-app';
|
||||
import { getCourseDetailApi } from '@/api/courseDetail.js';
|
||||
import { startExamByCrs } from '@/api/examination.js';
|
||||
@@ -185,10 +185,6 @@
|
||||
scrollTop.value = e.detail.scrollTop;
|
||||
};
|
||||
|
||||
const swiper_change = (res) => {
|
||||
tabAct.value = res.detail.current;
|
||||
};
|
||||
|
||||
// 去考试
|
||||
const goto_examination = async () => {
|
||||
if (isPreview.value === 'preview') return common.msg('预览课程不允许考试');
|
||||
|
||||
@@ -72,7 +72,6 @@
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref, nextTick } from 'vue';
|
||||
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { publishCrsEvaluation } from '@/api/courseDetail.js';
|
||||
import common from '@/common/common';
|
||||
@@ -92,7 +91,7 @@
|
||||
|
||||
const submit = () => {
|
||||
if (formData.bbsContent === '') {
|
||||
if (formData.bbsTag == 'SUG') {
|
||||
if (formData.bbsTag === 'SUG') {
|
||||
return common.msg('请输入你的建议');
|
||||
} else {
|
||||
return common.msg('请输入你的问题');
|
||||
|
||||
Reference in New Issue
Block a user