1 line
12 KiB
JavaScript
1 line
12 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7bc92a39"],{3019:function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"page"},[i("c-title",{attrs:{hide:!1,text:e.pluginOptions.plugin_name}}),e.introduction.pickingbanner?i("div",{staticClass:"imagebox"},[i("img",{staticClass:"image",attrs:{src:e.introduction.pickingbanner}})]):e._e(),i("van-form",{on:{submit:e.onSubmit}},[i("div",{staticClass:"content"},[i("van-field",{attrs:{required:"",name:e.pluginOptions.password_name,"label-width":"4.5rem",label:e.pluginOptions.password_name,placeholder:"请输入"+e.pluginOptions.password_name,rules:[{required:!0,message:"请输入"+e.pluginOptions.password_name}]},on:{blur:e.getPrice},model:{value:e.applyModel.password,callback:function(t){e.$set(e.applyModel,"password","string"===typeof t?t.trim():t)},expression:"applyModel.password"}}),i("van-field",{attrs:{required:"",name:"姓名","label-width":"2.5rem",label:"姓名:",placeholder:"请输入姓名"},model:{value:e.applyModel.realname,callback:function(t){e.$set(e.applyModel,"realname","string"===typeof t?t.trim():t)},expression:"applyModel.realname"}}),i("van-field",{attrs:{required:"",label:"手机号:","label-width":"3.5rem",placeholder:"请输入手机号"},model:{value:e.applyModel.mobile,callback:function(t){e.$set(e.applyModel,"mobile","string"===typeof t?t.trim():t)},expression:"applyModel.mobile"}}),i("van-cell",{staticClass:"text-name",staticStyle:{"padding-left":"10px","padding-right":"10px"},attrs:{"is-link":""}},[i("span",{staticStyle:{"margin-right":"0.5rem"}},[i("span",{staticStyle:{color:"#ee0a24"}},[e._v("*")]),e._v(e._s(e.pluginOptions.city_name))]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.addressName,expression:"addressName"}],staticStyle:{border:"none"},attrs:{type:"text",readonly:"",placeholder:"请选择城市"},domProps:{value:e.addressName},on:{click:function(t){t.stopPropagation(),e.addressShow=!0},input:function(t){t.target.composing||(e.addressName=t.target.value)}}})]),e.strShow?i("van-cell",{staticClass:"text-name",staticStyle:{"padding-left":"10px","padding-right":"10px"},attrs:{"is-link":""}},[i("span",{staticStyle:{"margin-right":"0.5rem"}},[i("span",{staticStyle:{color:"#ee0a24"}},[e._v("*")]),e._v("街道")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.street,expression:"street"}],staticStyle:{border:"none"},attrs:{type:"text",readonly:"",placeholder:"请选择街道"},domProps:{value:e.street},on:{click:function(t){t.stopPropagation(),e.streetShow=!0},input:function(t){t.target.composing||(e.street=t.target.value)}}})]):e._e(),i("yd-cityselect",{attrs:{callback:e.addressCallback,items:e.area},model:{value:e.addressShow,callback:function(t){e.addressShow=t},expression:"addressShow"}}),i("van-popup",{style:{width:"100%",height:"100%",overflow:e.auto},attrs:{position:"right"},model:{value:e.streetShow,callback:function(t){e.streetShow=t},expression:"streetShow"}},[i("van-nav-bar",{attrs:{title:"选择街道"},scopedSlots:e._u([{key:"left",fn:function(){return[i("span",[i("van-icon",{attrs:{name:"arrow-left",size:"18",color:"#333"},nativeOn:{click:function(t){e.streetShow=!1}}})],1)]},proxy:!0}])}),e._l(e.districtVal,(function(t,a){return i("van-cell",{key:a,attrs:{"is-link":"",border:!1,arrowv:""},nativeOn:{click:function(i){return e.streetConfirm(t)}}},[i("span",{attrs:{slot:"title"},slot:"title"},[e._v(e._s(t.areaname))])])}))],2),i("van-field",{attrs:{required:"","label-width":"4.5rem",label:e.pluginOptions.address_name,placeholder:"请输入详细地址"},model:{value:e.applyModel.address,callback:function(t){e.$set(e.applyModel,"address","string"===typeof t?t.trim():t)},expression:"applyModel.address"}})],1),i("div",{staticClass:"text"},[e._v(e._s(e.introduction.commitment)+": "+e._s(e.$i18n.t("money"))+e._s(e.price||0))]),"picking-card-one"==e.plugin?[Number(e.introduction.is_show)?e._e():i("div",{staticClass:"input text install"},[i("div",[i("span",{staticStyle:{color:"#ee0a24"}},[e._v("*")]),i("span",{staticStyle:{margin:"0 0.2rem"}},[e._v("请确认是否使用"+e._s(e.introduction.commitment)+"兑换滤芯")])]),i("van-radio-group",{staticClass:"radio",attrs:{direction:"horizontal"},model:{value:e.applyModel.is_filter,callback:function(t){e.$set(e.applyModel,"is_filter",t)},expression:"applyModel.is_filter"}},[i("van-radio",{staticClass:"radioItem",attrs:{name:"2","icon-size":"0.9rem","checked-color":"#f15353"}},[e._v("是")]),i("van-radio",{staticClass:"radioItem",attrs:{name:"1","icon-size":"0.9rem","checked-color":"#f15353"}},[e._v("否")])],1)],1),i("div",{staticStyle:{display:"flex","margin-bottom":"1rem"}},[i("van-checkbox",{staticClass:"checkbox text",attrs:{"checked-color":"#f15353",shape:"square"},model:{value:e.instroductionSelect,callback:function(t){e.instroductionSelect=t},expression:"instroductionSelect"}}),i("p",{on:{click:e.showIntroduction}},[e._v("提货说明")])],1)]:e._e(),i("button",{staticClass:"submit",on:{click:e.setApplyData}},[e._v("立即申请")])],2),i("van-popup",{attrs:{round:"",closeable:""},model:{value:e.introductionShow,callback:function(t){e.introductionShow=t},expression:"introductionShow"}},[i("p",{staticClass:"popup-title"},[e._v("提货说明")]),i("div",{staticClass:"popup-box",domProps:{innerHTML:e._s(e.introduction.pick_explain)}})])],1)},s=[],o=(i("e7e5"),i("d399")),n=(i("e9c4"),i("99af"),i("a9e3"),i("14d9"),i("6968")),r={data:function(){return{applyModel:{password:"",realname:"",mobile:"",provinceId:"",cityId:"",districtId:"",streetId:"",address:"",is_filter:"1"},addressShow:!1,streetShow:!1,addressName:"",area:district,province:"",city:"",street:"",strShow:!1,district:"",goods_id:"",price:"",introductionShow:!1,instroductionSelect:!1,introduction:{},pluginOptions:{plugin_name:"旅游激活卡",password_name:"激活密码",city_name:"出发城市",address_name:"出发地址"},plugin:"picking-card",goods_option_id:0}},activated:function(){this.init(),this.getConfig()},watch:{},methods:{init:function(){this.$route.params&&this.$route.params.plugin&&"one"==this.$route.params.plugin&&(this.plugin="picking-card-one",this.pluginOptions={plugin_name:"提货卡",password_name:"提货密码",city_name:"所在城市",address_name:"收货地址"}),this.goods_id="",this.price="",this.addressShow=!1,this.streetShow=!1,this.strShow=!1,this.introductionShow=!1,this.addressName="",this.province="",this.city="",this.street="",this.district="",this.applyModel={password:"",realname:"",mobile:"",provinceId:"",cityId:"",districtId:"",streetId:"",address:"",is_filter:"1"},this.fun.setWXTitle(this.pluginOptions.plugin_name)},onSubmit:function(e){},addressCallback:function(e){this.addressName=e.itemName1+" "+e.itemName2+" "+e.itemName3,this.province=e.itemName1,this.city=e.itemName2,this.district=e.itemName3,this.applyModel.provinceId=e.itemValue1,this.applyModel.cityId=e.itemValue2,this.applyModel.districtId=e.itemValue3,this.getStreet(e.itemValue3)},streetConfirm:function(e){this.street=e.areaname,this.applyModel.streetId=e.id,this.streetShow=!1},getStreet:function(e){var t=this;$http.get("member.memberAddress.street",{district_id:e}).then((function(e){1===e.result&&!t.fun.isTextEmpty(e.data)&&e.data.length>0?(t.districtVal=e.data,t.strShow=!0):t.strShow=!1})).catch((function(e){}))},showIntroduction:function(){this.introductionShow=!0},getConfig:function(){var e=this,t="plugin.picking-card.frontend.pickingCard.getConfig";"picking-card-one"==this.plugin&&(t="plugin.picking-card-one.frontend.pickingCard.getConfig"),$http.get(t,{},"加载中...").then((function(t){1===t.result&&(e.introduction=t.data)}))},getPrice:function(){var e=this;if(!(this.applyModel.password.length<4)){var t="plugin.picking-card.frontend.pickingCard.getPrice";"picking-card-one"==this.plugin&&(t="plugin.picking-card-one.frontend.pickingCard.getPrice"),$http.get(t,{password:this.applyModel.password},"...").then((function(t){1===t.result?(e.goods_id=t.data.goods_id,e.goods_option_id=t.data.goods_option_id||0,e.price=t.data.margin):(e.goods_id="",e.price="",e.$toast(t.msg))}))}},setApplyData:function(){var e=this;if(this.fun.isTextEmpty(this.applyModel.password))Object(o["a"])("请填写提货密码");else if(this.fun.isTextEmpty(this.applyModel.realname))Object(o["a"])("请填写真实姓名");else if(this.fun.isTextEmpty(this.applyModel.mobile))Object(o["a"])("请填写手机号码");else if(this.fun.isMoblie(this.applyModel.mobile))Object(o["a"])("请输入正确的手机号");else if(this.fun.isTextEmpty(this.applyModel.provinceId)||this.fun.isTextEmpty(this.applyModel.cityId)||this.fun.isTextEmpty(this.applyModel.districtId))Object(o["a"])("请选择省市区");else if(this.fun.isTextEmpty(this.applyModel.streetId)||0===this.applyModel.streetId)Object(o["a"])("请选择街道地址");else if(this.fun.isTextEmpty(this.applyModel.address))Object(o["a"])("请填写详细地址");else if("picking-card-one"!=this.plugin||this.applyModel.is_filter)if("picking-card-one"!=this.plugin||this.instroductionSelect)if(this.fun.isTextEmpty(this.goods_id))Object(o["a"])("提货密码错误");else{var t={username:this.applyModel.realname,mobile:this.applyModel.mobile,province:this.province,city:this.city,district:this.district,street:this.street,address:this.applyModel.address},i={dispatch_type_id:1,address:JSON.stringify(t),goods:'[{"goods_id": '.concat(this.goods_id,',"total": 1, "option_id": ').concat(this.goods_option_id,"}]"),price:this.price,is_filter:Number(this.applyModel.is_filter)-1,password:this.applyModel.password},a="plugin.picking-card.frontend.create.index";"picking-card-one"==this.plugin&&(a="plugin.picking-card-one.frontend.create.index"),$http.post(a,i,"提交中").then((function(t){1===t.result?e.$router.push(e.fun.getUrl("orderpay",{status:2,order_ids:t.data.order_ids})):Object(o["a"])(t.msg)}),(function(e){}))}else Object(o["a"])("请勾选提货说明");else Object(o["a"])("请勾选是否使用".concat(this.introduction.commitment,"兑换滤芯"))}},components:{cTitle:n["a"]}},l=r,d=l,c=(i("dc59"),i("2877")),p=Object(c["a"])(d,a,s,!1,null,"e6a8ee2c",null);t["default"]=p.exports},7257:function(e,t,i){var a=i("24fb");t=a(!1),t.push([e.i,".page[data-v-e6a8ee2c]{background-color:#fff;text-align:left;min-height:100vh}.page .title[data-v-e6a8ee2c]{line-height:2.75rem;letter-spacing:0;padding-left:.906rem}.page .title[data-v-e6a8ee2c],.page .title .van-icon[data-v-e6a8ee2c]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.page .title .van-icon[data-v-e6a8ee2c]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.page .title .van-icon[data-v-e6a8ee2c]:before{padding-top:.969rem}.page .title span[data-v-e6a8ee2c]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;margin-left:-3rem}.page .imagebox[data-v-e6a8ee2c]{text-align:center;padding:.531rem}.page .image[data-v-e6a8ee2c]{width:21.563rem;border-radius:.625rem}.page .content[data-v-e6a8ee2c]{padding:.5rem .5rem 0}.page .content .field[data-v-e6a8ee2c]{padding-left:0}.page .button[data-v-e6a8ee2c]{border-radius:.469rem}.page .text[data-v-e6a8ee2c]{padding-left:1.531rem;line-height:3rem}.page .install[data-v-e6a8ee2c]{padding-left:1.5rem;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;margin-bottom:1.5rem}.page .checkbox[data-v-e6a8ee2c],.page .install[data-v-e6a8ee2c]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.page .checkbox[data-v-e6a8ee2c]{margin-right:.3rem}.page .submit[data-v-e6a8ee2c]{margin:1rem 2rem;width:19.125rem;height:2.5rem;background-color:#f15353;border:none;color:#fff;border-radius:.469rem}.popup-title[data-v-e6a8ee2c]{font-size:16px;font-weight:700;text-align:center;padding:.5rem}.popup-box[data-v-e6a8ee2c]{width:18rem;height:18rem;margin:0 auto;padding:.5rem;overflow-y:scroll}.text-name[data-v-e6a8ee2c],.text-name .van-cell__value span[data-v-e6a8ee2c]{color:#555}[data-v-e6a8ee2c] .van-cell--clickable:active{background-color:#fff}",""]),e.exports=t},d47b:function(e,t,i){var a=i("7257");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);var s=i("499e").default;s("6b415b98",a,!0,{sourceMap:!1,shadowMode:!1})},dc59:function(e,t,i){"use strict";i("d47b")}}]); |