default-pay-box.js 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600
  1. exports.ids = [9];
  2. exports.modules = {
  3. /***/ 139:
  4. /***/ (function(module, exports, __webpack_require__) {
  5. // style-loader: Adds some css to the DOM by adding a <style> tag
  6. // load the styles
  7. var content = __webpack_require__(151);
  8. if(content.__esModule) content = content.default;
  9. if(typeof content === 'string') content = [[module.i, content, '']];
  10. if(content.locals) module.exports = content.locals;
  11. // add CSS to SSR context
  12. var add = __webpack_require__(4).default
  13. module.exports.__inject__ = function (context) {
  14. add("7b341170", content, true, context)
  15. };
  16. /***/ }),
  17. /***/ 144:
  18. /***/ (function(module, exports, __webpack_require__) {
  19. module.exports = __webpack_require__.p + "img/coin.4b7e14b.png";
  20. /***/ }),
  21. /***/ 145:
  22. /***/ (function(module, exports, __webpack_require__) {
  23. module.exports = __webpack_require__.p + "img/wechat_pay.ae9180d.png";
  24. /***/ }),
  25. /***/ 146:
  26. /***/ (function(module, exports, __webpack_require__) {
  27. module.exports = __webpack_require__.p + "img/ali_pay.1201e28.png";
  28. /***/ }),
  29. /***/ 150:
  30. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  31. "use strict";
  32. __webpack_require__.r(__webpack_exports__);
  33. /* harmony import */ var _node_modules_vue_style_loader_4_1_3_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_4_3_0_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_15_9_8_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_3_0_0_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_sass_loader_10_2_1_sass_loader_dist_cjs_js_ref_7_oneOf_1_3_node_modules_sass_resources_loader_2_2_4_sass_resources_loader_lib_loader_js_ref_7_oneOf_1_4_node_modules_nuxt_components_2_2_1_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_15_9_8_vue_loader_lib_index_js_vue_loader_options_payBox_vue_vue_type_style_index_0_id_6f09a324_lang_scss_rel_stylesheet_2Fscss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(139);
  34. /* harmony import */ var _node_modules_vue_style_loader_4_1_3_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_4_3_0_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_15_9_8_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_3_0_0_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_sass_loader_10_2_1_sass_loader_dist_cjs_js_ref_7_oneOf_1_3_node_modules_sass_resources_loader_2_2_4_sass_resources_loader_lib_loader_js_ref_7_oneOf_1_4_node_modules_nuxt_components_2_2_1_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_15_9_8_vue_loader_lib_index_js_vue_loader_options_payBox_vue_vue_type_style_index_0_id_6f09a324_lang_scss_rel_stylesheet_2Fscss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_4_1_3_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_4_3_0_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_15_9_8_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_3_0_0_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_sass_loader_10_2_1_sass_loader_dist_cjs_js_ref_7_oneOf_1_3_node_modules_sass_resources_loader_2_2_4_sass_resources_loader_lib_loader_js_ref_7_oneOf_1_4_node_modules_nuxt_components_2_2_1_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_15_9_8_vue_loader_lib_index_js_vue_loader_options_payBox_vue_vue_type_style_index_0_id_6f09a324_lang_scss_rel_stylesheet_2Fscss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
  35. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_vue_style_loader_4_1_3_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_4_3_0_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_15_9_8_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_3_0_0_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_sass_loader_10_2_1_sass_loader_dist_cjs_js_ref_7_oneOf_1_3_node_modules_sass_resources_loader_2_2_4_sass_resources_loader_lib_loader_js_ref_7_oneOf_1_4_node_modules_nuxt_components_2_2_1_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_15_9_8_vue_loader_lib_index_js_vue_loader_options_payBox_vue_vue_type_style_index_0_id_6f09a324_lang_scss_rel_stylesheet_2Fscss_scoped_true___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_vue_style_loader_4_1_3_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_4_3_0_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_15_9_8_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_3_0_0_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_sass_loader_10_2_1_sass_loader_dist_cjs_js_ref_7_oneOf_1_3_node_modules_sass_resources_loader_2_2_4_sass_resources_loader_lib_loader_js_ref_7_oneOf_1_4_node_modules_nuxt_components_2_2_1_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_15_9_8_vue_loader_lib_index_js_vue_loader_options_payBox_vue_vue_type_style_index_0_id_6f09a324_lang_scss_rel_stylesheet_2Fscss_scoped_true___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  36. /***/ }),
  37. /***/ 151:
  38. /***/ (function(module, exports, __webpack_require__) {
  39. // Imports
  40. var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(3);
  41. var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);
  42. // Module
  43. ___CSS_LOADER_EXPORT___.push([module.i, ".col_red[data-v-6f09a324]{color:#f11111}.col_green[data-v-6f09a324]{color:#44be95}.col_white[data-v-6f09a324]{color:#fff}.flex-col[data-v-6f09a324]{flex-direction:column}.flex-j-c[data-v-6f09a324]{justify-content:center}.flex-j-sb[data-v-6f09a324]{justify-content:space-between}.flex-j-ar[data-v-6f09a324]{justify-content:space-around}.flex-a-c[data-v-6f09a324]{align-items:center}.flex-a-e[data-v-6f09a324]{align-items:flex-end}.w[data-v-6f09a324]{width:1200px}.m-auto[data-v-6f09a324]{margin:0 auto}.height-one[data-v-6f09a324]{height:100%}.flex[data-v-6f09a324]{display:flex}.text-overflow[data-v-6f09a324]{-webkit-line-clamp:4}.text-overflow[data-v-6f09a324],.text-overflow-2[data-v-6f09a324]{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical}.text-overflow-2[data-v-6f09a324]{-webkit-line-clamp:2}.text-overflow-3[data-v-6f09a324]{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}.overflow-hide[data-v-6f09a324],.text-overflow-3[data-v-6f09a324]{overflow:hidden;text-overflow:ellipsis}.overflow-hide[data-v-6f09a324]{white-space:nowrap}.hiddenScroll[data-v-6f09a324]{scrollbar-width:none;-ms-overflow-style:none;overflow-x:hidden;overflow-y:scroll}.hiddenScroll[data-v-6f09a324]::-webkit-scrollbar{display:none}.finger-point[data-v-6f09a324]{cursor:pointer}.cursor-default[data-v-6f09a324]{cursor:default}.el-icon-circle-close[data-v-6f09a324]{color:#fff}.dialog_pay[data-v-6f09a324] .el-input{width:336px;height:42px}.dialog_pay[data-v-6f09a324] .el-dialog__body{padding:40px 0 30px}.dialog_pay[data-v-6f09a324] .el-dialog__header{border-bottom:1px solid #f2f2f2}.dialog_pay[data-v-6f09a324] .el-form-item__label{text-align:left!important;font-size:16px}.pay_way[data-v-6f09a324]{flex-wrap:wrap}.pay_way .way[data-v-6f09a324]{cursor:pointer;min-width:120px;min-height:60px;border-radius:5px;border:1px solid #cacaca;margin:10px;padding:0 10px}.pay_way .way .radio_button[data-v-6f09a324]{margin-right:10px;border-radius:50%;width:10px;height:10px;background-color:#e1e1e1}.border_spe[data-v-6f09a324]{border:1px solid var(--color)!important}.radio[data-v-6f09a324]{background-color:var(--color)!important}.btn_wrap[data-v-6f09a324]{margin-top:50px;padding-left:270px}.btn_wrap .el-button[data-v-6f09a324]{width:134px;height:43px;border-radius:4px;font-size:16px}.dialog_qr[data-v-6f09a324] .el-dialog__header{padding:0;height:56px;background-color:#f5f8fa;display:flex;align-items:center;justify-content:center}.dialog_qr[data-v-6f09a324] .el-dialog__body{padding:0}.qr_content[data-v-6f09a324]{padding-top:33px;padding-bottom:27px;text-align:center}.qr_content .qr_code[data-v-6f09a324]{width:220px;height:220px;margin-bottom:20px}.qr_content .qr_code #qrccode-canvas2[data-v-6f09a324]{width:220px!important;height:220px!important}.pay-status-box[data-v-6f09a324]{text-align:center;padding-bottom:20px}.pay-status-box i[data-v-6f09a324]{font-size:80px;color:var(--color);margin:10px auto}.pay-status-box .el-icon-error[data-v-6f09a324]{color:#f11111}.pay-status-box .pay-tips[data-v-6f09a324]{font-size:16px;font-weight:700;margin:10px auto 20px}", ""]);
  44. // Exports
  45. module.exports = ___CSS_LOADER_EXPORT___;
  46. /***/ }),
  47. /***/ 155:
  48. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  49. "use strict";
  50. // ESM COMPAT FLAG
  51. __webpack_require__.r(__webpack_exports__);
  52. // CONCATENATED MODULE: ./node_modules/_vue-loader@15.9.8@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_@nuxt_components@2.2.1@@nuxt/components/dist/loader.js??ref--0-0!./node_modules/_vue-loader@15.9.8@vue-loader/lib??vue-loader-options!./components/default/payBox.vue?vue&type=template&id=6f09a324&scoped=true&
  53. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('el-dialog',{staticClass:"dialog_pay",attrs:{"title":"选择支付方式","visible":_vm.dialogPay,"width":"878px"},on:{"update:visible":function($event){_vm.dialogPay=$event},"closed":_vm.goBack}},[_c('div',[_c('el-form',{staticStyle:{"padding-left":"140px"},attrs:{"label-width":"106px"}},[_c('el-form-item',{attrs:{"label":"支付金额"}},[_c('span',{staticClass:"col_red"},[_vm._v("¥ "+_vm._s(_vm.money))])]),_vm._v(" "),(_vm.from === 'course')?_c('el-form-item',{attrs:{"label":"打赏课程"}},[_c('span',{staticClass:"col_red"},[_vm._v(_vm._s(_vm.pay_sn))])]):_vm._e(),_vm._v(" "),(_vm.from === 'micro')?_c('el-form-item',{attrs:{"label":"赞赏用户"}},[_c('span',{staticClass:"col_red"},[_vm._v(_vm._s(_vm.pay_sn))])]):_vm._e(),_vm._v(" "),(_vm.from === 'notice')?_c('el-form-item',{attrs:{"label":"付费文章"}},[_c('span',{staticClass:"col_red"},[_vm._v(_vm._s(_vm.pay_sn))])]):_vm._e(),_vm._v(" "),(_vm.from === 'pay')?_c('el-form-item',{attrs:{"label":"支付流水号"}},[_c('span',[_vm._v(_vm._s(_vm.pay_sn))])]):_vm._e(),_vm._v(" "),_c('el-form-item',{staticClass:"spe",staticStyle:{"min-height":"60px"},attrs:{"label":"支付方式"}},[_c('div',{staticClass:"flex pay_way",staticStyle:{"flex-wrap":"wrap"}},_vm._l((_vm.pay_way),function(item,index){return _c('div',{key:index,staticClass:"flex flex-a-c flex-j-c way",class:[item.value==_vm.pay_select?'border_spe':''],staticStyle:{"margin-bottom":"10px"},on:{"click":function($event){return _vm.changeIndex(item)}}},[_c('div',{staticClass:"radio_button",class:[item.value==_vm.pay_select?'radio':'']}),_vm._v(" "),(item.value==3)?_c('img',{staticStyle:{"margin-right":"5px","width":"28px","height":"28px"},attrs:{"src":__webpack_require__(144)}}):_vm._e(),_vm._v(" "),(item.value==28||item.value==57 || item.value==50)?_c('img',{staticStyle:{"margin-right":"5px"},attrs:{"src":__webpack_require__(145)}}):_vm._e(),_vm._v(" "),(item.value==2||item.value==29)?_c('img',{staticStyle:{"margin-right":"5px"},attrs:{"src":__webpack_require__(146)}}):_vm._e(),_vm._v("\n "+_vm._s(item.name)+"\n ")])}),0)])],1),_vm._v(" "),_c('div',{staticClass:"btn_wrap flex"},[_c('el-button',{staticClass:"flex flex-a-c flex-j-c",on:{"click":function($event){_vm.dialogPay=false}}},[_vm._v("关闭")]),_vm._v(" "),(_vm.from === 'notice')?_c('el-button',{staticClass:"flex flex-a-c flex-j-c",staticStyle:{"margin-left":"56px"},attrs:{"type":"primary"},on:{"click":_vm.payNoticeMoney}},[_vm._v("立即支付\n ")]):_vm._e(),_vm._v(" "),(!_vm.from || _vm.from === 'pay')?_c('el-button',{staticClass:"flex flex-a-c flex-j-c",staticStyle:{"margin-left":"56px"},attrs:{"type":"primary"},on:{"click":_vm.payMoney}},[_vm._v("立即支付\n ")]):_vm._e(),_vm._v(" "),(_vm.from === 'course')?_c('el-button',{staticClass:"flex flex-a-c flex-j-c",staticStyle:{"margin-left":"56px"},attrs:{"type":"primary"},on:{"click":_vm.payPost}},[_vm._v("立即打赏\n ")]):_vm._e(),_vm._v(" "),(_vm.from === 'micro')?_c('el-button',{staticClass:"flex flex-a-c flex-j-c",staticStyle:{"margin-left":"56px"},attrs:{"type":"primary"},on:{"click":_vm.payMicroPost}},[_vm._v("立即赞赏\n ")]):_vm._e()],1)],1)]),_vm._ssrNode(" "),_c('el-dialog',{staticClass:"dialog_qr",attrs:{"title":"提示","visible":_vm.show_qrcode,"width":"450px","close-on-click-modal":false},on:{"update:visible":function($event){_vm.show_qrcode=$event},"closed":_vm.goBack}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(!_vm.show_pay_status),expression:"!show_pay_status"}],staticClass:"qr_content"},[_c('div',{staticStyle:{"margin-bottom":"25px"}},[_vm._v("请在2小时内完成支付")]),_vm._v(" "),_c('div',{staticClass:"qr_code m-auto"},[_c('canvas',{attrs:{"id":"qrccode-canvas2"}})]),_vm._v(" "),_c('div',{staticStyle:{"margin-bottom":"34px"}},[_vm._v("微信扫码支付")])]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.show_pay_status && _vm.pay_success),expression:"show_pay_status && pay_success"}],staticClass:"pay-status-box"},[_c('div',[_c('i',{staticClass:"el-icon-success"})]),_vm._v(" "),_c('p',{staticClass:"pay-tips"},[_vm._v("支付成功")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","plain":""},on:{"click":function($event){return _vm.toUrl('order')}}},[_vm._v("查看订单列表")])],1),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.show_pay_status && !_vm.pay_success),expression:"show_pay_status && !pay_success"}],staticClass:"pay-status-box"},[_c('div',[_c('i',{staticClass:"el-icon-error"})]),_vm._v(" "),_c('p',{staticClass:"pay-tips"},[_vm._v("支付失败")]),_vm._v(" "),_c('el-button',{attrs:{"type":"danger","plain":""},on:{"click":function($event){return _vm.toUrl('order')}}},[_vm._v("查看订单列表")])],1)]),_vm._ssrNode(" "),_c('el-dialog',{staticClass:"dialog_pay",attrs:{"title":"请输入余额支付密码","visible":_vm.popupSpecs,"width":"878px"},on:{"update:visible":function($event){_vm.popupSpecs=$event},"closed":_vm.goBack}},[_c('el-form',[_c('el-form-item',{staticClass:"flex flex-j-c",attrs:{"label":"余额支付密码"}},[_c('el-input',{attrs:{"type":"password","placeholder":"请输入密码"},model:{value:(_vm.balancePwd),callback:function ($$v) {_vm.balancePwd=$$v},expression:"balancePwd"}})],1)],1),_vm._v(" "),_c('div',{staticClass:"flex flex-j-c",staticStyle:{"margin-top":"50px"}},[_c('el-button',{staticClass:"flex flex-a-c flex-j-c",on:{"click":function($event){_vm.popupSpecs=false}}},[_vm._v("关闭")]),_vm._v(" "),_c('el-button',{staticClass:"flex flex-a-c flex-j-c",staticStyle:{"margin-left":"56px"},attrs:{"type":"primary"},on:{"click":_vm.getVerifyPassword}},[_vm._v("\n 立即支付\n ")])],1)],1)],2)}
  54. var staticRenderFns = []
  55. // CONCATENATED MODULE: ./components/default/payBox.vue?vue&type=template&id=6f09a324&scoped=true&
  56. // EXTERNAL MODULE: external "qrcode"
  57. var external_qrcode_ = __webpack_require__(35);
  58. var external_qrcode_default = /*#__PURE__*/__webpack_require__.n(external_qrcode_);
  59. // CONCATENATED MODULE: ./node_modules/_babel-loader@8.2.3@babel-loader/lib??ref--2-0!./node_modules/_@nuxt_components@2.2.1@@nuxt/components/dist/loader.js??ref--0-0!./node_modules/_vue-loader@15.9.8@vue-loader/lib??vue-loader-options!./components/default/payBox.vue?vue&type=script&lang=js&
  60. //
  61. //
  62. //
  63. //
  64. //
  65. //
  66. //
  67. //
  68. //
  69. //
  70. //
  71. //
  72. //
  73. //
  74. //
  75. //
  76. //
  77. //
  78. //
  79. //
  80. //
  81. //
  82. //
  83. //
  84. //
  85. //
  86. //
  87. //
  88. //
  89. //
  90. //
  91. //
  92. //
  93. //
  94. //
  95. //
  96. //
  97. //
  98. //
  99. //
  100. //
  101. //
  102. //
  103. //
  104. //
  105. //
  106. //
  107. //
  108. //
  109. //
  110. //
  111. //
  112. //
  113. //
  114. //
  115. //
  116. //
  117. //
  118. //
  119. //
  120. //
  121. //
  122. //
  123. //
  124. //
  125. //
  126. //
  127. //
  128. //
  129. //
  130. //
  131. //
  132. //
  133. //
  134. //
  135. //
  136. //
  137. //
  138. //
  139. //
  140. //
  141. //
  142. //
  143. //
  144. //
  145. //
  146. //
  147. //
  148. //
  149. //
  150. var canvas = "";
  151. /* harmony default export */ var payBoxvue_type_script_lang_js_ = ({
  152. name: "payBox",
  153. props: {
  154. orderPayId: Number,
  155. money: String,
  156. pay_sn: String,
  157. order_pay_id: Number,
  158. pay_way: Array,
  159. from: String,
  160. noJump: {
  161. type: Boolean,
  162. default: false
  163. },
  164. rewardTypes: Number,
  165. trick_id: Number
  166. },
  167. data() {
  168. return {
  169. interval: null,
  170. balancePwd: "",
  171. popupSpecs: false,
  172. show_qrcode: false,
  173. pay_select: 1,
  174. pay_name: "",
  175. dialogPay: false,
  176. show_pay_status: false,
  177. pay_success: false
  178. };
  179. },
  180. methods: {
  181. showPay() {
  182. if (this.interval) {
  183. clearInterval(this.interval);
  184. }
  185. this.dialogPay = true;
  186. },
  187. toUrl(url, params) {
  188. if (!this.from) {
  189. this.goBack();
  190. return;
  191. }
  192. this.$router.push(this.fun.getUrl(url, params));
  193. },
  194. createQrc(_url) {
  195. // this.init()
  196. this.$nextTick(function () {
  197. // DOM操作
  198. canvas = document.getElementById("qrccode-canvas2");
  199. external_qrcode_default.a.toCanvas(canvas, _url, error => {
  200. if (error) {
  201. console.log(error);
  202. }
  203. });
  204. });
  205. },
  206. goBack() {
  207. this.show_qrcode = false;
  208. this.popupSpecs = false;
  209. this.balancePwd = "";
  210. if (this.interval) {
  211. clearInterval(this.interval);
  212. }
  213. if (this.from === "pay" && !this.noJump) {
  214. this.$router.push(this.fun.getUrl("order"));
  215. } else {
  216. this.dialogPay = false;
  217. this.$emit("paySuccess", true);
  218. } // this.$router.go(-1)
  219. },
  220. // 微社区打赏支付
  221. payMicroPost() {
  222. if (this.pay_select != 3 && this.pay_select != 2 && this.pay_select != 6) {
  223. this.$message.error("PC端目前不支持该付款方式,请在移动端支付");
  224. return;
  225. }
  226. let url = "plugin.micro-communities.api.reward-log.index";
  227. let json = {
  228. pay_method: this.pay_select,
  229. amount: this.money,
  230. pay_name: this.pay_name
  231. };
  232. if (this.rewardTypes == 0) {
  233. // 帖子打赏
  234. json.trick_id = this.trick_id;
  235. } else {
  236. // 评论打赏
  237. url = "plugin.micro-communities.api.reward-log.commentPay";
  238. json.comment_id = this.trick_id;
  239. }
  240. this.fun.$get(url, json, "..").then(response => {
  241. if (response.result == 1) {
  242. if (this.pay_select == 3) {
  243. if (this.need_password) {
  244. this.popupSpecs = true;
  245. this.balancePwd = "";
  246. } else {
  247. this.dialogPay = false;
  248. this.$message.success(response.msg);
  249. this.$emit("paySuccess", true);
  250. }
  251. } else if (this.pay_select == 2) {
  252. // 支付宝
  253. window.location.href = response.data; // window.open(response.data, "_blank");
  254. } else if (this.pay_select == 6) {
  255. // 微信
  256. window.location.href = response.data;
  257. } else {
  258. this.$message.error("PC端目前不支持该付款方式,请在移动端支付");
  259. }
  260. } else {
  261. this.$message.error(response.msg);
  262. }
  263. });
  264. },
  265. // 课程打赏支付
  266. payPost() {
  267. if (this.pay_select != 3 && this.pay_select != 2 && this.pay_select != 6) {
  268. this.$message.error("PC端目前不支持该付款方式,请在移动端支付");
  269. return;
  270. }
  271. let json = {
  272. pay_method: this.pay_select,
  273. amount: this.money,
  274. pay_name: this.pay_name,
  275. goods_id: this.order_pay_id // 商品id
  276. };
  277. this.fun.$get("plugin.video-demand.api.lecturer-reward.run-reward-pay", json, "..").then(response => {
  278. if (response.result == 1) {
  279. if (this.pay_select == 3) {
  280. if (this.need_password) {
  281. this.popupSpecs = true;
  282. this.balancePwd = "";
  283. } else {
  284. this.dialogPay = false;
  285. this.$message.success(response.msg);
  286. this.$emit("paySuccess", true);
  287. }
  288. } else if (this.pay_select == 2) {
  289. // 支付宝
  290. window.location.href = response.data; // window.open(response.data, "_blank");
  291. } else if (this.pay_select == 6) {
  292. // 微信
  293. window.location.href = response.data;
  294. } else {
  295. this.$message.error("PC端目前不支持该付款方式,请在移动端支付");
  296. }
  297. } else {
  298. this.$message.error(response.msg);
  299. }
  300. });
  301. },
  302. // 付费文章
  303. payNoticeMoney() {
  304. if (this.pay_select != 3 && this.pay_select != 2 && this.pay_select != 6) {
  305. this.$message.error("PC端目前不支持该付款方式,请在移动端支付");
  306. return;
  307. }
  308. let json = {
  309. pay_id: this.pay_select,
  310. money: this.money,
  311. pay_name: this.pay_name,
  312. id: this.order_pay_id,
  313. // 文章id
  314. art: 'pay'
  315. };
  316. this.fun.$get("plugin.article-pay.api.index.orderPay", json, "..").then(response => {
  317. if (response.result == 1) {
  318. if (this.pay_select == 3) {
  319. if (this.need_password) {
  320. this.popupSpecs = true;
  321. this.balancePwd = "";
  322. } else {
  323. this.dialogPay = false;
  324. this.$message.success(response.msg);
  325. this.$emit("paySuccess", true);
  326. }
  327. } else if (this.pay_select == 2) {
  328. // 支付宝
  329. window.location.href = response.data; // window.open(response.data, "_blank");
  330. } else if (this.pay_select == 6) {
  331. // 微信
  332. window.location.href = response.data;
  333. } else {
  334. this.$message.error("PC端目前不支持该付款方式,请在移动端支付");
  335. }
  336. } else {
  337. this.$message.error(response.msg);
  338. }
  339. });
  340. },
  341. // 商城订单付费
  342. payMoney() {
  343. if (this.pay_select == 3) {
  344. if (this.need_password) {
  345. this.popupSpecs = true;
  346. this.balancePwd = "";
  347. } else {
  348. this.balancePay();
  349. }
  350. } else if (this.pay_select == 2) {
  351. this.aliPayOrder();
  352. } else if (this.pay_select == 17) {
  353. this.payNoMoney();
  354. } else if (this.pay_select == 29) {
  355. this.getwechatPayAili();
  356. } else if (this.pay_select == 28) {
  357. this.getwechatPay();
  358. } else if (this.pay_select == 57) {
  359. this.pcweixin();
  360. } else {
  361. this.$message.error('PC端暂不支持该支付方式!');
  362. }
  363. },
  364. changeIndex(item) {
  365. if (item.need_password) {
  366. this.need_password = item.need_password;
  367. }
  368. this.pay_select = item.value;
  369. this.pay_name = item.name;
  370. },
  371. balancePay(password) {
  372. let json = {
  373. order_pay_id: this.order_pay_id
  374. };
  375. if (!this.fun.isTextEmpty(password)) {
  376. json = {
  377. order_pay_id: this.order_pay_id,
  378. payment_password: password
  379. };
  380. }
  381. this.fun.$get("order.credit-merge-pay.credit2", json, "").then(response => {
  382. if (response.result == 1) {
  383. this.$message.success(response.msg);
  384. this.dialogPay = false;
  385. this.$emit("paySuccess", true);
  386. } else {
  387. this.$message.error(response.msg);
  388. }
  389. });
  390. },
  391. aliPayOrder() {
  392. let payUrl = "order.merge-pay.alipay";
  393. this.fun.$get(payUrl, {
  394. order_pay_id: this.order_pay_id
  395. }, "支付中").then(response => {
  396. if (response.result == 1) {
  397. window.location.href = response.data;
  398. this.$message.success(response.msg);
  399. } else {
  400. this.$message.error(response.msg);
  401. }
  402. });
  403. },
  404. payNoMoney() {
  405. let payUrl = "order.mergePay.COD";
  406. this.fun.$get(payUrl, {
  407. order_pay_id: this.order_pay_id
  408. }, "支付中").then(response => {
  409. if (response.result == 1) {
  410. this.$message.success(response.msg);
  411. this.show_pay_status = true;
  412. this.pay_success = true;
  413. } else {
  414. this.$message.error(response.msg);
  415. }
  416. });
  417. },
  418. //汇聚阿里支付
  419. getwechatPayAili() {
  420. let payUrl = "order.merge-pay.alipay-pay-hj";
  421. this.fun.$get(payUrl, {
  422. order_pay_id: this.order_pay_id
  423. }, "支付中").then(response => {
  424. if (response.result == 1) {
  425. window.location.href = response.data.data.rc_Result;
  426. this.$message.success(response.msg);
  427. } else {
  428. this.$message.error(response.msg);
  429. }
  430. });
  431. },
  432. getOrderStatus() {
  433. this.fun.$get('payment.pc-scan.index', {
  434. order_ids: this.orderPayId
  435. }).then(response => {
  436. if (response.result == 1) {
  437. if (response.data.pay_status) {
  438. // if (response.data.redirect) {
  439. // setTimeout(() => {
  440. // window.location.href = response.data.redirect
  441. // }, 3000);
  442. // }
  443. clearInterval(this.interval);
  444. this.show_pay_status = true;
  445. this.pay_success = true;
  446. }
  447. } else {
  448. clearInterval(this.interval);
  449. this.show_pay_status = true;
  450. this.pay_success = false;
  451. this.$message.error(response.msg);
  452. }
  453. });
  454. },
  455. pcweixin() {
  456. let payUrl = "order.merge-pay.wechat-native";
  457. this.fun.$get(payUrl, {
  458. order_pay_id: this.order_pay_id
  459. }, "加载中").then(response => {
  460. if (response.result == 1) {
  461. this.createQrc(response.data.code_url);
  462. this.show_qrcode = true;
  463. if (this.orderPayId) {
  464. this.interval = setInterval(() => {
  465. this.getOrderStatus();
  466. }, 3000);
  467. }
  468. } else {
  469. this.$message.error(response.msg);
  470. }
  471. });
  472. },
  473. // 第三方支付 微信支付-汇聚
  474. getwechatPay() {
  475. let payUrl = "order.merge-pay.wechat-pay-hj";
  476. this.fun.$get(payUrl, {
  477. order_pay_id: this.order_pay_id
  478. }, "加载中").then(response => {
  479. if (response.result == 1) {
  480. this.createQrc(response.data.data.rc_Result);
  481. this.show_qrcode = true;
  482. } else {
  483. this.$message.error(response.msg);
  484. }
  485. });
  486. },
  487. getVerifyPassword() {
  488. this.fun.$get("payment.password.check", {
  489. password: this.balancePwd
  490. }, "").then(response => {
  491. if (response.result == 1) {
  492. this.balancePay(this.balancePwd);
  493. this.popupSpecs = false;
  494. } else {
  495. this.$message.error(response.msg);
  496. this.popupSpecs = false;
  497. this.dialogPay = false;
  498. }
  499. });
  500. }
  501. }
  502. });
  503. // CONCATENATED MODULE: ./components/default/payBox.vue?vue&type=script&lang=js&
  504. /* harmony default export */ var default_payBoxvue_type_script_lang_js_ = (payBoxvue_type_script_lang_js_);
  505. // EXTERNAL MODULE: ./node_modules/_vue-loader@15.9.8@vue-loader/lib/runtime/componentNormalizer.js
  506. var componentNormalizer = __webpack_require__(2);
  507. // CONCATENATED MODULE: ./components/default/payBox.vue
  508. function injectStyles (context) {
  509. var style0 = __webpack_require__(150)
  510. if (style0.__inject__) style0.__inject__(context)
  511. }
  512. /* normalize component */
  513. var component = Object(componentNormalizer["a" /* default */])(
  514. default_payBoxvue_type_script_lang_js_,
  515. render,
  516. staticRenderFns,
  517. false,
  518. injectStyles,
  519. "6f09a324",
  520. "5b0b0f60"
  521. )
  522. /* harmony default export */ var payBox = __webpack_exports__["default"] = (component.exports);
  523. /***/ })
  524. };;
  525. //# sourceMappingURL=default-pay-box.js.map