bztang-admin/addons/yun_shop/static/app/js/chunk-2b10a388.256356f3.js

1 line
15 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2b10a388"],{"419d":function(t,e,s){var a=s("f6d3");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var i=s("499e").default;i("3c9a80b8",a,!0,{sourceMap:!1,shadowMode:!1})},"6a09":function(t,e,s){"use strict";s("419d")},cb380:function(t,e,s){"use strict";s.r(e);var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{attrs:{id:"asset_sale"}},[s("c-title",{attrs:{hide:!1,text:t.lang.sell_name}}),s("div",{attrs:{id:"content"}},[s("div",{staticClass:"top"},[s("ul",{staticClass:"box"},[s("li",[s("h1",[t._v(t._s(t.digitization.digitization_name))])]),s("li",[t._v("可"+t._s(t.lang.sell_name)+"数量:"+t._s(t.digitization.member_usable))]),s("li",[t._v("当前"+t._s(t.lang.sell_name)+"价:"+t._s(t.$i18n.t("money"))+t._s(t.digitization.digitization_price)+"/单位")])])]),s("div",{staticClass:"sale_number"},[s("div",{staticClass:"number"},[s("span",[t._v(t._s(t.lang.sell_name)+"数量:")]),s("input",{directives:[{name:"model",rawName:"v-model",value:t.buyNum,expression:"buyNum"}],class:Number(t.buyNum)>Number(t.digitization.member_usable)?"more":"",attrs:{type:"tel",placeholder:"请输入"+t.lang.sell_name+"数量"},domProps:{value:t.buyNum},on:{keyup:function(e){t.buyNum=t.buyNum.replace(/[^\d]/g,"")},input:function(e){e.target.composing||(t.buyNum=e.target.value)}}}),s("p",{directives:[{name:"show",rawName:"v-show",value:Number(t.buyNum)>Number(t.digitization.member_usable),expression:"Number(buyNum)>Number(digitization.member_usable)"}],staticClass:"red"},[t._v("超出可"+t._s(t.lang.sell_name)+"数量")])]),s("div",{staticClass:"number"},[s("span",[t._v(t._s(t.lang.sell_name)+"单价:")]),s("input",{directives:[{name:"model",rawName:"v-model",value:t.saleNum,expression:"saleNum"}],attrs:{type:"number",placeholder:"请输入"+t.lang.sell_name+"单价"},domProps:{value:t.saleNum},on:{keyup:t.clearNoNum,input:function(e){e.target.composing||(t.saleNum=e.target.value)}}})])]),t.digitization.member_usable?s("div",{staticClass:"sum"},[s("ul",{staticClass:"box"},[s("li",[s("span",[t._v("预计总金额")]),s("span",[t._v(t._s(t.$i18n.t("money"))+t._s(t.total||0))])]),s("li",[s("span",[t._v("当前手续费")]),s("span",[t._v(t._s(t.$i18n.t("money"))+t._s(t.poundage||0))])]),s("li",[s("span",[t._v("预计"+t._s(t.income_name_text))]),s("span",[t._v(t._s(t.$i18n.t("money"))+t._s(t.income||0))])])])]):t._e(),s("div",{staticClass:"sale_btn"},[s("van-button",{attrs:{type:"primary"},nativeOn:{click:function(e){return t.sale.apply(null,arguments)}}},[t._v("确认"+t._s(t.lang.sell_name))])],1),s("transition",{attrs:{name:"scale"}},[t.show2?s("div",{staticClass:"m-dialog",on:{touchmove:function(t){t.preventDefault()}}},[t.show2?s("div",{staticClass:"popup_box_b"},[s("h1",[s("i",{staticClass:"iconfont icon-guanbi",on:{click:function(e){t.show2=!1}}}),t._v("提示")]),s("ul",{staticClass:"sale_info"},[s("li",[t._v("请先设置支付密码,再继续交易")])]),s("div",{staticClass:"set_password",on:{click:t.toSetPassword}},[t._v(" 设置密码 ")])]):t._e()]):t._e()]),s("transition",{attrs:{name:"scale"}},[t.popupSpecs?s("div",{staticClass:"m-dialog",on:{touchmove:function(t){t.preventDefault()}}},[s("div",{staticClass:"pay-psw-info"},[s("div",{staticClass:"popup_box"},[s("h1",[s("i",{staticClass:"iconfont icon-guanbi",on:{click:t.clearPassword}}),t._v("请输入支付密码")])]),s("div",{staticClass:"pay_content"},[s("div",{staticClass:"pay_content_view"},[s("div",{staticClass:"ipt_pay"},[s("div",{staticClass:"ipt_pay_p"},[t._v(t._s(t._f("pwd_filter")(t.pw1)))])]),s("div",{staticClass:"ipt_pay"},[s("div",{staticClass:"ipt_pay_p"},[t._v(t._s(t._f("pwd_filter")(t.pw2)))])]),s("div",{staticClass:"ipt_pay"},[s("div",{staticClass:"ipt_pay_p"},[t._v(t._s(t._f("pwd_filter")(t.pw3)))])]),s("div",{staticClass:"ipt_pay"},[s("div",{staticClass:"ipt_pay_p"},[t._v(t._s(t._f("pwd_filter")(t.pw4)))])]),s("div",{staticClass:"ipt_pay"},[s("div",{staticClass:"ipt_pay_p"},[t._v(t._s(t._f("pwd_filter")(t.pw5)))])]),s("div",{staticClass:"ipt_pay"},[s("div",{staticClass:"ipt_pay_p"},[t._v(t._s(t._f("pwd_filter")(t.pw6)))])])])]),s("footer",[s("ul",{staticClass:"pay_btn"},[s("li",{on:{click:function(e){return t.onPassword("1")}}},[t._v("1")]),s("li",{on:{click:function(e){return t.onPassword("2")}}},[t._v("2")]),s("li",{on:{click:function(e){return t.onPassword("3")}}},[t._v("3")]),s("li",{on:{click:function(e){return t.onPassword("4")}}},[t._v("4")]),s("li",{on:{click:function(e){return t.onPassword("5")}}},[t._v("5")]),s("li",{on:{click:function(e){return t.onPassword("6")}}},[t._v("6")]),s("li",{on:{click:function(e){return t.onPassword("7")}}},[t._v("7")]),s("li",{on:{click:function(e){return t.onPassword("8")}}},[t._v("8")]),s("li",{on:{click:function(e){return t.onPassword("9")}}},[t._v("9")]),s("li",{staticClass:"b9"}),s("li",{on:{click:function(e){return t.onPassword("0")}}},[t._v("0")]),s("li",{staticClass:"b9",on:{click:t.pwdDelete}},[t._v("删除")])])])])]):t._e()])],1)],1)},i=[],n=(s("e7e5"),s("d399")),o=(s("b680"),s("a9e3"),s("ac1f"),s("5319"),s("6968")),d={data:function(){return{show2:!1,asset_id:0,digitization:{},buyNum:"",saleNum:"",checkDeductionList:[],lang:{sell_name:""},popupSpecs:!1,pwds:[],pwd:"",pw1:"",pw2:"",pw3:"",pw4:"",pw5:"",pw6:"",income_name_text:""}},activated:function(){this.asset_id=this.$route.params.asset_id,this.getSaleing(),this.getLang(),this.isSetPassword(),this.customizeIncome()},deactivated:function(){this.initData()},computed:{total:function(){return(Number(this.buyNum)*Number(this.saleNum)).toFixed(2)},poundage:function(){return(this.total*Number(this.digitization.poundage_rate)).toFixed(2)},income:function(){return(this.total-this.poundage).toFixed(2)}},methods:{getLang:function(){var t=this;$http.get("plugin.asset.Frontend.Controllers.Lang.index",{},"加载中").then((function(e){1===e.result?t.lang=e.data:Object(n["a"])(e.msg)})).catch((function(t){}))},initPop:function(){this.pwds=[],this.pwd="",this.pw1="",this.pw2="",this.pw3="",this.pw4="",this.pw5="",this.pw6=""},onPassword:function(t){this.pwd.length<6&&(this.pwd=this.pwd+t,this.setPwdView()),6===this.pwd.length&&(this.popupSpecs=!1,this.getVerifyPassword(this.pwd),this.initPop())},clearPassword:function(){this.popupSpecs=!1,this.initPop()},setPwdView:function(){var t=this.pwd.length;if(!(t<=0))switch(t){case 1:this.pw1=this.pwd.substring(0,1);break;case 2:this.pw2=this.pwd.substring(1,2);break;case 3:this.pw3=this.pwd.substring(2,3);break;case 4:this.pw4=this.pwd.substring(3,4);break;case 5:this.pw5=this.pwd.substring(4,5);break;case 6:this.pw6=this.pwd.substring(5,6);break;default:break}},pwdDelete:function(){var t=this.pwd.length;if(!(t<=0))switch(t){case 1:this.pwd=this.pwd.substring(0,0),this.pw1="";break;case 2:this.pwd=this.pwd.substring(0,1),this.pw2="";break;case 3:this.pwd=this.pwd.substring(0,2),this.pw3="";break;case 4:this.pwd=this.pwd.substring(0,3),this.pw4="";break;case 5:this.pwd=this.pwd.substring(0,4),this.pw5="";break;case 6:this.pwd=this.pwd.substring(0,5),this.pw6="";break;default:break}},getVerifyPassword:function(t){var e=this,s=this;$http.get("plugin.asset.Frontend.Modules.Password.Controllers.validate.index",{password:t}," ").then((function(t){1===t.result?e.sureSale():s.$dialog.confirm({message:t.msg}).then((function(){2001==t.data.code||(2002==t.data.code?s.$router.push(s.fun.getUrl("SetPassword",{})):t.data.code)})).catch((function(){2001==t.data.code||2002==t.data.code||t.data.code}))}),(function(t){s.$dialog.alert({message:t.msg})}))},toSetPassword:function(){this.$router.push(this.fun.getUrl("SetPassword",{}))},sale:function(){this.buyNum?Number(this.buyNum)>Number(this.digitization.member_usable)||(this.saleNum?this.has_mobile?this.has_password?this.popupSpecs=!0:this.show2=!0:(Object(n["a"])("请先绑定手机"),this.$router.push(this.fun.getUrl("editmobile"))):Object(n["a"])("请输入"+this.lang.sell_name+"单价")):Object(n["a"])("请输入"+this.lang.sell_name+"数量")},sureSale:function(){var t=this,e={asset_id:this.asset_id,total:this.buyNum,price:this.saleNum};$http.post("plugin.asset.Frontend.Modules.Digitization.Controllers.sell.retract",e,"加载中").then((function(e){1===e.result?(t.getSaleing(),t.$dialog.alert({message:e.msg})):Object(n["a"])(e.msg)})).catch((function(t){}))},initData:function(){this.pwds=[],this.pwd="",this.popupSpecs=!1,this.show2=!1,this.digitization={},this.buyNum="",this.saleNum="",this.checkDeductionList=[]},getSaleing:function(){var t=this;$http.get("plugin.asset.Frontend.Modules.Digitization.Controllers.sell.index",{asset_id:this.asset_id},"加载中").then((function(e){1===e.result?t.digitization=e.data:(Object(n["a"])(e.msg),t.$router.go(-1))})).catch((function(t){}))},isSetPassword:function(){var t=this;$http.get("plugin.asset.Frontend.Modules.Password.Controllers.has.index",{},"加载中").then((function(e){1===e.result?(t.has_mobile=e.data.has_mobile,t.has_password=e.data.has_password):Object(n["a"])(e.msg)})).catch((function(t){}))},clearNoNum:function(){this.saleNum=this.saleNum.replace(/[^\d.]/g,""),this.saleNum=this.saleNum.replace(/\.{2,}/g,"."),this.saleNum=this.saleNum.replace(".","$#$").replace(/\./g,"").replace("$#$","."),this.saleNum=this.saleNum.replace(/^(\-)*(\d+)\.(\d\d).*$/,"$1$2.$3"),this.saleNum.indexOf(".")<0&&""!=this.saleNum&&(this.saleNum=parseFloat(this.saleNum))},customizeIncome:function(){var t=this.fun.initMailLanguage();this.income_name_text=t.income.income_name}},components:{cTitle:o["a"]}},l=d,r=l,c=(s("6a09"),s("2877")),p=Object(c["a"])(r,a,i,!1,null,"43d3c7d6",null);e["default"]=p.exports},f6d3:function(t,e,s){var a=s("24fb");e=a(!1),e.push([t.i,"#asset_sale #content .top[data-v-43d3c7d6]{background:#fff;padding:.625rem .875rem}#asset_sale #content .top .box li[data-v-43d3c7d6]{text-align:left}#asset_sale #content .top .box li h1[data-v-43d3c7d6]{font-size:18px;line-height:2.25rem}#asset_sale #content .top .box li[data-v-43d3c7d6]:nth-child(2),#asset_sale #content .top .box li[data-v-43d3c7d6]:nth-child(3){line-height:1.25rem;color:#8c8c8c}#asset_sale #content .sale_number[data-v-43d3c7d6]{background:#fff;margin-top:.625rem}#asset_sale #content .sale_number .number[data-v-43d3c7d6]{background:#fff;padding:.625rem .875rem}#asset_sale #content .sale_number .number .more[data-v-43d3c7d6]{color:red}#asset_sale #content .sale_number .number .red[data-v-43d3c7d6]{margin:.5rem 0 0 .5rem;text-align:left;font-size:12px;color:red}#asset_sale #content .sale_number .number span[data-v-43d3c7d6]{display:block;line-height:2.25rem;font-size:16px;text-align:left}#asset_sale #content .sale_number .number input[data-v-43d3c7d6]{line-height:2.5rem;padding:0 .625rem;background:#f5f5f5;border:none;width:100%;font-size:18px}#asset_sale #content .sum[data-v-43d3c7d6]{margin-top:.625rem;background:#fff;padding:.625rem .875rem}#asset_sale #content .sum .box li[data-v-43d3c7d6]{line-height:1.875rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;font-size:14px}#asset_sale #content .sum .box li span[data-v-43d3c7d6]:first-child{color:#8c8c8c}#asset_sale #content .discount[data-v-43d3c7d6]{margin-top:.625rem;background:#fff;padding:.625rem .875rem}#asset_sale #content .discount .list li[data-v-43d3c7d6]{line-height:2.5rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}#asset_sale #content .sale_btn[data-v-43d3c7d6]{margin:1.25rem auto}#asset_sale #content .sale_btn button[data-v-43d3c7d6]{padding:0;width:18.75rem;height:2.625rem;border-radius:.3125rem;background:#f7a145;color:#fff;font-size:16px;border:none}#asset_sale #content .sub_btn[data-v-43d3c7d6]{background:#fff;width:100%;height:3.125rem;line-height:3.125rem;position:fixed;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;bottom:0}#asset_sale #content .sub_btn p[data-v-43d3c7d6]{text-align:right;width:16.5625rem;border-top:.0625rem solid #ebebeb;padding-right:.625rem;font-size:16px}#asset_sale #content .sub_btn p span[data-v-43d3c7d6]{font-size:18px}#asset_sale #content .sub_btn button[data-v-43d3c7d6]{width:6.875rem;background:#f7a145;color:#fff;border:none;font-size:18px}#asset_sale #content .m-dialog[data-v-43d3c7d6]{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;z-index:100;background:rgba(0,0,0,.5)}#asset_sale #content .popup_box[data-v-43d3c7d6]{background:#fff;border-radius:.375rem;padding-bottom:1.25rem}#asset_sale #content .popup_box h1[data-v-43d3c7d6]{height:2.5rem;line-height:2.5rem;font-size:16px;border-bottom:.0625rem solid #ebebeb}#asset_sale #content .popup_box h1 i[data-v-43d3c7d6]{position:absolute;left:.875rem;line-height:2.5rem;font-size:1rem;color:#999}#asset_sale #content .pay-psw-info[data-v-43d3c7d6]{position:absolute;bottom:0;width:100vw;height:auto;background:#fff;max-height:100%;padding-top:.625rem}#asset_sale #content footer[data-v-43d3c7d6]{width:100vw;font-weight:600}#asset_sale #content .pay_btn[data-v-43d3c7d6]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;border-top:.0625rem solid #ddd;width:100vw;height:auto}#asset_sale #content .pay_btn li[data-v-43d3c7d6]{width:33.333333%;height:3rem;line-height:3rem;text-align:center;background:#fff;font-size:14px;border-right:.0625rem solid #ddd;border-bottom:.0625rem solid #ddd}#asset_sale #content .pay_btn li[data-v-43d3c7d6]:active{background:#c2c2c2}#asset_sale #content .b9[data-v-43d3c7d6]:active{background:#fff!important}#asset_sale #content .b9[data-v-43d3c7d6]{background:#c2c2c2!important}#asset_sale #content .pay_content[data-v-43d3c7d6]{width:100vw;height:3.125rem;margin-bottom:.625rem}#asset_sale #content .pay_content_title[data-v-43d3c7d6]{width:100vw;height:1.875rem;line-height:1.875rem;margin-bottom:.625rem;font-size:18px}#asset_sale #content .pay_content_view[data-v-43d3c7d6]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100vw;height:3.125rem;border-bottom:.0625rem solid #ddd;border-top:.0625rem solid #ddd;border-right:.0625rem solid #ddd}#asset_sale #content .ipt_pay_p[data-v-43d3c7d6]{line-height:3.125rem;height:3.125rem;font-size:20px}#asset_sale #content .ipt_pay[data-v-43d3c7d6]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;height:3.125rem;text-align:center;border-left:.0625rem solid #ddd}#asset_sale #content .popup_box_b[data-v-43d3c7d6]{position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:18.75rem;background:#fff;border-radius:.375rem}#asset_sale #content .popup_box_b h1[data-v-43d3c7d6]{height:2.5rem;line-height:2.5rem;font-size:16px;border-bottom:.0625rem solid #ebebeb}#asset_sale #content .popup_box_b h1 i[data-v-43d3c7d6]{position:absolute;left:.875rem;line-height:2.5rem;font-size:1rem;color:#999}#asset_sale #content .popup_box_b .sale_info[data-v-43d3c7d6]{text-align:left;padding:.625rem 1.25rem}#asset_sale #content .popup_box_b .sale_info li[data-v-43d3c7d6]{line-height:1.875rem;font-size:16px}#asset_sale #content .popup_box_b .set_password[data-v-43d3c7d6]{margin-top:2.25rem;border-top:.0625rem solid #ebebeb;height:2.5rem;line-height:2.5rem;color:#469de2;font-size:16px}",""]),t.exports=e}}]);