123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615 |
- <template>
- <view class="cnt_wrapper">
- <image class='bannerImg' src="../../static/images/1.png" alt="" srcset="" />
- <image class='title_img' src="../../static/images/2.png" mode="">
-
- <view class="content">
- <view class="searchBtn">
- <van-search shape="round" v-model="value" placeholder="搜索知识" />
- </view>
- <view class="imgBox">
- <view class="img_box img_color1">
- <!-- <img class='img_box_tu' src="../../static/images/5.png" alt="" /> -->
- <image class='img_box_tu' src="../../static/images/5.png" mode=""></image>
- <view class="imgBox_title">健康咨询</view>
- <view class='img_box_text'>优质服务 限时响应</view>
- </view>
- <view class="img_box img_color2">
- <!-- <img class='img_box_tu' src="../../static/images/6.png" alt="" /> -->
- <image class='img_box_tu' src="../../static/images/6.png" mode=""></image>
- <view class="imgBox_title">专家名医</view>
- <view class='img_box_text'>肾科医生 全国专家</view>
- </view>
- <view class="img_box img_color3">
- <!-- <img class='img_box_tu' src="../../static/images/7.png" alt="" /> -->
- <image class='img_box_tu' src="../../static/images/7.png" mode=""></image>
- <view class="imgBox_title">在线买药</view>
- <view class='img_box_text'>优惠购药 极速送达</view>
- </view>
- </view>
- <view class="health" style="">
- <view class="health_1" style="" @click="recordclick">
- <image class="health_img" src="../../static/images/11.png" mode=""></image>
- <!-- <img class="health_img" src="../../static/images/11.png" alt="" /> -->
- <view class="">健康档案</view>
- </view>
- <view class="health_1" style="" @click="healthclick">
- <!-- <img class="health_img" src="../../static/images/12.png" alt="" /> -->
- <image class="health_img" src="../../static/images/12.png" mode=""></image>
- <view class="">健康监测</view>
- </view>
- <view class="health_1" style="" @click="toCode">
- <!-- <img class="health_img" src="../../static/images/13.png" alt="" /> -->
- <image class="health_img" src="../../static/images/13.png" mode=""></image>
- <view class="">透析签到</view>
- </view>
- <view class="health_1" style="" @click="toDialysis">
- <!-- <img class="health_img" src="../../static/images/14.png" alt="" /> -->
- <image class="health_img" src="../../static/images/14.png" mode=""></image>
- <view class="">我的透析</view>
- </view>
- </view>
-
- <view class="img_bottom" style="">
- <image class="bottom" style="" src="../../static/images/15.png" mode=""></image>
- <view class="img_text">呵护每一位肾友健康</view>
- </view>
-
- <view class="knowledge" v-for="(item,index) in 6" :key='index'>
- <view class="knowledge_box" style="" @click="wenzhang_click(index)">
- <view class="box_left" style="">
- <view style="" class="knowledge_title">领透圣卫士肾友知识小科普</view>
- <view class="author" style="">
- <text class='author_1'>圣妞儿</text>
- <text class='author_1'>阅读量:xxxxx</text>
- </view>
- </view>
- <view class="box_right" style="width: 30%;">
- <!-- <img class="right_img" style="" src="../../static/images/11.png" alt="" /> -->
- <image class="right_img" style="" src="../../static/images/11.png" mode=""></image>
- </view>
- </view>
- </view>
-
- <!-- <view class="imgBox_title">
- <img class="imgtitle" @click="toCup" src="../../static/images/story.png" alt="">
- </view>
- <view class="article_list">
- <view class="list_box" v-for="li in act_li">
- <view class="title_list">
- <h3 style="font-weight: bold;">{{li.title}}</h3>
- </view>
- <view class="content_list">
- <span>{{li.content}}</span>
- </view>
- <view class="bottom_list">
- <view class="name_date">
- <img src="../../static/images/author.png" alt="..">
- <span>{{li.author}}</span>
- <span>{{li.date}}</span>
- </view>
- <view class="read">
- <img src="../../static/images/read.png" alt="">
- <span>{{li.readNum}}</span>
- </view>
- <view class="nice">
- <img src="../../static/images/nice.png" alt="">
- <span>{{li.niceNum}}</span>
- </view>
- </view>
- </view>
- </view> -->
- <van-toast id="van-toast" />
- </view>
- </view>
- </template>
-
- <script>
-
- import Toast from '@/wxcomponents/vant/toast/toast';
- import Vue from 'vue';
- import {
- mapState,
- mapGetters,
- mapActions,
- mapMutations
- } from 'vuex'
- import { login } from '../../api/api';
- export default {
- // page({
- data() {
- return {
- title: 'Hello',
- name: '',
- url: "",
- city: '',
- act_li: [{
- title: '111',
- content: '哈哈哈哈',
- author: '张三',
- date: '2022-11-2',
- readNum: '1245',
- niceNum: '2635'
- }, {
- title: '222',
- content: 'xixixi',
- author: '周小英',
- date: '2022-10-2',
- readNum: '1245',
- niceNum: '2635'
- }, {
- title: '糖尿病能吃哪些水果?',
- content: '根据最新发布的糖尿病膳食指南以及中国糖尿病医学营养治疗指南',
- author: '猪大强',
- date: '2022-10-2',
- readNum: '1245',
- niceNum: '2635'
- }]
- }
- },
- computed: {
- ...mapGetters(['getHasLogin', 'getBind'])
- },
- onLoad() {},
-
- methods: {
- // 健康监测
- healthclick(){
- wx.navigateTo({
- url:'/pages/Health_monitor/index'
- })
- },
- // 健康档案
- recordclick(){
- wx.navigateTo({
- url:'/pages/Health_record/index'
- })
- // wx.navigateTo({
- // // url:'/pages/Health_record/creatinine'
- // url:'/pages/Health_record/archives'
-
- // })
- console.log('111111');
- },
-
-
-
- wenzhang_click(index){
- console.log('用户点击取消',index);
- uni.switchTab({
- url: '/pages/my/index'
- })
- // wx.redirectTo({
- // url:'pages/dialysis/index'
- // })
- },
-
-
- getCheckSession() {
- uni.checkSession({
- success: function(res) {
-
- },
- fail: function(res) {
- console.log(res, '登录过期了')
- uni.showModal({
- title: '提示',
- content: '您尚未绑定任何就诊人,绑定后可继续操作',
- success: function(res) {
- if (res.confirm) {
- uni.switchTab({
- url: '/pages/my/index'
- })
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
-
- },
- })
- },
- getUserInfomation() {
- // uni.login({
- // provider: 'weixin',
- // success: function (loginRes) {
-
- // console.log(loginRes);
- // }
- // });
- uni.login({
- provider: 'univerify',
- univerifyStyle: {
- fullScreen: true
- }
- })
- },
- noClick() {
- Toast('敬请期待');
- },
-
-
- // 跳转透析记录
- toDialysis() {
- let userInfo = uni.getStorageSync('userInfo')
- let hasLogin = this.$store.state.data.hasLogin
- console.log('userInfo',this.$store.state.data.hasLogin)
- if (!this.getHasLogin) {
- uni.showModal({
- title: '提示',
- content: '您未登录,登录后可继续操作',
- confirmText: '立即登录',
- success: function(res) {
- if (res.confirm) {
- uni.switchTab({
- url: '/pages/my/index'
- })
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- } else {
- if (!this.getBind) {
- uni.showModal({
- title: '未绑定',
- content: '是否去绑定',
- success: function(res) {
- if (res.confirm) {
- uni.navigateTo({
- // url: '/pages/userBinding/index'
- url:'/pages/addPatient/index'
- })
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- } else {
- uni.navigateTo({
- url: '/pages/dialysis/index'
- })
- }
- }
- // uni.navigateTo({
- // url: '/pages/dialysis/index'
- // })
- },
-
- toshop() {
-
- // if (!this.getHasLogin) {
- // uni.showModal({
- // title: '未登录',
- // content: '是否去登录',
- // success: function(res) {
- // if (res.confirm) {
- // uni.switchTab({
- // url: '/pages/my/index'
- // })
- // } else if (res.cancel) {
- // console.log('用户点击取消');
- // }
- // }
- // });
- // } else {
- // if (!this.getBind) {
- // uni.showModal({
- // title: '未绑定',
- // content: '是否去绑定',
- // success: function(res) {
- // if (res.confirm) {
- // uni.navigateTo({
- // url: '/pages/userBinding/index'
- // })
- // } else if (res.cancel) {
- // console.log('用户点击取消');
- // }
- // }
- // });
- // } else {
- // uni.navigateTo({
- // url: '/pages/shop/index'
- // })
- // }
- // }
- Toast('敬请期待');
- },
-
- // 透析签到
- toCode() {
- if (!this.getHasLogin) {
- uni.showModal({
- title: '未登录',
- content: '是否去登录',
- success: function(res) {
- if (res.confirm) {
- uni.switchTab({
- url: '/pages/my/index'
- })
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- } else {
- if (!this.getBind) {
- uni.showModal({
- title: '未绑定',
- content: '是否去绑定',
- success: function(res) {
- if (res.confirm) {
- uni.navigateTo({
- url: '/pages/userBinding/index'
- })
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- } else {
- uni.navigateTo({
- url: '/pages/code/index'
- })
- }
- }
- // uni.navigateTo({
- // url: '/pages/dialysisRecord/index'
- // })
- },
- toCup() {
- Toast('敬请期待');
- // uni.navigateTo({
- // // url: '/pages/cup/index',
- // // url:'/subPackages/pages/cup/index'
- // })
- }
-
- }
- }
- </script>
-
- <style scoped>
- page {
- height: 100%;
- }
-
- .cnt_wrapper {
- margin: 0;
- padding: 0;
- height: 100%;
- }
- .imgs{
- height: 400rpx;
- }
-
- .content {
- height: 100%;
- padding: 0 20rpx;
- transform: translateY(-215rpx);
- }
-
- .bannerImg {
- height: 333rpx;
- width: 100%;
- border-radius: 8rpx;
- z-index: -2;
- }
- .title_img{
- width: 161px;
- height: 28px;
- position: absolute;
- top: 0px;
- left: 0px;
-
- }
- .imgBox {
- display: flex;
- justify-content: space-between;
- margin-top: 25rpx;
- /* background: #fff; */
- border-radius: 10rpx;
- /* box-shadow: 0px 2rpx 24rpx 0px #f4f4f4; */
- }
- .img_box{
- padding: 10rpx;
- width: 6.4rem;
- text-align: center;
- border-radius: 10rpx;
- /* background-color: #eeeeff; */
- }
- .img_color1{
- background-color: #ecf4fc;
- }
- .img_color2{
- background-color: #e6fff4;
- }
- .img_color3{
- background-color: #fff7eb;
- }
- .img_box_tu{
- width: 100rpx;
- height: 100rpx;
- padding-bottom: 10rpx;
- }
- .imgBox_title {
- color: black;
- }
- .img_box_text{
- color: gray;
- font-size: 24rpx;
- /* padding-bottom: 10rpx; */
- }
- .health{
- display: flex;
- margin-top: 20rpx;
- text-align: center;
- }
- .health_1{
- flex: 1;
- }
- .health_img{
- height: 100rpx;
- width: 100rpx;
- }
- .img_text{
- width: 350rpx;
- text-align: center;
- border-radius: 50rpx;
- background: #fff;
- color: #50c793;
- position: absolute;
- top: 60rpx;
- left: 180rpx;
- }
- .img_bottom{
- width: 99%;
- height: 150rpx;
- margin-top: 20rpx;
- position: relative;
- }
- .bottom{
- width: 100%;
- height: 150rpx;
- }
- .knowledge{
- margin-top: 20rpx;
- }
- .knowledge_box{
- margin-bottom: 20rpx;
- display: flex;
- padding: 10rpx;
- /* border: 1px solid black; */
- height: 160rpx;
- background: #f2f0f0b3;
- box-shadow: 0 0 5 f2f0f0b3;
- border-radius: 20rpx;
- }
- .box_left{
- width: 70%;
- }
- .box_right{
- width: 30%;
- }
- .knowledge_title{
- height: 120rpx;
- font-size: 36rpx;
- }
- .author{
- height: 40rpx;
- font-size: 28rpx;
- display: flex;
- text-align: left;
- }
- .author_1{
- flex: 1;
- }
- .right_img{
- width: 100%;
- height: 160rpx;
- }
-
-
-
-
- .imgBox_title .imgtitle {
- width: 150rpx;
- height: 36rpx;
- margin-top: 20rpx;
- }
-
- .article_list {
-
- display: flex;
- flex-direction: column;
- justify-content: space-evenly;
- margin-top: 25rpx;
- background: #fff;
- border-radius: 10rpx;
- box-shadow: 0px 2rpx 24rpx 0px #f4f4f4;
- max-height: 730rpx;
- overflow: scroll;
- }
-
- .list_box {
- width: 90%;
- margin: 20rpx auto;
- border-bottom: 1px solid #e5e5e5;
- padding: 20rpx 0;
- }
-
- .list_box .content_list {
- font-size: 28rpx;
- color: #757373;
- padding: 10rpx 0;
- }
-
-
- .bottom_list {
- display: flex;
- justify-content: space-between;
- color: #c2c2c2;
- }
-
- .bottom_list img {
- width: 50rpx;
- height: 50rpx;
- }
-
- .bottom_list span {
- font-size: 24rpx;
- }
-
- .bottom_list .name_date,
- .read,
- .nice {
- display: flex;
- align-items: center;
- }
-
- .imgDislysis {
- width: 344rpx;
- height: 374rpx;
- background: linear-gradient(0deg, #28D87D, #01BD5D);
- box-shadow: 0px 0px 24rpx 0px rgba(9, 196, 148, 0.3);
- border-radius: 16rpx;
- }
-
- .imgBoxRight {
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- margin-top: 30rpx;
- }
-
- .imgBoxRight img {
- width: 235rpx;
- height: 250rpx;
- /* background: #FEF4D8; */
- /* box-shadow: 0px 2rpx 24rpx 0px rgba(255, 209, 110, 0.3); */
- border-radius: 16rpx;
- }
-
- .imgVideo {
- width: 344rpx;
- height: 223rpx;
- background: #FEE6D8;
- box-shadow: 0px 2rpx 24rpx 0px rgba(255, 171, 110, 0.3);
- border-radius: 16rpx;
- margin-top: 20rpx;
- }
-
- .van-search {
- padding: 0rpx;
- }
- </style>
-
- <style lang="scss">
- .searchBtn {
- .van-search {
- padding: 0;
- border-radius: 50rpx;
- }
- }
- </style>
|