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
| /**
| 初始化处理
| **/
| (function(window, undefined){
| "use strict";
| var vc = window.vc || {};
| vc = {
| version:"v0.0.1",
| name:"vue component",
| author:'java110'
| };
|
|
| //通知window对象
| window.vc = vc;
| })(window);
|
| /**
| vc 函数初始化
| add by wuxw
| **/
| (function(vc){
| vc.http = {
| call:function(componentCode,componentMethod,param,options,successCallback,errorCallback){
| console.log(successCallback)
| Vue.http.post('/callComponent/'+componentCode +"/"+componentMethod, param, options)
| .then(function(res){
| successCallback(res.bodyText,res);
| }, function(error){
| errorCallback(error.bodyText,error);
| });
| }
|
| };
|
| //绑定跳转函数
| vc.jumpToPage = function(url){
| window.location.href = url;
| };
| })(window.vc);
|
|