2024-10-01 09:15:35 +08:00
|
|
|
"use strict";var e=(e,o,t)=>new Promise(((n,i)=>{var s=e=>{try{m(t.next(e))}catch(o){i(o)}},r=e=>{try{m(t.throw(e))}catch(o){i(o)}},m=e=>e.done?n(e.value):Promise.resolve(e.value).then(s,r);m((t=t.apply(e,o)).next())}));const o=require("../../../../common/vendor.js"),t=require("../../sheep/index.js"),n=require("../../sheep/api/trade/order.js");if(!Array){(o.resolveComponent("s-goods-item")+o.resolveComponent("uni-rate")+o.resolveComponent("uni-easyinput")+o.resolveComponent("s-uploader")+o.resolveComponent("su-fixed")+o.resolveComponent("s-layout")+o.resolveComponent("layout-default-uni"))()}Math||((()=>"../../sheep/components/s-goods-item/s-goods-item.js")+(()=>"../../../../uni_modules/uni-rate/components/uni-rate/uni-rate.js")+(()=>"../../../../uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js")+(()=>"../../sheep/components/s-uploader/s-uploader.js")+(()=>"../../sheep/ui/su-fixed/su-fixed.js")+(()=>"../../sheep/components/s-layout/s-layout.js"))();const i={__name:"add",setup(i){const s=o.reactive({orderInfo:{},commentList:[],id:null});function r(){return e(this,null,(function*(){for(const e of s.commentList)yield n.OrderApi.createOrderItemComment(e);t.sheep.$router.back()}))}return o.onLoad((o=>e(this,null,(function*(){if(!o.id)return void t.sheep.$helper.toast("缺少订单信息,请检查");s.id=o.id;const{code:e,data:i}=yield n.OrderApi.getOrder(s.id);0===e?(i.items.forEach((e=>{s.commentList.push({anonymous:!1,orderItemId:e.id,descriptionScores:5,benefitScores:5,content:"",picUrls:[]})})),s.orderInfo=i):t.sheep.$helper.toast("无待评价订单")})))),(e,t)=>({a:o.f(s.orderInfo.items,((e,t,n)=>({a:"15f28998-2-"+n+",15f28998-1",b:o.p({img:e.picUrl,title:e.spuName,skuText:e.properties.map((e=>e.valueName)).join(" "),price:e.payPrice,num:e.count}),c:"15f28998-3-"+n+",15f28998-1",d:o.o((e=>s.commentList[t].descriptionScores=e),e.id),e:o.p({modelValue:s.commentList[t].descriptionScores}),f:"15f28998-4-"+n+",15f28998-1",g:o.o((e=>s.commentList[t].benefitScores=e),e.id),h:o.p({modelValue:s.commentList[t].benefitScores}),i:"15f28998-5-"+n+",15f28998-1",j:o.o((e=>s.commentList[t].content=e),e.id),k:o.p({inputBorder:!1,type:"textarea",maxlength:"120",autoHeight:!0,placeholder:"宝贝满足你的期待吗?说说你的使用心得,分享给想买的他们吧~",modelValue:s.commentList[t].content}),l:"15f28998-6-"+n+",15f28998-1",m:o.o((e=>s.commentList[t].images=e),e.id),n:o.p({fileMediatype:"image",limit:"9",mode:"grid",imageStyles:{width:"168rpx",height:"168rpx"},url:s.commentList[t].images}),o:e.id}))),b:o.o(r),c:o.p({bottom:!0,placeholder:!0}),d:o.p({title:"评价"})})}},s=o._export_sfc(i,[["__scopeId","data-v-15f28998"]]);wx.createPage(s);
|