From 723e99e211e35f59307bf23710be5dd10ff0bbdc Mon Sep 17 00:00:00 2001 From: wangxiaoping <809126545@qq.com> Date: Wed, 11 Aug 2021 15:11:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=AD=E4=B9=B0=E4=BC=9A=E5=91=98=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 1 + .../packageBuy/pages/buyMember/buyMember.vue | 6 +- .../packageMy/pages/myCoupon/myCoupon.vue | 2 +- .../static}/icon_bulid@2x.png | Bin .../static}/icon_chanqi@2x.png | Bin pages.json | 49 ++++++---- pages/home/home.vue | 28 ++++++ pages/login/index.vue | 15 +-- pages/member/member.vue | 80 ++++++++++----- pages/my/my.vue | 91 ++++++++++-------- utils/weixin.js | 2 +- 11 files changed, 177 insertions(+), 97 deletions(-) rename {static => packages/packagePromotion/static}/icon_bulid@2x.png (100%) rename {static => packages/packagePromotion/static}/icon_chanqi@2x.png (100%) create mode 100644 pages/home/home.vue diff --git a/main.js b/main.js index 46b4893..458f3d7 100644 --- a/main.js +++ b/main.js @@ -53,6 +53,7 @@ Vue.prototype.reqByToken = (url, params, cb, method) => { method = method || 'POST' const phone_token = uni.getStorageSync('phone_token') params.token = phone_token.token + console.log(url) uni.request({ url: appConfig.baseUrl + url, method: method, diff --git a/packages/packageBuy/pages/buyMember/buyMember.vue b/packages/packageBuy/pages/buyMember/buyMember.vue index 7a7a9b9..625d105 100644 --- a/packages/packageBuy/pages/buyMember/buyMember.vue +++ b/packages/packageBuy/pages/buyMember/buyMember.vue @@ -49,18 +49,20 @@ dueDate: currentDate, token: '', phone: '', - productId: '', + productId: '' }, token: '', openid: '', + package_id: '', } }, - onLoad() { + onLoad(options) { const phone_token = uni.getStorageSync('phone_token') this.info.phone = phone_token.phone this.token = phone_token.token let user_info = weixin.getUserInfoCache() this.openid = user_info.openid + this.package_id = options.package_id }, methods: { pay() { diff --git a/packages/packageMy/pages/myCoupon/myCoupon.vue b/packages/packageMy/pages/myCoupon/myCoupon.vue index dffdf3f..b40cdf0 100644 --- a/packages/packageMy/pages/myCoupon/myCoupon.vue +++ b/packages/packageMy/pages/myCoupon/myCoupon.vue @@ -18,7 +18,7 @@ - + 5折优惠券 2021.02.10-2021.03.08 14:00 diff --git a/static/icon_bulid@2x.png b/packages/packagePromotion/static/icon_bulid@2x.png similarity index 100% rename from static/icon_bulid@2x.png rename to packages/packagePromotion/static/icon_bulid@2x.png diff --git a/static/icon_chanqi@2x.png b/packages/packagePromotion/static/icon_chanqi@2x.png similarity index 100% rename from static/icon_chanqi@2x.png rename to packages/packagePromotion/static/icon_chanqi@2x.png diff --git a/pages.json b/pages.json index 458e2c1..f41b6fe 100644 --- a/pages.json +++ b/pages.json @@ -1,13 +1,14 @@ { - "pages": [{ - "path": "pages/member/member", + "pages": [ + { + "path": "pages/home/home", "style": { - "navigationBarTitleText": "加入会员", - "navigationBarBackgroundColor": "#fff", - "navigationBarTextStyle": "black" + "navigationBarTitleText": "优孕课堂", + "navigationBarBackgroundColor": "#FF578A", + "navigationBarTextStyle": "white" } - }, + }, { "path": "pages/active/active", "style": { @@ -17,7 +18,15 @@ } }, + { + "path": "pages/member/member", + "style": { + "navigationBarTitleText": "加入会员", + "navigationBarBackgroundColor": "#fff", + "navigationBarTextStyle": "black" + } + }, { "path": "pages/my/my", "style": { @@ -279,23 +288,23 @@ "borderStyle": "black", "position": "bottom", "list": [{ - "text": "活动", - "pagePath": "pages/active/active", + "text": "首页", + "pagePath": "pages/home/home", "iconPath": "static/tabs/active.png", "selectedIconPath": "static/tabs/active_cur.png" }, - { - "text": "商城", - "pagePath": "pages/shop/shop", - "iconPath": "static/tabs/shop.png", - "selectedIconPath": "static/tabs/shop_cur.png" - }, - { - "text": "促销", - "pagePath": "pages/promotion/promotion", - "iconPath": "static/tabs/promotion.png", - "selectedIconPath": "static/tabs/promotion_cur.png" - }, + // { + // "text": "商城", + // "pagePath": "pages/shop/shop", + // "iconPath": "static/tabs/shop.png", + // "selectedIconPath": "static/tabs/shop_cur.png" + // }, + // { + // "text": "促销", + // "pagePath": "pages/promotion/promotion", + // "iconPath": "static/tabs/promotion.png", + // "selectedIconPath": "static/tabs/promotion_cur.png" + // }, { "text": "我的", "pagePath": "pages/my/my", diff --git a/pages/home/home.vue b/pages/home/home.vue new file mode 100644 index 0000000..4f8f9ea --- /dev/null +++ b/pages/home/home.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/pages/login/index.vue b/pages/login/index.vue index aa28848..2d07c85 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -2,8 +2,8 @@ - - + + @@ -284,12 +316,12 @@ .cardOuter { display: flex; - justify-content: space-between; + justify-content:flex-start; padding: 20rpx; - .cardCol { width: 224rpx; height: 156rpx; + margin:0 15rpx; border-radius: 8rpx; box-sizing: border-box; border: 2rpx solid #F5DFB5; diff --git a/pages/my/my.vue b/pages/my/my.vue index 7ae02d2..a81b71d 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -12,33 +12,33 @@ - - 王大宝 + + {{userProfile.nickName || '匿名用户'}} - + - + 待付款 - + 待服务 - + 已服务 - + 待评价 - + 全部订单 @@ -47,23 +47,23 @@ - + 待付款 - + 待发货 - + 待收货 - + 待评价 - + 全部订单 @@ -76,74 +76,62 @@ 更多服务 - - + 我的收藏 - - + 评价中心 - + 用户投诉 - + 我的退款 - + 分享 - - + 优惠券 - - + 推广业绩 - - + 我的订单 - - - + 申请注册 - - + 推广工具 - - + 专属海报 - - - + - 推广商品 + 推广申请 - - + @@ -180,14 +168,22 @@ {title:"活动订单"}, {title:"商品订单"} ], - current:0 + current:0, + userProfile: {}, } }, onLoad() { this.stytemInfo(); }, + onShow() { + let userProfile = uni.getStorageSync('user_profile') + if (userProfile) { + this.userProfile = userProfile + } else { + uni.navigateTo({ url: '../login/index?showProfile=1'}) + } + }, onPageScroll(e) { - console.log(e) var that = this; if(e.scrollTop > 60 ){ that.showTiele = true; @@ -206,6 +202,17 @@ } }) }, + goTuiguang(){ + uni.navigateTo({ + url:"../../packages/packagePromotion/pages/speadApply/speadApply" + }) + }, + nodata(){ + uni.showToast({ + title: '正在建设中', + duration: 1000 + }); + }, onClickItem(e){ if(this.current !== e.currentIndex) { diff --git a/utils/weixin.js b/utils/weixin.js index 2c49b0c..3765acf 100644 --- a/utils/weixin.js +++ b/utils/weixin.js @@ -38,7 +38,7 @@ export const weixin = { wx.getUserProfile({ desc: '用于完善会员资料', success: (res) => { - uni.setStorageSync(user_info_key, res.userInfo) + uni.setStorageSync('user_profile', res.userInfo) cb(res.userInfo) } })