-
Notifications
You must be signed in to change notification settings - Fork 78
/
index.html
275 lines (264 loc) · 10.1 KB
/
index.html
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8"/>
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
<script>
window.webkit = {
messageHandlers: {
invokeHandler: {
postMessage: function (info) {
// console.log(info);
}
},
publishHandler: {
postMessage: function (info) {
// console.log(info);
}
}
}
}
WeixinJSCore = {
publishHandler: function () {
},
invokeHandler: function () {
}
}
</script>
<script>
var __webviewId__;
</script>
<script>
__wxRoute = 'index';
__wxRouteBegin = true
__wxConfig = {
"debug": true,
"pages": ["index"],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "WeChat",
"navigationBarTextStyle": "black"
},
"projectConfig": {
"Network": {
"RequestDomain": [],
"WsRequestDomain": [],
"UploadDomain": [],
"DownloadDomain": []
},
"Setting": {
"MaxLocalstorageSize": 10,
"MaxCodeSize": 5,
"MaxWebviewDepth": 5,
"MaxBackgroundLifespan": 300,
"MaxRequestConcurrent": 5,
"MaxUploadConcurrent": 1,
"MaxDownloadConcurrent": 5
},
"appid": "touristappid"
},
"appserviceConfig": {
"AppserviceMaxDataSize": 1048576,
"HTTPSetting": {
"HTTPHeaderMode": "BlackList",
"HeaderBlackList": ["User-Agent"],
"HeaderWhiteList": [],
"UploadMaxTimeoutMS": 60000,
"DownloadMaxTimeoutMS": 60000,
"WebsocketMaxTimeoutMS": 60000,
"RequestMaxTimeoutMS": 60000,
"HTTPHeaderReferer": "servicewechat.com"
},
"CDNBaseURL": "https://res.wx.qq.com/weapp",
"AppMaxRunningCount": 5
},
"appname": "fdfaf",
"appid": "touristappid",
"apphash": 2107567080,
"isTourist": true,
"userInfo": {}
}
</script>
<script src="./split/wxJSBridge.js"></script>
<script src="./split/wx.js"></script>
<script src="./split/virtual_dom.js"></script>
<script src="./split/report.js"></script>
<script src="./split/exparser.js"></script>
<script src="./split/exparser-behvaior.js"></script>
<script src="./split/define.js"></script>
<script src="./split/page.js"></script>
<!--{{allWXML}}-->
<!--{{eruda}}-->
<!--{{style}}-->
<!--{{currentstyle}}-->
<!--{{generateFunc}}-->
<script>
/*v0.7cc_20160919*/
var $gwxc
var $gaic={}
$gwx=function(path,global){
function _(a,b){b&&a.children.push(b);}
function _n(tag){$gwxc++;if($gwxc>=16000){throw 'enough, dom limit exceeded, you don\'t do stupid things, do you?'};return {tag:tag.substr(0,3)=='wx-'?tag:'wx-'+tag,attr:{},children:[]}}
function _s(scope,env,key){return typeof(scope[key])!='undefined'?scope[key]:env[key]}
function _wl(tname){console.warn('template `' + tname + '` is being call recursively, will be stop.')}
function _ai(i,p,e,me){var x=_grp(p,e,me);if(x)i.push(x);else{console.warn('path `'+p+'` not found from `'+me+'`')}}
function _grp(p,e,me){if(p[0]!='/'){var mepart=me.split('/');mepart.pop();var ppart=p.split('/');for(var i=0;i<ppart.length;i++){if( ppart[i]=='..')mepart.pop();else if(!ppart[i])continue;else mepart.push(ppart[i]);}p=mepart.join('/');}if(me[0]=='.'&&p[0]=='/')p='.'+p;if(e[p])return p;if(e[p+'.wxml'])return p+'.wxml';}
function _gd(p,c,e,d){if(d[p][c])return d[p][c];for(var x=e[p].i.length-1;x>=0;x--){if(d[e[p].i[x]][c])return d[e[p].i[x]][c]};var ii=_gapi(e,p);for(var x=0;x<ii.length;x++){if(d[ii[x]][c])return d[ii[x]][c]}}
function _gapi(e,p){if($gaic[p]){return $gaic[p]};var ret=[],q=[],h=0,t=0,put={},visited={};q.push(p);visited[p]=true;t++;while(h<t){var a=q[h++];for(var i=0;i<e[a].ic.length;i++){var nd=e[a].ic[i];var np=_grp(nd,e,a);if(np&&!visited[np]){visited[np]=true;q.push(np);t++;}}for(var i=0;a!=p&&i<e[a].ti.length;i++){var ni=e[a].ti[i];var nm=_grp(ni,e,a);if(nm&&!put[nm]){put[nm]=true;ret.push(nm);}}}$gaic[p]=ret;return ret;}
var $ixc={};function _ic(p,ent,me,e,s,r,gg){var x=_grp(p,ent,me);if(x){if($ixc[x]){console.warn('`'+p+'` is being included in a loop, will be stop');return;}$ixc[x]=true;try{ent[x].f(e,s,r,gg)}catch(e){}$ixc[x]=false;}else{console.warn('included path `'+p+'` not found from `'+me+'`')}}
var e_={}
if(global&&typeof(global.entrys)=='object')e_=global.entrys
var d_={}
if(global&&typeof(global.defines)=='object')d_=global.defines
var p_={}
var cs
d_['index.wxml']={}
var m0=function(e,s,r,gg){
cs.push("index.wxml:view:1:1")
var uB=_n('view')
uB.attr.class="btn-area"
cs.push("index.wxml:view:2:4")
var hC=_n('view')
hC.attr.class="body-view"
cs.push("index.wxml:text:3:6")
var aD=_n('text')
var oE="Hacking"
oE=oE.toString()
_(aD,oE)
cs.pop()
_(hC,aD)
cs.push("index.wxml:view:4:6")
var jF=_n('view')
cs.push("index.wxml:block:5:7")
var aG=function(kI,cH,yJ,gg){
cs.push("index.wxml:icon:6:8")
var bL=_n('icon')
var lM=_s(cH,kI,'item')
bL.attr.size=typeof(lM)=='undefined'?'':lM
bL.attr.type="success"
cs.pop()
_(yJ,bL)
return yJ
}
var sO=[]
var bP=20
sO.push(bP)
var hQ=30
sO.push(hQ)
var uR=40
sO.push(uR)
var aS=50
sO.push(aS)
var hT=60
sO.push(hT)
var eU=70
sO.push(eU)
var cN=typeof(sO)=='undefined'?'':sO
cN=cN||[]
var eW={}
for(var _x in s)eW[_x]=s[_x]
for(var rV=0;rV<cN.length;rV++){
eW.index=rV
eW.item=cN[rV]
aG(e,eW,jF,gg)
}
cs.pop()
cs.pop()
_(hC,jF)
cs.push("index.wxml:view:9:6")
var nX=_n('view')
cs.push("index.wxml:text:10:7")
var dY=_n('text')
var oZ="当前,只有渲染wxml部分是工作的~~~~"
oZ=oZ.toString()
_(dY,oZ)
cs.pop()
_(nX,dY)
cs.push("index.wxml:button:11:7")
var u1=_n('button')
u1.attr.bindtap="add"
var h2="add line"
h2=h2.toString()
_(u1,h2)
cs.pop()
_(nX,u1)
cs.push("index.wxml:button:12:7")
var u3=_n('button')
u3.attr.bindtap="remove"
var i4="remove line"
i4=i4.toString()
_(u3,i4)
cs.pop()
_(nX,u3)
cs.pop()
_(hC,nX)
cs.pop()
_(uB,hC)
cs.pop()
_(r,uB)
return r
}
e_["index.wxml"]={f:m0,i:[],ti:[],ic:[]}
if(path&&e_[path]){
return function(env,global){$gwxc=0;var root={"tag":"wx-page"};root.children=[]
var main=e_[path].f
cs=[]
try{
main(env,{},root,global);
}catch(err){
console.log(cs, env);
console.log(err)
}
return root;
}
}
}
</script>
</head>
<body>
<div id="app"></div>
</body>
<script>
document.dispatchEvent(new CustomEvent("generateFuncReady", {
detail: {
generateFunc: $gwx('index.wxml')
}
}))
</script>
<script>
define("app.js", function(require, module){var window={Math:Math}/*兼容babel*/,location,document,navigator,self,localStorage,history,Caches;
App({
onLaunch: function () {
}
})
});
require("app.js");
define("pages/index/index.js", function(require, module){var window={Math:Math}/*兼容babel*/,location,document,navigator,self,localStorage,history,Caches;
var app = getApp();
var initData = 'this is first line\nthis is second line'
var extraLine = [];
Page({
data: {
text: initData
},
add: function(e) {
extraLine.push('other line')
console.log(e);
this.setData({
text: initData + '\n' + extraLine.join('\n')
})
},
remove: function(e) {
if (extraLine.length > 0) {
extraLine.pop()
this.setData({
text: initData + '\n' + extraLine.join('\n')
})
}
}
}) });
require("pages/index/index.js");
</script>
</html>