admin
2022-05-23 e88ac05ee96cbf0306958323bf3063133bd53649
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<!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>