给博客弄了个百度小程序,发现没有tkd,哪位帮我看看怎么加
wordpress+微慕插件+uniapp的前端
用的是这个
https://ext.dcloud.net.cn/plu...
比如首页的代码是,官方的tdk文档是这样的
https://smartprogram.baidu.co...
怎么加,加到哪个地方
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{"1e74":function(e,t,a){"use strict";a.r(t);var n=a("abf9"),s=a("ea86");for(var i in s)"default"!==i&&function(e){a.d(t,e,(function(){return s[e]}))}(i);a("b217");var o,r=a("f0c5"),l=Object(r["a"])(s["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],o);t["default"]=l.exports},"35f2":function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(a("3684"));function s(e){return e&&e.__esModule?e:{default:e}}function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var o=a("55d2"),r=a("c82b"),l=(a("3025"),a("f24c")),c=a("1aef"),u=n.default.getPageCount,d=n.default.getWebsiteName,g=n.default.getDomain,f={data:function(){return{postsList:[],postsShowSwiperList:[],isLastPage:!1,page:1,search:"",categories:0,showerror:"none",showCategoryName:"",categoryName:"",showallDisplay:"block",displayHeader:"none",displaySwiper:"none",floatDisplay:"none",displayfirstSwiper:"none",listAdsuccess:!0,webSiteName:d,domain:g,isFirst:!1,isLoading:!1,swipe_nav:[],selected_nav:[]}},components:{},props:{},onShareAppMessage:function(){return{title:"“"+d+"”小程序,基于微慕WordPress版小程序构建",path:"pages/index/index",success:function(e){},fail:function(e){}}},onPullDownRefresh:function(){var e=this;e.setData({showerror:"none",showallDisplay:"block",displaySwiper:"none",floatDisplay:"none",isLastPage:!1,page:1,postsShowSwiperList:[],listAdsuccess:!0}),this.getHomeconfig(),this.fetchPostsData(e)},onReachBottom:function(){var e=this;e.isLastPage?console.log("最后一页"):(e.setData({page:e.page+1}),console.log("当前页"+e.page),this.fetchPostsData(e))},onLoad:function(t){var a=this;e.setNavigationBarTitle({title:d}),c.setInterstitialAd("enable_index_interstitial_ad"),a.fetchPostsData(a);var n=e.getStorageSync("isFirst");n||(a.setData({isFirst:!0}),e.setStorageSync("isFirst","no"),setTimeout((function(){a.setData({isFirst:!1})}),5e3)),this.getHomeconfig()},onShow:function(t){e.setStorageSync("openLinkCount",0);var a=new Date;a=a.getFullYear()+"-"+(a.getMonth()+1)+"-"+a.getDate(),a=new Date(a).getTime();var n=e.getStorageSync("openAdLogs")||[],s=[];n.map((function(e){new Date(e["date"]).getTime()>=a&&s.unshift(e)}))},methods:{formSubmit:function(t){var a="../list/list",n="";n="search-input"==t.currentTarget.id?t.detail.value:t.detail.value.input,""!=n?(a=a+"?search="+n,e.navigateTo({url:a})):e.showModal({title:"提示",content:"请输入内容",showCancel:!1})},onShareTimeline:function(){return{title:"“"+d+"”小程序,基于微慕WordPress版小程序构建",path:"pages/index/index"}},getHomeconfig:function(){var t=this,a=l.getRequest(o.get_homeconfig());a.then((function(a){var n=a.data.expand,s=n.swipe_nav,o=n.selected_nav,r=a.data.downloadfileDomain,l=a.data.businessDomain,c=a.data.zanImageurl,u=a.data.logoImageurl,d=r.length?r.split(","):[],g=l.length?l.split(","):[];t.setData(i({swipe_nav:s,selected_nav:o},"selected_nav",o)),e.setStorageSync("downloadfileDomain",d),e.setStorageSync("businessDomain",g),e.setStorageSync("zanImageurl",c),e.setStorageSync("logoImageurl",u)}))},fetchPostsData:function(t){var a=this;t||(t={}),t.page||(t.page=1),t.categories||(t.categories=0),t.search||(t.search=""),1===t.page&&a.setData({postsList:[]}),a.setData({isLoading:!0});var n=l.getRequest(o.getCategoriesIds());n.then((function(n){""==!n.data.Ids&&(t.categories=n.data.Ids,a.setData({categories:n.data.Ids}));var s=l.getRequest(o.getPosts(t));s.then((function(t){200===t.statusCode&&(t.data.length?(t.data.length<u&&a.setData({isLastPage:!0,isLoading:!1}),a.setData({floatDisplay:"block",postsList:a.postsList.concat(t.data.map((function(e){var t=e.date;return null!=e.category_name?e.categoryImage="/static/images/category.png":e.categoryImage="",null!=e.post_medium_image&&""!=e.post_medium_image||(e.post_medium_image="/static/images/logo700.png"),e.date=r.cutstr(t,10,1),e})))})):"rest_post_invalid_page_number"==t.data.code?(a.setData({isLastPage:!0,isLoading:!1}),e.showToast({title:"没有更多内容",mask:!1,duration:1500})):e.showToast({title:t.data.message,duration:1500}))})).catch((function(n){1==t.page?a.setData({showerror:"block",floatDisplay:"none"}):(e.showModal({title:"加载失败",content:"加载数据失败,请重试.",showCancel:!1}),a.setData({page:t.page-1}))})).finally((function(t){e.hideLoading(),a.setData({isLoading:!1}),e.stopPullDownRefresh()}))}))},loadMore:function(t){var a=this;a.isLastPage?e.showToast({title:"没有更多内容",mask:!1,duration:1e3}):(a.setData({page:a.page+1}),this.fetchPostsData(a))},redictDetail:function(t){var a=t.currentTarget.id,n="../detail/detail?id="+a;e.navigateTo({url:n})},onNavRedirect:function(t){var a=t.currentTarget.dataset.redicttype,n=null==t.currentTarget.dataset.url?"":t.currentTarget.dataset.url;null==t.currentTarget.dataset.appid||t.currentTarget.dataset.appid,null==t.currentTarget.dataset.extraData||t.currentTarget.dataset.extraData;if("apppage"==a)e.navigateTo({url:n});else if("webpage"==a)n="../webpage/webpage?url="+n,e.navigateTo({url:n});else if("miniapp"==a);},redictAppDetail:function(t){var a=t.currentTarget.dataset,n=a.type,s=(a.appid,a.url),i=a.path;if("apppage"===n&&e.navigateTo({url:i}),"webpage"===n&&(s="../webpage/webpage?url="+s,e.navigateTo({url:s})),"miniapp"===n);},redictHome:function(t){t.currentTarget.dataset.id;var a="/pages/index/index";e.switchTab({url:a})},adbinderror:function(e){var t=this;console.log(e.detail.errCode),console.log(e.detail.errMsg),e.detail.errCode&&t.setData({listAdsuccess:!1})}}};t.default=f}).call(this,a("5486")["default"])},abf9:function(e,t,a){"use strict";var n;a.d(t,"b",(function(){return s})),a.d(t,"c",(function(){return i})),a.d(t,"a",(function(){return n}));var s=function(){var e=this,t=e.$createElement;e._self._c},i=[]},ae20:function(e,t,a){},b217:function(e,t,a){"use strict";var n=a("ae20"),s=a.n(n);s.a},ea3a:function(e,t,a){"use strict";(function(e){a("b078");n(a("66fd"));var t=n(a("1e74"));function n(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,a("5486")["createPage"])},ea86:function(e,t,a){"use strict";a.r(t);var n=a("35f2"),s=a.n(n);for(var i in n)"default"!==i&&function(e){a.d(t,e,(function(){return n[e]}))}(i);t["default"]=s.a}},[["ea3a","common/runtime","common/vendor"]]]);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论