From 66ed8a2bc791a1f4b1cb188de7f6f89dc91b1034 Mon Sep 17 00:00:00 2001 From: TxZgX <86029709+xuegao-tzx@users.noreply.github.com> Date: Thu, 23 Dec 2021 23:31:56 +0800 Subject: [PATCH] a --- .../36d48c2c0aa8cb6b91428b9d2d791dcae782d636 | 14 +++++++------- .../.idea/sonarlint/issuestore/index.pb | 16 ++++++++-------- MyApplication2/entry/src/main/config.json | 2 +- .../src/main/js/default/pages/index/index.hml | 2 +- .../src/main/js/default/pages/index/index.js | 19 +++++++++++++++++++ .../src/main/js/default/pages/page0/page0.js | 13 +------------ 6 files changed, 37 insertions(+), 29 deletions(-) diff --git a/MyApplication2/.idea/sonarlint/issuestore/3/6/36d48c2c0aa8cb6b91428b9d2d791dcae782d636 b/MyApplication2/.idea/sonarlint/issuestore/3/6/36d48c2c0aa8cb6b91428b9d2d791dcae782d636 index 0c5eb19..042d017 100644 --- a/MyApplication2/.idea/sonarlint/issuestore/3/6/36d48c2c0aa8cb6b91428b9d2d791dcae782d636 +++ b/MyApplication2/.idea/sonarlint/issuestore/3/6/36d48c2c0aa8cb6b91428b9d2d791dcae782d636 @@ -1,8 +1,8 @@ -wjavascript:S3776#"TRefactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.(8/ -javascript:S4165("eReview this redundant assignment: "start" already holds the assigned value along all execution paths.(8/ -javascript:S41652"eReview this redundant assignment: "start" already holds the assigned value along all execution paths.(8/ -Ejavascript:S1656S""'this.best' is assigned to itself.(8/ -Jjavascript:S1125Z"'Remove the unnecessary boolean literal.(8/ -Jjavascript:S1125p"'Remove the unnecessary boolean literal.(8/ -Jjavascript:S1125p"'Remove the unnecessary boolean literal.(8/ \ No newline at end of file +wjavascript:S37766"TRefactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.(8/ +javascript:S4165;"eReview this redundant assignment: "start" already holds the assigned value along all execution paths.(8/ +javascript:S4165E"eReview this redundant assignment: "start" already holds the assigned value along all execution paths.(8/ +Ejavascript:S1656f""'this.best' is assigned to itself.(8/ +Jjavascript:S1125m"'Remove the unnecessary boolean literal.(8/ +Kjavascript:S1125"'Remove the unnecessary boolean literal.(8/ +Kjavascript:S1125"'Remove the unnecessary boolean literal.(8/ \ No newline at end of file diff --git a/MyApplication2/.idea/sonarlint/issuestore/index.pb b/MyApplication2/.idea/sonarlint/issuestore/index.pb index 60b7500..3c5f77c 100644 --- a/MyApplication2/.idea/sonarlint/issuestore/index.pb +++ b/MyApplication2/.idea/sonarlint/issuestore/index.pb @@ -7,17 +7,17 @@ q Aentry/src/main/java/com/xcl20481/myapplication/MyApplication.java,1\5\15c2c2374b51ddda965f123d7721b78051be2c9f P entry/src/main/js/default/app.js,b\4\b4c4e536f4084a0b6a45f8b0d2725567135b92e6 +^ +.entry/src/main/js/default/pages/index/index.js,3\6\36d48c2c0aa8cb6b91428b9d2d791dcae782d636 +^ +.entry/src/main/js/default/pages/page0/page0.js,e\7\e76da2df200fc79b254b005f068d568bf8c2b7ec +J +entry/src/main/config.json,1\0\10f965cf51fe14a5ef0ca2ebefb1bd7e4607eeb2 _ -/entry/src/main/js/default/pages/index/index.hml,e\b\eb4272ef57a8e412e241acf56c46fd3c2ccd3848 +/entry/src/main/js/default/pages/page0/page0.css,3\b\3bb84a6effd773d95ed647597ffe3ad387fdfbcf _ /entry/src/main/js/default/pages/index/index.css,b\d\bded84c8d7c3dc43c805144b684b7e76d317f963 _ /entry/src/main/js/default/pages/page0/page0.hml,6\2\6288971498872deb62c5e285d192d813e22b1c1c -^ -.entry/src/main/js/default/pages/index/index.js,3\6\36d48c2c0aa8cb6b91428b9d2d791dcae782d636 _ -/entry/src/main/js/default/pages/page0/page0.css,3\b\3bb84a6effd773d95ed647597ffe3ad387fdfbcf -^ -.entry/src/main/js/default/pages/page0/page0.js,e\7\e76da2df200fc79b254b005f068d568bf8c2b7ec -J -entry/src/main/config.json,1\0\10f965cf51fe14a5ef0ca2ebefb1bd7e4607eeb2 \ No newline at end of file +/entry/src/main/js/default/pages/index/index.hml,e\b\eb4272ef57a8e412e241acf56c46fd3c2ccd3848 \ No newline at end of file diff --git a/MyApplication2/entry/src/main/config.json b/MyApplication2/entry/src/main/config.json index 6b7970e..49b15fc 100644 --- a/MyApplication2/entry/src/main/config.json +++ b/MyApplication2/entry/src/main/config.json @@ -7,7 +7,7 @@ "vendor": "xcl20481", "version": { "code": 1000000, - "name": "1.0.2" + "name": "1.1.0" } }, "deviceConfig": { diff --git a/MyApplication2/entry/src/main/js/default/pages/index/index.hml b/MyApplication2/entry/src/main/js/default/pages/index/index.hml index 1f6a975..4740b1f 100644 --- a/MyApplication2/entry/src/main/js/default/pages/index/index.hml +++ b/MyApplication2/entry/src/main/js/default/pages/index/index.hml @@ -6,7 +6,7 @@ Score:{{score}} -
+
{{$item.text}} diff --git a/MyApplication2/entry/src/main/js/default/pages/index/index.js b/MyApplication2/entry/src/main/js/default/pages/index/index.js index e5880af..a339afb 100644 --- a/MyApplication2/entry/src/main/js/default/pages/index/index.js +++ b/MyApplication2/entry/src/main/js/default/pages/index/index.js @@ -1,5 +1,6 @@ import brightness from '@system.brightness'; import vibrator from '@system.vibrator'; +import prompt from '@system.prompt'; let numbers,newNumbers; export default{ data:{ @@ -14,6 +15,18 @@ export default{ this.tiles=[{text:""},{text:""},{text:""},{text:""},{text:""},{text:""},{text:""},{text:""},{text:""},{text:""},{text:""},{text:""},{text:""},{text:""},{text:""},{text:""}]; numbers=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; newNumbers=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; + vibrator.vibrate({ + mode: 'short', + success: function(ret) { + console.log('tzx vibrate is successful'); + }, + fail: function(ret) { + console.log('tzx vibrate is failed'); + }, + complete: function(ret) { + console.log('tzx vibrate is completed'); + } + }); this.supplyNumber(); this.supplyNumber(); this.updateView(); @@ -32,6 +45,12 @@ export default{ newNumbers[positions[h]]=4; } }, + ToAbout(){ + prompt.showToast({ + message: '这是小草林开发的2048小游戏', + duration: 4567, + }); + }, onSwipe(e) { newNumbers=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; let start=0,differ=0,step=0; diff --git a/MyApplication2/entry/src/main/js/default/pages/page0/page0.js b/MyApplication2/entry/src/main/js/default/pages/page0/page0.js index a1a936d..9cc5e0f 100644 --- a/MyApplication2/entry/src/main/js/default/pages/page0/page0.js +++ b/MyApplication2/entry/src/main/js/default/pages/page0/page0.js @@ -20,13 +20,6 @@ export default { break; } }, - onlongpress(){ - console.log('tzx 11'); - prompt.showToast({ - message: 'Message Info', - duration: 2000, - }); - }, ToStart(){ vibrator.vibrate({ mode: 'short', @@ -42,17 +35,13 @@ export default { }); prompt.showToast({ message: '开始成功,By Xcl!', - duration: 3000, + duration: 3579, }); router.replace({ uri: "pages/index/index", }); }, ToClose(){ - prompt.showToast({ - message: '退出成功!', - duration: 3500, - }); vibrator.vibrate({ mode: 'short', success: function(ret) {