diff --git a/common/request.api.js b/common/request.api.js index 664adab..b8279dd 100644 --- a/common/request.api.js +++ b/common/request.api.js @@ -69,7 +69,8 @@ export default { getAllGiftBag: (params = {}) => request.get("/lpkgoods/getAllGiftBag", params), // 結算商品 createOrder: (params = {}) => request.post("/empsreservoorder/createOrder", params), - + // 预约记录 + orderListByUserSid: (params = {}) => request.post("/lpksreservoorder/orderListByUserSid", params, {}, {}, true), // 我的 // 获取头像 昵称 @@ -92,7 +93,8 @@ export default { getRealInfo: (params = {}) => request.get("/lpkcustomer/getRealInfo/" + params, params, {}, {}, true), // 保存实名 saveRealInfo: (params = {}) => request.post("/lpkcustomer/saveRealInfo", params), - + // 我的 预约记录 + myOrderListByUserSid: (params = {}) => request.post("/lpksreservoorders/orderListByUserSid", params, {}, {}, true), // 2024-1-15 新需求 // 获取分类和品牌 @@ -110,6 +112,8 @@ export default { // 结算 跳过支付 saveGoods: (params = {}) => request.post("/vegetablecellar/saveGoods", params), + // 我的菜窖 新人礼包列表 + newUserQuota: (params = {}) => request.post("/appletgiftbag/newUserQuota", params), // 我的菜窖 类型列表 vegeCellarTypeList: (params = {}) => request.post("/lpkgoods/vegeCellarTypeList", params), // 我的菜窖 商品列表 diff --git a/pages.json b/pages.json index 3d56eeb..1af8e5a 100644 --- a/pages.json +++ b/pages.json @@ -290,6 +290,22 @@ "style": { "navigationStyle": "custom" } + }, + { + "path" : "pages/records/reservationRecords", + "style" : + { + "navigationBarTitleText" : "预约记录", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/records/reservationRecords2", + "style" : + { + "navigationBarTitleText" : "预约记录", + "enablePullDownRefresh" : false + } } diff --git a/pages/home/cloudCard2.vue b/pages/home/cloudCard2.vue index 54c0ab1..96c96f5 100644 --- a/pages/home/cloudCard2.vue +++ b/pages/home/cloudCard2.vue @@ -168,6 +168,8 @@ + + { + _this.$api.getGoodsTypeAndBrand().then((resp) => { _this.data = resp console.log("======", resp); _this.baseDataSuccess = true @@ -350,35 +342,7 @@ }) }) }, - itemShow(item) { - item.showCart = true - console.log("item", item.showCart); - }, - itemShow2(item) { - - - if (item.goodsNumber == 0) { - this.shortToast('请添加商品。') - return - } - - var good = { - goodsSid: item.goodsSid, - goodsName: item.name, - goodsNumber: item.goodsNumber, - affiliation: this.brandType, - price: item.mefenPrice, - weight: item.weight, - customerSid: getApp().globalData.sid - } - console.log("itemShow2", good); - - let _this = this - _this.$api.addShoppingCart(good).then((resp) => { - item.showCart = false - console.log("item2", item.showCart); - }).catch(e => {}) - }, + jian(item) { const that = this console.log("item》》》》", item) @@ -428,14 +392,7 @@ } this.page.price = num - // if (this.brandType == '0') - // this.page.price1 = num - - // if (this.brandType == '1') - // this.page.price2 = num - - // if (this.brandType == '2') - // this.page.price3 = num + }, getweight() { @@ -448,26 +405,8 @@ this.page.weight = num - // if (this.brandType == '0') - // this.page.weight1 = num - - // if (this.brandType == '1') - // this.page.weight2 = num - - // if (this.brandType == '2') - // this.page.weight3 = num }, - // getcount() { - - // let num = 0; - // for (var i = 0; i < this.goods.length; i++) { - // num += Number(this.goods[i].goodsNumber); - // } - - // this.page.goodsNumber = num - // }, - upDateShoppCart(item) { var good = { goodsSid: item.goodsSid, diff --git a/pages/home/myCellar.vue b/pages/home/myCellar.vue index cf6d030..7cb26e6 100644 --- a/pages/home/myCellar.vue +++ b/pages/home/myCellar.vue @@ -11,40 +11,12 @@ - - - - + {{item.name}} {{item.count}} @@ -52,13 +24,13 @@ - + - - + @@ -127,10 +99,10 @@ + style="display: flex;flex-direction: column;justify-content: center;align-items: center;margin-top: 10vw;"> - + 您的菜窖为空,请 - - - + - 转赠亲友 - - - 共选 + + + 转赠亲友 + + + + 选中 {{page.count}} 份蔬菜 - 预约提菜 + + + + + + - - - - - - - - - - - 提菜点信息 + - - {{pickingUp.type}} - {{pickingUp.name}} - + + + + - - - + - - + + {{item.name}} 营业时间:{{pickingUp.date}} - - - - - + style="font-size: 14px;color: #101010;margin-left: 10px;">{{item.weight}}{{item.specificationUnit}} + ¥{{item.name}} {{pickingUp.address}} - + style="font-size: 14px;color: #999;text-decoration:line-through;margin-left: 10px;">¥{{item.mefenPrice}} + - - - 提菜人信息 - - - {{userInfo.type}} - {{userInfo.name}} - {{userInfo.phone}} - - - - - - - - 所提蔬菜列表 - - - + - + + 确认结算 + - - - + - {{item.name}} + - {{item.remark}} + + + + - - {{item.weight}}{{item.specificationUnit}}/{{item.unitName}} + 转赠蔬菜列表 - 百姓菜! - 精品菜! - 企业菜! + - + - + + - - 剩余: - {{item.goodsNumber}}{{item.unitName}} - + + {{item.name}} + {{item.remark}} - + + {{item.weight}}{{item.specificationUnit}}/{{item.unitName}} - - + 百姓菜! + 精品菜! + 企业菜! + - {{item.count}} - - + + + 剩余: + {{item.goodsNumber}}{{item.unitName}} + - + - + - + {{item.count}} + - - + + + - 确认提菜 - + + 转赠留言 + + + - - + + + + + @@ -345,9 +304,8 @@ return { notData: false, showModal: false, - scrollHeight: "", - scrollLeftTop: "0", - scrollRightTop: "0", + showModal2: false, + showModal3: false, brandType: "0", styleObject: { // 'position': 'fixed', @@ -383,10 +341,23 @@ }, pickingUpGoods: [ - ] + ], + baseDataSuccess: false, + newPerGiftList: [ + + ], + transferInfo: { + + } } }, + created() { + + console.log("==========", getApp().globalData.isNewUser); + // if (getApp().globalData.isNewUser=='1') + // this.showModal = true + }, onShow() { if (typeof this.$mp.page.getTabBar === 'function' && this.$mp.page.getTabBar()) { this.$mp.page.getTabBar().setData({ @@ -394,25 +365,34 @@ }) } - - this.request() - this.page.count=0 - }, - onHide() { - this.colseDialog() + + this.request() + this.page.count = 0 }, onLoad() { + this.shareSid = options.shareSid + console.log("shareSid>>>>", this.shareSid); let info = uni.getSystemInfoSync(); this.page.startHeight = info.windowWidth * 0.6 this.page.endHeight = info.windowWidth * 0.8 - + this.shareGift() }, methods: { + onKeyInput() { + this.transferInfo.remarks = event.target.value + }, + shareGift() { + + if (this.shareSid && getApp().globalData.isNewUser) { + + } + + }, labelClick(index, item) { this.selectIndex = index this.brandType = item.sid @@ -429,25 +409,35 @@ _this.$api.vegeCellarTypeList(params).then((resp) => { _this.data = resp - _this.selectIndex = 0 + + _this.baseDataSuccess = true _this.getgoods() - _this.scrollLeftTop = _this.scrollLeftTop == 0 ? -1 : 0 - _this.scrollRightTop = _this.scrollRightTop == 0 ? -1 : 0 - }).catch(e => {}) + }).catch(e => { + _this.$nextTick(() => { + _this.$refs.pageView.setLoadState(1) + }) + }) }, getgoods() { let _this = this var params = { customerSid: getApp().globalData.sid, - affiliation: this.brandType + affiliation: this.data[this.selectIndex].id } _this.$api.vegeCellarList(params).then((resp) => { _this.goods = resp _this.notData = resp.length == 0 - }).catch(e => {}) + _this.$nextTick(() => { + _this.$refs.pageView.setLoadState(2) + }) + }).catch(e => { + _this.$nextTick(() => { + _this.$refs.pageView.setLoadState(1) + }) + }) }, jian(item) { if (Number(item.count) > 0) { @@ -503,34 +493,109 @@ url: '/pages/home/cloudCard2', }) }, + + transfer() { + this.showModal3 = true + + }, reservation() { - if (this.pickingUpGoods.length > 0){ - + if (this.pickingUpGoods.length > 0) { + uni.navigateTo({ - url: '/pages/good/reservation?pickingUpGoods='+JSON.stringify(this.pickingUpGoods)+"&affiliation="+this.brandType, + url: '/pages/good/reservation?pickingUpGoods=' + JSON.stringify(this.pickingUpGoods) + + "&affiliation=" + this.brandType, }) - + // this.showModal = true - }else{ + } else { this.shortToast('请先选择商品') } - + }, colseDialog() { this.showModal = false + }, + showGift() { + let _this = this + + _this.$api.newUserQuota().then((resp) => { + console.log("--------", resp); + _this.newPerGiftList = resp + + _this.showModal = false + _this.showModal2 = true + }).catch(e => { + + }) + + }, + colseDialog() { + this.showModal = false + }, + colseDialog3() { + this.showModal3 = false + }, + onShareAppMessage: function(res) { + console.log("res", res) + console.log("data", res.target.dataset) + var data = res.target.dataset.info + + // // ① + // let shareData = JSON.stringify({ + // params: { + // code: data.code, + // codeKey: data.codeKey, + // customerSid: '' + // }, + // functionName: 'bindCard', + // url: '/pages/detail/detail_affeection?sid=' + data.sid + + // // url: '/pages/home/cloudCard2?shareSid=' + getApp().globalData.sid, + // // functionName: 'share' + // }) + // // 转码传输 + // let value = encodeURIComponent(shareData) + + // return { + // title: '汇融惠享-云菜窖', + // // ② + // path: '/pages/login/login?data=' + value, + // imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareAffeection.png', //自定义图片路径,显示图片长宽比是 5:4。 + // success: function(res) { + // console.log('aaaa', "分享成功") + // }, + // fail: function(res) { + // // 转发失败 + // console.log('aaaa', "用户点击了取消") + // } + // } + }, + + shareCard(sid) { + let _this = this + + _this.$api.shareEmpCard(sid).then((resp) => { + + var item = _this.data.empCardGiftVos.find(item => item.sid === sid) + + console.log("item", item); + + item.share = '2' + + }).catch(e => {}) } } } \ No newline at end of file diff --git a/pages/home/recordList2.vue b/pages/home/recordList2.vue index 42b05b8..9bf3381 100644 --- a/pages/home/recordList2.vue +++ b/pages/home/recordList2.vue @@ -193,12 +193,6 @@ } }, onShow() { - if (typeof this.$mp.page.getTabBar === 'function' && this.$mp.page.getTabBar()) { - this.$mp.page.getTabBar().setData({ - selected: 2 - }) - - } }, created() { // this.$bus.$on('order', msg => { diff --git a/pages/records/reservationRecords.vue b/pages/records/reservationRecords.vue new file mode 100644 index 0000000..99d3c25 --- /dev/null +++ b/pages/records/reservationRecords.vue @@ -0,0 +1,94 @@ + + + + + \ No newline at end of file diff --git a/pages/records/reservationRecords2.vue b/pages/records/reservationRecords2.vue new file mode 100644 index 0000000..56ea4cf --- /dev/null +++ b/pages/records/reservationRecords2.vue @@ -0,0 +1,94 @@ + + + + + \ No newline at end of file diff --git a/static/close.png b/static/close.png new file mode 100644 index 0000000..f24c1cb Binary files /dev/null and b/static/close.png differ