小程序 学习笔记1

编写Hello 大成!

1.微信小程序 注册一个微信公众号,

2.下载微信开发工具

3.编写hello代码

目录定义为hello

分别贴入代码:

helloworld.js

Page({})

helloworld.json 

 

{"name":"keny123"}

helloworld.wxss 定义字体

view {

width: 100%;

height: 100rpx;

text-align: center;

}

 

helloworld.wxml

<view>Hello 大成!</view>

app.js

App({})

app.json

{

"pages":[

"pages/hello/helloworld"

]

}

project.config.js

{

"miniprogramRoot": "./",

"pluginRoot": "./",

"compileType": "miniprogram",

"setting": {

"urlCheck": true,

"es6": true,

"postcss": true,

"minified": true,

"newFeature": true,

"autoAudits": false,

"nodeModules": true

},

"appid": "你微信公众号的appid",

"projectname": "你的姓名名称",

"simulatorType": "wechat",

"simulatorPluginLibVersion": {},

"condition": {}

}