12 Unstar Star 27 Fork 5

phodal / weapp-webdemowechat

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or download
index.html 5.17 KB
Copy Edit Web IDE Raw Blame History
Fengda HUANG authored 2016-09-26 22:16 . add rpx code
<!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/virtual_dom.js"></script>
<script src="./split/report.js"></script>
<script src="./split/exparser.js"></script>
<script src="./split/exparser-behavior.js"></script>
<script src="./split/define.js"></script>
<script src="./split/wx.js"></script>
<script src="./split/page.js"></script>
<!--{{allWXML}}-->
<!--{{eruda}}-->
<!--{{style}}-->
<!--{{currentstyle}}-->
<!--{{generateFunc}}-->
<script src="./build/index.js"></script>
<link rel="stylesheet" href="./build/index.css">
</head>
<body>
<div id="app"></div>
</body>
<script>
define("app.js", function (require, module) {
var window = {Math: Math}/*兼容babel*/, location, document, navigator, self, localStorage, history, Caches;
App({
onLaunch: function () {
this.globalData.motto = 'hello';
},
globalData: {
userInfo: {
nickName: 'Phodal',
avatarUrl: 'http://wx.qlogo.cn/mmhead/Q3auHgzwzM7pIm6FdyB5rlkI0JCr9uOr8n7aCIQ4RsyG0oPeicO9pfQ/132'
},
motto: 'hello,world'
}
})
});
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();
Page({
data: {
motto: 'Hello World',
userInfo: {}
},
//事件处理函数
bindViewTap: function () {
wx.navigateTo({
url: '../logs/logs'
})
},
onLoad: function () {
console.log('onLoad')
var that = this
//调用应用实例的方法获取全局数据
app.getUserInfo(function (userInfo) {
//更新数据
that.setData({
userInfo: userInfo
})
})
}
})
});
require("pages/index/index.js");
document.addEventListener("DOMContentLoaded", function () {
console.log("start");
document.dispatchEvent(new CustomEvent("generateFuncReady", {
detail: {
generateFunc: $gwx('src/index.wxml')
}
}))
});
</script>
</html>

Comment ( 0 )

Sign in for post a comment

wechat
1
https://gitee.com/phodal/weapp-webdemo.git
git@gitee.com:phodal/weapp-webdemo.git
phodal
weapp-webdemo
weapp-webdemo
master

Search

131423 f1aaba0b 1899542 094922 1c74bed3 1899542