diff --git a/src/components/order/confirm-price.vue b/src/components/order/confirm-price.vue new file mode 100644 index 0000000..61c3995 --- /dev/null +++ b/src/components/order/confirm-price.vue @@ -0,0 +1,121 @@ + + + + + \ No newline at end of file diff --git a/src/components/widgets/modal.vue b/src/components/widgets/modal.vue index 1bd81e6..6c5383d 100644 --- a/src/components/widgets/modal.vue +++ b/src/components/widgets/modal.vue @@ -1,5 +1,5 @@ @@ -77,13 +56,13 @@ import AppLayout from "@/components/layout/layout"; import OrderItem from "@/components/order/item"; import OrderAction from "@/components/order/action"; import LoadMore from "@/components/widgets/loadmore"; -import WidgetModal from "@/components/widgets/modal"; +import OrderConfirmPrice from "@/components/order/confirm-price"; export default { name: "get-index", data() { return { utils: this.$utils, - priceModal: false, + showModal: false, safePt: 0, tabIndex: 0, tabHeight: 0, @@ -164,10 +143,7 @@ export default { list: [], }, ], - currentOrder: { - id: 0, - price: 0, - }, + currentId: 0, keywords: "", }; }, @@ -176,7 +152,7 @@ export default { OrderItem, OrderAction, LoadMore, - WidgetModal, + OrderConfirmPrice, }, onLoad() { this.$nextTick(() => { @@ -211,12 +187,11 @@ export default { }); }, showPriceModal(id) { - this.currentOrder.id = id; - this.priceModal = true; + this.$store.commit("order/setConfirmId", id); + this.showModal = true; }, - setPrice() { - console.log(this.currentOrder); - this.priceModal = false; + toDetail(id) { + this.$utils.toPage("/pages/order/detail?id=" + id); }, }, }; @@ -309,56 +284,4 @@ export default { padding: 20rpx 0; } } -.modal-content { - width: 100%; - .input-row { - width: 100%; - display: flex; - align-items: center; - justify-content: space-between; - padding: 40rpx 0; - border-bottom: 4rpx solid #f5f5f5; - .title { - font-size: 28rpx; - color: #666666; - } - .input { - width: 308rpx; - height: 72rpx; - box-sizing: border-box; - border: 1px solid #d8d8d8; - text-align: center; - } - .unit { - color: #333333; - } - .iconfont { - display: inline-block; - font-size: 30rpx; - margin-right: 22rpx; - } - .text { - font-size: 28rpx; - } - } - .desc { - padding: 24rpx 0; - .text { - display: block; - font-size: 24rpx; - color: #999999; - line-height: 36rpx; - } - } - .btn { - width: 100%; - height: 68rpx; - line-height: 68rpx; - text-align: center; - font-size: 32rpx; - color: #ffffff; - background-color: #7286f1; - margin-top: 15rpx; - } -} \ No newline at end of file diff --git a/src/static/temp/cate/1.png b/src/static/temp/cate/1.png new file mode 100644 index 0000000..8c1fe50 Binary files /dev/null and b/src/static/temp/cate/1.png differ diff --git a/src/store/index.js b/src/store/index.js index c00c554..c222601 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -3,11 +3,13 @@ import Vuex from 'vuex' import user from "@/store/modules/user" import system from "@/store/modules/system" +import order from "@/store/modules/order" Vue.use(Vuex) export default new Vuex.Store({ modules: { user, system, + order } }) diff --git a/src/store/modules/order.js b/src/store/modules/order.js new file mode 100644 index 0000000..97996a7 --- /dev/null +++ b/src/store/modules/order.js @@ -0,0 +1,17 @@ +export default { + namespaced: true, + state: { + confirmId: 0, + }, + getters: { + getConfirmId(state) { + return state.confirmId; + } + }, + mutations: { + setConfirmId(state, data) { + state.confirmId = data; + } + }, + actions: {} +}