diff --git a/pages/mine/mineorders/mineorders.vue b/pages/mine/mineorders/mineorders.vue index 23a8b27..d268cb9 100644 --- a/pages/mine/mineorders/mineorders.vue +++ b/pages/mine/mineorders/mineorders.vue @@ -1,5 +1,5 @@ \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/login/login.js b/unpackage/dist/dev/mp-weixin/pages/login/login.js index 782353f..266a494 100644 --- a/unpackage/dist/dev/mp-weixin/pages/login/login.js +++ b/unpackage/dist/dev/mp-weixin/pages/login/login.js @@ -54,5 +54,5 @@ const _sfc_main = { }; } }; -const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-e4e4508d"]]); +const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-e4e4508d"], ["__file", "D:/jiangchengfeiyi-xiaochengxu/pages/login/login.vue"]]); wx.createPage(MiniProgramPage); diff --git a/unpackage/dist/dev/mp-weixin/pages/mine/mineorders/mineorders.js b/unpackage/dist/dev/mp-weixin/pages/mine/mineorders/mineorders.js index 2c31764..1a84da7 100644 --- a/unpackage/dist/dev/mp-weixin/pages/mine/mineorders/mineorders.js +++ b/unpackage/dist/dev/mp-weixin/pages/mine/mineorders/mineorders.js @@ -1,7 +1,10 @@ "use strict"; const common_vendor = require("../../../common/vendor.js"); const api_request = require("../../../api/request.js"); -const common_assets = require("../../../common/assets.js"); +if (!Array) { + const _component_template = common_vendor.resolveComponent("template"); + _component_template(); +} const _sfc_main = { __name: "mineorders", setup(__props) { @@ -12,7 +15,59 @@ const _sfc_main = { common_vendor.onMounted(async () => { await Getsort(); await changeTypes(sort.value[0], 0); + await Getorder(); + Status.displayedOrders = Status.orders; }); + common_vendor.ref({ + userInfo: common_vendor.wx$1.getStorageSync("userInfo") + }); + const Getorder = async () => { + const res = await common_vendor.index.request({ + url: api_request.baseUrl + "/order/list", + method: "POST", + data: { + // id:userInfo.value.userInfo.id , + id: 215 + } + }); + if (res.data.code === 1) { + Status.value.orders = res.data.data; + for (let key in res.data.data) { + Status.value.orders[key] = res.data.data[key]; + } + console.log(Status.value.orders[0].orderStatus); + console.log(res.data.data[0].orderStatus); + } else { + console.log("没拿到用户数据"); + } + }; + const Status = common_vendor.ref({ + orderStatus: "全部", + orders: [ + {} + ], + displayedOrders: [] + }); + const changeTab = (tab) => { + if (tab === "全部") { + Status.value.displayedOrders = Status.value.orders; + } else { + Status.value.displayedOrders = Status.value.orders.filter((order) => { + switch (tab) { + case "待支付": + return order.orderStatus === "代支付"; + case "代发货": + return order.orderStatus === "代发货"; + case "已发货": + return order.orderStatus === "已发货"; + case "售后": + return order.orderStatus === "售后"; + default: + return false; + } + }); + } + }; const Getsort = async () => { const res = await common_vendor.index.request({ url: api_request.testUrl + "/category/list", @@ -60,37 +115,41 @@ const _sfc_main = { }); } }; - const getBoxStyle = (index) => ({ - backgroundColor: currentColor.value === index ? "brown" : "#fffef8" - }); - const goToProduct = (item) => { - console.log(item, 123); - common_vendor.index.navigateTo({ - url: "../../../pages/store-home/ProductDetails/ProductDetails?info=" + JSON.stringify(item) - }); - }; return (_ctx, _cache) => { return { - a: common_vendor.f(sort.value, (item, index, i0) => { + a: _ctx.orderStatus === "全部" ? 1 : "", + b: common_vendor.o(($event) => changeTab("全部")), + c: _ctx.orderStatus === "代支付" ? 1 : "", + d: common_vendor.o(($event) => changeTab("代支付")), + e: _ctx.orderStatus === "代发货" ? 1 : "", + f: common_vendor.o(($event) => changeTab("代发货")), + g: _ctx.orderStatus === "已发货" ? 1 : "", + h: common_vendor.o(($event) => changeTab("已发货")), + i: _ctx.orderStatus === "售后" ? 1 : "", + j: common_vendor.o(($event) => changeTab("售后")), + k: common_vendor.f(Status.value.orders, (order, k0, i0) => { return { - a: item.imgurl, - b: common_vendor.t(item.name), - c: index, - d: common_vendor.s(getBoxStyle(index)), - e: common_vendor.o(($event) => changeTypes(item, index), index) + a: common_vendor.f(order.orderItemList, (item, k1, i1) => { + return { + a: common_vendor.t(item.goodSnapshot.name), + b: item.id + }; + }), + b: common_vendor.f(order.orderItemList, (item, k1, i1) => { + return { + a: common_vendor.t(item.goodSnapshot.type), + b: item.id + }; + }), + c: common_vendor.f(order.orderItemList, (item, k1, i1) => { + return { + a: common_vendor.t(item.goodSnapshot.price), + b: item.id + }; + }), + d: order.id }; - }), - b: common_vendor.f(productList.value, (item, index, i0) => { - return { - a: item.goodImg, - b: common_vendor.t(item.name), - c: common_vendor.t(item.intro), - d: common_vendor.t(item.price), - e: index, - f: common_vendor.o(($event) => goToProduct(item), index) - }; - }), - c: common_vendor.unref(common_assets.add_img) + }) }; }; } diff --git a/unpackage/dist/dev/mp-weixin/pages/mine/mineorders/mineorders.wxml b/unpackage/dist/dev/mp-weixin/pages/mine/mineorders/mineorders.wxml index 9c0a219..9144741 100644 --- a/unpackage/dist/dev/mp-weixin/pages/mine/mineorders/mineorders.wxml +++ b/unpackage/dist/dev/mp-weixin/pages/mine/mineorders/mineorders.wxml @@ -1 +1 @@ -{{item.b}}{{item.b}}{{item.c}}¥{{item.d}} \ No newline at end of file +全部代支付代发货已发货售后{{item.a}}{{item.a}}{{item.a}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/mine/mineorders/mineorders.wxss b/unpackage/dist/dev/mp-weixin/pages/mine/mineorders/mineorders.wxss index ea71be2..e35aa47 100644 --- a/unpackage/dist/dev/mp-weixin/pages/mine/mineorders/mineorders.wxss +++ b/unpackage/dist/dev/mp-weixin/pages/mine/mineorders/mineorders.wxss @@ -401,194 +401,28 @@ text.data-v-7d0f2622 { .mt-100.data-v-7d0f2622 { margin-top: 187.5rpx; } -.navbar.data-v-7d0f2622 { - background-color: #333; - color: #fff; +.container.data-v-7d0f2622 { + padding: 20px; +} +.order-tabs.data-v-7d0f2622 { + display: flex; + justify-content: space-around; + background-color: #f5f5f5; + padding: 10px 0; +} +.tab-item.data-v-7d0f2622 { + cursor: pointer; + padding: 5px 10px; +} +.tab-item.active.data-v-7d0f2622 { + color: blue; + border-bottom: 2px solid blue; +} +.order-list.data-v-7d0f2622 { + margin-top: 20px; +} +.order-item.data-v-7d0f2622 { + border: 1px solid #ccc; padding: 10px; -} -.bbb.data-v-7d0f2622 { - display: flex; - align-items: center; -} -.ccc.data-v-7d0f2622 { - display: flex; - flex-direction: column; - align-items: center; - margin: 20rpx; -} -.eee.data-v-7d0f2622 { - width: 30px; - height: 30px; -} -.ddd.data-v-7d0f2622 { - font-size: 14px; -} -.flex-row.data-v-7d0f2622 { - display: flex; -} -.flex-item.data-v-7d0f2622 { - flex: 1; -} -.ml-15.data-v-7d0f2622 { - margin-left: 28.13rpx; -} -.ml-3.data-v-7d0f2622 { - margin-left: 5.63rpx; -} -.mt-3.data-v-7d0f2622 { - margin-top: 5.63rpx; - text-align: center; -} -.mt-13.data-v-7d0f2622 { - margin-top: 17.38rpx; -} -.mt-5.data-v-7d0f2622 { - margin-top: 9.38rpx; -} -.page.data-v-7d0f2622 { - background-color: #f5f5dc; - width: 100%; - overflow-y: auto; - overflow-x: hidden; - height: 100vh; - overflow: hidden; -} -.section.data-v-7d0f2622 { - padding: 22.5rpx 39.28rpx 16.88rpx; - background-color: #f7de98; -} -.pos_8.data-v-7d0f2622 { - position: absolute; - left: 0; - right: 0; - top: 0; -} -.text.data-v-7d0f2622 { - color: #c1651a; - font-size: 37.5rpx; - font-family: STFangsong; - line-height: 36.19rpx; -} -.section_2.data-v-7d0f2622 { - padding: 5.63rpx 15rpx 8.44rpx; - background-color: #ffffff; - border-radius: 28.13rpx; - height: 63.75rpx; - width: 500.69rpx; -} -.image.data-v-7d0f2622 { - width: 50.63rpx; - height: 50.63rpx; -} -.text-wrapper.data-v-7d0f2622 { - margin-right: 17.42rpx; -} -.font.data-v-7d0f2622 { - font-size: 26.25rpx; - font-family: STFangsong; - line-height: 18rpx; - color: #ff0000; -} -.image-wrapper.data-v-7d0f2622 { - background-color: #ffffff; - border-radius: 28.13rpx; - overflow: hidden; - border: solid 9.38rpx #ffffff; -} -.pos_1.data-v-7d0f2622 { - position: absolute; - left: 22.5rpx; - right: 24.38rpx; - top: 118.13rpx; -} -.image_2.data-v-7d0f2622 { - width: 91.25vw; - height: 37.5vw; -} -.group.data-v-7d0f2622 { - margin: auto; - width: 137.81rpx; -} -.list-item.data-v-7d0f2622 { - padding: 11.25rpx 0 9.94rpx; - background-color: #fffef8; - border-radius: 9.38rpx; -} -.list-item.data-v-7d0f2622:first-child { - margin-top: 0; -} -.image_3.data-v-7d0f2622 { - border-radius: 0rpx 9.38rpx 9.38rpx 0rpx; - width: 60rpx; - height: 60rpx; -} -.font_4.data-v-7d0f2622 { - font-size: 25rpx; - font-family: STFangsong; - line-height: 28.26rpx; - color: #c1651a; -} -.section_4.data-v-7d0f2622 { - padding-bottom: 879.38rpx; - background-color: #f8e8c1; - border-radius: 0rpx 18.75rpx 0rpx 0rpx; - width: 600.13rpx; -} -.pos_4.data-v-7d0f2622 { - position: absolute; - right: 0; - top: 440.63rpx; -} -.section_5.data-v-7d0f2622 { - padding: 18.06rpx 16.24rpx 14.94rpx; - background-color: #fffef8; - border-radius: 0rpx 18.75rpx 0rpx 0rpx; - width: 598.13rpx; -} -.font_2.data-v-7d0f2622 { - font-size: 30rpx; - font-family: STFangsong; - line-height: 28.26rpx; - color: #000000; -} -.font_3.data-v-7d0f2622 { - font-size: 22.5rpx; - font-family: STFangsong; - line-height: 21.56rpx; - color: #727272; -} -.text_3.data-v-7d0f2622 { - line-height: 21.15rpx; -} -.pos_5.data-v-7d0f2622 { - position: absolute; - top: 120rpx; - width: 95%; - margin: 2.5%; -} -.section_9.data-v-7d0f2622 { - padding: 20.63rpx 22.88rpx 22.5rpx; - background-color: #fffef8; - border-radius: 9.38rpx; - right: 13.13rpx; -} -.list-item_2.data-v-7d0f2622:first-child { - margin-top: 0; -} -.image_4.data-v-7d0f2622 { - border-radius: 9.38rpx; - width: 131.25rpx; - height: 131.25rpx; -} -.group_3.data-v-7d0f2622 { - margin-left: 24.84rpx; -} -.text_5.data-v-7d0f2622 { - line-height: 28.65rpx; -} -.image_5.data-v-7d0f2622 { - margin: 75rpx 5.63rpx 0 107.96rpx; - border-radius: 9.38rpx; - width: 56.25rpx; - height: 56.25rpx; + margin-bottom: 10px; } \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/project.config.json b/unpackage/dist/dev/mp-weixin/project.config.json index bc80aed..2e375c5 100644 --- a/unpackage/dist/dev/mp-weixin/project.config.json +++ b/unpackage/dist/dev/mp-weixin/project.config.json @@ -18,7 +18,11 @@ } }, "compileType": "miniprogram", +<<<<<<< HEAD "libVersion": "3.6.0", +======= + "libVersion": "3.6.2", +>>>>>>> 0584de58dc4182dc4f7032910db8372d1de43d10 "appid": "wx3f968a09e31d6bed", "projectname": "FeiYi", "condition": { diff --git a/unpackage/dist/dev/mp-weixin/project.private.config.json b/unpackage/dist/dev/mp-weixin/project.private.config.json index 67e4fac..2633c30 100644 --- a/unpackage/dist/dev/mp-weixin/project.private.config.json +++ b/unpackage/dist/dev/mp-weixin/project.private.config.json @@ -7,6 +7,13 @@ "condition": { "miniprogram": { "list": [ + { + "name": "pages/mine/mineorders/mineorders", + "pathName": "pages/mine/mineorders/mineorders", + "query": "", + "launchMode": "default", + "scene": null + }, { "name": "pages/mine/mineorders/mineorders", "pathName": "pages/mine/mineorders/mineorders",