提交 b9f19ca3 authored 作者: 吴德鹏's avatar 吴德鹏

优化落地页商品排序

上级 5505d8f2
......@@ -52,9 +52,10 @@
<br/>
<Form-item label="答案" prop="answer" style="width: 800px">
<!-- 加载编辑器的容器 -->
<script id="container" name="content" type="text/plain">
</script>
<!-- <script id="container" name="content" type="text/plain">-->
<!-- </script>-->
<!--<i-input v-model="tbCfProblem.answer" placeholder="答案"/>-->
<textarea v-model="tbCfProblem.answer" style="width: 600px;height: 300px;"></textarea>
</Form-item>
<Form-item label="是否展示" prop="enableFlag" style="width: 800px">
<i-select placeholder="请选择" v-model="tbCfProblem.enableFlag">
......
......@@ -5,7 +5,7 @@ $(function () {
{label: 'problemId', name: 'problemId', index: 'problem_id', key: true, hidden: true},
{label: '问题明细', name: 'question', index: 'question', width: 80},
{label: '类型 ', name: 'type', index: 'type', width: 80, formatter: typeFormat},
{label: '答案', name: 'answer', index: 'answer', width: 80, formatter: contentFormat},
// {label: '答案', name: 'answer', index: 'answer', width: 80, formatter: contentFormat},
{label: '是否展示', name: 'enableFlag', index: 'enable_flag', width: 80, formatter: validFormat},
{label: '排序', name: 'sort', index: 'sort', width: 80},
{label: '创建时间', name: 'createTime', index: 'create_time', width: 80}],
......@@ -17,25 +17,25 @@ $(function () {
* 增加修改的编辑器
* @type {UE.ui.Editor|*}
*/
var ue = UE.getEditor('container');
/**
* 获取文本框内容
* @returns {*|String|void}
*/
function getContent() {
var htmlContent = ue.getContent();
return htmlContent;
}
/**
* 显示内容
* @param content
*/
function showContent(problemId) {
$('#contentModal').modal('show');
vm.getInfo(problemId, true);
};
// var ue = UE.getEditor('container');
//
// /**
// * 获取文本框内容
// * @returns {*|String|void}
// */
// function getContent() {
// var htmlContent = ue.getContent();
// return htmlContent;
// }
//
// /**
// * 显示内容
// * @param content
// */
// function showContent(problemId) {
// $('#contentModal').modal('show');
// vm.getInfo(problemId, true);
// };
let vm = new Vue({
......@@ -93,8 +93,8 @@ let vm = new Vue({
vm.getInfo(problemId);
},
saveOrUpdate: function (event) {
var answer = getContent();
vm.tbCfProblem.answer = encodeURI(answer);
// var answer = getContent();
// vm.tbCfProblem.answer = encodeURI(answer);
let url = vm.tbCfProblem.problemId == null ? "../tbcfproblem/save" : "../tbcfproblem/update";
Ajax.request({
url: url,
......@@ -103,7 +103,7 @@ let vm = new Vue({
contentType: "application/json",
successCallback: function (r) {
alert('操作成功', function (index) {
ue.setContent("");
// ue.setContent("");
vm.reload();
});
}
......@@ -135,9 +135,9 @@ let vm = new Vue({
async: true,
successCallback: function (r) {
console.log(r)
r.tbCfProblem.answer = decodeURI(r.tbCfProblem.answer);
// r.tbCfProblem.answer = decodeURI(r.tbCfProblem.answer);
vm.tbCfProblem = r.tbCfProblem;
ue.setContent(vm.tbCfProblem.answer);
// ue.setContent(vm.tbCfProblem.answer);
if (!!isShowDetail) {
var answer = "无内容,请点击修改,添加内容";
if (!!vm.tbCfProblem.answer) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论