| 123 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-money-pay"],{"1da1":function(t,e,n){"use strict";function r(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(u){return void n(u)}c.done?e(s):Promise.resolve(s).then(r,o)}n("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function c(t){r(a,o,i,c,s,"next",t)}function s(t){r(a,o,i,c,s,"throw",t)}c(void 0)}))}},n("d3b7")},"37d1":function(t,e,n){"use strict";n("7a82");var r=n("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n("c7eb")),i=r(n("1da1")),a={data:function(){return{payType:1,payName:"weixin",orderInfo:{},money:0,now_money:0,orderKey:"",orderId:"",payLoding:!1,type:"",froms:"",pinkid:"",ispg:""}},onLoad:function(t){var e=this;if(console.log(t,"options"),this.ispg=uni.getSystemInfoSync().platform,console.log(this.ispg),1==t.type)this.type=1,this.orderId=t.ordid,this.money=t.money;else{this.orderKey=t.key;var n=this.$api.prePage();computedOrderkey({orderkey:this.orderKey,couponId:n.couponChecked.id,addressId:n.addressData.id,useIntegral:n.checkedPoints?1:0}).then((function(t){var n=t.data;e.money=n.result.pay_price}))}t.pinkid&&(this.pinkid=t.pinkid),balance({}).then((function(t){var n=t.data;e.now_money=n.now_money}))},methods:{changePayType:function(t){this.payType=t,1==this.payType&&(this.payName="weixin"),2==this.payType&&(this.payName="ali"),3==this.payType&&(this.payName="yue")},orderMoneyPay:function(){var t=this;orderPay({uni:t.orderId,from:t.froms?"weixin":"H5",paytype:t.payName}).then((function(e){if("yue"==t.payName&&"SUCCESS"==e.data.status&&(200==e.status?t.paySuccessTo():t.$api.msg(msg)),"weixin"==t.payName||"routine"==t.payName){var n=e.data.result.jsConfig;console.log(n,"支付打印");var r={timestamp:n.timestamp,nonceStr:n.nonceStr,package:n.package,signType:n.signType,paySign:n.paySign,success:function(e){t.paySuccessTo()},fail:function(){uni.navigateTo({url:"/pages/order/order?state=0"})}};"weixin"==t.payName&&t.weichatObj.chooseWXPay(r)}uni.hideLoading(),t.payLoding=!1})).catch((function(e){uni.hideLoading(),t.payLoding=!1,console.log(e)}))},paySuccessTo:function(){uni.hideLoading(),uni.redirectTo({url:"/pages/money/paySuccess?orderid="+this.orderId})},confirm:function(){var t=(0,i.default)((0,o.default)().mark((function t(){var e;return(0,o.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e=this,!("yue"==e.payName&&+e.now_money<e.money)){t.next=4;break}return uni.showModal({title:"提示",content:"账户余额不足!",showCancel:!1,success:function(t){},fail:function(){},complete:function(){}}),t.abrupt("return");case 4:uni.showLoading({title:"支付中",mask:!0}),e.payLoding=!0,e.froms=uni.getStorageSync("weichatBrowser")||"",1!=e.type?e.firstCreateOrder():e.orderMoneyPay();case 8:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),firstCreateOrder:function(){var t=this,e=t.$api.prePage(),n={real_name:e.addressData.real_name,phone:e.addressData.phone,couponId:e.couponChecked.id,addressId:e.addressData.id,useIntegral:e.checkedPoints?1:0,payType:t.payName,mark:e.desc,from:t.froms?"weixin":"H5",shipping_type:1};t.pinkid&&(n.pinkId=t.pinkid),createOrderkey(n,t.orderKey).then((function(e){var n=e.data,r=e.status,o=e.msg;if(console.log(r),"ORDER_EXIST"==n.status)return uni.showModal({title:"提示",content:o,showCancel:!1}),uni.hideLoading(),void(t.payLoding=!1);t.orderId=n.result.orderId,"yue"==t.payName?200==r?t.paySuccessTo():t.$api.msg(o):t.orderMoneyPay()})).catch((function(e){uni.hideLoading(),t.payLoding=!1,console.log(e,"123456789")}))}}};e.default=a},"521e":function(t,e,n){"use strict";var r=n("7650"),o=n.n(r);o.a},"6d0e":function(t,e,n){var r=n("24fb");e=r(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.app[data-v-699b6a88]{width:100%}.price-box[data-v-699b6a88]{background-color:#fff;height:%?265?%;display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:%?28?%;color:#909399}.price-box .price[data-v-699b6a88]{font-size:%?50?%;color:#303133;margin-top:%?12?%}.price-box .price[data-v-699b6a88]:before{content:"¥";font-size:%?40?%}.pay-type-list[data-v-699b6a88]{margin-top:%?20?%;background-color:#fff;padding-left:%?60?%}.pay-type-list .type-item[data-v-699b6a88]{height:%?120?%;padding:%?20?% 0;display:flex;justify-content:space-between;align-items:center;padding-right:%?60?%;font-size:%?30?%;position:relative}.pay-type-list .icon[data-v-699b6a88]{width:%?100?%;font-size:%?52?%}.pay-type-list .iconyue[data-v-699b6a88]{color:#fe8e2e}.pay-type-list .iconweixin[data-v-699b6a88]{color:#36cb59}.pay-type-list .iconzhifubao[data-v-699b6a88]{color:#01aaef}.pay-type-list .tit[data-v-699b6a88]{margin-bottom:%?4?%}.pay-type-list .con[data-v-699b6a88]{flex:1;display:flex;flex-direction:column}.mix-btn[data-v-699b6a88]{display:flex;align-items:center;justify-content:center;width:%?630?%;height:%?80?%;margin:%?80?% auto %?30?%;color:#fff;border-radius:%?10?%\r\n /* box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4); */}',""]),t.exports=e},"6ff4":function(t,e,n){"use strict";n.r(e);var r=n("37d1"),o=n.n(r);for(var i in r)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=o.a},"74ee":function(t,e,n){"use strict";n.r(e);var r=n("a7f5"),o=n("6ff4");for(var i in o)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(i);n("521e");var a=n("f0c5"),c=Object(a["a"])(o["default"],r["b"],r["c"],!1,null,"699b6a88",null,!1,r["a"],void 0);e["default"]=c.exports},7650:function(t,e,n){var r=n("6d0e");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("4f06").default;o("4b89bbbc",r,!0,{sourceMap:!1,shadowMode:!1})},a7f5:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){}));var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"app"},[n("v-uni-view",{staticClass:"price-box"},[n("v-uni-text",[t._v("支付金额")]),n("v-uni-text",{staticClass:"price"},[t._v(t._s(t.money))])],1),n("v-uni-view",{staticClass:"pay-type-list"},[n("v-uni-view",{staticClass:"type-item b-b",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.changePayType(1)}}},[n("v-uni-text",{staticClass:"icon iconfont iconweixin"}),n("v-uni-view",{staticClass:"con"},[n("v-uni-text",{staticClass:"tit"},[t._v("微信支付")]),n("v-uni-text",[t._v("推荐使用微信支付")])],1),n("v-uni-label",{staticClass:"radio"},[n("v-uni-radio",{attrs:{value:"",color:"#5dbc7c",checked:1==t.payType}})],1)],1)],1),n("v-uni-text",{staticClass:"mix-btn",class:{clickbg:t.payLoding},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),!t.payLoding&&t.confirm()}}},[t._v("确认支付")])],1)},o=[]},b636:function(t,e,n){var r=n("e065");r("asyncIterator")},c7eb:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
- e.default=function(){return t};var t={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function d(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(j){d=function(t,e,n){return t[e]=n}}function f(t,e,n,r){var o=e&&e.prototype instanceof h?e:h,a=Object.create(o.prototype),c=new S(r||[]);return i(a,"_invoke",{value:_(t,n,c)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(j){return{type:"throw",arg:j}}}t.wrap=f;var p={};function h(){}function y(){}function v(){}var g={};d(g,c,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(T([])));b&&b!==n&&o.call(b,c)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function x(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){var n;i(this,"_invoke",{value:function(i,a){function c(){return new e((function(n,c){(function n(i,a,c,s){var u=l(t[i],t,a);if("throw"!==u.type){var d=u.arg,f=d.value;return f&&"object"==(0,r.default)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,c,s)}),(function(t){n("throw",t,c,s)})):e.resolve(f).then((function(t){d.value=t,c(d)}),(function(t){return n("throw",t,c,s)}))}s(u.arg)})(i,a,n,c)}))}return n=n?n.then(c,c):c()}})}function _(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return P()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=k(a,n);if(c){if(c===p)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=l(t,e,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===p)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function k(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator["return"]&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var o=l(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function T(t){if(t){var e=t[c];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(o.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:P}}function P(){return{value:void 0,done:!0}}return y.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:y,configurable:!0}),y.displayName=d(v,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,d(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},x(L.prototype),d(L.prototype,s,(function(){return this})),t.AsyncIterator=L,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new L(f(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(w),d(w,u,"Generator"),d(w,c,(function(){return this})),d(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=T,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),s=o.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},t},n("7a82"),n("a4d3"),n("e01a"),n("d3b7"),n("d28b"),n("3ca3"),n("ddb0"),n("b636"),n("944a"),n("0c47"),n("23dc"),n("3410"),n("d9e2"),n("d401"),n("14d9"),n("159b"),n("131a"),n("26e9"),n("fb6a");var r=function(t){return t&&t.__esModule?t:{default:t}}(n("53ca"))}}]);
|