Browse Source

页面开发

master
kola-web 2 weeks ago
parent
commit
ef3cfa9457
  1. 16
      project.config.json
  2. 82
      project.private.config.json
  3. 20
      src/app.json
  4. 30
      src/app.ts
  5. 6
      src/components/navbar/index.json
  6. 0
      src/components/navbar/index.scss
  7. 50
      src/components/navbar/index.ts
  8. 17
      src/components/navbar/index.wxml
  9. BIN
      src/images/badge.png
  10. BIN
      src/images/banner1.png
  11. BIN
      src/images/bg1.png
  12. BIN
      src/images/bg2.png
  13. BIN
      src/images/bg3.png
  14. BIN
      src/images/checkbox-active.png
  15. BIN
      src/images/empty-1.png
  16. BIN
      src/images/empty-search.png
  17. BIN
      src/images/file-icon1.png
  18. BIN
      src/images/fold-up.png
  19. BIN
      src/images/home-bg.png
  20. BIN
      src/images/home-card-bg.png
  21. BIN
      src/images/home-logo.png
  22. BIN
      src/images/home-title.png
  23. BIN
      src/images/icon-close.png
  24. BIN
      src/images/icon-collection-active.png
  25. BIN
      src/images/icon-collection.png
  26. BIN
      src/images/icon-collection1.png
  27. BIN
      src/images/icon-directory.png
  28. BIN
      src/images/icon-edit.png
  29. BIN
      src/images/icon-eye.png
  30. BIN
      src/images/icon-phone.png
  31. BIN
      src/images/icon-pic.png
  32. BIN
      src/images/icon-play.png
  33. BIN
      src/images/icon-prev.png
  34. BIN
      src/images/icon-search.png
  35. BIN
      src/images/icon-stop.png
  36. BIN
      src/images/icon1.png
  37. BIN
      src/images/icon10.png
  38. BIN
      src/images/icon2.png
  39. BIN
      src/images/icon3.png
  40. BIN
      src/images/icon4.png
  41. BIN
      src/images/icon5.png
  42. BIN
      src/images/icon6.png
  43. BIN
      src/images/icon7.png
  44. BIN
      src/images/icon8.png
  45. BIN
      src/images/icon9.png
  46. BIN
      src/images/item-tip-close.png
  47. BIN
      src/images/login-bg.png
  48. BIN
      src/images/login-popup-badge.png
  49. BIN
      src/images/login-popup-title.png
  50. BIN
      src/images/logo1.png
  51. BIN
      src/images/mpPic.jpg
  52. BIN
      src/images/my-list-icon1.png
  53. BIN
      src/images/my-list-icon2.png
  54. BIN
      src/images/my-list-icon3.png
  55. BIN
      src/images/my-list-icon4.png
  56. BIN
      src/images/place.png
  57. BIN
      src/images/popup1-bg.png
  58. BIN
      src/images/qyPic.jpg
  59. BIN
      src/images/relove.png
  60. BIN
      src/images/slogan-bg.png
  61. BIN
      src/images/tabbar/tab-active1.png
  62. BIN
      src/images/tabbar/tab-active2.png
  63. BIN
      src/images/tabbar/tab-active3.png
  64. BIN
      src/images/tabbar/tab1.png
  65. BIN
      src/images/tabbar/tab2.png
  66. BIN
      src/images/tabbar/tab3.png
  67. BIN
      src/images/title1.png
  68. BIN
      src/images/title2.png
  69. BIN
      src/images/title3.png
  70. BIN
      src/images/topic-bg.png
  71. BIN
      src/images/topic-card-bg.png
  72. BIN
      src/images/topic-end-bg.png
  73. BIN
      src/images/topic-start-badge.png
  74. BIN
      src/images/topic-start-code1.png
  75. BIN
      src/images/topic-start-code2.png
  76. BIN
      src/images/topic-start.png
  77. BIN
      src/images/user.png
  78. 3
      src/pages/home/index.json
  79. 355
      src/pages/home/index.scss
  80. 130
      src/pages/home/index.ts
  81. 127
      src/pages/home/index.wxml
  82. 5
      src/pages/information/index.json
  83. 84
      src/pages/information/index.scss
  84. 46
      src/pages/information/index.ts
  85. 35
      src/pages/information/index.wxml
  86. 7
      src/pages/informationDetail/index.json
  87. 91
      src/pages/informationDetail/index.scss
  88. 10
      src/pages/informationDetail/index.ts
  89. 25
      src/pages/informationDetail/index.wxml
  90. 5
      src/pages/login/index.json
  91. 225
      src/pages/login/index.scss
  92. 175
      src/pages/login/index.ts
  93. 108
      src/pages/login/index.wxml
  94. 5
      src/pages/message/index.json
  95. 57
      src/pages/message/index.scss
  96. 41
      src/pages/message/index.ts
  97. 23
      src/pages/message/index.wxml
  98. 7
      src/pages/my/index.json
  99. 128
      src/pages/my/index.scss
  100. 7
      src/pages/my/index.ts
  101. Some files were not shown because too many files have changed in this diff Show More

16
project.config.json

@ -27,7 +27,17 @@ @@ -27,7 +27,17 @@
"ignoreUploadUnusedFiles": true,
"compileHotReLoad": false,
"skylineRenderEnable": true,
"es6": true
"es6": true,
"compileWorklet": false,
"uglifyFileName": false,
"uploadWithSourceMap": true,
"minifyWXSS": true,
"minifyWXML": true,
"localPlugins": false,
"disableUseStrict": false,
"condition": false,
"swc": false,
"disableSWC": true
},
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
@ -37,7 +47,7 @@ @@ -37,7 +47,7 @@
"tabIndent": "insertSpaces",
"tabSize": 2
},
"libVersion": "2.32.3",
"libVersion": "3.7.7",
"ignore": [],
"packOptions": {
"ignore": [
@ -61,5 +71,5 @@ @@ -61,5 +71,5 @@
}
]
},
"appid": "wxbdf6f933281b1eb4"
"appid": "wxf9ce8010f1ad24aa"
}

82
project.private.config.json

@ -1,65 +1,51 @@ @@ -1,65 +1,51 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "shizhong-miniprogram",
"projectname": "xinda-miniprogram",
"setting": {
"compileHotReLoad": true,
"urlCheck": true
"urlCheck": true,
"coverView": false,
"lazyloadPlaceholderEnable": false,
"skylineRenderEnable": true,
"preloadBackgroundData": false,
"autoAudits": false,
"useApiHook": true,
"useApiHostProcess": true,
"showShadowRootInWxmlPanel": false,
"useStaticServer": false,
"useLanDebug": false,
"showES6CompileOption": false,
"checkInvalidKey": true,
"ignoreDevUnusedFiles": true,
"bigPackageSizeSupport": false
},
"condition": {
"miniprogram": {
"list": [
{
"name": "pages/classify/index",
"pathName": "pages/classify/index",
"query": "id=9",
"launchMode": "default",
"scene": null
},
{
"name": "pages/article/index",
"pathName": "pages/article/index",
"query": "id=8",
"launchMode": "default",
"scene": null
},
{
"name": "文章详情",
"pathName": "pages/article/index",
"query": "id=8",
"launchMode": "default",
"scene": null
},
{
"name": "个人信息",
"pathName": "pages/userInfo/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "隐私协议",
"pathName": "pages/protocol/index",
"name": "首页",
"pathName": "pages/home/index",
"query": "",
"launchMode": "default",
"scene": null
"scene": null,
"launchMode": "default"
},
{
"name": "搜索",
"pathName": "pages/search/index",
"name": "资料库详情",
"pathName": "pages/informationDetail/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "分类列表",
"pathName": "pages/classify/index",
"name": "消息",
"pathName": "pages/message/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "我的收藏",
"pathName": "pages/collection/index",
"name": "资料库",
"pathName": "pages/information/index",
"query": "",
"launchMode": "default",
"scene": null
@ -72,20 +58,6 @@ @@ -72,20 +58,6 @@
"scene": null
},
{
"name": "首页",
"pathName": "pages/home/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "调研",
"pathName": "pages/topic/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "登录",
"pathName": "pages/login/index",
"query": "",
@ -95,5 +67,5 @@ @@ -95,5 +67,5 @@
]
}
},
"libVersion": "3.7.7"
"libVersion": "3.8.9"
}

20
src/app.json

@ -3,8 +3,12 @@ @@ -3,8 +3,12 @@
"pages": [
"pages/home/index",
"pages/login/index",
"pages/switchLogin/index",
"pages/my/index",
"pages/information/index",
"pages/informationDetail/index",
"pages/message/index",
"pages/switchLogin/index",
"pages/topic/index",
"pages/collection/index",
"pages/classify/index",
@ -24,8 +28,8 @@ @@ -24,8 +28,8 @@
},
"tabBar": {
"custom": false,
"color": "#4E5969",
"selectedColor": "#3FAFFA",
"color": "rgba(105, 104, 110, 1)",
"selectedColor": "rgba(33, 29, 46, 1)",
"borderStyle": "white",
"list": [
{
@ -37,6 +41,12 @@ @@ -37,6 +41,12 @@
{
"iconPath": "/images/tabbar/tab2.png",
"selectedIconPath": "/images/tabbar/tab-active2.png",
"pagePath": "pages/information/index",
"text": "资料库"
},
{
"iconPath": "/images/tabbar/tab3.png",
"selectedIconPath": "/images/tabbar/tab-active3.png",
"pagePath": "pages/my/index",
"text": "我的"
}
@ -45,6 +55,10 @@ @@ -45,6 +55,10 @@
"resolveAlias": {
"@/*": "/*"
},
"usingComponents": {
"pagination": "/components/pagination/index",
"van-icon": "@vant/weapp/icon/index"
},
"rendererOptions": {
"skyline": {
"defaultDisplayBlock": true,

30
src/app.ts

@ -15,10 +15,11 @@ App<IAppOption>({ @@ -15,10 +15,11 @@ App<IAppOption>({
globalData: {
// 测试号 wx2b0bb13edf717c1d
// dev
// appid:wxbdf6f933281b1eb4
url: 'https://m.shizhong.hbraas.com',
upFileUrl: 'https://m.shizhong.hbraas.com/',
imageUrl: 'https://m.shizhong.hbraas.com/api/shizhong/',
// appid:wxf9ce8010f1ad24aa
url: 'https://m.xd.hbraas.com',
upFileUrl: 'https://m.xd.hbraas.com/',
imageUrl: 'https://m.xd.hbraas.com/xd/',
// pro
// appid:wxa4a28b299df7d921
// url: 'https://m.shizhong.hbsaas.com',
@ -41,16 +42,17 @@ App<IAppOption>({ @@ -41,16 +42,17 @@ App<IAppOption>({
wx.login({
success: (res) => {
wx.ajax({
method: 'GET',
url: '?r=shizhong/user/init-login',
data: {
code: res.code,
},
}).then((res) => {
this.globalData.loginState = res.loginState;
this.globalData.isLogin = res.isLogin || 999;
});
console.log(res)
// wx.ajax({
// method: 'GET',
// url: '?r=shizhong/user/init-login',
// data: {
// code: res.code,
// },
// }).then((res) => {
// this.globalData.loginState = res.loginState;
// this.globalData.isLogin = res.isLogin || 999;
// });
},
});

6
src/components/navbar/index.json

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"van-nav-bar": "@vant/weapp/nav-bar/index"
}
}

0
src/components/navbar/index.scss

50
src/components/navbar/index.ts

@ -0,0 +1,50 @@ @@ -0,0 +1,50 @@
const app = getApp<IAppOption>()
Component({
options: {
multipleSlots: true, // 在组件定义时的选项中启用多slot支持
},
properties: {
title: String,
fixed: Boolean,
placeholder: Boolean,
leftText: String,
rightText: String,
customStyle: String,
leftArrow: Boolean,
border: {
type: Boolean,
value: false,
},
zIndex: {
type: Number,
value: 1,
},
back: {
type: Boolean,
value: true,
},
},
/**
*
*/
data: {
imageUrl: app.globalData.imageUrl,
Timestamp:app.globalData.Timestamp
},
/**
*
*/
methods: {
onClickLeft() {
if(this.data.back)
this.triggerEvent('clickLeft', {}, {})
},
onClickRight() {
this.triggerEvent('clickRight', {}, {})
},
},
})

17
src/components/navbar/index.wxml

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
<van-nav-bar
title="{{title}}"
fixed="{{fixed}}"
placeholder="{{placeholder}}"
leftText="{{leftText}}"
rightText="{{rightText}}"
customStyle="{{customStyle}}"
leftArrow="{{leftArrow}}"
border="{{border}}"
zIndex="{{zIndex}}"
bind:click-left="onClickLeft"
bind:click-right="onClickRight"
>
<slot name="left" slot="left"></slot>
<slot name="title" slot="title"></slot>
<slot name="right" slot="right"></slot>
</van-nav-bar>

BIN
src/images/badge.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

BIN
src/images/banner1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

BIN
src/images/bg1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 KiB

BIN
src/images/bg2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB

BIN
src/images/bg3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

BIN
src/images/checkbox-active.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

BIN
src/images/empty-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

BIN
src/images/empty-search.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

BIN
src/images/file-icon1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/images/fold-up.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 436 B

BIN
src/images/home-bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 329 KiB

BIN
src/images/home-card-bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

BIN
src/images/home-logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

BIN
src/images/home-title.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

BIN
src/images/icon-close.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/images/icon-collection-active.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
src/images/icon-collection.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/images/icon-collection1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

BIN
src/images/icon-directory.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 551 B

BIN
src/images/icon-edit.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 479 B

BIN
src/images/icon-eye.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 816 B

BIN
src/images/icon-phone.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 502 B

BIN
src/images/icon-pic.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/images/icon-play.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

BIN
src/images/icon-prev.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/images/icon-search.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

BIN
src/images/icon-stop.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

BIN
src/images/icon1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 534 B

BIN
src/images/icon10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
src/images/icon2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/images/icon3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 B

BIN
src/images/icon4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
src/images/icon5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/images/icon6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/images/icon7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/images/icon8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

BIN
src/images/icon9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/images/item-tip-close.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/images/login-bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 KiB

BIN
src/images/login-popup-badge.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

BIN
src/images/login-popup-title.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

BIN
src/images/logo1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
src/images/mpPic.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

BIN
src/images/my-list-icon1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/images/my-list-icon2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

BIN
src/images/my-list-icon3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/images/my-list-icon4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

BIN
src/images/place.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 KiB

BIN
src/images/popup1-bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 KiB

BIN
src/images/qyPic.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 KiB

BIN
src/images/relove.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

BIN
src/images/slogan-bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

BIN
src/images/tabbar/tab-active1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/images/tabbar/tab-active2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/images/tabbar/tab-active3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
src/images/tabbar/tab1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 881 B

BIN
src/images/tabbar/tab2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 934 B

BIN
src/images/tabbar/tab3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/images/title1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
src/images/title2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
src/images/title3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
src/images/topic-bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

BIN
src/images/topic-card-bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

BIN
src/images/topic-end-bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

BIN
src/images/topic-start-badge.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

BIN
src/images/topic-start-code1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

BIN
src/images/topic-start-code2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

BIN
src/images/topic-start.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

BIN
src/images/user.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

3
src/pages/home/index.json

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
{
"usingComponents": {
"van-popup": "@vant/weapp/popup/index"
"van-popup": "@vant/weapp/popup/index",
"navbar": "/components/navbar/index"
}
}

355
src/pages/home/index.scss

@ -1,219 +1,192 @@ @@ -1,219 +1,192 @@
page {
background-color: #f3f4f5;
background-color: rgba(247, 246, 250, 1);
}
.page-title {
width: 320rpx;
height: 34rpx;
}
.page {
padding-bottom: 10vh;
min-height: 100vh;
.logo {
margin-left: 32rpx;
width: 327rpx;
max-height: 100rpx;
}
.page-title {
margin: 50rpx 0 0 32rpx;
width: 580rpx;
height: 52rpx;
}
.page-slogan {
margin: 14rpx 32rpx 0;
padding: 30rpx 32rpx;
font-size: 28rpx;
color: #65686c;
line-height: 52rpx;
}
.search {
margin: 34rpx 32rpx 0;
padding: 0 0 0 24rpx;
padding: 44rpx 40rpx;
.user {
display: flex;
align-items: center;
background: linear-gradient(158deg, #ffffff 0%, #f2f9fe 100%);
border-radius: 106rpx 106rpx 106rpx 106rpx;
border: 1px solid #ffffff;
.icon {
width: 36rpx;
height: 36rpx;
}
.input {
flex: 1;
padding: 16rpx;
line-height: 40rpx;
font-size: 28rpx;
}
.place-input {
color: #c9cdd4;
}
}
.swiper {
margin: 36rpx 32rpx -52rpx;
height: 318rpx;
.wx-swiper-dots {
bottom: 60rpx;
display: flex;
align-items: center;
}
.wx-swiper-dot {
width: 8rpx;
height: 8rpx;
}
.wx-swiper-dot-active {
width: 24rpx !important;
height: 8rpx !important;
border-radius: 5rpx !important;
}
.swiper-item {
position: relative;
.banner {
position: absolute;
top: 0;
left: 0;
z-index: 1;
display: block;
width: 100%;
height: 274rpx;
border-radius: 32rpx;
}
.avatar-wrapper {
flex-shrink: 0;
padding: 0;
margin: 0;
width: 124rpx;
height: 124rpx;
outline: none;
border: 2px solid #fff;
border-radius: 50%;
&::after {
content: '';
position: absolute;
bottom: 74rpx;
left: 40rpx;
width: 606rpx;
height: 194rpx;
background: rgba(0, 43, 88, 0.28);
box-shadow: 0rpx 8rpx 8rpx 0rpx rgba(0, 0, 0, 0.65);
border-radius: 0rpx 0rpx 0rpx 0rpx;
filter: blur(16.5px);
border: none;
}
.avatar {
width: 100%;
height: 100%;
border-radius: 50%;
}
}
}
.cards {
margin: 52rpx 32rpx 0;
display: grid;
gap: 28rpx 26rpx;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(auto-fill, 164rpx);
.card {
padding: 20rpx 30rpx;
display: flex;
justify-content: center;
flex-direction: column;
overflow: hidden;
height: 164rpx;
box-sizing: border-box;
.title {
.wrap {
flex: 1;
padding-left: 24rpx;
.nickname {
font-size: 36rpx;
color: #3795f7;
line-height: 42rpx;
font-weight: bold;
color: rgba(1, 1, 5, 1);
}
.content {
margin-top: 10rpx;
.hostipal {
margin-top: 16rpx;
line-height: 1;
font-size: 28rpx;
color: #65686c;
min-width: 0;
line-height: 40rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
color: rgba(173, 172, 178, 1);
.tag {
display: inline-block;
font-size: 24rpx;
color: rgba(255, 255, 255, 1);
padding: 2rpx 10rpx;
background: #8c75d0;
border-radius: 8rpx 8rpx 8rpx 8rpx;
}
}
}
}
.remark {
margin: 52rpx 32rpx 0;
.r-header {
display: flex;
align-items: center;
gap: 16rpx;
font-size: 36rpx;
color: #222222;
.banner {
margin-top: 32rpx;
padding: 40rpx;
border-radius: 24rpx;
border: 1px solid #fff;
background: linear-gradient(to right, rgba(223, 214, 250, 1), rgba(229, 227, 240, 1));
.title {
font-size: 40rpx;
color: rgba(140, 117, 208, 1);
font-weight: bold;
&::before {
content: '';
width: 8rpx;
height: 34rpx;
background-color: #3795f7;
}
}
.r-content {
margin-top: 30rpx;
padding: 32rpx;
width: 100%;
box-sizing: border-box;
height: 272rpx;
font-size: 32rpx;
background-color: #fff;
border-radius: 24rpx;
}
.textarea-placeholder {
color: #babdc1;
}
.submit {
margin: 28rpx auto 0;
width: 236rpx;
height: 70rpx;
font-size: 32rpx;
color: #fff;
text-align: center;
line-height: 70rpx;
background: linear-gradient(90deg, #134df6 36%, #3795f7 100%);
border-radius: 112rpx 112rpx 112rpx 112rpx;
}
.not-submit {
background: #e3e3e3;
.btn {
margin: 16rpx auto 0;
padding: 8rpx 0;
width: 330rpx;
text-align: center;
font-size: 32rpx;
color: rgba(255, 255, 255, 1);
background-color: rgba(140, 117, 208, 1);
border-radius: 64rpx;
}
}
}
.popup {
padding: 33rpx 0 0;
.popup-container {
padding: 280rpx 48rpx 0;
width: 622rpx;
height: 490rpx;
box-sizing: border-box;
background: linear-gradient(180deg, #e7f8ff 0%, #ffffff 100%);
border-radius: 32rpx;
.message {
margin-top: 16rpx;
height: 150rpx;
position: relative;
.badge {
.content {
position: absolute;
left: 0;
top: -33px;
width: 246rpx;
height: 286rpx;
top: 48rpx;
left: 212rpx;
font-size: 32rpx;
color: rgba(0, 0, 0, 1);
display: flex;
align-items: baseline;
.num {
font-size: 48rpx;
color: rgba(140, 117, 208, 1);
font-weight: bold;
}
&.dot::after {
position: absolute;
right: -18rpx;
top: 10rpx;
content: '';
width: 18rpx;
height: 18rpx;
flex-shrink: 0;
border-radius: 50%;
background-color: rgba(241, 44, 54, 1);
}
}
.title {
position: absolute;
top: 50rpx;
right: 28rpx;
width: 338rpx;
height: 164rpx;
}
.ad {
margin-top: 32rpx;
.ad-img {
display: block;
width: 100%;
height: 224rpx;
box-shadow: 0 4rpx 22rpx 0 rgba(0, 0, 0, 0.03);
}
.conform {
height: 88rpx;
text-align: center;
background: #3795f7;
line-height: 88rpx;
font-size: 36rpx;
color: #ffffff;
border-radius: 96rpx 96rpx 96rpx 96rpx;
}
.list {
margin-top: 32rpx;
padding: 32rpx 20rpx;
background-color: #fff;
border-radius: 24rpx;
.list-header {
display: flex;
align-items: center;
justify-content: space-between;
.title {
width: 146rpx;
height: 34rpx;
}
.more {
font-size: 28rpx;
color: rgba(173, 172, 178, 1);
}
}
.cancel {
margin-top: 10rpx;
font-size: 32rpx;
color: #999999;
text-align: center;
line-height: 88rpx;
.card {
margin: 24rpx 0 0;
background-color: #fff;
border-radius: 24rpx;
display: flex;
.photo {
flex-shrink: 0;
width: 176rpx;
height: 176rpx;
border-radius: 12rpx;
}
.wrap {
padding: 12rpx 0 0 24rpx;
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
.title {
font-size: 32rpx;
color: rgba(33, 29, 46, 1);
line-height: 44rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.w-footer {
margin-top: 28rpx;
display: flex;
justify-content: space-between;
align-items: center;
.date {
font-size: 28rpx;
color: rgba(173, 172, 178, 1);
}
.options {
display: flex;
align-items: center;
gap: 60rpx;
.o-item {
font-size: 28rpx;
color: rgba(173, 172, 178, 1);
display: flex;
align-items: center;
gap: 12rpx;
.icon {
width: 36rpx;
height: 36rpx;
}
}
}
}
}
}
}
}

130
src/pages/home/index.ts

@ -1,135 +1,9 @@ @@ -1,135 +1,9 @@
const app = getApp<IAppOption>();
Page({
data: {
show: false,
cateList: [] as any,
remark: '',
feedbackCount: 0,
bannerList: [],
userInfo: {},
},
data: {},
onLoad() {
app.waitLogin().then(() => {
this.getCateList();
this.getBanner();
this.getRemarkCount();
app.getUserInfo(this, (res) => {
if (res.showQuestion === 1) {
this.setData({
show: true,
});
}
});
});
},
getBanner() {
wx.ajax({
method: 'GET',
url: '?r=shizhong/index/index',
data: {},
}).then((res) => {
this.setData({
bannerList: res,
});
});
},
handleBanner(e) {
const { index } = e.currentTarget.dataset;
const bannerItem: any = this.data.bannerList[index];
if (bannerItem.configType === '1') {
wx.navigateTo({
url: `/pages/article/index?id=${bannerItem.configContent}`,
});
} else if (bannerItem.configType === '2') {
wx.navigateTo({
url: `/pages/article/index?id=${bannerItem.configContentBookId}&cid=${bannerItem.configContent}`,
});
} else if (bannerItem.configType === '3') {
wx.navigateTo({
url: `/pages/longPicture/index?url=${encodeURIComponent(bannerItem.configContent)}`,
});
}
},
getCateList() {
wx.ajax({
method: 'GET',
url: '?r=shizhong/book/cate-list',
data: {},
}).then((res) => {
this.setData({
cateList: res,
});
});
},
handleDetail(e) {
const { index } = e.currentTarget.dataset;
const item = this.data.cateList[index];
wx.navigateTo({
url: `/pages/classify/index?id=${item.Id}`,
});
},
handleSearch() {
wx.navigateTo({
url: '/pages/search/index',
});
},
getRemarkCount() {
wx.ajax({
method: 'GET',
url: '?r=shizhong/account/get-can-feedback-count',
data: {},
showMsg: false,
}).then((res) => {
this.setData({
feedbackCount: res,
});
});
},
handleRemark() {
const { remark } = this.data;
wx.ajax({
method: 'POST',
url: '?r=shizhong/account/send-feedback',
data: {
content: remark,
},
loading: true,
}).then(() => {
wx.showToast({
title: '提交成功',
icon: 'none',
});
this.setData({
remark: '',
});
});
},
handleNotRemark() {
wx.showToast({
icon: 'none',
title: '今日留言次数已达上限,欢迎明天再来留言吧',
});
},
handleTopic() {
wx.navigateTo({
url: '/pages/topic/index?back=1',
});
this.handleCancelTopic();
},
handleCancelTopic() {
this.setData({
show: false,
});
wx.ajax({
method: 'POST',
url: '?r=shizhong/account/visit',
data: {
type: 1,
},
});
// app.waitLogin().then(() => {});
},
});

127
src/pages/home/index.wxml

@ -1,79 +1,68 @@ @@ -1,79 +1,68 @@
<navbar fixed custom-style="background:{{background}}" back>
<image class="page-title" slot="left" src="/images/title2.png"></image>
</navbar>
<view
class="page"
style="background: url('{{imageUrl}}home-bg.png?t={{Timestamp}}') no-repeat top center/100% 580rpx;padding-top:{{menuButtonInfo.top}}px;"
style="background: url('/images/bg2.png') no-repeat top center/100% 616rpx;padding-top: {{pageTop + 20}}px;"
>
<image class="logo" mode="widthFix" src="{{imageUrl}}home-logo.png?t={{Timestamp}}"></image>
<image class="page-title" src="{{imageUrl}}home-title.png?t={{Timestamp}}"></image>
<view
class="page-slogan"
style="background: url('{{imageUrl}}slogan-bg.png?t={{Timestamp}}') no-repeat top center/100% 100%;"
>
基于循证医学和临床指南等,构建科学/系统/高效的健康信息平台,助力人人都做家庭健康师,提高预期寿命和健康寿命,减短带病生存期。
<view class="user">
<button class="avatar-wrapper">
<image
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
></image>
</button>
<view class="wrap">
<view class="nickname">XX医生</view>
<view class="hostipal">
北京天坛医院
<view class="tag">三甲</view>
</view>
</view>
</view>
<view class="search" bind:tap="handleSearch">
<image class="icon" src="{{imageUrl}}icon-search.png?t={{Timestamp}}"></image>
<input
type="text"
disabled="{{true}}"
class="input"
placeholder-class="place-input"
confirm-type="search"
bindconfirm="handleSearch"
placeholder="请输入要搜索的内容"
/>
<view class="banner">
<view class="title">甲状腺眼突登记研究项目</view>
<view class="btn">点此进入EDC系统</view>
</view>
<swiper
wx:if="{{bannerList.length>0}}"
class="swiper"
autoplay
interval="{{5000}}"
indicator-dots="{{bannerList.length>1}}"
indicator-color="{{bannerList.length>1 ? 'rgba(255,255,255,0.62)' :'transparent'}}"
indicator-active-color="{{bannerList.length>1 ? '#FFFFFF' :'transparent'}}"
>
<swiper-item
class="swiper-item"
wx:for="{{bannerList}}"
wx:key="configId"
bind:tap="handleBanner"
data-index="{{index}}"
>
<image class="banner" mode="aspectFill" src="{{item.configImg}}"></image>
</swiper-item>
</swiper>
<view class="cards">
<view
class="card"
wx:for="{{cateList}}"
wx:key="index"
style="background: url('{{imageUrl}}home-card-bg.png?t={{Timestamp}}') no-repeat center/100%"
bind:tap="handleDetail"
data-index="{{index}}"
>
<view class="title">{{item.CateName}}</view>
<view class="content">{{item.Intro}}</view>
<view class="message" style="background: url('/images/bg3.png') no-repeat top center/100% 150rpx">
<view class="content dot">
您有
<text class="num">5</text>
条新消息待查看
</view>
</view>
<view class="remark">
<view class="r-header">留言板</view>
<textarea
class="r-content"
model:value="{{remark}}"
placeholder-class="textarea-placeholder"
placeholder="欢迎反馈您的问题"
></textarea>
<view wx:if="{{feedbackCount>0}}" class="submit" bind:tap="handleRemark">提交</view>
<view wx:else class="submit not-submit" bind:tap="handleNotRemark">提交</view>
<view class="ad">
<image class="ad-img" src="/images/banner1.png"></image>
</view>
</view>
<van-popup show="{{ show }}" bind:close="onClose" round style="--popup-background-color: transparent">
<view class="popup">
<view class="popup-container">
<image class="badge" src="{{imageUrl}}login-popup-badge.png?t={{Timestamp}}"></image>
<image class="title" src="{{imageUrl}}login-popup-title.png?t={{Timestamp}}"></image>
<view class="conform" bind:tap="handleTopic">开始</view>
<view class="cancel" bind:tap="handleCancelTopic">关闭</view>
<view class="list">
<view class="list-header">
<image class="title" src="/images/title3.png"></image>
<view class="more">
查看全部
<van-icon name="arrow" />
</view>
</view>
<view class="card" bind:tap="handleDetail">
<image
class="photo"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
></image>
<view class="wrap">
<view class="title">替妥尤单抗的作用机制、适用场景、使用方式</view>
<view class="w-footer">
<view class="date">2025-06-17</view>
<view class="options">
<view class="o-item">
<image class="icon" src="/images/icon7.png"></image>
24
</view>
<view class="o-item">
<image class="icon" src="/images/icon8.png"></image>
</view>
</view>
</view>
</view>
</view>
</view>
</van-popup>
</view>

5
src/pages/information/index.json

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
{
"usingComponents": {
"navbar":"/components/navbar/index"
}
}

84
src/pages/information/index.scss

@ -0,0 +1,84 @@ @@ -0,0 +1,84 @@
page {
background-color: rgba(247, 246, 250, 1);
}
.page {
.page-tags {
position: sticky;
top: 0;
left: 0;
padding: 32rpx 0 32rpx 32rpx;
display: flex;
overflow-x: auto;
display: flex;
gap: 16rpx;
flex-wrap: nowrap;
.tag {
font-size: 32rpx;
color: rgba(33, 29, 46, 1);
line-height: 44rpx;
padding: 6rpx 32rpx;
background-color: #fff;
border-radius: 82rpx;
&.active {
color: #fff;
background-color: rgba(140, 117, 208, 1);
}
}
}
.card {
margin: 24rpx 40rpx 0;
padding: 12rpx;
background-color: #fff;
border-radius: 24rpx;
display: flex;
.photo {
flex-shrink: 0;
width: 176rpx;
height: 176rpx;
border-radius: 12rpx;
}
.wrap {
padding: 12rpx 0 0 24rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.title {
font-size: 32rpx;
color: rgba(33, 29, 46, 1);
line-height: 44rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.w-footer {
margin-top: 28rpx;
display: flex;
justify-content: space-between;
align-items: center;
.date {
font-size: 28rpx;
color: rgba(173, 172, 178, 1);
}
.options {
display: flex;
align-items: center;
gap: 60rpx;
.o-item {
font-size: 28rpx;
color: rgba(173, 172, 178, 1);
display: flex;
align-items: center;
gap: 12rpx;
.icon {
width: 36rpx;
height: 36rpx;
}
}
}
}
}
}
}

46
src/pages/information/index.ts

@ -0,0 +1,46 @@ @@ -0,0 +1,46 @@
const _app = getApp<IAppOption>();
Page({
data: {
list: [] as any[],
pagination: {
page: 1,
pages: 1,
count: 1,
},
},
onLoad() {},
getList(newPage = 1) {
wx.ajax({
method: 'GET',
url: '?r=wtx/knowledge/list',
data: {
page: newPage,
},
}).then((res) => {
const list = res.page === 1 ? res.list : [...this.data.list, ...res.list];
this.setData({
total: res.count,
list,
pagination: {
page: res.page,
pages: res.pages,
count: res.count,
},
});
});
},
onReachBottom() {
const { page, pages } = this.data.pagination;
if (pages > page) {
this.getList(page + 1);
}
},
handleDetail() {
wx.navigateTo({
url: '/pages/informationDetail/index',
});
},
});
export {};

35
src/pages/information/index.wxml

@ -0,0 +1,35 @@ @@ -0,0 +1,35 @@
<navbar fixed title="资料库" custom-style="background:{{background}}"></navbar>
<view
class="page"
style="background: url('/images/bg2.png') no-repeat top center/100% 616rpx;padding-top: {{pageTop + 20}}px;"
>
<view class="page-tags" style="background:{{background}};top:{{pageTop}}px;">
<view class="tag active">全部</view>
<view class="tag">安全性</view>
<view class="tag">有效性</view>
</view>
<view class="card" bind:tap="handleDetail">
<image
class="photo"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
></image>
<view class="wrap">
<view class="title">替妥尤单抗的作用机制、适用场景、使用方式</view>
<view class="w-footer">
<view class="date">2025-06-17</view>
<view class="options">
<view class="o-item">
<image class="icon" src="/images/icon7.png"></image>
24
</view>
<view class="o-item">
<image class="icon" src="/images/icon8.png"></image>
</view>
</view>
</view>
</view>
</view>
<pagination pagination="{{pagination}}"></pagination>
</view>

7
src/pages/informationDetail/index.json

@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
{
"navigationStyle": "default",
"navigationBarTitleText": "资料库详情页",
"usingComponents": {
"mp-html": "mp-html"
}
}

91
src/pages/informationDetail/index.scss

@ -0,0 +1,91 @@ @@ -0,0 +1,91 @@
.page {
padding: 40rpx;
.title {
font-size: 40rpx;
color: rgba(33, 29, 46, 1);
font-weight: bold;
line-height: 48rpx;
}
.info {
margin-top: 26rpx;
display: flex;
align-items: center;
justify-content: space-between;
.date {
font-size: 28rpx;
color: rgba(173, 172, 178, 1);
}
.eye {
display: flex;
align-items: center;
gap: 12rpx;
font-size: 28rpx;
color: rgba(173, 172, 178, 1);
.icon {
width: 40rpx;
height: 40rpx;
}
}
}
.file-card {
margin-top: 32rpx;
padding: 22rpx 32rpx;
background: linear-gradient(352deg, #f7f6fa 0%, #f2edff 100%);
border-radius: 24rpx 24rpx 24rpx 24rpx;
display: flex;
align-items: center;
justify-content: space-between;
gap: 24rpx;
.icon {
width: 84rpx;
height: 84rpx;
}
.content {
font-size: 32rpx;
color: rgba(33, 29, 46, 1);
line-height: 48rpx;
}
.btn {
flex-shrink: 0;
padding: 4rpx 32rpx;
font-size: 32rpx;
line-height: 48rpx;
color: rgba(255, 255, 255, 1);
background-color: rgba(140, 117, 208, 1);
border-radius: 64rpx;
}
}
.mp-html {
margin-top: 32rpx;
}
.page-footer {
position: fixed;
bottom: 0px;
left: 0;
padding: 18rpx 40rpx;
width: 100%;
box-sizing: border-box;
background-color: #fff;
box-shadow: 0rpx -2rpx 36rpx 0rpx rgba(0, 0, 0, 0.16);
display: flex;
align-items: center;
justify-content: space-between;
gap: 22rpx;
.avatar {
width: 66rpx;
height: 66rpx;
}
.title {
flex: 1;
font-size: 28rpx;
color: rgba(140, 117, 208, 1);
line-height: 36rpx;
}
.icon {
width: 40rpx;
height: 40rpx;
}
}
}

10
src/pages/informationDetail/index.ts

@ -0,0 +1,10 @@ @@ -0,0 +1,10 @@
const _app = getApp<IAppOption>();
Page({
data: {
doc: '1',
},
onLoad() {},
});
export {};

25
src/pages/informationDetail/index.wxml

@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
<view class="page">
<view class="title">70年来首款新药! 信达生物替妥尤单抗国内获批上市</view>
<view class="info">
<view class="date">2025-06-17</view>
<view class="eye">
<image class="icon" src="/images/icon9.png"></image>
24
</view>
</view>
<view class="file-card">
<image class="icon" src="/images/file-icon1.png"></image>
<view class="content">关于甲状腺眼病及其疗法</view>
<view class="btn">下载</view>
</view>
<view class="mp-html">
<mp-html content="{{doc}}"></mp-html>
</view>
<view class="page-footer">
<image class="avatar" src="/images/icon10.png"></image>
<view class="title">TED规范化诊治中心</view>
<view class="icon" src="/images/icon8.png"></view>
</view>
</view>

5
src/pages/login/index.json

@ -1,7 +1,6 @@ @@ -1,7 +1,6 @@
{
"navigationStyle": "custom",
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
"van-nav-bar": "@vant/weapp/nav-bar/index",
"van-popup": "@vant/weapp/popup/index"
"van-divider": "@vant/weapp/divider/index"
}
}

225
src/pages/login/index.scss

@ -1,143 +1,132 @@ @@ -1,143 +1,132 @@
page {
background-color: rgba(247, 246, 250, 1);
}
.page {
position: relative;
padding: 0 70rpx 100rpx;
.logo {
position: absolute;
left: 32rpx;
width: 327rpx;
max-height: 100rpx;
display: block;
margin: 0 auto;
width: 164rpx;
height: 164rpx;
border-radius: 24rpx;
}
.container {
margin-top: 336rpx;
padding: 64rpx 32rpx 0;
background: linear-gradient(to bottom, rgba(255, 255, 255, 0.76) 0%, #ffffff 100%) no-repeat top center/100% 186rpx;
border-radius: 32rpx;
.tel {
.input {
padding: 24rpx 48rpx;
background-color: #f4f7fa;
border-radius: 96rpx;
font-size: 32rpx;
}
.place-input {
color: #babdc1;
.page-title {
display: block;
margin: 32rpx auto 0;
width: 510rpx;
height: 54rpx;
}
.protocol {
margin-top: 32rpx;
.p-title {
font-size: 36rpx;
color: rgba(105, 104, 110, 1);
font-weight: bold;
}
.p-content {
margin-top: 20rpx;
font-size: 32rpx;
color: rgba(105, 104, 110, 1);
line-height: 64rpx;
.link {
color: rgba(140, 117, 208, 1);
}
}
.code-row {
margin-top: 32rpx;
}
.phone {
margin-top: 46rpx;
height: 88rpx;
font-size: 32rpx;
color: rgba(255, 255, 255, 1);
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(89deg, #8c75d0 0%, #b7bdff 100%);
border-radius: 84rpx 84rpx 84rpx 84rpx;
}
.divider {
margin: 80rpx 150rpx 0;
.van-divider {
color: rgba(173, 172, 178, 1);
}
}
.tel-btn {
margin: 0 auto;
padding: 4rpx 0;
width: 266rpx;
display: flex;
align-items: center;
justify-content: center;
gap: 12rpx;
background: #fff;
border-radius: 24rpx;
font-size: 24rpx;
color: rgba(173, 172, 178, 1);
.icon {
width: 40rpx;
height: 40rpx;
}
}
.form {
margin-top: 50rpx;
.form-row {
margin-bottom: 32rpx;
display: flex;
justify-content: space-between;
align-items: center;
gap: 30rpx;
background-color: #f4f7fa;
border-radius: 96rpx;
.code {
padding: 12rpx 12rpx 12rpx 32rpx;
background-color: rgba(255, 255, 255, 1);
border-radius: 132rpx;
.input {
flex: 1;
padding: 24rpx 48rpx;
line-height: 60rpx;
height: 60rpx;
font-size: 32rpx;
}
.place-code {
color: #babdc1;
.place-input {
color: rgba(173, 172, 178, 0.6);
}
.btn {
flex-shrink: 0;
padding: 24rpx;
width: 7em;
text-align: center;
color: #3795f7;
font-size: 32rpx;
border-radius: 96rpx;
padding: 0 24rpx;
height: 60rpx;
font-size: 28rpx;
color: rgba(140, 117, 208, 1);
display: flex;
align-items: center;
justify-content: center;
border-radius: 20rpx;
}
}
.protool {
margin-top: 56rpx;
display: flex;
align-items: center;
font-size: 28rpx;
color: #999;
.radio {
transform: scale(0.7);
}
.link {
color: #3795f7;
}
}
.submit {
margin-top: 70rpx;
text-align: center;
font-size: 36rpx;
color: #3795f7;
line-height: 84rpx;
border: 1px solid rgba(55, 149, 247, 0.2);
border-radius: 96rpx 96rpx 96rpx 96rpx;
}
.tel-btn {
margin-top: 32rpx;
text-align: center;
font-size: 36rpx;
color: #ffffff;
line-height: 88rpx;
border-radius: 96rpx 96rpx 96rpx 96rpx;
background: linear-gradient(90deg, #134df6 16%, #3795f7 100%);
}
.visitor {
margin-top: 236rpx;
margin-top: 50rpx;
height: 84rpx;
font-size: 32rpx;
color: rgba(140, 117, 208, 1);
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
line-height: 1;
color: #3795f7;
border-radius: 84rpx 84rpx 84rpx 84rpx;
border: 1px solid rgba(140, 117, 208, 1);
}
}
}
.popup {
padding: 33rpx 0 0;
.popup-container {
padding: 64rpx 44rpx 10rpx;
width: 622rpx;
box-sizing: border-box;
background: linear-gradient(180deg, #e7f8ff 0%, #ffffff 100%);
border-radius: 32rpx;
position: relative;
.content {
font-size: 36rpx;
color: #65686c;
text-align: center;
.link {
color: #3795f7;
.signature {
margin-top: 46rpx;
font-size: 28rpx;
color: rgba(161, 164, 172, 1);
line-height: 48rpx;
.row {
margin-top: 24rpx;
display: flex;
gap: 16rpx;
.check {
margin-top: 6rpx;
flex-shrink: 0;
width: 36rpx;
height: 36rpx;
}
}
.conform {
margin-top: 48rpx;
height: 88rpx;
text-align: center;
background: #3795f7;
line-height: 86rpx;
font-size: 36rpx;
color: #ffffff;
border-radius: 96rpx 96rpx 96rpx 96rpx;
}
.cancel {
padding: 32rpx 0;
font-size: 32rpx;
color: #3795f7;
text-align: center;
.link {
color: rgba(140, 117, 208, 1);
}
}
}

175
src/pages/login/index.ts

@ -1,170 +1,123 @@ @@ -1,170 +1,123 @@
const app = getApp<IAppOption>();
let timer: number | null = 0;
const app = getApp<IAppOption>()
let timer = null as null | number
Page({
data: {
menuButtonInfo: {},
showTel: false,
mobile: '',
code: '',
protool: false,
codeText: '发送验证码',
back: false,
codeText: '发送验证码',
type: '',
show: false,
},
onLoad(options) {
this.setData({
back: options.back === '1',
});
},
onShow() {
wx.hideShareMenu();
check1: false,
check2: false,
check3: false,
},
onLoad() {},
getCode() {
if (timer) return;
const mobile = this.data.mobile;
if (timer) return
const mobile = this.data.mobile
if (!mobile) {
wx.showToast({
title: '手机号不能为空',
icon: 'none',
});
return;
})
return
}
// 验证手机号
if (!/^1[3-9,]\d{9}$/.test(mobile)) {
wx.showToast({
title: '手机号格式不正确',
icon: 'none',
});
return;
})
return
}
wx.ajax({
method: 'POST',
url: '?r=shizhong/login/send-verify-code',
url: '?r=wtx/login/send-verify-code',
data: {
mobile,
},
}).then(() => {
}).then((_res) => {
wx.showToast({
icon: 'none',
title: '验证码已发送~',
});
let time = 60;
})
let time = 60
timer = setInterval(() => {
time--;
time--
this.setData({
codeText: `${time}s后重新发送`,
});
})
if (time <= 0) {
clearInterval(timer as number);
timer = null;
clearInterval(timer as number)
timer = null
this.setData({
codeText: '发送验证码',
});
})
}
}, 1000);
});
}, 1000)
})
},
handleSubmit() {
const { show, mobile, code, protool } = this.data;
if (!protool && !show) {
this.setData({
type: 'login',
show: true,
});
return;
} else if (show) {
this.setData({
show: false,
protool: true,
});
}
if (!mobile) {
wx.showToast({
title: '请输入手机号',
icon: 'none',
});
return;
}
if (!code) {
handleDocRule() {
const { check1, check2, check3 } = this.data
return new Promise((resolve) => {
if (check1 && check2 && check3) {
return resolve(true)
}
wx.showToast({
title: '请输入验证码',
title: '请同意相关协议',
icon: 'none',
});
return;
}
})
})
},
async handleSubmit() {
await this.handleDocRule()
const { mobile, code } = this.data
wx.ajax({
method: 'POST',
url: '?r=shizhong/login/reg-login',
url: '?r=wtx/login/reg-login',
data: {
mobile,
code,
},
}).then(() => {
this.submitCallback();
});
}).then((_res) => {
this.submitCallback()
})
},
handleWxSubmit(e: any) {
const { show, protool } = this.data;
if (!protool && !show) {
this.setData({
type: 'phone',
show: true,
});
return;
} else if (show) {
this.setData({
show: false,
protool: true,
});
}
const { iv, encryptedData } = e.detail;
handleWxSubmit(e: WechatMiniprogram.CustomEvent) {
const { iv, encryptedData } = e.detail
if (iv && encryptedData) {
wx.ajax({
method: 'POST',
url: '?r=shizhong/login/wx-reg-login',
url: '?r=wtx/login/wx-reg-login',
data: {
iv: encodeURIComponent(iv),
encryptedData: encodeURIComponent(encryptedData),
},
}).then(() => {
this.submitCallback();
});
}).then((_res) => {
this.submitCallback()
})
}
},
submitCallback() {
app.globalData.isLogin = 1;
const backPath = app.globalData.backPath;
wx.reLaunch({ url: backPath || '/pages/home/index' });
app.globalData.backPath = '';
app.getUserInfo(2).then((res) => {
if (res.PatientId) {
wx.reLaunch({
url: `/patient/pages/index/index`,
})
} else {
wx.navigateTo({
url: `/patient/pages/entryInfo/index?aid=${res.applyIntentionId}`,
})
}
})
},
handleProtool() {
handleShowTel() {
this.setData({
protool: !this.data.protool,
});
},
handleNavProtool() {
wx.navigateTo({ url: `/pages/protocol/index` });
},
handleVisitor() {
if (app.globalData.isLogin !== 1) {
app.globalData.isLogin = 999;
app.globalData.backPath = '';
}
wx.reLaunch({
url: '/pages/home/index',
});
},
handleCancel() {
this.setData({
show: false,
});
},
handleBack() {
wx.navigateBack();
showTel: !this.data.showTel,
})
},
});
})
export {};
export {}

108
src/pages/login/index.wxml

@ -1,73 +1,67 @@ @@ -1,73 +1,67 @@
<van-nav-bar
wx:if="{{back}}"
title=""
border="{{false}}"
custom-style="background:transparent"
bind:click-left="handleBack"
fixed
>
<van-icon name="arrow-left" slot="left" color="#000" size="46rpx" />
</van-nav-bar>
<view
class="page"
style="background: url('{{imageUrl}}login-bg.png?t={{Timestamp}}') no-repeat top center/100% 624rpx;padding-top:{{menuButtonInfo.bottom}}px;"
style="padding-top: {{pageTop + 60}}px;background:url('/images/bg1.png') no-repeat top center/100% 484rpx;"
>
<image
class="logo"
style="top:{{menuButtonInfo.top}}px"
mode="widthFix"
src="{{imageUrl}}home-logo.png?t={{Timestamp}}"
></image>
<view class="container">
<view class="tel">
<image class="logo" src="/images/logo1.png"></image>
<image class="page-title" src="/images/title1.png"></image>
<view class="protocol">
<view class="p-title">尊敬的医生您好</view>
<view class="p-content">
在您加入TED规范化诊治中心之前,请您阅读并充分理解
<text class="link">《隐私协议保护政策》</text>
,了解您的权益及相关数据处理方法,我们将严格按照法律法规及
<text class="link">《隐私协议保护政策》</text>
的相关规定,保证您的个人信息不受侵犯。
</view>
</view>
<button
wx:if="{{check1 && check2 && check3}}"
class="phone"
open-type="getPhoneNumber"
bindgetphonenumber="handleWxSubmit"
>
手机号一键登录
</button>
<button wx:else class="phone" bind:tap="handleDocRule">手机号一键登录</button>
<view class="divider">
<van-divider class="van-divider" contentPosition="center">或者</van-divider>
</view>
<view class="tel-btn" bind:tap="handleShowTel">
<image class="icon" src="/images/icon1.png"></image>
手机号验证码
</view>
<view class="form" wx:if="{{showTel}}">
<view class="form-row">
<input
class="input"
placeholder-class="place-input"
type="number"
maxlength="11"
placeholder="请输入您的手机号"
model:value="{{mobile}}"
placeholder-class="place-input"
class="input"
placeholder="请输入手机号"
/>
</view>
<view class="code-row">
<view class="form-row">
<input
type="text"
placeholder="请输入验证码"
class="code"
placeholder-class="place-code"
model:value="{{code}}"
class="input"
medal:value="{{code}}"
placeholder-class="place-input"
type="number"
maxlength="6"
placeholder="请输入验证码"
/>
<view class="btn" bind:tap="getCode">{{codeText}}</view>
</view>
<view class="protool">
<radio class="radio" color="#3795F7" checked="{{protool}}" bind:tap="handleProtool"></radio>
我已阅读并同意
<text class="link" bind:tap="handleNavProtool">《用户隐私协议》</text>
</view>
<view class="submit" bind:tap="handleSubmit">手机验证码登录</view>
<button wx:if="{{protool}}" class="tel-btn" open-type="getPhoneNumber" bindgetphonenumber="handleWxSubmit">
手机号一键快捷登录
</button>
<button wx:else class="tel-btn" bind:tap="handleWxSubmit">手机号一键快捷登录</button>
<view class="visitor" bind:tap="handleVisitor" wx:if="{{!back}}">
游客访问
<van-icon name="arrow" />
</view>
<view class="submit" bind:tap="handleSubmit">立即加入</view>
</view>
</view>
<van-popup show="{{ show }}" bind:close="onClose" round style="--popup-background-color: transparent">
<view class="popup">
<view class="popup-container">
<div class="content">
已阅读并同意
<text class="link" bind:tap="handleNavProtool">《用户隐私协议》</text>
</div>
<button wx:if="{{type==='phone'}}" class="conform" open-type="getPhoneNumber" bindgetphonenumber="handleWxSubmit">
同意并继续
</button>
<button wx:else class="conform" bind:tap="handleSubmit">同意并继续</button>
<view class="cancel" bind:tap="handleCancel">取消</view>
<view class="signature">
<view class="row">
<image class="check" src="/images/checkbox-active.png"></image>
<view class="r-content">
我特此同意依照此
<text class="link">《隐私协议保护政策》</text>
规定收集我的个人敏感信息
</view>
</view>
</view>
</van-popup>
</view>

5
src/pages/message/index.json

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
{
"navigationStyle": "default",
"navigationBarTitleText": "消息",
"usingComponents": {}
}

57
src/pages/message/index.scss

@ -0,0 +1,57 @@ @@ -0,0 +1,57 @@
page {
background-color: rgba(247, 246, 250, 1);
}
.page {
padding: 32rpx 30rpx;
.card1 {
margin-bottom: 32rpx;
padding: 0 32rpx;
border-radius: 24rpx;
background-color: #fff;
.title {
padding: 32rpx 0 24rpx;
font-size: 32rpx;
color: rgba(33, 29, 46, 1);
font-weight: bold;
}
.content {
padding-bottom: 32rpx;
font-size: 32rpx;
color: rgba(105, 104, 110, 1);
line-height: 48rpx;
border-bottom: 1px solid rgba(173, 172, 178, 0.1);
}
.c-footer {
padding: 24rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
.btn {
font-size: 32rpx;
color: rgba(105, 104, 110, 1);
}
.more {
width: 16rpx;
height: 36rpx;
}
}
}
.card2 {
margin-bottom: 32rpx;
padding: 32rpx;
border-radius: 24rpx;
background-color: #fff;
.title {
font-size: 32rpx;
color: rgba(33, 29, 46, 1);
line-height: 48rpx;
font-weight: bold;
}
.photo {
margin-top: 24rpx;
width: 100%;
height: 260rpx;
border-radius: 16rpx;
}
}
}

41
src/pages/message/index.ts

@ -0,0 +1,41 @@ @@ -0,0 +1,41 @@
const _app = getApp<IAppOption>();
Page({
data: {
list: [] as any[],
pagination: {
page: 1,
pages: 1,
count: 1,
},
},
onLoad() {},
getList(newPage = 1) {
wx.ajax({
method: 'GET',
url: '?r=wtx/knowledge/list',
data: {
page: newPage,
},
}).then((res) => {
const list = res.page === 1 ? res.list : [...this.data.list, ...res.list];
this.setData({
total: res.count,
list,
pagination: {
page: res.page,
pages: res.pages,
count: res.count,
},
});
});
},
onReachBottom() {
const { page, pages } = this.data.pagination;
if (pages > page) {
this.getList(page + 1);
}
},
});
export {}

23
src/pages/message/index.wxml

@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
<view class="page">
<view class="card1">
<view class="title">项目进展更新</view>
<view class="content">
随着城市化进程的加速,城市交通拥堵问题日益严重,给人们的生活和工作带来了诸多不便。汽车尾气排放导致空气污染加剧...
</view>
<view class="c-footer">
<view class="btn">去查看</view>
<image class="more" src="/images/icon3.png"></image>
</view>
</view>
<view class="card2">
<view class="title">
随着城市化进程的加速,城市交通拥堵问题日益严重,给人们的生活和工作带来了诸多不便。汽车尾气排放导致空气污染加剧...
</view>
<image
class="photo"
mode="aspectFill"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
></image>
</view>
<pagination pagination="{{pagination}}"></pagination>
</view>

7
src/pages/my/index.json

@ -1,7 +1,4 @@ @@ -1,7 +1,4 @@
{
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
"global-toast": "/components/global-toast/index",
"uploadFile": "/components/uploadFile/index"
}
"navigationStyle": "custom",
"usingComponents": {}
}

128
src/pages/my/index.scss

@ -1,90 +1,96 @@ @@ -1,90 +1,96 @@
page {
background-color: #f3f4f5;
background-color: rgba(247, 247, 250, 1);
}
.page {
background: linear-gradient(180deg, #d2f1fe 0%, rgba(244, 248, 249, 0) 100%) no-repeat top center / 100% 682rpx;
.login {
margin: 32rpx 62rpx 0;
padding: 52rpx 30rpx;
.user {
display: flex;
gap: 24rpx;
.upload {
align-items: center;
.avatar-wrapper {
flex-shrink: 0;
padding: 0;
margin: 0;
width: 124rpx;
height: 124rpx;
outline: none;
border: 2px solid #fff;
border-radius: 50%;
&::after {
border: none;
}
.avatar {
width: 160rpx;
height: 160rpx;
width: 100%;
height: 100%;
border-radius: 50%;
}
}
.user {
padding-top: 10rpx;
.wrap {
flex: 1;
.name {
padding-left: 24rpx;
.nickname {
font-size: 40rpx;
color: #141515;
font-weight: bold;
line-height: 1;
word-break: break-all;
.icon {
vertical-align: -4rpx;
width: 36rpx;
height: 36rpx;
}
color: rgba(1, 1, 5, 1);
}
.tel {
margin-top: 8rpx;
font-size: 28rpx;
color: #999999;
line-height: 40rpx;
}
.status {
margin-top: 8rpx;
.hostipal {
margin-top: 16rpx;
line-height: 1;
font-size: 28rpx;
color: #999999;
line-height: 40rpx;
color: rgba(173, 172, 178, 1);
.tag {
display: inline-block;
font-size: 24rpx;
color: rgba(255, 255, 255, 1);
padding: 2rpx 10rpx;
background: #8c75d0;
border-radius: 8rpx 8rpx 8rpx 8rpx;
}
}
}
.switch {
display: flex;
align-items: center;
font-size: 28rpx;
color: #999999;
}
}
.no-login {
margin: 32rpx 62rpx 0;
display: flex;
align-items: center;
gap: 24rpx;
.avatar {
width: 160rpx;
height: 160rpx;
}
.name {
font-size: 40rpx;
color: #3795f7;
.edit {
flex-shrink: 0;
width: 48rpx;
height: 48rpx;
}
}
.nav-list {
margin: 70rpx 32rpx 0;
padding: 0 30rpx;
background: #ffffff;
border-radius: 16rpx 16rpx 16rpx 16rpx;
border: 2rpx solid #ffffff;
.nav-item {
.list {
margin-top: 32rpx;
padding: 0 32rpx;
border-radius: 24rpx;
background-color: #fff;
.list-item {
padding: 32rpx 0;
border-bottom: 1px solid rgba(173, 172, 178, 0.1);
display: flex;
align-items: center;
border-bottom: 1px solid #f0f0f0;
font-size: 36rpx;
color: #000000;
gap: 20rpx;
&:last-of-type {
border: none;
}
.icon {
margin-right: 20rpx;
width: 48rpx;
height: 48rpx;
width: 44rpx;
height: 44rpx;
}
.content {
font-size: 32rpx;
color: rgba(33, 29, 46, 1);
line-height: 40rpx;
}
.more {
width: 16rpx;
height: 36rpx;
}
}
}
.login-out {
margin-top: 48rpx;
height: 84rpx;
border-radius: 130rpx 130rpx 130rpx 130rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: rgba(33, 29, 46, 1);
background-color: #fff;
}
}

7
src/pages/my/index.ts

@ -8,10 +8,9 @@ Page({ @@ -8,10 +8,9 @@ Page({
userInfo: {} as any,
},
onShow() {
wx.showTabBar({});
app.waitLogin().then(() => {
app.getUserInfo(this);
});
// app.waitLogin().then(() => {
// app.getUserInfo(this);
// });
},
handleCollection() {
wx.navigateTo({

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save