diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..115cc02 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,31 @@ +/* + * Eslint config file + * Documentation: https://eslint.org/docs/user-guide/configuring/ + * Install the Eslint extension before using this feature. + */ +module.exports = { + env: { + es6: true, + browser: true, + node: true, + }, + ecmaFeatures: { + modules: true, + }, + parserOptions: { + ecmaVersion: 2018, + sourceType: 'module', + }, + globals: { + wx: true, + App: true, + Page: true, + getCurrentPages: true, + getApp: true, + Component: true, + requirePlugin: true, + requireMiniProgram: true, + }, + // extends: 'eslint:recommended', + rules: {}, +} diff --git a/CC13%BG8@4B{RP%H_XL%KOA.png b/CC13%BG8@4B{RP%H_XL%KOA.png new file mode 100644 index 0000000..e14f55d Binary files /dev/null and b/CC13%BG8@4B{RP%H_XL%KOA.png differ diff --git a/README.md b/README.md index 13edbac..2147e51 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# as4 +![alt text](CC13%BG8@4B{RP%H_XL%KOA.png) diff --git a/app.js b/app.js new file mode 100644 index 0000000..4af33be --- /dev/null +++ b/app.js @@ -0,0 +1,2 @@ +// app.js +App({}) diff --git a/app.json b/app.json new file mode 100644 index 0000000..0468c99 --- /dev/null +++ b/app.json @@ -0,0 +1,8 @@ +{ + "pages": [ + "pages/index/index" + ], + "window": { + "navigationBarTextStyle": "white" + } +} \ No newline at end of file diff --git a/app.wxss b/app.wxss new file mode 100644 index 0000000..06c6fc9 --- /dev/null +++ b/app.wxss @@ -0,0 +1,10 @@ +/**app.wxss**/ +.container { + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-between; + padding: 200rpx 0; + box-sizing: border-box; +} diff --git a/as4 b/as4 new file mode 160000 index 0000000..2b177a8 --- /dev/null +++ b/as4 @@ -0,0 +1 @@ +Subproject commit 2b177a82beefa947c4fb19c3105fb07183241a0e diff --git a/pages/index/index.js b/pages/index/index.js new file mode 100644 index 0000000..0c40e27 --- /dev/null +++ b/pages/index/index.js @@ -0,0 +1,26 @@ +Page({ + num1: 0, + num2: 0, + num1Input: function (e) { + this.num1 = Number(e.detail.value) + }, + num2Input: function (e) { + this.num2 = Number(e.detail.value) + }, + data: { + result: '' + }, + compare: function () { + var str = '' + if (this.num1 > this.num2) { + str = '第1个数大' + } else if (this.num1 < this.num2) { + str = '第2个数大' + } else { + str = '两数相等' + } + this.setData({ + result: str + }) + } + }); \ No newline at end of file diff --git a/pages/index/index.json b/pages/index/index.json new file mode 100644 index 0000000..139ba9a --- /dev/null +++ b/pages/index/index.json @@ -0,0 +1,3 @@ +{ + "navigationBarTitleText": "比较数字大小" + } \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml new file mode 100644 index 0000000..ff36bb0 --- /dev/null +++ b/pages/index/index.wxml @@ -0,0 +1,12 @@ + +请输入第1个数字: + + + +请输入第2个数字: + + + + +比较结果:{{result}} + \ No newline at end of file diff --git a/pages/index/index.wxss b/pages/index/index.wxss new file mode 100644 index 0000000..37bd679 --- /dev/null +++ b/pages/index/index.wxss @@ -0,0 +1,21 @@ +/**index.wxss**/ +view { + margin: 50rpx; + } + + input { + width: 600rpx; + margin-top: 20rpx; + border-bottom: 2rpx solid #ccc; + } + + button { + margin: 50rpx; + } + + button { + color: #fff; + background: #369; + letter-spacing: 12rpx; + } + \ No newline at end of file diff --git a/project.config.json b/project.config.json new file mode 100644 index 0000000..82d7125 --- /dev/null +++ b/project.config.json @@ -0,0 +1,44 @@ +{ + "appid": "wxab7fd3ff45f7ccf3", + "compileType": "miniprogram", + "libVersion": "3.4.3", + "packOptions": { + "ignore": [], + "include": [] + }, + "setting": { + "coverView": true, + "es6": true, + "postcss": true, + "minified": true, + "enhance": true, + "showShadowRootInWxmlPanel": true, + "packNpmRelationList": [], + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + }, + "urlCheck": true, + "lazyloadPlaceholderEnable": false, + "preloadBackgroundData": false, + "autoAudits": false, + "uglifyFileName": false, + "uploadWithSourceMap": true, + "useMultiFrameRuntime": true, + "packNpmManually": false, + "minifyWXSS": true, + "useStaticServer": true, + "showES6CompileOption": false, + "checkInvalidKey": true, + "disableUseStrict": false, + "useCompilerPlugins": false, + "minifyWXML": true + }, + "condition": {}, + "editorSetting": { + "tabIndent": "insertSpaces", + "tabSize": 4 + }, + "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html" +} \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json new file mode 100644 index 0000000..489390c --- /dev/null +++ b/project.private.config.json @@ -0,0 +1,7 @@ +{ + "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", + "projectname": "%E6%AF%94%E8%BE%83%E6%95%B0%E5%AD%97%E5%A4%A7%E5%B0%8F", + "setting": { + "compileHotReLoad": true + } +} \ No newline at end of file diff --git a/sitemap.json b/sitemap.json new file mode 100644 index 0000000..cd24f35 --- /dev/null +++ b/sitemap.json @@ -0,0 +1,7 @@ +{ + "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", + "rules": [{ + "action": "allow", + "page": "*" + }] +} \ No newline at end of file