diff --git a/components/navigation/navigationBar.vue b/components/navigation/navigationBar.vue new file mode 100644 index 0000000..cd18f28 --- /dev/null +++ b/components/navigation/navigationBar.vue @@ -0,0 +1,129 @@ + + + + + \ No newline at end of file diff --git a/manifest.json b/manifest.json index 2064e8b..035df00 100644 --- a/manifest.json +++ b/manifest.json @@ -41,9 +41,9 @@ }, "quickapp" : {}, "mp-weixin" : { - "optimization":{ - "subPackages":true - }, + "optimization" : { + "subPackages" : true + }, "appid" : "wxd8ef44a8268672e4", "setting" : { "urlCheck" : false, @@ -51,9 +51,6 @@ "minified" : true, "postcss" : true }, - "optimization" : { - "subPackages" : true - }, "usingComponents" : true }, "vueVersion" : "2", diff --git a/pages.json b/pages.json index 499cc96..2afa0cb 100644 --- a/pages.json +++ b/pages.json @@ -1,129 +1,40 @@ { "pages": [{ - "path": "pages/index", - "style": { - "navigationBarTitleText": "首页", - "navigationStyle": "custom" + "path": "pages/index", + "style": { + "navigationBarTitleText": "首页", + "navigationStyle": "custom", + "componentPlaceholder": { + "mine-index": "view", + "notice-index": "view", + "subscribe": "view" } - }, { - "path": "pages/login", - "style": { - "navigationBarTitleText": "登录" - } - }, { - "path": "pages/register", - "style": { - "navigationBarTitleText": "注册" - } - }, { - "path": "pages/work/index", - "style": { - "navigationBarTitleText": "工作台" - } - }, { - "path": "pages/work/my-notice", - "style": { - "navigationBarTitleText": "我的通告" - } - }, { - "path": "pages/mine/index", - "style": { - "navigationBarTitleText": "我的" - } - }, { - "path": "pages/mine/avatar/index", - "style": { - "navigationBarTitleText": "修改头像" - } - }, { - "path": "pages/mine/info/index", - "style": { - "navigationBarTitleText": "个人信息" - } - }, { - "path": "pages/mine/info/edit", - "style": { - "navigationBarTitleText": "编辑资料" - } - }, { - "path": "pages/mine/pwd/index", - "style": { - "navigationBarTitleText": "修改密码" - } - }, { - "path": "pages/mine/setting/index", - "style": { - "navigationBarTitleText": "应用设置" - } - }, { - "path": "pages/mine/help/index", - "style": { - "navigationBarTitleText": "常见问题" - } - }, { - "path": "pages/mine/about/index", - "style": { - "navigationBarTitleText": "关于我们" - } - }, { - "path": "pages/common/webview/index", + } + }, { + "path": "pages/login", + "style": { + "navigationBarTitleText": "登录" + } + }], + "subPackages": [{ + "root": "pages/common", + "pages": [{ + "path": "webview/index", "style": { "navigationBarTitleText": "浏览网页" } }, { - "path": "pages/common/textview/index", + "path": "textview/index", "style": { "navigationBarTitleText": "浏览文本" } }, { - "path": "pages/common/richview/index", + "path": "richview/index", "style": { "navigationBarTitleText": "浏览富文本" } - }, - { - "path": "pages/components/index", - "style": { - "navigationBarTitleText": "通告首页" - } - }, { - "path": "pages/components/notice-item", - "style": { - "navigationBarTitleText": "通告组件" - } - }, - { - "path": "pages/components/subscribe", - "style": { - "navigationBarTitleText": "订阅" - } - }, - { - "path": "pages/mine/card/my-card", - "style": { - "navigationBarTitleText": "我的名片" - } - }, - { - "path": "pages/mine/card/card-detail", - "style": { - "navigationBarTitleText": "编辑名片" - } - }, - { - "path": "pages/mine/addr/addr-list", - "style": { - "navigationBarTitleText": "收货地址" - } - }, - { - "path": "pages/mine/addr/addr-detail", - "style": { - "navigationBarTitleText": "编辑地址" - } - } - ], - "subPackages": [{ + }] + }, { "root": "pages/notice", "pages": [{ "path": "detail", @@ -138,6 +49,63 @@ } } ] + }, { + "root": "pages/components", + "pages": [{ + "path": "notice-index", + "style": { + "navigationBarTitleText": "通告首页" + } + }, { + "path": "notice-item", + "style": { + "navigationBarTitleText": "通告组件" + } + }, { + "path": "subscribe", + "style": { + "navigationBarTitleText": "订阅" + } + }] + }, { + "root": "pages/mine", + "pages": [{ + "path": "mine-index", + "style": { + "navigationBarTitleText": "个人中心" + } + }, { + "path": "card/my-card", + "style": { + "navigationBarTitleText": "我的名片" + } + }, + { + "path": "card/card-detail", + "style": { + "navigationBarTitleText": "编辑名片" + } + }, + { + "path": "addr/addr-list", + "style": { + "navigationBarTitleText": "收货地址" + } + }, + { + "path": "addr/addr-detail", + "style": { + "navigationBarTitleText": "编辑地址" + } + }, + { + "path": "member/member-card", + "style": { + "navigationBarTitleText": "会员中心", + "navigationStyle": "custom" + } + } + ] }], "globalStyle": { "navigationBarTextStyle": "black", diff --git a/pages/components/index.vue b/pages/components/notice-index.vue similarity index 100% rename from pages/components/index.vue rename to pages/components/notice-index.vue diff --git a/pages/index.vue b/pages/index.vue index dc65730..391b000 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -5,7 +5,7 @@ - + @@ -13,14 +13,14 @@ + + \ No newline at end of file diff --git a/pages/mine/index.vue b/pages/mine/mine-index.vue similarity index 98% rename from pages/mine/index.vue rename to pages/mine/mine-index.vue index 7551996..3b56728 100644 --- a/pages/mine/index.vue +++ b/pages/mine/mine-index.vue @@ -27,7 +27,7 @@ - + 开通会员 解锁更多权益 @@ -164,6 +164,9 @@ goMyAddr() { this.$tab.navigateTo('/pages/mine/addr/addr-list') }, + goMemberCard() { + this.$tab.navigateTo('/pages/mine/member/member-card') + } } } diff --git a/static/mine/hot.png b/static/mine/hot.png new file mode 100644 index 0000000..66a7ecb Binary files /dev/null and b/static/mine/hot.png differ diff --git a/static/mine/huang.png b/static/mine/huang.png new file mode 100644 index 0000000..2f792f5 Binary files /dev/null and b/static/mine/huang.png differ diff --git a/static/mine/zuan.png b/static/mine/zuan.png new file mode 100644 index 0000000..aad3a34 Binary files /dev/null and b/static/mine/zuan.png differ diff --git a/utils/common.js b/utils/common.js index a00f9c7..6abd5b2 100644 --- a/utils/common.js +++ b/utils/common.js @@ -7,6 +7,29 @@ import { } from '@/utils/auth' import constant from '@/utils/constant' +export function getWXStatusHeight() { + // #ifdef MP-WEIXIN + // 获取距上 + const barTop = wx.getSystemInfoSync().statusBarHeight + // 获取胶囊按钮位置信息 + const menuButtonInfo = wx.getMenuButtonBoundingClientRect() + // 获取导航栏高度 + const barHeight = menuButtonInfo.height + (menuButtonInfo.top - barTop) * 2 + let barWidth = menuButtonInfo.width + console.log('menuButtonInfo', menuButtonInfo) + let barLeftPosition = 375 - menuButtonInfo.right + menuButtonInfo.width + let menuButtonLeft = menuButtonInfo.left + let menuButtonRight = menuButtonInfo.right + return { + barHeight, + barTop, + barWidth, + barLeftPosition, + menuButtonLeft, + menuButtonRight + } + // #endif +} /** * 判断某用户是否有某权益 * @param {Object} code 权益code