<!DOCTYPE html>
|
<html>
|
|
<head>
|
<meta charset="utf-8" />
|
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
|
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
<title>帮助中心</title>
|
<link rel="stylesheet" type="text/css" href="css/doui.min.css" />
|
<script src="js/doui.min.js" type="text/javascript" charset="utf-8"></script>
|
<script src="js/publicFunction.js" type="text/javascript" charset="utf-8"></script>
|
<script src="http://img.flqapp.com/resource/js/app20191220.js" type="text/javascript" charset="utf-8"></script>
|
<script type="text/javascript">
|
doui.importSet([
|
'css/yesApp.css',
|
'http://cdn.yeshitv.com/js/vue.min.js',
|
'js/wangEditor.min.js',
|
'js/wangEditor.config.js'
|
]);
|
</script>
|
</head>
|
|
<body style="display:none;">
|
<div id="allwai" class="heightenBox fontMobile">
|
|
<!--问题标题-->
|
<div v-show="question.title" class="position-fixed" style="width:7.5rem; left:0; top:0; border-bottom:1px solid #F0F0F0; background-color:rgba(255,255,255,0.95); z-index:20;">
|
<div class="fboxRow Xstart Ystart" style="width:100%; padding:0.25rem 0.3rem;">
|
<!--问图标-->
|
<div class="fboxRow Xcenter Ycenter" style="width:0.46rem; height:0.46rem; background-image:url(img/AppPage/helpCenter/num.png); -webkit-background-size:100% 100%; background-size:100% 100%;">
|
<div class="font24 font-weight" style="color:#333333;">问</div>
|
</div>
|
<!--标题-->
|
<div class="flex1" style="margin-left:0.3rem;">
|
<div class="font30 font-weight" style="line-height:0.46rem;">{{question.title}}</div>
|
</div>
|
</div>
|
</div>
|
<!--标题真实占位框-->
|
<div v-show="question.title" style="width:7.5rem; border-bottom:1px solid #F0F0F0; opacity:0;">
|
<div class="fboxRow Xstart Ystart" style="width:100%; padding:0.25rem 0.3rem;">
|
<!--问图标-->
|
<div class="fboxRow Xcenter Ycenter" style="width:0.46rem; height:0.46rem; background-image:url(img/AppPage/helpCenter/num.png); -webkit-background-size:100% 100%; background-size:100% 100%;">
|
<div class="font26 font-weight" style="color:#333333;">问</div>
|
</div>
|
<!--标题-->
|
<div class="font30 font-weight" style="margin-left:0.3rem; line-height:0.46rem;">{{question.title}}</div>
|
</div>
|
</div>
|
|
<!--问题答案-->
|
<div v-show="question.html" class="bg-white" style="width:7.5rem; padding:0.2rem;">
|
<!--富文本编辑器-->
|
<div id="editor1"></div>
|
</div>
|
|
<div class="do-scrollLoading"></div>
|
|
<!--回到顶部火箭-->
|
<div v-show="backTop.show" class="backTop" v-on:click="backTop.click()"><img src="img/flq/backTop.png" /></div>
|
|
</div>
|
</body>
|
|
</html>
|
|
|
<!--编辑器-->
|
<script type="text/javascript">
|
// 编辑器申明
|
var editor = null;
|
// vue申明
|
var vm = null;
|
|
function copyLink() {
|
var href = window.location.href;
|
yestv.copyText(href);
|
yestv.toast("链接已复制到剪贴板");
|
}
|
|
doui.onReady(function() {
|
try {
|
var array = new Array();
|
array.push({
|
icon: 'http://img.flqapp.com/resource/icon_share.png',
|
name: '复制链接',
|
js: 'copyLink()'
|
});
|
yesApp.addMenu(array);
|
} catch (e) {}
|
|
|
// vue 初始化
|
vm = new Vue({
|
el: "#allwai",
|
// 数据
|
data: {
|
|
// ----------------------------------------------------------- 帮助内容说明
|
question: {
|
id: "",
|
title: "",
|
html: "",
|
// 请求问题
|
request: function() {
|
// 数据准备
|
var myurl = getHttp() + "/api/apph5/v1/helpCenter/getInfo";
|
var mydata = doui.AjaxData({
|
id: vm.question.id
|
});
|
// 数据请求
|
doui.AjaxJsonp(myurl, mydata, function(res) {
|
if (res.code != 0) {
|
doui.hideScrollLoading();
|
doui.showToast(res.msg);
|
} else {
|
// 标题赋值
|
vm.question.title = res.data.title;
|
// 内容赋值(html代码)
|
vm.question.html = res.data.html;
|
wang.valueSet(editor, vm.question.html);
|
// 取消提示
|
doui.hideScrollLoading("-到底了*^_^*-");
|
}
|
});
|
},
|
},
|
|
// 回到顶部小火箭
|
backTop: {
|
show: false,
|
click: function() {
|
doui.scrollTo("body", 0);
|
},
|
},
|
|
}
|
});
|
|
|
// 编辑器初始化
|
editor = wang.createGet({
|
ids: ['editor1'],
|
menus: []
|
});
|
wang.editorFalse(editor, 'editor1'); // 禁用编辑功能
|
wang.style_scrollbar();
|
wang.style_menu(editor, 'display:none;');
|
wang.style_editor(editor, 'height:auto; border:none;');
|
|
|
// 获取地址栏传递值
|
var urldata = doui.urlParamGet();
|
if (urldata.id) {
|
// id赋值
|
vm.question.id = urldata.id;
|
// 请求数据
|
doui.showScrollLoading("加载帮助^_^", function() {
|
vm.question.request();
|
});
|
} else {
|
doui.showToast("获取帮助ID失败");
|
}
|
|
|
// 屏幕滚动事件
|
doui.scrolling("body", function(res) {
|
// 显示回到顶部
|
if (res.scrollTop > 300) {
|
vm.backTop.show = true;
|
} else {
|
vm.backTop.show = false;
|
}
|
});
|
|
|
document.body.style.display = "block";
|
});
|
</script>
|