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/README.assets/image-20251119114005193.png b/README.assets/image-20251119114005193.png new file mode 100644 index 0000000..469e058 Binary files /dev/null and b/README.assets/image-20251119114005193.png differ diff --git a/README.md b/README.md index d12e87e..71cf41a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # abc +![image-20251119114005193](README.assets/image-20251119114005193.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..4b7c1de --- /dev/null +++ b/app.json @@ -0,0 +1,13 @@ +{ + "pages": [ + "pages/index/index" + ], + "window": { + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#fff", + "navigationBarTitleText": "Weixin", + "navigationBarTextStyle": "black" + }, + "style": "v2", + "sitemapLocation": "sitemap.json" +} \ 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/pages/index/index.js b/pages/index/index.js new file mode 100644 index 0000000..ef6c2f1 --- /dev/null +++ b/pages/index/index.js @@ -0,0 +1,27 @@ +// index.js +Page({ + data: { + result: '' + }, + num1: 0, // 保存第1个数字 + num2: 0, // 保存第2个数字 + num1Input: function (e) { + this.num1 = Number(e.detail.value) + }, + num2Input: function (e) { + this.num2 = Number(e.detail.value) + }, + 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..3f0560e --- /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..6eb3737 --- /dev/null +++ b/pages/index/index.wxml @@ -0,0 +1,13 @@ + + + 请输入第1个数字: + + + + 请输入第2个数字: + + + + + 比较结果:{{ result }} + diff --git a/pages/index/index.wxss b/pages/index/index.wxss new file mode 100644 index 0000000..3232cb1 --- /dev/null +++ b/pages/index/index.wxss @@ -0,0 +1,20 @@ +/**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; +} diff --git a/project.config.json b/project.config.json new file mode 100644 index 0000000..b385c59 --- /dev/null +++ b/project.config.json @@ -0,0 +1,49 @@ +{ + "appid": "wxb1bbf04abb56f7b0", + "compileType": "miniprogram", + "libVersion": "2.25.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, + "packNpmManually": false, + "minifyWXSS": true, + "useStaticServer": true, + "showES6CompileOption": false, + "checkInvalidKey": true, + "disableUseStrict": false, + "useCompilerPlugins": false, + "minifyWXML": true, + "compileWorklet": false, + "localPlugins": false, + "condition": false, + "swc": false, + "disableSWC": true + }, + "condition": {}, + "editorSetting": { + "tabIndent": "insertSpaces", + "tabSize": 2 + }, + "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", + "simulatorPluginLibVersion": {} +} \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json new file mode 100644 index 0000000..18556f1 --- /dev/null +++ b/project.private.config.json @@ -0,0 +1,24 @@ +{ + "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", + "projectname": "%E3%80%90%E6%A1%88%E4%BE%8B3-1%E3%80%91%E6%AF%94%E8%BE%83%E6%95%B0%E5%AD%97%E5%A4%A7%E5%B0%8F", + "setting": { + "compileHotReLoad": true, + "urlCheck": true, + "coverView": true, + "lazyloadPlaceholderEnable": false, + "skylineRenderEnable": false, + "preloadBackgroundData": false, + "autoAudits": false, + "useApiHook": true, + "useApiHostProcess": true, + "showShadowRootInWxmlPanel": true, + "useStaticServer": true, + "useLanDebug": false, + "showES6CompileOption": false, + "checkInvalidKey": true, + "ignoreDevUnusedFiles": true, + "bigPackageSizeSupport": false + }, + "libVersion": "2.25.3", + "condition": {} +} \ 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