There are many ways for Vue to request data: officially provided modules,
Such as: vue-resource, axios, fetch-jsonp.
GitHub official website (https://github.com) search: vue-resource
If you do not write package.json, the project will be packaged and sent to others, and others will not be able to use it;
Place the obtained data into a list:
Traverse title:
Vue-resource request data method:
=Error message========================== =====================
There are many ways for Vue to request data: officially provided modules,
Such as: vue-resource, axios, fetch-jsonp.
GitHub official website (https://github.com) search: vue-resource
1. Install vue-resource, command: npm install vue-resource –save
2. If you do not write package.json, the project will be packaged and sent to others, and others will not be able to use it;
GET request URL: http://www.phonegap100.com/appapi.php?a=getPortalList & amp;catid=20 & amp;page=1
{ <!-- --> "url": "http://www.phonegap100.com/appapi.php?a=getPortalList & amp;catid=20 & amp;page=1", "ok": true, "status": 200, "statusText": "OK", "headers": { <!-- --> "map": { <!-- --> "content-type": [ "text/html; charset=utf-8" ] } }, "body": { <!-- --> "result": [ { <!-- --> "aid": "507", "catid": "20", "username": "admin", "title": "Nestjs imitates Xiaomi Mall enterprise-level Nodejs project practical video tutorial", "pic": "", "dateline": "1610684312" }, { <!-- --> "aid": "506", "catid": "20", "username": "admin", "title": "Ionic5 + Vue3 + Capacitor creates a cross-platform installable App", "pic": "", "dateline": "1610684259" }, { <!-- --> "aid": "505", "catid": "20", "username": "admin", "title": "Electron + Vue cross-platform desktop software development video tutorial - building a public opinion monitoring system", "pic": "", "dateline": "1610684183" }, { <!-- --> "aid": "504", "catid": "20", "username": "admin", "title": "Golang + Beego + Grom imitation Xiaomi mall project practical video tutorial", "pic": "", "dateline": "1610684097" }, { <!-- --> "aid": "503", "catid": "20", "username": "admin", "title": "Flutter imitation Jingdong Mall project practical video tutorial", "pic": "", "dateline": "1610682120" }, { <!-- --> "aid": "499", "catid": "20", "username": "admin", "title": "[The first in China] Free download of WeChat mini program video tutorials", "pic": "portal/201610/13/211832yvlbybpl3rologrr.jpg", "dateline": "1476364740" }, { <!-- --> "aid": "498", "catid": "20", "username": "admin", "title": "Detailed explanation of CORS for ionic domain resource sharing", "pic": "", "dateline": "1472952906" }, { <!-- --> "aid": "497", "catid": "20", "username": "admin", "title": "Mobile touch sliding js plug-in_html5 mobile carousel plug-in", "pic": "portal/201606/28/211604ullzo5arr4iurnum.jpg", "dateline": "1467119820" }, { <!-- --> "aid": "496", "catid": "20", "username": "admin", "title": "Will programmers be replaced by robots in the future?", "pic": "portal/201606/02/221818eafffffm4srfdf4s.jpg", "dateline": "1464874140" }, { <!-- --> "aid": "495", "catid": "20", "username": "admin", "title": "Hammer Safety Hammer_Hammer really has a "hammer": car charger + safety hammer", "pic": "portal/201605/20/213752f6i56f1e0hbfzhkb.jpg", "dateline": "1463751505" }, { <!-- --> "aid": "494", "catid": "20", "username": "admin", "title": "What can html5 do_What development can html5 do?", "pic": "", "dateline": "1463664540" }, { <!-- --> "aid": "493", "catid": "20", "username": "admin", "title": "Ping An Pocket Bank App adopts Cordova hybrid development", "pic": "", "dateline": "1463294580" }, { <!-- --> "aid": "492", "catid": "20", "username": "admin", "title": "JavaScript Emoji expression library_js expression library similar to qq WeChat", "pic": "portal/201604/25/084907r2e3im3dvd1q3f7z.jpg", "dateline": "1461545392" }, { <!-- --> "aid": "491", "catid": "20", "username": "admin", "title": "cordova hot update plug-in-do not release the application market dynamic update APP source code", "pic": "portal/201604/12/152638zaxz5xz3t58bfts2.png", "dateline": "1460446140" }, { <!-- --> "aid": "490", "catid": "20", "username": "admin", "title": "New regulations from the central bank! Alipay and WeChat users should not forget to do this", "pic": "portal/201603/29/144942tcnnenueefagukfk.jpg", "dateline": "1459234206" }, { <!-- --> "aid": "471", "catid": "20", "username": "admin", "title": "How to choose HTML5 mobile app development framework", "pic": "portal/201511/15/163112q4kz6k2rgcgpi1tc.jpg", "dateline": "1457771160" }, { <!-- --> "aid": "488", "catid": "20", "username": "admin", "title": "Pure CSS3 animated button effect, can be used for mobile wap app development", "pic": "portal/201603/09/202742r1kngyt17na7n1nk.jpg", "dateline": "1457526780" }, { <!-- --> "aid": "487", "catid": "20", "username": "admin", "title": "Jingdong loses hundreds of millions every day_Can't plagiarize or plagiarize? You will die at the starting point of the next stop of the Internet! ...", "pic": "portal/201603/02/155825h28zxs2vsxjccv4c.jpg", "dateline": "1456905746" }, { <!-- --> "aid": "486", "catid": "20", "username": "admin", "title": "Which one is better, ionic react-native or native, to develop mobile apps", "pic": "portal/201602/25/193433dtzfvlzl1oavhljy.jpg", "dateline": "1456398960" }, { <!-- --> "aid": "484", "catid": "20", "username": "admin", "title": "These 12 lines of code will crash your computer and restart your phone in minutes", "pic": "", "dateline": "1453426595" } ] }, "bodyText": "{"result":[{"aid":"507","catid":"20","username":"admin", "title":"Nestjs\\仿\\小\\米\\商\\城\\企\\业\\级Nodejs\\项\\目\\实\\战\\视\ u9891\\教\\程","pic":"","dateline":"1610684312"},{"aid":"506","catid ":"20","username":"admin","title":"Ionic5 + Vue3 + Capacitor\\打\\造\\跨\\平\\台\ \可\\以\\安\\装\\的App","pic":"","dateline":"1610684259"},{"aid":" 505","catid":"20","username":"admin","title":"Electron + Vue\\跨\\平\\台\ u684c\面\软\件\开\发\视\频\教\程-\打\造\舆\情\监\控\系 \\统","pic":"","dateline":"1610684183"},{"aid":"504","catid":\ "20","username":"admin","title":"Golang + Beego + Grom\\仿\\小\\米\\商\\城\\项\ u76ee\\实\\战\\视\\频\\教\\程","pic":"","dateline":"1610684097"},{"aid ":"503","catid":"20","username":"admin","title":"Flutter\\仿\\京\ u4e1c\\商\\城\\项\\目\\实\\战\\视\\频\\教\\程","pic":"","dateline" :"1610682120"},{"aid":"499","catid":"20","username":"admin","title" :"\【\国\内\首\家\】\微\信\小\程\序\视\频\教\程\ u514d\\费\\下\\载","pic":"portal\/201610\/13\/211832yvlbybpl3rologrr.jpg","dateline":"1476364740" },{"aid":"498","catid":"20","username":"admin","title":"ionic\ u57df\\资\\源\\共\\享 CORS \\详\\解","pic":"","dateline":"1472952906"},{" aid":"497","catid":"20","username":"admin","title":"\\移\\动\ u7aef\\触\\摸\\滑\\动js\\插\\件_html5\\手\\机\\端\\轮\\播\\插\\件","pic":\ "portal\/201606\/28\/211604ullzo5arr4iurnum.jpg","dateline":"1467119820"},{"aid":"496","catid" :"20","username":"admin","title":"\\未\\来\\程\\序\\员\\会\\被\ u673a\\器\\人\\取\\代\\吗\\?","pic":"portal\/201606\/02\/221818eafffffm4srfdf4s.jpg"," dateline":"1464874140"},{"aid":"495","catid":"20","username":"admin"," title":"\\锤\\子\\安\\全\\锤_\\锤\\子\\真\\的\\出\\了\\个\\“\\锤\ u5b50\\”\\:\\车\\充\\+\\安\\全\\锤","pic":"portal\/201605\/20\/213752f6i56f1e0hbfzhkb. jpg","dateline":"1463751505"},{"aid":"494","catid":"20","username":" admin","title":"html5\\能\\做\\什\\么_html5\\能\\做\\哪\\些\\开\\发\\?",\ "pic":"","dateline":"1463664540"},{"aid":"493","catid":"20"," username":"admin","title":"\平\安\口\袋\银\行App\采\用-Cordova\混\合 \\开\\发","pic":"","dateline":"1463294580"},{"aid":"492","catid\ ":"20","username":"admin","title":"JavaScript Emoji \\表\\情\\库_js \\类\\似\\于qq\ u5fae\\信\\的\\表\\情\\库","pic":"portal\/201604\/25\/084907r2e3im3dvd1q3f7z.jpg","dateline" :"1461545392"},{"aid":"491","catid":"20","username":"admin","title" :"cordova\\热\\更\\新\\插\\件-\\不\\发\\布\\应\\用\\市\\场\\动\\态\\更 \\新APP\\源\\码","pic":"portal\/201604\/12\/152638zaxz5xz3t58bfts2.png","dateline":"1460446140"} ,{"aid":"490","catid":"20","username":"admin","title":"\\央\ \行\新\规\uuff01\支\付\宝\、\微\信\用\户\别\忘\做\这\件 \\事","pic":"portal\/201603\/29\/144942tcnnenueefagukfk.jpg","dateline":"1459234206"},{"aid\ ":"471","catid":"20","username":"admin","title":"HTML5 \\移\\动app\\开 \\发\\框\\架\\该\\如\\何\\选\\择","pic":"portal\/201511\/15\/163112q4kz6k2rgcgpi1tc.jpg ","dateline":"1457771160"},{"aid":"488","catid":"20","username":"admin ","title":"\u7ea