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
| document.addEventListener("DOMContentLoaded", function() {
| //把对象赋值到JS中
| try {
| new QWebChannel(qt.webChannelTransport, function(channel) {
| window.pyjs = channel.objects.Bridge;
| console.log("回调成功");
| app.get_msg_list();
| });
| } catch (e) {
|
| }
| });
| var app;
| $(function() {
| new VConsole();
| app = new Vue({
| el: "#app",
| data: {
| msg_list: [],
| },
| methods: {
| get_msg_list: function() {
| http_util.list_msg(function(res){
| console.log(res)
| res = JSON.parse(res);
| console.log(res)
| if(res.code==0){
| app.msg_list = res.data;
| }
| });
| }
| }
| });
|
| });
|
|