作者 朱振飞

页面串联

... ... @@ -243,10 +243,6 @@ footer {
overflow: hidden;
}
.swiper-container {
overflow: hidden;
}
.swiper_title {
display: flex;
align-items: center;
... ... @@ -281,17 +277,17 @@ footer {
}
.swiper_item {
/*display: flex;*/
/*align-items: center;*/
/*justify-content: space-between;*/
/*font-size: 14px;*/
/*color: #424242;*/
/*padding: 14px 12px 14px 0;*/
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
color: #424242;
padding: 0 7px;
/*margin: 0 7px;*/
border-top: 1px solid #ececec;
box-sizing: border-box;
background-color: #fff;
/*width: 100%;*/
width: 100%;
}
.swiper_item_img {
... ...
... ... @@ -7,11 +7,12 @@ var mobileReg = /^1(3[0-9]|4[57]|5[0-35-9]|7[0135678]|8[0-9])\d{8}$/; //手机
var id_card = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;//身份证正则
function openWin(winName, url) {
api.openWin({
name: winName,
url: url
});
function openWin(data) {
for(var item in data.pageParam){
localStorage.setItem(item,data.pageParam[item])
}
window.location.href = data.url
}
function openView(fmName, fmUrl, winTitle, winName, winUrl, fmParams, winParams) {
... ...
... ... @@ -86,13 +86,13 @@
<div id="loadStart"></div>
<div id="app" v-cloak>
<header id="header">
<div class="index_header">
<div class="close_left" onclick="closeWindow()"><span class="iconfont icon-fanhui"></span></div>
<span>{{post_title}}</span>
<span class="iconfont icon-fenxiang-tianchong" ></span>
</div>
</header>
<!--<header id="header">-->
<!--<div class="index_header">-->
<!--<div class="close_left" onclick="closeWindow()"><span class="iconfont icon-fanhui"></span></div>-->
<!--<span>{{post_title}}</span>-->
<!--<span class="iconfont icon-fenxiang-tianchong" ></span>-->
<!--</div>-->
<!--</header>-->
<div class="warp">
<div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">
<!--<div class="nurse_text">{{post_title}}</div>-->
... ... @@ -151,6 +151,8 @@
<script type="text/javascript" src="../../assets/js/axios.min.js"></script>
<script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
<script>
var title = document.getElementsByTagName("title")[0]
var app = new Vue({
el: '#app',
data: {
... ... @@ -208,7 +210,7 @@
},
// 获取详情
proCareInfoInfo: function () {
var app = this
var app = this;
var post = {
id: app.id
};
... ... @@ -227,6 +229,7 @@
// app.banner = app.proCareInfoInfo_data.banner
}
})
},
// 获取个人的基本信息
getUserIndexInfo: function () {
... ... @@ -250,7 +253,13 @@
name: 'cs_win',
url: '../common/cs_win.html'
});
},
}
},
watch:{
post_title(curVal,oldVal){
// title.innerText = this.post_title;
document.title = this.post_title;
}
}
})
</script>
\ No newline at end of file
... ...
<!doctype html>
<html lang="en">
<head>
<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">
... ... @@ -30,13 +28,13 @@
<body>
<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>
</header>
<!--<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>-->
... ... @@ -112,13 +110,15 @@
this.cid = localStorage.getItem('cid');
this.cityname = localStorage.getItem('cityName');
this.winTitle = localStorage.getItem('winTitle');
document.getElementsByTagName("title")[0].innerText = this.winTitle;
this.getCatInfo2();
},
methods: {
openDoc: function (id) {
api.openWin({
console.log(id)
openWin({
name: 'care_w',
url: './care_w.html',
url: 'care_f.html',
pageParam: {
id: id,
cid: this.cid,
... ...
... ... @@ -6,7 +6,7 @@
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">
<title></title>
<title>家庭医生</title>
<script src="../../assets/js/fontsize.js"></script>
<link rel="stylesheet" href="../../assets/css/api.css"/>
<link rel="stylesheet" href="../../assets/css/index.css">
... ... @@ -35,13 +35,13 @@
<body>
<div id="loadStart"></div>
<div id="app">
<header id="header">
<div class="index_header">
<span class="iconfont icon-fanhui" onclick="closeWindow()"></span>
<span>家庭医生</span>
<span class="iconfont icon-fenxiang-tianchong" ></span>
</div>
</header>
<!--<header id="header">-->
<!--<div class="index_header">-->
<!--<span class="iconfont icon-fanhui" onclick="closeWindow()"></span>-->
<!--<span></span>-->
<!--<span class="iconfont icon-fenxiang-tianchong" ></span>-->
<!--</div>-->
<!--</header>-->
<div class="warp">
<div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">
<!--<div class="nurse_text">{{name}}</div>-->
... ...
... ... @@ -145,67 +145,54 @@
pos: 'fixed'
},
created: function () {
apiready = function () {
app.id = api.pageParam.id;
app.cid = api.pageParam.cid;
app.applyInfo();
app.getUserIndexInfo();
api.addEventListener({
name: 'meal'
}, function (ret, err) {
app.meal = ret.value.meal + ',' + ret.value.num + app.unit;
app.total = parseFloat(ret.value.price) * (ret.value.num);
app.attribute_id = ret.value.attribute_id;
app.num = ret.value.num;
// alert(JSON.stringify(ret.value));
});
api.addEventListener({
name: 'room'
}, function (ret, err) {
app.room = ret.value.name_left + ',' + ret.value.name_right + ',' + ret.value.num + app.unit;
// alert(JSON.stringify(ret.value));
app.num = ret.value.num;
app.attribute_id = ret.value.attribute_id;
app.total = parseFloat(ret.value.price) * (ret.value.num)
});
var client_h = window.innerHeight;
window.addEventListener('resize', function () {
if (window.innerHeight < client_h) {
app.pos = 'relative'
} else {
app.pos = 'fixed'
}
}, false);
}
this.id = localStorage.getItem('id');
this.cid = localStorage.getItem('cid');
this.applyInfo();
this.getUserIndexInfo();
// api.addEventListener({
// name: 'meal'
// }, function (ret, err) {
// app.meal = ret.value.meal + ',' + ret.value.num + app.unit;
// app.total = parseFloat(ret.value.price) * (ret.value.num);
// app.attribute_id = ret.value.attribute_id;
// app.num = ret.value.num;
// // alert(JSON.stringify(ret.value));
// });
// api.addEventListener({
// name: 'room'
// }, function (ret, err) {
// app.room = ret.value.name_left + ',' + ret.value.name_right + ',' + ret.value.num + app.unit;
// // alert(JSON.stringify(ret.value));
// app.num = ret.value.num;
// app.attribute_id = ret.value.attribute_id;
// app.total = parseFloat(ret.value.price) * (ret.value.num)
// });
var client_h = window.innerHeight;
window.addEventListener('resize', function () {
if (window.innerHeight < client_h) {
app.pos = 'relative'
} else {
app.pos = 'fixed'
}
}, false);
},
methods: {
// 选择套餐
set_meal: function () {
api.openFrame({
bgColor: 'rgba(0,0,0,0.05)',
var app = this;
openWin({
name: 'choose_meal_f',
url: './choose_meal_f.html',
bounces: false,
animation: {
type: "push",
subType: "from_bottom",
duration: 300
},
rect: {
x: 0,
y: 0,
w: 'auto',
h: 'auto'
},
pageParam: {
id: app.id,
attribute: app.attribute,
unit: app.unit
}
});
})
},
// 选择入住等级
set_rank: function () {
var app = this;
if (app.date_info) {
api.confirm({
title: '选择套餐',
... ... @@ -246,6 +233,7 @@
},
// 选择日期
dateSelect: function () {
var app = this;
if (app.room) {
api.confirm({
title: '选择套餐',
... ... @@ -321,6 +309,7 @@
},
// 预约时间
openDate: function () {
var app = this;
if (app.date_info == '') {
toastMsg('入住时间')
} else if (app.name == '') {
... ... @@ -349,6 +338,7 @@
},
// 获取订单详情
applyInfo: function () {
var app = this;
var post = {
gid: app.id
};
... ... @@ -373,6 +363,7 @@
},
// 下单
openOrder: function () {
var app = this;
if (app.room == '' && app.meal == '') {
toastMsg('请选择套餐')
}
... ... @@ -407,6 +398,7 @@
},
// 客服
openSever: function () {
var app = this;
app.img_active = false;
app.getRongYunToken();
... ... @@ -455,6 +447,7 @@
},
// 获取客服token
getRongYunToken: function () {
var app = this;
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
... ... @@ -471,6 +464,7 @@
},
// 获取个人信息
getUserIndexInfo: function () {
var app = this;
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
... ... @@ -484,6 +478,7 @@
})
},
input_focus: function () {
var app = this;
setTimeout(function () {
document.body.scrollTop = document.body.scrollHeight;
}, 300);
... ...
... ... @@ -40,7 +40,9 @@
padding: 0.16rem 0;
color: #424242;
}
.warp{
overflow-y: scroll;
}
.examination_active {
color: #D8B25F;
border-bottom: 0.04rem solid #D8B25F;
... ... @@ -57,7 +59,9 @@
flex-flow: column;
-webkit-flex-flow: column;
-webkit-box-orient: vertical;
overflow-x: hidden;
-webkit-margin-start: auto;
width: 100%;
box-sizing: border-box;
}
.old_price {
... ... @@ -78,7 +82,12 @@
-webkit-flex-flow: column;
overflow-x: hidden;
}
.swiper-container{
height: 100%;
}
.swiper-wrapper{
height: 100%;
}
</style>
... ... @@ -87,32 +96,33 @@
<!-- 背景充满 -->
<div id="loadStart"></div>
<div id="app">
<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>
<!--<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="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">
<div class="nurse_text">{{name}}</div>
</div>
<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="warp">
<!-- {{JSON.stringify(banner)}} -->
<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 warp">
<div class="examination_content_swiper ">
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide" v-for="(item,index) in goods">
... ... @@ -181,8 +191,9 @@
},
created: function () {
var app = this;
this.cid = localStorage.getItem('cid')
this.winTitle = localStorage.getItem('winTitle')
this.cid = localStorage.getItem('cid');
this.winTitle = localStorage.getItem('winTitle');
document.getElementsByTagName("title")[0].innerText = this.winTitle;
this.getCatInfo3();
... ...
... ... @@ -1173,7 +1173,6 @@
this.applyInfo();
//获取当前地址
this.get_city();
this.getsdk();
//获取已经上传的图片
if ($api.getStorage('img1') || ($api.getStorage('img2')) || ($api.getStorage('img3')) || ($api.getStorage('img4'))) {
app.img1 = $api.getStorage('img1');
... ... @@ -1716,29 +1715,25 @@
},
//证明上传
addPic(event){
},
//诊断证明/医疗处置单
auth1: function (type) {
wx.chooseImage({
count: 1, // 默认9
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function (res) {
var localIds = res.localIds; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
wx.uploadImage({
localId: localIds, // 需要上传的图片的本地ID,由chooseImage接口获得
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function (res) {
var serverId = res.serverId; // 返回图片的服务器端ID
app.img1=serverId
}
});
var file = event.target.files[0];
console.log(file)
var formData = new FormData();
formData.append('file', file);
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
getRequest('post', 'portal/Goods/uploadProve', formData, header).then(function (res) {
alert(JSON.stringify(res))
if (res.data.code == 1) {
app.priceList = res.data.data;
} else {
toastMsg(res.msg)
}
});
},
//诊断证明/医疗处置单
// 药品处方
auth2: function (type) {
app.popupVisible1 = false;
... ...