浏览代码

comentario

christian 4 年前
父节点
当前提交
577e531046
共有 66 个文件被更改,包括 164 次插入335 次删除
  1. 13
    11
      platforms/android/app/src/main/assets/www/index.html
  2. 1
    1
      platforms/android/app/src/main/assets/www/js/renglones.js
  3. 3
    3
      platforms/android/app/src/main/assets/www/js/saveLocal.js
  4. 0
    1
      platforms/browser/www/Server/BARRO.json
  5. 0
    1
      platforms/browser/www/Server/CRISTAL.json
  6. 0
    1
      platforms/browser/www/Server/CUERO.json
  7. 0
    1
      platforms/browser/www/Server/FIBRAS .json
  8. 0
    1
      platforms/browser/www/Server/HIGÜERA.json
  9. 0
    1
      platforms/browser/www/Server/INSTRUMENTOS TÍPICOS.json
  10. 0
    1
      platforms/browser/www/Server/JUGUETES TRADICIONALES.json
  11. 0
    1
      platforms/browser/www/Server/LABORES EN AGUJA.json
  12. 0
    1
      platforms/browser/www/Server/MADERA.json
  13. 0
    1
      platforms/browser/www/Server/METAL.json
  14. 0
    1
      platforms/browser/www/Server/MÁSCARAS.json
  15. 0
    1
      platforms/browser/www/Server/TABACOS.json
  16. 0
    1
      platforms/browser/www/Server/TEXTILES.json
  17. 0
    76
      platforms/browser/www/Server/driveToJson.php
  18. 0
    1
      platforms/browser/www/Server/renglones.json
  19. 0
    1
      platforms/browser/www/data/BARRO.json
  20. 0
    1
      platforms/browser/www/data/CARETAS.json
  21. 0
    1
      platforms/browser/www/data/CRISTAL.json
  22. 0
    1
      platforms/browser/www/data/CUERO.json
  23. 0
    1
      platforms/browser/www/data/FIBRAS.json
  24. 0
    1
      platforms/browser/www/data/HIGÜERA.json
  25. 0
    1
      platforms/browser/www/data/INSTRUMENTOSTÍPICOS.json
  26. 0
    1
      platforms/browser/www/data/JUGUETESTRADICIONALES.json
  27. 0
    1
      platforms/browser/www/data/LABORESENAGUJA.json
  28. 0
    1
      platforms/browser/www/data/MADERA.json
  29. 0
    1
      platforms/browser/www/data/METAL.json
  30. 0
    1
      platforms/browser/www/data/TABACOS.json
  31. 0
    1
      platforms/browser/www/data/TEXTILES.json
  32. 0
    76
      platforms/browser/www/data/driveToJson.php
  33. 0
    1
      platforms/browser/www/data/renglones.json
  34. 0
    0
      platforms/browser/www/img/Barro.jpg
  35. 0
    0
      platforms/browser/www/img/Cristal.jpg
  36. 0
    0
      platforms/browser/www/img/Cuero.jpg
  37. 0
    0
      platforms/browser/www/img/Fibras.jpg
  38. 0
    0
      platforms/browser/www/img/Higüera.jpg
  39. 0
    0
      platforms/browser/www/img/Instrumento musical.jpg
  40. 0
    0
      platforms/browser/www/img/Juguetes tradicional.jpg
  41. 0
    0
      platforms/browser/www/img/Labores en aguja.jpg
  42. 0
    0
      platforms/browser/www/img/Madera.jpg
  43. 0
    0
      platforms/browser/www/img/Metal.jpg
  44. 0
    0
      platforms/browser/www/img/Tabacos.jpg
  45. 0
    0
      platforms/browser/www/img/Textiles.jpg
  46. 73
    67
      platforms/browser/www/index.html
  47. 7
    7
      platforms/browser/www/js/azar.js
  48. 1
    7
      platforms/browser/www/js/load.js
  49. 25
    27
      platforms/browser/www/js/renglones.js
  50. 6
    6
      platforms/browser/www/js/saveLocal.js
  51. 0
    0
      www/img/Barro.jpg
  52. 0
    0
      www/img/Cristal.jpg
  53. 0
    0
      www/img/Cuero.jpg
  54. 0
    0
      www/img/Fibras.jpg
  55. 0
    0
      www/img/Higüera.jpg
  56. 0
    0
      www/img/Instrumento musical.jpg
  57. 0
    0
      www/img/Juguetes tradicional.jpg
  58. 0
    0
      www/img/Labores en aguja.jpg
  59. 0
    0
      www/img/Madera.jpg
  60. 0
    0
      www/img/Metal.jpg
  61. 0
    0
      www/img/Tabacos.jpg
  62. 0
    0
      www/img/Textiles.jpg
  63. 17
    12
      www/index.html
  64. 7
    7
      www/js/azar.js
  65. 5
    1
      www/js/renglones.js
  66. 6
    6
      www/js/saveLocal.js

+ 13
- 11
platforms/android/app/src/main/assets/www/index.html
文件差异内容过多而无法显示
查看文件


+ 1
- 1
platforms/android/app/src/main/assets/www/js/renglones.js 查看文件

@@ -17,7 +17,7 @@ var list = document.getElementById("list");
17 17
           }
18 18
 
19 19
 
20
-request.send()  /*`<ons-card onclick="fn.pushPage({'id':'artesanias.html','title':'${info[i].Renglones}','esp': '${info[i].Especificaciones}'})">
20
+  /*`<ons-card onclick="fn.pushPage({'id':'artesanias.html','title':'${info[i].Renglones}','esp': '${info[i].Especificaciones}'})">
21 21
                         <div class="title">${info[i].Renglones}</div>
22 22
                         <div class="content"><img class="list-item__thumbnail" src="img/${info[i].Renglones}.png"></div>
23 23
                     </ons-card>`*/

+ 3
- 3
platforms/android/app/src/main/assets/www/js/saveLocal.js 查看文件

@@ -26,9 +26,10 @@ function checkDate() {
26 26
 
27 27
 try {
28 28
   if (checkDate() == false) {
29
-                
29
+
30 30
     window.localStorage.setItem("RENGLONES", loadFile("https://artesaniaspr.online/renglones.json"));
31
-                  
31
+    window.localStorage.setItem("TODOS", loadFile("https://artesaniaspr.online/artesanias.json"))
32
+
32 33
     var renglones = JSON.parse(window.localStorage.getItem("RENGLONES"));
33 34
 
34 35
     for (var i = 0; i < renglones.length; i++) {
@@ -38,4 +39,3 @@ try {
38 39
   } catch {
39 40
     console.log("error");
40 41
   }
41
-  

+ 0
- 1
platforms/browser/www/Server/BARRO.json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/Server/CRISTAL.json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/Server/CUERO.json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/Server/FIBRAS .json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/Server/HIGÜERA.json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/Server/INSTRUMENTOS TÍPICOS.json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/Server/JUGUETES TRADICIONALES.json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/Server/LABORES EN AGUJA.json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/Server/MADERA.json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/Server/METAL.json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/Server/MÁSCARAS.json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/Server/TABACOS.json 查看文件

@@ -1 +0,0 @@
1
-[{"Nombre":"\u00c1ngel Otero Cotto","Especificaciones":"Cigarros, Mascadura","Tel\u00e9fono 1":"(939) 350-4999","E-mail":"papiroscigars@gmail.com","Municipio":"Cidra PR","id":0},{"Nombre":"\u00c1ngel Otero Vicente","Especificaciones":"Cigarros, Mascadura","Tel\u00e9fono 1":"(787) 595-1431","E-mail":"papiroscigars@gmail.com","Municipio":"Cidra PR","id":1},{"Nombre":"Angelo Vel\u00e1zquez Santiago","Especificaciones":"Cigarros","Tel\u00e9fono 1":"(787) 396-0941","E-mail":"velazquezcigars@hotmail.com","Municipio":"Aguas Buenas PR","id":2},{"Nombre":"Carlos M. Del Valle Mel\u00e9ndez","Especificaciones":"Cigarros","Tel\u00e9fono 1":"(787) 380-9122","E-mail":"cdelvalle1229@yahoo.com","Municipio":"Gu\u00e1nica PR","id":3},{"Nombre":"Jos\u00e9 A. V\u00e9lez Burgos","Especificaciones":"Cigarros, Muebles, Restaurador","Tel\u00e9fono 1":"(787) 648-2858","E-mail":"velez.jose751@gmail.com","Municipio":"Yauco PR","id":4},{"Nombre":"Patricio A. Pe\u00f1a","Especificaciones":"","Tel\u00e9fono 1":"(787) 785-8619","E-mail":"","Municipio":"Bayam\u00f3n PR","id":5}]

+ 0
- 1
platforms/browser/www/Server/TEXTILES.json
文件差异内容过多而无法显示
查看文件


+ 0
- 76
platforms/browser/www/Server/driveToJson.php 查看文件

@@ -1,76 +0,0 @@
1
-<?php
2
-header('Content-type: application/json');
3
- 
4
-
5
- 
6
-// Function to convert CSV into associative array
7
-function csvToArray($file, $delimiter) { 
8
-  if (($handle = fopen($file, 'r')) !== FALSE) { 
9
-    $i = 0; 
10
-    while (($lineArray = fgetcsv($handle, 4000, $delimiter, '"')) !== FALSE) { 
11
-      for ($j = 0; $j < count($lineArray); $j++) { 
12
-        $arr[$i][$j] = $lineArray[$j]; 
13
-      } 
14
-      $i++; 
15
-    } 
16
-    fclose($handle); 
17
-  } 
18
-  return $arr; 
19
-} 
20
- 
21
-function formatArray ($feed) {
22
-
23
-  $keys = array();
24
-  $newArray = array();
25
-  $data = csvToArray($feed, ',');
26
- 
27
-  $count = count($data) - 1;
28
- 
29
-  $labels = array_shift($data);  
30
- 
31
-  foreach ($labels as $label) {
32
-    $keys[] = $label;
33
-  }
34
- 
35
-  $keys[] = 'id';
36
- 
37
-  for ($i = 0; $i < $count; $i++) {
38
-    $data[$i][] = $i;
39
-  }
40
- 
41
-  for ($j = 0; $j < $count; $j++) {
42
-    $d = array_combine($keys, $data[$j]);
43
-    $newArray[$j] = $d;
44
-  }
45
-
46
-  return $newArray;
47
-
48
-}
49
- 
50
-$feed = 'https://docs.google.com/spreadsheets/d/e/2PACX-1vQUspPunAmkZrtfhMgMvGYGTK_4ONsCnSoe6OcTFc-4ILRHTatdPIwgRx1eRM1qFTkYFMrvcx8OI4cv/pub?output=csv';
51
-
52
-$data = formatArray($feed);
53
-
54
-$info = json_encode($data);
55
-
56
-$infoAsJson = json_decode($info);
57
-
58
-
59
-
60
-$handle = fopen("renglones.json", 'w');
61
-fwrite($handle, $info);
62
-
63
-
64
-
65
-for ($i = 0; $i < count($infoAsJson); $i++) {
66
-  $renglon = formatArray($infoAsJson[$i]->Link);
67
-  $renglonInfo = json_encode($renglon);
68
-  $renglonAsJson = json_decode($renglonInfo);
69
-  
70
-  $my_file = $infoAsJson[$i]->Renglones . ".json";
71
-  $handle = fopen($my_file, 'w') or die ('Cannot open file');
72
-  fwrite($handle, $renglonInfo);
73
-
74
-}
75
-
76
-?>

+ 0
- 1
platforms/browser/www/Server/renglones.json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/data/BARRO.json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/data/CARETAS.json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/data/CRISTAL.json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/data/CUERO.json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/data/FIBRAS.json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/data/HIGÜERA.json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/data/INSTRUMENTOSTÍPICOS.json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/data/JUGUETESTRADICIONALES.json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/data/LABORESENAGUJA.json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/data/MADERA.json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/data/METAL.json
文件差异内容过多而无法显示
查看文件


+ 0
- 1
platforms/browser/www/data/TABACOS.json 查看文件

@@ -1 +0,0 @@
1
-[{"Nombre":"\u00c1ngel Otero Cotto","Especificaciones":"Cigarros, Mascadura","Tel\u00e9fono 1":"(939) 350-4999","E-mail":"papiroscigars@gmail.com","Municipio":"Cidra PR","id":0},{"Nombre":"\u00c1ngel Otero Vicente","Especificaciones":"Cigarros, Mascadura","Tel\u00e9fono 1":"(787) 595-1431","E-mail":"papiroscigars@gmail.com","Municipio":"Cidra PR","id":1},{"Nombre":"Angelo Vel\u00e1zquez Santiago","Especificaciones":"Cigarros","Tel\u00e9fono 1":"(787) 396-0941","E-mail":"velazquezcigars@hotmail.com","Municipio":"Aguas Buenas PR","id":2},{"Nombre":"Carlos M. Del Valle Mel\u00e9ndez","Especificaciones":"Cigarros","Tel\u00e9fono 1":"(787) 380-9122","E-mail":"cdelvalle1229@yahoo.com","Municipio":"Gu\u00e1nica PR","id":3},{"Nombre":"Jos\u00e9 A. V\u00e9lez Burgos","Especificaciones":"Cigarros, Muebles, Restaurador","Tel\u00e9fono 1":"(787) 648-2858","E-mail":"velez.jose751@gmail.com","Municipio":"Yauco PR","id":4},{"Nombre":"Patricio A. Pe\u00f1a","Especificaciones":"","Tel\u00e9fono 1":"(787) 785-8619","E-mail":"","Municipio":"Bayam\u00f3n PR","id":5}]

+ 0
- 1
platforms/browser/www/data/TEXTILES.json
文件差异内容过多而无法显示
查看文件


+ 0
- 76
platforms/browser/www/data/driveToJson.php 查看文件

@@ -1,76 +0,0 @@
1
-<?php
2
-header('Content-type: application/json');
3
- 
4
-
5
- 
6
-// Function to convert CSV into associative array
7
-function csvToArray($file, $delimiter) { 
8
-  if (($handle = fopen($file, 'r')) !== FALSE) { 
9
-    $i = 0; 
10
-    while (($lineArray = fgetcsv($handle, 4000, $delimiter, '"')) !== FALSE) { 
11
-      for ($j = 0; $j < count($lineArray); $j++) { 
12
-        $arr[$i][$j] = $lineArray[$j]; 
13
-      } 
14
-      $i++; 
15
-    } 
16
-    fclose($handle); 
17
-  } 
18
-  return $arr; 
19
-} 
20
- 
21
-function formatArray ($feed) {
22
-
23
-  $keys = array();
24
-  $newArray = array();
25
-  $data = csvToArray($feed, ',');
26
- 
27
-  $count = count($data) - 1;
28
- 
29
-  $labels = array_shift($data);  
30
- 
31
-  foreach ($labels as $label) {
32
-    $keys[] = $label;
33
-  }
34
- 
35
-  $keys[] = 'id';
36
- 
37
-  for ($i = 0; $i < $count; $i++) {
38
-    $data[$i][] = $i;
39
-  }
40
- 
41
-  for ($j = 0; $j < $count; $j++) {
42
-    $d = array_combine($keys, $data[$j]);
43
-    $newArray[$j] = $d;
44
-  }
45
-
46
-  return $newArray;
47
-
48
-}
49
- 
50
-$feed = 'https://docs.google.com/spreadsheets/d/e/2PACX-1vQUspPunAmkZrtfhMgMvGYGTK_4ONsCnSoe6OcTFc-4ILRHTatdPIwgRx1eRM1qFTkYFMrvcx8OI4cv/pub?output=csv';
51
-
52
-$data = formatArray($feed);
53
-
54
-$info = json_encode($data);
55
-
56
-$infoAsJson = json_decode($info);
57
-
58
-
59
-
60
-$handle = fopen("renglones.json", 'w');
61
-fwrite($handle, $info);
62
-
63
-
64
-
65
-for ($i = 0; $i < count($infoAsJson); $i++) {
66
-  $renglon = formatArray($infoAsJson[$i]->Link);
67
-  $renglonInfo = json_encode($renglon);
68
-  $renglonAsJson = json_decode($renglonInfo);
69
-  
70
-  $my_file = $infoAsJson[$i]->Renglones . ".json";
71
-  $handle = fopen($my_file, 'w') or die ('Cannot open file');
72
-  fwrite($handle, $renglonInfo);
73
-
74
-}
75
-
76
-?>

+ 0
- 1
platforms/browser/www/data/renglones.json
文件差异内容过多而无法显示
查看文件


www/img/BARRO.jpg → platforms/browser/www/img/Barro.jpg 查看文件


www/img/CRISTAL.jpg → platforms/browser/www/img/Cristal.jpg 查看文件


www/img/CUERO.jpg → platforms/browser/www/img/Cuero.jpg 查看文件


www/img/FIBRAS.jpg → platforms/browser/www/img/Fibras.jpg 查看文件


www/img/HIGÜERA.jpg → platforms/browser/www/img/Higüera.jpg 查看文件


www/img/INSTRUMENTOS TÍPICOS.jpg → platforms/browser/www/img/Instrumento musical.jpg 查看文件


www/img/JUGUETES TRADICIONALES.jpg → platforms/browser/www/img/Juguetes tradicional.jpg 查看文件


www/img/LABORES EN AGUJA.jpg → platforms/browser/www/img/Labores en aguja.jpg 查看文件


www/img/MADERA.jpg → platforms/browser/www/img/Madera.jpg 查看文件


www/img/METAL.jpg → platforms/browser/www/img/Metal.jpg 查看文件


www/img/TABACOS.jpg → platforms/browser/www/img/Tabacos.jpg 查看文件


www/img/TEXTILES.jpg → platforms/browser/www/img/Textiles.jpg 查看文件


+ 73
- 67
platforms/browser/www/index.html
文件差异内容过多而无法显示
查看文件


+ 7
- 7
platforms/browser/www/js/azar.js 查看文件

@@ -1,17 +1,17 @@
1 1
 var request = new XMLHttpRequest()
2 2
 
3 3
                         request.open('GET', 'json/azar.json', true)
4
-    
4
+
5 5
                         request.onload = function() {
6 6
                             // begin accessing JSON data here
7 7
                             var data = JSON.parse(this.response)
8
-                            
8
+
9 9
                             var page = document.getElementById("home");
10
-                            
10
+
11 11
                                 var aleatorio = Math.floor(Math.random()*32);
12 12
                                 document.getElementById("image").innerHTML = `<img src="img/${aleatorio}.jpg" width="100%" height="300">`;
13 13
                                 document.getElementById("Content").innerHTML = data[aleatorio].Renglones + "<br>" + data[aleatorio].Artesano + "<br>" + data[aleatorio].Municipio;
14
-                          
14
+
15 15
                             page.addEventListener("show", function(event){
16 16
                                 document.getElementById("image").innerHTML='';
17 17
                                 document.getElementById("Content").innerHTML='';
@@ -23,7 +23,7 @@ var request = new XMLHttpRequest()
23 23
                                 document.getElementById("Content").innerHTML = data[aleatorio].Renglones + "<br>" + data[aleatorio].Artesano + "<br>" + data[aleatorio].Municipio;
24 24
                                 //azar.appendChild(img);
25 25
                             });
26
-                            
26
+
27 27
                             }
28
-    
29
-request.send() 
28
+
29
+request.send()

+ 1
- 7
platforms/browser/www/js/load.js 查看文件

@@ -16,10 +16,7 @@ window.fn.loadLink = function (url) {
16 16
 window.fn.pushPage = function (page, anim) {
17 17
 
18 18
 	//Open and send json file that is equivalent with the especification.
19
-	var request = new XMLHttpRequest();
20
-	request.open("GET", "Server/" + page.title.toUpperCase() + ".json", false);
21
-	request.send(null)
22
-	var artesanos = JSON.parse(request.responseText);
19
+	var artesanos = JSON.parse(window.localStorage.getItem(page.title.toUpperCase()));
23 20
 
24 21
   if (anim) {
25 22
     document.getElementById('myNavigator').pushPage(page.id, { data: { title: page.title, esp: page.esp, json: artesanos } , animation: anim });
@@ -27,6 +24,3 @@ window.fn.pushPage = function (page, anim) {
27 24
     document.getElementById('myNavigator').pushPage(page.id, { data: { title: page.title, esp: page.esp, json: artesanos } });
28 25
   }
29 26
 };
30
-
31
-
32
-

+ 25
- 27
platforms/browser/www/js/renglones.js 查看文件

@@ -1,29 +1,27 @@
1
-var request = new XMLHttpRequest()
2
-
3
-request.open('GET', 'json/renglones.json', true)
4
-
5
-request.onload = function() {
6
-  // begin accessing JSON data here
7
-  var info = JSON.parse(this.response)
8
-        
9
-  var list = document.getElementById("list");
10
-    
11
-    for (var i = 0; i < info.length; i++) {
12
-
13
-            var item = ons.createElement(`<ons-list-item expandable onclick="hideAll()">
14
-                        <div class="center">${info[i].Renglones}</div>
15
-                        <div class="right"><img class="list-item__thumbnail" src="img/${info[i].Renglones}.jpg"></div>
16
-                        <div class="expandable-content">
17
-                        <ons-list>
18
-                        <ons-list-item onclick="fn.pushPage({'id':'artesanos.html','title':'${info[i].Renglones}','esp': '${info[i].Especificaciones}'})">Artesanos</ons-list-item>
19
-                        <ons-list-item onclick="fn.pushPage({'id':'artesanias.html','title':'${info[i].Renglones}','esp': '${info[i].Especificaciones}'})">Productos</ons-list-item>
20
-                        </ons-list></div>
21
-                    </ons-list-item>`);
22
-            list.appendChild(item);
23
-            }
24
-        }
25
-    
26
-request.send()  /*`<ons-card onclick="fn.pushPage({'id':'artesanias.html','title':'${info[i].Renglones}','esp': '${info[i].Especificaciones}'})">
1
+var info = JSON.parse(window.localStorage.getItem("RENGLONES"));
2
+
3
+
4
+
5
+var list = document.getElementById("list");
6
+
7
+  for (var i = 0; i < info.length; i++) {
8
+
9
+          
10
+
11
+          var item = ons.createElement(`<ons-list-item expandable onclick="hideAll()">
12
+                      <div class="center">${info[i].Renglones}</div>
13
+                      <div class="right"><img class="list-item__thumbnail" src="img/${info[i].Renglones}.jpg"></div>
14
+                      <div class="expandable-content">
15
+                      <ons-list>
16
+                      <ons-list-item onclick="fn.pushPage({'id':'artesanos.html','title':'${info[i].Renglones}','esp': '${info[i].Especificaciones}'})">Artesanos</ons-list-item>
17
+                      <ons-list-item onclick="fn.pushPage({'id':'artesanias.html','title':'${info[i].Renglones}','esp': '${info[i].Especificaciones}'})">Productos</ons-list-item>
18
+                      </ons-list></div>
19
+                  </ons-list-item>`);
20
+          list.appendChild(item);
21
+          }
22
+
23
+
24
+  /*`<ons-card onclick="fn.pushPage({'id':'artesanias.html','title':'${info[i].Renglones}','esp': '${info[i].Especificaciones}'})">
27 25
                         <div class="title">${info[i].Renglones}</div>
28 26
                         <div class="content"><img class="list-item__thumbnail" src="img/${info[i].Renglones}.png"></div>
29
-                    </ons-card>`*/
27
+                    </ons-card>`*/

+ 6
- 6
platforms/browser/www/js/saveLocal.js 查看文件

@@ -13,7 +13,7 @@ function loadFile(filePath) {
13 13
 
14 14
 
15 15
 function checkDate() {
16
-  var date = loadFile("https://artesaniaspr.online/date.txt");
16
+  var date = loadFile("https://136.145.181.12/date.txt");
17 17
   if (window.localStorage.getItem("DATE") == null || window.localStorage.getItem("DATE") != date) {
18 18
   window.localStorage.setItem("DATE", date);
19 19
     return false;
@@ -26,16 +26,16 @@ function checkDate() {
26 26
 
27 27
 try {
28 28
   if (checkDate() == false) {
29
-                
30
-    window.localStorage.setItem("RENGLONES", loadFile("https://artesaniaspr.online/renglones.json"));
31
-                  
29
+
30
+    window.localStorage.setItem("RENGLONES", loadFile("https://136.145.181.12/renglones.json"));
31
+    window.localStorage.setItem("TODOS", loadFile("https://136.145.181.12/artesanias.json"))
32
+
32 33
     var renglones = JSON.parse(window.localStorage.getItem("RENGLONES"));
33 34
 
34 35
     for (var i = 0; i < renglones.length; i++) {
35
-      window.localStorage.setItem(renglones[i].Renglones, loadFile("https://artesaniaspr.online/" + renglones[i].Renglones + ".json"));
36
+      window.localStorage.setItem(renglones[i].Renglones, loadFile("https://136.145.181.12/" + renglones[i].Renglones + ".json"));
36 37
     }
37 38
   }
38 39
   } catch {
39 40
     console.log("error");
40 41
   }
41
-  

platforms/browser/www/img/BARRO.jpg → www/img/Barro.jpg 查看文件


platforms/browser/www/img/CRISTAL.jpg → www/img/Cristal.jpg 查看文件


platforms/browser/www/img/CUERO.jpg → www/img/Cuero.jpg 查看文件


platforms/browser/www/img/FIBRAS.jpg → www/img/Fibras.jpg 查看文件


platforms/browser/www/img/HIGÜERA.jpg → www/img/Higüera.jpg 查看文件


platforms/browser/www/img/INSTRUMENTOS TÍPICOS.jpg → www/img/Instrumento musical.jpg 查看文件


platforms/browser/www/img/JUGUETES TRADICIONALES.jpg → www/img/Juguetes tradicional.jpg 查看文件


platforms/browser/www/img/LABORES EN AGUJA.jpg → www/img/Labores en aguja.jpg 查看文件


platforms/browser/www/img/MADERA.jpg → www/img/Madera.jpg 查看文件


platforms/browser/www/img/METAL.jpg → www/img/Metal.jpg 查看文件


platforms/browser/www/img/TABACOS.jpg → www/img/Tabacos.jpg 查看文件


platforms/browser/www/img/TEXTILES.jpg → www/img/Textiles.jpg 查看文件


+ 17
- 12
www/index.html
文件差异内容过多而无法显示
查看文件


+ 7
- 7
www/js/azar.js 查看文件

@@ -1,17 +1,17 @@
1 1
 var request = new XMLHttpRequest()
2 2
 
3 3
                         request.open('GET', 'json/azar.json', true)
4
-    
4
+
5 5
                         request.onload = function() {
6 6
                             // begin accessing JSON data here
7 7
                             var data = JSON.parse(this.response)
8
-                            
8
+
9 9
                             var page = document.getElementById("home");
10
-                            
10
+
11 11
                                 var aleatorio = Math.floor(Math.random()*32);
12 12
                                 document.getElementById("image").innerHTML = `<img src="img/${aleatorio}.jpg" width="100%" height="300">`;
13 13
                                 document.getElementById("Content").innerHTML = data[aleatorio].Renglones + "<br>" + data[aleatorio].Artesano + "<br>" + data[aleatorio].Municipio;
14
-                          
14
+
15 15
                             page.addEventListener("show", function(event){
16 16
                                 document.getElementById("image").innerHTML='';
17 17
                                 document.getElementById("Content").innerHTML='';
@@ -23,7 +23,7 @@ var request = new XMLHttpRequest()
23 23
                                 document.getElementById("Content").innerHTML = data[aleatorio].Renglones + "<br>" + data[aleatorio].Artesano + "<br>" + data[aleatorio].Municipio;
24 24
                                 //azar.appendChild(img);
25 25
                             });
26
-                            
26
+
27 27
                             }
28
-    
29
-request.send() 
28
+
29
+request.send()

+ 5
- 1
www/js/renglones.js 查看文件

@@ -1,9 +1,13 @@
1 1
 var info = JSON.parse(window.localStorage.getItem("RENGLONES"));
2 2
 
3
+
4
+
3 5
 var list = document.getElementById("list");
4 6
 
5 7
   for (var i = 0; i < info.length; i++) {
6 8
 
9
+          
10
+
7 11
           var item = ons.createElement(`<ons-list-item expandable onclick="hideAll()">
8 12
                       <div class="center">${info[i].Renglones}</div>
9 13
                       <div class="right"><img class="list-item__thumbnail" src="img/${info[i].Renglones}.jpg"></div>
@@ -17,7 +21,7 @@ var list = document.getElementById("list");
17 21
           }
18 22
 
19 23
 
20
-request.send()  /*`<ons-card onclick="fn.pushPage({'id':'artesanias.html','title':'${info[i].Renglones}','esp': '${info[i].Especificaciones}'})">
24
+  /*`<ons-card onclick="fn.pushPage({'id':'artesanias.html','title':'${info[i].Renglones}','esp': '${info[i].Especificaciones}'})">
21 25
                         <div class="title">${info[i].Renglones}</div>
22 26
                         <div class="content"><img class="list-item__thumbnail" src="img/${info[i].Renglones}.png"></div>
23 27
                     </ons-card>`*/

+ 6
- 6
www/js/saveLocal.js 查看文件

@@ -13,7 +13,7 @@ function loadFile(filePath) {
13 13
 
14 14
 
15 15
 function checkDate() {
16
-  var date = loadFile("https://artesaniaspr.online/date.txt");
16
+  var date = loadFile("https://136.145.181.12/date.txt");
17 17
   if (window.localStorage.getItem("DATE") == null || window.localStorage.getItem("DATE") != date) {
18 18
   window.localStorage.setItem("DATE", date);
19 19
     return false;
@@ -26,16 +26,16 @@ function checkDate() {
26 26
 
27 27
 try {
28 28
   if (checkDate() == false) {
29
-                
30
-    window.localStorage.setItem("RENGLONES", loadFile("https://artesaniaspr.online/renglones.json"));
31
-                  
29
+
30
+    window.localStorage.setItem("RENGLONES", loadFile("https://136.145.181.12/renglones.json"));
31
+    window.localStorage.setItem("TODOS", loadFile("https://136.145.181.12/artesanias.json"))
32
+
32 33
     var renglones = JSON.parse(window.localStorage.getItem("RENGLONES"));
33 34
 
34 35
     for (var i = 0; i < renglones.length; i++) {
35
-      window.localStorage.setItem(renglones[i].Renglones, loadFile("https://artesaniaspr.online/" + renglones[i].Renglones + ".json"));
36
+      window.localStorage.setItem(renglones[i].Renglones, loadFile("https://136.145.181.12/" + renglones[i].Renglones + ".json"));
36 37
     }
37 38
   }
38 39
   } catch {
39 40
     console.log("error");
40 41
   }
41
-