1 line
4.7 KiB
JavaScript
1 line
4.7 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-71ecadd6"],{"2cee":function(t,e,i){"use strict";i("9ba2")},"9ba2":function(t,e,i){var a=i("b491");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var s=i("499e").default;s("65e410a4",a,!0,{sourceMap:!1,shadowMode:!1})},b491:function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,"#vipAddindex[data-v-0681ae62]{background:#fff;min-height:100vh}#vipAddindex .posbtn[data-v-0681ae62]{position:fixed;bottom:1.31rem;left:0;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}#vipAddindex .posbtn .btn[data-v-0681ae62]{width:19.13rem;height:2.5rem;background-color:#f15353;border-radius:1.25rem;font-size:.94rem;color:#fff;text-align:center;line-height:2.5rem}#vipAddindex .fromBox[data-v-0681ae62]{padding:0 .94rem}#vipAddindex .fromBox .first[data-v-0681ae62]{padding:.78rem 0 .45rem 0}#vipAddindex .fromBox .nofirst[data-v-0681ae62]{padding:0 0 .45rem 0}#vipAddindex .fromBox .cellP[data-v-0681ae62]{text-align:left;font-size:.75rem;color:#666;margin-bottom:1rem}#vipAddindex .fromBox .cellError[data-v-0681ae62]{text-align:left;font-size:.75rem;color:#f15353;margin-bottom:1rem}#vipAddindex .fromBox .cell[data-v-0681ae62]{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}#vipAddindex .fromBox .cell .cellRight[data-v-0681ae62]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}#vipAddindex .fromBox .cell .cellRight .van-cell[data-v-0681ae62]{padding:0}#vipAddindex .fromBox .cell .cellLeft[data-v-0681ae62]{font-size:.94rem;color:#333}",""]),t.exports=e},bc16: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:"vipAddindex"}},[i("c-title",{attrs:{hide:!1,text:t.coupon?"提货券联名":"添加会员"}}),i("div",{staticClass:"fromBox"},[i("div",{staticClass:"cell first"},[i("div",{staticClass:"cellLeft"},[t._v("选择会员")]),i("div",{staticClass:"cellRight"},[i("van-field",{attrs:{placeholder:"请输入会员ID","input-align":"right"},on:{blur:t.tapId},model:{value:t.userId,callback:function(e){t.userId=e},expression:"userId"}})],1)]),t.usetInfo?i("div",{staticClass:"cellP"},[t._v("会员:"+t._s(t.usetInfo.nickname))]):i("div",{staticClass:"cellError"},[t._v("未找到会员")]),i("div",{staticClass:"cell nofirst"},[i("div",{staticClass:"cellLeft"},[t._v("联名提货券")]),i("div",{staticClass:"cellRight"},[i("van-field",{attrs:{placeholder:"请输入数量","input-align":"right"},model:{value:t.total,callback:function(e){t.total=e},expression:"total"}})],1)]),i("div",{staticClass:"cellP"},[t._v("可使用:¥"+t._s(t.credit))])]),i("div",{staticClass:"posbtn set-pc-style"},[i("div",{staticClass:"btn",on:{click:t.submitTap}},[t._v("确认")])])],1)},s=[],n=(i("e7e5"),i("d399")),o={data:function(){return{userId:"",total:"",coupon:!1,vid:"",usetInfo:null,cvid:"",credit:""}},activated:function(){this.$route.params.coupon?(this.coupon=this.$route.params.coupon,this.fun.setWXTitle("提货券联名")):this.fun.setWXTitle("添加会员"),this.$route.params.cvid&&(this.cvid=this.$route.params.cvid),this.$route.params.vid&&(this.userId=this.$route.params.vid,this.getVipUser()),this.$route.params.debtId&&(this.debtId=this.$route.params.debtId),this.$route.params.credit&&(this.credit=this.$route.params.credit)},methods:{tapId:function(){this.getVipUser()},submitTap:function(){this.coupon?this.makeOver():this.vipApply()},vipApply:function(){var t=this;$http.post("plugin.debt-shop.frontend.debt-member.vipBind",{vip_uid:this.userId,debtor_id:this.debtId,amount:this.total},"加载中").then((function(e){1===e.result?(Object(n["a"])(e.msg),setTimeout((function(){t.$router.go(-1)}),1e3)):Object(n["a"])(e.msg)})).catch((function(t){}))},getVipUser:function(){var t=this;this.userId&&$http.post("member.member.memberInfo",{uid:this.userId},"加载中").then((function(e){1===e.result?t.usetInfo=e.data:Object(n["a"])(e.msg)})).catch((function(t){}))},makeOver:function(){var t=this;$http.post("plugin.debt-shop.frontend.debt-member.exchangeCommonCredit",{connection_id:this.cvid,amount:this.total},"加载中").then((function(e){1===e.result?(Object(n["a"])(e.msg),setTimeout((function(){t.$router.go(-1)}),1e3)):Object(n["a"])(e.msg)})).catch((function(t){}))}}},d=o,r=(i("2cee"),i("2877")),l=Object(r["a"])(d,a,s,!1,null,"0681ae62",null);e["default"]=l.exports}}]); |