outdoor.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. // 导入BoleMbti脚本
  2. // 引用Parse JS SDK
  3. const Parse = require("parse/node");
  4. Parse.initialize("dev"); // 设置applicationId
  5. Parse.serverURL = "http://web2023.fmode.cn:9999/parse"; // 设置serverURL
  6. let outdoor= [
  7. {
  8. "name": "山峰探险",
  9. "detail": "踏上征服该地区最高峰的惊险之旅。",
  10. "rating": 9.5,
  11. "image": "https://tse4-mm.cn.bing.net/th/id/OIP-C.dGrXl6o9hr0kz0KlQz4jlQHaIn?w=148&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  12. },
  13. {
  14. "name": "森林小径探索",
  15. "detail": "在导游的带领下,发现森林的奇迹。",
  16. "rating": 8.7,
  17. "image": "https://tse4-mm.cn.bing.net/th/id/OIP-C.NCWkXvoIc5oA32AwUKHqmgHaE8?w=282&h=188&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  18. },
  19. {
  20. "name": "湖泊皮划艇远征",
  21. "detail": "划过宁静的湖水,探索隐藏的小海湾。",
  22. "rating": 9.0,
  23. "image": "https://tse1-mm.cn.bing.net/th/id/OIP-C.xkecIavHjYqmMQduou3KCgHaE7?w=277&h=185&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  24. },
  25. {
  26. "name": "峡谷徒步之旅",
  27. "detail": "徒步穿越壮丽的峡谷,感受大自然的壮丽。",
  28. "rating": 8.8,
  29. "image": "https://tse2-mm.cn.bing.net/th/id/OIP-C.vB75xl4nuaBndyljx2HvvAHaE7?w=287&h=190&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  30. },
  31. {
  32. "name": "野外露营体验",
  33. "detail": "在大自然中露营,享受星空下的宁静。",
  34. "rating": 9.2,
  35. "image": "https://tse3-mm.cn.bing.net/th/id/OIP-C.udqi-p0CBbBQ7TD5-wqONwHaE7?w=260&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  36. },
  37. {
  38. "name": "滑雪乐园",
  39. "detail": "在雪白的坡道上尽情滑行,体验冬日的乐趣。",
  40. "rating": 9.4,
  41. "image": "https://tse4-mm.cn.bing.net/th/id/OIP-C.k8N5Ay-WvhYNU4UEcJCwXgHaEU?w=247&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  42. },
  43. {
  44. "name": "海滩瑜伽课程",
  45. "detail": "在海滩上练习瑜伽,感受海风的清新。",
  46. "rating": 8.6,
  47. "image": "https://tse1-mm.cn.bing.net/th/id/OIP-C.V3IDawispNb-4s2PVIRcZwHaE7?w=269&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  48. },
  49. {
  50. "name": "悬崖跳水挑战",
  51. "detail": "勇敢地跳下悬崖,体验极限挑战的刺激。",
  52. "rating": 9.7,
  53. "image": "https://tse4-mm.cn.bing.net/th/id/OIP-C.QrQEHhAX1fEBSsHLtFT5HgHaEK?w=282&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  54. },
  55. {
  56. "name": "草原骑行之旅",
  57. "detail": "骑行穿越广阔的草原,感受自然的纯粹。",
  58. "rating": 8.9,
  59. "image": "https://tse2-mm.cn.bing.net/th/id/OIP-C.gi2axq_oLwjKo53dYGco8wHaE7?w=275&h=183&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  60. },
  61. {
  62. "name": "瀑布探险",
  63. "detail": "探索壮丽的瀑布,感受水流的力量。",
  64. "rating": 9.3,
  65. "image": "https://tse4-mm.cn.bing.net/th/id/OIP-C.8qEdlyCsHVUcIOi4ezi9PAHaE7?w=258&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  66. },
  67. {
  68. "name": "星空露营之旅",
  69. "detail": "在夜晚的星空下露营,感受宇宙的浩瀚。",
  70. "rating": 9.1,
  71. "image": "https://tse4-mm.cn.bing.net/th/id/OIP-C.sp2AKWdjpS7GnbaIBvB1rAHaE8?w=276&h=184&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  72. },
  73. {
  74. "name": "山谷骑行挑战",
  75. "detail": "挑战陡峭的山谷,体验骑行的刺激。",
  76. "rating": 8.8,
  77. "image": "https://tse1-mm.cn.bing.net/th/id/OIP-C.PZgmNq6uIWbgPZ7Unr1GSQHaE7?w=273&h=182&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  78. },
  79. {
  80. "name": "湖边瑜伽修行",
  81. "detail": "在湖畔练习瑜伽,感受大自然的宁静。",
  82. "rating": 9.0,
  83. "image": "https://tse1-mm.cn.bing.net/th/id/OIP-C.2MEM0U7fzvMRODVgR5oioQHaE7?w=269&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  84. },
  85. {
  86. "name": "沙漠骆驼旅行",
  87. "detail": "乘坐骆驼穿越沙漠,体验异国风情。",
  88. "rating": 9.4,
  89. "image": "https://tse2-mm.cn.bing.net/th/id/OIP-C.rWyaPzvTo8DeC8ZeHA4YpAHaE7?w=279&h=186&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  90. },
  91. {
  92. "name": "滑翔伞飞行体验",
  93. "detail": "在空中飞翔,俯瞰壮丽的风景。",
  94. "rating": 9.6,
  95. "image": "https://tse1-mm.cn.bing.net/th/id/OIP-C.wuCG9dbQ2tfdNzrDRS5XFQHaE7?w=237&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  96. },
  97. {
  98. "name": "雨林探险之旅",
  99. "detail": "深入雨林,探寻热带植物与动物的奥秘。",
  100. "rating": 9.2,
  101. "image": "https://tse1-mm.cn.bing.net/th/id/OIP-C.kMLud3xbouK7VshD9bfJcgHaE6?w=280&h=186&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  102. },
  103. {
  104. "name": "冰川徒步探险",
  105. "detail": "徒步穿越冰川,感受冰雪世界的壮美。",
  106. "rating": 9.7,
  107. "image": "https://tse4-mm.cn.bing.net/th/id/OIP-C.2c2164ElnNAUCsv1o3IEMwHaE7?w=269&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  108. },
  109. {
  110. "name": "荒野求生挑战",
  111. "detail": "在荒野中挑战求生技能,体验生存的艰辛。",
  112. "rating": 8.9,
  113. "image": "https://tse3-mm.cn.bing.net/th/id/OIP-C.xtQKp2vGO-jlZ1pYwDGljQHaE8?w=245&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  114. },
  115. {
  116. "name": "极地探险之旅",
  117. "detail": "前往极地,探索冰雪世界的神秘。",
  118. "rating": 9.5,
  119. "image": "https://tse2-mm.cn.bing.net/th/id/OIP-C.yzdTWlXaUJ_rs_ZhO9MfjAAAAA?w=258&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  120. },
  121. {
  122. "name": "火山探险之旅",
  123. "detail": "探索活火山,感受火山的狂暴与美丽。",
  124. "rating": 9.3,
  125. "image": "https://tse3-mm.cn.bing.net/th/id/OIP-C.ZLkJRGwlit-TCqse0_jFFgHaEo?w=260&h=181&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  126. },
  127. {
  128. "name": "海岛探险之旅",
  129. "detail": "前往孤岛,探寻海岛的奇迹与秘密。",
  130. "rating": 9.1,
  131. "image": "https://tse4-mm.cn.bing.net/th/id/OIP-C.GgTqWhlZXiJIM06ZZIteBAHaFj?w=182&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  132. },
  133. {
  134. "name": "瀑布跳水挑战",
  135. "detail": "勇敢地跳入瀑布池中,体验挑战的乐趣。",
  136. "rating": 8.8,
  137. "image": "https://tse1-mm.cn.bing.net/th/id/OIP-C.iDPPIEGczta8cVbIuvr-OwHaEX?w=284&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  138. },
  139. {
  140. "name": "河流漂流探险",
  141. "detail": "漂流在急流险滩间,感受河流的激情。",
  142. "rating": 9.0,
  143. "image": "https://tse3-mm.cn.bing.net/th/id/OIP-C.AxyxSeGemoM2v1qmWU0zVwHaFj?w=221&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  144. },
  145. {
  146. "name": "悬崖攀岩挑战",
  147. "detail": "攀登陡峭悬崖,挑战自己的极限。",
  148. "rating": 9.4,
  149. "image": "https://tse1-mm.cn.bing.net/th/id/OIP-C.zwHWNJeHhwleh0hI9IytiwHaE5?w=248&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  150. },
  151. {
  152. "name": "湖泊钓鱼之旅",
  153. "detail": "在宁静的湖泊垂钓,享受钓鱼的乐趣。",
  154. "rating": 9.6,
  155. "image": "https://tse2-mm.cn.bing.net/th/id/OIP-C.Weo_lcRTm1MaPcapiL39JgHaE8?w=258&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  156. },
  157. {
  158. "name": "草原露营之旅",
  159. "detail": "在广袤的草原露营,感受大自然的宁静。",
  160. "rating": 9.2,
  161. "image": "https://tse4-mm.cn.bing.net/th/id/OIP-C.FXcTJuScH_KZ2BlxgF3npgHaEN?w=302&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  162. },
  163. {
  164. "name": "雪地滑雪探险",
  165. "detail": "滑行在洁白的雪地,体验雪地探险的乐趣。",
  166. "rating": 9.7,
  167. "image": "https://tse4-mm.cn.bing.net/th/id/OIP-C.O5FvDNSHHx-X0t9T5d37oAHaEK?w=270&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  168. },
  169. {
  170. "name": "海岸徒步之旅",
  171. "detail": "沿着海岸线徒步,感受海风的清新。",
  172. "rating": 8.9,
  173. "image": "https://tse3-mm.cn.bing.net/th/id/OIP-C.sUJ42tvc75-18SMSX2XoQQHaE7?w=298&h=199&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  174. },
  175. {
  176. "name": "热气球飞行体验",
  177. "detail": "乘坐热气球飞翔,俯瞰大地的壮丽。",
  178. "rating": 9.3,
  179. "image": "https://tse2-mm.cn.bing.net/th/id/OIP-C.deBeVl9iqp5_Au2ePk_pewHaE7?w=249&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  180. },
  181. {
  182. "name": "林间露营之旅",
  183. "detail": "在郁郁葱葱的森林中露营,感受大自然的怀抱。",
  184. "rating": 9.5,
  185. "image": "https://tse2-mm.cn.bing.net/th/id/OIP-C.PoVh9HV97rrQK3aZNa-0LwHaEp?w=282&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  186. },
  187. {
  188. "name": "湖畔野餐活动",
  189. "detail": "在湖边享受美味的野餐,感受自然的宁静。",
  190. "rating": 9.1,
  191. "image": "https://tse3-mm.cn.bing.net/th/id/OIP-C.MffzoBs9glXk_C6dKaRZNAHaE7?w=225&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  192. },
  193. {
  194. "name": "森林生存挑战",
  195. "detail": "在茂密森林中挑战生存技能,体验野外生活。",
  196. "rating": 8.8,
  197. "image": "https://tse3-mm.cn.bing.net/th/id/OIP-C.V3jtZawqZdPm7Mzp5b6YKAHaEK?w=312&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  198. },
  199. {
  200. "name": "山谷露营之旅",
  201. "detail": "在幽静山谷中搭起帐篷,享受大自然的美好。",
  202. "rating": 9.0,
  203. "image": "https://tse3-mm.cn.bing.net/th/id/OIP-C._5dhDFNUtUAHEJ9VL99SNQHaC7?w=336&h=138&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  204. },
  205. {
  206. "name": "冰川探险之旅",
  207. "detail": "探索冰川脚下的壮丽景观,感受冰雪世界的奇迹。",
  208. "rating": 9.4,
  209. "image": "https://tse4-mm.cn.bing.net/th/id/OIP-C.2c2164ElnNAUCsv1o3IEMwHaE7?w=270&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  210. },
  211. {
  212. "name": "荒漠沙漠之旅",
  213. "detail": "穿越广袤的沙漠,体验沙漠风情。",
  214. "rating": 9.6,
  215. "image": "https://tse4-mm.cn.bing.net/th/id/OIP-C.vuiKOX8lYil7yjrg0Gwm1gHaEK?w=289&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  216. },
  217. {
  218. "name": "湖泊皮划艇漂流",
  219. "detail": "在湖泊上划船漂流,享受水上乐趣。",
  220. "rating": 9.2,
  221. "image": "https://tse1-mm.cn.bing.net/th/id/OIP-C.WN_Bm7Up75R11Y5oqeC6ogHaE7?w=270&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  222. },
  223. {
  224. "name": "山顶日出观赏",
  225. "detail": "登上山顶,欣赏日出美景,感受大自然的魅力。",
  226. "rating": 9.7,
  227. "image": "https://tse1-mm.cn.bing.net/th/id/OIP-C.vh89hngzt0X6b48Y939XpQHaE7?w=261&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  228. },
  229. {
  230. "name": "滑雪跳台挑战",
  231. "detail": "挑战滑雪跳台,体验滑雪的刺激与挑战。",
  232. "rating": 9.3,
  233. "image": "https://tse3-mm.cn.bing.net/th/id/OIP-C.WZfNkfIbFkSDbzGsVcYSjwHaE7?w=270&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  234. },
  235. {
  236. "name": "海底潜水探险",
  237. "detail": "潜入海底,探索神秘海洋世界的奥秘。",
  238. "rating": 9.5,
  239. "image": "https://tse3-mm.cn.bing.net/th/id/OIP-C.1MvDrB6cqRcuEJ33KlZPYgHaG6?w=159&h=180&c=7&r=0&o=5&dpr=1.8&pid=1.7"
  240. }
  241. ];
  242. function importAll(){
  243. let LQLOutdoor= []
  244. Object.keys(outdoor).forEach(key=>{
  245. LQLOutdoor.push({
  246. // result:key,
  247. name:outdoor[key]?.name,
  248. detail:outdoor[key]?.detail,
  249. rating:outdoor[key]?.rating,
  250. image:outdoor[key]?.image,
  251. })
  252. })
  253. console.log(LQLOutdoor)
  254. LQLOutdoor.forEach(async mbti => {
  255. // 查重
  256. let exists = await checkExists(mbti)
  257. if(exists?.id) return;
  258. // 新增
  259. let LQLOutdoor = Parse.Object.extend("LQLOutdoor");
  260. let bm = new LQLOutdoor();
  261. bm.set(mbti);
  262. bm.save();
  263. });
  264. }
  265. async function checkExists(mbti){
  266. let query = new Parse.Query("LQLOutdoor");
  267. query.equalTo("result",mbti?.result);
  268. query.equalTo("name",mbti?.name);
  269. await query.first();
  270. return await query.first();
  271. }
  272. importAll()