1 |
- {"version":3,"sources":["webpack:///./src/views/order/PaymentStatus.vue?30aa","webpack:///src/views/order/PaymentStatus.vue","webpack:///./src/views/order/PaymentStatus.vue?1b15","webpack:///./src/views/order/PaymentStatus.vue","webpack:///./src/api/order.js"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","orderInfo","paid","pay_type","isWeixin","_v","domProps","_s","order_id","add_time","is_channel","_e","pay_price","msgContent","on","$event","goPages","staticRenderFns","name","NAME","props","data","id","status","watch","$route","n","query","msg","params","parseInt","getOrderInfo","computed","mounted","methods","undefined","route","routes","$router","push","path","document","title","component","postOrderConfirm","cartId","request","post","postOrderComputed","key","getOrderCoupon","price","get","parseFloat","createOrder","getOrderData","getOrderList","cancelOrder","orderDetail","getRefundReason","postOrderRefund","takeOrder","uni","delOrder","express","payOrder","paytype","from","orderVerific","verify_code","is_confirm","orderAgain"],"mappings":"uHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,kBAAkB,CAAEN,EAAIO,UAAUC,MAAkC,WAA1BR,EAAIO,UAAUE,SAAuBL,EAAG,MAAM,CAACE,YAAY,uCAAuCF,EAAG,MAAM,CAACE,YAAY,uCAChRN,EAAIU,UAAsC,UAA1BV,EAAIO,UAAUE,UACJ,WAA1BT,EAAIO,UAAUE,SAChBL,EAAG,MAAM,CAACE,YAAY,UAAU,CAACN,EAAIW,GAAG,sBAAuBX,EAAIO,UAAc,KAAEH,EAAG,MAAM,CAACE,YAAY,UAAU,CAACN,EAAIW,GAAG,YAAYP,EAAG,MAAM,CAACE,YAAY,UAAU,CAACN,EAAIW,GAAG,YAAYP,EAAG,MAAM,CAACE,YAAY,WAAW,CAACF,EAAG,MAAM,CAACE,YAAY,qCAAqC,CAACF,EAAG,MAAM,CAACJ,EAAIW,GAAG,UAAUP,EAAG,MAAM,CAACE,YAAY,UAAUM,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C,SAASC,EAAaC,EAAaC,GACxC,OAAOxB,OAAQC,KAAK,sBAAuB,CAAEsB,cAAaC,eAOrD,SAASC,EAAWT,GACzB,OAAOhB,OAAQC,KAAK,cAAe,CAAEe,IAAKA","file":"h5/js/chunk-2107f928.25552acd.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"payment-status\"},[(_vm.orderInfo.paid || _vm.orderInfo.pay_type == 'offline')?_c('div',{staticClass:\"iconfont icon-duihao2 bg-color-red\"}):_c('div',{staticClass:\"iconfont icon-iconfontguanbi fail\"}),(\n (!_vm.isWeixin && _vm.orderInfo.pay_type == 'weixin') ||\n _vm.orderInfo.pay_type == 'offline'\n )?_c('div',{staticClass:\"status\"},[_vm._v(\"\\n 订单创建成功\\n \")]):(_vm.orderInfo.paid)?_c('div',{staticClass:\"status\"},[_vm._v(\"订单支付成功\")]):_c('div',{staticClass:\"status\"},[_vm._v(\"订单支付失败\")]),_c('div',{staticClass:\"wrapper\"},[_c('div',{staticClass:\"item acea-row row-between-wrapper\"},[_c('div',[_vm._v(\"订单编号\")]),_c('div',{staticClass:\"itemCom\",domProps:{\"textContent\":_vm._s(_vm.orderInfo.order_id)}})]),_c('div',{staticClass:\"item acea-row row-between-wrapper\"},[_c('div',[_vm._v(\"下单时间\")]),_c('div',{staticClass:\"itemCom\",domProps:{\"textContent\":_vm._s(_vm.orderInfo.add_time)}})]),_c('div',{staticClass:\"item acea-row row-between-wrapper\"},[_c('div',[_vm._v(\"支付方式\")]),(_vm.orderInfo.pay_type == 'weixin' && _vm.orderInfo.is_channel == 2)?_c('div',{staticClass:\"itemCom\"},[_vm._v(\"\\n H5微信支付\\n \")]):_vm._e(),(_vm.orderInfo.pay_type == 'weixin' && _vm.orderInfo.is_channel == 0)?_c('div',{staticClass:\"itemCom\"},[_vm._v(\"\\n 微信支付\\n \")]):_vm._e(),(_vm.orderInfo.pay_type == 'yue')?_c('div',{staticClass:\"itemCom\"},[_vm._v(\"余额支付\")]):_vm._e(),(_vm.orderInfo.pay_type == 'offline')?_c('div',{staticClass:\"itemCom\"},[_vm._v(\"\\n 线下支付\\n \")]):_vm._e()]),_c('div',{staticClass:\"item acea-row row-between-wrapper\"},[_c('div',[_vm._v(\"支付金额\")]),_c('div',{staticClass:\"itemCom\",domProps:{\"textContent\":_vm._s(_vm.orderInfo.pay_price)}})]),(\n _vm.orderInfo.paid == 0 &&\n _vm.orderInfo.pay_type != 'offline' &&\n _vm.isWeixin &&\n _vm.msgContent\n )?_c('div',{staticClass:\"item acea-row row-between-wrapper\"},[_c('div',[_vm._v(\"失败原因\")]),_c('div',{staticClass:\"itemCom\",domProps:{\"textContent\":_vm._s(_vm.msgContent)}})]):_vm._e()]),(_vm.orderInfo.pay_type == 'weixin' && _vm.orderInfo.is_channel == 2)?_c('div',[_c('div',{staticClass:\"returnBnt bg-color-red\",on:{\"click\":function($event){return _vm.goPages()}}},[_vm._v(\"查看支付结果\")]),_c('div',{staticClass:\"returnBnt cart-color\",on:{\"click\":function($event){return _vm.goPages()}}},[_vm._v(\"\\n 支付失败重新支付\\n \")])]):_c('div',[_c('div',{staticClass:\"returnBnt bg-color-red\",on:{\"click\":function($event){return _vm.goPages()}}},[_vm._v(\"查看订单\")]),_c('div',{staticClass:\"returnBnt cart-color\",on:{\"click\":function($event){return _vm.goPages('/')}}},[_vm._v(\"返回首页\")])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"payment-status\" v-cloak>\r\n <!--失败时: 用icon-iconfontguanbi fail替换icon-duihao2 bg-color-red-->\r\n <div\r\n class=\"iconfont icon-duihao2 bg-color-red\"\r\n v-if=\"orderInfo.paid || orderInfo.pay_type == 'offline'\"\r\n ></div>\r\n <div class=\"iconfont icon-iconfontguanbi fail\" v-else></div>\r\n <!-- 失败时:订单支付失败 -->\r\n <div\r\n class=\"status\"\r\n v-if=\"\r\n (!isWeixin && orderInfo.pay_type == 'weixin') ||\r\n orderInfo.pay_type == 'offline'\r\n \"\r\n >\r\n 订单创建成功\r\n </div>\r\n <div class=\"status\" v-else-if=\"orderInfo.paid\">订单支付成功</div>\r\n <div class=\"status\" v-else>订单支付失败</div>\r\n <div class=\"wrapper\">\r\n <div class=\"item acea-row row-between-wrapper\">\r\n <div>订单编号</div>\r\n <div class=\"itemCom\" v-text=\"orderInfo.order_id\"></div>\r\n </div>\r\n <div class=\"item acea-row row-between-wrapper\">\r\n <div>下单时间</div>\r\n <div class=\"itemCom\" v-text=\"orderInfo.add_time\"></div>\r\n </div>\r\n <div class=\"item acea-row row-between-wrapper\">\r\n <div>支付方式</div>\r\n <div\r\n class=\"itemCom\"\r\n v-if=\"orderInfo.pay_type == 'weixin' && orderInfo.is_channel == 2\"\r\n >\r\n H5微信支付\r\n </div>\r\n <div\r\n class=\"itemCom\"\r\n v-if=\"orderInfo.pay_type == 'weixin' && orderInfo.is_channel == 0\"\r\n >\r\n 微信支付\r\n </div>\r\n <div class=\"itemCom\" v-if=\"orderInfo.pay_type == 'yue'\">余额支付</div>\r\n <div class=\"itemCom\" v-if=\"orderInfo.pay_type == 'offline'\">\r\n 线下支付\r\n </div>\r\n </div>\r\n <div class=\"item acea-row row-between-wrapper\">\r\n <div>支付金额</div>\r\n <div class=\"itemCom\" v-text=\"orderInfo.pay_price\"></div>\r\n </div>\r\n <!--失败时加上这个 -->\r\n <div\r\n class=\"item acea-row row-between-wrapper\"\r\n v-if=\"\r\n orderInfo.paid == 0 &&\r\n orderInfo.pay_type != 'offline' &&\r\n isWeixin &&\r\n msgContent\r\n \"\r\n >\r\n <div>失败原因</div>\r\n <div class=\"itemCom\" v-text=\"msgContent\"></div>\r\n </div>\r\n </div>\r\n <!--失败时: 重新购买 -->\r\n <div v-if=\"orderInfo.pay_type == 'weixin' && orderInfo.is_channel == 2\">\r\n <div class=\"returnBnt bg-color-red\" @click=\"goPages()\">查看支付结果</div>\r\n <div class=\"returnBnt cart-color\" @click=\"goPages()\">\r\n 支付失败重新支付\r\n </div>\r\n </div>\r\n <div v-else>\r\n <div class=\"returnBnt bg-color-red\" @click=\"goPages()\">查看订单</div>\r\n <div class=\"returnBnt cart-color\" @click=\"goPages('/')\">返回首页</div>\r\n </div>\r\n </div>\r\n</template>\r\n<script>\r\nimport { mapGetters } from \"vuex\";\r\nimport { orderDetail } from \"@api/order\";\r\nimport { isWeixin } from \"@utils\";\r\n\r\nconst NAME = \"PayMentStatus\";\r\n\r\nexport default {\r\n name: NAME,\r\n props: {},\r\n data: function() {\r\n return {\r\n id: \"\",\r\n status: 0,\r\n msgContent: \"\",\r\n orderInfo: {},\r\n isWeixin: isWeixin()\r\n };\r\n },\r\n watch: {\r\n $route(n) {\r\n if (n.query.msg) this.msgContent = n.query.msg;\r\n if (n.name === NAME && this.id !== n.params.id) {\r\n this.id = n.params.id;\r\n this.status = parseInt(n.params.status);\r\n this.getOrderInfo();\r\n }\r\n }\r\n },\r\n computed: {\r\n ...mapGetters([\"userInfo\"])\r\n },\r\n mounted() {\r\n this.id = this.$route.params.id;\r\n this.msgContent = this.$route.query.msg;\r\n this.status = parseInt(this.$route.params.status);\r\n this.getOrderInfo();\r\n },\r\n methods: {\r\n goPages(route) {\r\n let routes =\r\n route !== undefined\r\n ? route\r\n : \"/order/detail/\" + this.orderInfo.order_id;\r\n if (this.status === 5 && route === undefined) routes = \"/order/list/0\";\r\n return this.$router.push({\r\n path: routes\r\n });\r\n },\r\n getOrderInfo() {\r\n orderDetail(this.id).then(res => {\r\n this.orderInfo = res.data;\r\n if (this.isWeixin) {\r\n document.title = this.orderInfo.paid ? \"支付成功\" : \"支付失败\";\r\n } else {\r\n document.title = \"订单创建成功\";\r\n }\r\n });\r\n }\r\n }\r\n};\r\n</script>\r\n","import mod from \"-!../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!../../../node_modules/_babel-loader@8.0.6@babel-loader/lib/index.js!../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/_vue-loader@15.9.0@vue-loader/lib/index.js??vue-loader-options!./PaymentStatus.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!../../../node_modules/_babel-loader@8.0.6@babel-loader/lib/index.js!../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/_vue-loader@15.9.0@vue-loader/lib/index.js??vue-loader-options!./PaymentStatus.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./PaymentStatus.vue?vue&type=template&id=2baf6ea6&\"\nimport script from \"./PaymentStatus.vue?vue&type=script&lang=js&\"\nexport * from \"./PaymentStatus.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/_vue-loader@15.9.0@vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","/*\r\n * 订单确认\r\n * */\r\nimport request from \"@utils/request\";\r\n\r\n/**\r\n * 通过购物车 id 获取订单信息\r\n * @param cartId\r\n * @returns {*}\r\n */\r\nexport function postOrderConfirm(cartId) {\r\n return request.post(\"/order/confirm\", { cartId });\r\n}\r\n\r\n/**\r\n * 计算订单金额\r\n * @param key\r\n * @param data\r\n * @returns {*}\r\n */\r\nexport function postOrderComputed(key, data) {\r\n return request.post(\"/order/computed/\" + key, data);\r\n}\r\n\r\n/**\r\n * 获取指定金额可用优惠券\r\n * @param price\r\n * @returns {*}\r\n */\r\nexport function getOrderCoupon(price, data) {\r\n return request.get(\"/coupons/order/\" + (parseFloat(price) || 0), data);\r\n}\r\n\r\n/**\r\n * 生成订单\r\n * @param key\r\n * @param data\r\n * @returns {*}\r\n */\r\nexport function createOrder(key, data) {\r\n return request.post(\"/order/create/\" + key, data || {});\r\n}\r\n\r\n/**\r\n * 订单统计数据\r\n * @returns {*}\r\n */\r\nexport function getOrderData() {\r\n return request.get(\"/order/data\");\r\n}\r\n\r\n/**\r\n * 订单列表\r\n * @returns {*}\r\n */\r\nexport function getOrderList(data) {\r\n return request.get(\"/order/list\", data);\r\n}\r\n\r\n/**\r\n * 取消订单\r\n * @returns {*}\r\n */\r\nexport function cancelOrder(id) {\r\n return request.post(\"/order/cancel\", { id });\r\n}\r\n\r\n/**\r\n * 订单详情\r\n * @returns {*}\r\n */\r\nexport function orderDetail(id) {\r\n return request.get(\"/order/detail/\" + id);\r\n}\r\n\r\n/**\r\n * 退款理由\r\n * @returns {*}\r\n */\r\nexport function getRefundReason() {\r\n return request.get(\"/order/refund/reason\");\r\n}\r\n\r\n/**\r\n * 提交退款\r\n * @returns {*}\r\n */\r\nexport function postOrderRefund(data) {\r\n return request.post(\"/order/refund/verify\", data);\r\n}\r\n\r\n/**\r\n * 确认收货\r\n * @returns {*}\r\n */\r\nexport function takeOrder(uni) {\r\n return request.post(\"/order/take\", { uni });\r\n}\r\n\r\n/**\r\n * 删除订单\r\n * @returns {*}\r\n */\r\nexport function delOrder(uni) {\r\n return request.post(\"/order/del\", { uni });\r\n}\r\n\r\n/**\r\n * 订单查询物流信息\r\n * @returns {*}\r\n */\r\nexport function express(uni) {\r\n return request.get(\"order/express/\" + uni);\r\n}\r\n\r\n/**\r\n * 订单查询物流信息\r\n * @returns {*}\r\n */\r\nexport function payOrder(uni, paytype, from) {\r\n return request.post(\"order/pay\", { uni, paytype, from });\r\n}\r\n/**\r\n * 订单核销\r\n * @returns {*}\r\n */\r\nexport function orderVerific(verify_code, is_confirm) {\r\n return request.post(\"order/order_verific\", { verify_code, is_confirm });\r\n}\r\n/**\r\n * 再次下单\r\n * @param string uni\r\n *\r\n */\r\nexport function orderAgain(uni) {\r\n return request.post(\"order/again\", { uni: uni });\r\n}\r\n"],"sourceRoot":""}
|