bztang-admin/addons/yun_shop/static/app/js/chunk-ccf8f680.9da43265.js

1 line
13 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ccf8f680"],{1535:function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,'[data-v-2622800a] .van-field__label{width:unset}[data-v-2622800a] .video-list .van-uploader__wrapper{-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}[data-v-2622800a] .detail img{width:100%!important;height:100%}[data-v-2622800a] .van-uploader__input-wrapper{margin:0 8px 8px 0;width:unset}[data-v-2622800a] .van-field{white-space:nowrap}.random-shoot .required-rows[data-v-2622800a]{position:relative}.random-shoot .required-rows[data-v-2622800a]:after{content:"*";position:absolute;right:-.5rem;top:0;color:red}.random-shoot .required[data-v-2622800a]{position:relative}.random-shoot .required[data-v-2622800a]:after{content:"*";position:absolute;right:-10px;top:0;color:red}.random-shoot .photo[data-v-2622800a],.random-shoot .textarea[data-v-2622800a]{background:#fff;padding:10px 16px}.random-shoot .box-video[data-v-2622800a]{position:relative}.random-shoot .close[data-v-2622800a]{position:absolute;top:0;right:.9375rem;width:14px;height:14px;background-color:rgba(0,0,0,.7);border-radius:0 0 0 12px;z-index:10}.random-shoot .close .van-icon[data-v-2622800a]{position:absolute;top:-2px;right:-2px;color:#fff;font-size:16px;-webkit-transform:scale(.5);transform:scale(.5)}.random-shoot video[data-v-2622800a]{z-index:1}.random-shoot .upload-area[data-v-2622800a]{position:relative;width:6.5625rem;height:6.5625rem;border-radius:.3125rem;border:1px solid #cfcfcf}.random-shoot .upload-area[data-v-2622800a]:after{width:1.5rem;height:.1875rem}.random-shoot .upload-area[data-v-2622800a]:after,.random-shoot .upload-area[data-v-2622800a]:before{position:absolute;content:"";background:#aaaab3;border-radius:.3125rem;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.random-shoot .upload-area[data-v-2622800a]:before{width:.1875rem;height:1.5rem}.random-shoot .box[data-v-2622800a]{margin-top:1.2188rem;border:1px solid #cfcfcf;overflow:hidden;border-radius:.3125rem}.random-shoot .photo-img[data-v-2622800a]{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.random-shoot .photo-img[data-v-2622800a],.random-shoot .video-list[data-v-2622800a]{margin-top:1.2188rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.random-shoot .video-list[data-v-2622800a]{-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}',""]),t.exports=e},"258d":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.form_cluster&&0!==t.form_cluster.length?a("div",{staticClass:"random-shoot"},[a("c-title",{attrs:{text:t.text}}),a("div",{staticStyle:{background:"#fff",padding:".2813rem 1.0625rem","margin-bottom":"1rem"}},[t.detail?a("div",{staticStyle:{width:"100%","background-color":"#fff"}},[a("div",{staticClass:"detail",domProps:{innerHTML:t._s(t.detail)}})]):t._e()]),a("van-field",{attrs:{placeholder:t.form_cluster[0].tips.split("")[1],"input-align":"right"},model:{value:t.name,callback:function(e){t.name=e},expression:"name"}},[a("div",{attrs:{slot:"label"},slot:"label"},[a("i",{staticClass:"iconfont icon-wode-wode",staticStyle:{color:"#3189E3","margin-right":".5rem"}}),a("span",{class:{required:t.form_cluster[0].required}},[t._v(t._s(t.form_cluster[0].title))])])]),a("van-field",{attrs:{"label-class":"field-left",placeholder:t.form_cluster[1].tips.split("")[1],"input-align":"right"},model:{value:t.phone,callback:function(e){t.phone=e},expression:"phone"}},[a("div",{attrs:{slot:"label"},slot:"label"},[a("i",{staticClass:"iconfont icon-zx_map_tel",staticStyle:{color:"#3189E3","margin-right":".5rem"}}),a("span",{class:{required:t.form_cluster[1].required}},[t._v(t._s(t.form_cluster[1].title))])])]),a("van-cell",{attrs:{"title-style":"text-align:left;","is-link":"",value:t.address_title||"请选择区域"},on:{click:function(e){t.addressShow=!0}},scopedSlots:t._u([{key:"title",fn:function(){return[a("i",{staticClass:"iconfont icon-zx_map_locate1",staticStyle:{color:"#3189E3","margin-right":".5rem"}}),a("span",{class:{required:t.form_cluster[2].required}},[t._v(t._s(t.form_cluster[2].title))])]},proxy:!0}],null,!1,1524723836)}),a("van-cell",{attrs:{"title-style":"text-align:left;","is-link":"",value:t.locationTitle||"请选择定位"},on:{click:t.select_location},scopedSlots:t._u([{key:"title",fn:function(){return[a("i",{staticClass:"iconfont icon-zx_map_local",staticStyle:{color:"#3189E3","margin-right":".5rem"}}),a("span",{class:{required:t.form_cluster[3].required}},[t._v(t._s(t.form_cluster[3].title))])]},proxy:!0}],null,!1,2625106032)}),a("van-cell",{attrs:{"title-style":"text-align:left;",value:t.time,"is-link":""},on:{click:t.show_popup},scopedSlots:t._u([{key:"title",fn:function(){return[a("i",{staticClass:"iconfont icon-lishi",staticStyle:{color:"#3189E3","margin-right":".5rem"}}),a("span",{class:{required:t.form_cluster[4].required}},[t._v(t._s(t.form_cluster[4].title))])]},proxy:!0}],null,!1,221758740)}),a("div",{staticClass:"textarea"},[a("p",{staticStyle:{"text-align":"left"}},[a("i",{staticClass:"iconfont icon-qhm_service",staticStyle:{color:"#3189E3","margin-right":".5rem"}}),a("span",{staticClass:"required-rows",class:{required:t.form_cluster[5].required}},[t._v(t._s(t.form_cluster[5].title))])]),a("div",{staticClass:"box"},[a("van-field",{attrs:{rows:"2",autosize:"",type:"textarea",maxlength:"50",placeholder:"请输入留言","show-word-limit":""},model:{value:t.message,callback:function(e){t.message=e},expression:"message"}})],1)]),a("div",{staticClass:"photo"},[a("p",{staticStyle:{"text-align":"left"}},[a("i",{staticClass:"iconfont icon-jk_haibao",staticStyle:{color:"#3189E3","margin-right":".5rem"}}),t._v(" "+t._s(t.form_cluster[6].title)),a("span",{staticStyle:{color:"#AAAAB3"}},[t._v("(可多张)")])]),a("div",{staticClass:"photo-img"},[a("van-uploader",{attrs:{"preview-size":"6.5625rem",multiple:"","after-read":t.afterRead,"max-count":t.max_count,"before-delete":t.beforeDelete},model:{value:t.fileList,callback:function(e){t.fileList=e},expression:"fileList"}},[a("div",{staticClass:"upload-area"})])],1)]),a("div",{staticClass:"photo"},[a("p",{staticStyle:{"text-align":"left"}},[a("i",{staticClass:"iconfont icon-fontclass-ship",staticStyle:{color:"#3189E3","margin-right":".5rem"}}),t._v(" "+t._s(t.form_cluster[7].title)),a("span",{staticStyle:{color:"#AAAAB3"}},[t._v("(最多"+t._s(t.count)+"个最长5分钟")])]),a("div",{staticClass:"video-list"},[t.fileListVideo&&0!==t.fileListVideo.length?[t._l(t.fileListVideo,(function(e,i){return[a("div",{staticClass:"box-video"},[a("video",{ref:"video",refInFor:!0,staticStyle:{"margin-right":"0.9375rem",width:"6.5625rem",height:"6.5625rem"},attrs:{controls:"",preload:"metadata",controlslist:"nodownload","webkit-playsinline":"true","x5-video-player-type":"h5",playsinline:"","x5-playsinline":"","x5-video-orientation":"portrait","x5-video-player-fullscreen":"",autoplay:"autoplay",src:e}},[a("source",{attrs:{src:e,type:"video/ogg"}}),a("source",{attrs:{src:e,type:"video/mp4"}}),t._v(" 你的浏览器不支持video标签 ")]),a("div",{staticClass:"close",on:{click:function(e){return t.del(i)}}},[a("van-icon",{attrs:{name:"cross"}})],1)])]}))]:t._e(),t.fileListVideo.length!==t.count?a("van-uploader",{attrs:{accept:"video/*","preview-image":!1,"preview-size":"6.5625rem",multiple:"","after-read":t.afterReadVideo,"max-count":t.max_count}},[a("div",{staticClass:"upload-area"})]):t._e()],2)]),a("van-popup",{attrs:{position:"bottom",round:""},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[a("van-datetime-picker",{attrs:{type:"date",title:"请选择"+t.form_cluster[4].title},on:{cancel:t.cancel,confirm:t.confirm},model:{value:t.currentDate,callback:function(e){t.currentDate=e},expression:"currentDate"}})],1),a("yd-cityselect",{staticStyle:{height:"80%","z-index":"1000000"},attrs:{callback:t.addressCallback,items:t.district,provance:"广东省",city:"汕尾市"},model:{value:t.addressShow,callback:function(e){t.addressShow=e},expression:"addressShow"}}),a("div",{staticStyle:{background:"#fff","margin-top":"1.2188rem",padding:".2813rem 1.0625rem"}},[a("van-button",{attrs:{color:"#3189E3",round:"",block:""},on:{click:t.submit}},[t._v("提交")])],1)],1):t._e()},o=[],r=(a("e7e5"),a("d399")),s=(a("99af"),a("b64b"),a("a434"),a("b0c0"),a("14d9"),a("d3b7"),a("3ca3"),a("ddb0"),a("2b3d"),a("9861"),a("88a7"),a("271a"),a("5494"),a("024c")),l=a.n(s),n={data:function(){return{count:3,max_count:3,name:"",phone:"",time:"2023-2-22",fileList:[],fileListVideo:[],locationTitle:"",video_path:[],images:[],address_title:"",form_id:"",form_cluster:[],text:"",message:"",lat:"",lng:"",show:!1,currentDate:new Date,district:district,detail:"",addressShow:!1}},activated:function(){this.form_id=this.$route.query.form_id;var t=new Date,e=t.getFullYear(),a=t.getMonth()+1,i=t.getDate();if(this.time="".concat(e,"-").concat(a,"-").concat(i),this.getData(),JSON.parse(localStorage.getItem("myLocation"))){var o=JSON.parse(localStorage.getItem("myLocation"));this.lng=o.point.lng,this.lat=o.point.lat,this.getAmap(o.city_name,o.point.lng,o.point.lat)}},methods:{addressCallback:function(t){this.address_title=t.itemName1+"-"+t.itemName2+"-"+t.itemName3},beforeDelete:function(t,e){return this.images.splice(e.index,1),!0},cancel:function(){this.show=!1},confirm:function(t){var e=t.getFullYear(),a=t.getMonth()+1,i=t.getDate();this.time="".concat(e,"-").concat(a,"-").concat(i),this.show=!1},show_popup:function(){this.show=!0},submit:function(){var t=this,e={form_id:this.form_id,name:this.name,mobile:this.phone,date:this.time,area:this.address_title,rows:this.message,images:this.images,videos:this.video_path,coordinate:{longitude:this.lng,latitude:this.lat,address:this.locationTitle}};return this.form_cluster[1].required&&!this.phone?this.$toast("请输入"+this.form_cluster[1].title):this.form_cluster[5].required&&!this.message?this.$toast("请输入"+this.form_cluster[5].title):this.form_cluster[7].required&&0==this.fileListVideo.length?this.$toast("请上传"+this.form_cluster[7].title):this.form_cluster[6].required&&0==this.fileList.length?this.$toast("请上传"+this.form_cluster[6].title):this.form_cluster[4].required&&!this.time?this.$toast("请选择"+this.form_cluster[4].title):this.form_cluster[3].required&&!this.locationTitle?this.$toast("请选择"+this.form_cluster[3].title):this.form_cluster[0].required&&!this.name?this.$toast("请输入"+this.form_cluster[0].title):this.form_cluster[2].required&&!this.address_title?this.$toast("请选择"+this.form_cluster[2].title):void $http.post("plugin.shoot-casually.frontend.form-member.submit",e,"").then((function(e){var a=e.result,i=e.msg;t.$toast(i),a&&t.$router.push(t.fun.getUrl("random_shot_list"))}))},uploadAudioM:function(t){var e=this,a=this.fun.getRealUrl("upload.uploadPic",{});a+="upload_type=video";var i=new FormData;i.append("file",t),r["a"].loading({message:"视频正在上传中",forbidClick:!0}),axios.post(a,i,{headers:{"Content-Type":"multipart/form-data"}}).then((function(t){Object(r["a"])({message:t.data.msg}),1===t.data.result&&(r["a"].clear(),e.video_path.push(t.data.data.img_url))})).catch((function(t){}))},getAmap:function(t,e,a){var i=this;l.a.plugin("AMap.Geocoder",(function(){var o=new l.a.Geocoder({city:t});o.getAddress([e,a],(function(t,e){"complete"===t&&"OK"===e.info&&(i.locationTitle=e.regeocode.formattedAddress)}))}))},del:function(t){this.fileListVideo.splice(t,1),this.video_path.splice(t,1)},select_location:function(){this.$store.commit("setReferer",window.location.href),this.$router.push(this.fun.getUrl("o2oLocation_loc",{fromHome:1}))},afterRead:function(t,e){if(t&&t.length)for(var a=0;a<t.length;a++)this.onRead_1(t[a],e);else this.onRead_1(t,e)},onRead_1:function(t,e){var a=this;r["a"].loading({message:"上传中",forbidClick:!0});var i=new FormData;!0===e?i.append("file",t):i.append("file",t.file);var o=this.fun.getRealUrl("upload.uploadPic",{});axios.post(o,i,{headers:{"Content-Type":"multipart/form-data"}}).then((function(t){var e=t.data,i=e.msg,o=e.result,r=e.data;a.$toast(i),o&&a.images.push(r.img_url)})).catch((function(t){}))},afterReadVideo:function(t){var e=this,a=null,i=t.file;void 0!=window.createObjectURL?a=window.createObjectURL(i):void 0!=window.URL?a=window.URL.createObjectURL(i):void 0!=window.webkitURL&&(a=window.webkitURL.createObjectURL(i));var o,s=new Audio(a);s.muted=!0,s.play().then((function(){return s.pause()})),s.addEventListener("loadedmetadata",(function(){o=s.duration;var t=parseInt(o);t>300?(s.muted=!1,Object(r["a"])("视频不能超过5分钟")):(s.muted=!1,e.fileListVideo.push(a),e.uploadAudioM(i))}))},getData:function(){var t=this;$http.get("plugin.shoot-casually.frontend.form.show",{form_id:this.form_id},"").then((function(e){var a=e.result,i=e.msg,o=e.data;if(a){var r=o.title;t.text=r,t.detail=o.detail,t.max_count=o.form_cluster[6].count,t.fun.setWXTitle(r),t.form_cluster=o.form_cluster,t.$nextTick((function(){var e={title:o.title,imgUrl:o.form_image_url,description:o.describe};t.fun.wxShare("",{},e)}))}else t.$toast(i)}))}}},c=n,d=c,u=(a("e5f3"),a("2877")),m=Object(u["a"])(d,i,o,!1,null,"2622800a",null);e["default"]=m.exports},e5f3:function(t,e,a){"use strict";a("fdbcb")},fdbcb:function(t,e,a){var i=a("1535");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var o=a("499e").default;o("68aa848e",i,!0,{sourceMap:!1,shadowMode:!1})}}]);