暂存
This commit is contained in:
@@ -4,15 +4,12 @@
|
|||||||
<public-module></public-module>
|
<public-module></public-module>
|
||||||
<template v-show="!screenLoading">
|
<template v-show="!screenLoading">
|
||||||
<z-nav-bar bgColor="#333" fontColor="#fff" title="教学内容"></z-nav-bar>
|
<z-nav-bar bgColor="#333" fontColor="#fff" title="教学内容"></z-nav-bar>
|
||||||
<!-- <view class="contentBox curriculum_box" :style="`height:calc(100% - ${60 + statusBarHeight}px !important; -->
|
<!-- <view class="contentBox curriculum_box" :style="`height:calc(100% - ${60 + statusBarHeight}px !important; -->
|
||||||
<view
|
<view class="contentBox curriculum_box" :style="`height:calc(100% - ${60 + statusBarHeight}px !important; width:100%; overflow-x: hidden; ${
|
||||||
class="contentBox curriculum_box"
|
|
||||||
:style="`height:calc(100% - ${60 + statusBarHeight}px !important; width:100%; overflow-x: hidden; ${
|
|
||||||
isFullScreen ? 'background:#000' : ''
|
isFullScreen ? 'background:#000' : ''
|
||||||
}`"
|
}`">
|
||||||
>
|
|
||||||
<!-- 加密视频 -->
|
<!-- 加密视频 -->
|
||||||
<view style="background:#000; position: fixed; top: 120rpx; left: 0; width: 100%;">
|
<view style="background:#000; position: fixed; top: 120rpx; left: 0; width: 100%; z-index: 88;">
|
||||||
<common-video @changeScreen="changeScreen" @changeScreenLoading="changeScreenLoading"
|
<common-video @changeScreen="changeScreen" @changeScreenLoading="changeScreenLoading"
|
||||||
@hideNextVideo="hideNextVideo" @startNextVideoCountDown="startNextVideoCountDown"
|
@hideNextVideo="hideNextVideo" @startNextVideoCountDown="startNextVideoCountDown"
|
||||||
@unlockChangeVideo="unlockChangeVideo" v-if="isfresh " ref="commonVideo"
|
@unlockChangeVideo="unlockChangeVideo" v-if="isfresh " ref="commonVideo"
|
||||||
@@ -22,7 +19,8 @@
|
|||||||
<view style="height: 200px" v-else></view>
|
<view style="height: 200px" v-else></view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <scroll-view :style="`height:calc(100% - 200px - 40rpx) ;`" scroll-y="true" class="scroll-Y" style="background-color: #fff"> -->
|
<!-- <scroll-view :style="`height:calc(100% - 200px - 40rpx) ;`" scroll-y="true" class="scroll-Y" style="background-color: #fff"> -->
|
||||||
<view class="PM_font" style="padding: 20rpx; font-size: 40rpx; color: #2979ff; margin-top: 320rpx;">视频教学</view>
|
<view class="PM_font" style="padding: 20rpx; font-size: 40rpx; color: #2979ff; margin-top: 360rpx;">视频教学
|
||||||
|
</view>
|
||||||
<view class="scroll-view-item">
|
<view class="scroll-view-item">
|
||||||
<view style="padding: 20rpx; font-size: 26rpx">
|
<view style="padding: 20rpx; font-size: 26rpx">
|
||||||
课程:{{ options.navTitle }}
|
课程:{{ options.navTitle }}
|
||||||
@@ -64,22 +62,58 @@
|
|||||||
<view v-show="curTab == 1" style="padding: 20rpx;">
|
<view v-show="curTab == 1" style="padding: 20rpx;">
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="PM_font" style="padding: 20rpx; font-size: 40rpx; color: #333">题目内容</view>
|
<view class="PM_font" style="padding: 20rpx; font-size: 40rpx; color: #333">题目内容</view>
|
||||||
<view v-if="curriculumData.questions != ''" class="" v-html="curriculumData.questions">
|
<view v-if="curriculumData.questions != ''" class="">
|
||||||
|
<view class="" v-html="curriculumData.questions"></view>
|
||||||
|
<view class="haveAnswer" v-if="myAnswer.id">
|
||||||
|
<!-- 有答案
|
||||||
|
{{myAnswer}} -->
|
||||||
|
<view class="PM_font" style="padding: 20rpx; font-size: 40rpx; color: #333">我的见解
|
||||||
|
<view class="rightBtn" @click="showBlank(myAnswer)">
|
||||||
|
<text>修改</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="htmlText" v-html="myAnswer.content"></view>
|
||||||
|
<!-- {{myAnswer.fileList.length}} -->
|
||||||
|
<view class="imgBox flex_box" v-if="myAnswer.fileList.length > 0">
|
||||||
|
<view class="item" v-for="(item, index) in myAnswer.fileList" :key="index">
|
||||||
|
<image @click="previewImage(item.url)" :src="item.url" mode="widthFix"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view :class="['noanser', isInClass ? '' : 'lock']" v-else>
|
||||||
|
<view class="lockView flex_box">
|
||||||
|
<view class="">
|
||||||
|
<view class="">
|
||||||
|
<text>加入小班学习后,即可发表您的见解, 更有相关领域的前辈为您解惑,帮助您更系统地学习本课程</text>
|
||||||
|
</view>
|
||||||
|
<view class="btnBox">
|
||||||
|
<button size="mini" @click="goClassLIst()">去加入小班</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<text>欢迎留下你的见解</text>
|
||||||
|
</view>
|
||||||
|
<view class="btn">
|
||||||
|
<text @click="showBlank()">写见解</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" v-else>
|
<view class="" v-else>
|
||||||
<u-divider text="暂无思考题"></u-divider>
|
<u-divider text="暂无思考题"></u-divider>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
{{myAnswer}}
|
|
||||||
<view class="answerBox">
|
</view>
|
||||||
<view class="PM_font" style="padding: 20rpx; font-size: 40rpx; color: #333">答案提交</view>
|
<u-popup key="1" :show="showEditBlank" :round="10" @close="closePup" ref="">
|
||||||
<template>
|
<view class="" style="padding: 40rpx; max-height: 80vh; overflow-y:scroll">
|
||||||
|
<view class="answerBox">
|
||||||
|
<view class="PM_font" style="padding: 20rpx; font-size: 40rpx; color: #333">见解提交</view>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="page-body">
|
<view class="page-body">
|
||||||
<view class='wrapper'>
|
<view class='wrapper'>
|
||||||
<view class="editor-wrapper">
|
<view class="editor-wrapper">
|
||||||
<editor id="editor" class="ql-container" placeholder="请输入您的答案..."
|
<editor id="editor" class="ql-container" placeholder="请输入您的见解..."
|
||||||
show-img-size show-img-toolbar show-img-resize
|
show-img-size show-img-toolbar show-img-resize
|
||||||
@statuschange="onStatusChange" :read-only="readOnly"
|
@statuschange="onStatusChange" :read-only="readOnly"
|
||||||
@ready="onEditorReady">
|
@ready="onEditorReady">
|
||||||
@@ -87,50 +121,19 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
|
||||||
<uni-forms :modelValue="answerForm" :rules="rules" ref="form">
|
|
||||||
<!-- <view class="input_box">
|
|
||||||
<uni-forms-item label="" name="content" label-width="0">
|
|
||||||
<text class="input_tit"><i>*</i>内容:<span
|
|
||||||
style="font-weight: normal; color: #999; font-size: 26rpx;">(600字以内)</span></text>
|
|
||||||
<view class="in">
|
|
||||||
<view class="uni-textarea">
|
|
||||||
<textarea placeholder-style="font-size:26rpx" v-model="form.content" maxlength="600"
|
|
||||||
auto-height placeholder="请输入内容" />
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</uni-forms-item>
|
|
||||||
</view> -->
|
|
||||||
<view class="input_box">
|
<view class="input_box">
|
||||||
<text class="input_tit">上传图片:</text>
|
<text class="input_tit" style="display: block;margin-bottom: 15rpx;">上传图片:</text>
|
||||||
<view class="in" style="border: none;" @click="checkPermision">
|
<view class="in" style="border: none;" @click="checkPermision">
|
||||||
<u-upload :fileList="fileList1" @afterRead="addPic" @delete="deletePic" multiple
|
<u-upload :fileList="fileList1" @afterRead="addPic" @delete="deletePic" multiple
|
||||||
:maxCount="4" width="40" height="40" :previewFullImage="true">
|
:maxCount="4" width="60" height="60" :previewFullImage="true">
|
||||||
</u-upload>
|
</u-upload>
|
||||||
<!-- <text style="font-size: 24rpx; color: #999;">可上传4张问题截图</text> -->
|
|
||||||
</view>
|
</view>
|
||||||
<!-- <input type="password" maxlength="8" v-model="confirmPassword" placeholder="请确认密码" /> -->
|
|
||||||
</view>
|
</view>
|
||||||
|
<view class="btn_box"><button @click="onSubmit">提 交</button></view>
|
||||||
<view class="input_box">
|
</view>
|
||||||
<radio-group @change="radioChange" class="flex_box">
|
|
||||||
<view class="" style="margin-right:20rpx ;">
|
|
||||||
<radio value="0" :checked="0 == answerForm.display" />他人不可见</label>
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
<radio value="1" :checked="1 == answerForm.display" />他人可见</label>
|
|
||||||
</view>
|
|
||||||
</radio-group>
|
|
||||||
<span
|
|
||||||
style="color: #999; font-size: 28rpx; margin-top: 20rpx; display: block;">(不勾选时,班级管理员以外的人看不见提交的内容)</span>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</uni-forms>
|
|
||||||
<view class="btn_box"><button @click="onSubmit">提 交</button></view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</u-popup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -164,16 +167,17 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
answerForm:{
|
showEditBlank: false,
|
||||||
|
answerForm: {
|
||||||
relationId: undefined,
|
relationId: undefined,
|
||||||
type: "1", //类型0任务1课后题
|
type: "1", //类型0任务1课后题
|
||||||
display: "1", //0不展示1展示
|
display: "1", //0不展示1展示
|
||||||
content: "",
|
content: "",
|
||||||
img: "",
|
img: "",
|
||||||
id:undefined
|
id: undefined
|
||||||
|
|
||||||
},
|
},
|
||||||
fileList1:[],
|
fileList1: [],
|
||||||
tabList: [{
|
tabList: [{
|
||||||
name: '章节介绍',
|
name: '章节介绍',
|
||||||
id: '0'
|
id: '0'
|
||||||
@@ -189,10 +193,10 @@
|
|||||||
required: true,
|
required: true,
|
||||||
errorMessage: '请输入回答内容',
|
errorMessage: '请输入回答内容',
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
activeStyle: {
|
activeStyle: {
|
||||||
color: '#333',
|
color: '#333',
|
||||||
@@ -239,6 +243,7 @@
|
|||||||
|
|
||||||
show: false,
|
show: false,
|
||||||
playData: {},
|
playData: {},
|
||||||
|
isInClass:false, // 是否加入了班级
|
||||||
taiHuClassInfo: {},
|
taiHuClassInfo: {},
|
||||||
searchValue: "",
|
searchValue: "",
|
||||||
ordersTabs: [{
|
ordersTabs: [{
|
||||||
@@ -274,7 +279,7 @@
|
|||||||
|
|
||||||
readOnly: false,
|
readOnly: false,
|
||||||
formats: {},
|
formats: {},
|
||||||
myAnswer:{}, // 我的思考题回答
|
myAnswer: {}, // 我的思考题回答
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
@@ -315,21 +320,56 @@
|
|||||||
// this.showSearchList = false
|
// this.showSearchList = false
|
||||||
// this.searchList = []
|
// this.searchList = []
|
||||||
},
|
},
|
||||||
onPullDownRefresh(){
|
onPullDownRefresh() {
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
// #endif
|
// #endif
|
||||||
|
this.getClassList()
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["userInfo"]),
|
...mapState(["userInfo"]),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getMyQuestAnswer(chapterId){
|
showBlank(val) {
|
||||||
|
console.log('zouzheli .....................');
|
||||||
|
if (val) {
|
||||||
|
this.answerForm = val
|
||||||
|
this.editorCtx = val.content
|
||||||
|
this.fileList1 = [...val.fileList]
|
||||||
|
} else {
|
||||||
|
this.answerForm = {
|
||||||
|
relationId: this.options.id,
|
||||||
|
type: "1", //类型0任务1课后题
|
||||||
|
display: "1", //0不展示1展示
|
||||||
|
content: "",
|
||||||
|
img: "",
|
||||||
|
id: undefined
|
||||||
|
},
|
||||||
|
this.editorCtx = ''
|
||||||
|
this.fileList1 = []
|
||||||
|
// console.log('this.answerForm++++', this.answerForm);
|
||||||
|
}
|
||||||
|
this.showEditBlank = true
|
||||||
|
},
|
||||||
|
closePup() {
|
||||||
|
this.showEditBlank = false
|
||||||
|
this.answerForm = {
|
||||||
|
relationId: undefined,
|
||||||
|
type: "1", //类型0任务1课后题
|
||||||
|
display: "1", //0不展示1展示
|
||||||
|
content: "",
|
||||||
|
img: "",
|
||||||
|
id: undefined
|
||||||
|
|
||||||
|
}
|
||||||
|
this.fileList1 = []
|
||||||
|
},
|
||||||
|
getMyQuestAnswer(chapterId) {
|
||||||
$http.request({
|
$http.request({
|
||||||
url: "/common/class/getQuesReplyInfo",
|
url: "/common/class/getQuesReplyInfo",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data:{
|
data: {
|
||||||
"relationId": chapterId,
|
"relationId": chapterId,
|
||||||
"userId": this.userInfo.id
|
"userId": this.userInfo.id
|
||||||
},
|
},
|
||||||
@@ -337,24 +377,35 @@
|
|||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if(res.code == 0 && res.classTaskAndQuesReply != null){
|
if (res.code == 0 && res.classTaskAndQuesReply != null) {
|
||||||
this.myAnswer = res.classTaskAndQuesReply
|
this.myAnswer = res.classTaskAndQuesReply
|
||||||
this.answerForm = res.classTaskAndQuesReply
|
this.myAnswer.fileList = []
|
||||||
this.editorCtx = res.classTaskAndQuesReply.content
|
if (res.classTaskAndQuesReply.img != '') {
|
||||||
}else{
|
var imgList = res.classTaskAndQuesReply.img.split(',')
|
||||||
|
imgList.forEach((item, index) => {
|
||||||
|
this.myAnswer.fileList.push({
|
||||||
|
url: item
|
||||||
|
})
|
||||||
|
this.fileList1.push({
|
||||||
|
url: item
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.fileList1 = []
|
||||||
this.myAnswer = {}
|
this.myAnswer = {}
|
||||||
this.answerForm = {}
|
this.answerForm = {}
|
||||||
this.editorCtx = ''
|
this.editorCtx = ''
|
||||||
}
|
}
|
||||||
console.log('我的思考题提交情况',res);
|
console.log('我的思考题提交情况', res);
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
console.log('我的思考题提交情况报错',e);
|
console.log('我的思考题提交情况报错', e);
|
||||||
// uni.showToast({
|
// uni.showToast({
|
||||||
// title: '操作失败',
|
// title: '操作失败',
|
||||||
// icon: 'error'
|
// icon: 'error'
|
||||||
// })
|
// })
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async checkPermision() {
|
async checkPermision() {
|
||||||
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE")
|
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE")
|
||||||
@@ -364,9 +415,9 @@
|
|||||||
},
|
},
|
||||||
addPic(e) {
|
addPic(e) {
|
||||||
let that = this;
|
let that = this;
|
||||||
console.log("添加图片", that.fileList1);
|
console.log("添加图片", that.fileList1);
|
||||||
for (var i = 0; i < e.file.length; i++) {
|
for (var i = 0; i < e.file.length; i++) {
|
||||||
console.log(i,e.file[i].url)
|
console.log(i, e.file[i].url)
|
||||||
uni.uploadFile({
|
uni.uploadFile({
|
||||||
url: this.$baseUrl + "oss/fileoss",
|
url: this.$baseUrl + "oss/fileoss",
|
||||||
filePath: e.file[i].url,
|
filePath: e.file[i].url,
|
||||||
@@ -389,75 +440,77 @@
|
|||||||
deletePic(event) {
|
deletePic(event) {
|
||||||
this.fileList1.splice(event.index, 1)
|
this.fileList1.splice(event.index, 1)
|
||||||
},
|
},
|
||||||
radioChange(e){
|
radioChange(e) {
|
||||||
if(this.answerForm.display == e.detail.value) {return}
|
if (this.answerForm.display == e.detail.value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
this.answerForm.display = e.detail.value
|
this.answerForm.display = e.detail.value
|
||||||
},
|
},
|
||||||
async onSubmit(){
|
async onSubmit() {
|
||||||
let data = await this.getHtml();
|
let data = await this.getHtml();
|
||||||
var _data = data.html.replace(/<.*?>/g,"")
|
var _data = data.html.replace(/<.*?>/g, "")
|
||||||
if(!_data || _data == ''){
|
if (!_data || _data == '') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:'请输入您的答案',
|
title: '请输入您的答案',
|
||||||
icon:'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.answerForm.content = data.html
|
this.answerForm.content = data.html
|
||||||
if (this.fileList1.length > 0) {
|
if (this.fileList1.length > 0) {
|
||||||
let _list = this.fileList1
|
let _list = this.fileList1
|
||||||
_list = _list.map(item => item.url)
|
_list = _list.map(item => item.url)
|
||||||
// console.log('this.fileList1',_list);
|
// console.log('this.fileList1',_list);
|
||||||
this.answerForm.img = _list.join(',')
|
this.answerForm.img = _list.join(',')
|
||||||
}else{
|
} else {
|
||||||
this.answerForm.img = ''
|
this.answerForm.img = ''
|
||||||
}
|
}
|
||||||
var _url = ""
|
var _url = ""
|
||||||
this.answerForm.id ? _url =
|
this.answerForm.id ? _url =
|
||||||
'common/class/editClassTaskAndQuesReply' : _url = 'common/class/addClassTaskAndQuesReply'
|
'common/class/editClassTaskAndQuesReply' : _url = 'common/class/addClassTaskAndQuesReply'
|
||||||
// this.form.id ? _url =
|
// this.form.id ? _url =
|
||||||
// 'common/class/editClassTaskReply' : _url = 'common/class/addClassTaskReply'
|
// 'common/class/editClassTaskReply' : _url = 'common/class/addClassTaskReply'
|
||||||
|
|
||||||
|
|
||||||
var data1 = {
|
var data1 = {
|
||||||
"relationId": this.answerForm.id ? undefined : this.curriculumData.id,
|
"relationId": this.answerForm.id ? undefined : this.curriculumData.id,
|
||||||
"id": this.answerForm.id,
|
"id": this.answerForm.id,
|
||||||
"type": this.answerForm.type, //类型0任务1课后题
|
"type": this.answerForm.type, //类型0任务1课后题
|
||||||
"display": this.answerForm.display, //0不展示1展示
|
"display": this.answerForm.display, //0不展示1展示
|
||||||
"content": this.answerForm.content,
|
"content": this.answerForm.content,
|
||||||
"img": this.answerForm.img
|
"img": this.answerForm.img
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('data',data1);
|
console.log('data', data1);
|
||||||
$http.request({
|
$http.request({
|
||||||
url: _url,
|
url: _url,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data:data1,
|
data: data1,
|
||||||
header: { //默认 无 说明:请求头
|
header: { //默认 无 说明:请求头
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
},
|
},
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '操作成功!',
|
||||||
|
icon: 'success'
|
||||||
})
|
})
|
||||||
.then(res => {
|
this.fileList1 = []
|
||||||
uni.showToast({
|
setTimeout(() => {
|
||||||
title: '操作成功!',
|
this.getMyQuestAnswer(this.curriculumData.id)
|
||||||
icon: 'success'
|
this.closePup()
|
||||||
})
|
// this.pPage = 0
|
||||||
this.fileList1 = []
|
// this.zuoyeList = []
|
||||||
// this.closePup()
|
// this.getTaskInfo()
|
||||||
setTimeout(()=>{
|
// this.getZuoyeList()
|
||||||
this.getMyQuestAnswer(this.curriculumData.id)
|
}, 200)
|
||||||
// this.pPage = 0
|
}).catch(e => {
|
||||||
// this.zuoyeList = []
|
uni.showToast({
|
||||||
// this.getTaskInfo()
|
title: '操作失败',
|
||||||
// this.getZuoyeList()
|
icon: 'error'
|
||||||
},200)
|
})
|
||||||
}).catch(e => {
|
});
|
||||||
uni.showToast({
|
|
||||||
title: '操作失败',
|
|
||||||
icon: 'error'
|
|
||||||
})
|
|
||||||
});
|
|
||||||
|
|
||||||
// console.log('data',data.html.replace(/<.*?>/g,""));
|
// console.log('data',data.html.replace(/<.*?>/g,""));
|
||||||
},
|
},
|
||||||
getHtml() {
|
getHtml() {
|
||||||
@@ -472,16 +525,21 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
goClassLIst(url, id,title){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `${url}?courseId=${this.options.id}&courseTitle=${this.options.navTitle}`,
|
||||||
|
});
|
||||||
|
},
|
||||||
readOnlyChange() {
|
readOnlyChange() {
|
||||||
this.readOnly = !this.readOnly
|
this.readOnly = !this.readOnly
|
||||||
},
|
},
|
||||||
onEditorReady() {
|
onEditorReady() {
|
||||||
// #ifdef APP-PLUS || MP-WEIXIN || H5
|
// #ifdef APP-PLUS || MP-WEIXIN || H5
|
||||||
uni.createSelectorQuery().select('#editor').context((res) => {
|
uni.createSelectorQuery().select('#editor').context((res) => {
|
||||||
this.editorCtx = res.context
|
this.editorCtx = res.context
|
||||||
if(this.myAnswer.content == '') return
|
if (this.myAnswer.content == '') return
|
||||||
res.context.setContents({
|
res.context.setContents({
|
||||||
html:this.myAnswer.content
|
html: this.myAnswer.content
|
||||||
})
|
})
|
||||||
}).exec()
|
}).exec()
|
||||||
// #endif
|
// #endif
|
||||||
@@ -505,24 +563,7 @@
|
|||||||
const formats = e.detail
|
const formats = e.detail
|
||||||
this.formats = formats
|
this.formats = formats
|
||||||
},
|
},
|
||||||
// clear() {
|
|
||||||
// uni.showModal({
|
|
||||||
// title: '清空编辑器',
|
|
||||||
// content: '确定清空编辑器全部内容?',
|
|
||||||
// success: res => {
|
|
||||||
// if (res.confirm) {
|
|
||||||
// this.editorCtx.clear({
|
|
||||||
// success: function(res) {
|
|
||||||
// console.log("clear success")
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
// removeFormat() {
|
|
||||||
// this.editorCtx.removeFormat()
|
|
||||||
// },
|
|
||||||
insertImage() {
|
insertImage() {
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 1,
|
count: 1,
|
||||||
@@ -647,13 +688,7 @@
|
|||||||
this.isOpenMp3 = false;
|
this.isOpenMp3 = false;
|
||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
// else {
|
|
||||||
// this.currentVideo = data;
|
|
||||||
// this.initVideo();
|
|
||||||
// this.isOpenMp3 = false;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// console.log("data at line 380111111111111111111:", data.type);
|
|
||||||
},
|
},
|
||||||
hancleModalCancel() {
|
hancleModalCancel() {
|
||||||
this.show = false;
|
this.show = false;
|
||||||
@@ -672,12 +707,7 @@
|
|||||||
...this.taiHuClassInfo,
|
...this.taiHuClassInfo,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
// $mars.progressBegin('申请中...');
|
|
||||||
// $mars.post(customerType, 'applyRelearn', data, function (ret) {
|
|
||||||
// api.hideProgress();
|
|
||||||
|
|
||||||
// fnLoadDataGrid();
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//课程详情
|
//课程详情
|
||||||
@@ -752,21 +782,32 @@
|
|||||||
checkDisable() {
|
checkDisable() {
|
||||||
console.log("点击了");
|
console.log("点击了");
|
||||||
},
|
},
|
||||||
// 显示无权限弹窗
|
// 判断用户是否加入了小班 小班列表为0 表示已经加入
|
||||||
// showNoRights() {
|
getClassList(){
|
||||||
// let that = this
|
$http.request({
|
||||||
// uni.showModal({
|
url: '/common/class/getClassByCourseIdNoUser',
|
||||||
// content: "",
|
method: "POST",
|
||||||
// confirmText: '好的',
|
data: {
|
||||||
// showCancel: false,
|
"courseId": this.options.id,
|
||||||
// success: function(res) {
|
"state": "", //小班状态0待开班1已开班2完成
|
||||||
// if (res.confirm) {
|
"type": "" // 班类型 0小班 1联合班 2精英班
|
||||||
// // console.log('用户点击确定');
|
},
|
||||||
// that.clear()
|
header: { //默认 无 说明:请求头
|
||||||
// }
|
'Content-Type': 'application/json'
|
||||||
// }
|
},
|
||||||
// })
|
})
|
||||||
// },
|
.then(res => {
|
||||||
|
if(res.code == 0){
|
||||||
|
if(res.result.length > 0){
|
||||||
|
this.isInClass = false
|
||||||
|
}else{
|
||||||
|
this.isInClass = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
console.log('获取班级列表失败',e);
|
||||||
|
});
|
||||||
|
},
|
||||||
// 获取用户详情
|
// 获取用户详情
|
||||||
getUserInfo() {
|
getUserInfo() {
|
||||||
// 用户详情
|
// 用户详情
|
||||||
@@ -801,69 +842,14 @@
|
|||||||
// socket.init();
|
// socket.init();
|
||||||
});
|
});
|
||||||
|
|
||||||
// this.$nextTick(() => {
|
|
||||||
// switch (item.type) {
|
|
||||||
// case 1:
|
|
||||||
// // allDataList
|
|
||||||
// this.dataList = that.allDataList.result1Lst
|
|
||||||
// break;
|
|
||||||
// case 2:
|
|
||||||
// this.dataList = that.allDataList.result2Lst
|
|
||||||
// break;
|
|
||||||
// case 3:
|
|
||||||
// this.dataList = that.allDataList.result3Lst
|
|
||||||
// break;
|
|
||||||
// case 4:
|
|
||||||
// this.dataList = that.allDataList.result4Lst.filter(e =>
|
|
||||||
// e.oid != '5fcf991c027b11e7ae62008cfae40c18' && e.oid != 'b3d8a938b8e147bc877613bb712a9cb3' && e.oid != '4d4730163135420ea962bfac4805e026' && e.oid != '49fb76ca3d6b43718d78c6aa9a3003c2' && e.oid != 'c7b047ed9246469b9ae2b1013fc3df9c'
|
|
||||||
|
|
||||||
// )
|
|
||||||
|
|
||||||
// console.log(this.dataList.length, 6666666)
|
|
||||||
// break;
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// this.currentCateIndex = item.index
|
|
||||||
// })
|
|
||||||
console.log(this.allDataList, this.dataList, "1688");
|
console.log(this.allDataList, this.dataList, "1688");
|
||||||
// if(this.userMes.tgdzPower == 0){
|
|
||||||
// let that = this
|
|
||||||
// uni.showModal({
|
|
||||||
// content: "购买 针灸六经法要上册和下册 后方可使用此功能",
|
|
||||||
// confirmText: '好的',
|
|
||||||
// showCancel: false,
|
|
||||||
// success: function(res) {
|
|
||||||
// if (res.confirm) {
|
|
||||||
// // console.log('用户点击确定');
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
// if(item.title == "时辰取穴"){
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: "../timeAcupoint/timeAcupoint"
|
|
||||||
// })
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
|
|
||||||
// this.currentStatusIndex = index
|
|
||||||
|
|
||||||
this.searchValue = "";
|
this.searchValue = "";
|
||||||
this.searchList = [];
|
this.searchList = [];
|
||||||
this.showSearchList = false;
|
this.showSearchList = false;
|
||||||
// if (index != 2) {
|
|
||||||
|
|
||||||
// uni.createSelectorQuery().select('.statusList').boundingClientRect(function (rect) {
|
|
||||||
// var height = rect.height
|
|
||||||
// console.log('元素高度:',);
|
|
||||||
|
|
||||||
// }).exec();
|
|
||||||
|
|
||||||
// } else {
|
|
||||||
// this.getJFList(dictType)
|
|
||||||
// }
|
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
@@ -872,27 +858,6 @@
|
|||||||
console.log(index, 99999);
|
console.log(index, 99999);
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
||||||
// if(this.userMes.tgdzPower == 0){
|
|
||||||
// let that = this
|
|
||||||
// uni.showModal({
|
|
||||||
// content: "购买 针灸六经法要上册和下册 后方可使用此功能",
|
|
||||||
// confirmText: '好的',
|
|
||||||
// showCancel: false,
|
|
||||||
// success: function(res) {
|
|
||||||
// if (res.confirm) {
|
|
||||||
// // console.log('用户点击确定');
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
// if(item.title == "时辰取穴"){
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: "../timeAcupoint/timeAcupoint"
|
|
||||||
// })
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
|
|
||||||
this.currentStatusIndex = index;
|
this.currentStatusIndex = index;
|
||||||
// this.currentCateIndex = 0
|
// this.currentCateIndex = 0
|
||||||
|
|
||||||
@@ -905,18 +870,6 @@
|
|||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
});
|
});
|
||||||
|
|
||||||
// this.handleselectCate(this.cateList[this.currentCateIndex])
|
|
||||||
// if (index != 2) {
|
|
||||||
|
|
||||||
// uni.createSelectorQuery().select('.statusList').boundingClientRect(function (rect) {
|
|
||||||
// var height = rect.height
|
|
||||||
// console.log('元素高度:',);
|
|
||||||
|
|
||||||
// }).exec();
|
|
||||||
|
|
||||||
// } else {
|
|
||||||
// this.getJFList(dictType)
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
|
|
||||||
transformData(inputData) {
|
transformData(inputData) {
|
||||||
@@ -933,59 +886,12 @@
|
|||||||
// const finalResult = Object.keys(result).map(key => ({ [key]: result[key] }));
|
// const finalResult = Object.keys(result).map(key => ({ [key]: result[key] }));
|
||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
// getJFList(id) {
|
|
||||||
// $http.request({
|
|
||||||
// url: "book/prescript/prescriptListForJF",
|
|
||||||
// method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
|
||||||
// data: {
|
|
||||||
// loadAnimate: 'none', // 请求加载动画
|
|
||||||
// 'categoryId': id
|
|
||||||
// },
|
|
||||||
// header: { //默认 无 说明:请求头
|
|
||||||
// 'Content-Type': 'application/json'
|
|
||||||
// },
|
|
||||||
// }).then(res => {
|
|
||||||
// if (res.code == 0 && res.list.length > 0) {
|
|
||||||
// this.twoCateList = []
|
|
||||||
// this.dataList = this.transformData(res.list)
|
|
||||||
// console.log('JF经方', this.dataList)
|
|
||||||
// } else {
|
|
||||||
// this.twoCateList = []
|
|
||||||
// this.dataList = []
|
|
||||||
// }
|
|
||||||
// }).catch(e => {
|
|
||||||
// this.twoCateList = []
|
|
||||||
// this.dataList = []
|
|
||||||
// console.log(e)
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
getCateList(id) {
|
getCateList(id) {
|
||||||
id ? "" : (id = 0);
|
id ? "" : (id = 0);
|
||||||
this.twoCateList = [];
|
this.twoCateList = [];
|
||||||
this.curTwoCateIndex = 0;
|
this.curTwoCateIndex = 0;
|
||||||
// 0为获取顶级分类,其他为搜索下级分类,目前的逻辑,顶级是写死的,所以可能只会涉及到搜索第二级
|
|
||||||
// $http.request({
|
|
||||||
// url: "book/prescript/prescriptCategoryList",
|
|
||||||
// method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
|
||||||
// data: {
|
|
||||||
// loadAnimate: 'none', // 请求加载动画
|
|
||||||
// 'categoryId': id
|
|
||||||
// },
|
|
||||||
// header: { //默认 无 说明:请求头
|
|
||||||
// 'Content-Type': 'application/json'
|
|
||||||
// },
|
|
||||||
// }).then(res => {
|
|
||||||
// console.log(res, '脉穴分类获取成功')
|
|
||||||
// if (res.code == 0 && res.list.length > 0) {
|
|
||||||
// this.statusList = res.list
|
|
||||||
// this.getTowCateList(this.statusList[0].type)
|
|
||||||
// } else {
|
|
||||||
// this.statusList = []
|
|
||||||
// }
|
|
||||||
// }).catch(e => {
|
|
||||||
// this.statusList = []
|
|
||||||
// console.log(e)
|
|
||||||
// })
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 放大图片
|
// 放大图片
|
||||||
@@ -1001,88 +907,7 @@
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// getSearch() {
|
|
||||||
// $http.request({
|
|
||||||
// url: "book/prescript/searchPrescript",
|
|
||||||
// method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
|
||||||
// data: {
|
|
||||||
// loadAnimate: 'none', // 请求加载动画
|
|
||||||
// 'keywords': this.searchValue,
|
|
||||||
// type: this.currentStatusIndex + 1
|
|
||||||
// },
|
|
||||||
// header: { //默认 无 说明:请求头
|
|
||||||
// 'Content-Type': 'application/json'
|
|
||||||
// },
|
|
||||||
// }).then(res => {
|
|
||||||
// console.log(res, '搜索结果')
|
|
||||||
// if (res.code == 0 && res.list.length >= 0) {
|
|
||||||
// this.showSearchList = true
|
|
||||||
// this.searchList = res.list
|
|
||||||
// } else {
|
|
||||||
// this.searchList = []
|
|
||||||
// }
|
|
||||||
// }).catch(e => {
|
|
||||||
// // this.dataList = []
|
|
||||||
// this.searchList = []
|
|
||||||
// console.log(e)
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
// search(res) {
|
|
||||||
// console.log(res, 'res')
|
|
||||||
// // uni.showToast({
|
|
||||||
// // title: '搜索:' + res,
|
|
||||||
// // icon: 'none'
|
|
||||||
// // })
|
|
||||||
// if (res == '') {
|
|
||||||
// this.showSearchList = false
|
|
||||||
// this.searchList = []
|
|
||||||
// } else {
|
|
||||||
// this.getSearch()
|
|
||||||
// }
|
|
||||||
|
|
||||||
// },
|
|
||||||
// input(res) {
|
|
||||||
// console.log('----input:', res)
|
|
||||||
// if (res == '') {
|
|
||||||
// this.searchList = []
|
|
||||||
// } else {
|
|
||||||
// this.getSearch()
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// clear(res) {
|
|
||||||
// console.log('----clear:', res)
|
|
||||||
// // uni.showToast({
|
|
||||||
// // title: 'clear事件,清除值为:',
|
|
||||||
// // icon: 'none'
|
|
||||||
// // })
|
|
||||||
// this.searchValue = ''
|
|
||||||
// this.showSearchList = false
|
|
||||||
// },
|
|
||||||
// blur(res) {
|
|
||||||
// // console.log('----blur:', res)
|
|
||||||
// // if (res == '') {
|
|
||||||
// // this.showSearchList = false
|
|
||||||
// // this.searchList = []
|
|
||||||
// // } else {
|
|
||||||
// // this.getSearch()
|
|
||||||
// // }
|
|
||||||
// },
|
|
||||||
// focus(e) {
|
|
||||||
// console.log('----focus:')
|
|
||||||
// // uni.showToast({
|
|
||||||
// // title: 'focus事件,输出值为:' + e.value,
|
|
||||||
// // icon: 'none'
|
|
||||||
// // })
|
|
||||||
// // 等于1 就是有权限
|
|
||||||
// // this.showSearchList = true
|
|
||||||
|
|
||||||
// },
|
|
||||||
// cancel(res) {
|
|
||||||
// uni.showToast({
|
|
||||||
// title: '点击取消,输入值为:' + res.value,
|
|
||||||
// icon: 'none'
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
onBackPress() {
|
onBackPress() {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
@@ -1133,7 +958,7 @@
|
|||||||
font-style: normal !important;
|
font-style: normal !important;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
border:1px solid #eee
|
border: 1px solid #eee
|
||||||
}
|
}
|
||||||
|
|
||||||
.ql-active {
|
.ql-active {
|
||||||
@@ -1159,6 +984,58 @@
|
|||||||
padding: 10rpx;
|
padding: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.imgBox {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
width: 20%;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
padding: 0 !important;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.haveAnswer {
|
||||||
|
background-color: #f1f1f1;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding: 10rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
.htmlText {
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.noanser.lock { position: relative; align-items: center;
|
||||||
|
.lockView{ height: 300rpx; display: block !important; padding: 20rpx; color: #fff; border-radius: 10rpx;
|
||||||
|
position: absolute; top: 0; left: 0; z-index: 2; width: 100%; background-color: rgba(0, 0, 0, .8);
|
||||||
|
.btnBox{
|
||||||
|
padding-top: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.noanser {
|
||||||
|
padding: 20rpx;
|
||||||
|
background-color: rgba(255, 255, 255, .6);
|
||||||
|
text-align: center;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
.lockView{display: none;}
|
||||||
|
.btn {
|
||||||
|
display: inline-block;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
padding: 10rpx 20rpx;
|
||||||
|
background-color: $themeColor;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// .noanser{
|
||||||
|
// display: block;
|
||||||
|
// content: '加入小班学习后,即可答题';
|
||||||
|
// background-color:rgba(255, 255, 255, .4);
|
||||||
|
// }
|
||||||
.contentBox {
|
.contentBox {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
|
||||||
@@ -1266,7 +1143,21 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.btn_box {
|
|
||||||
|
.rightBtn {
|
||||||
|
float: right;
|
||||||
|
|
||||||
|
text {
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid #06c;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding: 4rpx 10rpx;
|
||||||
|
color: #06c;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn_box {
|
||||||
margin-top: 70rpx;
|
margin-top: 70rpx;
|
||||||
padding-bottom: 20rpx;
|
padding-bottom: 20rpx;
|
||||||
|
|
||||||
@@ -1278,6 +1169,7 @@
|
|||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.search_box {
|
.search_box {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
Reference in New Issue
Block a user