Browse Source

feat: 新增功能与资源更新,优化页面与导航

1. 新增突眼日记自定义tab页,调整tab栏样式
2. 替换部分图片资源与默认头像
3. 移除奇迹故事底部导航,新增标签图标样式
4. 注释上报行为代码,调整部分页面样式
master
kola-web 3 days ago
parent
commit
edad6f439a
  1. 4
      src/app.json
  2. 28
      src/app.ts
  3. 26
      src/custom-tab-bar/index.scss
  4. 8
      src/custom-tab-bar/index.ts
  5. 10
      src/custom-tab-bar/index.wxml
  6. 124
      src/doctor/pages/d_invite/index.ts
  7. BIN
      src/images/1/man-active.png
  8. BIN
      src/images/1/man.png
  9. BIN
      src/images/1/woman-active.png
  10. BIN
      src/images/1/woman.png
  11. BIN
      src/images/icon61.png
  12. BIN
      src/images/icon62.png
  13. BIN
      src/images/icon63.png
  14. BIN
      src/images/icon64.png
  15. BIN
      src/images/title3.png
  16. 7
      src/pages/index/index.scss
  17. 1
      src/pages/index/index.wxml
  18. 4
      src/pages/my/index.wxml
  19. 2
      src/pages/repository/index.wxml

4
src/app.json

@ -138,10 +138,6 @@
"text": "活动" "text": "活动"
}, },
{ {
"pagePath": "pages/story/index",
"text": "奇迹故事"
},
{
"pagePath": "pages/my/index", "pagePath": "pages/my/index",
"text": "我的" "text": "我的"
} }

28
src/app.ts

@ -439,20 +439,20 @@ App<IAppOption>({
}) })
}, },
mpBehavior(data: { PageName: string; doctor?: boolean }) { mpBehavior(data: { PageName: string; doctor?: boolean }) {
let url = '?r=zd/mp-behavior/add' // let url = '?r=zd/mp-behavior/add'
if (data.doctor) { // if (data.doctor) {
url = '?r=zd/doctor/mp-behavior/add' // url = '?r=zd/doctor/mp-behavior/add'
} // }
delete data.doctor // delete data.doctor
wx.ajax({ // wx.ajax({
method: 'POST', // method: 'POST',
url, // url,
data: data, // data: data,
loading: false, // loading: false,
showMsg: false, // showMsg: false,
}).then((res) => { // }).then((res) => {
console.log('res: ', res) // console.log('res: ', res)
}) // })
}, },
// 更新用户信息 // 更新用户信息

26
src/custom-tab-bar/index.scss

@ -1,5 +1,24 @@
/* custom-tab-bar/index.wxss */ /* custom-tab-bar/index.wxss */
.circle {
display: block;
margin: 0 auto;
margin-top: -60rpx;
width: 100rpx;
height: 100rpx;
border-radius: 50%;
border: 3px solid #fff;
background: linear-gradient(10deg, #b384f4 0%, #5956e9 100%);
display: flex;
align-items: center;
justify-content: center;
position: relative;
z-index: 1;
.icon {
width: 60rpx;
height: 60rpx;
}
}
.tab-item { .tab-item {
.icon { .icon {
@ -7,12 +26,13 @@
height: 50rpx; height: 50rpx;
} }
.name { .name {
margin-top: 4rpx;
font-size: 24rpx; font-size: 24rpx;
color: #CCCCCC; color: #cccccc;
&.active{ &.active {
color: rgba(14, 182, 109, 1); color: rgba(14, 182, 109, 1);
} }
&.drug-active{ &.drug-active {
color: rgba(89, 86, 233, 1); color: rgba(89, 86, 233, 1);
} }
} }

8
src/custom-tab-bar/index.ts

@ -21,6 +21,11 @@ Component({
iconActive: 'story-active', iconActive: 'story-active',
}, },
{ {
pagePath: '/pages/certReslove/index',
text: '突眼日记',
custom: true,
},
{
pagePath: '/pages/live/index', pagePath: '/pages/live/index',
text: '活动', text: '活动',
icon: 'gift', icon: 'gift',
@ -91,6 +96,9 @@ Component({
} else { } else {
wx.switchTab({ wx.switchTab({
url: pagePath, url: pagePath,
fail: () => {
wx.navigateTo({ url: pagePath })
},
}) })
} }
}, },

10
src/custom-tab-bar/index.wxml

@ -1,14 +1,18 @@
<van-tabbar active="{{ active }}" active-color="rgba(14, 182, 109, 1)" bind:change="onChange" inactive-color="#CCCCCC"> <van-tabbar active="{{ active }}" active-color="rgba(14, 182, 109, 1)" bind:change="onChange" inactive-color="#CCCCCC">
<block wx:for="{{list}}" wx:key="*this"> <block wx:for="{{list}}" wx:key="*this">
<view class="tab-item" wx:if="{{item.custom}}" bind:tap="handleNav" data-index="{{index}}">
<view class="circle">
<image class="icon" src="/images/icon64.png"></image>
</view>
<view class="name">用药提醒</view>
</view>
<van-tabbar-item <van-tabbar-item
wx:else
class="tab-item" class="tab-item"
wx:if="{{ index != 3 || !anyWhere}}"
bind:tap="handleNav" bind:tap="handleNav"
data-index="{{index}}" data-index="{{index}}"
icon="{{imageUrl}}/tabbar/{{active==index ? (theme === 'DRUG' ? 'drug-' :'' ) + item.iconActive: item.icon}}.png" icon="{{imageUrl}}/tabbar/{{active==index ? (theme === 'DRUG' ? 'drug-' :'' ) + item.iconActive: item.icon}}.png"
> >
<!-- <image class="icon" mode="aspectFit" slot="icon" src="{{imageUrl}}/tabbar/{{item.icon}}.png" /> -->
<!-- <image class="icon" mode="aspectFit" slot="icon-active" src="{{imageUrl}}/tabbar/{{item.iconActive}}.png" /> -->
<view class="name {{index==active && (theme === 'DRUG' ? 'drug-active' :'active')}}">{{item.text}}</view> <view class="name {{index==active && (theme === 'DRUG' ? 'drug-active' :'active')}}">{{item.text}}</view>
<view class="hot"></view> <view class="hot"></view>
</van-tabbar-item> </van-tabbar-item>

124
src/doctor/pages/d_invite/index.ts

@ -47,68 +47,68 @@ Page({
doctorId: id, doctorId: id,
}, },
}).then((res) => { }).then((res) => {
res = { // res = {
info: { id: 'doctor_mini', title: '医生码海报', desc: '医生小程序码海报' }, // info: { id: 'doctor_mini', title: '医生码海报', desc: '医生小程序码海报' },
body: { // body: {
bgImg: // bgImg:
'https://picsissiok-10049618.cos.ap-shanghai.myqcloud.com/c40aa612270160a657112c56a933d54e_17558553039736.png', // '替换为我发你的图片',
width: '750', // width: '750',
height: '1448', // height: '1448',
}, // },
elements: [ // elements: [
{ // {
id: 'avatar', // id: 'avatar',
desc: '医生头像', // desc: '医生头像',
type: 0, // type: 0,
picType: 'avatar', // picType: 'avatar',
src: 'https://picsissiok-10049618.cos.ap-shanghai.myqcloud.com/6e61b32196f54f20f66dd45c33ade450_17693963483779.png', // src: 'https://picsissiok-10049618.cos.ap-shanghai.myqcloud.com/6e61b32196f54f20f66dd45c33ade450_17693963483779.png',
width: '128', // width: '128',
height: '128', // height: '128',
left: '70', // left: '70',
top: '256', // top: '256',
shape: 'circle', // shape: 'circle',
}, // },
{ // {
id: 'doctorName', // id: 'doctorName',
desc: '医生姓名', // desc: '医生姓名',
type: 1, // type: 1,
text: '云南大学附属医院\n内分泌科医生', // text: '云南大学附属医院\n内分泌科医生',
font: '', // font: '',
'font-size': '40', // 'font-size': '40',
'font-weight': 'bold', // 'font-weight': 'bold',
width: '384', // width: '384',
color: 'rgba(33, 29, 46, 1)', // color: 'rgba(33, 29, 46, 1)',
'single-line': true, // 'single-line': true,
left: '234', // left: '234',
top: '256', // top: '256',
}, // },
{ // {
id: 'hospitalName', // id: 'hospitalName',
desc: '医院名称', // desc: '医院名称',
type: 1, // type: 1,
text: '中南大学湘雅医院', // text: '中南大学湘雅医院',
font: '', // font: '',
'font-size': '32', // 'font-size': '32',
color: 'rgba(115, 114, 121, 1)', // color: 'rgba(115, 114, 121, 1)',
'single-line': true, // 'single-line': true,
left: '234', // left: '234',
width: '384', // width: '384',
top: '344', // top: '344',
lineHeight: '36', // lineHeight: '36',
}, // },
{ // {
id: 'minicode', // id: 'minicode',
desc: '医生小程序码', // desc: '医生小程序码',
type: 0, // type: 0,
picType: 'minicode', // picType: 'minicode',
src: '', // src: '这块为医生的邀约码url',
width: '238', // width: '238',
height: '238', // height: '238',
halign: 'center', // halign: 'center',
top: '640', // top: '640',
}, // },
], // ],
} // }
this.setData({ this.setData({
params: res, params: res,
}) })

BIN
src/images/1/man-active.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
src/images/1/man.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
src/images/1/woman-active.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
src/images/1/woman.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
src/images/icon61.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
src/images/icon62.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

BIN
src/images/icon63.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
src/images/icon64.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 552 B

BIN
src/images/title3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

7
src/pages/index/index.scss

@ -154,6 +154,11 @@ page {
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.label {
margin-left: 16rpx;
width: 172rpx;
height: 36rpx;
}
} }
.icon { .icon {
margin-left: 4rpx; margin-left: 4rpx;
@ -185,7 +190,7 @@ page {
font-size: 22rpx; font-size: 22rpx;
line-height: 1; line-height: 1;
color: #ffffff; color: #ffffff;
background: #ee951b; background: linear-gradient( 270deg, #FFD454 0%, #FFA851 100%);
line-height: 24rpx; line-height: 24rpx;
border-radius: 8rpx 8rpx 8rpx 8rpx; border-radius: 8rpx 8rpx 8rpx 8rpx;
} }

1
src/pages/index/index.wxml

@ -46,6 +46,7 @@
<view class="name-wrap"> <view class="name-wrap">
<view class="name"> <view class="name">
<view class="n-content">{{userInfo.ExclusiveDoctorName}}</view> <view class="n-content">{{userInfo.ExclusiveDoctorName}}</view>
<image class="label" src="/images/icon61.png"></image>
</view> </view>
</view> </view>
<view class="content" wx:if="{{unreadCount}}">医生给您留言了,记得查看!</view> <view class="content" wx:if="{{unreadCount}}">医生给您留言了,记得查看!</view>

4
src/pages/my/index.wxml

@ -24,11 +24,11 @@
</view> </view>
<view class="common-operations"> <view class="common-operations">
<view bind:tap="handleMyHealthRecord" class="item" data-url="/gift/pages/myHealthRecord/index"> <view bind:tap="handleMyHealthRecord" class="item" data-url="/gift/pages/myHealthRecord/index">
<image class="icon" src="{{imageUrl}}{{theme === 'DRUG'?1.5:1}}/my-common-icon1.png?t={{Timestamp}}"></image> <image class="icon" src="/images/icon62.png"></image>
<view class="name">健康档案</view> <view class="name">健康档案</view>
</view> </view>
<view bind:tap="routerTo" class="item" data-url="/pages/uploadCert/index"> <view bind:tap="routerTo" class="item" data-url="/pages/uploadCert/index">
<image class="icon" src="{{imageUrl}}{{theme === 'DRUG'?1.5:1}}/my-common-icon2.png?t={{Timestamp}}"></image> <image class="icon" src="/images/icon63.png"></image>
<view class="name">用药提醒</view> <view class="name">用药提醒</view>
</view> </view>
</view> </view>

2
src/pages/repository/index.wxml

@ -58,7 +58,7 @@
</block> </block>
</view> </view>
</view> </view>
<image wx:if="{{active==1}}" class="slogan" src="/images/1/login-title.png"></image> <image wx:if="{{active==1}}" class="slogan" src="/images/title3.png"></image>
</view> </view>
<swiper wx:if="{{banner.length && active==0}}" class="swiper" autoplay interval="{{3000}}"> <swiper wx:if="{{banner.length && active==0}}" class="swiper" autoplay interval="{{3000}}">
<swiper-item <swiper-item

Loading…
Cancel
Save