diff --git a/src/pages.json b/src/pages.json index 5304081..4544657 100644 --- a/src/pages.json +++ b/src/pages.json @@ -435,7 +435,19 @@ { "path": "pages/confirm_goods/confirm_goods", "style" : { - "navigationBarTitleText": "确定商品" + "navigationBarTitleText": "确认订单" + } + }, + { + "path": "pages/confirm_order/confirm_order", + "style" : { + "navigationBarTitleText": "确认订单" + } + }, + { + "path": "pages/pay_success/pay_success", + "style" : { + "navigationBarTitleText": "支付订单" } }, { diff --git a/src/static/images/icon/retail/paySuccess.png b/src/static/images/icon/retail/paySuccess.png new file mode 100644 index 0000000..74f1fcd Binary files /dev/null and b/src/static/images/icon/retail/paySuccess.png differ diff --git a/src/static/images/icon/retail/storeIcon.png b/src/static/images/icon/retail/storeIcon.png new file mode 100644 index 0000000..9a04f51 Binary files /dev/null and b/src/static/images/icon/retail/storeIcon.png differ diff --git a/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue b/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue index c14d94f..f6f3166 100644 --- a/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue +++ b/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue @@ -15,8 +15,7 @@ {{ item.erp_goods_name }} - {{ item.erp_goods_specs }} - 特价 + {{ `${item.erp_goods_specs}/${item.erp_goods_specs}/${item.erp_goods_specs}` }} @@ -169,10 +168,11 @@ flex-direction: row; padding-top: 30rpx; padding-bottom: 30rpx; + // border: 1px solid red; .item-left { - width: 172rpx; - height: 172rpx; + width: 180rpx; + height: 180rpx; margin-right: 20rpx; position: relative; border-radius: 10rpx; @@ -181,31 +181,6 @@ max-width: 100%; max-height: 100%; } - .item-left-empty { - width: 100%; - height: 100%; - position: absolute; - top: 0rpx; - left: 0rpx; - background-color: rgba(0,0,0,0.5); - border-radius: 10rpx; - - >view { - font-size: 28rpx; - color: #333333; - background: #FFFFFF; - width: 88rpx; - height: 88rpx; - border-radius: 50%; - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%,-50%); - display: flex; - justify-content: center; - align-items: center; - } - } } .item-right { display: flex; @@ -227,16 +202,6 @@ font-size: 24rpx; color: rgb(154,154,157); } - .item-right-special { - width: 58rpx; - height: 28rpx; - margin-bottom: 10rpx; - font-size: 20rpx; - color: #E60012; - background: rgba(230,0,18,0.13); - border-radius: 6px; - text-align: center; - } } .item-right-price-count { diff --git a/src/subpackage/retail/components/retail_pay_way/retail_pay_way.vue b/src/subpackage/retail/components/store_card_select/store_card_select.vue similarity index 53% rename from src/subpackage/retail/components/retail_pay_way/retail_pay_way.vue rename to src/subpackage/retail/components/store_card_select/store_card_select.vue index 4c3fb83..bf0e8e8 100644 --- a/src/subpackage/retail/components/retail_pay_way/retail_pay_way.vue +++ b/src/subpackage/retail/components/store_card_select/store_card_select.vue @@ -4,24 +4,15 @@ - {{ curChoose.name == "储值卡支付" ? "请选择储值卡" : "请选择支付方式" }} - - - - - {{ item.name }} - - - - - - + 请选择储值卡 + + - + 储值卡卡号:{{ item.card_no }} 微信昵称:{{ item.nickname }} 手机号码:{{ item.mobile }} @@ -51,16 +42,14 @@ data() { return { cardList: [], // 储值卡列表 - payWayList: [], // 支付方式列表 choosePath: "/static/images/icon/retail/choose.png", noChoosePath: "/static/images/icon/retail/noChoose.png", - curChoose: {}, curCardChoose: null, searchCardValue: "", } }, created() { - this.createPayWayList(); // 创建支付方式列表 + }, methods: { // 储值卡点击 @@ -126,16 +115,6 @@ // 重置数据 resetData() { - for (let i = 0; i < this.payWayList.length; ++i) { - this.payWayList[i].inputValue = ""; - - if (this.payWayList[i].name != "储值卡支付") { - this.payWayList[i].mark = this.noChoosePath; - } - } - - this.payWayList[0].mark = this.choosePath; - this.curChoose = this.payWayList[0]; this.curCardChoose = null; this.cardList = []; this.searchCardValue = ""; @@ -143,117 +122,20 @@ // 关闭窗口 onClose() { - this.resetData(); // 重置数据 + // this.resetData(); // 重置数据 this.$emit("update:onClose", false); }, // 支付确定 onConfirm() { - let info = { - type: 0, - inputValue: "default", - cardNo: "default" - }; - - switch (this.curChoose.name) { - case "微信支付": { - info.type = 0; - } break; - case "支付宝支付": { - info.type = 1; - } break; - case "现金支付": { - info.type = 3; - } break; - case "其他": { - if (!this.curChoose.inputValue) { - util.showNone("请输入其他支付方式!"); - return; - } - - info.type = 4; - info.inputValue = this.curChoose.inputValue; - } break; - case "储值卡支付": { - if (!this.curCardChoose) { - util.showNone("请搜索选择储值卡!"); - return; - } - - info.type = 2; - info.cardNo = this.curCardChoose.card_no; - } break; + if (!this.curCardChoose) { + util.showNone("请搜索选择储值卡!"); + return; } + this.$emit("update:onConfirm", this.curCardChoose); this.onClose(); - this.$emit("update:onConfirm", info); - }, - - // 支付方式点击 - onPayWayClick(item, index) { - this.curChoose = item; - - if (item.name != "储值卡支付") { - for (let i = 0; i < this.payWayList.length; ++i) { - if (this.payWayList[i].name != "储值卡支付") { - this.payWayList[i].mark = this.noChoosePath; - } - } - - this.payWayList[index].mark = this.choosePath; - } - else { - - } - }, - - // 创建支付方式列表 - createPayWayList() { - this.payWayList = [ - { - type: 0, name: "微信支付", inputShow: false, inputValue: "", - icon: "/static/images/icon/retail/wechat.png", - iconClassA: "win-way-item-icon", iconClassB: "", - placeholderLabel: "请输入其他支付方式", - mark: this.choosePath, - markClassA: "win-way-item-mark", markClassB: "", - }, - { - type: 1, name: "支付宝支付", inputShow: false, inputValue: "", - icon: "/static/images/icon/retail/alipay.png", - iconClassA: "win-way-item-icon", iconClassB: "", - placeholderLabel: "请输入其他支付方式", - mark: this.noChoosePath, - markClassA: "win-way-item-mark", markClassB: "", - }, - { - type: 3, name: "现金支付", inputShow: false, inputValue: "", - icon: "/static/images/icon/retail/cash.png", - iconClassA: "win-way-item-icon", iconClassB: "win-way-item-icon-dif", - placeholderLabel: "请输入其他支付方式", - mark: this.noChoosePath, - markClassA: "win-way-item-mark", markClassB: "", - }, - { - type: 2, name: "储值卡支付", inputShow: false, inputValue: "", - icon: "/static/images/icon/retail/card.png", - iconClassA: "win-way-item-icon", iconClassB: "win-way-item-icon-dif", - placeholderLabel: "请输入其他支付方式", - mark: "/static/images/icon/retail/turn.png", - markClassA: "win-way-item-mark", markClassB: "win-way-item-mark-dif", - }, - { - type: 4, name: "其他", inputShow: true, inputValue: "", - icon: "/static/images/icon/retail/other.png", - iconClassA: "win-way-item-icon", iconClassB: "", - placeholderLabel: "请输入其他支付方式", - mark: this.noChoosePath, - markClassA: "win-way-item-mark", markClassB: "", - }, - ]; - - this.curChoose = this.payWayList[0]; - }, + } } } @@ -302,84 +184,6 @@ margin-bottom: 54rpx; } - .win-way { - width: 100%; - display: flex; - flex-direction: column; - align-items: center; - position: relative; - - .win-way-item { - width: 100%; - display: flex; - flex-direction: row; - align-items: center; - padding-left: 40rpx; - padding-right: 36rpx; - padding-top: 28rpx; - padding-bottom: 28rpx; - position: relative; - - .win-way-item-icon { - width: 54rpx; - height: 54rpx; - flex-shrink: 0; - } - .win-way-item-mark { - width: 36rpx; - height: 36rpx; - flex-shrink: 0; - } - .win-way-item-icon-dif { - width: 52rpx; - height: 52rpx; - flex-shrink: 0; - } - .win-way-item-mark-dif { - width: 34rpx; - height: 34rpx; - flex-shrink: 0; - } - - > text { - color: rgba(24, 24, 24, 1); - font-size: 28rpx; - flex-grow: 1; - flex-shrink: 0; - margin-left: 16rpx; - margin-right: 16rpx; - } - - > view { - width: 90%; - height: 1rpx; - background-color: rgba(216, 216, 216, 1); - position: absolute; - bottom: 0%; - right: 0%; - } - - > input { - margin-left: 24rpx; - margin-right: 132rpx; - width: 340rpx; - border-radius: 10rpx; - border: 2rpx solid rgba(216, 216, 216, 1); - background-color: white; - padding-left: 16rpx; - padding-right: 16rpx; - padding-top: 10rpx; - padding-bottom: 10rpx; - font-size: 28rpx; - } - - .win-way-item-input-placeholder { - color: rgba(154, 154, 157, 1); - font-size: 28rpx; - } - } - } - .win-way-confirm { width: 100%; padding-left: 20rpx; @@ -465,7 +269,8 @@ display: flex; flex-direction: column; width: 100%; - border: 1rpx solid rgba(151, 151, 151, 1); + border: 1rpx solid #979797; + border-color: #979797; border-radius: 10rpx; padding: 20rpx; margin-bottom: 24rpx; diff --git a/src/subpackage/retail/pages/confirm_goods/confirm_goods.vue b/src/subpackage/retail/pages/confirm_goods/confirm_goods.vue index 23fbfc2..155cac1 100644 --- a/src/subpackage/retail/pages/confirm_goods/confirm_goods.vue +++ b/src/subpackage/retail/pages/confirm_goods/confirm_goods.vue @@ -2,25 +2,30 @@ - 商品名称 - 售价 - 数量 + + + {{ curStore.name ? curStore.name : '' }} + - - - - {{ item.erp_goods_name }} - {{ item.erp_goods_specs }} - - - - {{item.erp_goods_price}} - + + + + - - - {{ item.count }} - + + + {{ item.erp_goods_name }} + + {{ `${item.erp_goods_specs}/${item.erp_goods_specs}/${item.erp_goods_specs}` }} + x{{ item.count }} + + + + + + {{ item.erp_goods_price }} + + @@ -29,22 +34,15 @@ - 合计: + 实付款: {{ totalPrice }} - - + - - - @@ -52,28 +50,19 @@ import util from '../../../../utils/util.js'; import tools from '../../js/tools'; import retailServer from '../../js/retail_server'; - import retailApi from '../../js/retail_api'; - - import retailPayWay from '../../components/retail_pay_way/retail_pay_way.vue'; export default { components: { - 'retailPayWay': retailPayWay + }, data() { return { - isEdited: false, // 是否处于编辑模式 curStore: {}, // 当前店铺信息 cartListFinal: [], // 购物车最终列表数据 totalPrice: 0, // 最终价格 - cartConfirmText: "收款出库", // 收款出库 || 确认 cartListScroll: false, // 购物车列表是否能滚动 cartListFinalHeight: "0rpx", // 最终显示的列表高度 cartListFinalPaddingBottom: "0rpx", // 根据是否是异形屏来设置 - - retailPayWayWin: { - show: false, - }, } }, onLoad(option) { @@ -83,11 +72,9 @@ this.cartListFinal = []; for (let i = 0; i < data.cartListFinal.length; ++i) { this.cartListFinal.push(tools.getNewObj(data.cartListFinal[i])); - this.cartListFinal[i]["borderBottom"] = "1rpx solid rgb(216,216,216)"; } // 最后一项默认不显示边框 - this.cartListFinal[this.cartListFinal.length - 1]["borderBottom"] = "0rpx solid rgb(216,216,216)"; this.fixMainHeight(); // 适配主内容高度 this.calcTotalPrice(); // 计算总价 @@ -95,153 +82,19 @@ setTimeout(util.hideLoad, 1000); }, methods: { - // 显示隐藏支付方式弹窗 - showOrHidePayWay(status) { - this.retailPayWayWin.show = status; - }, - - // 重新编辑 - cartReedit() { - this.isEdited = true; - this.cartConfirmText = "确认"; - }, - - // 商品出库 - goodsRetail(info) { - let _this = this; - let data = []; - for (let i = 0; i < this.cartListFinal.length; ++i) { - if (this.cartListFinal[i].count) { - data.push({ - id: this.cartListFinal[i].id, - name: this.cartListFinal[i].erp_goods_name, - price: this.cartListFinal[i].erp_goods_price, - nums: this.cartListFinal[i].count, - unit: this.cartListFinal[i].erp_goods_unit, - }); - } - } - - if (!data.length) { - util.showNone("暂无商品数量!"); - return; - } - - let newData = { - store_id: _this.curStore.id, - goods_data: data, - pay_type: info.type, + // 提交订单 + cartConfirm() { + let data = { + cartListFinal: this.cartListFinal, + curStore: this.curStore }; - if (info.inputValue) { - newData["other_pay_type"] = info.inputValue; - } - if (info.cardNo) { - newData["card_no"] = info.cardNo; - } - - util.showLoad(); - retailServer.post({ - url: retailApi.assistantRetail, - data: newData, - isDefaultGet: false, - failMsg: '出库失败!' - }).then(res => { - if (res.data.code == 0) { - uni.setStorage({ - key: "retailStatus", - data: "true", - success: function() { - util.hideLoad(); - uni.navigateBack({ - delta: 1 - });; - }, - fail: function(err) { - util.hideLoad(); - uni.navigateBack({ - delta: 1 - }); - }, - }); - } - else { - util.showNone(res.data.message || '操作失败!'); - } + uni.navigateTo({ + url: `/subpackage/retail/pages/confirm_order/confirm_order?data=${encodeURIComponent(JSON.stringify(data))}` }); - }, - - // 确认 || 收款出库 - cartConfirm() { - if (this.cartConfirmText == "确认") { - this.isEdited = false; - this.cartConfirmText = "收款出库"; - return; - } - - let mark = false; - for (let i = 0; i < this.cartListFinal.length; ++i) { - if (this.cartListFinal[i].count) { - mark = true; - break; - } - } - - if (!mark) { - util.showNone("暂无商品数量!"); - return; - } - - this.showOrHidePayWay(true); // 弹出支付方式选择框 + // this.showOrHidePayWay(true); // 弹出支付方式选择框 // this.goodsRetail(); // 商品出库 }, - // 购物车输入确认 - cartInputConfirm(event, id) { - // 修改购物车列表对应的价格 - let value = parseFloat(event.detail.value ? event.detail.value : 0).toFixed(2); - for (let i = 0; i < this.cartListFinal.length; ++i) { - if (this.cartListFinal[i].id == id) { - this.cartListFinal[i].erp_goods_price = value; - } - } - - this.calcTotalPrice(); // 计算总价 - }, - - // 购物车列表数量选项触发 - cartCountClick(type, id) { - // 找点击的对应商品 - let item = null; - for (let i = 0; i < this.cartListFinal.length; ++i) { - if (this.cartListFinal[i].id == id) { - item = this.cartListFinal[i]; - break; - } - } - - if (item) { - switch (type) { - case "add": { - // 判断库存 - if (item.count + 1 > item.stock_num) { - util.showNone("库存就这么多了!"); - return; - } - item.count += 1; - } break; - case "sub": { - if (item.count <= 0) { - return; - } - - item.count -= 1; - } break; - } - - this.calcTotalPrice(); // 计算总价 - } - }, - // 计算总价 calcTotalPrice() { let price = 0.0; @@ -264,12 +117,13 @@ // // 看看当前滚动框是否超出这个高度 let query = uni.createSelectorQuery().select(".cg-footer"); query.boundingClientRect(data => { - sumHeight = sumHeight - data.height - uni.upx2px(90); // 可用高度减去footer 再减去顶部标题项 + sumHeight = sumHeight - data.height - uni.upx2px(100); // 可用高度减去footer 再减去顶部标题项 let contentHeight = sumHeight; query = uni.createSelectorQuery().select(".final-cart-list-dialog-content-for"); query.boundingClientRect(data => { - let itemSize = (data.height + uni.upx2px(30)); // 30是margin + // let itemSize = (data.height + uni.upx2px(30)); // 30是margin + let itemSize = data.height; let limitCount = Math.floor(contentHeight / itemSize); let height = _this.cartListFinal.length >= limitCount ? contentHeight : _this.cartListFinal.length * itemSize; @@ -314,30 +168,26 @@ background-color: rgb(237,237,245); .final-cart-list-dialog-title { - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; width: 100%; - height: 90rpx; - text-align: center; - padding-left: 34rpx; - padding-right: 36rpx; + height: 100rpx; background-color: rgb(255,255,255); + padding-left: 24rpx; + padding-right: 24rpx; + color: rgba(51, 51, 51, 1); - >view { - font-size: 32rpx; - color: rgb(51,51,51); + .icon-line { + display: flex; + flex-direction: row; + align-items: center; + width: 100%; + height: 100%; + border-bottom: 1rpx solid rgba(216, 216, 216, 0.3); + font-weight: bold; - &:first-child { - width: 258rpx; - - } - &:nth-child(2) { - width: 166rpx; - } - &:nth-child(3) { - width: 126rpx; + >image { + width: 32rpx; + height: 30rpx; + margin-right: 12rpx; } } } @@ -349,101 +199,79 @@ align-items: flex-start; // flex-grow: 1; // height: 428rpx; - padding-left: 34rpx; - padding-right: 36rpx; + padding-left: 24rpx; + padding-right: 24rpx; background-color: rgb(255,255,255); // padding-bottom: 0rpx; // padding-bottom: calc( 0rpx + constant(safe-area-inset-bottom)); /* 兼容 iOS < 11.2 */ // padding-bottom: calc( 0rpx + env(safe-area-inset-bottom)); /* 兼容 iOS >= 11.2 */ - .final-cart-list-dialog-content-for { + .main-right-list { display: flex; flex-direction: row; - justify-content: space-between; - align-items: flex-start; - // flex-grow: 1; - height: 114rpx; - border-bottom: 1rpx solid rgb(216,216,216); - background-color: rgb(255,255,255); - margin-top: 30rpx; + padding-top: 23rpx; + padding-bottom: 23rpx; + // border: 1px solid red; - .final-cart-list-dialog-content-col1 { - // display: flex; + .item-left { + width: 140rpx; + height: 140rpx; + margin-right: 20rpx; + position: relative; + border-radius: 10rpx; + + >image { + max-width: 100%; + max-height: 100%; + } + } + .item-right { + display: flex; flex-direction: column; - justify-content: flex-start; - align-items: center; - width: 258rpx; + justify-content: space-between; + flex-grow: 1; - >view { - overflow: hidden; - word-break: nowrap; - text-overflow: ellipsis; /* 超出部分省略号 */ - display: -webkit-box; /** 对象作为伸缩盒子模型显示 **/ - -webkit-box-orient: vertical; /** 设置或检索伸缩盒对象的子元素的排列方式 **/ - -webkit-line-clamp: 1; /** 显示的行数 **/ + .item-right-top { + display: flex; + flex-direction: column; - &:first-child { + .item-right-name { font-size: 28rpx; - color: rgb(51,51,51); - margin-bottom: 8rpx; } - &:nth-child(2) { + .item-right-spec { + margin-top: 8rpx; + margin-bottom: 14rpx; font-size: 24rpx; color: rgb(154,154,157); + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; } } - } - - .final-cart-list-dialog-content-col2 { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - color: rgb(51,51,51); - font-size: 28rpx; - text-align: center; - width: 166rpx; - >input { - width: 132rpx; - height: 48rpx; - border: 2rpx solid rgb(216,216,216); - border-radius: 4rpx; - } - >view { - &:first-child { - - } - &:nth-child(2) { - margin-left: 6rpx; - } - } - } - - .final-cart-list-dialog-content-col3 { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - width: 126rpx; - - >image { - width: 36rpx; - height: 36rpx; + .item-right-price-count { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; - &:first-child { - - } - &:nth-child(3) { + .item-right-price-row { + color: rgb(255,135,61); + >view { + &:first-child { + font-size: 32rpx; + line-height: 32rpx; + + >text { + font-size: 24rpx; + line-height: 24rpx; + } + } + } } } - >view { - margin-left: 12rpx; - margin-right: 12rpx; - color: rgb(51,51,51); - font-size: 28rpx; - } } } } @@ -451,9 +279,7 @@ .cg-footer { display: flex; - flex-direction: column; - justify-content: center; - align-items: flex-start; + flex-direction: row; // flex-grow: 1; // opacity: 0.3; @@ -464,37 +290,38 @@ // padding-bottom: calc( 0rpx + constant(safe-area-inset-bottom)); /* 兼容 iOS < 11.2 */ // padding-bottom: calc( 0rpx + env(safe-area-inset-bottom)); /* 兼容 iOS >= 11.2 */ width: 100%; - height: 188rpx; + // height: 188rpx; + height: 108rpx; // border: 1rpx solid blue; background-color: rgb(255,255,255); >view { display: flex; - flex-direction: column; - // justify-content: flex-end; - align-items: flex-start; + flex-direction: row; + justify-content: space-between; + align-items: center; width: 100%; height: 100%; .cg-footer-price { display: flex; flex-direction: row; - justify-content: flex-end; align-items: center; height: 88rpx; width: 100%; - padding-right: 40rpx; + padding-left: 28rpx; >view { &:first-child { - font-size: 24rpx; + font-size: 28rpx; + color: rgba(51, 51, 51, 1); } &:nth-child(2) { color: rgb(255,135,61); - font-size: 32rpx; + font-size: 36rpx; >text { - font-size: 24rpx; + font-size: 28rpx; } } } @@ -506,7 +333,7 @@ justify-content: flex-end; align-items: center; height: 88rpx; - width: 100%; + // width: 100%; padding-right: 24rpx; font-size: 32rpx; @@ -517,23 +344,9 @@ align-items: center; } - .cg-footer-btn-reedit { - >button { - width: 242rpx; - height: 88rpx; - line-height: 88rpx; - border-radius: 44rpx; - padding: 0 0; - color: rgb(0,152,116); - background-color: rgb(255,255,255); - border: 2rpx solid rgb(0,152,116); - margin-right: 20rpx; - } - } - .cg-footer-btn-confirm { >button { - width: 242rpx; + width: 240rpx; height: 88rpx; line-height: 88rpx; border-radius: 44rpx; diff --git a/src/subpackage/retail/pages/confirm_order/confirm_order.vue b/src/subpackage/retail/pages/confirm_order/confirm_order.vue new file mode 100644 index 0000000..f0c5674 --- /dev/null +++ b/src/subpackage/retail/pages/confirm_order/confirm_order.vue @@ -0,0 +1,569 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/retail/pages/index/index.vue b/src/subpackage/retail/pages/index/index.vue index be26f59..d538f6c 100644 --- a/src/subpackage/retail/pages/index/index.vue +++ b/src/subpackage/retail/pages/index/index.vue @@ -44,7 +44,7 @@ {{ item.erp_goods_name }} - {{ item.erp_goods_specs }} + {{ `${item.erp_goods_specs}/${item.erp_goods_specs}/${item.erp_goods_specs}` }} 特价 @@ -140,6 +140,11 @@ export default { this.getSearchLocal(); // 获取本地的搜索记录 this.getRetailStatus(); // 获取收款出库状态 }, + watch: { + cartList() { + this.setCartConfirmStyle(); + }, + }, methods: { // 获取收款出库状态 getRetailStatus() { @@ -288,7 +293,15 @@ export default { // 清空购物车 clearCart() { - + this.cartList = []; + for (let i = 0; i < this.goodsInfo.length; ++i) { + for (let j = 0; j < this.goodsInfo[i].goods_list.length; ++j) { + this.goodsInfo[i].goods_list[j].count = 0; + } + } + this.isShowCartList = false; + this.calcCartTotalPriceAndCount(); // 计算购物车总价跟总量 + this.calcTotalPriceAndCount(); // 计算总价跟总量 }, // 购物车列表数量选项触发 @@ -335,10 +348,13 @@ export default { if (this.cartList[i].count <= 0) { this.cartList.splice(i, 1); } + // 列表没了,隐藏 + if (!this.cartList.length) { + this.isShowCartList = false; + } this.calcCartTotalPriceAndCount(); // 计算购物车总价跟总量 this.calcTotalPriceAndCount(); // 计算总价跟总量 - this.setCartConfirmStyle(); }, // 获取购物车列表的最终数据 @@ -396,8 +412,6 @@ export default { for (let i = 0; i < tempData.length; ++i) { this.cartList.push(tools.getNewObj(tempData[i])); } - - this.setCartConfirmStyle(); }, setCartConfirmStyle() { @@ -406,6 +420,10 @@ export default { // 购物车点击 cartClick() { + if (!this.cartList.length) { + return; + } + if (this.isShowCartList) { this.isShowCartList = false; } diff --git a/src/subpackage/retail/pages/pay_success/pay_success.vue b/src/subpackage/retail/pages/pay_success/pay_success.vue new file mode 100644 index 0000000..98bffd3 --- /dev/null +++ b/src/subpackage/retail/pages/pay_success/pay_success.vue @@ -0,0 +1,77 @@ + + + + +