Commit 5609ea90 authored by 谢卓城's avatar 谢卓城

Merge branch 'master' of git.changein.cn:xzc168520/miniprogramtemplate

parents 12296d21 6af0b050
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
*/ */
Component({ Component({
properties: { properties: {
showDelect: Boolean, is: Boolean,
flexList: Array, list: Array,
title: String // 简化的定义方式 title: String // 简化的定义方式
}, },
externalClasses: ["super-class"], externalClasses: ["super-class"],
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
*/ */
Component({ Component({
properties: { properties: {
showDelect: Boolean, is: Boolean,
flexList: Array, list: Array,
title: String // 简化的定义方式 title: String // 简化的定义方式
}, },
externalClasses: ["super-class"], externalClasses: ["super-class"],
......
{ {
"navigationBarTitleText": "wx",
"usingComponents": {} "usingComponents": {}
} }
\ No newline at end of file
{ {
"navigationBarTitleText": "wx",
"usingComponents": {} "usingComponents": {}
} }
\ No newline at end of file
...@@ -7,6 +7,18 @@ ...@@ -7,6 +7,18 @@
终端运行:sh MiniprogramTemplate.sh <#生成模板路径#> 终端运行:sh MiniprogramTemplate.sh <#生成模板路径#>
``` ```
##### 安装依赖
```
终端运行:npm install && cd package && rm package-lock.json && npm install && sh miniprogramnpm.sh && cd ..
```
##### 运行
```
终端运行:npm run dev
```
### 使用 ### 使用
``` ```
......
export const EMPLOYEE_STATUS = {
NORMAL: {
value: 1,
desc: '正常'
},
DISABLED: {
value: 1,
desc: '禁用'
},
DELETED: {
value: 2,
desc: '已删除'
}
};
export default {
EMPLOYEE_STATUS
};
\ No newline at end of file
//index.js //index.js
const { getHomeList } = require("../../apis/root.js"); const { getData } = require("../../apis/index.js");
let app = getApp();
Page({ Page({
data: { data: {
...@@ -10,7 +12,7 @@ Page({ ...@@ -10,7 +12,7 @@ Page({
//事件处理函数 //事件处理函数
bindViewTap: function() { bindViewTap: function() {
// 网络请求 // 网络请求
getHomeList() getData()
.then(res => { .then(res => {
console.log("发起get请求-res", res); console.log("发起get请求-res", res);
}) })
...@@ -48,7 +50,7 @@ Page({ ...@@ -48,7 +50,7 @@ Page({
}, },
requestAction(e) { requestAction(e) {
// 网络请求 // 网络请求
getHomeList() getData()
.then(res => { .then(res => {
console.log("发起get请求-res", res); console.log("发起get请求-res", res);
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment