奇点
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 lines
4.1 KiB

var e=Object.defineProperty,l=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,o=(l,a,i)=>a in l?e(l,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):l[a]=i;import{l as s,B as n,M as t,j as c,C as u,o as r,b as h,a as d,w as p,U as f,n as m,m as g,F as j,r as x,c as _,f as b,v as z,K as k,p as y,I as w,D as v,i as C,g as N,E as O}from"./index.22b081e2.js";import{H as I,I as P}from"./user.b3821dab.js";import{_ as S}from"./fanhui.37cee083.js";import{_ as E}from"./plugin-vue_export-helper.21dcd24c.js";var J=E({props:["id"],onShow(){this.init()},setup(e){let r=s(!0),h=s(!0),d=n({jiesao:{},cailiao:[],xzsuju:[],hechenjieguo:""});function p(){d.xzsuju=[];let l={};d.cailiao.map((e=>{delete e.xztp,l=e;for(let a=0;a<e.amount;a++)d.xzsuju.push(JSON.parse(JSON.stringify(l)))}));let a=c(e.id);console.log(a,"uarr",d.xzsuju,d.cailiao),a.length>0&&d.xzsuju.map(((e,l)=>{a.some(((i,o)=>{if(e.collectionName==i.collectionName)return d.xzsuju[l].xztp=i.imagePath,d.xzsuju[l].cpids=i.id,a.splice(o,1),!0}))}))}return I({id:e.id}).then((e=>{console.log(e,"res");let l=e.data;l.map(((e,a)=>{e.pid||(d.jiesao=e,t({src:d.jiesao.thumbnail,success:function(e){e.width>e.height?r.value=!0:e.width<e.height&&(r.value=!1)}}),l.splice(a,1))})),d.cailiao=l,console.log(d),p()})),((e,s)=>{for(var n in s||(s={}))a.call(s,n)&&o(e,n,s[n]);if(l)for(var n of l(s))i.call(s,n)&&o(e,n,s[n]);return e})({init:p,guanbi:function(){d.hechenjieguo=""},ykwz:r,ykwz1:h,gocailiao:function(l){if(console.log(l),l.xztp){let a=c(e.id);a.some(((e,i)=>{if(e.collectionName==l.collectionName)return a.splice(i,1),!0})),k(e.id,a),p()}else y({url:"/pages/composecailiao/composecailiao?id="+l.collectionId+"&pid="+e.id})},kshechen:function(){let l=!0,a=[];d.xzsuju.map((e=>{a.push(e.cpids),e.xztp||(l=!1)})),l&&a.length==d.xzsuju.length?P({id:e.id,myColl:a}).then((l=>{console.log(l),200==l.code?(k(e.id,[]),p(),d.hechenjieguo=l.data,t({src:d.hechenjieguo.thumbnail,success:function(e){e.width>e.height?h.value=!0:e.width<e.height&&(h.value=!1)}})):v({title:l.msg,icon:"none"})})):v({title:"合成材料不足,请继续添加",icon:"none"})},fanhui:function(){w()}},u(d))}},[["render",function(e,l,a,i,o,s){const n=C,t=N,c=O;return r(),h(j,null,[d(t,{class:"head_top"},{default:p((()=>[d(n,{onClick:i.fanhui,src:S},null,8,["onClick"]),d(t),d(t)])),_:1}),d(t,{class:"details_top"},{default:p((()=>[d(t,{class:"max_box"},{default:p((()=>[f("img",{class:m(i.ykwz?"img1":"img2"),src:e.jiesao.thumbnail},null,10,["src"])])),_:1})])),_:1}),d(t,{class:"cailiaobox"},{default:p((()=>[d(t,null,{default:p((()=>[g("所需材料")])),_:1}),d(t,null,{default:p((()=>[(r(!0),h(j,null,x(e.cailiao,(e=>(r(),_(t,null,{default:p((()=>[d(t,null,{default:p((()=>[d(n,{src:e.thumbnail},null,8,["src"]),d(t,null,{default:p((()=>[g("x"+z(e.amount),1)])),_:2},1024)])),_:2},1024),d(t,null,{default:p((()=>[g(z(e.collectionName),1)])),_:2},1024)])),_:2},1024)))),256))])),_:1})])),_:1}),d(t,{class:"xuanzhecl"},{default:p((()=>[d(t,null,{default:p((()=>[g("选择材料")])),_:1}),d(t,{class:"max_box"},{default:p((()=>[(r(!0),h(j,null,x(e.xzsuju,(e=>(r(),_(t,{onClick:l=>i.gocailiao(e)},{default:p((()=>[d(n,{class:m(e.xztp?"xuanzhon":""),src:e.xztp?e.xztp:"../../static/jiahao.png"},null,8,["class","src"]),d(t,null,{default:p((()=>[g(z(e.collectionName),1)])),_:2},1024)])),_:2},1032,["onClick"])))),256))])),_:1})])),_:1}),d(t,{onClick:i.kshechen,class:"hechen"},{default:p((()=>[g(" 立即合成 ")])),_:1},8,["onClick"]),e.hechenjieguo?(r(),_(t,{key:0,onClick:i.guanbi,class:"zhezhao"},{default:p((()=>[e.hechenjieguo?(r(),_(t,{key:0,class:"box"},{default:p((()=>[d(c,null,{default:p((()=>[g("恭喜您!成功合成")])),_:1}),e.hechenjieguo?(r(),h("img",{key:0,class:m(i.ykwz1?"img11":"img12"),src:e.hechenjieguo.thumbnail},null,10,["src"])):b("",!0),e.hechenjieguo?(r(),_(c,{key:1,style:{"margin-top":"320rpx"}},{default:p((()=>[g(z(e.hechenjieguo.collName)+" X 1",1)])),_:1})):b("",!0),e.hechenjieguo?(r(),_(c,{key:2,class:"qr",onClick:i.guanbi},{default:p((()=>[g("确认")])),_:1},8,["onClick"])):b("",!0)])),_:1})):b("",!0)])),_:1},8,["onClick"])):b("",!0)],64)}],["__scopeId","data-v-2129789c"]]);export{J as default};