import{B as e,o as t,s,al as o,f as a,g as l,w as r,q as i,n,p as m,r as d,F as u,m as c,R as p,u as f,l as _,L as x}from"./index-007bf156.js";import{_ as b}from"./s-goods-item.8ceb696e.js";import{_ as g}from"./uni-rate.73343205.js";import{a as h}from"./phone-international-input.3617e4e0.js";import{_ as y}from"./s-uploader.0cf2617c.js";import{a as j,_ as L}from"./s-layout.19bedb43.js";import{_ as U}from"./_plugin-vue_export-helper.1b428a4d.js";import"./points.c381a8e1.js";import"./useGoods.ac3bf93e.js";/* empty css                                                                     */const V=U({__name:"add",setup(U){const V=e({orderInfo:{},commentList:[],id:null});async function I(){p({title:"提示",content:"是否评论？",success:async function(e){if(e.confirm){for(const e of V.commentList)await o.createOrderItemComment(e);s.$router.back()}}})}return t((async e=>{if(!e.id)return void s.$helper.toast("缺少订单信息，请检查");V.id=e.id;const{code:t,data:a}=await o.getOrder(V.id);0===t?(a.items.forEach((e=>{V.commentList.push({anonymous:!1,orderItemId:e.id,descriptionScores:5,benefitScores:5,content:"",picUrls:[]})})),V.orderInfo=a):s.$helper.toast("无待评价订单")})),(e,t)=>{const s=i(f("s-goods-item"),b),o=_,p=i(f("uni-rate"),g),U=i(f("uni-easyinput"),h),S=i(f("s-uploader"),y),w=x,k=i(f("su-fixed"),j),v=i(f("s-layout"),L);return a(),l(v,{title:"评价"},{default:r((()=>[n(o,null,{default:r((()=>[(a(!0),m(u,null,d(V.orderInfo.items,((e,t)=>(a(),l(o,{key:e.id},{default:r((()=>[n(o,null,{default:r((()=>[n(o,{class:"commont-from-wrap"},{default:r((()=>[n(s,{img:e.picUrl,title:e.spuName,skuText:e.properties.map((e=>e.valueName)).join(" "),price:e.payPrice,num:e.count},null,8,["img","title","skuText","price","num"])])),_:2},1024),n(o,{class:"form-item"},{default:r((()=>[n(o,{class:"star-box ss-flex ss-col-center"},{default:r((()=>[n(o,{class:"star-title ss-m-r-40"},{default:r((()=>[c("商品质量")])),_:1}),n(p,{modelValue:V.commentList[t].descriptionScores,"onUpdate:modelValue":e=>V.commentList[t].descriptionScores=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),n(o,{class:"star-box ss-flex ss-col-center"},{default:r((()=>[n(o,{class:"star-title ss-m-r-40"},{default:r((()=>[c("服务态度")])),_:1}),n(p,{modelValue:V.commentList[t].benefitScores,"onUpdate:modelValue":e=>V.commentList[t].benefitScores=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),n(o,{class:"area-box"},{default:r((()=>[n(U,{inputBorder:!1,type:"textarea",maxlength:"120",autoHeight:"",modelValue:V.commentList[t].content,"onUpdate:modelValue":e=>V.commentList[t].content=e,placeholder:"宝贝满足你的期待吗？说说你的使用心得，分享给想买的他们吧~"},null,8,["modelValue","onUpdate:modelValue"]),n(o,{class:"img-box"},{default:r((()=>[n(S,{url:V.commentList[t].picUrls,"onUpdate:url":e=>V.commentList[t].picUrls=e,fileMediatype:"image",limit:"9",mode:"grid",imageStyles:{width:"168rpx",height:"168rpx"}},null,8,["url","onUpdate:url"])])),_:2},1024)])),_:2},1024)])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])),_:1}),n(k,{bottom:"",placeholder:""},{default:r((()=>[n(o,{class:"foot_box ss-flex ss-row-center ss-col-center"},{default:r((()=>[n(w,{class:"ss-reset-button post-btn ui-BG-Main-Gradient ui-Shadow-Main",onClick:I},{default:r((()=>[c(" 发布 ")])),_:1})])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-b2bb001b"]]);export{V as default};
