码迷,mamicode.com
首页 > 其他好文 > 详细

2020.2.1

时间:2020-02-02 01:36:51      阅读:70      评论:0      收藏:0      [点我收藏+]

标签:onload   了解   nav   view   set   滚动   out   connect   pull   

今天对微信开发者工具的基本框架进行了了解和学习,对基本的执行情况进行了学习,知道了它的大致结构,该如何去写,这里应该写什么内容,并且掺杂跳转页面,进度条,滚动条等小的方面学习了一下

app.json

{
"pages": [
"pages/index/index",
"pages/logs/logs",
"mypage/mypage/mypage"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "微信",
"navigationBarTextStyle": "black",
"enablePullDownRefresh": true
},
"tabBar": {
"color": "#000",
"selectedColor": "#56abe4",
"backgroundColor": "#fff",
"borderStyle": "white",
"list": [
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "images/latest.png",
"selectedIconPath": "images/lastest_on.png"
},
{
"pagePath": "pages/logs/logs",
"text": "账单",
"iconPath": "images/hotest.png",
"selectedIconPath": "images/hotest_on.png"
},
{
"pagePath": "pages/mypage/mypage",
"text": "个人中心",
"iconPath": "images/hotest.png",
"selectedIconPath": "images/hotest_on.png"
}
]
},
"networkTimeout": {
"request": 10000,
"connectSocket": 1000,
"uploadFile": 1000,
"downloadFile": 10000
},
"debug": true,
"style": "v2",
"sitemapLocation": "sitemap.json"
}
mypage。js
Page({
data:{
mytext:‘my first text‘
},
onLoad:function(opt){
console.log(‘执行onLoad‘);
this.anyfunction();
},
anyfunction:function(){
console.log(‘执行anyfunction‘);
this.setData(
{
mytext:200
}
);
}

})
mypage.wxml
<view class="container">
<text>Hellow wechat app</text>
<button type="default" bindtap="anyfunction">测试</<button></button>
<text>{{mytext}}</text>
</view>

2020.2.1

标签:onload   了解   nav   view   set   滚动   out   connect   pull   

原文地址:https://www.cnblogs.com/PSLQYZ/p/12250625.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!