2 lines
1.1 KiB
JavaScript
2 lines
1.1 KiB
JavaScript
"use strict";const t=require("../../../common/vendor.js"),e=require("../sheep/api/promotion/article.js");if(!Array){(t.resolveComponent("mp-html")+t.resolveComponent("s-layout")+t.resolveComponent("layout-default-uni"))()}Math||((()=>"../../../uni_modules/mp-html/components/mp-html/mp-html.js")+(()=>"../sheep/components/s-layout/s-layout.js"))();const o={__name:"richtext",setup(o){const n=t.reactive({title:"",content:""});function i(o,i){return l=this,r=null,a=function*(){const{code:l,data:r}=yield e.ArticleApi.getArticle(o,i);0===l&&(n.content=r.content,n.title!==r.title&&(n.title=r.title,t.index.setNavigationBarTitle({title:n.title})))},new Promise(((t,e)=>{var o=t=>{try{i(a.next(t))}catch(o){e(o)}},n=t=>{try{i(a.throw(t))}catch(o){e(o)}},i=e=>e.done?t(e.value):Promise.resolve(e.value).then(o,n);i((a=a.apply(l,r)).next())}));var l,r,a}return t.onLoad((e=>{e.title&&(n.title=e.title,t.index.setNavigationBarTitle({title:n.title})),i(e.id,e.title)})),(e,o)=>({a:t.p({content:n.content}),b:t.p({title:n.title,bgStyle:{color:"#FFF"}})})}},n=t._export_sfc(o,[["__scopeId","data-v-221080cc"]]);wx.createPage(n);
|