作者 朱振飞

修改登录判断

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>A6079080424317</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.aptana.editor.php.aptanaPhpBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.aptana.ide.core.unifiedBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.aptana.projects.webnature</nature>
<nature>com.aptana.editor.php.phpNature</nature>
</natures>
<filteredResources>
<filter>
<id>1536237167925</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-node_modules</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
... ...
header {
width: 100%;
height: auto;
font-size: 18px;
color: #424242;
}
.index_header {
line-height: 0.44rem;
color: #424242;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.24rem 0.3rem;
border-bottom: 1px solid #ececec;
}
.icon-fanhui {
color: #dbb25f;
font-size: 20px;
}
.win_mid {
padding-right: 0.5rem;
color: #424242;
}
.center {
line-height: 0.44rem;
color: #424242;
text-align: center;
padding: 0.2rem 0;
border-bottom: 1px solid #ececec;
}
\ No newline at end of file
... ...
... ... @@ -10,8 +10,10 @@
padding: 0.3rem 0.4rem;
font-size: 15px;
}
.index_left {
.white_bg{
background-color: #FFF;
}
.index_left {
display: flex;
align-items: center;
font-size: 14px;
... ...
... ... @@ -52,22 +52,14 @@ function openView(fmName, fmUrl, winTitle, winName, winUrl, fmParams, winParams)
}
function closeWindow(winName) {
if (winName) {
api.closeWin({
name: winName,
animation: "reveal"
});
} else {
api.closeWin({
animation: "reveal"
});
}
window.location.href = document.referrer;
window.history.back(-1);
}
function getHeight(id) {
return document.getElementById(id).offsetHeight;
}
function openFm(fmName, url) {
var posY = $api.offset($api.dom("header")).h;
... ... @@ -359,15 +351,18 @@ function getRequest(type, url, params, header) {
}).then(function (res) {
// alert(JSON.stringify(res))
if (res.data.code == 502) {
openView('login_index', 'login/login_index', '登录', 'login_index', false, false, false)
setTimeout(() => {
window.location.href = '/html/login/login_index.html'
}, 2000);
// openView('login_index', 'login/login_index', '登录', 'login_index', false, false, false)
} else {
resolve(res)
resolve(res)
}
loadEnd();
// resolve(res)
}).catch(function (err) {
}).catch(function (err) {
toastMsg('网络错误');
openView('wrong', 'common/wrong', '网络错误', 'wrong', false, false, false);
// openView('wrong', 'common/wrong', '网络错误', 'wrong', false, false, false);
// alert(JSON.stringify(err))
reject(err)
})
... ...
... ... @@ -10,6 +10,7 @@
<script src="../../assets/js/fontsize.js"></script>
<link rel="stylesheet" href="../../assets/css/api.css"/>
<link rel="stylesheet" href="../../assets/css/index.css">
<link rel="stylesheet" href="../../assets/css/common_header.css">
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
<style>
body {
... ... @@ -29,52 +30,61 @@
<body>
<div id="loadStart"></div>
<div id="app" v-cloak>
<div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">
<!--<div class="nurse_text">{{name}}</div>-->
</div>
<div class="nurse_title" v-if="cid==3">
<span class="pro">中医</span>
<span class="prod">服务</span>
<span> | 未病先防及既病防变,提高健康水平</span>
</div>
<div class="nurse_title" v-else-if="cid==6">
<span class="pro">母婴</span>
<span class="prod">服务</span>
<span> | 专业服务,度过美好而难忘的日子</span>
</div>
<div class="nurse_title" v-else>
<span class="pro">康复</span>
<span class="prod">服务</span>
<span> | 把握黄金康复期,提高健康质量</span>
</div>
<div class="swiper_list">
<div class="swiper_item nodata" v-if="goods.length==0">暂无信息</div>
<div class="swiper_item" v-else @click="openDoc(item.good_id)" v-for="(item,index) in goods">
<div class="swiper_item_img"><img :src="item.img" alt=""></div>
<div class="swiper_item_right">
<div class="swiper_item_title">{{item.post_title}}</div>
<div class="swiper_item_content">{{item.other_title}}</div>
<div class="swiper_item_type">
<div class="swiper_item_type1" v-for="(j,item2_index) in item.tag">
<div class="icon_img"><img :src="j.url" alt=""></div>
<span>{{j.text}}</span>
<header id="header">
<div class="index_header white_bg">
<div class="close_left" onclick="closeWindow()"><span class="iconfont icon-fanhui"></span></div>
<div class="win_mid">{{winTitle}}</div>
<div></div>
</div>
</header>
<div class="warp">
<div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">
<!--<div class="nurse_text">{{name}}</div>-->
</div>
<div class="nurse_title" v-if="cid==3">
<span class="pro">中医</span>
<span class="prod">服务</span>
<span> | 未病先防及既病防变,提高健康水平</span>
</div>
<div class="nurse_title" v-else-if="cid==6">
<span class="pro">母婴</span>
<span class="prod">服务</span>
<span> | 专业服务,度过美好而难忘的日子</span>
</div>
<div class="nurse_title" v-else>
<span class="pro">康复</span>
<span class="prod">服务</span>
<span> | 把握黄金康复期,提高健康质量</span>
</div>
<div class="swiper_list">
<div class="swiper_item nodata" v-if="goods.length==0">暂无信息</div>
<div class="swiper_item" v-else @click="openDoc(item.good_id)" v-for="(item,index) in goods">
<div class="swiper_item_img"><img :src="item.img" alt=""></div>
<div class="swiper_item_right">
<div class="swiper_item_title">{{item.post_title}}</div>
<div class="swiper_item_content">{{item.other_title}}</div>
<div class="swiper_item_type">
<div class="swiper_item_type1" v-for="(j,item2_index) in item.tag">
<div class="icon_img"><img :src="j.url" alt=""></div>
<span>{{j.text}}</span>
</div>
</div>
<div class="swiper_item_money">¥{{item.real_price?item.real_price:0}}</div>
</div>
<div class="swiper_item_money">¥{{item.real_price?item.real_price:0}}</div>
</div>
</div>
</div>
<div class="nurse_title"><span class="pro">相关</span><span
class="prod">服务</span><span> | 更多优质服务推介</span></div>
<div class="nurse_img_box ">
<div class="nurse_item bcg" @click="openDoc(item.goods_id)" v-for="(item,index) in related_service">
<div class="nurse_item_img">
<img :src="item.img" alt="">
<div class="nurse_title"><span class="pro">相关</span><span class="prod">服务</span><span> | 更多优质服务推介</span></div>
<div class="nurse_img_box ">
<div class="nurse_item bcg" @click="openDoc(item.goods_id)" v-for="(item,index) in related_service">
<div class="nurse_item_img">
<img :src="item.img" alt="">
</div>
<div class="nurse_item_title bold">{{item.name}}</div>
<div><span class="nurse_item_price">{{item.price}}</span></div>
</div>
<div class="nurse_item_title bold">{{item.name}}</div>
<div><span class="nurse_item_price">{{item.price}}</span></div>
</div>
</div>
</div>
</body>
</html>
... ... @@ -96,17 +106,13 @@
name: '',
goods: [],
related_service: [],
winTitle:''
},
created: function () {
apiready = function () {
app.cid = api.pageParam.cid;
app.cityname = api.pageParam.cityname;
app.getCatInfo2();
api.setFrameAttr({
name: 'disease_f',
bounces: true
});
}
this.cid = localStorage.getItem('cid');
this.cityname = localStorage.getItem('cityName');
this.winTitle = localStorage.getItem('winTitle');
this.getCatInfo2();
},
methods: {
openDoc: function (id) {
... ... @@ -115,14 +121,14 @@
url: './care_w.html',
pageParam: {
id: id,
cid: app.cid,
cityname: app.cityname
cid: this.cid,
cityname: this.cityname
}
})
},
getCatInfo2: function () {
var post = {
cid: app.cid
cid: this.cid
};
var header = {
"XX-Device-Type": getDevice(),
... ...
... ... @@ -10,6 +10,7 @@
<script src="../../assets/js/fontsize.js"></script>
<link rel="stylesheet" href="../../assets/css/api.css"/>
<link rel="stylesheet" href="../../assets/css/index.css">
<link rel="stylesheet" href="../../assets/css/common_header.css">
<link rel="stylesheet" href="../../assets/css/swiper-3.4.2.min.css">
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
<style>
... ... @@ -67,52 +68,53 @@
</style>
</head>
<body>
<!-- 背景充满 -->
<div id="loadStart"></div>
<div id="app" class="warp" >
{{JSON.stringify(banner)}}
<!--<div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">-->
<!--&lt;!&ndash;<div class="nurse_text">{{name}}</div>&ndash;&gt;-->
<!--</div>-->
<!--<div class="examination_box">-->
<!--<div class="examination_swiper">-->
<!--<div class="swiper-container">-->
<!--<div class="swiper-wrapper">-->
<!--<div class="swiper-slide" v-for="(item,index) in navs">-->
<!--<span v-text="item" :class="{'examination_active':index==ind}"-->
<!--@click="changeSwiper(index)"></span>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--<div class="examination_content_swiper">-->
<!--<div class="swiper-container ">-->
<!--<div class="swiper-wrapper">-->
<!--<div class="swiper-slide" v-for="(item,index) in goods">-->
<!--<div class="swiper_list">-->
<!--<div class="swiper_item nodata" v-if="item.goods.length==0">暂无信息</div>-->
<!--<div class="swiper_item" v-else @click="openDoc(i.good_id)"-->
<!--v-for="(i,iindex) in item.goods">-->
<!--<div class="swiper_item_img"><img :src="i.img" alt=""></div>-->
<!--<div class="swiper_item_right">-->
<!--<div class="swiper_item_title">{{i.post_title}}</div>-->
<!--<div class="swiper_item_content">{{i.other_title}}</div>-->
<!--<div class="swiper_item_type">-->
<!--<div class="swiper_item_type1" v-for="(j,item2_index) in i.tag">-->
<!--<div class="icon_img"><img :src="j.url" alt=""></div>-->
<!--<span>{{j.text}}</span>-->
<!--</div>-->
<!--</div>-->
<!--<div class="swiper_item_money"><span>¥{{i.real_price?i.real_price:0}}</span><span-->
<!--class="old_price">¥{{i.price?i.price:0}}</span>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!-- {{JSON.stringify(banner)}} -->
<div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">
<div class="nurse_text">{{name}}</div>
</div>
<div class="examination_box">
<div class="examination_swiper">
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide" v-for="(item,index) in navs">
<span v-text="item" :class="{'examination_active':index==ind}"
@click="changeSwiper(index)"></span>
</div>
</div>
</div>
</div>
<div class="examination_content_swiper">
<div class="swiper-container ">
<div class="swiper-wrapper">
<div class="swiper-slide" v-for="(item,index) in goods">
<div class="swiper_list">
<div class="swiper_item nodata" v-if="item.goods.length==0">暂无信息</div>
<div class="swiper_item" v-else @click="openDoc(i.good_id)"
v-for="(i,iindex) in item.goods">
<div class="swiper_item_img"><img :src="i.img" alt=""></div>
<div class="swiper_item_right">
<div class="swiper_item_title">{{i.post_title}}</div>
<div class="swiper_item_content">{{i.other_title}}</div>
<div class="swiper_item_type">
<div class="swiper_item_type1" v-for="(j,item2_index) in i.tag">
<div class="icon_img"><img :src="j.url" alt=""></div>
<span>{{j.text}}</span>
</div>
</div>
<div class="swiper_item_money"><span>¥{{i.real_price?i.real_price:0}}</span><span
class="old_price">¥{{i.price?i.price:0}}</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
... ... @@ -127,7 +129,6 @@
<script type="text/javascript" src="../../assets/js/axios.min.js"></script>
<script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
<script>
alert(1);
var app = new Vue({
el: '#app',
data: {
... ... @@ -147,30 +148,27 @@
goods: []
},
created: function () {
apiready = function () {
app.cid = api.pageParam.cid;
// alert(app.id)
app.getCatInfo3();
// //导航轮播
app.mySwiper = new Swiper('.examination_swiper .swiper-container', {
slidesPerView: 'auto',
slideToClickedSlide: true,
observer: true,
observeParents: true,
freeMode: true
});
//内容轮播
app.Swiper1 = new Swiper('.examination_content_swiper .swiper-container', {
observer: true,
observeParents: true,
autoHeight: true,
onTransitionEnd: function (swiper) {
app.ind = swiper.activeIndex;
app.mySwiper.slideTo(swiper.activeIndex, 500)
// alert(swiper.activeIndex);
}
});
}
this.cid = localStorage.getItem('cid')
this.getCatInfo3();
this.mySwiper = new Swiper('.examination_swiper .swiper-container', {
slidesPerView: 'auto',
slideToClickedSlide: true,
observer: true,
observeParents: true,
freeMode: true
});
//内容轮播
this.Swiper1 = new Swiper('.examination_content_swiper .swiper-container', {
observer: true,
observeParents: true,
autoHeight: true,
onTransitionEnd: function (swiper) {
app.ind = swiper.activeIndex;
app.mySwiper.slideTo(swiper.activeIndex, 500)
// alert(swiper.activeIndex);
}
});
},
methods: {
changeSwiper: function (index) {
... ... @@ -189,7 +187,7 @@
},
getCatInfo3: function () {
var post = {
cid: app.cid
cid: this.cid
};
var header = {
"XX-Device-Type": getDevice(),
... ...
<!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="../../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>
header {
<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/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>
header {
width: 100%;
height: auto;
font-size: 20px;
... ... @@ -82,43 +82,44 @@
}
</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>
<div class="warp">
<div class="index_list" id="top">
<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>
<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>
<div class="menus" v-show="img_active">
<div class="menus_item" @click="openOrder"><span class="iconfont icon-dingdan"></span><span>我的订单</span>
</div>
... ... @@ -129,82 +130,85 @@
<!--<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 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>
<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">
<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="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 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 class="swiper_item_money">¥{{i.price}}</div>
</div>
</div>
</div>
</div>
<div class="mold_index" v-show="img_active" @touchstart="hideMenu"></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>
</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);
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>
... ... @@ -212,7 +216,7 @@
<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>
... ... @@ -230,20 +234,20 @@
autoHeight: false,
speed: 1500,
});
var app = new Vue({
el: "#app",
data: {
index: 0,
headerH: '',
footerH: '',
getlng: '',
getlat: '',
cityindex: '',
cityname: '',
img_active: false,
map: {},
newList: [],
img_active: false,
var app = new Vue({
el: "#app",
data: {
index: 0,
headerH: '',
footerH: '',
getlng: '',
getlat: '',
cityindex: '',
cityname: '',
img_active: false,
map: {},
newList: [],
img_active: false,
mySwiper: {},
scroll_top: '',
top_show: false,
... ... @@ -251,104 +255,108 @@
index_data: [],
show_data: [],
img_default: '../../assets/image/logo200.png',
cityname: '',
cityname: '天津',
rongYunToken: '',
userId: '',
userId: '',
user_info: []
},
created: function () {
this.cat(); //首页导航
},
created: function () {
this.cat(); //首页导航
this.indexList(); //第三栏
this.show(); //严选推荐
// 底部轮播图
},
mounted: function() {
},
mounted: function () {
window.addEventListener('scroll', this.handleScroll)
},
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({
// 是否使用高精度定位,默认:
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) {
//跳转页面
},
// 切换当前城市
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
}
},
// 隐藏快捷菜单
hideMenu: function () {
app.img_active = !app.img_active;
api.sendEvent({
name: 'show_menu',
extra: {
img_active: app.img_active
}
});
},
//首页的数据
// 隐藏菜单
hideMenu: function() {
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({
// 是否使用高精度定位,默认:
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) {
//跳转页面
},
// 切换当前城市
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
}
},
// 隐藏快捷菜单
hideMenu: function () {
app.img_active = !app.img_active;
api.sendEvent({
name: 'show_menu',
extra: {
img_active: app.img_active
}
});
},
//首页的数据
// 隐藏菜单
hideMenu: function () {
app.img_active = !app.img_active;
api.sendEvent({
name: 'hide_menu',
... ... @@ -358,22 +366,22 @@
});
},
// 严选推荐定位
handleScroll: function() {
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) {
console.log(scrollTop, offsetTop)
if (scrollTop > offsetTop) {
app.top_show = true
} else {
app.top_show = false
}
},
// 严选推荐定位
destroyed: function() {
destroyed: function () {
window.removeEventListener('scroll', this.handleScroll)
},
// 打开投资
openStrict: function() {
openStrict: function () {
app.img_active = false;
api.setFrameGroupIndex({
... ... @@ -382,7 +390,7 @@
})
},
// 打开订单
openOrder: function() {
openOrder: function () {
app.img_active = false;
openView('my_orderlist', 'my/my_orderlist', '我的订单', 'my_orderlist', false, false, false);
api.sendEvent({
... ... @@ -393,7 +401,7 @@
});
},
// 打开健康档案
openHealth: function() {
openHealth: function () {
app.img_active = false;
api.openWin({
name: 'my_health_w',
... ... @@ -410,19 +418,19 @@
});
},
// 打开客服
openSever: function() {
openSever: function () {
app.img_active = false;
app.getRongYunToken();
},
// 获取客服token
getRongYunToken: function() {
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) {
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();
... ... @@ -430,7 +438,7 @@
})
},
// 轮播图跳转详情
care: function(id, care_name) {
care: function (id, care_name) {
api.openWin({
name: 'care_w',
url: './care_w.html',
... ... @@ -440,141 +448,137 @@
}
})
},
getUserIndexInfo: function() {
getUserIndexInfo: function () {
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function(res) {
getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function (res) {
// alert(JSON.stringify(res))
if(res.data.code == 1) {
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) {
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) {
openItem: function (id, name) {
switch (id) {
case 1:
url = 'nursing_f'
openView('nursing_f', 'index/nursing_f', name, 'nursing_f', false, {
cid: id,
cityname: app.cityname
});
// 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
});
// 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
});
// 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
});
// 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
});
// 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
});
// 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
});
// 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
}
});
// 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
}
});
url = 'tral_w'
// 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;
}
localStorage.setItem('cid', id)
localStorage.setItem('cityName', app.cityname)
localStorage.setItem('winTitle', name)
window.location.href = url + '.html'
},
// 获取第三栏列表
indexList: function() {
getRequest('post', 'portal/index/index', null, null).then(function(res) {
if(res.data.code == 1) {
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) {
show: function () {
getRequest('POST', 'portal/index/show', null, null).then(function (res) {
// alert(JSON.stringify(res));
if(res.data.code == 1) {
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'
changeTab(index) {
var url = index == 0 ? 'index_f.html' : index == 1 ? '../strict/strict_f.html' : '../my/my_f.html'
window.location.href = url
}
}
})
}
})
</script>
... ...
<!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 name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-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/api.css"/>
<link rel="stylesheet" href="../../assets/css/api.css" />
<link rel="stylesheet" href="../../assets/css/index.css">
<link rel="stylesheet" href="../../assets/css/common_header.css">
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
<style>
body {
/*background-color: #efefef;*/
}
</style>
</head>
<body>
<div id="loadStart"></div>
<div id="app" v-cloak>
<div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">
<!--<div class="nurse_text">{{name}}</div>-->
</div>
<div class="nurse_title"><span class="pro">专业</span><span class="prod">护理</span><span>| 优质上门护理服务推荐</span></div>
<div class="nurse_img_box">
<div class="nurse_item" v-for="(item,index) in introduce" @click="care(item.goods_id)">
<!--<div class="nurse_item_title">{{item.name}}</div>-->
<!--<div><span class="nurse_item_price">{{item.price}}</span>元起</div>-->
<div class="nurse_item_img">
<img :src="item.img" alt="">
<div id="loadStart"></div>
<div id="app" v-cloak>
<header id="header">
<div class="index_header white_bg" >
<div class="close_left" onclick="closeWindow()"><span class="iconfont icon-fanhui"></span></div>
<div class="win_mid">{{winTitle}}</div>
<div></div>
</div>
</div>
</div>
<div class="business_box">
<div class="business_item" v-for="(item,index) in goods" @click="care(item.good_id)">
<div class="business_item_img"><img :src="item.icon" alt=""/></div>
<div class="business_item_right">
<div class="business_item_title clamp1">{{item.post_title}}</div>
<div class="business_content clamp1">{{item.other_title}}</div>
</header>
<div class="warp">
<div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">
<!--<div class="nurse_text">{{name}}</div>-->
</div>
</div>
</div>
<div class="nurse_title"><span class="pro">相关</span><span class="prod">服务</span><span>| 更多优质服务推介</span></div>
<div class="nurse_img_box">
<div class="nurse_item bcg" v-for='(item,index) in careList' @click="care(item.goods_id)">
<div class="nurse_item_img">
<img :src="item.img" alt="">
<div class="nurse_title"><span class="pro">专业</span><span class="prod">护理</span><span>| 优质上门护理服务推荐</span></div>
<div class="nurse_img_box">
<div class="nurse_item" v-for="(item,index) in introduce" @click="care(item.goods_id)">
<!--<div class="nurse_item_title">{{item.name}}</div>-->
<!--<div><span class="nurse_item_price">{{item.price}}</span>元起</div>-->
<div class="nurse_item_img">
<img :src="item.img" alt="">
</div>
</div>
</div>
<div class="business_box">
<div class="business_item" v-for="(item,index) in goods" @click="care(item.good_id)">
<div class="business_item_img"><img :src="item.icon" alt="" /></div>
<div class="business_item_right">
<div class="business_item_title clamp1">{{item.post_title}}</div>
<div class="business_content clamp1">{{item.other_title}}</div>
</div>
</div>
</div>
<div class="nurse_title"><span class="pro">相关</span><span class="prod">服务</span><span>| 更多优质服务推介</span></div>
<div class="nurse_img_box">
<div class="nurse_item bcg" v-for='(item,index) in careList' @click="care(item.goods_id)">
<div class="nurse_item_img">
<img :src="item.img" alt="">
</div>
<div class="nurse_item_title bold">{{item.name}}</div>
<div><span class="nurse_item_price">{{item.price}}</span>元起</div>
</div>
</div>
<div class="nurse_item_title bold">{{item.name}}</div>
<div><span class="nurse_item_price">{{item.price}}</span>元起</div>
</div>
</div>
</div>
</body>
</html>
<script type="text/javascript" src="../../assets/js/api.js"></script>
<script type="text/javascript" src="../../assets/js/public.js"></script>
... ... @@ -73,19 +82,14 @@
careList: [],
goods: [],
introduce: [],
cityname: ''
cityname: '',
winTitle: ''
},
created: function () {
apiready = function () {
app.cid = api.pageParam.cid;
app.cityname = api.pageParam.cityname;
app.getCatInfo();
// alert(app.id)
api.setFrameAttr({
name: 'nursing_f',
bounces: true
});
}
this.cid = localStorage.getItem('cid');
this.cityname = localStorage.getItem('cityName');
this.winTitle = localStorage.getItem('winTitle')
this.getCatInfo();
},
methods: {
care: function (id) {
... ... @@ -101,7 +105,7 @@
// 获取分类信息
getCatInfo: function () {
var post = {
cid: app.cid
cid: this.cid
};
var header = {
'XX-Device-Type': getDevice(),
... ...
... ... @@ -469,6 +469,7 @@
}, //底部菜单跳转
changeTab(index){
var url = index==0?'../index/index_f.html':index == 1?'../strict/strict_f.html':'my_f.html'
console.log(url)
window.location.href = url
}
... ...