"use strict";const e=require("../../../common/vendor.js"),r=require("../../index.js");require("../../url/index.js"),require("../../store/index.js"),require("../../store/app.js"),require("../../api/promotion/diy.js"),require("../../request/index.js"),require("../../config/index.js"),require("../../platform/index.js"),require("../../platform/provider/wechat/index.js"),require("../../platform/provider/wechat/miniProgram.js"),require("../../api/member/auth.js"),require("../../api/member/social.js"),require("../../api/member/user.js"),require("../../platform/provider/apple/index.js"),require("../../platform/share.js"),require("../../router/index.js"),require("../../hooks/useModal.js"),require("../../helper/index.js"),require("../../helper/test.js"),require("../../helper/digit.js"),require("../../api/member/signin.js"),require("../../helper/throttle.js"),require("../../platform/pay.js"),require("../../api/pay/order.js"),require("../../store/user.js"),require("../../store/cart.js"),require("../../api/trade/cart.js"),require("../../api/pay/wallet.js"),require("../../api/trade/order.js"),require("../../api/promotion/coupon.js"),require("../../store/sys.js"),require("../../store/modal.js"),require("../../config/zIndex.js");const i={__name:"su-image",props:{src:{type:String,default:""},errorSrc:{type:String,default:"/static/img/shop/empty_network.png"},mode:{type:String,default:"widthFix"},isPreview:{type:Boolean,default:!1},previewList:{type:Array,default:()=>[]},current:{type:Number,default:-1},height:{type:Number,default:0},width:{type:Number,default:0},radius:{type:Number,default:0}},emits:["load","error"],setup(i,{emit:t}){const s=e.reactive({isError:!1,imgHeight:600}),o=i,u=t,a=e.computed((()=>({height:(o.height||s.imgHeight)+"rpx",width:o.width?o.width+"rpx":"100%",borderRadius:o.radius?o.radius+"rpx":""})));function p(e){0===o.height&&(s.imgHeight=e.detail.height/e.detail.width*750)}function n(e){s.isError=!0,u("error",e)}function d(){o.isPreview&&e.index.previewImage({urls:o.previewList.length<1?[o.src]:o.previewList,current:o.current,longPressActions:{itemList:["发送给朋友","保存图片","收藏"],success:function(e){console.log("选中了第"+(e.tapIndex+1)+"个按钮,第"+(e.index+1)+"张图片")},fail:function(e){console.log(e.errMsg)}}})}return(t,o)=>e.e({a:!s.isError},s.isError?{}:{b:e.s(a.value),c:i.mode,d:e.unref(r.sheep).$url.cdn(i.src),e:e.o(d),f:e.o(p),g:e.o(n)})}},t=e._export_sfc(i,[["__scopeId","data-v-74e3b72e"]]);wx.createComponent(t);
