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. 22
      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 @@ @@ -138,10 +138,6 @@
"text": "活动"
},
{
"pagePath": "pages/story/index",
"text": "奇迹故事"
},
{
"pagePath": "pages/my/index",
"text": "我的"
}

28
src/app.ts

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

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

@ -1,5 +1,24 @@ @@ -1,5 +1,24 @@
/* 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 {
.icon {
@ -7,8 +26,9 @@ @@ -7,8 +26,9 @@
height: 50rpx;
}
.name {
margin-top: 4rpx;
font-size: 24rpx;
color: #CCCCCC;
color: #cccccc;
&.active {
color: rgba(14, 182, 109, 1);
}

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

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

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

@ -1,14 +1,18 @@ @@ -1,14 +1,18 @@
<van-tabbar active="{{ active }}" active-color="rgba(14, 182, 109, 1)" bind:change="onChange" inactive-color="#CCCCCC">
<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
wx:else
class="tab-item"
wx:if="{{ index != 3 || !anyWhere}}"
bind:tap="handleNav"
data-index="{{index}}"
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="hot"></view>
</van-tabbar-item>

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

@ -47,68 +47,68 @@ Page({ @@ -47,68 +47,68 @@ Page({
doctorId: id,
},
}).then((res) => {
res = {
info: { id: 'doctor_mini', title: '医生码海报', desc: '医生小程序码海报' },
body: {
bgImg:
'https://picsissiok-10049618.cos.ap-shanghai.myqcloud.com/c40aa612270160a657112c56a933d54e_17558553039736.png',
width: '750',
height: '1448',
},
elements: [
{
id: 'avatar',
desc: '医生头像',
type: 0,
picType: 'avatar',
src: 'https://picsissiok-10049618.cos.ap-shanghai.myqcloud.com/6e61b32196f54f20f66dd45c33ade450_17693963483779.png',
width: '128',
height: '128',
left: '70',
top: '256',
shape: 'circle',
},
{
id: 'doctorName',
desc: '医生姓名',
type: 1,
text: '云南大学附属医院\n内分泌科医生',
font: '',
'font-size': '40',
'font-weight': 'bold',
width: '384',
color: 'rgba(33, 29, 46, 1)',
'single-line': true,
left: '234',
top: '256',
},
{
id: 'hospitalName',
desc: '医院名称',
type: 1,
text: '中南大学湘雅医院',
font: '',
'font-size': '32',
color: 'rgba(115, 114, 121, 1)',
'single-line': true,
left: '234',
width: '384',
top: '344',
lineHeight: '36',
},
{
id: 'minicode',
desc: '医生小程序码',
type: 0,
picType: 'minicode',
src: '',
width: '238',
height: '238',
halign: 'center',
top: '640',
},
],
}
// res = {
// info: { id: 'doctor_mini', title: '医生码海报', desc: '医生小程序码海报' },
// body: {
// bgImg:
// '替换为我发你的图片',
// width: '750',
// height: '1448',
// },
// elements: [
// {
// id: 'avatar',
// desc: '医生头像',
// type: 0,
// picType: 'avatar',
// src: 'https://picsissiok-10049618.cos.ap-shanghai.myqcloud.com/6e61b32196f54f20f66dd45c33ade450_17693963483779.png',
// width: '128',
// height: '128',
// left: '70',
// top: '256',
// shape: 'circle',
// },
// {
// id: 'doctorName',
// desc: '医生姓名',
// type: 1,
// text: '云南大学附属医院\n内分泌科医生',
// font: '',
// 'font-size': '40',
// 'font-weight': 'bold',
// width: '384',
// color: 'rgba(33, 29, 46, 1)',
// 'single-line': true,
// left: '234',
// top: '256',
// },
// {
// id: 'hospitalName',
// desc: '医院名称',
// type: 1,
// text: '中南大学湘雅医院',
// font: '',
// 'font-size': '32',
// color: 'rgba(115, 114, 121, 1)',
// 'single-line': true,
// left: '234',
// width: '384',
// top: '344',
// lineHeight: '36',
// },
// {
// id: 'minicode',
// desc: '医生小程序码',
// type: 0,
// picType: 'minicode',
// src: '这块为医生的邀约码url',
// width: '238',
// height: '238',
// halign: 'center',
// top: '640',
// },
// ],
// }
this.setData({
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 { @@ -154,6 +154,11 @@ page {
white-space: nowrap;
text-overflow: ellipsis;
}
.label {
margin-left: 16rpx;
width: 172rpx;
height: 36rpx;
}
}
.icon {
margin-left: 4rpx;
@ -185,7 +190,7 @@ page { @@ -185,7 +190,7 @@ page {
font-size: 22rpx;
line-height: 1;
color: #ffffff;
background: #ee951b;
background: linear-gradient( 270deg, #FFD454 0%, #FFA851 100%);
line-height: 24rpx;
border-radius: 8rpx 8rpx 8rpx 8rpx;
}

1
src/pages/index/index.wxml

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

4
src/pages/my/index.wxml

@ -24,11 +24,11 @@ @@ -24,11 +24,11 @@
</view>
<view class="common-operations">
<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>
<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>
</view>

2
src/pages/repository/index.wxml

@ -58,7 +58,7 @@ @@ -58,7 +58,7 @@
</block>
</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>
<swiper wx:if="{{banner.length && active==0}}" class="swiper" autoplay interval="{{3000}}">
<swiper-item

Loading…
Cancel
Save