小程序賬號(hào) 2792426034@qq.com
學(xué)習(xí)地址 http://www.reibang.com/p/97ef4d952ea2
AppID(小程序ID) wx3c228e355bdb598a
簡(jiǎn)易教程 基礎(chǔ)
app.wxss 小程序公共樣式表
#### wxss使view填充整個(gè)頁(yè)面
但是在微信小程序中根節(jié)點(diǎn)是page,所以我們需要對(duì)page賦值height:100%,再對(duì)其中的view賦值100%即可
page {
height: 100%;
background-color: #b6d5ed;
}
#### 通用樣色
.container {
height: 50%;
width: 50%;
background-color: rebeccapurple;
}
app.json 小程序公共設(shè)置
{
###### 設(shè)置頁(yè)面路徑
"pages":[
"pages/index/index",
"pages/logs/logs"
],
###### 用于設(shè)置小程序的狀態(tài)欄张漂、導(dǎo)航條茴迁、標(biāo)題、窗口背景色。
"window":{
"backgroundTextStyle":"light", 背景文本風(fēng)格
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "微信",
"navigationBarTextStyle":"black",
"backgroundColor": "#eeeeee" 窗口的背景色,下拉時(shí)的底部背景
},
###### tabBar 設(shè)置
"tabBar": {
"borderStyle": "white", tabbar上邊框的顏色垢啼, 僅支持 black/white
"color": "#000000", tab 上的文字默認(rèn)顏色
"selectedColor": "#ff5800", tab 上的文字選中時(shí)的顏色
"list": [
{
"pagePath": "pages/home/home",
"text": "首頁(yè)",
"iconPath": "image/homeNoSelect.png", 圖片路徑
"selectedIconPath": "image/homeSelect.png" 選中時(shí)的圖片路徑
},
{
"pagePath": "pages/category/category",
"text": "分類",
"iconPath": "image/categoryNoSelect.png",
"selectedIconPath": "image/categorySelect.png"
}
]
},
###### 可以設(shè)置各種網(wǎng)絡(luò)請(qǐng)求的超時(shí)時(shí)間
"networkTimeout": {
"request": 15000, 請(qǐng)求超時(shí)時(shí)間
"downloadFile": 15000 下載超時(shí)時(shí)間
},
###### 發(fā)者工具中開(kāi)啟 debug 模式
"debug": true
app.js
App({
onLaunch: function () {
},
/*********** 全局data **************/
globalData: {
ClientId: 'https7e6d0aa52ced8c2f6150c259ada51401',
ClientSecret: '710ae677b55612f545557dd43bac0ed9',
},
/*********** 自定義data **************/
myData: {
userName: "longma"
},
})