图片
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="classDetail">
|
<div class="classDetail">
|
||||||
<div class="media">
|
<div class="media">
|
||||||
<img src="./img/bg.png" alt="">
|
<img src="./img/jige.png" alt="">
|
||||||
<!-- <video src="./img/2676.mp4" controls/> -->
|
<!-- <video src="./img/2676.mp4" controls/> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -140,12 +140,30 @@ export default {
|
|||||||
confirm() {
|
confirm() {
|
||||||
uni.navigateTo({url: './result'})
|
uni.navigateTo({url: './result'})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/*
|
||||||
|
给定一个字符串 s ,找到 它的第一个不重复的字符,并返回它的索引 。如果不存在,则返回 -1 。
|
||||||
|
s = "leetcode" . => 0
|
||||||
|
s = "loveleetcode" => 2
|
||||||
|
*/
|
||||||
|
firstUniqChar(str) {
|
||||||
|
for(let i=0; i<=str.length; i++) {
|
||||||
|
// let sum = 0;
|
||||||
|
for(let x=0;x<str.length;x++) {
|
||||||
|
if(str[i] === str[x] && i!=x) {
|
||||||
|
console.log(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// return -1
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
this.current ++;
|
this.current ++;
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
// this.createdTime = Date.parse(new Date())
|
// this.createdTime = Date.parse(new Date())
|
||||||
|
this.firstUniqChar('leetcode')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user