diff --git a/project.config.json b/project.config.json index 1f018b2..625d498 100644 --- a/project.config.json +++ b/project.config.json @@ -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 @@ "tabIndent": "insertSpaces", "tabSize": 2 }, - "libVersion": "2.32.3", + "libVersion": "3.7.7", "ignore": [], "packOptions": { "ignore": [ @@ -61,5 +71,5 @@ } ] }, - "appid": "wxbdf6f933281b1eb4" + "appid": "wxf9ce8010f1ad24aa" } \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index 31fdf95..b3420b5 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -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 @@ "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 @@ ] } }, - "libVersion": "3.7.7" + "libVersion": "3.8.9" } \ No newline at end of file diff --git a/src/app.json b/src/app.json index 711dd87..2d27120 100644 --- a/src/app.json +++ b/src/app.json @@ -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 @@ }, "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 @@ { "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 @@ "resolveAlias": { "@/*": "/*" }, + "usingComponents": { + "pagination": "/components/pagination/index", + "van-icon": "@vant/weapp/icon/index" + }, "rendererOptions": { "skyline": { "defaultDisplayBlock": true, diff --git a/src/app.ts b/src/app.ts index 5bf3813..74c45eb 100644 --- a/src/app.ts +++ b/src/app.ts @@ -15,10 +15,11 @@ App({ 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({ 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; + // }); }, }); diff --git a/src/components/navbar/index.json b/src/components/navbar/index.json new file mode 100644 index 0000000..9017265 --- /dev/null +++ b/src/components/navbar/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-nav-bar": "@vant/weapp/nav-bar/index" + } +} diff --git a/src/components/navbar/index.scss b/src/components/navbar/index.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/components/navbar/index.ts b/src/components/navbar/index.ts new file mode 100644 index 0000000..0cb5894 --- /dev/null +++ b/src/components/navbar/index.ts @@ -0,0 +1,50 @@ +const app = getApp() + +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', {}, {}) + }, + }, +}) diff --git a/src/components/navbar/index.wxml b/src/components/navbar/index.wxml new file mode 100644 index 0000000..26fabe6 --- /dev/null +++ b/src/components/navbar/index.wxml @@ -0,0 +1,17 @@ + + + + + diff --git a/src/images/badge.png b/src/images/badge.png deleted file mode 100644 index 1a9d042..0000000 Binary files a/src/images/badge.png and /dev/null differ diff --git a/src/images/banner1.png b/src/images/banner1.png new file mode 100644 index 0000000..8a39e44 Binary files /dev/null and b/src/images/banner1.png differ diff --git a/src/images/bg1.png b/src/images/bg1.png new file mode 100644 index 0000000..c551713 Binary files /dev/null and b/src/images/bg1.png differ diff --git a/src/images/bg2.png b/src/images/bg2.png new file mode 100644 index 0000000..cff4d0d Binary files /dev/null and b/src/images/bg2.png differ diff --git a/src/images/bg3.png b/src/images/bg3.png new file mode 100644 index 0000000..f915859 Binary files /dev/null and b/src/images/bg3.png differ diff --git a/src/images/checkbox-active.png b/src/images/checkbox-active.png new file mode 100644 index 0000000..2dff512 Binary files /dev/null and b/src/images/checkbox-active.png differ diff --git a/src/images/empty-1.png b/src/images/empty-1.png deleted file mode 100644 index a8aa419..0000000 Binary files a/src/images/empty-1.png and /dev/null differ diff --git a/src/images/empty-search.png b/src/images/empty-search.png deleted file mode 100644 index a8aa419..0000000 Binary files a/src/images/empty-search.png and /dev/null differ diff --git a/src/images/file-icon1.png b/src/images/file-icon1.png new file mode 100644 index 0000000..9cc960c Binary files /dev/null and b/src/images/file-icon1.png differ diff --git a/src/images/fold-up.png b/src/images/fold-up.png deleted file mode 100644 index a64f696..0000000 Binary files a/src/images/fold-up.png and /dev/null differ diff --git a/src/images/home-bg.png b/src/images/home-bg.png deleted file mode 100644 index bdb5bd1..0000000 Binary files a/src/images/home-bg.png and /dev/null differ diff --git a/src/images/home-card-bg.png b/src/images/home-card-bg.png deleted file mode 100644 index cb768b6..0000000 Binary files a/src/images/home-card-bg.png and /dev/null differ diff --git a/src/images/home-logo.png b/src/images/home-logo.png deleted file mode 100644 index 3b40316..0000000 Binary files a/src/images/home-logo.png and /dev/null differ diff --git a/src/images/home-title.png b/src/images/home-title.png deleted file mode 100644 index 0e2433c..0000000 Binary files a/src/images/home-title.png and /dev/null differ diff --git a/src/images/icon-close.png b/src/images/icon-close.png deleted file mode 100644 index 5934bee..0000000 Binary files a/src/images/icon-close.png and /dev/null differ diff --git a/src/images/icon-collection-active.png b/src/images/icon-collection-active.png deleted file mode 100644 index 5d90bde..0000000 Binary files a/src/images/icon-collection-active.png and /dev/null differ diff --git a/src/images/icon-collection.png b/src/images/icon-collection.png deleted file mode 100644 index e3c680b..0000000 Binary files a/src/images/icon-collection.png and /dev/null differ diff --git a/src/images/icon-collection1.png b/src/images/icon-collection1.png deleted file mode 100644 index 5c049c0..0000000 Binary files a/src/images/icon-collection1.png and /dev/null differ diff --git a/src/images/icon-directory.png b/src/images/icon-directory.png deleted file mode 100644 index b31527e..0000000 Binary files a/src/images/icon-directory.png and /dev/null differ diff --git a/src/images/icon-edit.png b/src/images/icon-edit.png deleted file mode 100644 index a5b54cc..0000000 Binary files a/src/images/icon-edit.png and /dev/null differ diff --git a/src/images/icon-eye.png b/src/images/icon-eye.png deleted file mode 100644 index a96ca4b..0000000 Binary files a/src/images/icon-eye.png and /dev/null differ diff --git a/src/images/icon-phone.png b/src/images/icon-phone.png deleted file mode 100644 index 2bc1ea2..0000000 Binary files a/src/images/icon-phone.png and /dev/null differ diff --git a/src/images/icon-pic.png b/src/images/icon-pic.png deleted file mode 100644 index a9752d9..0000000 Binary files a/src/images/icon-pic.png and /dev/null differ diff --git a/src/images/icon-play.png b/src/images/icon-play.png deleted file mode 100644 index 3ae7ad9..0000000 Binary files a/src/images/icon-play.png and /dev/null differ diff --git a/src/images/icon-prev.png b/src/images/icon-prev.png deleted file mode 100644 index e73b2b9..0000000 Binary files a/src/images/icon-prev.png and /dev/null differ diff --git a/src/images/icon-search.png b/src/images/icon-search.png deleted file mode 100644 index e12c699..0000000 Binary files a/src/images/icon-search.png and /dev/null differ diff --git a/src/images/icon-stop.png b/src/images/icon-stop.png deleted file mode 100644 index 02c9aa6..0000000 Binary files a/src/images/icon-stop.png and /dev/null differ diff --git a/src/images/icon1.png b/src/images/icon1.png new file mode 100644 index 0000000..b0bcb7f Binary files /dev/null and b/src/images/icon1.png differ diff --git a/src/images/icon10.png b/src/images/icon10.png new file mode 100644 index 0000000..a46f882 Binary files /dev/null and b/src/images/icon10.png differ diff --git a/src/images/icon2.png b/src/images/icon2.png new file mode 100644 index 0000000..360dbd6 Binary files /dev/null and b/src/images/icon2.png differ diff --git a/src/images/icon3.png b/src/images/icon3.png new file mode 100644 index 0000000..dd815b7 Binary files /dev/null and b/src/images/icon3.png differ diff --git a/src/images/icon4.png b/src/images/icon4.png new file mode 100644 index 0000000..9b87869 Binary files /dev/null and b/src/images/icon4.png differ diff --git a/src/images/icon5.png b/src/images/icon5.png new file mode 100644 index 0000000..7e8a884 Binary files /dev/null and b/src/images/icon5.png differ diff --git a/src/images/icon6.png b/src/images/icon6.png new file mode 100644 index 0000000..e2826d6 Binary files /dev/null and b/src/images/icon6.png differ diff --git a/src/images/icon7.png b/src/images/icon7.png new file mode 100644 index 0000000..32f0bba Binary files /dev/null and b/src/images/icon7.png differ diff --git a/src/images/icon8.png b/src/images/icon8.png new file mode 100644 index 0000000..b612e2e Binary files /dev/null and b/src/images/icon8.png differ diff --git a/src/images/icon9.png b/src/images/icon9.png new file mode 100644 index 0000000..1e11a30 Binary files /dev/null and b/src/images/icon9.png differ diff --git a/src/images/item-tip-close.png b/src/images/item-tip-close.png deleted file mode 100644 index c414d84..0000000 Binary files a/src/images/item-tip-close.png and /dev/null differ diff --git a/src/images/login-bg.png b/src/images/login-bg.png deleted file mode 100644 index dd52936..0000000 Binary files a/src/images/login-bg.png and /dev/null differ diff --git a/src/images/login-popup-badge.png b/src/images/login-popup-badge.png deleted file mode 100644 index 7bcac54..0000000 Binary files a/src/images/login-popup-badge.png and /dev/null differ diff --git a/src/images/login-popup-title.png b/src/images/login-popup-title.png deleted file mode 100644 index d069750..0000000 Binary files a/src/images/login-popup-title.png and /dev/null differ diff --git a/src/images/logo1.png b/src/images/logo1.png new file mode 100644 index 0000000..a09cc79 Binary files /dev/null and b/src/images/logo1.png differ diff --git a/src/images/mpPic.jpg b/src/images/mpPic.jpg deleted file mode 100644 index 88c9e60..0000000 Binary files a/src/images/mpPic.jpg and /dev/null differ diff --git a/src/images/my-list-icon1.png b/src/images/my-list-icon1.png deleted file mode 100644 index cdc4760..0000000 Binary files a/src/images/my-list-icon1.png and /dev/null differ diff --git a/src/images/my-list-icon2.png b/src/images/my-list-icon2.png deleted file mode 100644 index af1e1d1..0000000 Binary files a/src/images/my-list-icon2.png and /dev/null differ diff --git a/src/images/my-list-icon3.png b/src/images/my-list-icon3.png deleted file mode 100644 index 13a3b39..0000000 Binary files a/src/images/my-list-icon3.png and /dev/null differ diff --git a/src/images/my-list-icon4.png b/src/images/my-list-icon4.png deleted file mode 100644 index abb7fe9..0000000 Binary files a/src/images/my-list-icon4.png and /dev/null differ diff --git a/src/images/place.png b/src/images/place.png deleted file mode 100644 index 15f30f8..0000000 Binary files a/src/images/place.png and /dev/null differ diff --git a/src/images/popup1-bg.png b/src/images/popup1-bg.png deleted file mode 100644 index 9130378..0000000 Binary files a/src/images/popup1-bg.png and /dev/null differ diff --git a/src/images/qyPic.jpg b/src/images/qyPic.jpg deleted file mode 100644 index 5c08e8f..0000000 Binary files a/src/images/qyPic.jpg and /dev/null differ diff --git a/src/images/relove.png b/src/images/relove.png deleted file mode 100644 index e01d5b4..0000000 Binary files a/src/images/relove.png and /dev/null differ diff --git a/src/images/slogan-bg.png b/src/images/slogan-bg.png deleted file mode 100644 index b6eabb8..0000000 Binary files a/src/images/slogan-bg.png and /dev/null differ diff --git a/src/images/tabbar/tab-active1.png b/src/images/tabbar/tab-active1.png index fee4acb..28c3f4a 100644 Binary files a/src/images/tabbar/tab-active1.png and b/src/images/tabbar/tab-active1.png differ diff --git a/src/images/tabbar/tab-active2.png b/src/images/tabbar/tab-active2.png index ab74304..cc363c9 100644 Binary files a/src/images/tabbar/tab-active2.png and b/src/images/tabbar/tab-active2.png differ diff --git a/src/images/tabbar/tab-active3.png b/src/images/tabbar/tab-active3.png new file mode 100644 index 0000000..8ee4e8d Binary files /dev/null and b/src/images/tabbar/tab-active3.png differ diff --git a/src/images/tabbar/tab1.png b/src/images/tabbar/tab1.png index f383c9a..afd2554 100644 Binary files a/src/images/tabbar/tab1.png and b/src/images/tabbar/tab1.png differ diff --git a/src/images/tabbar/tab2.png b/src/images/tabbar/tab2.png index 01c5646..08c08a5 100644 Binary files a/src/images/tabbar/tab2.png and b/src/images/tabbar/tab2.png differ diff --git a/src/images/tabbar/tab3.png b/src/images/tabbar/tab3.png new file mode 100644 index 0000000..acf1f00 Binary files /dev/null and b/src/images/tabbar/tab3.png differ diff --git a/src/images/title1.png b/src/images/title1.png new file mode 100644 index 0000000..57ad7cb Binary files /dev/null and b/src/images/title1.png differ diff --git a/src/images/title2.png b/src/images/title2.png new file mode 100644 index 0000000..f6c6107 Binary files /dev/null and b/src/images/title2.png differ diff --git a/src/images/title3.png b/src/images/title3.png new file mode 100644 index 0000000..49dab3b Binary files /dev/null and b/src/images/title3.png differ diff --git a/src/images/topic-bg.png b/src/images/topic-bg.png deleted file mode 100644 index 01bcc43..0000000 Binary files a/src/images/topic-bg.png and /dev/null differ diff --git a/src/images/topic-card-bg.png b/src/images/topic-card-bg.png deleted file mode 100644 index dfc03ab..0000000 Binary files a/src/images/topic-card-bg.png and /dev/null differ diff --git a/src/images/topic-end-bg.png b/src/images/topic-end-bg.png deleted file mode 100644 index 46a30cb..0000000 Binary files a/src/images/topic-end-bg.png and /dev/null differ diff --git a/src/images/topic-start-badge.png b/src/images/topic-start-badge.png deleted file mode 100644 index 5358a16..0000000 Binary files a/src/images/topic-start-badge.png and /dev/null differ diff --git a/src/images/topic-start-code1.png b/src/images/topic-start-code1.png deleted file mode 100644 index d715078..0000000 Binary files a/src/images/topic-start-code1.png and /dev/null differ diff --git a/src/images/topic-start-code2.png b/src/images/topic-start-code2.png deleted file mode 100644 index 8b87823..0000000 Binary files a/src/images/topic-start-code2.png and /dev/null differ diff --git a/src/images/topic-start.png b/src/images/topic-start.png deleted file mode 100644 index 4d75520..0000000 Binary files a/src/images/topic-start.png and /dev/null differ diff --git a/src/images/user.png b/src/images/user.png deleted file mode 100644 index e9dff94..0000000 Binary files a/src/images/user.png and /dev/null differ diff --git a/src/pages/home/index.json b/src/pages/home/index.json index 69181e7..e231b01 100644 --- a/src/pages/home/index.json +++ b/src/pages/home/index.json @@ -1,5 +1,6 @@ { "usingComponents": { - "van-popup": "@vant/weapp/popup/index" + "van-popup": "@vant/weapp/popup/index", + "navbar": "/components/navbar/index" } } diff --git a/src/pages/home/index.scss b/src/pages/home/index.scss index d71aa43..ba7d375 100644 --- a/src/pages/home/index.scss +++ b/src/pages/home/index.scss @@ -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; + } + } + } + } + } } } } diff --git a/src/pages/home/index.ts b/src/pages/home/index.ts index b33e438..747f872 100644 --- a/src/pages/home/index.ts +++ b/src/pages/home/index.ts @@ -1,135 +1,9 @@ const app = getApp(); 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(() => {}); }, }); diff --git a/src/pages/home/index.wxml b/src/pages/home/index.wxml index aa56a07..dfe7c3e 100644 --- a/src/pages/home/index.wxml +++ b/src/pages/home/index.wxml @@ -1,79 +1,68 @@ + + + + - - - - 基于循证医学和临床指南等,构建科学/系统/高效的健康信息平台,助力人人都做家庭健康师,提高预期寿命和健康寿命,减短带病生存期。 + + + + XX医生 + + 北京天坛医院 + 三甲 + + - - - + - - - - - - - - {{item.CateName}} - {{item.Intro}} + + + 您有 + 5 + 条新消息待查看 - - 留言板 - - 提交 - 提交 + + - - - - - - - - 开始 - 关闭 + + + + + 查看全部 + + + + + + + 替妥尤单抗的作用机制、适用场景、使用方式 + + 2025-06-17 + + + + 24 + + + + + + + - + diff --git a/src/pages/information/index.json b/src/pages/information/index.json new file mode 100644 index 0000000..8d882c9 --- /dev/null +++ b/src/pages/information/index.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "navbar":"/components/navbar/index" + } +} diff --git a/src/pages/information/index.scss b/src/pages/information/index.scss new file mode 100644 index 0000000..010d8b4 --- /dev/null +++ b/src/pages/information/index.scss @@ -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; + } + } + } + } + } + } +} diff --git a/src/pages/information/index.ts b/src/pages/information/index.ts new file mode 100644 index 0000000..beff1f2 --- /dev/null +++ b/src/pages/information/index.ts @@ -0,0 +1,46 @@ +const _app = getApp(); + +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 {}; diff --git a/src/pages/information/index.wxml b/src/pages/information/index.wxml new file mode 100644 index 0000000..2e11d02 --- /dev/null +++ b/src/pages/information/index.wxml @@ -0,0 +1,35 @@ + + + + + 全部 + 安全性 + 有效性 + + + + + 替妥尤单抗的作用机制、适用场景、使用方式 + + 2025-06-17 + + + + 24 + + + + + + + + + + + diff --git a/src/pages/informationDetail/index.json b/src/pages/informationDetail/index.json new file mode 100644 index 0000000..0759c99 --- /dev/null +++ b/src/pages/informationDetail/index.json @@ -0,0 +1,7 @@ +{ + "navigationStyle": "default", + "navigationBarTitleText": "资料库详情页", + "usingComponents": { + "mp-html": "mp-html" + } +} diff --git a/src/pages/informationDetail/index.scss b/src/pages/informationDetail/index.scss new file mode 100644 index 0000000..5a1f6dd --- /dev/null +++ b/src/pages/informationDetail/index.scss @@ -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; + } + } +} diff --git a/src/pages/informationDetail/index.ts b/src/pages/informationDetail/index.ts new file mode 100644 index 0000000..7592108 --- /dev/null +++ b/src/pages/informationDetail/index.ts @@ -0,0 +1,10 @@ +const _app = getApp(); + +Page({ + data: { + doc: '1', + }, + onLoad() {}, +}); + +export {}; diff --git a/src/pages/informationDetail/index.wxml b/src/pages/informationDetail/index.wxml new file mode 100644 index 0000000..1b2a410 --- /dev/null +++ b/src/pages/informationDetail/index.wxml @@ -0,0 +1,25 @@ + + 70年来首款新药! 信达生物替妥尤单抗国内获批上市 + + 2025-06-17 + + + 24 + + + + + 关于甲状腺眼病及其疗法 + 下载 + + + + + + + + + TED规范化诊治中心 + + + diff --git a/src/pages/login/index.json b/src/pages/login/index.json index b3238b0..17c750f 100644 --- a/src/pages/login/index.json +++ b/src/pages/login/index.json @@ -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" } } diff --git a/src/pages/login/index.scss b/src/pages/login/index.scss index 386f93f..5dafb6a 100644 --- a/src/pages/login/index.scss +++ b/src/pages/login/index.scss @@ -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); } } } diff --git a/src/pages/login/index.ts b/src/pages/login/index.ts index 35ddd78..75df527 100644 --- a/src/pages/login/index.ts +++ b/src/pages/login/index.ts @@ -1,170 +1,123 @@ -const app = getApp(); -let timer: number | null = 0; +const app = getApp() +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 {} diff --git a/src/pages/login/index.wxml b/src/pages/login/index.wxml index 4b96c45..db9cbbc 100644 --- a/src/pages/login/index.wxml +++ b/src/pages/login/index.wxml @@ -1,73 +1,67 @@ - - - - - - + + + + 尊敬的医生您好 + + 在您加入TED规范化诊治中心之前,请您阅读并充分理解 + 《隐私协议保护政策》 + ,了解您的权益及相关数据处理方法,我们将严格按照法律法规及 + 《隐私协议保护政策》 + 的相关规定,保证您的个人信息不受侵犯。 + + + + + + 或者 + + + + 手机号验证码 + + + - + {{codeText}} - - - 我已阅读并同意 - 《用户隐私协议》 - - 手机验证码登录 - - - - 游客访问 - - + 立即加入 - - - - - -
- 已阅读并同意 - 《用户隐私协议》 -
- - - 取消 + + + + + 我特此同意依照此 + 《隐私协议保护政策》 + 规定收集我的个人敏感信息 + -
+
diff --git a/src/pages/message/index.json b/src/pages/message/index.json new file mode 100644 index 0000000..68af0b6 --- /dev/null +++ b/src/pages/message/index.json @@ -0,0 +1,5 @@ +{ + "navigationStyle": "default", + "navigationBarTitleText": "消息", + "usingComponents": {} +} diff --git a/src/pages/message/index.scss b/src/pages/message/index.scss new file mode 100644 index 0000000..5fe999d --- /dev/null +++ b/src/pages/message/index.scss @@ -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; + } + } +} diff --git a/src/pages/message/index.ts b/src/pages/message/index.ts new file mode 100644 index 0000000..f944e80 --- /dev/null +++ b/src/pages/message/index.ts @@ -0,0 +1,41 @@ +const _app = getApp(); + +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 {} diff --git a/src/pages/message/index.wxml b/src/pages/message/index.wxml new file mode 100644 index 0000000..742c044 --- /dev/null +++ b/src/pages/message/index.wxml @@ -0,0 +1,23 @@ + + + 项目进展更新 + + 随着城市化进程的加速,城市交通拥堵问题日益严重,给人们的生活和工作带来了诸多不便。汽车尾气排放导致空气污染加剧... + + + 去查看 + + + + + + 随着城市化进程的加速,城市交通拥堵问题日益严重,给人们的生活和工作带来了诸多不便。汽车尾气排放导致空气污染加剧... + + + + + diff --git a/src/pages/my/index.json b/src/pages/my/index.json index 5fa5f3c..b16ef3e 100644 --- a/src/pages/my/index.json +++ b/src/pages/my/index.json @@ -1,7 +1,4 @@ { - "usingComponents": { - "van-icon": "@vant/weapp/icon/index", - "global-toast": "/components/global-toast/index", - "uploadFile": "/components/uploadFile/index" - } + "navigationStyle": "custom", + "usingComponents": {} } diff --git a/src/pages/my/index.scss b/src/pages/my/index.scss index a9de4c9..cd10f55 100644 --- a/src/pages/my/index.scss +++ b/src/pages/my/index.scss @@ -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; + } } diff --git a/src/pages/my/index.ts b/src/pages/my/index.ts index f29ea60..cf94484 100644 --- a/src/pages/my/index.ts +++ b/src/pages/my/index.ts @@ -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({ diff --git a/src/pages/my/index.wxml b/src/pages/my/index.wxml index 8c6d72d..7fdb35d 100644 --- a/src/pages/my/index.wxml +++ b/src/pages/my/index.wxml @@ -1,50 +1,39 @@ - -