1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-return-request-return-request"],{1900:function(e,t,n){"use strict";var i;n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return i}));var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"u-progress",style:{borderRadius:e.round?"100rpx":0,height:e.height+"rpx",backgroundColor:e.inactiveColor}},[n("v-uni-view",{staticClass:"u-active",class:[e.type?"u-type-"+e.type+"-bg":"",e.striped?"u-striped":"",e.striped&&e.stripedActive?"u-striped-active":""],style:[e.progressStyle]},[e.$slots.default||e.$slots.$default?e._t("default"):e.showPercent?[e._v(e._s(e.percent+"%"))]:e._e()],2)],1)},o=[]},"2cf2":function(e,t,n){"use strict";var i=n("505b"),r=n.n(i);r.a},3633:function(e,t,n){"use strict";n("a9e3"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={name:"u-line-progress",props:{round:{type:Boolean,default:!0},type:{type:String,default:""},activeColor:{type:String,default:"#19be6b"},inactiveColor:{type:String,default:"#ececec"},percent:{type:Number,default:0},showPercent:{type:Boolean,default:!0},height:{type:[Number,String],default:28},striped:{type:Boolean,default:!1},stripedActive:{type:Boolean,default:!1}},data:function(){return{}},computed:{progressStyle:function(){var e={};return e.width=this.percent+"%",this.activeColor&&(e.backgroundColor=this.activeColor),e}},methods:{}};t.default=i},"38e7":function(e,t,n){var i=n("24fb");t=i(!1),t.push([e.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */\r\n/*主题色及按钮渐变背景*/\r\n/*字体大小*/.u-progress[data-v-18607578]{overflow:hidden;height:15px;display:inline-flex;align-items:center;width:100%;border-radius:%?100?%}.u-active[data-v-18607578]{width:0;height:100%;align-items:center;\r\ndisplay:flex;flex-direction:row;\r\njustify-items:flex-end;justify-content:space-around;font-size:%?20?%;color:#fff;transition:all .4s ease}.u-striped[data-v-18607578]{background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:39px 39px}.u-striped-active[data-v-18607578]{-webkit-animation:progress-stripes-data-v-18607578 2s linear infinite;animation:progress-stripes-data-v-18607578 2s linear infinite}@-webkit-keyframes progress-stripes-data-v-18607578{0%{background-position:0 0}100%{background-position:39px 0}}@keyframes progress-stripes-data-v-18607578{0%{background-position:0 0}100%{background-position:39px 0}}',""]),e.exports=t},"469c":function(e,t,n){"use strict";var i=n("dbd2"),r=n.n(i);r.a},"4a74":function(e,t,n){"use strict";n.r(t);var i=n("d615"),r=n.n(i);for(var o in i)"default"!==o&&function(e){n.d(t,e,(function(){return i[e]}))}(o);t["default"]=r.a},"4c4f":function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return i}));var i={uIcon:n("daf7").default,uLineProgress:n("5661").default},r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.disabled?e._e():n("v-uni-view",{staticClass:"u-upload"},[e._l(e.lists,(function(t,i){return e.showUploadList?n("v-uni-view",{key:i,staticClass:"u-list-item u-preview-wrap",style:{width:e.$u.addUnit(e.width),height:e.$u.addUnit(e.height)}},[e.deletable?n("v-uni-view",{staticClass:"u-delete-icon",style:{background:e.delBgColor},on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.deleteItem(i)}}},[n("u-icon",{staticClass:"u-icon",attrs:{name:e.delIcon,size:"20",color:e.delColor}})],1):e._e(),e.showProgress&&t.progress>0&&!t.error?n("u-line-progress",{staticClass:"u-progress",attrs:{"show-percent":!1,height:"16",percent:t.progress}}):e._e(),t.error?n("v-uni-view",{staticClass:"u-error-btn",on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.retry(i)}}},[e._v("点击重试")]):e._e(),t.isImage?e._e():n("v-uni-image",{staticClass:"u-preview-image",attrs:{src:t.url||t.path,mode:e.imageMode},on:{click:function(n){n.stopPropagation(),arguments[0]=n=e.$handleEvent(n),e.doPreviewImage(t.url||t.path,i)}}})],1):e._e()})),e._t("file",null,{file:e.lists}),e.maxCount>e.lists.length?n("v-uni-view",{staticStyle:{display:"inline-block"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.selectFile.apply(void 0,arguments)}}},[e._t("addBtn"),e.customBtn?e._e():n("v-uni-view",{staticClass:"u-list-item u-add-wrap",style:{width:e.$u.addUnit(e.width),height:e.$u.addUnit(e.height)},attrs:{"hover-class":"u-add-wrap__hover","hover-stay-time":"150"}},[n("u-icon",{staticClass:"u-add-btn",attrs:{name:"plus",size:"40"}}),n("v-uni-view",{staticClass:"u-add-tips"},[e._v(e._s(e.uploadText))])],1)],2):e._e()],2)},o=[]},"505b":function(e,t,n){var i=n("38e7");"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var r=n("4f06").default;r("6af9fa1c",i,!0,{sourceMap:!1,shadowMode:!1})},5659:function(e,t,n){"use strict";n.r(t);var i=n("4c4f"),r=n("4a74");for(var o in r)"default"!==o&&function(e){n.d(t,e,(function(){return r[e]}))}(o);n("469c");var a,s=n("f0c5"),u=Object(s["a"])(r["default"],i["b"],i["c"],!1,null,"27f4b223",null,!1,i["a"],a);t["default"]=u.exports},5661:function(e,t,n){"use strict";n.r(t);var i=n("1900"),r=n("c238");for(var o in r)"default"!==o&&function(e){n.d(t,e,(function(){return r[e]}))}(o);n("2cf2");var a,s=n("f0c5"),u=Object(s["a"])(r["default"],i["b"],i["c"],!1,null,"18607578",null,!1,i["a"],a);t["default"]=u.exports},"5fe0":function(e,t,n){var i=n("24fb");t=i(!1),t.push([e.i,"uni-page-body[data-v-150b8310]{width:100%;min-height:100%;background:#f9f9fb}body.?%PAGE?%[data-v-150b8310]{background:#f9f9fb}",""]),e.exports=t},7575:function(e,t,n){"use strict";var i=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.refundDetail=t.cancelRefund=t.delRefund=t.refundOrderDetail=t.refundOrderInfo=t.refundOrder=t.submitRefund=void 0;var r=i(n("57f7")),o=function(e){return r.default.post("/refund/submit_refund_order",e)};t.submitRefund=o;var a=function(e){return r.default.get("/refund/get_all_refund_order",e)};t.refundOrder=a;var s=function(e){return r.default.get("/refund/get_origin_order_info",e)};t.refundOrderInfo=s;var u=function(e){return r.default.get("/refund/get_refund_order_detail",e)};t.refundOrderDetail=u;var l=function(e){return r.default.post("/refund/delete_origin_order",e)};t.delRefund=l;var d=function(e){return r.default.post("/refund/cancel_refund_order",e)};t.cancelRefund=d;var c=function(e){return r.default.get("/order/get_refund_order_detail",e)};t.refundDetail=c},"84e1":function(e,t,n){"use strict";n("4de4"),n("d81d"),n("a434"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n("7575"),r={data:function(){return{goods:"",action:"".concat(this.$config.redirect_uri,"/api/refund/upload_refund_order_img"),header:{Authorization:"Bearer "+uni.getStorageSync("userToken")},num:0,reasonList:[{id:1,text:"质量问题",isChecked:!1},{id:2,text:"不愿意穿了",isChecked:!1},{id:3,text:"价格太贵",isChecked:!1},{id:4,text:"穿的没有讲的好",isChecked:!1}],isPaid:!1,reason:"",reason_all:"",imgs:[],origin_order_no:""}},computed:{refundNum:function(){var e=0,t=this.goods;return t&&t.map((function(t){t.newSku.map((function(t){e+=t.quitNum}))})),e},refundPrice:function(){var e=0,t=this.goods;return t&&t.map((function(t){t.newSku.map((function(t){e+=t.quitNum*t.price}))})),e}},onLoad:function(e){this.origin_order_no=e.order_no;for(var t=uni.getStorageSync("goodsInfo"),n=[],i=0;i<t.length;i++)t[i].newSku=t[i].newSku.filter((function(e){return e.quitNum>0})),t[i].newSku.length>0&&n.push(t[i]);this.goods=n},methods:{refundSub:function(e){var t=0;return e&&e.newSku.map((function(e){t+=e.quitNum})),t},refSubtotal:function(e){var t=0;return e&&e.newSku.map((function(e){t+=e.quitNum*e.price})),t},onSuccess:function(e,t,n){this.imgs.push(e.data)},onRemove:function(e,t){this.imgs.splice(e,1)},Checked:function(e,t){var n=this,i=this.reasonList;i.map((function(e,i){i==t?(n.reason=e.text,e.isChecked=!0):e.isChecked=!1})),this.isPaid=!1},reasonInput:function(e){this.num=e.detail.value.length,200==this.num&&uni.showToast({title:"已超过200字",icon:"none"})},submit:function(){if(!this.reason)return uni.showModal({content:"请选择退货原因",showCancel:!1}),!1;var e=this.goods,t=[],n=0;for(var r in e)for(var o in e[r].sku)t[n]=[e[r].sku[o].id,e[r].sku[o].quitNum],n++;(0,i.submitRefund)({reason_all:this.reason_all,reason:this.reason,img:this.imgs,sku:t,origin_order_no:this.origin_order_no}).then((function(e){200==e.code?(uni.removeStorageSync("goodsInfo"),uni.showModal({content:"退货申请已提交!",showCancel:!1,success:function(e){e.confirm&&uni.reLaunch({url:"../after-sale/after-sale?status=1"})}})):uni.showModal({content:e.data||"申请退货失败!",showCancel:!1})}))}}};t.default=r},"8ae9":function(e,t,n){var i=n("24fb");t=i(!1),t.push([e.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */\r\n/*主题色及按钮渐变背景*/\r\n/*字体大小*/.u-upload[data-v-27f4b223]{\r\ndisplay:flex;flex-direction:row;\r\nflex-wrap:wrap;align-items:center}.u-list-item[data-v-27f4b223]{width:%?200?%;height:%?200?%;overflow:hidden;margin:%?10?%;background:#f4f5f6;position:relative;border-radius:%?10?%;display:flex;align-items:center;justify-content:center}.u-preview-wrap[data-v-27f4b223]{border:1px solid #ebecee}.u-add-wrap[data-v-27f4b223]{flex-direction:column;color:#606266;font-size:%?26?%}.u-add-tips[data-v-27f4b223]{margin-top:%?20?%;line-height:%?40?%}.u-add-wrap__hover[data-v-27f4b223]{background-color:#ebecee}.u-preview-image[data-v-27f4b223]{display:block;width:100%;height:100%;border-radius:%?10?%}.u-delete-icon[data-v-27f4b223]{position:absolute;top:%?10?%;right:%?10?%;z-index:10;background-color:#fa3534;border-radius:%?100?%;width:%?44?%;height:%?44?%;\r\ndisplay:flex;flex-direction:row;\r\nalign-items:center;justify-content:center}.u-icon[data-v-27f4b223]{\r\ndisplay:flex;flex-direction:row;\r\nalign-items:center;justify-content:center}.u-progress[data-v-27f4b223]{position:absolute;bottom:%?10?%;left:%?8?%;right:%?8?%;z-index:9;width:auto}.u-error-btn[data-v-27f4b223]{color:#fff;background-color:#fa3534;font-size:%?20?%;padding:4px 0;text-align:center;position:absolute;bottom:0;left:0;right:0;z-index:9;line-height:1}',""]),e.exports=t},acc9:function(e,t,n){"use strict";var i=n("e6ad"),r=n.n(i);r.a},ad25:function(e,t,n){"use strict";var i=n("fcaa"),r=n.n(i);r.a},b912:function(e,t,n){var i=n("24fb");t=i(!1),t.push([e.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */\r\n/*主题色及按钮渐变背景*/\r\n/*字体大小*/.return_info[data-v-150b8310]{position:relative;padding-bottom:%?150?%}.return_info .return_box[data-v-150b8310],\r\n.return_info .goods_info[data-v-150b8310]{width:%?690?%;margin:%?30?% auto 0;padding:%?30?% %?30?%;background:#fff;border-radius:%?24?%}.return_info .return_box .title[data-v-150b8310],\r\n.return_info .goods_info .title[data-v-150b8310]{font-size:%?32?%;font-weight:700;padding:0 0 %?20?% 0}.return_info .return_box .return_con .star[data-v-150b8310]{color:#fb231f;font-size:%?30?%}.return_info .return_box .return_con .return_item[data-v-150b8310]{margin-top:%?15?%}.return_info .return_box .return_con .return_item .choose uni-text[data-v-150b8310]{color:#999}.return_info .return_box .return_con .return_item .choose .iconfont[data-v-150b8310]{font-size:%?30?%;vertical-align:%?-3?%;margin-left:%?5?%}.return_info .return_box .return_con .return_item .refund_num[data-v-150b8310]{font-size:%?30?%;font-weight:700;color:#fb231f}.return_info .supple_box[data-v-150b8310]{background:#f9f9f9;border-radius:%?24?%;height:%?430?%;margin-top:%?30?%}.return_info .supple_box uni-textarea[data-v-150b8310]{padding:%?30?%;font-size:%?30?%;height:%?220?%;box-sizing:border-box}.return_info .supple_box .num[data-v-150b8310]{margin-right:%?30?%;color:#999}.return_info .goods_info .goods_con[data-v-150b8310]{margin:%?15?% 0}.return_info .goods_info .goods_con .goods_img[data-v-150b8310]{width:%?180?%;height:%?144?%;border-radius:%?8?%;margin-right:%?20?%}.return_info .goods_info .goods_con .goods_name[data-v-150b8310]{font-size:%?30?%;font-weight:700}.return_info .goods_info .goods_con .goods_det[data-v-150b8310]{margin-top:%?20?%;font-size:%?30?%}.return_info .goods_info .goods_con .goods_det uni-text[data-v-150b8310]{color:#fb231f}.return_info .goods_info .size_box[data-v-150b8310]{width:100%;background:#f9f9f9;padding:%?15?% %?30?%;margin-top:%?15?%;border-radius:%?8?%}.return_info .goods_info .size_box uni-text[data-v-150b8310]{width:20%;text-align:center}.return_info .sure[data-v-150b8310]{position:fixed;left:0;bottom:0;width:100%;height:%?100?%;background:linear-gradient(93deg,#ff232c,#ff571b);color:#fff;font-size:%?32?%}',""]),e.exports=t},befe:function(e,t,n){"use strict";n.r(t);var i=n("ca1b"),r=n("e03d");for(var o in r)"default"!==o&&function(e){n.d(t,e,(function(){return r[e]}))}(o);n("ad25"),n("acc9");var a,s=n("f0c5"),u=Object(s["a"])(r["default"],i["b"],i["c"],!1,null,"150b8310",null,!1,i["a"],a);t["default"]=u.exports},c238:function(e,t,n){"use strict";n.r(t);var i=n("3633"),r=n.n(i);for(var o in i)"default"!==o&&function(e){n.d(t,e,(function(){return i[e]}))}(o);t["default"]=r.a},ca1b:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return i}));var i={uUpload:n("5659").default,uPopup:n("bfa2").default},r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"return_info"},[n("v-uni-view",{staticClass:"goods_info"},[n("v-uni-view",{staticClass:"title"},[e._v("退款商品")]),e._l(e.goods,(function(t,i){return n("v-uni-view",{key:t.id,staticClass:"goods_con"},[n("v-uni-view",{staticClass:"flexS"},[n("v-uni-image",{staticClass:"goods_img",attrs:{src:t.img}}),n("v-uni-view",[n("v-uni-text",{staticClass:"goods_name"},[e._v(e._s(t.name))]),n("v-uni-view",{staticClass:"flexB goods_det"},[n("v-uni-text",[e._v("数量:"+e._s(e.refundSub(t))+"套")]),n("v-uni-text",[e._v("金额:¥ "+e._s(e.refSubtotal(t)))])],1)],1)],1),n("v-uni-view",{staticClass:"goods_size"},e._l(t.newSku,(function(t){return n("v-uni-view",{key:t.id,staticClass:"size_box flexB"},[n("v-uni-text",[e._v(e._s(t.type))]),n("v-uni-text",[e._v(e._s(t.size))]),n("v-uni-text",[e._v(e._s(t.price))]),n("v-uni-text",[e._v("X"+e._s(t.quitNum))])],1)})),1)],1)}))],2),n("v-uni-view",{staticClass:"return_box"},[n("v-uni-view",{staticClass:"title"},[e._v("退款信息")]),n("v-uni-view",{staticClass:"return_con"},[n("v-uni-view",{staticClass:"flexB return_item"},[n("v-uni-view",[n("v-uni-text",[e._v("退款数量")])],1),n("v-uni-view",{staticClass:"refund_num"},[e._v(e._s(e.refundNum)+"套")])],1),n("v-uni-view",{staticClass:"flexB return_item"},[n("v-uni-view",[n("v-uni-text",[e._v("退款金额")])],1),n("v-uni-view",{staticClass:"total"},[n("v-uni-text",[e._v("¥")]),n("v-uni-text",{staticClass:"price"},[e._v(e._s(e.refundPrice))])],1)],1),n("v-uni-view",{staticClass:"flexB return_item"},[n("v-uni-view",[n("v-uni-text",[e._v("退货方式")])],1),n("v-uni-view",[e._v("自行寄回")])],1),n("v-uni-view",{staticClass:"flexB return_item"},[n("v-uni-view",[n("v-uni-text",[e._v("退货原因")]),n("v-uni-text",{staticClass:"star"},[e._v("*")])],1),n("v-uni-view",{staticClass:"choose",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.isPaid=!0}}},[n("v-uni-text",[e._v(e._s(e.reason?e.reason:"请选择"))]),e.reason?e._e():n("v-uni-text",{staticClass:"iconfont iconiconfontjiantou2"})],1)],1),n("v-uni-view",{staticClass:"supple_box"},[n("v-uni-textarea",{attrs:{placeholder:"补充描述,有助于商家更好的处理售后问题",maxlength:"200","placeholder-style":"color:#ccc"},on:{input:function(t){arguments[0]=t=e.$handleEvent(t),e.reasonInput.apply(void 0,arguments)}},model:{value:e.reason_all,callback:function(t){e.reason_all=t},expression:"reason_all"}}),n("v-uni-view",{staticClass:"num flexE"},[e._v(e._s(e.num)+"/200")]),n("u-upload",{ref:"uUpload",attrs:{action:e.action,"show-tips":!1,"max-count":"4",width:"130",height:"130",name:"img",header:e.header},on:{"on-success":function(t){arguments[0]=t=e.$handleEvent(t),e.onSuccess.apply(void 0,arguments)},"on-remove":function(t){arguments[0]=t=e.$handleEvent(t),e.onRemove.apply(void 0,arguments)}}})],1)],1)],1),n("v-uni-view",{staticClass:"sure flexC",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.submit.apply(void 0,arguments)}}},[e._v("提交审核")]),n("u-popup",{attrs:{mode:"bottom",width:"550rpx","border-radius":"40",height:"600rpx"},model:{value:e.isPaid,callback:function(t){e.isPaid=t},expression:"isPaid"}},[n("v-uni-view",{staticClass:"cancel_box"},[n("v-uni-view",{staticClass:"cancel_title"},[n("v-uni-view",[e._v("申请退货原因")]),n("v-uni-text",{staticClass:"iconfont iconguanbi",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.isPaid=!1}}})],1),n("v-uni-view",{staticClass:"cancel_hint"},[e._v("请先和店家联系,商量好后再取消。")]),e._l(e.reasonList,(function(t,i){return n("v-uni-view",{key:t.id,staticClass:"flexB reason_item",on:{click:function(n){arguments[0]=n=e.$handleEvent(n),e.Checked(t,i)}}},[n("v-uni-view",[e._v(e._s(t.text))]),t.isChecked?n("v-uni-text",{staticClass:"iconfont iconxuanzhong"}):n("v-uni-text",{staticClass:"iconfont iconweixuanzhong"})],1)}))],2)],1)],1)},o=[]},d615:function(e,t,n){"use strict";var i=n("4ea4");n("caad"),n("d81d"),n("45fc"),n("a434"),n("a9e3"),n("d3b7"),n("ac1f"),n("5319"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n("96cf");var r=i(n("1da1")),o={name:"u-upload",props:{showUploadList:{type:Boolean,default:!0},action:{type:String,default:""},maxCount:{type:[String,Number],default:52},showProgress:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},imageMode:{type:String,default:"aspectFill"},header:{type:Object,default:function(){return{}}},formData:{type:Object,default:function(){return{}}},name:{type:String,default:"file"},sizeType:{type:Array,default:function(){return["original","compressed"]}},sourceType:{type:Array,default:function(){return["album","camera"]}},previewFullImage:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},deletable:{type:Boolean,default:!0},maxSize:{type:[String,Number],default:Number.MAX_VALUE},fileList:{type:Array,default:function(){return[]}},uploadText:{type:String,default:"选择图片"},autoUpload:{type:Boolean,default:!0},showTips:{type:Boolean,default:!0},customBtn:{type:Boolean,default:!1},width:{type:[String,Number],default:200},height:{type:[String,Number],default:200},delBgColor:{type:String,default:"#fa3534"},delColor:{type:String,default:"#ffffff"},delIcon:{type:String,default:"close"},toJson:{type:Boolean,default:!0},beforeUpload:{type:Function,default:null},beforeRemove:{type:Function,default:null},limitType:{type:Array,default:function(){return["png","jpg","jpeg","webp","gif"]}},index:{type:[Number,String],default:""}},mounted:function(){},data:function(){return{lists:[],isInCount:!0,uploading:!1}},watch:{fileList:{immediate:!0,handler:function(e){var t=this;e.map((function(e){var n=t.lists.some((function(t){return t.url==e.url}));!n&&t.lists.push({url:e.url,error:!1,progress:100})}))}},lists:function(e){this.$emit("on-list-change",e,this.index)}},methods:{clear:function(){this.lists=[]},reUpload:function(){this.uploadFile()},selectFile:function(){var e=this;if(!this.disabled){this.name;var t=this.maxCount,n=this.multiple,i=this.maxSize,r=this.sizeType,o=this.lists,a=(this.camera,this.compressed,this.maxDuration,this.sourceType),s=null,u=t-o.length;s=new Promise((function(e,t){uni.chooseImage({count:n?u>9?9:u:1,sourceType:a,sizeType:r,success:e,fail:t})})),s.then((function(r){var a=e.lists.length;r.tempFiles.map((function(r,a){if(e.checkFileExt(r)&&(n||!(a>=1)))if(r.size>i)e.$emit("on-oversize",r,e.lists,e.index),e.showToast("超出允许的文件大小");else{if(t<=o.length)return e.$emit("on-exceed",r,e.lists,e.index),void e.showToast("超出最大允许的文件个数");o.push({url:r.path,progress:0,error:!1,file:r})}})),e.$emit("on-choose-complete",e.lists,e.index),e.autoUpload&&e.uploadFile(a)})).catch((function(t){e.$emit("on-choose-fail",t)}))}},showToast:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(this.showTips||t)&&uni.showToast({title:e,icon:"none"})},upload:function(){this.uploadFile()},retry:function(e){this.lists[e].progress=0,this.lists[e].error=!1,this.lists[e].response=null,uni.showLoading({title:"重新上传"}),this.uploadFile(e)},uploadFile:function(){var e=arguments,t=this;return(0,r.default)(regeneratorRuntime.mark((function n(){var i,r,o;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(i=e.length>0&&void 0!==e[0]?e[0]:0,!t.disabled){n.next=3;break}return n.abrupt("return");case 3:if(!t.uploading){n.next=5;break}return n.abrupt("return");case 5:if(!(i>=t.lists.length)){n.next=8;break}return t.$emit("on-uploaded",t.lists,t.index),n.abrupt("return");case 8:if(100!=t.lists[i].progress){n.next=11;break}return 0==t.autoUpload&&t.uploadFile(i+1),n.abrupt("return");case 11:if(!t.beforeUpload||"function"!==typeof t.beforeUpload){n.next=22;break}if(r=t.beforeUpload.bind(t.$u.$parent.call(t))(i,t.lists),!r||"function"!==typeof r.then){n.next=18;break}return n.next=16,r.then((function(e){})).catch((function(e){return t.uploadFile(i+1)}));case 16:n.next=22;break;case 18:if(!1!==r){n.next=22;break}return n.abrupt("return",t.uploadFile(i+1));case 22:if(t.action){n.next=25;break}return t.showToast("请配置上传地址",!0),n.abrupt("return");case 25:t.lists[i].error=!1,t.uploading=!0,o=uni.uploadFile({url:t.action,filePath:t.lists[i].url,name:t.name,formData:t.formData,header:t.header,success:function(e){var n=t.toJson&&t.$u.test.jsonString(e.data)?JSON.parse(e.data):e.data;[200,201,204].includes(e.statusCode)?(t.lists[i].response=n,t.lists[i].progress=100,t.lists[i].error=!1,t.$emit("on-success",n,i,t.lists,t.index)):t.uploadError(i,n)},fail:function(e){t.uploadError(i,e)},complete:function(e){uni.hideLoading(),t.uploading=!1,t.uploadFile(i+1),t.$emit("on-change",e,i,t.lists,t.index)}}),o.onProgressUpdate((function(e){e.progress>0&&(t.lists[i].progress=e.progress,t.$emit("on-progress",e,i,t.lists,t.index))}));case 29:case"end":return n.stop()}}),n)})))()},uploadError:function(e,t){this.lists[e].progress=0,this.lists[e].error=!0,this.lists[e].response=null,this.$emit("on-error",t,e,this.lists,this.index),this.showToast("上传失败,请重试")},deleteItem:function(e){var t=this;uni.showModal({title:"提示",content:"您确定要删除此项吗?",success:function(){var n=(0,r.default)(regeneratorRuntime.mark((function n(i){var r;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(!i.confirm){n.next=12;break}if(!t.beforeRemove||"function"!==typeof t.beforeRemove){n.next=11;break}if(r=t.beforeRemove.bind(t.$u.$parent.call(t))(e,t.lists),!r||"function"!==typeof r.then){n.next=8;break}return n.next=6,r.then((function(n){t.handlerDeleteItem(e)})).catch((function(e){t.showToast("已终止移除")}));case 6:n.next=9;break;case 8:!1===r?t.showToast("已终止移除"):t.handlerDeleteItem(e);case 9:n.next=12;break;case 11:t.handlerDeleteItem(e);case 12:case"end":return n.stop()}}),n)})));function i(e){return n.apply(this,arguments)}return i}()})},handlerDeleteItem:function(e){this.lists[e].process<100&&this.lists[e].process>0&&"undefined"!=typeof this.lists[e].uploadTask&&this.lists[e].uploadTask.abort(),this.lists.splice(e,1),this.$forceUpdate(),this.$emit("on-remove",e,this.lists,this.index),this.showToast("移除成功")},remove:function(e){e>=0&&e<this.lists.length&&(this.lists.splice(e,1),this.$emit("on-list-change",this.lists,this.index))},doPreviewImage:function(e,t){var n=this;if(this.previewFullImage){var i=this.lists.map((function(e){return e.url||e.path}));uni.previewImage({urls:i,current:e,success:function(){n.$emit("on-preview",e,n.lists,n.index)},fail:function(){uni.showToast({title:"预览图片失败",icon:"none"})}})}},checkFileExt:function(e){var t=!1,n="",i=/.+\./;return n=e.name.replace(i,"").toLowerCase(),t=this.limitType.some((function(e){return e.toLowerCase()===n})),t||this.showToast("不允许选择".concat(n,"格式的文件")),t}}};t.default=o},dbd2:function(e,t,n){var i=n("8ae9");"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var r=n("4f06").default;r("e399711e",i,!0,{sourceMap:!1,shadowMode:!1})},e03d:function(e,t,n){"use strict";n.r(t);var i=n("84e1"),r=n.n(i);for(var o in i)"default"!==o&&function(e){n.d(t,e,(function(){return i[e]}))}(o);t["default"]=r.a},e6ad:function(e,t,n){var i=n("b912");"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var r=n("4f06").default;r("6913a508",i,!0,{sourceMap:!1,shadowMode:!1})},fcaa:function(e,t,n){var i=n("5fe0");"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var r=n("4f06").default;r("44c04afa",i,!0,{sourceMap:!1,shadowMode:!1})}}]);
|