1 |
- import{y as e,o as t,s,aa as o,e as a,f as l,w as i,l as r,j as n,k as m,r as d,F as u,t as c,M as p,m as f,i as _,G as x}from"./index-b48a414d.js";import{_ as b}from"./s-goods-item.13120f93.js";import{_ as g}from"./uni-rate.ae6b2b33.js";import{a as h}from"./phone-international-input.feef99c7.js";import{_ as y}from"./s-uploader.af3e7e55.js";import{a as U,_ as V}from"./s-layout.d6dcdc81.js";import{_ as j}from"./_plugin-vue_export-helper.1b428a4d.js";import"./points.c381a8e1.js";/* empty css */const L=j({__name:"add",setup(j){const L=e({orderInfo:{},commentList:[],id:null});async function S(){p({title:"提示",content:"是否评论?",success:async function(e){if(e.confirm){for(const e of L.commentList)await o.createOrderItemComment(e);s.$router.back()}}})}return t((async e=>{if(!e.id)return void s.$helper.toast("缺少订单信息,请检查");L.id=e.id;const{code:t,data:a}=await o.getOrder(L.id);0===t?(a.items.forEach((e=>{L.commentList.push({anonymous:!1,orderItemId:e.id,descriptionScores:5,benefitScores:5,content:"",picUrls:[]})})),L.orderInfo=a):s.$helper.toast("无待评价订单")})),(e,t)=>{const s=r(f("s-goods-item"),b),o=_,p=r(f("uni-rate"),g),j=r(f("uni-easyinput"),h),w=r(f("s-uploader"),y),I=x,k=r(f("su-fixed"),U),v=r(f("s-layout"),V);return a(),l(v,{title:"评价"},{default:i((()=>[n(o,null,{default:i((()=>[(a(!0),m(u,null,d(L.orderInfo.items,((e,t)=>(a(),l(o,{key:e.id},{default:i((()=>[n(o,null,{default:i((()=>[n(o,{class:"commont-from-wrap"},{default:i((()=>[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:i((()=>[n(o,{class:"star-box ss-flex ss-col-center"},{default:i((()=>[n(o,{class:"star-title ss-m-r-40"},{default:i((()=>[c("商品质量")])),_:1}),n(p,{modelValue:L.commentList[t].descriptionScores,"onUpdate:modelValue":e=>L.commentList[t].descriptionScores=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),n(o,{class:"star-box ss-flex ss-col-center"},{default:i((()=>[n(o,{class:"star-title ss-m-r-40"},{default:i((()=>[c("服务态度")])),_:1}),n(p,{modelValue:L.commentList[t].benefitScores,"onUpdate:modelValue":e=>L.commentList[t].benefitScores=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),n(o,{class:"area-box"},{default:i((()=>[n(j,{inputBorder:!1,type:"textarea",maxlength:"120",autoHeight:"",modelValue:L.commentList[t].content,"onUpdate:modelValue":e=>L.commentList[t].content=e,placeholder:"宝贝满足你的期待吗?说说你的使用心得,分享给想买的他们吧~"},null,8,["modelValue","onUpdate:modelValue"]),n(o,{class:"img-box"},{default:i((()=>[n(w,{url:L.commentList[t].picUrls,"onUpdate:url":e=>L.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:i((()=>[n(o,{class:"foot_box ss-flex ss-row-center ss-col-center"},{default:i((()=>[n(I,{class:"ss-reset-button post-btn ui-BG-Main-Gradient ui-Shadow-Main",onClick:S},{default:i((()=>[c(" 发布 ")])),_:1})])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-b2bb001b"]]);export{L as default};
|