{"version":3,"sources":["webpack:///./src/views/order/PaymentStatus.vue?5e08","webpack:///src/views/order/PaymentStatus.vue","webpack:///./src/views/order/PaymentStatus.vue?1b15","webpack:///./src/views/order/PaymentStatus.vue"],"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"],"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,SAAS,CAAC,YAAcZ,EAAIa,GAAGb,EAAIO,UAAUO,eAAeV,EAAG,MAAM,CAACE,YAAY,qCAAqC,CAACF,EAAG,MAAM,CAACJ,EAAIW,GAAG,UAAUP,EAAG,MAAM,CAACE,YAAY,UAAUM,SAAS,CAAC,YAAcZ,EAAI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MAAQ,EAA3B,6BAEUD,SAASC,MAAQ,eCtI+a,I,YCOtcC,EAAY,eACd,EACAlD,EACAwB,GACA,EACA,KACA,KACA,MAIa,aAAA0B,E","file":"h5/js/chunk-2d0c09da.2eb976a2.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=ba1dd212&\"\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"],"sourceRoot":""}