bztang-admin/addons/yun_shop/static/app/js/chunk-7334d824.a20ff8be.js

1 line
6.5 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7334d824"],{"448c":function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,"#change-site .van-field__label{width:7rem}",""]),t.exports=e},5510:function(t,e,i){var a=i("75fe");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var o=i("499e").default;o("265eb4ba",a,!0,{sourceMap:!1,shadowMode:!1})},"5cfc1":function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"change-site"}},[i("c-title",{attrs:{hide:!1,text:t.isNew?"新建站点":"绑定站点"}}),i("div",{staticClass:"content"},[i("van-form",[t.isNew?i("van-field",{attrs:{name:"公司/个人名称",label:"公司/个人名称",placeholder:"请填写公司/个人名称",rules:[{required:!0,message:"请填写公司/个人名称"}]},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name","string"===typeof e?e.trim():e)},expression:"form.name"}}):t._e(),i("van-field",{attrs:{name:"域名",label:"域名",placeholder:"请填写域名",rules:[{required:!0,message:"请填写域名"}]},model:{value:t.form.domain,callback:function(e){t.$set(t.form,"domain","string"===typeof e?e.trim():e)},expression:"form.domain"}}),i("p",{staticClass:"tips"},[t._v("已部署的当前商城系统域名,如:"+t._s(t.domain))]),i("p",{staticClass:"tips red"},[t._v("注:您只能绑定一个站点,请勿绑定他人站点!")]),i("van-field",{attrs:{name:"手机号",label:"手机号",placeholder:"请填写手机号",rules:[{required:!0,message:"请填写手机号"}]},model:{value:t.form.mobile,callback:function(e){t.$set(t.form,"mobile","string"===typeof e?e.trim():e)},expression:"form.mobile"}}),i("van-field",{attrs:{center:"",clearable:"",label:"短信验证码",placeholder:"请输入短信验证码"},model:{value:t.authcode,callback:function(e){t.authcode="string"===typeof e?e.trim():e},expression:"authcode"}},[i("van-button",{directives:[{name:"show",rawName:"v-show",value:this.count<=0,expression:"this.count<= 0"}],attrs:{slot:"button",size:"small",round:"",plain:"",type:"info"},on:{click:t.sureIdentify},slot:"button"},[t._v(" 获取验证码 ")]),i("van-button",{directives:[{name:"show",rawName:"v-show",value:this.count>0,expression:"this.count> 0"}],attrs:{slot:"button",size:"small",round:"",plain:"",type:"info",disabled:""},slot:"button"},[t._v(" "+t._s(t.count)+"秒后重新获取 ")])],1)],1),i("div",{staticClass:"btn",on:{click:t.toSave}},[t._v(t._s(t.isNew?"创建站点":"保存"))]),i("p",{staticClass:"blue-txt",on:{click:t.changeNew}},[t._v(t._s(t.isNew?"绑定已有站点":"创建新的站点"))])],1)],1)},o=[],s=(i("e7e5"),i("d399")),n=(i("b0c0"),i("ac1f"),i("5319"),i("6968")),r={data:function(){return{isNew:!1,plugin_id:"",domain:document.domain,form:{name:"",domain:"",mobile:""},authcode:"",count:"",timer:null}},activated:function(){this.initData(),this.isNew=1==this.$route.query.isNew,this.plugin_id=this.$route.query.plugin_id,this.checkData()},methods:{checkData:function(){var t=this,e="plugin.product-market.api.client.index";58===this.plugin_id&&(e="plugin.market-sub.api.client.index"),$http.get(e,{},"获取中").then((function(e){1===e.result?t.isBinding=!1:(t.isBinding=!0,t.$dialog.alert({message:e.msg}).then((function(){t.$router.go(-1)})).catch((function(){})))})).catch((function(t){}))},initData:function(){this.form={name:"",domain:"",mobile:""},this.authcode="",this.count="",this.time&&clearInterval(this.timer)},changeNew:function(){this.isNew=!this.isNew},sureIdentify:function(){var t=this;if(this.form.mobile){var e="plugin.product-market.api.client.index.send-code";58===this.plugin_id&&(e="plugin.market-sub.api.client.index.send-code");var i={mobile:this.form.mobile},a=60;$http.post(e,i,"...").then((function(e){1===e.result?(Object(s["a"])("已发送"),t.timer||(t.count=a,t.timer=setInterval((function(){t.count>0&&t.count<=a?t.count--:(clearInterval(t.timer),t.timer=null)}),1e3))):t.$dialog.alert({message:e.msg})}),(function(e){t.$dialog.alert({message:e.msg})}))}else Object(s["a"])("请先填写手机号")},checkDomain:function(){return!(this.form.domain.indexOf("https://")>-1||this.form.domain.indexOf("http://")>-1)},toSave:function(){var t=this;if(!this.isNew||this.form.name)if(this.form.domain)if(this.checkDomain())if(this.form.mobile)if(this.authcode){var e="",i={};this.isNew?(e="plugin.product-market.api.client.index.add",58===this.plugin_id&&(e="plugin.market-sub.api.client.index.add"),i={domain:this.form.domain,mobile:this.form.mobile,code:this.authcode,name:this.form.name}):(e="plugin.product-market.api.client.index.bind",58===this.plugin_id&&(e="plugin.market-sub.api.client.index.bind"),i={domain:this.form.domain,mobile:this.form.mobile,code:this.authcode}),$http.post(e,i,"...").then((function(e){1===e.result?(t.$dialog.alert({message:e.msg}),t.gotoOrder()):t.$dialog.alert({message:e.msg})}),(function(e){t.$dialog.alert({message:e.msg})}))}else Object(s["a"])("请先填写验证码");else Object(s["a"])("请填写手机号");else this.$dialog.alert({message:"域名格式不正确: 请填写没有https://或http:// 格式的域名"});else Object(s["a"])("请填写域名");else Object(s["a"])("请填写公司/个人名称")},gotoOrder:function(){this.$router.replace(this.fun.getUrl("goodsorder",{},{tag:this.$route.params.tag,goodsId:this.$route.params.goodsId,optionsId:this.$route.params.optionsId,total:this.$route.params.total,id:this.$route.params.id,form_data_id:this.$route.params.form_data_id,store_id:this.$route.params.store_id,cart_ids:this.$route.params.cart_ids}))}},components:{cTitle:n["a"]}},l=r,d=(i("60d9"),i("f317"),i("2877")),c=Object(d["a"])(l,a,o,!1,null,"6e4dc61b",null);e["default"]=c.exports},"60d9":function(t,e,i){"use strict";i("5510")},"75fe":function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,".btn[data-v-6e4dc61b]{margin:40px auto 20px auto;color:#fff;width:18.75rem;height:2.25rem;line-height:2.25rem;background-image:-webkit-gradient(linear,left bottom,left top,from(#377aff),to(#679aff));background-image:-webkit-linear-gradient(bottom,#377aff,#679aff);background-image:linear-gradient(0deg,#377aff,#679aff);border-radius:20px}.blue-txt[data-v-6e4dc61b]{text-align:center;color:#377aff}.tips[data-v-6e4dc61b]{color:#797979;font-size:12px;text-align:left;padding:.5rem 1rem;background:#fff}.red[data-v-6e4dc61b]{color:#f14e4e}",""]),t.exports=e},adfd:function(t,e,i){var a=i("448c");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var o=i("499e").default;o("4e818a41",a,!0,{sourceMap:!1,shadowMode:!1})},f317:function(t,e,i){"use strict";i("adfd")}}]);