1 |
- "use strict";const e=require("../../../common/vendor.js"),r=require("../../../sheep/index.js"),s=require("../../../sheep/api/trade/order.js");if(require("../../../sheep/url/index.js"),require("../../../sheep/store/index.js"),require("../../../sheep/store/app.js"),require("../../../sheep/api/promotion/diy.js"),require("../../../sheep/request/index.js"),require("../../../sheep/config/index.js"),require("../../../sheep/platform/index.js"),require("../../../sheep/platform/provider/wechat/index.js"),require("../../../sheep/platform/provider/wechat/miniProgram.js"),require("../../../sheep/api/member/auth.js"),require("../../../sheep/api/member/social.js"),require("../../../sheep/api/member/user.js"),require("../../../sheep/platform/provider/apple/index.js"),require("../../../sheep/platform/share.js"),require("../../../sheep/router/index.js"),require("../../../sheep/hooks/useModal.js"),require("../../../sheep/helper/index.js"),require("../../../sheep/helper/test.js"),require("../../../sheep/helper/digit.js"),require("../../../sheep/api/member/signin.js"),require("../../../sheep/helper/throttle.js"),require("../../../sheep/platform/pay.js"),require("../../../sheep/api/pay/order.js"),require("../../../sheep/store/user.js"),require("../../../sheep/store/cart.js"),require("../../../sheep/api/trade/cart.js"),require("../../../sheep/api/pay/wallet.js"),require("../../../sheep/api/promotion/coupon.js"),require("../../../sheep/store/sys.js"),require("../../../sheep/store/modal.js"),require("../../../sheep/config/zIndex.js"),!Array){(e.resolveComponent("s-goods-item")+e.resolveComponent("uni-rate")+e.resolveComponent("uni-easyinput")+e.resolveComponent("s-uploader")+e.resolveComponent("su-fixed")+e.resolveComponent("s-layout"))()}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 o=e.reactive({orderInfo:{},commentList:[],id:null});async function t(){e.index.showModal({title:"提示",content:"是否评论?",success:async function(e){if(e.confirm){for(const e of o.commentList)await s.OrderApi.createOrderItemComment(e);r.sheep.$router.back()}}})}return e.onLoad((async e=>{if(!e.id)return void r.sheep.$helper.toast("缺少订单信息,请检查");o.id=e.id;const{code:i,data:t}=await s.OrderApi.getOrder(o.id);0===i?(t.items.forEach((e=>{o.commentList.push({anonymous:!1,orderItemId:e.id,descriptionScores:5,benefitScores:5,content:"",picUrls:[]})})),o.orderInfo=t):r.sheep.$helper.toast("无待评价订单")})),(r,s)=>({a:e.f(o.orderInfo.items,((r,s,i)=>({a:"b2bb001b-1-"+i+",b2bb001b-0",b:e.p({img:r.picUrl,title:r.spuName,skuText:r.properties.map((e=>e.valueName)).join(" "),price:r.payPrice,num:r.count}),c:"b2bb001b-2-"+i+",b2bb001b-0",d:e.o((e=>o.commentList[s].descriptionScores=e),r.id),e:e.p({modelValue:o.commentList[s].descriptionScores}),f:"b2bb001b-3-"+i+",b2bb001b-0",g:e.o((e=>o.commentList[s].benefitScores=e),r.id),h:e.p({modelValue:o.commentList[s].benefitScores}),i:"b2bb001b-4-"+i+",b2bb001b-0",j:e.o((e=>o.commentList[s].content=e),r.id),k:e.p({inputBorder:!1,type:"textarea",maxlength:"120",autoHeight:!0,placeholder:"宝贝满足你的期待吗?说说你的使用心得,分享给想买的他们吧~",modelValue:o.commentList[s].content}),l:"b2bb001b-5-"+i+",b2bb001b-0",m:e.o((e=>o.commentList[s].picUrls=e),r.id),n:e.p({fileMediatype:"image",limit:"9",mode:"grid",imageStyles:{width:"168rpx",height:"168rpx"},url:o.commentList[s].picUrls}),o:r.id}))),b:e.o(t),c:e.p({bottom:!0,placeholder:!0}),d:e.p({title:"评价"})})}},o=e._export_sfc(i,[["__scopeId","data-v-b2bb001b"]]);wx.createPage(o);
|