作者 朱振飞

版本搭建

/*首页头部分*/
.index_header {
line-height: 0.38rem;
color: #fff;
background-color: #dbb25f;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.2rem 0.4rem;
font-size: 15px;
line-height: 0.38rem;
color: #fff;
background-color: #dbb25f;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.3rem 0.4rem;
font-size: 15px;
}
.index_left {
display: flex;
align-items: center;
font-size: 14px;
width: auto;
display: flex;
align-items: center;
font-size: 14px;
width: auto;
}
.index_left span {
max-width: 1.3rem;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
max-width: 1.3rem;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
}
.index_left_img {
display: flex;
align-items: center;
justify-content: center;
display: flex;
align-items: center;
justify-content: center;
}
.index_left_img .iconfont {
font-size: 13px;
color: #fff;
margin: 0 0.19rem 0 0;
font-size: 13px;
color: #fff;
margin: 0 0.19rem 0 0;
}
.index_right {
display: flex;
align-items: center;
justify-content: center;
text-align: center;
position: relative;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
position: relative;
}
.index_right:before {
position: absolute;
left: -0.1rem;
right: -0.1rem;
top: -0.1rem;
bottom: -0.1rem;
content: '';
position: absolute;
left: -0.1rem;
right: -0.1rem;
top: -0.1rem;
bottom: -0.1rem;
content: '';
}
.index_right img {
height: 0.44rem;
height: 0.44rem;
}
footer {
display: flex;
align-items: center;
justify-content: space-around;
position: fixed;
width: 100%;
font-size: 12px;
left: 0;
color: #969696;
bottom: 0;
background-color: #fff;
border: 1px solid #f2f2f2;
z-index: 100;
display: flex;
align-items: center;
justify-content: space-around;
width: 100%;
font-size: 12px;
color: #969696;
background-color: #fff;
border: 1px solid #f2f2f2;
}
.footer_item {
padding: 0.23rem 0 0.16rem 0;
display: flex;
align-items: center;
flex-direction: column;
flex: 1;
text-align: center;
padding: 0.23rem 0 0.16rem 0;
display: flex;
align-items: center;
flex-direction: column;
flex: 1;
text-align: center;
}
.footer_item_active {
color: #dbb25f;
color: #dbb25f;
}
.img_transform {
transform: rotate(45deg);
transition: 0.1s;
transform: rotate(45deg);
transition: 0.1s;
}
.img_transform1 {
transform: rotate(0deg);
transition: 0.1s;
transform: rotate(0deg);
transition: 0.1s;
}
/*首页内容部分*/
.index_list {
overflow: hidden;
display: flex;
align-items: center;
flex-wrap: wrap;
margin: 0.15rem 0 0.13rem 0;
padding: 0.19rem 0 0 0;
background-color: #fff;
box-shadow: 0.01rem 0.02rem 0.05rem #C8C6C6;
position: relative;
overflow: hidden;
display: flex;
align-items: center;
flex-wrap: wrap;
margin: 0.15rem 0 0.13rem 0;
padding: 0.19rem 0 0 0;
background-color: #fff;
box-shadow: 0.01rem 0.02rem 0.05rem #C8C6C6;
position: relative;
}
.index_item {
width: 20%;
text-align: center;
display: flex;
align-items: center;
flex-direction: column;
margin: 0 0 0.3rem 0;
font-size: 12px;
color: #35373D;
overflow: hidden;
width: 20%;
text-align: center;
display: flex;
align-items: center;
flex-direction: column;
margin: 0 0 0.3rem 0;
font-size: 12px;
color: #35373D;
overflow: hidden;
}
.index_img {
height: 0.82rem;
width: 0.82rem;
display: flex;
align-items: center;
justify-content: center;
background-color: #f2f2f2;
border-radius: 50%;
overflow: hidden;
margin-bottom: 0.07rem;
height: 0.82rem;
width: 0.82rem;
display: flex;
align-items: center;
justify-content: center;
background-color: #f2f2f2;
border-radius: 50%;
overflow: hidden;
margin-bottom: 0.07rem;
}
.index_img img {
width: 100%;
font-size: 0;
width: 100%;
font-size: 0;
}
.menus {
display: flex;
flex-direction: column;
color: #424242;
font-size: 15px;
position: fixed;
right: 0.25rem;
top: 0;
background-color: #fff;
border-radius: 0.07rem;
z-index: 20;
display: flex;
flex-direction: column;
color: #424242;
font-size: 15px;
position: fixed;
right: 0.25rem;
top: 1.05rem;
background-color: #fff;
border-radius: 0.07rem;
z-index: 20;
}
.menus_item {
padding: 0.1rem 0.2rem;
border-bottom: 1px solid #eee;
display: flex;
align-items: center;
padding: 0.1rem 0.2rem;
border-bottom: 1px solid #eee;
display: flex;
align-items: center;
}
.menus_item .iconfont {
color: #dbb25f;
font-size: 20px;
margin-right: 0.2rem;
font-weight: bold;
color: #dbb25f;
font-size: 20px;
margin-right: 0.2rem;
font-weight: bold;
}
.banner_box img {
width: 100%;
width: 100%;
}
.banner_nav_box {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
}
.banner_item {
width: 49%;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #fff;
box-shadow: 0.01rem 0.02rem 0.05rem #C8C6C6;
margin-bottom: 0.16rem;
overflow: hidden;
/*padding: 0.2rem 0;*/
width: 49%;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #fff;
box-shadow: 0.01rem 0.02rem 0.05rem #C8C6C6;
margin-bottom: 0.16rem;
overflow: hidden;
/*padding: 0.2rem 0;*/
}
.banner_item_left {
padding: 0.22rem 0 0.22rem 0.22rem;
/*max-width: 1.6rem;*/
font-size: 12px;
color: #8E8E8E;
display: flex;
flex-direction: column;
line-height: 0.3rem;
padding: 0.22rem 0 0.22rem 0.22rem;
/*max-width: 1.6rem;*/
font-size: 12px;
color: #8E8E8E;
display: flex;
flex-direction: column;
line-height: 0.3rem;
}
.banner_item_title {
/*font-weight: bold;*/
color: #2C2C2E;
font-size: 15px;
/*font-weight: bold;*/
color: #2C2C2E;
font-size: 15px;
}
/*.banner_item img {*/
/*width: 100%;*/
/*!*max-height: 1.3rem;*!*/
/*}*/
.banner_item_img {
display: flex;
align-items: center;
justify-content: center;
display: flex;
align-items: center;
justify-content: center;
}
.banner_item_img img {
width: 100%;
width: 100%;
}
.banner_item_content {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
max-width: 2rem;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
max-width: 2rem;
}
.swiper_box {
background-color: #fff;
padding: 0 0.14rem;
z-index: 0;
overflow: hidden;
background-color: #fff;
margin: 0 0.14rem;*/
z-index: 0;
overflow: hidden;
}
.swiper-container {
overflow: hidden;
overflow: hidden;
}
.swiper_title {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.29rem 0.11rem 0.21rem 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.29rem 0.11rem 0.21rem 0;
}
.swiper_title img {
height: 0.3rem;
margin: 0 0.1rem;
height: 0.3rem;
margin: 0 0.1rem;
}
.swiper_title_content {
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
text-align: center;
color: #424242;
flex: 1;
padding-left: 1.2rem;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
text-align: center;
color: #424242;
flex: 1;
padding-left: 1.2rem;
}
.change_slide {
color: #979797;
font-size: 12px;
color: #979797;
font-size: 12px;
}
.icon-xunhuan101 {
font-size: 14px;
margin-left: 0.2rem;
font-size: 14px;
margin-left: 0.2rem;
}
.swiper_item {
/*display: flex;*/
/*align-items: center;*/
/*justify-content: space-between;*/
/*font-size: 14px;*/
/*color: #424242;*/
/*padding: 14px 12px 14px 0;*/
/*margin: 0 7px;*/
border-top: 1px solid #ececec;
box-sizing: border-box;
background-color: #fff;
/*width: 100%;*/
/*display: flex;*/
/*align-items: center;*/
/*justify-content: space-between;*/
/*font-size: 14px;*/
/*color: #424242;*/
/*padding: 14px 12px 14px 0;*/
/*margin: 0 7px;*/
border-top: 1px solid #ececec;
box-sizing: border-box;
background-color: #fff;
/*width: 100%;*/
}
.swiper_item_img {
width: 1.86rem;
height: 1.60rem;
display: flex;
align-items: center;
justify-content: center;
margin-right: 0.22rem;
overflow: hidden;
border-radius: 0.1rem;
float: left;
padding: 0.28rem 0 0 0 ;
width: 1.86rem;
height: 1.60rem;
display: flex;
align-items: center;
justify-content: center;
margin-right: 0.22rem;
overflow: hidden;
border-radius: 0.1rem;
float: left;
padding: 0.28rem 0 0 0;
}
.swiper_item_img img {
width: 100%;
width: 100%;
}
.swiper_item_title {
color: #2C2C2E;
font-size: 16px;
color: #2C2C2E;
font-size: 16px;
}
.swiper_item_content {
margin: -0.1rem 0 0 0;
color: #979797;
font-size: 13px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
margin: -0.1rem 0 0 0;
color: #979797;
font-size: 13px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
}
.swiper_item_type {
font-size: 12px;
color: #8E8E8E;
display: flex;
align-items: center;
font-size: 12px;
color: #8E8E8E;
display: flex;
align-items: center;
}
.swiper_item_right {
flex: 1;
height: 1.6rem;
display: flex;
justify-content: space-between;
flex-direction: column;
margin: 0.28rem 0.25rem 0.28rem 0;
flex: 1;
height: 1.6rem;
display: flex;
justify-content: space-between;
flex-direction: column;
margin: 0.28rem 0.25rem 0.28rem 0;
}
.swiper_item_type1, .swiper_item_type2, .swiper_item_type3 {
display: flex;
align-items: center;
margin-right: 0.2rem;
.swiper_item_type1,
.swiper_item_type2,
.swiper_item_type3 {
display: flex;
align-items: center;
margin-right: 0.2rem;
}
.swiper_item_type1 span, .swiper_item_type2 span, .swiper_item_type3 span {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
.swiper_item_type1 span,
.swiper_item_type2 span,
.swiper_item_type3 span {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
}
.icon_img {
width: 0.25rem;
display: flex;
align-items: center;
justify-content: center;
margin-right: 0.05rem;
width: 0.25rem;
display: flex;
align-items: center;
justify-content: center;
margin-right: 0.05rem;
}
.icon_img img {
width: 100%;
width: 100%;
}
.icon_box1, .icon_box2, .icon_box3 {
height: 0.3rem;
width: 0.3rem;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-right: 0.02rem;
.icon_box1,
.icon_box2,
.icon_box3 {
height: 0.3rem;
width: 0.3rem;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-right: 0.02rem;
}
.swiper_item_type .iconfont {
font-size: 10px;
color: #ffffff;
font-size: 10px;
color: #ffffff;
}
.icon_box1 {
background-color: #f87e59;
background-color: #f87e59;
}
.icon_box1 .icon-fanhui {
transform: rotate(-60deg);
transform: rotate(-60deg);
}
.icon_box2 {
background-color: #d8b25f;
background-color: #d8b25f;
}
.icon_box3 {
background-color: #EFA660;
background-color: #EFA660;
}
.swiper_item_money {
display: flex;
justify-content: flex-end;
font-size: 12px;
color: #E87136;
display: flex;
justify-content: flex-end;
font-size: 12px;
color: #E87136;
}
.swiper_item_type .icon-shijian {
color: #f87e59;
font-size: 18px;
color: #f87e59;
font-size: 18px;
}
/*专业护理*/
.nurse_banner {
background-repeat: no-repeat;
background-size: cover;
background-position: center;
height: 2.77rem;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 0.15rem;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
height: 2.77rem;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 0.15rem;
}
.nurse_text {
text-align: center;
padding: 0.2rem 0.35rem;
font-size: 15px;
border-bottom: 1px solid #fff;
color: #fff;
border-top: 1px solid #fff;
text-align: center;
padding: 0.2rem 0.35rem;
font-size: 15px;
border-bottom: 1px solid #fff;
color: #fff;
border-top: 1px solid #fff;
}
.nurse_title {
font-size: 11px;
color: #999999;
display: flex;
align-items: center;
background-color: #fff;
padding: 0.25rem 0.42rem 0 0.42rem;
font-size: 11px;
color: #999999;
display: flex;
align-items: center;
background-color: #fff;
padding: 0.25rem 0.42rem 0 0.42rem;
}
.pro {
color: #D8B25F;
font-size: 15px;
color: #D8B25F;
font-size: 15px;
}
.prod {
color: #5FB4F4;
font-size: 15px;
padding: 0 0.23rem 0 0;
color: #5FB4F4;
font-size: 15px;
padding: 0 0.23rem 0 0;
}
.nurse_img_box {
display: flex;
align-items: center;
justify-content: space-around;
background-color: #fff;
padding: 0.25rem 0.2rem 0.35rem 0.25rem;
flex-wrap: wrap;
margin-bottom: 0.13rem;
display: flex;
align-items: center;
justify-content: space-around;
background-color: #fff;
padding: 0.25rem 0.2rem 0.35rem 0.25rem;
flex-wrap: wrap;
margin-bottom: 0.13rem;
}
.nurse_item {
width: 30%;
font-size: 12px;
color: #999999;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
/*padding: 0.24rem 0 0 0;*/
background-color: #f8f8f8;
width: 30%;
font-size: 12px;
color: #999999;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
/*padding: 0.24rem 0 0 0;*/
background-color: #f8f8f8;
}
.nurse_item_title {
text-align: center;
font-size: 15px;
color: #424242;
padding-bottom: 0.21rem;
text-align: center;
font-size: 15px;
color: #424242;
padding-bottom: 0.21rem;
}
.nurse_item_price {
color: #E87136;
color: #E87136;
}
.nurse_item_img {
width: 100%;
/*margin-top: 0.27rem;*/
display: flex;
align-items: center;
justify-content: center;
width: 100%;
/*margin-top: 0.27rem;*/
display: flex;
align-items: center;
justify-content: center;
}
.nurse_item_img img {
width: 100%;
width: 100%;
}
.business_box {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
background-color: #fff;
padding: 0.13rem 0;
box-shadow: 0.01rem 0.02rem 0.05rem #C8C6C6;
margin-bottom: 0.13rem;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
background-color: #fff;
padding: 0.13rem 0;
box-shadow: 0.01rem 0.02rem 0.05rem #C8C6C6;
margin-bottom: 0.13rem;
}
.business_item {
width: 50%;
border-bottom: 1px solid #f6f6f6;
font-size: 15px;
color: #424242;
display: flex;
align-items: center;
padding: 0.26rem;
width: 50%;
border-bottom: 1px solid #f6f6f6;
font-size: 15px;
color: #424242;
display: flex;
align-items: center;
padding: 0.26rem;
}
.business_item:nth-child(2n-1) {
border-right: 1px solid #f6f6f6;
border-right: 1px solid #f6f6f6;
}
.business_item_img {
display: flex;
align-items: center;
justify-content: center;
width: 0.8rem;
height: 0.8rem;
margin-right: 0.15rem;
border-radius: 50%;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
width: 0.8rem;
height: 0.8rem;
margin-right: 0.15rem;
border-radius: 50%;
overflow: hidden;
}
.business_item_right {
flex: 1;
flex: 1;
}
.business_item_img img {
width: 100%;
width: 100%;
}
.business_content {
color: #929292;
font-size: 11px;
color: #929292;
font-size: 11px;
}
.business_item_title {
margin: 0;
font-weight: bold;
margin: 0;
font-weight: bold;
}
.bcg {
background-color: #fff;
padding: 0;
background-color: #fff;
padding: 0;
}
.bold {
font-weight: bold;
padding: 0.29rem 0 0.22rem 0;
font-weight: bold;
padding: 0.29rem 0 0.22rem 0;
}
.bcg .nurse_item_img {
width: 1.15rem;
width: 1.15rem;
}
.index1 {
/*background-repeat: no-repeat;*/
/*background-size: cover;*/
width: 100%;
display: flex;
align-items: center;
justify-content: center;
border-bottom: 1px solid #f2f2f2;
background-color: #fff;
/*background-repeat: no-repeat;*/
/*background-size: cover;*/
width: 100%;
display: flex;
align-items: center;
justify-content: center;
border-bottom: 1px solid #f2f2f2;
background-color: #fff;
}
.index1 img {
width: 100%;
width: 100%;
}
.index1_item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.1rem 0.4rem;
line-height: 0.88rem;
width: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 999;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.1rem 0.4rem;
line-height: 0.88rem;
width: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 999;
}
.index1 .iconfont {
color: #fff;
color: #fff;
}
@keyframes opacity {
from {
opacity: 0;
}
to {
opacity: 1;
}
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.fixed_top {
position: fixed;
left: 0;
top: 0;
width: 100%;
z-index: 9;
background-color: #fff;
animation: opacity 0.2s forwards;
border-bottom: 1px solid #f6f6f6;
position: fixed;
left: 0;
top: 0;
width: 100%;
z-index: 9;
background-color: #fff;
animation: opacity 0.2s forwards;
border-bottom: 1px solid #f6f6f6;
}
html,body{
height: 100%;
}
#app {
height: 100%;
display: flex;
display: -webkit-flex;
display: -webkit-box;
flex-flow: column;
-webkit-flex-flow: column;
-webkit-box-orient: vertical;
overflow-x: hidden;
}
.warp {
position: relative;
-webkit-box-flex: 1;
-webkit-flex: 1;
flex: 1;
overflow: auto;
}
\ No newline at end of file
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<title></title>
<script src="../../assets/js/fontsize.js"></script>
<link rel="stylesheet" href="../../assets/css/weui.min.css">
<link rel="stylesheet" href="../../assets/css/api.css"/>
<!--<link rel="stylesheet" href="http://at.alicdn.com/t/font_641470_jg64l6ijsg4lsor.css">-->
<link rel="stylesheet" href="../../assets/css/my_f.css"/>
<link rel="stylesheet" href="../../assets/css/index.css">
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
<style>
header {
width: 100%;
height: auto;
font-size: 20px;
/*background-color: #dbb25f;*/
}
.headers {
background-color: #dbb25f;
}
<head>
<meta charset="UTF-8">
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<title>慈界医养</title>
<script src="../../assets/js/fontsize.js"></script>
<link rel="stylesheet" href="../../assets/css/weui.min.css">
<link rel="stylesheet" href="../../assets/css/api.css" />
<link rel="stylesheet" href="../../assets/css/my_f.css" />
<link rel="stylesheet" href="../../assets/css/index.css">
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
<style>
header {
width: 100%;
height: auto;
font-size: 20px;
/*background-color: #dbb25f;*/
}
.headers {
background-color: #dbb25f;
}
.strict_box {
display: flex;
align-items: center;
justify-content: space-around;
font-size: 11px;
color: #565656;
padding: 0.26rem 0;
background-color: #fff;
}
.strict_box .iconfont {
color: #D8B25F;
font-size: 15px;
margin-right: 0.1rem;
}
.strict_box1 {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 11px;
padding: 0.21rem 0.37rem;
background-color: #fff;
}
.strict_box1_left {
padding: 0.14rem 0.3rem;
box-shadow: 0 0 3px #ccc;
color: #686868;
border-radius: 0.16rem;
}
.strict_box1_right {
padding: 0.14rem 0.3rem;
color: #FBA500;
box-shadow: 0 0 3px rgba(251, 165, 0, 0.5);
border-radius: 0.16rem;
}
.progress_box {
margin: 0.1rem 0.26rem 0 0.26rem;
background-color: #f5f5f5;
}
.progress {
height: 0.08rem;
background-color: #D8B25F;
width: 0;
}
.target_box {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.46rem 0;
box-shadow: 0 -3px 4px 0 #E4E4E4 inset;
background-color: #fff;
}
.target_item {
font-size: 17px;
color: #060606;
/*font-weight: 600;*/
text-align: center;
flex: 1;
border-right: 1px solid #d9d9d9;
padding: 0.2rem 0 0.1rem 0;
}
.target_item:last-child {
border: 0;
}
.target_item_bottom {
font-size: 12px;
color: #565656;
}
.strict_title {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 17px;
color: #000;
padding: 0.35rem 0;
background-color: #fff;
}
.strict_title span {
flex: 1;
text-align: center;
}
.strict_title .strict_title_item {
border-right: 2px solid #D8B25F;
}
.strict_title .strict_title_item_active {
color: #D8B25F;
}
.strict_content_title {
padding: 0.32rem 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
color: #060606;
background-color: #fff;
}
.strict_content_title .quan {
padding: 0.1rem 0;
border-bottom: 1px solid #333;
}
.strict_box_img {
display: flex;
align-items: center;
justify-content: center;
}
.strict_box_img img {
width: 100%;
}
.strict_btn {
display: flex;
align-items: center;
justify-content: space-between;
background: #fff;
padding: 0 0 0 0.57rem;
/*margin: 0.08rem 0 0 0;*/
position: fixed;
width: 100%;
left: 0;
bottom: 0;
z-index: 2;
/*border-top: 1px solid #fff;*/
}
.strict_btn_price {
font-size: 18px;
color: #E87139;
flex: 1;
}
.strict_btn_right {
flex: 1;
display: flex;
align-items: center;
font-size: 10px;
color: #333;
}
.goPay {
padding: 0.28rem 0;
background-color: #D8B25F;
font-size: 15px;
color: #fff;
flex: 1;
text-align: center;
}
.strict_btn_right_item {
padding: 0 0.32rem;
display: flex;
align-items: center;
flex-direction: column;
border-left: 1px solid #E4E4E4
}
.rmb {
font-size: 13px;
}
.index_on {
background-color: #fff;
border-bottom: 1px solid #f2f2f2;
}
.index_on .iconfont {
color: #D8B25F;
}
/*flex布局*/
[v-cloak] {
display: none;
}
</style>
</head>
.app_name {
padding-right: 0.8rem;
font-family: "fzjt";
font-size: 20px;
}
<body>
<div id="app" v-cloak>
<div class="warp" v-cloak>
<header class="" id="header">
<div class="my_top">
<div class="my_header_boxs" @click="my_detail">
<div class="my_header_box">
<img :src="user_type.avatar?user_type.avatar:'../../assets/image/default_img.png'" alt="">
</div>
<span :class="['my_vip',user_type.is_vip==1?'vip_show':'no_vip']">V</span>
</div>
<div class="my_name">{{user_type.name}}</div>
</div>
</header>
<div class="my_count">
<div class="my_count_item" @click="my_balance(user_type.balance)">
<div class="my_price">{{user_type.balance?user_type.balance:0.00}}元</div>
<div>账户余额</div>
</div>
<div class="my_count_item" @click="my_consumption">
<div class="my_price">{{user_type.count?user_type.count:0}}张</div>
<div>消费金额</div>
</div>
</div>
<div class="my_item_box">
<div class="my_item" @click="goPay">
<img src="../../assets/image/my0.png" alt="">
<span>我的订单</span>
</div>
<div class="my_item" @click="go_hearth">
<img src="../../assets/image/my1.png" alt="">
<span>健康档案</span>
</div>
<div class="my_item border_2" @click="my_power">
<img src="../../assets/image/my2.png" alt="">
<span>我的权益</span>
</div>
<div class="my_item border_1" @click="question">
<img src="../../assets/image/my3.png" alt="">
<span>常见问题</span>
</div>
<div class="my_item border_1 " @click="friend">
<img src="../../assets/image/my4.png" alt="">
<span>邀请好友</span>
<span class="my_money">领取高额消费金额</span>
</div>
<div class="my_item border_1 border_2" @click="set">
<img src="../../assets/image/my5.png" alt="">
<span>设置</span>
</div>
</div>
</div>
.triangle_border_up span {
display: block;
width: 0;
height: 0;
border-width: 0 5px 5px;
border-style: solid;
border-color: transparent transparent #fff; /*透明 透明 黄*/
position: absolute;
bottom: 0;
right: 0.55rem;
}
<footer>
<div class="footer_item" :class="{footer_item_active:index==0}" @click="changeTab(0)">
<i class="iconfont icon-yuanjiaojuxingkaobei"></i>
<span>严选</span>
</div>
<div class="footer_item" :class="{footer_item_active:index==1}" @click="changeTab(1)">
<i class="iconfont icon-xingzhuang"></i>
<span>投资</span>
</div>
<div class="footer_item" :class="{footer_item_active:index==2}" @click="changeTab(2)">
<i class="iconfont icon-wo"></i>
<span>我的</span>
</div>
.mold_index {
position: absolute;
}
#container {
width: 0;
height: 0;
}
.index1 .icon-fenxiang-tianchong {
color: #d8b25f;
}
.my_top {
overflow: hidden;
}
.dot {
position: absolute;
height: 10px;
width: 10px;
background-color: #EE6449;
border-radius: 50%;
right: 0.44rem;
top: 0.37rem;
z-index: 100000;
}
.my_top_icon_box {
background-color: #ddbb72;
padding:0.2rem 0.5rem 0.2rem 0;
}
</style>
</head>
<body>
<div id="app" v-cloak>
<div id="container"></div>
<header :class="index===0?'headers':''">
<div class="index_header" v-if="index==0">
<div class="index_left" >
<div class="index_left_img">
<div class="iconfont icon-dizhi"></div>
</div>
<span @click.stop="goToCity">{{cityname?cityname:'定位中...'}}</span>
</div>
<span class="app_name">慈界医养</span>
<div class="index_right" @click="show_menu">
<img src="../../assets/image/plus.png" alt="" :class="[img_active?'img_transform':'img_transform1']">
</div>
</div>
<div class="index1" v-else-if="index==1">
<div class="index1_item index_on">
<!--<div class="index1_item index_on">-->
<div></div>
<div class="iconfont icon-fenxiang-tianchong"></div>
</div>
</div>
<div class="my_top_icon_box" v-else>
<span class="iconfont icon-xiaoxi" @click="my_news"></span>
<span class="dot" v-show="newList.length!=0"></span>
</div>
<div class="triangle_border_up" v-show="img_active">
<span></span>
</div>
</header>
<footer>
<div class="footer_item" :class="{footer_item_active:index==0}" @click="changeTab(0)">
<i class="iconfont icon-yuanjiaojuxingkaobei"></i>
<span>严选</span>
</div>
<div class="footer_item" :class="{footer_item_active:index==1}" @click="changeTab(1)">
<i class="iconfont icon-xingzhuang"></i>
<span>投资</span>
</div>
<div class="footer_item" :class="{footer_item_active:index==2}" @click="changeTab(2)">
<i class="iconfont icon-wo"></i>
<span>我的</span>
</div>
<div class="mold_index" v-show="img_active" @click="hideMenu"></div>
</footer>
</div>
</body>
</footer>
</div>
</body>
</html>
<script>
window.onLoad = function () {
var map = new AMap.Map('container');
}
var url = 'https://webapi.amap.com/maps?v=1.4.8&key=ef53760bd959a4df08b7d4587280e642&callback=onLoad';
var jsapi = document.createElement('script');
jsapi.charset = 'utf-8';
jsapi.src = url;
document.head.appendChild(jsapi);
window.onLoad = function() {
var map = new AMap.Map('container');
}
var url = 'https://webapi.amap.com/maps?v=1.4.8&key=ef53760bd959a4df08b7d4587280e642&callback=onLoad';
var jsapi = document.createElement('script');
jsapi.charset = 'utf-8';
jsapi.src = url;
document.head.appendChild(jsapi);
</script>
<script type="text/javascript" src="../../assets/js/api.js"></script>
<script type="text/javascript" src="../../assets/js/swiper-3.4.2.min.js"></script>
<script type="text/javascript" src="../../assets/js/weui.min.js"></script>
<script type="text/javascript" src="../../assets/js/public.js"></script>
<script type="text/javascript" src="../../assets/js/fastclick.js"></script>
<script>
new FastClick(document.body);
new FastClick(document.body);
</script>
<script type="text/javascript" src="../../assets/js/vue.min.js"></script>
<script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
<script type="text/javascript" src="../../assets/js/axios.min.js"></script>
<script>
var app = new Vue({
el: "#app",
data: {
index: 0,
headerH: '',
footerH: '',
getlng: '',
getlat: '',
cityindex: '',
cityname: '',
img_active: false,
map: {},
newList: []
},
created: function () {
apiready = function () {
api.addEventListener({
name: 'city'
}, function (ret, err) {
app.cityname = ret.value.city;
});
app.headerH = $api.offset($api.dom('header')).h;
app.footerH = $api.offset($api.dom('footer')).h;
api.openFrameGroup({
name: 'index_fm',
scrollEnabled: false,
index: app.index,
preload: 0,
reload: true,
rect: {
x: 0,
y: app.headerH,
w: 'auto',
h: api.winHeight - app.headerH - app.footerH
},
frames: [
{
name: 'index_f',
url: '../index/index_f.html',
bounces: false,
},
{
name: 'strict_f',
url: '../strict/strict_f.html',
bounces: false
},
{
name: 'my_f',
url: '../my/my_f.html',
bounces: false
}
],
var app = new Vue({
el: "#app",
data: {
index: 2,
isLogin: true,
// user_info: [],
user_type: [1],
avatar_default: '../../assets/image/mblogo_03.png',
default_name: '',
marginTop: '',
newList: [],
type: 0
},
created: function() {
this.getUserIndexInfo()
this.getNews();
},
mounted: function() {
window.addEventListener('scroll', this.handleScroll)
},
methods: {
// 个人资料
my_detail: function() {
if(app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_detail', 'my/my_detail', '个人资料', 'my_detail', false, {
rid: 0,
type: 0
})
}
},
// 设置
set: function() {
openView('my_set', 'my/my_set', '设置', 'my_set', false, false, false)
},
// 常见问题
question: function() {
if(app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_que', 'my/my_que', '常见问题', 'my_que', false, false, false)
}
},
// 邀友有赚
friend: function() {
if(app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_invite', 'my/my_invite', '邀请好友', 'my_invite', false, {
invite_type: 0
})
}
},
// 我的订单
goPay: function() {
if(app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_orderlist', 'my/my_orderlist', '我的订单', 'my_orderlist', false, false, false);
}
},
// 我的消息
my_news: function() {
if(app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_news', 'my/my_news', '消息通知', 'my_news', false, {
new_type: 0
})
}
},
// 有无消息判断
getNews: function() {
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
getRequest('post', 'user/index/getUserMessageList', null, header).then(function(res) {
if(res.data.code == 1) {
app.newList = res.data.data.unread;
} else {
toastMsg(res.data.msg)
}
loadEnd();
})
},
// 我的账号
my_balance: function() {
if(app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_balance', 'my/my_balance', '我的账号', 'my_balance', false, false, false)
}
},
// 我的消费金
my_consumption: function() {
if(app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_consumption', 'my/my_consumption', '我的消费金', 'my_consumption', false, false, false)
}
},
// 我的权益
my_power: function() {
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
if(app.user_type == '') {
toastMsg('未登录')
} else {
getRequest('post', 'user/index/myRights', null, header).then(function(res) {
if(res.data.code == 1) {
openView('my_benefit', 'my/my_benefit', '我的权益', 'my_benefit', false, false, false)
} else {
toastMsg(res.data.msg);
}
});
}
},
// 健康档案
go_hearth: function() {
if(app.user_type == '') {
toastMsg('未登录')
} else {
api.openFrame({
name: 'my_health',
url: './my_health.html',
// bounces: true,
rect: {
x: 0,
y: 0,
w: 'auto',
h: 'auto',
},
pageParam: {
rid: 0,
type: 0
}
});
}
},
// 获取个人信息
getUserIndexInfo: function() {
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function(res) {
// alert(JSON.stringify(res));
if(res.data.code == 1) {
app.user_type = res.data.data;
} else {}
loadEnd()
});
}
});
api.addEventListener({
name: 'index0'
}, function (ret, err) {
api.setFrameGroupIndex({
name: 'index_fm',
index: ret.value.index
})
});
api.addEventListener({
name: 'index1'
}, function (ret, err) {
api.setFrameGroupIndex({
name: 'index_fm',
index: ret.value.index
})
});
api.addEventListener({
name: 'hide_menu'
}, function (ret, err) {
app.img_active = ret.value.img_active;
});
app.get_city();
app.getNews();
}
},
methods: {
// 我的消息
my_news: function () {
openView('my_news', 'my/my_news', '消息通知', 'my_news', false, {new_type: 0})
},
// 有无消息判断
getNews: function () {
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
getRequest('post', 'user/index/getUserMessageList', null, header).then(function (res) {
if (res.data.code == 1) {
app.newList = res.data.data.unread;
} else {
toastMsg(res.data.msg)
}
loadEnd();
})
},
// 定位当前城市
get_city: function () {
app.map = new AMap.Map('container', {});
app.map.plugin('AMap.Geolocation', function () {
var geolocation = new AMap.Geolocation({
// 是否使用高精度定位,默认:true
enableHighAccuracy: true,
// 设置定位超时时间,默认:无穷大
timeout: 10000,
});
geolocation.getCurrentPosition();
AMap.event.addListener(geolocation, 'complete', onComplete)
AMap.event.addListener(geolocation, 'error', onError)
function onComplete(data) {
// console.log(JSON.stringify(data))
app.cityname = data.addressComponent.province
// data是具体的定位信息
}
function onError(erro) {
// 定位出错
toastMsg('请开启定位功能')
}
})
},
// 切换底部导航
changeTab: function (res) {
setTimeout(function () {
app.index = res;
api.setFrameGroupIndex({
name: 'index_fm',
index: res
})
}, 300);
app.img_active = false;
api.sendEvent({
name: 'show_menu',
extra: {
img_active: app.img_active
}
});
},
// 切换当前城市
goToCity: function () {
if (app.cityname == '') {
toastMsg('定位中')
} else {
api.openWin({
name: 'city_win',
url: '../index/city_win.html',
pageParam: {
cityname: app.cityname
}
});
}
},
// 显示快捷菜单
show_menu: function () {
if (app.img_active == false) {
app.img_active = true
} else {
app.img_active = false
}
api.sendEvent({
name: 'show_menu',
extra: {
img_active: app.img_active
}
});
},
// 隐藏快捷菜单
hideMenu: function () {
app.img_active = !app.img_active;
api.sendEvent({
name: 'show_menu',
extra: {
img_active: app.img_active
}
});
},
}
})
</script>
}
})
</script>
\ No newline at end of file
... ...
<!doctype html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
... ...
<!DOCTYPE HTML>
<html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta charset="UTF-8">
<meta name="viewport"
content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width"/>
<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<title></title>
<title>慈界医养</title>
<script src="../../assets/js/fontsize.js"></script>
<link rel="stylesheet" href="../../assets/css/swiper-3.4.2.min.css">
<link rel="stylesheet" href="../../assets/css/weui.min.css">
<link rel="stylesheet" href="../../assets/css/api.css"/>
<link rel="stylesheet" href="../../assets/css/swiper-3.4.2.min.css">
<!--<link rel="stylesheet" href="http://at.alicdn.com/t/font_641470_jg64l6ijsg4lsor.css">-->
<link rel="stylesheet" href="../../assets/css/my_f.css"/>
<link rel="stylesheet" href="../../assets/css/index.css">
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
<style>
body, html {
/*background-color: #efefef;*/
height: 100%;
header {
width: 100%;
height: auto;
font-size: 20px;
/*background-color: #dbb25f;*/
}
.headers {
background-color: #dbb25f;
}
.banner_box {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 0.1rem;
.app_name {
padding-right: 0.8rem;
font-family: "fzjt";
font-size: 20px;
}
.swiper-slide {
width: 100% !important;
.triangle_border_up span {
display: block;
width: 0;
height: 0;
border-width: 0 5px 5px;
border-style: solid;
border-color: transparent transparent #fff; /*透明 透明 黄*/
position: absolute;
bottom: 0;
right: 0.55rem;
}
.swiper_list {
width: 100%;
.mold_index {
position: absolute;
}
#container {
width: 0;
height: 0;
}
.index1 .icon-fenxiang-tianchong {
color: #d8b25f;
}
.my_top {
overflow: hidden;
}
.dot {
position: absolute;
height: 10px;
width: 10px;
background-color: #EE6449;
border-radius: 50%;
right: 0.44rem;
top: 0.37rem;
z-index: 100000;
}
.my_top_icon_box {
background-color: #ddbb72;
padding:0.2rem 0.5rem 0.2rem 0;
}
/*flex布局*/
[v-cloak]{
display: none;
}
</style>
</head>
<body>
<div id="loadStart"></div>
<div id="app" v-cloak>
<div class="index_list" id="top">
<div class="index_item" v-for="(item,index) in cat_data" @click="openItem(item.id,item.name)">
<div class="index_img"><img :src="item.img?item.img:img_default" alt=""></div>
<div>{{item.name}}</div>
</div>
<div class="menus" v-show="img_active">
<div class="menus_item" @click="openOrder"><span class="iconfont icon-dingdan"></span><span>我的订单</span>
<div id="container"></div>
<header :class="index===0?'headers':''">
<div class="index_header" v-if="index==0">
<div class="index_left" >
<div class="index_left_img">
<div class="iconfont icon-dizhi"></div>
</div>
<span @click.stop="goToCity">{{cityname?cityname:'定位中...'}}</span>
</div>
<div class="menus_item" @click="openHealth"><span class="iconfont icon-kongxin"></span><span>健康档案</span>
<span class="app_name">慈界医养</span>
<div class="index_right" @click="show_menu">
<img src="../../assets/image/plus.png" alt="" :class="[img_active?'img_transform':'img_transform1']">
</div>
<div class="menus_item" @click="openSever"><span class="iconfont icon-kefu"></span><span>客服服务</span></div>
<div class="menus_item" @click="openStrict"><span class="iconfont icon-icon"></span><span>认购权益</span></div>
<!--<div class="menus_item" @click="openQrc"><span class="iconfont icon-saoyisao"></span><span>扫一扫</span></div>-->
</div>
</div>
<div class="banner_box" @click="openStrict"><img src="../../assets/image/banner.png" alt=""></div>
<div class="banner_nav_box">
<div class="banner_item" @click="care(item.goods_id,item.title)" v-for="(item,index) in index_data">
<div class="banner_item_left">
<span class="banner_item_title">{{item.title}}</span>
<span class="banner_item_content">{{item.describe}}</span>
</div>
<div class="banner_item_img">
<img :src="item.img?item.img:img_default" alt="">
<div class="index1" v-else-if="index==1">
<div class="index1_item index_on">
<!--<div class="index1_item index_on">-->
<div></div>
<div class="iconfont icon-fenxiang-tianchong"></div>
</div>
</div>
</div>
<div class="swiper_title fixed_top" v-show="top_show">
<span></span>
<span class="swiper_title_content"> <img src="../../assets/image/part4_03.jpg" alt=""><span>严选推介</span><img
src="../../assets/image/part4_05.jpg" alt=""></span>
<span class="change_slide">换一批<span class="iconfont icon-xunhuan101"></span></span>
</div>
<div class="swiper_box">
<div class="swiper_title" :class="{fixed_top:top_show}" id="main" v-show="!top_show">
<span></span>
<span class="swiper_title_content"> <img src="../../assets/image/part4_03.jpg" alt=""><span>严选推介</span><img
src="../../assets/image/part4_05.jpg" alt=""></span>
<span class="change_slide">换一批<span class="iconfont icon-xunhuan101"></span></span>
<div class="my_top_icon_box" v-else>
<span class="iconfont icon-xiaoxi" @click="my_news"></span>
<span class="dot" v-show="newList.length!=0"></span>
</div>
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide" v-for="(item,index) in show_data">
<div class="swiper_item" @click="care(i.goods_id,i.title)" v-for="(i,item_index) in item">
<div class="swiper_item_img"><img :src="i.img" alt=""></div>
<!--&lt;!&ndash;<img src="../../assets/image/logo200.png" alt="">&ndash;&gt;-->
<div class="swiper_item_right">
<div class="swiper_item_title">{{i.title}}</div>
<div class="swiper_item_content">{{i.describe}}</div>
<div class="swiper_item_type">
<div class="swiper_item_type1" v-for="(j,item2_index) in i.icon">
<div class="icon_img"><img :src="j.url" alt=""></div>
<span>{{j.text}}</span>
</div>
</div>
<div class="swiper_item_money">¥{{i.price}}</div>
</div>
</div>
</div>
</div>
<div class="triangle_border_up" v-show="img_active">
<span></span>
</div>
<div class="mold_index" v-show="img_active" @touchstart="hideMenu"></div>
</header>
<div class="warp">
<div class="index_list" id="top">
<div class="index_item" v-cloak v-for="(item,index) in cat_data" @click="openItem(item.id,item.name)">
<div class="index_img"><img :src="item.img?item.img:img_default" alt=""></div>
<div>{{item.name}}</div>
</div>
<div class="menus" v-show="img_active">
<div class="menus_item" @click="openOrder"><span class="iconfont icon-dingdan"></span><span>我的订单</span>
</div>
<div class="menus_item" @click="openHealth"><span class="iconfont icon-kongxin"></span><span>健康档案</span>
</div>
<div class="menus_item" @click="openSever"><span class="iconfont icon-kefu"></span><span>客服服务</span></div>
<div class="menus_item" @click="openStrict"><span class="iconfont icon-icon"></span><span>认购权益</span></div>
<!--<div class="menus_item" @click="openQrc"><span class="iconfont icon-saoyisao"></span><span>扫一扫</span></div>-->
</div>
<div class="banner_box" @click="openStrict"><img src="../../assets/image/banner.png" alt=""></div>
<div class="banner_nav_box">
<div class="banner_item" v-cloak @click="care(item.goods_id,item.title)" v-for="(item,index) in index_data">
<div class="banner_item_left" >
<span class="banner_item_title">{{item.title}}</span>
<span class="banner_item_content">{{item.describe}}</span>
</div>
<div class="banner_item_img">
<img :src="item.img?item.img:img_default" alt="">
</div>
</div>
</div>
<div class="swiper_title fixed_top" v-show="top_show">
<span></span>
<span class="swiper_title_content"> <img src="../../assets/image/part4_03.jpg" alt=""><span>严选推介</span><img src="../../assets/image/part4_05.jpg" alt=""></span>
<span class="change_slide">换一批<span class="iconfont icon-xunhuan101"></span></span>
</div>
<div class="swiper_box">
<div class="swiper_title" :class="{fixed_top:top_show}" id="main" v-show="!top_show">
<span></span>
<span class="swiper_title_content"> <img src="../../assets/image/part4_03.jpg" alt=""><span>严选推介</span><img src="../../assets/image/part4_05.jpg" alt=""></span>
<span class="change_slide">换一批<span class="iconfont icon-xunhuan101"></span></span>
</div>
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide" v-for="(item,index) in show_data">
<div class="swiper_item" @click="care(i.goods_id,i.title)" v-for="(i,item_index) in item">
<div class="swiper_item_img"><img :src="i.img" alt=""></div>
<!--&lt;!&ndash;<img src="../../assets/image/logo200.png" alt="">&ndash;&gt;-->
<div class="swiper_item_right">
<div class="swiper_item_title">{{i.title}}</div>
<div class="swiper_item_content">{{i.describe}}</div>
<div class="swiper_item_type">
<div class="swiper_item_type1" v-for="(j,item2_index) in i.icon">
<div class="icon_img"><img :src="j.url" alt=""></div>
<span>{{j.text}}</span>
</div>
</div>
<div class="swiper_item_money">¥{{i.price}}</div>
</div>
</div>
</div>
</div>
</div>
<div class="mold_index" v-show="img_active" @touchstart="hideMenu"></div>
</div>
</div>
</div>
<footer>
<div class="footer_item" :class="{footer_item_active:index==0}" @click="changeTab(0)">
<i class="iconfont icon-yuanjiaojuxingkaobei"></i>
<span>严选</span>
</div>
<div class="footer_item" :class="{footer_item_active:index==1}" @click="changeTab(1)">
<i class="iconfont icon-xingzhuang"></i>
<span>投资</span>
</div>
<div class="footer_item" :class="{footer_item_active:index==2}" @click="changeTab(2)">
<i class="iconfont icon-wo"></i>
<span>我的</span>
</div>
<div class="mold_index" v-show="img_active" @click="hideMenu"></div>
</footer>
</div>
</body>
</html>
<script>
window.onLoad = function () {
var map = new AMap.Map('container');
}
var url = 'https://webapi.amap.com/maps?v=1.4.8&key=ef53760bd959a4df08b7d4587280e642&callback=onLoad';
var jsapi = document.createElement('script');
jsapi.charset = 'utf-8';
jsapi.src = url;
document.head.appendChild(jsapi);
</script>
<script type="text/javascript" src="../../assets/js/api.js"></script>
<script type="text/javascript" src="../../assets/js/swiper-3.4.2.min.js"></script>
<script type="text/javascript" src="../../assets/js/weui.min.js"></script>
<script type="text/javascript" src="../../assets/js/public.js"></script>
<script type="text/javascript" src="../../assets/js/fastclick.js"></script>
<script>
new FastClick(document.body);
</script>
<script type="text/javascript" src="../../assets/js/vue.min.js"></script>
<script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
<script type="text/javascript" src="../../assets/js/axios.min.js"></script>
<script>
new Swiper('.swiper-container', {
observer: true,
observeParents: true,
slidesPerView: 1,
// autoplayDisableOnInteraction: false,
loop: true,
navigation: {
nextEl: '.change_slide',
},
autoHeight: false,
speed: 1500,
});
var app = new Vue({
el: '#app',
el: "#app",
data: {
img_active: false,
mySwiper: {},
scroll_top: '',
top_show: false,
cat_data: [],
index_data: [],
show_data: [],
img_default: '../../assets/image/logo200.png',
index: 0,
headerH: '',
footerH: '',
getlng: '',
getlat: '',
cityindex: '',
cityname: '',
rongYunToken: '',
userId: '',
user_info: []
img_active: false,
map: {},
newList: [],
img_active: false,
mySwiper: {},
scroll_top: '',
top_show: false,
cat_data: [],
index_data: [],
show_data: [],
img_default: '../../assets/image/logo200.png',
cityname: '',
rongYunToken: '',
userId: '',
user_info: []
},
created: function () {
apiready = function () {
app.cat();//首页导航
app.index();//第三栏
app.show();//严选推荐
app.cityname = api.pageParam.cityname;
// 获取个人信息
if (getToken() && getToken() != 'undefined') {
app.getUserIndexInfo()
}
app.img_active = false;//进入
api.setFrameAttr({
name: api.frameName,
bounces: true
});
app.scroll_top = $api.byId('top').scrollHeight;
if (app.scroll_top == 0) {
app.top_show = true;
} else {
app.top_show = false;
}
api.addEventListener({
name: 'show_menu'
}, function (ret, err) {
app.img_active = ret.value.img_active;
api.setFrameAttr({
name: 'index_f',
bounces: false
});
});
// 底部轮播图
app.mySwiper = new Swiper('.swiper-container', {
observer: true,
observeParents: true,
slidesPerView: 1,
// autoplayDisableOnInteraction: false,
loop: true,
navigation: {
nextEl: '.change_slide',
},
autoHeight: true,
speed: 1500,
});
};
},
mounted: function () {
window.addEventListener('scroll', this.handleScroll)
this.cat(); //首页导航
this.indexList(); //第三栏
this.show(); //严选推荐
// 底部轮播图
},
mounted: function() {
window.addEventListener('scroll', this.handleScroll)
},
methods: {
// 隐藏菜单
hideMenu: function () {
app.img_active = !app.img_active;
api.sendEvent({
name: 'hide_menu',
extra: {
img_active: app.img_active
}
});
// 我的消息
my_news: function () {
openView('my_news', 'my/my_news', '消息通知', 'my_news', false, {new_type: 0})
},
// 严选推荐定位
handleScroll: function () {
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
var offsetTop = document.querySelector('#main').offsetTop;
if (scrollTop > offsetTop) {
app.top_show = true
} else {
app.top_show = false
}
},
// 严选推荐定位
destroyed: function () {
window.removeEventListener('scroll', this.handleScroll)
},
// 打开投资
openStrict: function () {
app.img_active = false;
api.setFrameGroupIndex({
name: 'index_fm',
index: 1
})
},
// 打开订单
openOrder: function () {
app.img_active = false;
openView('my_orderlist', 'my/my_orderlist', '我的订单', 'my_orderlist', false, false, false);
api.sendEvent({
name: 'hide_menu',
extra: {
img_active: false
}
});
},
// 打开健康档案
openHealth: function () {
app.img_active = false;
api.openWin({
name: 'my_health_w',
url: '../my/my_health_w.html',
pageParam: {
rid: 0
}
});
api.sendEvent({
name: 'hide_menu',
extra: {
img_active: false
}
});
},
// 打开客服
openSever: function () {
app.img_active = false;
app.getRongYunToken();
},
// 获取客服token
getRongYunToken: function () {
// 有无消息判断
getNews: function () {
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
getRequest('post', 'portal/RongYun/index', null, header).then(function (res) {
getRequest('post', 'user/index/getUserMessageList', null, header).then(function (res) {
if (res.data.code == 1) {
app.rongYunToken = res.data.data.token;
app.userId = res.data.data.userId;
// app.rongyunInit();
app.newList = res.data.data.unread;
} else {
toastMsg(res.data.msg)
}
loadEnd();
})
},
// 轮播图跳转详情
care: function (id, care_name) {
api.openWin({
name: 'care_w',
url: './care_w.html',
pageParam: {
id: id,
care_name: care_name
// 定位当前城市
get_city: function () {
app.map = new AMap.Map('container', {});
app.map.plugin('AMap.Geolocation', function () {
var geolocation = new AMap.Geolocation({
// 是否使用高精度定位,默认:
enableHighAccuracy: true,
// 设置定位超时时间,默认:无穷大
timeout: 10000,
});
geolocation.getCurrentPosition();
AMap.event.addListener(geolocation, 'complete', onComplete)
AMap.event.addListener(geolocation, 'error', onError)
function onComplete(data) {
console.log(JSON.stringify(data))
app.cityname = data.addressComponent.province
// data是具体的定位信息
}
})
},
getUserIndexInfo: function () {
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function (res) {
// alert(JSON.stringify(res))
if (res.data.code == 1) {
app.user_info = res.data.data;
} else {
function onError(erro) {
// 定位出错
toastMsg('请开启定位功能')
}
})
},
// 获取分类图标
cat: function () {
getRequest('post', 'portal/index/cat', null, null).then(function (res) {
if (res.data.code == 1) {
app.cat_data = res.data.data;
// loadEnd();
} else {
}
})
// 切换底部导航
changeTab: function (res) {
//跳转页面
},
// 跳转分类列表
openItem: function (id, name) {
switch (id) {
case 1:
openView('nursing_f', 'index/nursing_f', name, 'nursing_f', false, {
cid: id,
cityname: app.cityname
});
break;
case 2 :
openView('disease_f', 'index/disease_f', name, 'disease_f', false, {
cid: id,
cityname: app.cityname
});
break;
case 3:
openView('disease_f', 'index/disease_f', name, 'disease_f', false, {
cid: id,
cityname: app.cityname
});
break;
case 4:
openView('examination_f', 'index/examination_f', name, 'examination_f', false, {
cid: id,
cityname: app.cityname
});
break;
case 5:
api.openWin({
name: 'doc_home_w',
url: './doc_home_w.html',
pageParam: {
cid: id,
cityname: app.cityname
}
});
break;
case 6:
openView('disease_f', 'index/disease_f', name, 'disease_f', false, {
cid: id,
cityname: app.cityname
});
break;
case 7:
openView('examination_f', 'index/examination_f', name, 'examination_f', false, {
cid: id,
cityname: app.cityname
});
break;
case 8:
openView('examination_f', 'index/examination_f', name, 'examination_f', false, {
cid: id,
// 切换当前城市
goToCity: function () {
if (app.cityname == '') {
toastMsg('定位中')
} else {
api.openWin({
name: 'city_win',
url: '../index/city_win.html',
pageParam: {
cityname: app.cityname
});
break;
case 9:
api.openWin({
name: 'Insurance_w',
url: './Insurance_w.html',
pageParam: {
cid: id,
cityname: app.cityname
}
});
break;
case 10:
api.openWin({
name: 'tral_w',
url: './tral_w.html',
pageParam: {
cid: id,
cityname: app.cityname
}
});
break;
// default:
// openView('nursing_f', 'index/nursing_f', name, 'nursing_f', false, {cid: id});
// return;
}
});
}
},
// 获取第三栏列表
index: function () {
getRequest('post', 'portal/index/index', null, null).then(function (res) {
if (res.data.code == 1) {
app.index_data = res.data.data;
} else {
// 显示快捷菜单
show_menu: function () {
if (app.img_active == false) {
app.img_active = true
} else {
app.img_active = false
}
},
// 隐藏快捷菜单
hideMenu: function () {
app.img_active = !app.img_active;
api.sendEvent({
name: 'show_menu',
extra: {
img_active: app.img_active
}
setTimeout(function () {
api.hideProgress();
}, 2000)
})
});
},
// 获取严选推荐列表
show: function () {
getRequest('POST', 'portal/index/show', null, null).then(function (res) {
// alert(JSON.stringify(res));
if (res.data.code == 1) {
app.show_data = res.data.data
} else {
}
})
}
//首页的数据
// 隐藏菜单
hideMenu: function() {
app.img_active = !app.img_active;
api.sendEvent({
name: 'hide_menu',
extra: {
img_active: app.img_active
}
});
},
// 严选推荐定位
handleScroll: function() {
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
var offsetTop = document.querySelector('#main').offsetTop;
console.log(scrollTop,offsetTop)
if(scrollTop > offsetTop) {
app.top_show = true
} else {
app.top_show = false
}
},
// 严选推荐定位
destroyed: function() {
window.removeEventListener('scroll', this.handleScroll)
},
// 打开投资
openStrict: function() {
app.img_active = false;
api.setFrameGroupIndex({
name: 'index_fm',
index: 1
})
},
// 打开订单
openOrder: function() {
app.img_active = false;
openView('my_orderlist', 'my/my_orderlist', '我的订单', 'my_orderlist', false, false, false);
api.sendEvent({
name: 'hide_menu',
extra: {
img_active: false
}
});
},
// 打开健康档案
openHealth: function() {
app.img_active = false;
api.openWin({
name: 'my_health_w',
url: '../my/my_health_w.html',
pageParam: {
rid: 0
}
});
api.sendEvent({
name: 'hide_menu',
extra: {
img_active: false
}
});
},
// 打开客服
openSever: function() {
app.img_active = false;
app.getRongYunToken();
},
// 获取客服token
getRongYunToken: function() {
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
getRequest('post', 'portal/RongYun/index', null, header).then(function(res) {
if(res.data.code == 1) {
app.rongYunToken = res.data.data.token;
app.userId = res.data.data.userId;
// app.rongyunInit();
} else {}
})
},
// 轮播图跳转详情
care: function(id, care_name) {
api.openWin({
name: 'care_w',
url: './care_w.html',
pageParam: {
id: id,
care_name: care_name
}
})
},
getUserIndexInfo: function() {
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function(res) {
// alert(JSON.stringify(res))
if(res.data.code == 1) {
app.user_info = res.data.data;
} else {}
})
},
// 获取分类图标
cat: function() {
getRequest('post', 'portal/index/cat', null, null).then(function(res) {
if(res.data.code == 1) {
app.cat_data = res.data.data;
// loadEnd();
} else {}
})
},
// 跳转分类列表
openItem: function(id, name) {
var url = id=='1'?'nursing_f':(id=='2'||id=='3'||id=='6')?'disease_f':(id=='4')
switch(id) {
case 1:
url = 'nursing_f'
openView('nursing_f', 'index/nursing_f', name, 'nursing_f', false, {
cid: id,
cityname: app.cityname
});
break;
case 2:
url = 'disease_f'
openView('disease_f', 'index/disease_f', name, 'disease_f', false, {
cid: id,
cityname: app.cityname
});
break;
case 3:
url = 'disease_f'
openView('disease_f', 'index/disease_f', name, 'disease_f', false, {
cid: id,
cityname: app.cityname
});
break;
case 4:
url = 'examination_f'
openView('examination_f', 'index/examination_f', name, 'examination_f', false, {
cid: id,
cityname: app.cityname
});
break;
case 5:
url = 'doc_home_w'
api.openWin({
name: 'doc_home_w',
url: './doc_home_w.html',
pageParam: {
cid: id,
cityname: app.cityname
}
});
break;
case 6:
url = 'disease_f'
openView('disease_f', 'index/disease_f', name, 'disease_f', false, {
cid: id,
cityname: app.cityname
});
break;
case 7:
url = 'examination_f'
openView('examination_f', 'index/examination_f', name, 'examination_f', false, {
cid: id,
cityname: app.cityname
});
break;
case 8:
url = 'examination_f'
openView('examination_f', 'index/examination_f', name, 'examination_f', false, {
cid: id,
cityname: app.cityname
});
break;
case 9:
url = 'examination_f'
api.openWin({
name: 'Insurance_w',
url: './Insurance_w.html',
pageParam: {
cid: id,
cityname: app.cityname
}
});
break;
case 10:
api.openWin({
name: 'tral_w',
url: './tral_w.html',
pageParam: {
cid: id,
cityname: app.cityname
}
});
break;
// default:
// openView('nursing_f', 'index/nursing_f', name, 'nursing_f', false, {cid: id});
// return;
}
},
// 获取第三栏列表
indexList: function() {
getRequest('post', 'portal/index/index', null, null).then(function(res) {
if(res.data.code == 1) {
app.index_data = res.data.data;
} else {}
})
},
// 获取严选推荐列表
show: function() {
getRequest('POST', 'portal/index/show', null, null).then(function(res) {
// alert(JSON.stringify(res));
if(res.data.code == 1) {
app.show_data = res.data.data
} else {}
})
},
//底部菜单跳转
changeTab(index){
var url = index==0?'index_f.html':index == 1?'../strict/strict_f.html':'../my/my_f.html'
window.location.href = url
}
}
})
</script>
... ...
... ... @@ -37,12 +37,6 @@
</div>
<div class="login_btn" @click="login_main">登录</div>
<div class="no_reg">未注册手机验证后自动注册</div>
<!--<div class="fast_login_box"><span class="span_line"></span><span>使用以下账号快速登录</span><span class="span_line"></span>-->
<!--</div>-->
<!--<div class="login_type_box">-->
<!--<span class="iconfont icon-wei_xing" @click="login_wx"></span>-->
<!--<span class="iconfont icon-QQ" @click="login_qq"></span>-->
<!--</div>-->
<div class="agree_box"><span :class="['iconfont',isAgree?'icon-yigouxuan':'icon-weigouxuan']"
@click="isAgree=!isAgree"></span><span>我同意</span><span
class="agreement" @click="agree_content">《慈界医养用户服务协议》</span></div>
... ... @@ -83,32 +77,34 @@
getCode: function () {
if (!mobileReg.test(app.phone)) {
toastMsg('手机号不正确')
}
else {
const TIME_COUNT = 60;
let TIME_COUNT = 60;
var post = {
tel: app.phone,
tel: app.phone
};
var header = {
'XX-Device-Type': getDevice()
}
getRequest('POST', 'home/index/loginBySMS', post, header).then(function (res) {
console.log(res);
toastMsg(res.data.msg);
if (!app.timer) {
app.count = TIME_COUNT;
app.show = false;
app.timer = setInterval(function () {
if (app.count > 0 && app.count <= TIME_COUNT) {
app.count--;
} else {
app.show = true;
clearInterval(app.timer);
app.timer = null;
}
}, 1000)
if(res.data.code ===1){
if (!app.timer) {
app.count = TIME_COUNT;
app.show = false;
app.timer = setInterval(function () {
if (app.count > 0 && app.count <= TIME_COUNT) {
app.count--;
} else {
clearInterval(app.timer);
app.timer = null;
app.show = true;
}
}, 1000)
}
}
toastMsg(res.data.msg);
})
}
},
... ... @@ -141,14 +137,9 @@
};
getRequest('post', 'home/index/checkSMS', post, header).then(function (res) {
console.log(res)
// alert(JSON.stringify(res.data.data.token))
if (res.data.code == 1) {
$api.setStorage('token', res.data.data.token);
// api.openWin({
// name: 'index_win',
// url: '',
// });
window.location.href = '../common/index_win.html'
window.location.href = '../index/index_f.html'
} else {
toastMsg(res.data.msg)
}
... ...
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<script src="../../assets/js/fontsize.js"></script>
<link rel="stylesheet" href="../../assets/css/weui.min.css">
<link rel="stylesheet" href="../../assets/css/api.css"/>
<link rel="stylesheet" href="../../assets/css/my_f.css"/>
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
<title></title>
</head>
<body>
<div id="loadStart"></div>
<div id="app" v-cloak>
<header class="" id="header">
<div class="my_top">
<div class="my_header_boxs" @click="my_detail">
<div class="my_header_box">
<img :src="user_type.avatar?user_type.avatar:'../../assets/image/default_img.png'" alt="">
</div>
<span :class="['my_vip',user_type.is_vip==1?'vip_show':'no_vip']">V</span>
</div>
<div class="my_name">{{user_type.name}}</div>
</div>
</header>
<div class="my_count">
<div class="my_count_item" @click="my_balance(user_type.balance)">
<div class="my_price">{{user_type.balance?user_type.balance:0.00}}元</div>
<div>账户余额</div>
</div>
<div class="my_count_item" @click="my_consumption">
<div class="my_price">{{user_type.count?user_type.count:0}}张</div>
<div>消费金额</div>
</div>
</div>
<div class="my_item_box">
<div class="my_item" @click="goPay">
<img src="../../assets/image/my0.png" alt="">
<span>我的订单</span>
</div>
<div class="my_item" @click="go_hearth">
<img src="../../assets/image/my1.png" alt="">
<span>健康档案</span>
</div>
<div class="my_item border_2" @click="my_power">
<img src="../../assets/image/my2.png" alt="">
<span>我的权益</span>
</div>
<div class="my_item border_1" @click="question">
<img src="../../assets/image/my3.png" alt="">
<span>常见问题</span>
</div>
<div class="my_item border_1 " @click="friend">
<img src="../../assets/image/my4.png" alt="">
<span>邀请好友</span>
<span class="my_money">领取高额消费金额</span>
</div>
<div class="my_item border_1 border_2" @click="set">
<img src="../../assets/image/my5.png" alt="">
<span>设置</span>
</div>
</div>
</div>
</body>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<title>慈界医养</title>
<script src="../../assets/js/fontsize.js"></script>
<link rel="stylesheet" href="../../assets/css/weui.min.css">
<link rel="stylesheet" href="../../assets/css/api.css" />
<link rel="stylesheet" href="../../assets/css/my_f.css" />
<link rel="stylesheet" href="../../assets/css/index.css">
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
<style>
header {
width: 100%;
height: auto;
font-size: 20px;
/*background-color: #dbb25f;*/
}
.headers {
background-color: #dbb25f;
}
.strict_box {
display: flex;
align-items: center;
justify-content: space-around;
font-size: 11px;
color: #565656;
padding: 0.26rem 0;
background-color: #fff;
}
.strict_box .iconfont {
color: #D8B25F;
font-size: 15px;
margin-right: 0.1rem;
}
.strict_box1 {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 11px;
padding: 0.21rem 0.37rem;
background-color: #fff;
}
.strict_box1_left {
padding: 0.14rem 0.3rem;
box-shadow: 0 0 3px #ccc;
color: #686868;
border-radius: 0.16rem;
}
.strict_box1_right {
padding: 0.14rem 0.3rem;
color: #FBA500;
box-shadow: 0 0 3px rgba(251, 165, 0, 0.5);
border-radius: 0.16rem;
}
.progress_box {
margin: 0.1rem 0.26rem 0 0.26rem;
background-color: #f5f5f5;
}
.progress {
height: 0.08rem;
background-color: #D8B25F;
width: 0;
}
.target_box {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.46rem 0;
box-shadow: 0 -3px 4px 0 #E4E4E4 inset;
background-color: #fff;
}
.target_item {
font-size: 17px;
color: #060606;
/*font-weight: 600;*/
text-align: center;
flex: 1;
border-right: 1px solid #d9d9d9;
padding: 0.2rem 0 0.1rem 0;
}
.target_item:last-child {
border: 0;
}
.target_item_bottom {
font-size: 12px;
color: #565656;
}
.strict_title {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 17px;
color: #000;
padding: 0.35rem 0;
background-color: #fff;
}
.strict_title span {
flex: 1;
text-align: center;
}
.strict_title .strict_title_item {
border-right: 2px solid #D8B25F;
}
.strict_title .strict_title_item_active {
color: #D8B25F;
}
.strict_content_title {
padding: 0.32rem 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
color: #060606;
background-color: #fff;
}
.strict_content_title .quan {
padding: 0.1rem 0;
border-bottom: 1px solid #333;
}
.strict_box_img {
display: flex;
align-items: center;
justify-content: center;
}
.strict_box_img img {
width: 100%;
}
.strict_btn {
display: flex;
align-items: center;
justify-content: space-between;
background: #fff;
padding: 0 0 0 0.57rem;
/*margin: 0.08rem 0 0 0;*/
position: fixed;
width: 100%;
left: 0;
bottom: 0;
z-index: 2;
/*border-top: 1px solid #fff;*/
}
.strict_btn_price {
font-size: 18px;
color: #E87139;
flex: 1;
}
.strict_btn_right {
flex: 1;
display: flex;
align-items: center;
font-size: 10px;
color: #333;
}
.goPay {
padding: 0.28rem 0;
background-color: #D8B25F;
font-size: 15px;
color: #fff;
flex: 1;
text-align: center;
}
.strict_btn_right_item {
padding: 0 0.32rem;
display: flex;
align-items: center;
flex-direction: column;
border-left: 1px solid #E4E4E4
}
.rmb {
font-size: 13px;
}
.index_on {
background-color: #fff;
border-bottom: 1px solid #f2f2f2;
}
.index_on .iconfont {
color: #D8B25F;
}
/*flex布局*/
[v-cloak] {
display: none;
}
</style>
</head>
<body>
<div id="app" v-cloak>
<div class="warp" v-cloak>
<header class="" id="header">
<div class="my_top">
<div class="my_header_boxs" @click="my_detail">
<div class="my_header_box">
<img :src="user_type.avatar?user_type.avatar:'../../assets/image/default_img.png'" alt="">
</div>
<span :class="['my_vip',user_type.is_vip==1?'vip_show':'no_vip']">V</span>
</div>
<div class="my_name">{{user_type.name}}</div>
</div>
</header>
<div class="my_count">
<div class="my_count_item" @click="my_balance(user_type.balance)">
<div class="my_price">{{user_type.balance?user_type.balance:0.00}}元</div>
<div>账户余额</div>
</div>
<div class="my_count_item" @click="my_consumption">
<div class="my_price">{{user_type.count?user_type.count:0}}张</div>
<div>消费金额</div>
</div>
</div>
<div class="my_item_box">
<div class="my_item" @click="goPay">
<img src="../../assets/image/my0.png" alt="">
<span>我的订单</span>
</div>
<div class="my_item" @click="go_hearth">
<img src="../../assets/image/my1.png" alt="">
<span>健康档案</span>
</div>
<div class="my_item border_2" @click="my_power">
<img src="../../assets/image/my2.png" alt="">
<span>我的权益</span>
</div>
<div class="my_item border_1" @click="question">
<img src="../../assets/image/my3.png" alt="">
<span>常见问题</span>
</div>
<div class="my_item border_1 " @click="friend">
<img src="../../assets/image/my4.png" alt="">
<span>邀请好友</span>
<span class="my_money">领取高额消费金额</span>
</div>
<div class="my_item border_1 border_2" @click="set">
<img src="../../assets/image/my5.png" alt="">
<span>设置</span>
</div>
</div>
</div>
<footer>
<div class="footer_item" :class="{footer_item_active:index==0}" @click="changeTab(0)">
<i class="iconfont icon-yuanjiaojuxingkaobei"></i>
<span>严选</span>
</div>
<div class="footer_item" :class="{footer_item_active:index==1}" @click="changeTab(1)">
<i class="iconfont icon-xingzhuang"></i>
<span>投资</span>
</div>
<div class="footer_item" :class="{footer_item_active:index==2}" @click="changeTab(2)">
<i class="iconfont icon-wo"></i>
<span>我的</span>
</div>
</footer>
</div>
</body>
</html>
<script>
window.onLoad = function() {
var map = new AMap.Map('container');
}
var url = 'https://webapi.amap.com/maps?v=1.4.8&key=ef53760bd959a4df08b7d4587280e642&callback=onLoad';
var jsapi = document.createElement('script');
jsapi.charset = 'utf-8';
jsapi.src = url;
document.head.appendChild(jsapi);
</script>
<script type="text/javascript" src="../../assets/js/api.js"></script>
<script type="text/javascript" src="../../assets/js/swiper-3.4.2.min.js"></script>
<script type="text/javascript" src="../../assets/js/weui.min.js"></script>
<script type="text/javascript" src="../../assets/js/public.js"></script>
<script type="text/javascript" src="../../assets/js/fastclick.js"></script>
<script>
new FastClick(document.body);
new FastClick(document.body);
</script>
<script type="text/javascript" src="../../assets/js/vue.min.js"></script>
<script type="text/javascript" src="../../assets/js/axios.min.js"></script>
<script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
<script type="text/javascript" src="../../assets/js/axios.min.js"></script>
<script>
var app = new Vue({
el: '#app',
data: {
isLogin: true,
// user_info: [],
user_type: [1],
avatar_default: '../../assets/image/mblogo_03.png',
default_name: '',
marginTop: '',
newList: [],
type: 0
},
created: function () {
apiready = function () {
app.type = api.pageParam.type ? api.pageParam.type : 0;
app.getUserIndexInfo()
if (getToken()) {
app.getUserIndexInfo()
app.getNews();
}
api.addEventListener({
name: 'changeInfo'
}, function (ret, err) {
app.getUserIndexInfo();
});
api.addEventListener({
name: 'login'
}, function (ret, err) {
app.getUserIndexInfo();
});
api.addEventListener({
name: 'pay_success'
}, function (ret, err) {
app.getUserIndexInfo();
});
api.addEventListener({
name: 'add_success'
}, function (ret, err) {
app.getUserIndexInfo();
});
}
},
methods: {
// 个人资料
my_detail: function () {
if (app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_detail', 'my/my_detail', '个人资料', 'my_detail', false, {rid: 0, type: 0})
}
},
// 设置
set: function () {
openView('my_set', 'my/my_set', '设置', 'my_set', false, false, false)
},
// 常见问题
question: function () {
if (app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_que', 'my/my_que', '常见问题', 'my_que', false, false, false)
}
},
// 邀友有赚
friend: function () {
if (app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_invite', 'my/my_invite', '邀请好友', 'my_invite', false, {invite_type: 0})
}
},
// 我的订单
goPay: function () {
if (app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_orderlist', 'my/my_orderlist', '我的订单', 'my_orderlist', false, false, false);
}
},
// 我的消息
my_news: function () {
if (app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_news', 'my/my_news', '消息通知', 'my_news', false, {new_type: 0})
}
},
// 有无消息判断
getNews: function () {
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
getRequest('post', 'user/index/getUserMessageList', null, header).then(function (res) {
if (res.data.code == 1) {
app.newList = res.data.data.unread;
} else {
toastMsg(res.data.msg)
}
loadEnd();
})
},
// 我的账号
my_balance: function () {
if (app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_balance', 'my/my_balance', '我的账号', 'my_balance', false, false, false)
}
},
// 我的消费金
my_consumption: function () {
if (app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_consumption', 'my/my_consumption', '我的消费金', 'my_consumption', false, false, false)
}
},
// 我的权益
my_power: function () {
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
if (app.user_type == '') {
toastMsg('未登录')
} else {
getRequest('post', 'user/index/myRights', null, header).then(function (res) {
if (res.data.code == 1) {
openView('my_benefit', 'my/my_benefit', '我的权益', 'my_benefit', false, false, false)
} else {
toastMsg(res.data.msg);
}
});
}
},
// 健康档案
go_hearth: function () {
if (app.user_type == '') {
toastMsg('未登录')
} else {
api.openFrame({
name: 'my_health',
url: './my_health.html',
// bounces: true,
rect: {
x: 0,
y: 0,
w: 'auto',
h: 'auto',
},
pageParam: {
rid: 0,
type: 0
}
});
}
},
// 获取个人信息
getUserIndexInfo: function () {
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function (res) {
// alert(JSON.stringify(res));
if (res.data.code == 1) {
app.user_type = res.data.data;
} else {
}
loadEnd()
});
}
}
})
var app = new Vue({
el: "#app",
data: {
index: 2,
isLogin: true,
// user_info: [],
user_type: [1],
avatar_default: '../../assets/image/mblogo_03.png',
default_name: '',
marginTop: '',
newList: [],
type: 0
},
created: function() {
this.getUserIndexInfo()
this.getNews();
},
mounted: function() {
window.addEventListener('scroll', this.handleScroll)
},
methods: {
// 个人资料
my_detail: function() {
if(app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_detail', 'my/my_detail', '个人资料', 'my_detail', false, {
rid: 0,
type: 0
})
}
},
// 设置
set: function() {
openView('my_set', 'my/my_set', '设置', 'my_set', false, false, false)
},
// 常见问题
question: function() {
if(app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_que', 'my/my_que', '常见问题', 'my_que', false, false, false)
}
},
// 邀友有赚
friend: function() {
if(app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_invite', 'my/my_invite', '邀请好友', 'my_invite', false, {
invite_type: 0
})
}
},
// 我的订单
goPay: function() {
if(app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_orderlist', 'my/my_orderlist', '我的订单', 'my_orderlist', false, false, false);
}
},
// 我的消息
my_news: function() {
if(app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_news', 'my/my_news', '消息通知', 'my_news', false, {
new_type: 0
})
}
},
// 有无消息判断
getNews: function() {
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
getRequest('post', 'user/index/getUserMessageList', null, header).then(function(res) {
if(res.data.code == 1) {
app.newList = res.data.data.unread;
} else {
toastMsg(res.data.msg)
}
loadEnd();
})
},
// 我的账号
my_balance: function() {
if(app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_balance', 'my/my_balance', '我的账号', 'my_balance', false, false, false)
}
},
// 我的消费金
my_consumption: function() {
if(app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_consumption', 'my/my_consumption', '我的消费金', 'my_consumption', false, false, false)
}
},
// 我的权益
my_power: function() {
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
if(app.user_type == '') {
toastMsg('未登录')
} else {
getRequest('post', 'user/index/myRights', null, header).then(function(res) {
if(res.data.code == 1) {
openView('my_benefit', 'my/my_benefit', '我的权益', 'my_benefit', false, false, false)
} else {
toastMsg(res.data.msg);
}
});
}
},
// 健康档案
go_hearth: function() {
if(app.user_type == '') {
toastMsg('未登录')
} else {
api.openFrame({
name: 'my_health',
url: './my_health.html',
// bounces: true,
rect: {
x: 0,
y: 0,
w: 'auto',
h: 'auto',
},
pageParam: {
rid: 0,
type: 0
}
});
}
},
// 获取个人信息
getUserIndexInfo: function() {
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function(res) {
// alert(JSON.stringify(res));
if(res.data.code == 1) {
app.user_type = res.data.data;
} else {}
loadEnd()
});
}, //底部菜单跳转
changeTab(index){
var url = index==0?'../index/index_f.html':index == 1?'../strict/strict_f.html':'my_f.html'
window.location.href = url
}
}
})
</script>
\ No newline at end of file
... ...
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<title>慈界医养</title>
<script src="../../assets/js/fontsize.js"></script>
<link rel="stylesheet" href="../../assets/css/weui.min.css">
<link rel="stylesheet" href="../../assets/css/api.css"/>
<link rel="stylesheet" href="../../assets/css/swiper-3.4.2.min.css">
<!--<link rel="stylesheet" href="http://at.alicdn.com/t/font_641470_jg64l6ijsg4lsor.css">-->
<link rel="stylesheet" href="../../assets/css/my_f.css"/>
<link rel="stylesheet" href="../../assets/css/index.css">
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
<title></title>
<style>
body {
/*background-color: #f2f2f2;*/
}
.strict_box {
display: flex;
align-items: center;
justify-content: space-around;
font-size: 11px;
color: #565656;
padding: 0.26rem 0;
background-color: #fff;
}
.strict_box .iconfont {
color: #D8B25F;
font-size: 15px;
margin-right: 0.1rem;
}
.strict_box1 {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 11px;
padding: 0.21rem 0.37rem;
background-color: #fff;
}
.strict_box1_left {
padding: 0.14rem 0.3rem;
box-shadow: 0 0 3px #ccc;
color: #686868;
border-radius: 0.16rem;
}
.strict_box1_right {
padding: 0.14rem 0.3rem;
color: #FBA500;
box-shadow: 0 0 3px rgba(251, 165, 0, 0.5);
border-radius: 0.16rem;
}
.progress_box {
margin: 0.1rem 0.26rem 0 0.26rem;
background-color: #f5f5f5;
}
.progress {
height: 0.08rem;
background-color: #D8B25F;
width: 0;
}
.target_box {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.46rem 0;
box-shadow: 0 -3px 4px 0 #E4E4E4 inset;
background-color: #fff;
}
.target_item {
font-size: 17px;
color: #060606;
/*font-weight: 600;*/
text-align: center;
flex: 1;
border-right: 1px solid #d9d9d9;
padding: 0.2rem 0 0.1rem 0;
}
.target_item:last-child {
border: 0;
}
.target_item_bottom {
font-size: 12px;
color: #565656;
}
.strict_title {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 17px;
color: #000;
padding: 0.35rem 0;
background-color: #fff;
}
.strict_title span {
flex: 1;
text-align: center;
}
.strict_title .strict_title_item {
border-right: 2px solid #D8B25F;
}
.strict_title .strict_title_item_active {
color: #D8B25F;
}
.strict_content_title {
padding: 0.32rem 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
color: #060606;
background-color: #fff;
}
.strict_content_title .quan {
padding: 0.1rem 0;
border-bottom: 1px solid #333;
}
.strict_box_img {
display: flex;
align-items: center;
justify-content: center;
}
.strict_box_img img {
header {
width: 100%;
height: auto;
font-size: 20px;
/*background-color: #dbb25f;*/
}
.strict_btn {
display: flex;
align-items: center;
justify-content: space-between;
background: #fff;
padding: 0 0 0 0.57rem;
/*margin: 0.08rem 0 0 0;*/
position: fixed;
width: 100%;
left: 0;
bottom: 0;
z-index: 2;
/*border-top: 1px solid #fff;*/
}
.strict_btn_price {
font-size: 18px;
color: #E87139;
flex: 1;
}
.strict_btn_right {
flex: 1;
display: flex;
align-items: center;
font-size: 10px;
color: #333;
}
.goPay {
padding: 0.28rem 0;
background-color: #D8B25F;
font-size: 15px;
color: #fff;
flex: 1;
text-align: center;
}
.strict_btn_right_item {
padding: 0 0.32rem;
display: flex;
align-items: center;
flex-direction: column;
border-left: 1px solid #E4E4E4
}
.rmb {
font-size: 13px;
.headers {
background-color: #dbb25f;
}
.index_on {
background-color: #fff;
border-bottom: 1px solid #f2f2f2;
}
.index_on .iconfont {
color: #D8B25F;
}
.strict_box {
display: flex;
align-items: center;
justify-content: space-around;
font-size: 11px;
color: #565656;
padding: 0.26rem 0;
background-color: #fff;
}
.strict_box .iconfont {
color: #D8B25F;
font-size: 15px;
margin-right: 0.1rem;
}
.strict_box1 {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 11px;
padding: 0.21rem 0.37rem;
background-color: #fff;
}
.strict_box1_left {
padding: 0.14rem 0.3rem;
box-shadow: 0 0 3px #ccc;
color: #686868;
border-radius: 0.16rem;
}
.strict_box1_right {
padding: 0.14rem 0.3rem;
color: #FBA500;
box-shadow: 0 0 3px rgba(251, 165, 0, 0.5);
border-radius: 0.16rem;
}
.progress_box {
margin: 0.1rem 0.26rem 0 0.26rem;
background-color: #f5f5f5;
}
.progress {
height: 0.08rem;
background-color: #D8B25F;
width: 0;
}
.target_box {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.46rem 0;
box-shadow: 0 -3px 4px 0 #E4E4E4 inset;
background-color: #fff;
}
.target_item {
font-size: 17px;
color: #060606;
/*font-weight: 600;*/
text-align: center;
flex: 1;
border-right: 1px solid #d9d9d9;
padding: 0.2rem 0 0.1rem 0;
}
.target_item:last-child {
border: 0;
}
.target_item_bottom {
font-size: 12px;
color: #565656;
}
.strict_title {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 17px;
color: #000;
padding: 0.35rem 0;
background-color: #fff;
}
.strict_title span {
flex: 1;
text-align: center;
}
.strict_title .strict_title_item {
border-right: 2px solid #D8B25F;
}
.strict_title .strict_title_item_active {
color: #D8B25F;
}
.strict_content_title {
padding: 0.32rem 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
color: #060606;
background-color: #fff;
}
.strict_content_title .quan {
padding: 0.1rem 0;
border-bottom: 1px solid #333;
}
.strict_box_img {
display: flex;
align-items: center;
justify-content: center;
}
.strict_box_img img {
width: 100%;
}
.strict_btn {
display: flex;
align-items: center;
justify-content: space-between;
background: #fff;
padding: 0 0 0 0.57rem;
/*margin: 0.08rem 0 0 0;*/
position: fixed;
width: 100%;
left: 0;
bottom: 0;
z-index: 2;
/*border-top: 1px solid #fff;*/
}
.strict_btn_price {
font-size: 18px;
color: #E87139;
flex: 1;
}
.strict_btn_right {
flex: 1;
display: flex;
align-items: center;
font-size: 10px;
color: #333;
}
.goPay {
padding: 0.28rem 0;
background-color: #D8B25F;
font-size: 15px;
color: #fff;
flex: 1;
text-align: center;
}
.strict_btn_right_item {
padding: 0 0.32rem;
display: flex;
align-items: center;
flex-direction: column;
border-left: 1px solid #E4E4E4
}
.rmb {
font-size: 13px;
}
.index_on {
background-color: #fff;
border-bottom: 1px solid #f2f2f2;
}
.index_on .iconfont {
color: #D8B25F;
}
/*flex布局*/
[v-cloak]{
display: none;
}
</style>
</head>
<body>
<div id="loadStart"></div>
<div id="app" v-cloak>
<div class="index1">
<img :src="banner" alt="">
</div>
<div class="strict_box" id="main">
<div><span class="iconfont icon-fenhong"></span><span>尊享分红收益</span></div>
<div><span class="iconfont icon-xunzhang"></span><span>高额消费金额</span></div>
<div><span class="iconfont icon-tishengfantaishuai"></span><span>提升健康水平</span></div>
</div>
<div class="strict_box1">
<span class="strict_box1_left"><span v-if="state==1">开放认购中</span><span v-else>未开放认购</span></span>
<span class="strict_box1_right">认购进度{{progress}}%</span>
</div>
<div class="progress_box">
<div class="progress" :style="{width:progress+'%'}"></div>
</div>
<div class="target_box">
<div class="target_item">
<div>{{taget}}人</div>
<div class="target_item_bottom">II期目标</div>
<div id="container"></div>
<header :class="index===0?'headers':''">
<div class="index1" v-else-if="index==1">
<div class="index1_item index_on">
<!--<div class="index1_item index_on">-->
<div></div>
<div class="iconfont icon-fenxiang-tianchong"></div>
</div>
</div>
<div class="target_item">
<div>{{num}}人</div>
<div class="target_item_bottom">已认购</div>
</header>
<div class="warp" v-cloak>
<div class="index1">
<img :src="banner" alt="">
</div>
<div class="strict_box" id="main">
<div><span class="iconfont icon-fenhong"></span><span>尊享分红收益</span></div>
<div><span class="iconfont icon-xunzhang"></span><span>高额消费金额</span></div>
<div><span class="iconfont icon-tishengfantaishuai"></span><span>提升健康水平</span></div>
</div>
<div class="strict_box1">
<span class="strict_box1_left"><span v-if="state==1">开放认购中</span><span v-else>未开放认购</span></span>
<span class="strict_box1_right">认购进度{{progress}}%</span>
</div>
<div class="progress_box">
<div class="progress" :style="{width:progress+'%'}"></div>
</div>
<div class="target_box">
<div class="target_item">
<div>{{taget}}人</div>
<div class="target_item_bottom">II期目标</div>
</div>
<div class="target_item">
<div>{{num}}人</div>
<div class="target_item_bottom">已认购</div>
</div>
<div class="target_item">
<div>{{toWan(money)}}元起</div>
<div class="target_item_bottom">起购金额</div>
</div>
</div>
<div class="strict_title">
<span :class="['strict_title_item',show_img?'strict_title_item_active':'']" @click="show_img=true">慈界介绍</span>
<span @click="show_img=false" :class="{strict_title_item_active:!show_img}">权益方案</span>
</div>
<div class="strict_content_title" v-show="show_img">
<div><span></span><span class="quan">界介</span><span></span></div>
</div>
<div class="strict_content_title" v-show="!show_img">
<div><span></span><span class="quan">益方</span><span></span></div>
</div>
<div class="strict_box_img" v-show="show_img">
<div v-html="introduce"></div>
<!--<img src="../../assets/image/cjit_03.jpg" alt="">-->
</div>
<div class="strict_box_img" v-show="!show_img">
<div v-html="scheme"></div>
<!--<img src="../../assets/image/cjit_02.png" alt="">-->
</div>
<div class="strict_btn">
<div class="strict_btn_price"><span class="rmb"></span>{{money}}元起</div>
<div class="strict_btn_right">
<div class="strict_btn_right_item" @click="openCli"><span class="iconfont icon-Fill"></span><span>进群</span>
</div>
<div class="goPay" @click="go_pay">去认购</div>
</div>
</div>
</div>
<footer>
<div class="footer_item" :class="{footer_item_active:index==0}" @click="changeTab(0)">
<i class="iconfont icon-yuanjiaojuxingkaobei"></i>
<span>严选</span>
</div>
<div class="target_item">
<div>{{toWan(money)}}元起</div>
<div class="target_item_bottom">起购金额</div>
<div class="footer_item" :class="{footer_item_active:index==1}" @click="changeTab(1)">
<i class="iconfont icon-xingzhuang"></i>
<span>投资</span>
</div>
</div>
<div class="strict_title">
<span :class="['strict_title_item',show_img?'strict_title_item_active':'']" @click="show_img=true">慈界介绍</span>
<span @click="show_img=false" :class="{strict_title_item_active:!show_img}">权益方案</span>
</div>
<div class="strict_content_title" v-show="show_img">
<div><span></span><span class="quan">界介</span><span></span></div>
</div>
<div class="strict_content_title" v-show="!show_img">
<div><span></span><span class="quan">益方</span><span></span></div>
</div>
<div class="strict_box_img" v-show="show_img">
<div v-html="introduce"></div>
<!--<img src="../../assets/image/cjit_03.jpg" alt="">-->
</div>
<div class="strict_box_img" v-show="!show_img">
<div v-html="scheme"></div>
<!--<img src="../../assets/image/cjit_02.png" alt="">-->
</div>
<div class="strict_btn">
<div class="strict_btn_price"><span class="rmb"></span>{{money}}元起</div>
<div class="strict_btn_right">
<div class="strict_btn_right_item" @click="openCli"><span class="iconfont icon-Fill"></span><span>进群</span>
</div>
<div class="goPay" @click="go_pay">去认购</div>
<div class="footer_item" :class="{footer_item_active:index==2}" @click="changeTab(2)">
<i class="iconfont icon-wo"></i>
<span>我的</span>
</div>
</div>
</footer>
</div>
</body>
</html>
<script>
window.onLoad = function () {
var map = new AMap.Map('container');
}
var url = 'https://webapi.amap.com/maps?v=1.4.8&key=ef53760bd959a4df08b7d4587280e642&callback=onLoad';
var jsapi = document.createElement('script');
jsapi.charset = 'utf-8';
jsapi.src = url;
document.head.appendChild(jsapi);
</script>
<script type="text/javascript" src="../../assets/js/api.js"></script>
<script type="text/javascript" src="../../assets/js/swiper-3.4.2.min.js"></script>
<script type="text/javascript" src="../../assets/js/weui.min.js"></script>
<script type="text/javascript" src="../../assets/js/public.js"></script>
<script type="text/javascript" src="../../assets/js/fastclick.js"></script>
<script>
new FastClick(document.body);
</script>
<script type="text/javascript" src="../../assets/js/vue.min.js"></script>
<script type="text/javascript" src="../../assets/js/swiper-3.4.2.min.js"></script>
<script type="text/javascript" src="../../assets/js/axios.min.js"></script>
<script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
<script type="text/javascript" src="../../assets/js/axios.min.js"></script>
<script>
var app = new Vue({
el: '#app',
el: "#app",
data: {
index: 1,
change_index: '',
show_img: true,
share_show: false,
banner: '',
state: 0,//开放状态
taget: 0,//目标数量
num: 0,//已认购
progress: 0,//进度
money: 0,//认购金额
introduce: '',//介绍
scheme: '',//方案
wechat: '',
top: '0'
show_img: true,
share_show: false,
banner: '',
state: 0, //开放状态
taget: 0, //目标数量
num: 0, //已认购
progress: 0, //进度
money: 0, //认购金额
introduce: '', //介绍
scheme: '', //方案
wechat: '',
top: '0'
},
created: function () {
apiready = function () {
app.crowd();
if (getDevice() == 'iPhone10,3') {
app.top = '0.35rem'
}
api.addEventListener({
name: 'index1'
}, function (ret, err) {
app.img_active = ret.value.img_active;
api.setFrameAttr({
name: 'index_f',
});
});
}
this.crowd(); //第三栏
},
mounted: function() {
window.addEventListener('scroll', this.handleScroll)
},
methods: {
// 我的消息
// 去认购
go_pay: function () {
openView('strict_pay', 'strict/strict_pay', '认购')
},
// 分享
share: function () {
api.openFrame({
bgColor: 'rgba(0,0,0,0.05)',
name: 'share',
url: '../common/share.html',
bounces: false,
animation: {
type: "push",
subType: "from_bottom",
duration: 300
},
rect: {
x: 0,
y: 0,
w: 'auto',
h: 'auto'
}
});
},
// 展示微信号
openCli: function () {
api.openFrame({
bgColor: 'rgba(0,0,0,0.05)',
name: 'group',
url: '../common/group.html',
bounces: false,
animation: {
type: "reveal",
subType: "from_bottom",
duration: 300
},
pageParam: {
wechat: app.wechat
},
rect: {
x: 0,
y: 0,
w: 'auto',
h: 'auto'
}
});
},
// 定位头部
handleScroll: function () {
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
var offsetTop = document.querySelector('#main').offsetTop;
if (scrollTop > offsetTop) {
app.share_show = true
} else {
app.share_show = false
}
},
// 移除监听事件
destroyed: function () {
window.removeEventListener('scroll', this.handleScroll)
},
// 获取详情
crowd: function () {
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
getRequest('post', 'portal/Goods/crowd', null, header).then(function (res) {
// alert(JSON.stringify(res));
if (res.data.code == 1) {
app.banner = res.data.data.banner;
app.state = res.data.data.state;
app.taget = res.data.data.taget;
app.num = res.data.data.num;
app.progress = res.data.data.progress;
app.money = res.data.data.money;
app.introduce = res.data.data.introduce;
app.scheme = res.data.data.scheme;
app.wechat = res.data.data.wechat;
} else {
toastMsg(res.data.msg)
}
loadEnd();
})
go_pay: function() {
openView('strict_pay', 'strict/strict_pay', '认购')
},
// 分享
share: function() {
api.openFrame({
bgColor: 'rgba(0,0,0,0.05)',
name: 'share',
url: '../common/share.html',
bounces: false,
animation: {
type: "push",
subType: "from_bottom",
duration: 300
},
rect: {
x: 0,
y: 0,
w: 'auto',
h: 'auto'
}
});
},
// 展示微信号
openCli: function() {
api.openFrame({
bgColor: 'rgba(0,0,0,0.05)',
name: 'group',
url: '../common/group.html',
bounces: false,
animation: {
type: "reveal",
subType: "from_bottom",
duration: 300
},
pageParam: {
wechat: app.wechat
},
rect: {
x: 0,
y: 0,
w: 'auto',
h: 'auto'
}
});
},
// 定位头部
handleScroll: function() {
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
var offsetTop = document.querySelector('#main').offsetTop;
if(scrollTop > offsetTop) {
app.share_show = true
} else {
app.share_show = false
}
},
// 移除监听事件
destroyed: function() {
window.removeEventListener('scroll', this.handleScroll)
},
// 获取详情
crowd: function() {
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
getRequest('post', 'portal/Goods/crowd', null, header).then(function(res) {
// alert(JSON.stringify(res));
if(res.data.code == 1) {
app.banner = res.data.data.banner;
app.state = res.data.data.state;
app.taget = res.data.data.taget;
app.num = res.data.data.num;
app.progress = res.data.data.progress;
app.money = res.data.data.money;
app.introduce = res.data.data.introduce;
app.scheme = res.data.data.scheme;
app.wechat = res.data.data.wechat;
} else {
toastMsg(res.data.msg)
}
loadEnd();
})
},
// 切换底部导航
changeTab: function (res) {
//跳转页面
}
},
mounted: function () {
// 计算滚动条位置
window.addEventListener('scroll', this.handleScroll)
},
}
})
</script>
\ No newline at end of file
</script>
... ...