feat: 更新lint配置,优化代码格式化和修复脚本;修改配网逻辑中的变量名以提高可读性
This commit is contained in:
parent
f34f3aa14a
commit
0cc4dc3ec5
@ -1,4 +1,9 @@
|
||||
{
|
||||
"src/**/*.{vue,js}": ["npm run prettier", "npm run eslint"],
|
||||
"src/**/*.{vue,scss,css,less}": ["npm run stylelint:out"]
|
||||
}
|
||||
"*.{vue,js}": [
|
||||
"prettier --write",
|
||||
"eslint --fix"
|
||||
],
|
||||
"*.{vue,scss,css,less}": [
|
||||
"stylelint --fix"
|
||||
]
|
||||
}
|
||||
@ -32,6 +32,7 @@
|
||||
"vite-plugin-eslint": "^1.8.1"
|
||||
},
|
||||
"scripts": {
|
||||
"prepare": "husky install",
|
||||
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,vue,json,css,scss}\"",
|
||||
"format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,vue,json,css,scss}\"",
|
||||
"lint": "eslint --fix \"**/*.{js,jsx,ts,tsx,vue}\"",
|
||||
|
||||
@ -77,11 +77,12 @@
|
||||
|
||||
const pending = ref(false)
|
||||
|
||||
const result = ref(false)
|
||||
const requestResult = ref(false)
|
||||
|
||||
onMounted(async () => {
|
||||
uni.showLoading({
|
||||
title: '搜索中'
|
||||
title: '搜索中',
|
||||
mask: true
|
||||
})
|
||||
const result = await $bluetooth.getWifiList({
|
||||
uid: $user.userInfo.uid.toString()
|
||||
@ -124,7 +125,7 @@
|
||||
}
|
||||
})
|
||||
uni.$on('distributionNetworkResult', async data => {
|
||||
result.value = false
|
||||
requestResult.value = false
|
||||
uni.hideLoading()
|
||||
pending.value = false
|
||||
if (data.status === 0) {
|
||||
@ -190,10 +191,10 @@
|
||||
})
|
||||
|
||||
if (res.code === 0) {
|
||||
result.value = true
|
||||
requestResult.value = true
|
||||
setTimeout(() => {
|
||||
pending.value = false
|
||||
if (result.value) {
|
||||
if (requestResult.value) {
|
||||
uni.showToast({
|
||||
title: '配网失败,请检查密码是否正确',
|
||||
icon: 'none'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user