diff --git a/common/request.api.js b/common/request.api.js index 3e8efbf..8764876 100644 --- a/common/request.api.js +++ b/common/request.api.js @@ -105,9 +105,18 @@ export default { addShoppingCart: (params = {}) => request.post("/shoppingcart/addShoppingCart", params), // 购物车列表 shoppingCartList: (params = {}) => request.post("/shoppingcart/shoppingCartList", params, {}, {}, true), + // 结算 跳过支付 + saveGoods: (params = {}) => request.post("/vegetablecellar/saveGoods", params), // 我的菜窖 类型列表 vegeCellarTypeList: (params = {}) => request.post("/lpkgoods/vegeCellarTypeList", params), // 我的菜窖 商品列表 vegeCellarList: (params = {}) => request.post("/lpkgoods/vegeCellarList", params), + // 我的菜窖 预约提菜 + getStoreBySid: (params = {}) => request.get("/customerstore/getStoreBySid/" + params, params), + // 我的菜窖 预约提菜 选择时间范围 + getExtractSaturAndSun: (params = {}) => request.get("/customerstore/isSaturAndSun", params), + // 我的菜窖 保存预约提菜 + submissionExtract: (params = {}) => request.post("/lpksreservoorders/submission", params), + } \ No newline at end of file diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js index 7cbe4d5..cbe8257 100644 --- a/custom-tab-bar/index.js +++ b/custom-tab-bar/index.js @@ -40,7 +40,7 @@ Component({ { "pagePath": "/pages/home/myHome", - "text": "我的", + "text": "记录查询", "iconPath": "/static/bomicon/bom_NotMy.png", "selectedIconPath": "/static/bomicon/bom_my.png" } diff --git a/pages.json b/pages.json index d92508f..3d56eeb 100644 --- a/pages.json +++ b/pages.json @@ -278,8 +278,21 @@ "navigationStyle": "custom", "disableScroll": true } + }, + { + "path": "pages/good/reservation", + "style": { + "navigationStyle": "custom" + } + }, + { + "path": "pages/good/changePersonnel", + "style": { + "navigationStyle": "custom" + } } + ], "globalStyle": { "navigationBarTextStyle": "white", diff --git a/pages/good/changePersonnel.vue b/pages/good/changePersonnel.vue new file mode 100644 index 0000000..9965222 --- /dev/null +++ b/pages/good/changePersonnel.vue @@ -0,0 +1,71 @@ + + + + + \ No newline at end of file diff --git a/pages/good/reservation.vue b/pages/good/reservation.vue new file mode 100644 index 0000000..846d7a9 --- /dev/null +++ b/pages/good/reservation.vue @@ -0,0 +1,292 @@ + + + + + \ No newline at end of file diff --git a/pages/home/cloudCard2.vue b/pages/home/cloudCard2.vue index 8c6596d..30815a5 100644 --- a/pages/home/cloudCard2.vue +++ b/pages/home/cloudCard2.vue @@ -7,6 +7,15 @@ + + @@ -99,8 +108,9 @@ - + {{item.name}} @@ -219,8 +229,17 @@ + + + + + + + @@ -229,6 +248,10 @@ export default { data() { return { + dialogContent: "这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容这里是协议内容,这里是协议内容", + confirmText: "我知道了(5s)", + dialogBeforeClose: false, + countdown: 5, scrollHeight: "", scrollLeftTop: "0", scrollRightTop: "0", @@ -283,7 +306,7 @@ } this.getAllPriceOrWeight() - this.getgoods() + this.getgoods() }, onLoad() { @@ -294,7 +317,7 @@ this.page.endHeight = info.windowWidth * 0.8 this.request() - + // this.getallPrice() // this.getweight() // this.getcount() @@ -517,10 +540,10 @@ settlement() { // 支付 - // if (this.page.weight < 200) { - // this.shortToast('满200斤才可定制云菜窖哦,请继续选菜吧。') - // return - // } + if (this.page.weight < 20) { + this.shortToast('满200斤才可定制云菜窖哦,请继续选菜吧。') + return + } let list = [] @@ -544,19 +567,78 @@ return } + this.showPop() + + // console.log("params", params); + + // let _this = this + // _this.$api.createOrder(params).then((resp) => { + + // // console.log("resp", resp); + // this.$pay(resp) + // }).catch(e => {}) + + }, + showPop() { + + this.$refs.inputDialog.open() + + let timeOut = setInterval(() => { + + if (this.countdown == 1) { + this.confirmText = "确定" + this.countdown = 5 + this.dialogBeforeClose = false + clearInterval(timeOut) + + } else { + this.dialogBeforeClose = true + this.countdown = this.countdown - 1; + this.confirmText = "我知道了" + "(" + this.countdown + "s)" + } + }, 1000) + }, + + dialogInputConfirm(val) { + if (this.confirmText == "确定") { + this.confirmText = "我知道了(5s)", + this.dialogBeforeClose = true, + this.countdown = 5 + this.saveGoods() + } + + }, + + saveGoods() { + + let list = [] + + for (var i = 0; i < this.goods.length; i++) { + var item = this.goods[i] + if (item.goodsNumber > 0) + list.push({ + goodsSid: item.goodsSid, + goodsNumber: item.goodsNumber, + }) + } + // console.log("ddd", list); + + if (list.length == 0) { + this.shortToast('请添加商品') + return + } + var params = { customerSid: getApp().globalData.sid, - cardNumber: 1, - totalTee: this.page.price, - ordOrderDetailsVoList: list + affiliation: this.brandType, + vos: list } // console.log("params", params); let _this = this - _this.$api.createOrder(params).then((resp) => { + _this.$api.saveGoods(params).then((resp) => { - // console.log("resp", resp); - this.$pay(resp) + _this.request() }).catch(e => {}) }, diff --git a/pages/home/myCellar.vue b/pages/home/myCellar.vue index e18f452..bc2eeb4 100644 --- a/pages/home/myCellar.vue +++ b/pages/home/myCellar.vue @@ -135,7 +135,7 @@ style="display: flex;flex-direction: column;justify-content: center;align-items: center;"> + mode="aspectFit" style="width: 50vw;height: 50vw;"> 您的菜窖为空,请 0){ - this.showModal = true + + uni.navigateTo({ + url: '/pages/good/reservation?pickingUpGoods='+JSON.stringify(this.pickingUpGoods)+"&affiliation="+this.brandType, + }) + + // this.showModal = true }else{ this.shortToast('请先选择商品') } @@ -561,6 +569,7 @@ opacity: 0.5; top: 0; left: 0; + bottom: 65; } .modalDlg { @@ -571,8 +580,8 @@ top: 50vw; left: 0; right: 0; - bottom: 0; z-index: 9999; + opacity:1; background-color: #fff; border-top-right-radius: 20px; border-top-left-radius: 20px; diff --git a/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue b/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue index 57e3fed..f87152f 100644 --- a/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue +++ b/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue @@ -13,7 +13,7 @@ - + {{closeText}} @@ -21,6 +21,13 @@ {{okText}} + + + + + {{okText}} + + @@ -96,17 +103,22 @@ confirmText:{ type: String, default: '' - } + }, + showConfirm: { + type: Boolean, + default: false + }, }, data() { return { - dialogType: 'error', + dialogType: 'warn', focus: false, val: "" } }, computed: { okText() { + console.log('confirmText',this.confirmText); return this.confirmText || t("uni-popup.ok") }, closeText() {