Meal-legacy.014b89e5.js 5.2 KB

1
  1. !function(){var e=document.createElement("style");e.innerHTML=".rater-wrap{font-size:16px;color:#ccc}.rater-wrap span{padding:0 3px}.rater-wrap .on{color:#fc6}.article-wrap .surface-url{border-bottom:5px solid #f0f0f0}.article-wrap .article{display:block;padding:10px 15px;border-bottom:5px solid #f0f0f0}.article-wrap .article h4{font-size:14px;font-weight:400;color:#9aaac0;padding:10px 15px;border-bottom:1px solid #eef1f7}.article-wrap .article-ingredients{padding:0}.article-wrap .tags{overflow:hidden;border-bottom:1px solid #e5e9f2;padding-bottom:10px}.article-wrap .tags span{float:left;padding:5px 15px;line-height:16px;border:1px solid #f5a827;color:#f5a827;border-radius:5px;margin-right:10px;margin-bottom:10px}.article-wrap .trisection{overflow:hidden;text-align:center;padding-top:10px;padding-bottom:10px}.article-wrap .trisection .item{float:left;width:33.3%}.article-wrap .trisection .t{font-size:16px;height:40px;line-height:40px}.article-wrap .trisection .b{color:#a1b0c4}.article-wrap .ingredients{list-style:none;font-size:16px}.article-wrap .ingredients .item{line-height:28px;padding:5px 15px}.article-wrap .ingredients .item span{display:inline-block}.article-wrap .ingredients .item:nth-child(2n){background-color:#f9fafc}.article-wrap .ingredients .r{float:right}.article-wrap .steps{list-style:none;padding:0 15px}.article-wrap .steps .item{padding-bottom:10px}.article-wrap .steps .item h5{font-weight:400;color:#9aaac0;line-height:20px;font-size:14px;padding-top:10px}.article-wrap .steps .item img{width:100%;vertical-align:bottom}.article-wrap .steps .item p{word-wrap:break-word;font-size:16px;line-height:24px}.article-wrap .tips{white-space:pre-line;word-wrap:break-word;padding:10px 15px;font-size:16px}\n",document.head.appendChild(e),System.register(["./vendor-legacy.ab945ac3.js","./addRead-legacy.90c0aa44.js","./ToApp.vue_vue_type_style_index_0_lang-legacy.f3ad4143.js","./Loading-legacy.9c349192.js","./useWindowSize-legacy.86c42a65.js","./index-legacy.3f143d64.js","./service-legacy.395b8fc2.js","./wxShare-legacy.5aed9c11.js","./plugin-vue_export-helper-legacy.d48ec26d.js","./preload-helper-legacy.2e08847a.js"],(function(e){"use strict";var a,i,t,l,s,r,n,c,p,o,d,u,g,f,v,m,h,w,x,b,y,k,S,_;return{setters:[function(e){a=e.d,i=e.e,t=e.E,l=e.x,s=e.h,r=e.j,n=e.o,c=e.c,p=e.m,o=e.t,d=e.F,u=e.C,g=e.k,f=e.v,v=e.l,m=e.p},function(e){h=e.a,w=e.N},function(e){x=e._},function(e){b=e.L},function(e){y=e.u},function(e){k=e.c},function(e){S=e.y},function(e){_=e.w},function(){},function(){}],execute:function(){var j=a({props:{value:{type:Number,default:0}},setup:e=>()=>i("span",{class:"rater-wrap"},[[0,1,2,3,4].map((a=>i("span",{class:a<e.value?"on":""},[t("★")])))])});const z={key:0,class:"article-wrap"},N={class:"surface-url"},T=["height","src"],L={class:"title"},$={class:"article"},E={class:"tags"},I={class:"trisection"},J={class:"item"},O={class:"t"},C=p("p",{class:"b"},"烹饪时长",-1),R={class:"item"},U={class:"t"},q=p("p",{class:"b"},"难易程度",-1),A={class:"item"},F={class:"t"},H=p("p",{class:"b"},"备餐人数",-1),M={class:"article article-ingredients"},P=p("h4",null,"食材用料",-1),W={class:"ingredients"},B={class:"r"},D={class:"article article-ingredients"},G=p("h4",null,"烹饪步骤",-1),K={class:"steps"},Q=["src"],V={class:"article article-ingredients"},X=p("h4",null,"注意事项",-1),Y={class:"tips"},Z={class:"article article-ingredients"},ee=p("h4",null,"食用禁忌",-1),ae={class:"tips"};e("default",a({setup(e){const a=l().query,t=s(!0),ie=s(!1),te=s(),{width:le}=y();return r((()=>{h(a.id,"meal"),(async()=>{const e={id:a.id},i=await S(e);if(t.value=!1,"000000"===i.status_code){if(!i.isRelease)return void(ie.value=!0);i.cookIngredients=JSON.parse(i.cookIngredients),i.cookSteps=JSON.parse(i.cookSteps),i.tips=JSON.parse(i.tips),te.value=i,document.title=i.name;const e=`${location.origin}${location.pathname}#/meal?id=${a.id}`,t=`${i.surfaceUrlSmall}?x-oss-process=image/resize,m_fill,h_320,w_320`;_(i.name,i.name,e,t)}else ie.value=!0,t.value=!1})()})),(e,a)=>{return n(),c(d,null,[te.value?(n(),c("div",z,[p("div",N,[p("img",{height:(l=te.value.weightSmall,s=te.value.heightSmall,s*(le.value>750?750:le.value)/l),src:te.value.surfaceUrlSmall,width:"100%"},null,8,T)]),p("h1",L,o(te.value.name),1),p("div",$,[p("div",E,[(n(!0),c(d,null,u(te.value.tagList,((e,a)=>(n(),c("span",{key:a},o(e.name),1)))),128))]),p("div",I,[p("div",J,[p("p",O,o(te.value.cookTime)+"min",1),C]),p("div",R,[p("p",U,[i(j,{value:te.value.difficulty},null,8,["value"])]),q]),p("div",A,[p("p",F,o(te.value.persons)+"人份",1),H])])]),p("div",M,[P,p("ul",W,[(n(!0),c(d,null,u(te.value.cookIngredients,((e,a)=>(n(),c("li",{key:a,class:"item"},[p("span",null,o(e.name),1),p("span",B,o(e.use),1)])))),128))])]),p("div",D,[G,p("ul",K,[(n(!0),c(d,null,u(te.value.cookSteps,((e,a)=>(n(),c("li",{key:a,class:"item"},[p("h5",null,"SETP"+o(a+1),1),p("p",null,o(e.desc),1),p("img",{src:e.imgSrc},null,8,Q)])))),128))])]),p("div",V,[X,p("p",Y,o(te.value.tips.careful),1)]),p("div",Z,[ee,p("p",ae,o(te.value.tips.taboo),1)]),g(p("div",{class:"read"},"阅读 "+o(te.value.readTimes),513),[[f,v(k)]])])):m("",!0),i(x),g(i(w,null,null,512),[[f,ie.value&&!t.value]]),i(v(b),{message:"加载中...",visible:t.value},null,8,["visible"])],64);var l,s}}}))}}}))}();