diff --git a/common/request.api.js b/common/request.api.js index f96568a..01cc9ee 100644 --- a/common/request.api.js +++ b/common/request.api.js @@ -85,7 +85,7 @@ export default { // 获取默认提菜信息 getStoreBySid: (params = {}) => request.get("/customerstore/getStoreBySid/" + params, params), // 推荐有礼 - myRecommend: (params = {}) => request.get("/appletgiftbag/recommendRecord/" + params, params), + myRecommend: (params = {}) => request.get("/newcomerrecorecord/recordList/" + params, params), // 基本信息修改头像 headerUpload: config.baseUrl + '/lpkcustomer/modifyHeadImage', // 修改昵称 @@ -115,6 +115,8 @@ export default { // 2024-1-15 新需求 + // 获取轮播图 + bannerList: (params = {}) => request.get("/wxapi/banner/list", params), // 获取分类和品牌 getGoodsTypeAndBrand: (params = {}) => request.get("/lpkgoods/getGoodsTypeAndBrand", {}, {}, {}, true), // 获取补充菜窖 商品分类列表 @@ -133,6 +135,8 @@ export default { createVegeOrder: (params = {}) => request.post("/empsreservoorder/createVegeOrder", params), + // 我的菜窖 通知公告 + getNotices: (params = {}) => request.get("/appletnotice/getNotice", params), // 我的菜窖 新人礼包列表 newUserQuota: (params = {}) => request.post("/appletgiftbag/newUserQuota", params), // 结算新人礼包 支付 diff --git a/pages.json b/pages.json index 3d13284..89da860 100644 --- a/pages.json +++ b/pages.json @@ -1,5 +1,7 @@ { "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + + { "path": "pages/login/login", "style": { @@ -240,6 +242,7 @@ "backgroundColor": "#F8F8F8" } }, + { "path": "uni_modules/common-pay/pages/success/success", "style": { @@ -247,6 +250,7 @@ "backgroundColor": "#F8F8F8" } }, + { "path": "pages/home/myHome", "style": { @@ -293,62 +297,73 @@ } }, { - "path" : "pages/records/reservationRecords", - "style" : - { - "navigationBarTitleText" : "预约记录", - "enablePullDownRefresh" : false + "path": "pages/records/reservationRecords", + "style": { + "navigationBarTitleText": "预约记录", + "enablePullDownRefresh": false } }, { - "path" : "pages/records/transferRecords", - "style" : - { - "navigationBarTitleText" : "转赠记录", - "enablePullDownRefresh" : false + "path": "pages/records/transferRecords", + "style": { + "navigationBarTitleText": "转赠记录", + "enablePullDownRefresh": false } }, { - "path" : "pages/records/transferRecords2", - "style" : - { - "navigationBarTitleText" : "转赠记录", - "enablePullDownRefresh" : false + "path": "pages/records/transferRecords2", + "style": { + "navigationBarTitleText": "转赠记录", + "enablePullDownRefresh": false } }, { - "path" : "pages/records/reservationRecords2", - "style" : - { - "navigationBarTitleText" : "预约记录", - "enablePullDownRefresh" : false + "path": "pages/records/reservationRecords2", + "style": { + "navigationBarTitleText": "预约记录", + "enablePullDownRefresh": false } }, { - "path" : "pages/bind/bind_cloudCard", + + "path": "pages/records/reservationRecords3", + "style": { + "navigationBarTitleText": "预约记录", + "enablePullDownRefresh": false + } + }, + { + + "path": "pages/records/reservationRecords4", + "style": { + "navigationBarTitleText": "预约记录", + "enablePullDownRefresh": false + } + }, + + { + "path": "pages/bind/bind_cloudCard", "style": { "navigationStyle": "custom" } }, { - "path" : "pages/records/orderRecords", - "style" : - { - "navigationBarTitleText" : "我的订单", + "path": "pages/records/orderRecords", + "style": { + "navigationBarTitleText": "我的订单", "disableScroll": true } }, { - "path" : "pages/records/orderDetail", - "style" : - { - "navigationBarTitleText" : "订单详情" + "path": "pages/records/orderDetail", + "style": { + "navigationBarTitleText": "订单详情" } }, { - "path" : "pages/good/transfer", + "path": "pages/good/transfer", "style": { - "navigationBarTitleText" : "转赠亲友", + "navigationBarTitleText": "转赠亲友", "disableScroll": true } } diff --git a/pages/bind/bind_pickUpCard2.vue b/pages/bind/bind_pickUpCard2.vue index 0d8d89e..270474e 100644 --- a/pages/bind/bind_pickUpCard2.vue +++ b/pages/bind/bind_pickUpCard2.vue @@ -95,50 +95,50 @@ }) }, onLoad(options) { - let _this = this; - wx.login({ - success: function(res) { - uni.request({ - // 组装请求地址 - url: getApp().globalData.wxSilentLoginURL + "?wxCode=" + res.code, - method: "GET", - header: { - 'content-type': "application/x-www-form-urlencoded" - }, - data: { - "wxCode": res.code - }, - success: res => { - if (res.statusCode == 200) { - if (!res.data.success) { - if (res.data.code == "110") { - // 需要绑定手机号 - uni.reLaunch({ - url: '/pages/index/BindPhone?openid=' + - res.data.data.wxMpOpenid - }) - } else { - // _this.status = 'more' - } - } else { - // 成功后跳转主页 - getApp().globalData.sid = res.data.data.sid - _this.page.customerSid = getApp().globalData.sid - console.log("用户sid", getApp().globalData.sid) - } - } else { - // _this.status = 'more' - } - }, - fail: (err) => { - // _this.status = 'more' - } - }); - }, - fail: function(res) { - // _this.status = 'more' - } - }); + // let _this = this; + // wx.login({ + // success: function(res) { + // uni.request({ + // // 组装请求地址 + // url: getApp().globalData.wxSilentLoginURL + "?wxCode=" + res.code, + // method: "GET", + // header: { + // 'content-type': "application/x-www-form-urlencoded" + // }, + // data: { + // "wxCode": res.code + // }, + // success: res => { + // if (res.statusCode == 200) { + // if (!res.data.success) { + // if (res.data.code == "110") { + // // 需要绑定手机号 + // uni.reLaunch({ + // url: '/pages/index/BindPhone?openid=' + + // res.data.data.wxMpOpenid + // }) + // } else { + // // _this.status = 'more' + // } + // } else { + // // 成功后跳转主页 + // getApp().globalData.sid = res.data.data.sid + // _this.page.customerSid = getApp().globalData.sid + // console.log("用户sid", getApp().globalData.sid) + // } + // } else { + // // _this.status = 'more' + // } + // }, + // fail: (err) => { + // // _this.status = 'more' + // } + // }); + // }, + // fail: function(res) { + // // _this.status = 'more' + // } + // }); if (options) { console.log("options", options) @@ -174,6 +174,9 @@ }); }, save() { + + this.page.customerSid = getApp().globalData.sid + if (this.stringIsEmpty(this.page.code) || this.page.code.length != 20) { this.shortToast('请输入20位提货编码') return @@ -183,13 +186,13 @@ return } let _this = this - - console.log("+++++++++++",this.page); - + + console.log("+++++++++++", this.page); + _this.$api.bindAllCard(this.page).then((resp) => { // bus.$emit('order', "监听回调"); uni.switchTab({ - url: '/pages/home/myCellar' + url: '/pages/home/myCellar' }) }).catch(e => { diff --git a/pages/good/goodsDetail.vue b/pages/good/goodsDetail.vue index b6b68f5..66ced71 100644 --- a/pages/good/goodsDetail.vue +++ b/pages/good/goodsDetail.vue @@ -2,7 +2,7 @@ - + @@ -19,7 +34,7 @@ + style="width: 24%;display: flex;flex-direction: column;overflow-y: auto;padding-top: 20px;"> - + @@ -115,8 +131,7 @@ mode="aspectFill" style="width: 40vw;height: 40vw; "> - 菜窖还在补充中~ + 菜窖还在补充中~ @@ -170,7 +185,7 @@ ¥{{page.price}} - {{page.remarks}} @@ -204,6 +219,19 @@ :content="data.brandVos[selectIndex2].qdxy"> + + + + + + + + + + + + @@ -212,6 +240,9 @@ export default { data() { return { + showModal: false, + modalUrl: "https://supervise.yxtsoft.com/lpk/image/banner.png", + imgList: [], notData: false, dialogContent: "这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容这里是协议内容,这里是协议内容", confirmText: "我知道了(5s)", @@ -254,7 +285,8 @@ initReduce: "0", initWeight: "0", shareSid: "", - baseDataSuccess: false + baseDataSuccess: false, + } }, onShow() { @@ -283,9 +315,28 @@ this.request() this.shareGift() + this.getBannerList() }, methods: { + getBannerList() { + let _this = this + _this.$api.bannerList().then((resp) => { + _this.imgList = resp + console.log("======", resp); + }).catch(e => {}) + }, + swiperClick(item) { + console.log("swiperClick======", item); + this.modalUrl = item.contentUrl + if (item.contentUrl != '') { + this.showModal = true + } + + }, + colseDialog() { + this.showModal = false + }, shareGift() { @@ -554,7 +605,8 @@ gotoCart() { uni.navigateTo({ url: '/pages/good/shoppCart?affiliation=' + this.data.brandVos[this.selectIndex2].id + - "&weight=" + this.data.brandVos[this.selectIndex2].qssl+"&qdxy=" + this.data.brandVos[this.selectIndex2].qdxy + "&weight=" + this.data.brandVos[this.selectIndex2].qssl + "&qdxy=" + this.data.brandVos[ + this.selectIndex2].qdxy }) }, showPop2() { @@ -677,7 +729,36 @@ border: 0; } + /* 弹窗样式 */ + .model { + position: absolute; + width: 100%; + height: 100%; + background: #000; + z-index: 100000; + opacity: 0.7; + top: 0; + left: 0; + + } + + .modalDlg { + /* 设置超出滚动 */ + overflow: auto; + width: 100%; + position: fixed; + height: 100%; + top: 0; + left: 0; + z-index: 100000; + display: flex; + justify-content: center; + align-items: center; + } + + .top { + width: 100vw; /* height: 126.66vw; */ height: 50vw; @@ -688,6 +769,33 @@ background-size: 100% 100%; } + .swiper { + width: 100vw; + height: 100%; + } + + .wx-swiper-dots { + position: relative; + left: 50%; + top: 90%; + } + + .swiper /deep/ .wx-swiper-dot { + height: 12rpx; + width: 12rpx; + border-radius: 8rpx; + background: #98978C; + margin-right: 0; + } + + .swiper /deep/ .wx-swiper-dot-active { + width: 44rpx; + height: 12rpx; + background: #FF9900; + border-radius: 8rpx; + } + + .center { display: flex; flex-direction: row; diff --git a/pages/home/myCellar.vue b/pages/home/myCellar.vue index 95f1d6f..4e29c77 100644 --- a/pages/home/myCellar.vue +++ b/pages/home/myCellar.vue @@ -12,9 +12,22 @@ - + + + + + + {{index + 1}}、{{item.title}} + + + + + @@ -349,6 +362,35 @@ + + + + + + + 通知公告 + + + + + + + {{noticeInfo.releaseTime}} + + + 我知道了 + + + + + + + + @@ -357,12 +399,15 @@ export default { data() { return { + notices: [], + noticeInfo: {}, butdisabled: true, transferNotData: true, notData: false, showModal: false, showModal2: false, showModal3: false, + showModal4: false, scrollHeight: "", scrollLeftTop: "0", scrollRightTop: "0", @@ -428,6 +473,7 @@ } this.request() + this.getNotice() this.page.count = 0 }, onLoad(options) { @@ -445,15 +491,64 @@ this.shareGift() }, + filters: { + /** + * 处理富文本里的图片宽度自适应 + * 1.去掉img标签里的style、width、height属性 + * 2.img标签添加style属性:max-width:100%;height:auto + * 3.修改所有style里的width属性为max-width:100% + * 4.去掉
标签 + * @param html + * @returns {void|string|*} + */ + formatRichText(html) { + //控制小程序中图片大小 + if (html) { + let newContent = html.replace(/]*>/gi, function(match, capture) { + match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, ''); + match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, ''); + match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, ''); + return match; + }); + newContent = newContent.replace(/style="[^"]+"/gi, function(match, capture) { + match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, + 'max-width:100%;'); + return match; + }); + newContent = newContent.replace(/]*\/>/gi, ''); + newContent = newContent.replace(/\ { + console.log("getNotice>>>>", resp); + _this.notices = resp + + }).catch(e => {}) + }, + noticeClick(item) { + console.log("noticeClick>>>>", item); + + this.noticeInfo = item + this.showModal4 = true + + }, onKeyInput(event) { this.transferInfo.remarks = event.target.value }, shareGift() { console.log("shareGift>>>>", this.shareSid); + console.log("shareGift>>>>", this.orderSid); // 邀请新人 助力礼包 isNewUser==1 可以助力 - if (this.shareSid != '' && getApp().globalData.isNewUser == '1') { + if (this.stringIsNotEmpty(this.orderSid) && getApp().globalData.isNewUser == '1') { var params = { customerSid: getApp().globalData.sid, @@ -462,7 +557,6 @@ this.$api.recommendedAssistance(params).then((resp) => { - }).catch(e => {}) } @@ -665,6 +759,9 @@ colseDialog3() { this.showModal3 = false }, + colseDialog4() { + this.showModal4 = false + }, onShareAppMessage: function(res) { let _this = this @@ -740,6 +837,29 @@ \ No newline at end of file diff --git a/pages/home/myHome.vue b/pages/home/myHome.vue index 4427341..6665902 100644 --- a/pages/home/myHome.vue +++ b/pages/home/myHome.vue @@ -17,8 +17,17 @@
+ + + + + 客服电话 + + +
- + @@ -123,26 +132,30 @@ - 邀请新朋友后,您将获得“蔬菜品鉴礼包”。 + {{recommend.remarks}} - + - - - + + + +
@@ -156,7 +169,7 @@ export default { data() { return { - butdisabled: true, + butdisabled: true, page: { startHeight: 0, endHeight: 0 @@ -175,7 +188,9 @@ mobile: "" }, headImage: "", - recommend: {}, + recommend: { + vos:[] + }, banKInfo: null } }, @@ -187,7 +202,7 @@ } this.getUserInfo() - // this.myRecommend() + this.myRecommend() }, onLoad(options) { // this.request() @@ -201,6 +216,12 @@ this.$refs.nav.defaultColorBgAlpha(res) }, methods: { + makePhoneCall() { + wx.makePhoneCall({ + phoneNumber: '15503115233', + + }) + }, getUserInfo() { let _this = this _this.$api.getUserInfo(getApp().globalData.sid).then((resp) => { @@ -223,12 +244,17 @@ let _this = this _this.$api.myRecommend(getApp().globalData.sid).then((resp) => { + console.log("myRecommend>>>", resp) + _this.recommend = resp }).catch(e => { }) }, + recommendClick(item) { + console.log("recommendClick>>>", item) + }, showDiaLog() { uni.navigateTo({ url: '/pages/me/base_info' @@ -238,9 +264,9 @@ // console.log("res", res) // console.log("data", res.target.dataset) // var data = res.target.dataset.info - + // this.shareCard() - + // // ① // let shareData = JSON.stringify({ // // params: { @@ -270,20 +296,20 @@ // console.log('aaaa', "用户点击了取消") // } // } - - + + let _this = this const promise = new Promise(resolve => { // 模拟网络请求 setTimeout(() => { - - var params ={ - customerSid:getApp().globalData.sid + + var params = { + customerSid: getApp().globalData.sid } - + _this.$api.recommendNewUsers(params).then((resp) => { - - + + let shareData = JSON.stringify({ // params: { // code: resp.transferCode, @@ -292,46 +318,47 @@ // functionName: 'bindCard', // url: '/pages/bind/bind_cloudCard?code=' + resp // .transferCode + "&codeKey=" + resp.sid - - url: '/pages/home/myCellar?shareSid=' + getApp().globalData.sid+"&orderSid=" + resp.sid, + + url: '/pages/home/myCellar?shareSid=' + getApp() + .globalData.sid + "&orderSid=" + resp.sid, functionName: 'share' }) // 转码传输 let value = encodeURIComponent(shareData) - + resolve({ title: '汇融惠享-云菜窖', // ② path: '/pages/login/login?data=' + value, imageUrl: 'https://supervise.yxtsoft.com/lpk/image/share_invite.png', //自定义图片路径,显示图片长宽比是 5:4。 - + }) - + }).catch(e => { _this.shortToast('发生错误,请稍后再试.') return }) - + }, 0) }) - + return promise - - + + }, shareCard() { let _this = this - - var params ={ - customerSid:getApp().globalData.sid + + var params = { + customerSid: getApp().globalData.sid } - + _this.$api.recommendNewUsers(params).then((resp) => { - - + + }).catch(e => {}) }, - + itemClick(type) { switch (type) { @@ -339,22 +366,29 @@ uni.navigateTo({ url: '/pages/records/reservationRecords', }) + + // uni.navigateTo({ + // url: '/pages/records/reservationRecords3', + // }) break; case "已提菜": - uni.navigateTo({ - url: '/pages/records/reservationRecords2', - }) + uni.navigateTo({ + url: '/pages/records/reservationRecords2', + }) + // uni.navigateTo({ + // url: '/pages/records/reservationRecords4', + // }) break; case "我的订单": uni.navigateTo({ url: '/pages/records/orderRecords', }) - + // uni.navigateTo({ // url:"/pages/records/orderDetail" // }) - - + + break; case "待付款": @@ -396,6 +430,8 @@ background-image: url(https://supervise.yxtsoft.com/lpk/image/my_bj.png); /* 让背景图基于容器大小伸缩 */ background-size: 100% 100%; + +position: relative;/*父元素位置要设置为相对*/ } /* 顶部-用户信息 */ @@ -429,12 +465,11 @@ /* 视图 */ .view { + box-sizing: border-box;margin-top: -15px; background: #F7F7F7; - flex-flow: 1; - height: calc(100vh - 50vw - 48px); + height: calc(100vh - 45px - 65vw);; width: 100%; - margin-top: -18vw; - border-radius: 25px; + border-radius: 15px; } /* 滚动视图 */ @@ -442,7 +477,7 @@ height: 100%; width: 100%; padding: 15px; - border-radius: 25px; + border-radius: 15px; box-sizing: border-box; } diff --git a/pages/records/reservationRecords.vue b/pages/records/reservationRecords.vue index 99d3c25..df8d2ff 100644 --- a/pages/records/reservationRecords.vue +++ b/pages/records/reservationRecords.vue @@ -19,6 +19,14 @@ 预约日期: {{item.reserveDate}}
+ + 提货门店: + {{item.storeName}} + + + 门店地址: + {{item.address}} + 提 货 人: {{item.userName}} diff --git a/pages/records/reservationRecords2.vue b/pages/records/reservationRecords2.vue index 56ea4cf..e8cc486 100644 --- a/pages/records/reservationRecords2.vue +++ b/pages/records/reservationRecords2.vue @@ -19,6 +19,14 @@ 预约日期: {{item.reserveDate}} + + 提货门店: + {{item.storeName}} + + + 门店地址: + {{item.address}} + 提 货 人: {{item.userName}} diff --git a/pages/records/reservationRecords3.vue b/pages/records/reservationRecords3.vue new file mode 100644 index 0000000..3a9e80f --- /dev/null +++ b/pages/records/reservationRecords3.vue @@ -0,0 +1,249 @@ + + + + + \ No newline at end of file diff --git a/pages/records/reservationRecords4.vue b/pages/records/reservationRecords4.vue new file mode 100644 index 0000000..036f014 --- /dev/null +++ b/pages/records/reservationRecords4.vue @@ -0,0 +1,257 @@ + + + + + \ No newline at end of file diff --git a/static/img/autumn.png b/static/img/autumn.png deleted file mode 100644 index b6c6287..0000000 Binary files a/static/img/autumn.png and /dev/null differ diff --git a/static/img/autumn_cur.png b/static/img/autumn_cur.png deleted file mode 100644 index bd2f4e7..0000000 Binary files a/static/img/autumn_cur.png and /dev/null differ diff --git a/static/img/spring.png b/static/img/spring.png deleted file mode 100644 index 2806d51..0000000 Binary files a/static/img/spring.png and /dev/null differ diff --git a/static/img/spring_cur.png b/static/img/spring_cur.png deleted file mode 100644 index 7b6dc40..0000000 Binary files a/static/img/spring_cur.png and /dev/null differ diff --git a/static/img/summer.png b/static/img/summer.png deleted file mode 100644 index f063f3b..0000000 Binary files a/static/img/summer.png and /dev/null differ diff --git a/static/img/summer_cur.png b/static/img/summer_cur.png deleted file mode 100644 index 05c9277..0000000 Binary files a/static/img/summer_cur.png and /dev/null differ diff --git a/static/img/winter.png b/static/img/winter.png deleted file mode 100644 index 59a747e..0000000 Binary files a/static/img/winter.png and /dev/null differ diff --git a/static/img/winter_cur.png b/static/img/winter_cur.png deleted file mode 100644 index 3dd01a9..0000000 Binary files a/static/img/winter_cur.png and /dev/null differ diff --git a/static/notice.png b/static/notice.png new file mode 100644 index 0000000..34ab6f8 Binary files /dev/null and b/static/notice.png differ diff --git a/static/phone-1.png b/static/phone-1.png new file mode 100644 index 0000000..1716ac3 Binary files /dev/null and b/static/phone-1.png differ diff --git a/static/phone-2.png b/static/phone-2.png new file mode 100644 index 0000000..63084aa Binary files /dev/null and b/static/phone-2.png differ diff --git a/static/shouqi.png b/static/shouqi.png new file mode 100644 index 0000000..feec396 Binary files /dev/null and b/static/shouqi.png differ diff --git a/static/time.png b/static/time.png new file mode 100644 index 0000000..15f7dd0 Binary files /dev/null and b/static/time.png differ diff --git a/static/userService.png b/static/userService.png new file mode 100644 index 0000000..f19645b Binary files /dev/null and b/static/userService.png differ diff --git a/static/zhankai.png b/static/zhankai.png new file mode 100644 index 0000000..2afea04 Binary files /dev/null and b/static/zhankai.png differ