質問編集履歴
1
コードの修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -11,11 +11,11 @@
|
|
11
11
|
よろしくお願いします。
|
12
12
|
|
13
13
|
```javascript
|
14
|
-
class
|
14
|
+
class webreq = class {
|
15
15
|
constructor( act, name, path) {
|
16
|
+
this.act = null;
|
16
17
|
this.url = null;
|
17
18
|
this.itemJson = null;
|
18
|
-
var listVideoData = null;
|
19
19
|
}
|
20
20
|
|
21
21
|
getXhr(){
|
@@ -33,15 +33,15 @@
|
|
33
33
|
const matches = resText.match(/var initialData = (.*?);</script>/);
|
34
34
|
if(matches){
|
35
35
|
resText = matches[1];
|
36
|
-
|
36
|
+
|
37
|
-
|
37
|
+
// ↓ class変数の代入ではなさそう
|
38
38
|
this.itemJson = JSON.parse(resText);
|
39
39
|
}
|
40
40
|
|
41
|
-
|
41
|
+
// this.act だとエラーになるので var act で受け取り
|
42
|
-
if( act ){
|
42
|
+
if( act ){
|
43
|
-
|
43
|
+
// ↓ ここでエラーになります。
|
44
|
-
|
44
|
+
this.setListVideoData();
|
45
45
|
}
|
46
46
|
}
|
47
47
|
}
|