diff --git a/src/images/bg12.png b/src/images/bg12.png new file mode 100644 index 0000000..8762759 Binary files /dev/null and b/src/images/bg12.png differ diff --git a/src/pages/drugMap/index.scss b/src/pages/drugMap/index.scss index 8382c83..291e1e8 100644 --- a/src/pages/drugMap/index.scss +++ b/src/pages/drugMap/index.scss @@ -2,22 +2,23 @@ page { background: #f7fafc; } .page-title { - width: 266rpx; - height: 58rpx; + font-size: 36rpx; + color: rgba(51, 51, 51, 1); + padding-right: 100rpx; } .page { .logo { - margin: 436rpx auto 0; + margin: 294rpx auto 0; display: block; - width: 204rpx; - height: 264rpx; + width: 700rpx; + height: 450rpx; } .content { margin-top: 34rpx; text-align: center; - font-size: 40rpx; - color: rgba(30, 41, 59, 1); - line-height: 64rpx; + font-size: 36rpx; + color: rgba(148, 163, 184, 1); + line-height: 60rpx; } } diff --git a/src/pages/drugMap/index.ts b/src/pages/drugMap/index.ts index 067b6bb..a4ee8e3 100644 --- a/src/pages/drugMap/index.ts +++ b/src/pages/drugMap/index.ts @@ -3,6 +3,9 @@ const _app = getApp(); Page({ data: {}, onLoad() {}, + handleBack() { + wx.navigateBack() + }, }); export {} diff --git a/src/pages/drugMap/index.wxml b/src/pages/drugMap/index.wxml index 964c76a..bb89b13 100644 --- a/src/pages/drugMap/index.wxml +++ b/src/pages/drugMap/index.wxml @@ -1,9 +1,14 @@ - + + + - - + + 我们正在全力打造购药地图服务 diff --git a/src/pages/health/index.ts b/src/pages/health/index.ts index 532fa4a..f53059c 100644 --- a/src/pages/health/index.ts +++ b/src/pages/health/index.ts @@ -50,6 +50,26 @@ Page({ this.setData({ offsetTop: statusBarHeight + navBarHeight }) }, onShow() { + const tabBarParams = app.globalData.tabBarParams || {} + const params = tabBarParams['pages/health/index'] + if (params) { + delete tabBarParams['pages/health/index'] + app.globalData.tabBarParams = tabBarParams + const query: Record = {} + params.split('&').forEach((kv: string) => { + const [k, v] = kv.split('=') + if (k) query[k] = v + }) + if (query.tab !== undefined) { + const tab = Number(query.tab) + this.setData({ tab }) + if (tab === 2) { + this.getRevisitList() + this.getLastRevisit() + } + return + } + } if (this._loaded && this.data.tab === 2) { this.getRevisitList() this.getLastRevisit() diff --git a/src/pages/index/index.scss b/src/pages/index/index.scss index 9cf264f..a732eb2 100644 --- a/src/pages/index/index.scss +++ b/src/pages/index/index.scss @@ -10,6 +10,7 @@ page { .page { padding-bottom: 230rpx; .user { + position: relative; margin: 32rpx 30rpx 0; padding-top: 16rpx; display: flex; @@ -35,6 +36,13 @@ page { color: #94a3b8; } } + .characters { + position: absolute; + right: 0; + bottom: -90rpx; + width: 169rpx; + height: 216rpx; + } } .new-gift { margin: 48rpx 30rpx 0; @@ -58,10 +66,20 @@ page { margin: 32rpx 30rpx 0; height: 176rpx; } + .swiper1 { + margin: 32rpx 30rpx 0; + height: 200rpx; + .s-img { + display: block; + width: 100%; + height: 200rpx; + border-radius: 32rpx; + } + } .swiper2 { margin: 32rpx 30rpx 0; height: 160rpx; - .s-img{ + .s-img { display: block; width: 100%; height: 160rpx; diff --git a/src/pages/index/index.ts b/src/pages/index/index.ts index e177b1a..10270d4 100644 --- a/src/pages/index/index.ts +++ b/src/pages/index/index.ts @@ -240,6 +240,22 @@ Page({ url: `/pages/videoDetail/index?id=${Id}&index=${index}`, }) }, + handleBannerTap(e) { + const { linkurl } = e.currentTarget.dataset + if (!linkurl) return + const tabBarPages = ['pages/index/index', 'pages/wall/index', 'pages/health/index', 'pages/my/index'] + const [path, query] = linkurl.split('?') + if (tabBarPages.some((p) => path === p || path === `/${p}`)) { + // tabBar 页面:通过 globalData 传参,switchTab 不支持 query + if (query) { + app.globalData.tabBarParams = app.globalData.tabBarParams || {} + app.globalData.tabBarParams[path.replace(/^\//, '')] = query + } + wx.switchTab({ url: path.startsWith('/') ? path : `/${path}` }) + } else { + wx.navigateTo({ url: linkurl }) + } + }, handlePicTextDetail(e) { const { index } = e.currentTarget.dataset const { picTextList } = this.data @@ -254,12 +270,6 @@ Page({ }) } }, - handleGift() { - wx.showToast({ - title: '功能开发中,敬请期待', - icon: 'none', - }) - }, }) export {} diff --git a/src/pages/index/index.wxml b/src/pages/index/index.wxml index d2e89f1..2fdd79e 100644 --- a/src/pages/index/index.wxml +++ b/src/pages/index/index.wxml @@ -12,17 +12,24 @@ Hi, {{userInfo.nickName || '用户'}} 星动守护您的第 {{days}} 天~ - - - + + + + - + @@ -44,7 +51,7 @@