commit 3c535138c723ecb41b5697516360ac182ab873e4 Author: unknown Date: Tue May 7 19:36:08 2024 +0800 Initial Commit 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/.gitignore b/.gitignore new file mode 100644 index 0000000..10fa70b --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# Windows +[Dd]esktop.ini +Thumbs.db +$RECYCLE.BIN/ + +# macOS +.DS_Store +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes + +# Node.js +node_modules/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..ed7d456 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +![](./images/1.png) \ No newline at end of file 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/images/1.png b/pages/images/1.png new file mode 100644 index 0000000..46e24b1 Binary files /dev/null and b/pages/images/1.png differ 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..36fff94 --- /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..de6146b --- /dev/null +++ b/project.config.json @@ -0,0 +1,43 @@ +{ + "appid": "touristappid", + "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 + }, + "condition": {}, + "editorSetting": { + "tabIndent": "insertSpaces", + "tabSize": 2 + }, + "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..3fde035 --- /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": "%25E3%2580%2590%25E6%25A1%2588%25E4%25BE%258B3-1%25E3%2580%2591%25E6%25AF%2594%25E8%25BE%2583%25E6%2595%25B0%25E5%25AD%2597%25E5%25A4%25A7%25E5%25B0%258F", + "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