{"rsdb":{"rid":"374175","subhead":"","postdate":"0","aid":"262385","fid":"100","uid":"1","topic":"1","content":"
\n

\u5148\u6765\u8bf4\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u539f\u751f\u7684\u8bf7\u6c42\u63a5\u53e3\u65b9\u5f0f\u5427\uff0c\u5982\u5b98\u7f51\u6587\u6863\uff0c\u5728\u9875\u9762\u4e2d\u8bf7\u6c42\u76f4\u63a5\u8c03\u7528<\/p> \n

\u5728\u8fd9\u91cc\u611f\u8c22\u63a5\u7684\u662f\u63d0\u4f9b\u7684\u514d\u8d39\u63a5\u53e3https:\/\/blog.csdn.net\/c__chao\/article\/details\/78573737<\/p> \n

\n
wx.request({\r\n        url: <\/span>'<\/span>https:\/\/api.apiopen.top\/searchAuthors<\/span>'<\/span>, \/\/<\/span>\u4ec5\u4e3a\u793a\u4f8b\uff0c\u5e76\u975e\u771f\u5b9e\u7684\u63a5\u53e3\u5730\u5740<\/span>\r\n        data: {\r\n          name: <\/span>'<\/span>\u674e\u767d<\/span>'<\/span>\r\n        },\r\n        header: {\r\n          <\/span>'<\/span>content-type<\/span>'<\/span>: '<\/span>application\/json<\/span>'<\/span> \/\/<\/span> \u9ed8\u8ba4\u503c<\/span>\r\n        },\r\n        success (res) {\r\n          console.log(res.data.result)\r\n        }\r\n      })<\/span><\/pre> \n <\/div> \n 

\u597d\u4e86\uff0c\u4e0d\u5982\u6b63\u9898\u8bf4\u4e00\u4e0bFlyio\uff0c\u4f9d\u846b\u82a6\u753b\u74e2\u5199\u4e86\u4e00\u4e0b<\/p> \n

1.\u9996\u5148\u5b89\u88c5flyio<\/p> \n

\n
npm install flyio --save\r\n<\/pre> \n <\/div> \n 

\u30002.\u5f15\u5165flyio\u3002\u65b0\u5efa\u4e00\u4e2ajs\u6587\u4ef6\uff0crequest.js<\/p> \n

\n
import Vue from 'vue'\r\n\r\nconst Fly = require("flyio\/dist\/npm\/wx")\r\nconst fly = new Fly\r\nfly.config.baseURL = 'https:\/\/api.apiopen.top\/'\r\nVue.prototype.$http = fly\r\n\r\nexport default fly<\/pre> \n <\/div> \n 

\u8fd8\u53ef\u4ee5\u914d\u7f6e\u4f60\u7684\u62e6\u622a\u5668\u3001\u54cd\u5e94\u65f6\u95f4\u7b49\u3002\u3002\u3000\u3000<\/p> \n

3.\u9875\u9762\u4e2d\u8bf7\u6c42\u63a5\u53e3\uff0c\u8c03\u7528\u5c31\u53ef\u4ee5\u5566<\/p> \n

\n
import request from '@\/utils\/request'<\/pre> \n <\/div> \n 
\n
            getRequest(){\r\n                  request.<\/span>get<\/span>('<\/span>recommendPoetry<\/span>'<\/span>).then((d)=>{\r\n                    console.log(<\/span>this<\/span>.article = d.data.result)\r\n                  }).<\/span>catch<\/span>(error=>{\r\n                      console.log(error)\r\n                  })\r\n              }        <\/span><\/pre> \n <\/div> \n 

\u597d\u5566\uff0c\u8fd0\u884c\u4e00\u4e0b\uff0c\u5b8c\u7f8e<\/p> \n

\"\"<\/p> \n

 <\/p> \n<\/div>","orderid":"0","title":"\u5728mpvue\u5f15\u5165flyio","smalltitle":"","mid":"0","fname":"\u5176\u5b83","special_id":"0","bak_id":"0","info":"0","hits":"47","pages":"1","comments":"0","posttime":"2019-09-25 11:18:22","list":"1569381502","username":"admin","author":"","copyfrom":"","copyfromurl":"","titlecolor":"","fonttype":"0","titleicon":"0","picurl":"https:\/\/www.cppentry.com\/upload_files\/","ispic":"0","yz":"1","yzer":"","yztime":"0","levels":"0","levelstime":"0","keywords":"mpvue<\/A> \u5f15\u5165<\/A> flyio<\/A>","jumpurl":"","iframeurl":"","style":"","template":"a:3:{s:4:\"head\";s:0:\"\";s:4:\"foot\";s:0:\"\";s:8:\"bencandy\";s:0:\"\";}","target":"0","ip":"14.17.22.34","lastfid":"0","money":"0","buyuser":"","passwd":"","allowdown":"","allowview":"","editer":"","edittime":"0","begintime":"0","endtime":"0","description":"\u5728mpvue\u5f15\u5165flyio","lastview":"1713906026","digg_num":"0","digg_time":"0","forbidcomment":"0","ifvote":"0","heart":"","htmlname":"","city_id":"0"},"page":"1"}