order.js 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pages/order/order"],{
  2. /***/ 191:
  3. /*!***************************************************************!*\
  4. !*** D:/2022/10/hmd/main.js?{"page":"pages%2Forder%2Forder"} ***!
  5. \***************************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. /* WEBPACK VAR INJECTION */(function(createPage) {__webpack_require__(/*! uni-pages */ 5);
  10. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 4));
  11. var _order = _interopRequireDefault(__webpack_require__(/*! ./pages/order/order.vue */ 192));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} // @ts-ignore
  12. wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;createPage(_order.default);
  13. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["createPage"]))
  14. /***/ }),
  15. /***/ 192:
  16. /*!********************************************!*\
  17. !*** D:/2022/10/hmd/pages/order/order.vue ***!
  18. \********************************************/
  19. /*! no static exports found */
  20. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  21. "use strict";
  22. __webpack_require__.r(__webpack_exports__);
  23. /* harmony import */ var _order_vue_vue_type_template_id_127632e4___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./order.vue?vue&type=template&id=127632e4& */ 193);
  24. /* harmony import */ var _order_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./order.vue?vue&type=script&lang=js& */ 195);
  25. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _order_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _order_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  26. /* harmony import */ var _order_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./order.vue?vue&type=style&index=0&lang=scss& */ 197);
  27. /* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 14);
  28. var renderjs
  29. /* normalize component */
  30. var component = Object(_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
  31. _order_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  32. _order_vue_vue_type_template_id_127632e4___WEBPACK_IMPORTED_MODULE_0__["render"],
  33. _order_vue_vue_type_template_id_127632e4___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
  34. false,
  35. null,
  36. null,
  37. null,
  38. false,
  39. _order_vue_vue_type_template_id_127632e4___WEBPACK_IMPORTED_MODULE_0__["components"],
  40. renderjs
  41. )
  42. component.options.__file = "pages/order/order.vue"
  43. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  44. /***/ }),
  45. /***/ 193:
  46. /*!***************************************************************************!*\
  47. !*** D:/2022/10/hmd/pages/order/order.vue?vue&type=template&id=127632e4& ***!
  48. \***************************************************************************/
  49. /*! exports provided: render, staticRenderFns, recyclableRender, components */
  50. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  51. "use strict";
  52. __webpack_require__.r(__webpack_exports__);
  53. /* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_order_vue_vue_type_template_id_127632e4___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./order.vue?vue&type=template&id=127632e4& */ 194);
  54. /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_order_vue_vue_type_template_id_127632e4___WEBPACK_IMPORTED_MODULE_0__["render"]; });
  55. /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_order_vue_vue_type_template_id_127632e4___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
  56. /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_order_vue_vue_type_template_id_127632e4___WEBPACK_IMPORTED_MODULE_0__["recyclableRender"]; });
  57. /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "components", function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_order_vue_vue_type_template_id_127632e4___WEBPACK_IMPORTED_MODULE_0__["components"]; });
  58. /***/ }),
  59. /***/ 194:
  60. /*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  61. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/2022/10/hmd/pages/order/order.vue?vue&type=template&id=127632e4& ***!
  62. \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  63. /*! exports provided: render, staticRenderFns, recyclableRender, components */
  64. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  65. "use strict";
  66. __webpack_require__.r(__webpack_exports__);
  67. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
  68. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
  69. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; });
  70. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; });
  71. var components
  72. try {
  73. components = {
  74. uniLoadMore: function() {
  75. return __webpack_require__.e(/*! import() | components/uni-load-more/uni-load-more */ "components/uni-load-more/uni-load-more").then(__webpack_require__.bind(null, /*! @/components/uni-load-more/uni-load-more.vue */ 332))
  76. }
  77. }
  78. } catch (e) {
  79. if (
  80. e.message.indexOf("Cannot find module") !== -1 &&
  81. e.message.indexOf(".vue") !== -1
  82. ) {
  83. console.error(e.message)
  84. console.error("1. 排查组件名称拼写是否正确")
  85. console.error(
  86. "2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"
  87. )
  88. console.error(
  89. "3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件"
  90. )
  91. } else {
  92. throw e
  93. }
  94. }
  95. var render = function() {
  96. var _vm = this
  97. var _h = _vm.$createElement
  98. var _c = _vm._self._c || _h
  99. var l2 = _vm.__map(_vm.navList, function(tabItem, tabIndex) {
  100. var $orig = _vm.__get_orig(tabItem)
  101. var l1 = _vm.__map(tabItem.orderList, function(item, index) {
  102. var $orig = _vm.__get_orig(item)
  103. var l0 = _vm.__map(item.cartInfo, function(goodsItem, goodsIndex) {
  104. var $orig = _vm.__get_orig(goodsItem)
  105. var f0 = _vm._f("moneyNum")(goodsItem.productInfo.price)
  106. return {
  107. $orig: $orig,
  108. f0: f0
  109. }
  110. })
  111. var m0 = _vm.moneyNum(item.pay_postage)
  112. var m1 = _vm.moneyNum(item.pay_price)
  113. return {
  114. $orig: $orig,
  115. l0: l0,
  116. m0: m0,
  117. m1: m1
  118. }
  119. })
  120. return {
  121. $orig: $orig,
  122. l1: l1
  123. }
  124. })
  125. _vm.$mp.data = Object.assign(
  126. {},
  127. {
  128. $root: {
  129. l2: l2
  130. }
  131. }
  132. )
  133. }
  134. var recyclableRender = false
  135. var staticRenderFns = []
  136. render._withStripped = true
  137. /***/ }),
  138. /***/ 195:
  139. /*!*********************************************************************!*\
  140. !*** D:/2022/10/hmd/pages/order/order.vue?vue&type=script&lang=js& ***!
  141. \*********************************************************************/
  142. /*! no static exports found */
  143. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  144. "use strict";
  145. __webpack_require__.r(__webpack_exports__);
  146. /* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_order_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./order.vue?vue&type=script&lang=js& */ 196);
  147. /* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_order_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_order_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
  148. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_order_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_order_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  149. /* harmony default export */ __webpack_exports__["default"] = (_E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_order_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
  150. /***/ }),
  151. /***/ 196:
  152. /*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  153. !*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/2022/10/hmd/pages/order/order.vue?vue&type=script&lang=js& ***!
  154. \****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  155. /*! no static exports found */
  156. /***/ (function(module, exports, __webpack_require__) {
  157. "use strict";
  158. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
  159. var _order = __webpack_require__(/*! @/api/order.js */ 146);var uniLoadMore = function uniLoadMore() {__webpack_require__.e(/*! require.ensure | components/uni-load-more/uni-load-more */ "components/uni-load-more/uni-load-more").then((function () {return resolve(__webpack_require__(/*! @/components/uni-load-more/uni-load-more.vue */ 332));}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);};var empty = function empty() {__webpack_require__.e(/*! require.ensure | components/empty */ "components/empty").then((function () {return resolve(__webpack_require__(/*! @/components/empty */ 380));}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);};var _default =
  160. {
  161. components: {
  162. uniLoadMore: uniLoadMore,
  163. empty: empty },
  164. data: function data() {
  165. return {
  166. tabCurrentIndex: 0,
  167. navList: [
  168. {
  169. state: 0,
  170. text: '待付款',
  171. loadingType: 'more',
  172. orderList: [],
  173. page: 1, //当前页数
  174. limit: 10 //每次信息条数
  175. },
  176. {
  177. state: 1,
  178. text: '待发货',
  179. loadingType: 'more',
  180. orderList: [],
  181. page: 1, //当前页数
  182. limit: 10 //每次信息条数
  183. },
  184. {
  185. state: 2,
  186. text: '待收货',
  187. loadingType: 'more',
  188. orderList: [],
  189. page: 1, //当前页数
  190. limit: 10 //每次信息条数
  191. },
  192. {
  193. state: 3,
  194. text: '待评价',
  195. loadingType: 'more',
  196. orderList: [],
  197. page: 1, //当前页数
  198. limit: 10 //每次信息条数
  199. },
  200. {
  201. state: 4,
  202. text: '已完成',
  203. loadingType: 'more',
  204. orderList: [],
  205. page: 1, //当前页数
  206. limit: 10 //每次信息条数
  207. }] };
  208. },
  209. onLoad: function onLoad(options) {
  210. /**
  211. * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
  212. * 替换onLoad下代码即可
  213. */
  214. this.tabCurrentIndex = +options.state;
  215. if (options.state == 0) {
  216. this.loadData();
  217. }
  218. },
  219. methods: {
  220. // 转换金额为数字
  221. moneyNum: function moneyNum(value) {
  222. return +value;
  223. },
  224. // 确认收货
  225. orderTake: function orderTake(item, index) {
  226. var obj = this;
  227. uni.showModal({
  228. title: '是否确认收货?',
  229. success: function success() {
  230. (0, _order.orderTake)({
  231. uni: item.order_id }).
  232. then(function (e) {
  233. obj.navList[obj.tabCurrentIndex].orderList.splice(index, 1);
  234. uni.showToast({
  235. title: '收货成功' });
  236. }).
  237. catch(function (e) {
  238. console.log(e);
  239. });
  240. } });
  241. },
  242. //跳转到订单详情
  243. goToOrderDetail: function goToOrderDetail(e) {
  244. uni.navigateTo({
  245. url: '/pages/order/orderDetail?id=' + e.order_id });
  246. },
  247. // 申请退款
  248. orderRefund: function orderRefund(e) {
  249. uni.navigateTo({
  250. url: '/pages/order/orderRefund?id=' + e.order_id });
  251. },
  252. // 订单支付
  253. orderPay: function orderPay(e) {
  254. uni.navigateTo({
  255. url: '/pages/money/pay?type=1&ordid=' + e.order_id + '&money=' + e.pay_price });
  256. },
  257. //获取订单列表
  258. loadData: function loadData(source) {var _this = this;
  259. //这里是将订单挂载到tab列表下
  260. var index = this.tabCurrentIndex;
  261. var navItem = this.navList[index];
  262. var state = navItem.state;
  263. if (source === 'tabChange' && navItem.loaded === true) {
  264. //tab切换只有第一次需要加载数据
  265. return;
  266. }
  267. if (navItem.loadingType === 'loading') {
  268. //防止重复加载
  269. return;
  270. }
  271. if (navItem.loadingType === 'noMore') {
  272. //防止重复加载
  273. return;
  274. }
  275. // 修改当前对象状态为加载中
  276. navItem.loadingType = 'loading';
  277. (0, _order.orderList)({
  278. type: state,
  279. page: navItem.page,
  280. limit: navItem.limit }).
  281. then(function (_ref) {var data = _ref.data;
  282. var arr = data.map(function (e) {
  283. var b = _this.orderStateExp(e.status);
  284. e.stateTip = b.stateTip;
  285. e.stateTipColor = b.stateTipColor;
  286. return e;
  287. });
  288. navItem.orderList = navItem.orderList.concat(arr);
  289. // console.log(navItem.orderList);
  290. navItem.page++;
  291. if (navItem.limit == data.length) {
  292. //判断是否还有数据, 有改为 more, 没有改为noMore
  293. navItem.loadingType = 'more';
  294. return;
  295. } else {
  296. //判断是否还有数据, 有改为 more, 没有改为noMore
  297. navItem.loadingType = 'noMore';
  298. }
  299. uni.hideLoading();
  300. _this.$set(navItem, 'loaded', true);
  301. }).
  302. catch(function (e) {
  303. console.log(e);
  304. });
  305. },
  306. //swiper 切换
  307. changeTab: function changeTab(e) {
  308. this.tabCurrentIndex = e.target.current;
  309. this.loadData('tabChange');
  310. },
  311. //顶部tab点击
  312. tabClick: function tabClick(index) {
  313. this.tabCurrentIndex = index;
  314. },
  315. //删除订单
  316. deleteOrder: function deleteOrder(index) {var _this2 = this;
  317. uni.showLoading({
  318. title: '请稍后' });
  319. setTimeout(function () {
  320. _this2.navList[_this2.tabCurrentIndex].orderList.splice(index, 1);
  321. uni.hideLoading();
  322. }, 600);
  323. },
  324. //取消订单
  325. cancelOrder: function cancelOrder(item) {var _this3 = this;
  326. uni.showModal({
  327. title: '订单取消',
  328. content: '是否取消订单?',
  329. success: function success(e) {
  330. if (e.confirm) {
  331. uni.showLoading({
  332. title: '请稍后' });
  333. (0, _order.orderCancel)({ id: item.order_id }).
  334. then(function (e) {
  335. uni.showToast({
  336. title: '取消成功',
  337. duration: 2000,
  338. position: 'top' });
  339. }).
  340. catch(function (e) {
  341. console.log(e);
  342. });
  343. //取消订单后删除待付款中该项
  344. var list = _this3.navList[_this3.tabCurrentIndex].orderList;
  345. var index = list.findIndex(function (val) {return val.id === item.id;});
  346. index !== -1 && list.splice(index, 1);
  347. uni.hideLoading();
  348. }
  349. } });
  350. },
  351. //订单状态文字和颜色
  352. orderStateExp: function orderStateExp(state) {
  353. var stateTip = '',
  354. stateTipColor = '#fa436a';
  355. switch (+state) {
  356. case 0:
  357. stateTip = '待付款';
  358. break;
  359. case 1:
  360. stateTip = '待发货';
  361. break;
  362. case 2:
  363. stateTip = '待收货';
  364. break;
  365. case 3:
  366. stateTip = '待评价';
  367. break;
  368. case 4:
  369. stateTip = '已完成';
  370. stateTipColor = '#5dbc7c';
  371. break;
  372. case 9:
  373. stateTip = '订单已关闭';
  374. stateTipColor = '#909399';
  375. break;
  376. //更多自定义
  377. }
  378. return { stateTip: stateTip, stateTipColor: stateTipColor };
  379. } } };exports.default = _default;
  380. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  381. /***/ }),
  382. /***/ 197:
  383. /*!******************************************************************************!*\
  384. !*** D:/2022/10/hmd/pages/order/order.vue?vue&type=style&index=0&lang=scss& ***!
  385. \******************************************************************************/
  386. /*! no static exports found */
  387. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  388. "use strict";
  389. __webpack_require__.r(__webpack_exports__);
  390. /* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_order_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-2!./node_modules/postcss-loader/src??ref--8-oneOf-1-3!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-5!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./order.vue?vue&type=style&index=0&lang=scss& */ 198);
  391. /* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_order_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_order_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
  392. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_order_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_order_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  393. /* harmony default export */ __webpack_exports__["default"] = (_E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_order_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default.a);
  394. /***/ }),
  395. /***/ 198:
  396. /*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  397. !*** ./node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-2!./node_modules/postcss-loader/src??ref--8-oneOf-1-3!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-5!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/2022/10/hmd/pages/order/order.vue?vue&type=style&index=0&lang=scss& ***!
  398. \**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  399. /*! no static exports found */
  400. /***/ (function(module, exports, __webpack_require__) {
  401. // extracted by mini-css-extract-plugin
  402. if(false) { var cssReload; }
  403. /***/ })
  404. },[[191,"common/runtime","common/vendor"]]]);
  405. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/order/order.js.map