diff --git a/pages/API/get-network-type/get-network-type.uvue b/pages/API/get-network-type/get-network-type.uvue index 0ef57cb590595e14d5e8f5fcfe0d5c351a4c1d60..aef82001acfa33b898a8432bc3341bca58cc6916 100644 --- a/pages/API/get-network-type/get-network-type.uvue +++ b/pages/API/get-network-type/get-network-type.uvue @@ -4,11 +4,11 @@ 网络状态 - + 未获取 请点击下面按钮获取网络状态 - + {{networkType}} diff --git a/pages/API/get-system-info/get-system-info.uvue b/pages/API/get-system-info/get-system-info.uvue index 83358ff6d66f7ed0a6004e3824751e0ff1ed4b71..8bd52c89cdaeb83d5bca843e34afdd45779c0300 100644 --- a/pages/API/get-system-info/get-system-info.uvue +++ b/pages/API/get-system-info/get-system-info.uvue @@ -154,10 +154,11 @@ this.windowHeight = res.windowHeight + ""; this.windowTop = res.windowTop + ""; this.windowBottom = res.windowBottom + ""; - if (res.statusBarHeight == null){ + const statusBarHeight = res.statusBarHeight; + if (statusBarHeight == null){ this.statusBarHeight = ""; }else{ - this.statusBarHeight = res.statusBarHeight!! + ""; + this.statusBarHeight = statusBarHeight + ""; } this.pixelRatio = res.pixelRatio + ""; this.SDKVersion = res.SDKVersion; diff --git a/pages/API/nodes-info/nodes-info.uvue b/pages/API/nodes-info/nodes-info.uvue index 00597a551a6353c5f97fe929639bb86d502d7de9..1f355a5892cfc9f4c896c8bea76c644a6a65510a 100644 --- a/pages/API/nodes-info/nodes-info.uvue +++ b/pages/API/nodes-info/nodes-info.uvue @@ -48,10 +48,7 @@ methods: { getNodeInfo() { uni.createSelectorQuery().select('.rect').boundingClientRect().exec((ret) => { - const rect = ret[0] as NodeInfo - if (rect != null) { - this.nodeInfo = rect - } + this.nodeInfo = ret[0] as NodeInfo }) } } diff --git a/pages/API/preview-image/preview-image.uvue b/pages/API/preview-image/preview-image.uvue index 91d94059924b80fd96793a6635673c7afd219944..c86506543fcc3af03d7fb1c2ffbcc96ebe076e22 100644 --- a/pages/API/preview-image/preview-image.uvue +++ b/pages/API/preview-image/preview-image.uvue @@ -4,7 +4,7 @@ 图片指示器样式 - {{item.name}} + {{item.name}} @@ -66,14 +66,14 @@ success: (e) => { this.imageList = this.imageList.concat(e.tempFilePaths) }, - fail(e) { + fail(_) { } }) }, onIndicatorChanged(e: RadioGroupChangeEvent) { this.currentIndicator = e.detail.value }, - onCheckboxChange(e: CheckboxGroupChangeEvent) { + onCheckboxChange(_: CheckboxGroupChangeEvent) { this.isLoop = !this.isLoop } } diff --git a/pages/API/storage/storage.uvue b/pages/API/storage/storage.uvue index 161a99090884140e1eafcce512324c34279c4701..74f4152afff8e60ff05ed8d55e7345e331731a88 100644 --- a/pages/API/storage/storage.uvue +++ b/pages/API/storage/storage.uvue @@ -240,13 +240,13 @@ this.key = '' this.data = '' uni.clearStorage({ - success:function(res){ + success:function(_){ uni.showModal({ title: '清除数据成功', showCancel: false }) }, - fail:function(res){ + fail:function(_){ uni.showModal({ title: '清除数据失败', showCancel: false diff --git a/pages/component/long-list/long-list.uvue b/pages/component/long-list/long-list.uvue index 5b2e5f0a30b9ad9bcab5d2cf55ec8d1963182295..1a7bd42c463f90da5268edc257519c33161f9c4d 100644 --- a/pages/component/long-list/long-list.uvue +++ b/pages/component/long-list/long-list.uvue @@ -52,29 +52,27 @@ filePath:'static/list-mock/mock.json', success:function(result){ const content = result.data; - if (content != null){ - const items = [] as Item[]; - const jsonArr = JSON.parse(content); - jsonArr?.forEach((res)=>{ - const json = res as UTSJSONObject; - const title = json["title"] as string; - const subTitle = json["subTitle"] as string; - const img = json["img"] as string; - const detail = json["detail"] as string; - const item:Item = { - title, - subTitle, - img, - detail - } - items.push(item); - }) - let temp = [] as Item[]; - for(let i = 0; i < 100; i++){ - temp = temp.concat(items); + const items = [] as Item[]; + const jsonArr = JSON.parse(content); + jsonArr?.forEach((res)=>{ + const json = res as UTSJSONObject; + const title = json["title"] as string; + const subTitle = json["subTitle"] as string; + const img = json["img"] as string; + const detail = json["detail"] as string; + const item:Item = { + title, + subTitle, + img, + detail } - listData = temp; + items.push(item); + }) + let temp = [] as Item[]; + for(let i = 0; i < 100; i++){ + temp = temp.concat(items); } + listData = temp; setTimeout(()=>{ this.refresherTriggered = false },0); diff --git a/pages/component/scroll-view/scroll-view-refresher.uvue b/pages/component/scroll-view/scroll-view-refresher.uvue index b675b130e2ba4102fadb054d481cfce114e3a92b..e335a7eabb0c7315d4f13849fc24b58ece6fd568 100644 --- a/pages/component/scroll-view/scroll-view-refresher.uvue +++ b/pages/component/scroll-view/scroll-view-refresher.uvue @@ -32,7 +32,7 @@ }, methods: { - onRefresherrefresh(e: RefresherEvent) { + onRefresherrefresh(_: RefresherEvent) { console.log("onRefresherrefresh--------------下拉刷新触发") this.refresherTriggered = true setTimeout(function(){ @@ -40,10 +40,10 @@ }, 1500) }, - onRefresherabort(e: RefresherEvent) { + onRefresherabort(_: RefresherEvent) { console.log("onRefresherabort------下拉刷新被中止") }, - onRefresherrestore(e: RefresherEvent) { + onRefresherrestore(_: RefresherEvent) { console.log("onRefresherrestore------下拉刷新被复位") }, onRefresherpulling(e: RefresherEvent) { diff --git a/pages/component/video/video.uvue b/pages/component/video/video.uvue index f8a2d811b3f13a814fc92a8052bb0ccd2ceecffb..4a2796699b6db4eefe891cc7758bf962b7216296 100644 --- a/pages/component/video/video.uvue +++ b/pages/component/video/video.uvue @@ -381,7 +381,7 @@ onEnded: function (res : any) { console.log(JSON.stringify(res)); }, - onTimeUpdate: function (res : any) { + onTimeUpdate: function (_ : any) { // console.log(JSON.stringify(res)); }, onFullScreenChange: function (res : any) {