暂存
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<template>
|
||||
<page-meta :page-style="'overflow:'+(showEditBlank?'hidden':'visible')"></page-meta>
|
||||
<view class="">
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
@@ -122,15 +123,16 @@
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<u-popup key="1" :show="showEditBlank" :round="10" @close="closePup" ref="">
|
||||
<u-popup key="1" :show="showEditBlank" :round="10" @close="closePup" ref="" @touchmove.stop="" >
|
||||
<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>
|
||||
<scroll-view scroll-top="" scroll-y="true" class="scroll-Y" style="max-height: 400rpx; margin: 20rpx 0;">
|
||||
<view class="container">
|
||||
<view class="page-body">
|
||||
<view class='wrapper'>
|
||||
<view class="editor-wrapper">
|
||||
<editor id="editor" class="ql-container" placeholder="请输入您的见解..."
|
||||
<editor @input="editorIput" id="editor" class="ql-container" placeholder="请输入您的见解..."
|
||||
show-img-size show-img-toolbar show-img-resize
|
||||
@statuschange="onStatusChange" :read-only="readOnly"
|
||||
@ready="onEditorReady">
|
||||
@@ -138,7 +140,8 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="input_box">
|
||||
<text class="input_tit" style="display: block;margin-bottom: 15rpx;">上传图片:</text>
|
||||
<view class="in" style="border: none;" @click="checkPermision">
|
||||
@@ -171,7 +174,7 @@
|
||||
import courseDescription from "@/pages/component/commonComponents/list";
|
||||
import curriculumMp3 from "./mp3Detail.vue";
|
||||
import price from "./price/index.vue";
|
||||
|
||||
import debounce from "@/common/debounce.js";
|
||||
import $http from "@/config/requestConfig.js";
|
||||
import {
|
||||
mapState
|
||||
@@ -300,6 +303,7 @@
|
||||
formats: {},
|
||||
myAnswer: {}, // 我的思考题回答
|
||||
oldContent:'', // 老的内容
|
||||
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
@@ -352,12 +356,18 @@
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
methods: {
|
||||
showBlank(val) {
|
||||
editorIput(e){
|
||||
},
|
||||
moveHandle() {
|
||||
return false;
|
||||
},
|
||||
showBlank(val) {
|
||||
// this.noScroll()
|
||||
console.log('zouzheli .....................');
|
||||
if (val) {
|
||||
this.answerForm = val
|
||||
// this.editorCtx = val.content
|
||||
this.fileList1 = [...val.fileList]
|
||||
// this.fileList1 = [...val.fileList]
|
||||
} else {
|
||||
this.answerForm = {
|
||||
relationId: this.options.id,
|
||||
@@ -366,9 +376,9 @@
|
||||
content: "",
|
||||
img: "",
|
||||
id: undefined
|
||||
},
|
||||
}
|
||||
// this.editorCtx = ''
|
||||
this.fileList1 = []
|
||||
// this.fileList1 = []
|
||||
// console.log('this.answerForm++++', this.answerForm);
|
||||
}
|
||||
// 赋值给编辑器
|
||||
@@ -381,6 +391,7 @@
|
||||
});
|
||||
},
|
||||
async closePup() {
|
||||
// this.canScroll()
|
||||
this.showEditBlank = false
|
||||
let data = await this.getHtml();
|
||||
var _data = data.html.replace(/<.*?>/g, "")
|
||||
@@ -488,8 +499,9 @@
|
||||
}
|
||||
this.answerForm.display = e.detail.value
|
||||
},
|
||||
async onSubmit() {
|
||||
let data = await this.getHtml();
|
||||
async onSubmit() {
|
||||
debounce(async () => {
|
||||
let data = await this.getHtml();
|
||||
var _data = data.html.replace(/<.*?>/g, "")
|
||||
if (!_data || _data == '') {
|
||||
uni.showToast({
|
||||
@@ -522,7 +534,7 @@
|
||||
"img": this.answerForm.img
|
||||
}
|
||||
|
||||
console.log('data', data1);
|
||||
console.log('提交的data', data1);
|
||||
$http.request({
|
||||
url: _url,
|
||||
method: "POST",
|
||||
@@ -551,7 +563,7 @@
|
||||
icon: 'error'
|
||||
})
|
||||
});
|
||||
|
||||
},300)
|
||||
// console.log('data',data.html.replace(/<.*?>/g,""));
|
||||
},
|
||||
getHtml() {
|
||||
|
||||
@@ -2456,7 +2456,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hidden2{line-height: 50rpx; height: 100rpx;}
|
||||
.subLine {
|
||||
* {
|
||||
display: inline !important;
|
||||
|
||||
Reference in New Issue
Block a user