123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236 |
- (global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/app/orderManage" ], {
- 357: function(e, n, t) {
- (function(e) {
- function n(e) {
- return e && e.__esModule ? e : {
- default: e
- };
- }
- t(4), n(t(2)), e(n(t(358)).default);
- }).call(this, t(1).createPage);
- },
- 358: function(e, n, t) {
- t.r(n);
- var o = t(359), r = t(361);
- for (var a in r) "default" !== a && function(e) {
- t.d(n, e, function() {
- return r[e];
- });
- }(a);
- t(363);
- var i = t(13), c = Object(i.default)(r.default, o.render, o.staticRenderFns, !1, null, null, null, !1, o.components, void 0);
- c.options.__file = "pages/app/orderManage.vue", n.default = c.exports;
- },
- 359: function(e, n, t) {
- t.r(n);
- var o = t(360);
- t.d(n, "render", function() {
- return o.render;
- }), t.d(n, "staticRenderFns", function() {
- return o.staticRenderFns;
- }), t.d(n, "recyclableRender", function() {
- return o.recyclableRender;
- }), t.d(n, "components", function() {
- return o.components;
- });
- },
- 360: function(e, n, t) {
- var o;
- t.r(n), t.d(n, "render", function() {
- return r;
- }), t.d(n, "staticRenderFns", function() {
- return i;
- }), t.d(n, "recyclableRender", function() {
- return a;
- }), t.d(n, "components", function() {
- return o;
- });
- try {
- o = {
- uniLoadMore: function() {
- return t.e("components/uni-load-more/uni-load-more").then(t.bind(null, 413));
- }
- };
- } catch (e) {
- if (-1 === e.message.indexOf("Cannot find module") || -1 === e.message.indexOf(".vue")) throw e;
- console.error(e.message), console.error("1. 排查组件名称拼写是否正确"), console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),
- console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件");
- }
- var r = function() {
- var e = this, n = (e.$createElement, e._self._c, e.__map(e.navList, function(n, t) {
- return {
- $orig: e.__get_orig(n),
- l1: e.__map(n.orderList, function(n, t) {
- return {
- $orig: e.__get_orig(n),
- l0: e.__map(n.cartInfo, function(t, o) {
- return {
- $orig: e.__get_orig(t),
- m0: 1 === n.cartInfo.length ? e.moneyNum(t.productInfo.price) : null
- };
- }),
- m1: e.moneyNum(n.pay_postage),
- m2: e.moneyNum(n.pay_price)
- };
- })
- };
- }));
- e.$mp.data = Object.assign({}, {
- $root: {
- l2: n
- }
- });
- }, a = !1, i = [];
- r._withStripped = !0;
- },
- 361: function(e, n, t) {
- t.r(n);
- var o = t(362), r = t.n(o);
- for (var a in o) "default" !== a && function(e) {
- t.d(n, e, function() {
- return o[e];
- });
- }(a);
- n.default = r.a;
- },
- 362: function(e, n, t) {
- (function(e) {
- Object.defineProperty(n, "__esModule", {
- value: !0
- }), n.default = void 0;
- var o = t(354), r = {
- components: {
- uniLoadMore: function() {
- t.e("components/uni-load-more/uni-load-more").then(function() {
- return resolve(t(413));
- }.bind(null, t)).catch(t.oe);
- },
- empty: function() {
- t.e("components/empty").then(function() {
- return resolve(t(420));
- }.bind(null, t)).catch(t.oe);
- }
- },
- data: function() {
- return {
- tabCurrentIndex: 0,
- navList: [ {
- state: 1,
- text: "待发货",
- loadingType: "more",
- orderList: [],
- page: 1,
- limit: 10
- }, {
- state: 2,
- text: "待收货",
- loadingType: "more",
- orderList: [],
- page: 1,
- limit: 10
- }, {
- state: 3,
- text: "待评价",
- loadingType: "more",
- orderList: [],
- page: 1,
- limit: 10
- }, {
- state: 4,
- text: "已完成",
- loadingType: "more",
- orderList: [],
- page: 1,
- limit: 10
- } ]
- };
- },
- onLoad: function(e) {
- this.tabCurrentIndex = +e.state || 0, 0 == e.state && this.loadData();
- },
- methods: {
- moneyNum: function(e) {
- return +e;
- },
- loadData: function(n) {
- var t = this, r = this.tabCurrentIndex, a = this.navList[r], i = a.state;
- "tabChange" === n && !0 === a.loaded || "loading" !== a.loadingType && "noMore" !== a.loadingType && (a.loadingType = "loading",
- (0, o.orderList)({
- type: i,
- page: a.page,
- limit: a.limit
- }).then(function(n) {
- var o = n.data;
- console.log(o);
- var r = o.data.map(function(e) {
- var n = t.orderStateExp(e.status);
- return e.stateTip = n.stateTip, e.stateTipColor = n.stateTipColor, e;
- });
- a.orderList = a.orderList.concat(r), a.page++, a.limit != o.length ? (a.loadingType = "noMore",
- e.hideLoading(), t.$set(a, "loaded", !0)) : a.loadingType = "more";
- }).catch(function(e) {
- console.log(e);
- }));
- },
- changeTab: function(e) {
- this.tabCurrentIndex = e.target.current, this.loadData("tabChange");
- },
- tabClick: function(e) {
- this.tabCurrentIndex = e;
- },
- deleteOrder: function(n) {
- var t = this;
- e.showLoading({
- title: "请稍后"
- }), setTimeout(function() {
- t.navList[t.tabCurrentIndex].orderList.splice(n, 1), e.hideLoading();
- }, 600);
- },
- orderStateExp: function(e) {
- var n = "", t = "#fa436a";
- switch (+e) {
- case 0:
- n = "待付款";
- break;
- case 1:
- n = "待发货";
- break;
- case 2:
- n = "待收货";
- break;
- case 3:
- n = "待评价";
- break;
- case 4:
- n = "已完成", t = "#5dbc7c";
- break;
- case 9:
- n = "订单已关闭", t = "#909399";
- }
- return {
- stateTip: n,
- stateTipColor: t
- };
- }
- }
- };
- n.default = r;
- }).call(this, t(1).default);
- },
- 363: function(e, n, t) {
- t.r(n);
- var o = t(364), r = t.n(o);
- for (var a in o) "default" !== a && function(e) {
- t.d(n, e, function() {
- return o[e];
- });
- }(a);
- n.default = r.a;
- },
- 364: function(e, n, t) {}
- }, [ [ 357, "common/runtime", "common/vendor" ] ] ]);
|