| 1 |
- (my["webpackJsonp"]=my["webpackJsonp"]||[]).push([["pages/me/applyFaHuo"],{"108c":function(t,e,a){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a={data:function(){return{id:"",flag:!0,totalPrice:"",applyList:[],applyAddress:{},payIndex:1,payList:[{name:"微信支付",type:"0",account:"",image:"/static/image/me/weixin@2x.png"},{name:"支付宝支付",type:"1",account:"",image:"/static/image/me/zhifubao@2x.png"}]}},methods:{applySubmit:function(){var e=this;if(!this.applyAddress.address_id)return t.showToast({title:"请选择地址",icon:"none"});var a=[];this.applyList.forEach((function(t){a.push(t.record_id)})),this.flag&&(this.flag=!1,this.$api.applyDelivery({record_ids:a.join(","),address_id:this.applyAddress.address_id}).then((function(a){1===a.code?a.data.delivery_fee>0?2==e.payIndex?e.$http.post(a.data.wechat).then((function(e){1===e.code?WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:e.data.appId,timeStamp:e.data.timeStamp,nonceStr:e.data.nonceStr,package:e.data.package,signType:e.data.signType,paySign:e.data.paySign},(function(e){"get_brand_wcpay_request:ok"==e.err_msg&&(t.showToast({title:"支付成功"}),setTimeout((function(){t.redirectTo({url:"/pages/me/order?type=0"})}),800))})):e.code})):location.href=a.data[0==e.payIndex?"wechat":"alipay"]+"?token="+t.getStorageSync("token"):t.redirectTo({url:"/pages/me/order?type=0"}):e.flag=!0})))},selectAddress:function(){t.navigateTo({url:"/pages/me/address?type=1"})},getApply:function(){var t=this;this.$api.checkDeliveryInfo({record_ids:this.id}).then((function(e){1===e.code&&(t.applyList=e.data.order_info,t.totalPrice=e.data.total_delivery_fee)}))},getAddress:function(){var t=this;this.$api.myAddress({is_default:1}).then((function(e){1===e.code&&0!=e.data.length&&(t.applyAddress=e.data[0])}))},changePay:function(t){this.payIndex=t}},onShow:function(){t.getStorageSync("applyAddress")?this.applyAddress=JSON.parse(t.getStorageSync("applyAddress")):this.getAddress()},onLoad:function(t){var e=t.id;this.id=e,this.getApply()}};e.default=a}).call(this,a("c11b")["default"])},1117:function(t,e,a){"use strict";var n=a("8225"),i=a.n(n);i.a},"52cc":function(t,e,a){"use strict";var n;a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return d})),a.d(e,"a",(function(){return n}));var i=function(){var t=this,e=t.$createElement;t._self._c},d=[]},8225:function(t,e,a){},"8d6a":function(t,e,a){"use strict";(function(t){a("6f14");n(a("66fd"));var e=n(a("9dd8"));function n(t){return t&&t.__esModule?t:{default:t}}my.__webpack_require_UNI_MP_PLUGIN__=a,t(e.default)}).call(this,a("c11b")["createPage"])},"9dd8":function(t,e,a){"use strict";a.r(e);var n=a("52cc"),i=a("f051");for(var d in i)"default"!==d&&function(t){a.d(e,t,(function(){return i[t]}))}(d);a("1117");var r,c=a("f0c5"),s=Object(c["a"])(i["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],r);e["default"]=s.exports},f051:function(t,e,a){"use strict";a.r(e);var n=a("108c"),i=a.n(n);for(var d in n)"default"!==d&&function(t){a.d(e,t,(function(){return n[t]}))}(d);e["default"]=i.a}},[["8d6a","common/runtime","common/vendor"]]]);
|