pages-goods-comment-add.1744ff2b.js 3.4 KB

1
  1. import{z as e,o as t,s,aj as o,f as a,g as l,w as r,m as i,k as n,l as m,r as d,F as u,u as c,P as p,n as f,j as _,J as x}from"./index-a116b7fa.js";import{_ as b}from"./s-goods-item.e5b69bb0.js";import{_ as g}from"./uni-rate.540043c1.js";import{a as h}from"./phone-international-input.b9f6c8e6.js";import{_ as j}from"./s-uploader.e282ad6a.js";import{a as y,_ as U}from"./s-layout.4ae51839.js";import{_ as V}from"./_plugin-vue_export-helper.1b428a4d.js";import"./points.c381a8e1.js";import"./useGoods.6b315a78.js";/* empty css */const L=V({__name:"add",setup(V){const L=e({orderInfo:{},commentList:[],id:null});async function I(){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=i(f("s-goods-item"),b),o=_,p=i(f("uni-rate"),g),V=i(f("uni-easyinput"),h),S=i(f("s-uploader"),j),k=x,w=i(f("su-fixed"),y),v=i(f("s-layout"),U);return a(),l(v,{title:"评价"},{default:r((()=>[n(o,null,{default:r((()=>[(a(!0),m(u,null,d(L.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: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:r((()=>[n(o,{class:"star-title ss-m-r-40"},{default:r((()=>[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:r((()=>[n(V,{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:r((()=>[n(S,{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(w,{bottom:"",placeholder:""},{default:r((()=>[n(o,{class:"foot_box ss-flex ss-row-center ss-col-center"},{default:r((()=>[n(k,{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{L as default};