作者 朱振飞

合并分支 'Branch_zhu' 到 'master'

Branch zhu



查看合并请求 !12
... ... @@ -241,3 +241,5 @@
.icon-Fill:before { content: "\e630"; }
... ...
... ... @@ -97,8 +97,11 @@ function toastMsg(msg) {
if (msg) {
weui.toast(msg, '')
} else {
weui.toast('')
// weui.toast('')
}
setTimeout(function(){
})
}
// 双击退出
... ...
... ... @@ -63,6 +63,7 @@
<script type="text/javascript" src="../../assets/js/swiper-3.4.2.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 src="http(s)://cdn.ronghub.com/RongIMLib-2.3.3.min.js"></script>
<!--<script type="text/javascript" src="http://at.alicdn.com/t/font_641470_jg64l6ijsg4lsor.js"></script>-->
<script>
var app = new Vue({
... ... @@ -114,6 +115,7 @@
})
},
openSever: function () {
var app = this;
app.img_active = false;
app.getRongYunToken();
function callBack(ret, err) {
... ... @@ -153,7 +155,6 @@
zhichi.startZhiChiSobot(param, callBack);
},
rongyunInit: function () {
var rong = api.require('rongCloud2');
rong.init(function (ret, err) {
if (ret.status == 'error') {
} else {
... ...
... ... @@ -172,7 +172,7 @@
post_title: '',
problems: '',
rongYunToken: '',
userId: '',
userId: ''
},
created: function () {
// alert('预约' + api.pageParam.id)
... ... @@ -186,7 +186,7 @@
methods: {
// 去预约
appointment: function () {
var app = this
var app = this;
if (app.cid == 5 || app.cid == 7 || app.cid == 8 || app.cid == 10) {
openView('doc_package_f', '../index/doc_package_f', app.care_name, 'doc_package_f', false, {
id: app.id,
... ...
... ... @@ -110,7 +110,7 @@
this.cid = localStorage.getItem('cid');
this.cityname = localStorage.getItem('cityName');
this.winTitle = localStorage.getItem('winTitle');
document.getElementsByTagName("title")[0].innerText = this.winTitle;
document.title = this.winTitle;
this.getCatInfo2();
},
methods: {
... ...
... ... @@ -9,6 +9,7 @@
<title>家庭医生</title>
<script src="../../assets/js/fontsize.js"></script>
<link rel="stylesheet" href="../../assets/css/api.css"/>
<link rel="stylesheet" href="../../assets/css/weui.min.css">
<link rel="stylesheet" href="../../assets/css/index.css">
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
<link rel="stylesheet" href="../../assets/css/doc.css">
... ...
... ... @@ -11,6 +11,7 @@
<link rel="stylesheet" href="../../assets/css/api.css"/>
<link rel="stylesheet" href="../../assets/css/index.css">
<link rel="stylesheet" href="../../assets/css/doc.css">
<link rel="stylesheet" href="../../assets/css/weui.min.css">
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
<style>
... ... @@ -350,6 +351,150 @@
font-size: 0;
margin: 0;
}
.weui-dialog__hd{
line-height: 1;
padding: 0 0.5em .3em;
}
/*住房选择*/
.meal {
display: flex;
flex-direction: column;
justify-content: flex-end;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.meal_title {
text-align: center;
color: #424242;
font-size: 15px;
font-weight: bold;
border-bottom: 1px solid #ccc;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.25rem;
}
.meal_item {
background-color: #fff;
}
.pay_box {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 10% 0.25rem 10%;
}
.pay_num {
font-size: 12px;
color: #424242;
}
.pay_btn_box {
display: flex;
align-items: center;
}
.pay_btn_box .iconfont {
font-size: 20px;
color: #ccc;
}
.pay_btn_box input {
width: 0.5rem;
text-align: center;
border: 0;
outline: none;
font-size: 15px;
}
.pay_num .limit {
padding: 0;
font-size: 12px;
color: #ccc;
}
.pay_btn {
font-size: 15px;
color: #fff;
background-color: #dbb25f;
text-align: center;
padding: 0.2rem 0;
}
.room_box, .price_box {
display: flex;
/*align-items: center;*/
justify-content: space-between;
padding: 0.2rem 0.4rem 0 0.4rem;
}
.room_left {
font-size: 15px;
color: #424242;
}
.youhui {
color: #d8b25f;
font-size: 12px;
margin-left: 0.1rem;
}
.room_right {
color: #dbb25f;
font-size: 15px;
}
.old_price {
text-decoration: line-through;
color: #ccc;
margin-left: 0.1rem;
}
.room_tips {
color: #ccc;
font-size: 12px;
padding: 0 0.4rem;
}
.price_left, .price_right {
display: flex;
/*align-items: center;*/
flex-wrap: wrap;
flex: 1;
}
.price_left span, .price_right span {
background-color: #f2f2f2;
color: #424242;
padding: 0 0.2rem;
font-size: 14px;
margin: 0 0.2rem 0.2rem 0;
border-radius: 0.05rem;
cursor: pointer;
min-width: 0.88rem;
text-align: center;
height: 0.48rem;
display: flex;
align-items: center;
justify-content: center;
}
.icon-cuohao {
font-size: 15px;
color: #424242;
}
.price_box .span_active {
background-color: #dbb25f;
color: #fff;
}
</style>
</head>
<body>
... ... @@ -377,7 +522,7 @@
<div class="doc_right">{{meal?meal:'选择套餐>'}}</div>
</div>
<div v-else>
<div class="doc_item" @click="dateSelect">
<div class="doc_item" @click="dateSelect" id="sever">
<div class="doc_room"><span class="iconfont icon-taocan"></span><span>预约参观</span></div>
<div class="doc_right" v-if="date_info">{{date_info}}</div>
<span v-else class="doc_right">请选择时间 <span class="iconfont icon-xiangyou"></span></span>
... ... @@ -414,7 +559,7 @@
</div>
</footer>
<!--预约-->
<div @click="close" class="meal" v-if="room">
<div @click="close" class="meal" v-if="c_room">
<div class="meal_item" @click.stop>
<div class="meal_title">
<span></span>
... ... @@ -488,6 +633,7 @@
<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 type="text/javascript" src="../../assets/js/datePicker.js"></script>
<script>
new FastClick(document.body);
</script>
... ... @@ -519,13 +665,16 @@
pos: 'fixed',
num: 1,
sever_list: [],
active_index: -1,
active_name: '',
priceList: [],
attribute: [],
id: '',
unit: '',
taocan: false
price_info: [],
active_index: -1,
active_index2: -1,
taocan: false,
c_room: false
},
created: function () {
this.id = localStorage.getItem('id');
... ... @@ -578,117 +727,164 @@
set_rank: function () {
var app = this;
if (app.date_info) {
api.confirm({
// api.confirm({
// title: '选择套餐',
// msg: '预约参观和选择入住只能选择其中一类',
// buttons: ['确定', '取消']
// }, function (ret, err) {
// var index = ret.buttonIndex;
// if (index == 2) {
//
// }
// });
weui.confirm('预约参观和选择入住只能选择其中一类', {
title: '选择套餐',
msg: '预约参观和选择入住只能选择其中一类',
buttons: ['确定', '取消']
}, function (ret, err) {
var index = ret.buttonIndex;
if (index == 2) {
buttons: [{
label: '取消',
type: 'default',
onClick: function(){ console.log('no') }
}, {
label: '确定',
type: 'primary',
onClick: function(){
app.date_info = '';
app.room = '';
app.total = app.goods.good_price
app.c_room = true
}
}]
});
} else {
api.openFrame({
bgColor: 'rgba(0,0,0,0.05)',
name: 'choose_room_f',
url: './choose_room_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
}
});
// api.openFrame({
// bgColor: 'rgba(0,0,0,0.05)',
// name: 'choose_room_f',
// url: './choose_room_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
// }
// });
app.c_room = true
}
},
// 选择日期
dateSelect: function () {
var app = this;
if (app.room) {
api.confirm({
weui.confirm('预约参观和选择入住只能选择其中一类', {
title: '选择套餐',
msg: '预约参观和选择入住只能选择其中一类',
buttons: ['取消', '确定']
}, function (ret, err) {
var index = ret.buttonIndex;
if (index == 1) {
app.date_info = '';
app.room = ''
}
buttons: [{
label: '取消',
type: 'default',
onClick: function(){ console.log('no') }
}, {
label: '确定',
type: 'primary',
onClick: function(){ console.log('yes') }
}]
});
// api.confirm({
// title: '选择套餐',
// msg: '',
// buttons: ['取消', '确定']
// }, function (ret, err) {
// var index = ret.buttonIndex;
// if (index == 1) {
// app.date_info = '';
// app.room = ''
// }
// });
} else {
// alert(getTimeDetil(72))
if (api.systemType == 'ios') {
api.openPicker({
type: 'date_time',
date: new Date(),
minDate: getTimeDetil(72),
title: '服务时间'
}, function (ret, err) {
if (ret) {
app.year = ret.year;
app.month = ret.month;
app.day = ret.day;
app.hour = ret.hour;
app.minute = ret.minute;
app.date_info = app.year + '-' + add0(app.month) + '-' + add0(app.day) + ' ' + add0(app.hour) + ':' + add0(app.minute);
if (checkDate(app.date_info, 3)) {
return app.date_info
var calendar = new datePicker();
calendar.init({
'trigger': '#sever', /*按钮选择器,用于触发弹出插件*/
'type': 'datetime', /*模式:date日期;datetime日期时间;time时间;ym年月;*/
// 'minDate':getTimeDetil(3), /*最小日期*/
'minDate': formatDate(new Date(getTimeDetil(72)), 1), /*最小日期*/
'maxDate': '', /*最大日期*/
'onSubmit': function () {/*确认时触发事件*/
console.log(calendar.value);
if (calendar.value) {
app.date_info = calendar.value;
calendar.onClose()
} else {
toastMsg('服务时间请选择在3天以后');
return app.date_info = app.default_date
}
} else {
console.log(err)
}
});
}
else {
api.openPicker({
type: 'date',
title: '服务日期',
}, function (ret, err) {
if (ret) {
app.year = ret.year;
app.month = ret.month;
app.day = ret.day;
api.openPicker({
type: 'time',
title: '服务时间'
}, function (rets, errs) {
if (rets) {
app.hour = rets.hour;
app.minute = rets.minute;
app.date_info = app.year + '-' + add0(app.month) + '-' + add0(app.day) + ' ' + add0(app.hour) + ':' + add0(app.minute);
if (checkDate(app.date_info, 1)) {
return app.date_info
} else {
toastMsg('选择生日不能小于当前时间');
return app.date_info = app.default_date
}
} else {
console.log(errs)
}
});
} else {
console.log(err)
},
'onClose': function () {/*取消时触发事件*/
// api.closeWin();
}
});
}
// // alert(getTimeDetil(72))
// api.openPicker({
// type: 'date_time',
// date: new Date(),
// minDate: getTimeDetil(72),
// title: '服务时间'
// }, function (ret, err) {
// if (ret) {
// app.year = ret.year;
// app.month = ret.month;
// app.day = ret.day;
// app.hour = ret.hour;
// app.minute = ret.minute;
// app.date_info = app.year + '-' + add0(app.month) + '-' + add0(app.day) + ' ' + add0(app.hour) + ':' + add0(app.minute);
// if (checkDate(app.date_info, 3)) {
// return app.date_info
// } else {
// toastMsg('服务时间请选择在3天以后');
// return app.date_info = app.default_date
// }
// } else {
// console.log(err)
// }
// });
// }
// else {
// api.openPicker({
// type: 'date',
// title: '服务日期',
// }, function (ret, err) {
// if (ret) {
// app.year = ret.year;
// app.month = ret.month;
// app.day = ret.day;
// api.openPicker({
// type: 'time',
// title: '服务时间'
// }, function (rets, errs) {
// if (rets) {
// app.hour = rets.hour;
// app.minute = rets.minute;
// app.date_info = app.year + '-' + add0(app.month) + '-' + add0(app.day) + ' ' + add0(app.hour) + ':' + add0(app.minute);
// if (checkDate(app.date_info, 1)) {
// return app.date_info
// } else {
// toastMsg('选择生日不能小于当前时间');
// return app.date_info = app.default_date
// }
// } else {
// console.log(errs)
// }
// });
// } else {
// console.log(err)
// }
// });
// }
}
},
// 预约时间
... ... @@ -737,6 +933,7 @@
app.real_price = res.data.data.real_price;
app.price = res.data.data.price;
app.goods = res.data.data.goods;
document.title = app.goods.post_title;
app.attribute_type = res.data.data.attribute_type;
app.unit = res.data.data.unit;
loadEnd();
... ... @@ -873,7 +1070,7 @@
// name: 'choose_meal_w'
// });
this.taocan = false
this.room = false
this.c_room = false
},
t_choose_sever: function (attr, index) {
var app = this;
... ... @@ -928,18 +1125,21 @@
},
choose_left: function (index) {
var app = this;
app.active_index = index;
app.active_left = app.attribute[0][index];
app.num = app.price_info.limit_num;
app.getPrice();
},
choose_right: function (index) {
var app = this;
app.active_index2 = index;
app.active_right = app.attribute[1][index];
app.getPrice();
app.num = app.price_info.limit_num;
},
reduce: function () {
var app = this;
if (app.price_info.limit_num) {
if (app.num > app.price_info.limit_num) {
app.num--
... ... @@ -949,14 +1149,18 @@
}else {
toastMsg('请选择入住类型')
}
app.total = parseFloat(app.price_info.price) * (app.num);
},
plus: function () {
var app = this;
if (app.num < app.price_info.limit_num) {
} else {
app.num++
}
app.total = parseFloat(app.price_info.price) * (app.num);
},
getPrice: function () {
var app = this;
if (app.active_left && app.active_right) {
var post = {
attribute: app.active_left + '_' + app.active_right,
... ... @@ -975,17 +1179,23 @@
},
pay_go: function () {
var app = this;
if (app.active_left && app.active_right) {
api.sendEvent({
name: 'room',
extra: {
name_left: app.active_left,
name_right: app.active_right,
num: app.num,
price: app.price_info.price,
attribute_id: app.attribute_id
}
});
// api.sendEvent({
// name: 'room',
// extra: {
// name_left: app.active_left,
// name_right: app.active_right,
// num: app.num,
// price: app.price_info.price,
// attribute_id: app.attribute_id
// }
// });
app.room = app.active_left + ',' + app.active_right + ',' + app.num + app.unit;
// // alert(JSON.stringify(ret.value));
// app.num = ret.value.num;
// app.attribute_id = ret.value.attribute_id;
app.total = parseFloat(app.price_info.price) * (app.num);
app.close()
}
else {
... ...
... ... @@ -451,13 +451,14 @@
if (res.data.code == 1) {
app.rongYunToken = res.data.data.token;
app.userId = res.data.data.userId;
// app.rongyunInit();
app.rongyunInit();
} else {}
})
},
// 轮播图跳转详情
care: function (id, care_name) {
window.location.href = 'care_f.html';
localStorage.removeItem('cid');
localStorage.setItem('id',id);
localStorage.setItem('care_name',care_name);
// api.openWin({
... ... @@ -571,9 +572,9 @@
// 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)
localStorage.setItem('cid', id);
localStorage.setItem('cityName', app.cityname);
localStorage.setItem('winTitle', name);
window.location.href = url + '.html'
},
// 获取第三栏列表
... ...
... ... @@ -1067,7 +1067,7 @@
<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/datePicker.js"></script>
<script type="text/javascript" src = 'https://webapi.amap.com/maps?v=1.4.4&test=true&key=ef53760bd959a4df08b7d4587280e642&&plugin=AMap.ToolBar,AMap.IndoorMap'></script>
<script type="text/javascript" src = 'https://webapi.amap.com/maps?v=1.4.4&key=ef53760bd959a4df08b7d4587280e642&&plugin=AMap.ToolBar,AMap.IndoorMap'></script>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>
<script>
var app = new Vue({
... ... @@ -1152,7 +1152,7 @@
sever_list: [],
priceList: [],
// 图片上传
photoUpload: true,
photoUpload: false,
img1: '',
img2: '',
img3: '',
... ... @@ -1295,8 +1295,10 @@
},
// 上传证明
openProve: function () {
openView('prove', '../index/prove', '上传就医证明','prove',false,false,false)
// openView('prove', '../index/prove', '上传就医证明','prove',false,false,false)
this.photoUpload = true
},
// 获取订单详情
applyInfo: function () {
var app = this;
... ... @@ -1318,6 +1320,7 @@
app.real_price = res.data.data.real_price;
app.price = res.data.data.price;
app.goods = res.data.data.goods;
document.title = app.goods.post_title
app.attribute_type = res.data.data.attribute_type;
loadEnd();
} else {
... ... @@ -1657,8 +1660,8 @@
// api.closeWin({
// name: 'choose_meal_w'
// });
this.taocan = false
this.room = false
this.taocan = false;
this.room = false;
},
t_choose_sever: function (attr, index) {
var app = this;
... ... @@ -1714,21 +1717,51 @@
//证明上传
addPic(event){
var file = event.target.files[0];
console.log(file)
console.log(file);
var formData = new FormData();
var data = {
type_id: 1,
file: file
};
formData.append('file', file);
formData.append('type_id', '1');
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
'XX-Token': getToken(),
'Content-Type': 'multipart/form-data'
};
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 {
api.ajax({
url: baseurl + 'portal/Goods/uploadProve',
method: 'post',
data: {
values: {
type_id: 1
},
files: {
file: ret.data
}
},
headers: {
"XX-Device-Type": api.deviceModel,
'XX-Token': getToken()
}
}, function (res, erro) {
// alert(JSON.stringify(res));
if (res.code == 1) {
toastMsg(res.msg)
app.img1 = res.data.url;
$api.setStorage('img1', res.data.url);
} else {
toastMsg(res.data.msg)
}
});
// getRequest('post', 'portal/Goods/uploadProve', data, header).then(function (res) {
// if (res.data.code == 1) {
// app.priceList = res.data.data;
// } else {
// toastMsg(res.msg)
// }
// });
},
//诊断证明/医疗处置单
... ...
... ... @@ -485,7 +485,7 @@
methods: {
appointment: function () {
var app = this;
openView('doc_package_f', 'index/doc_package_f', '旅游套餐', 'doc_package_f', false, {
openView('doc_package_f', '../index/doc_package_f', '旅游套餐', 'doc_package_f', false, {
cid: app.cid,
id: app.id
})
... ...
... ... @@ -346,7 +346,6 @@
},
created: function () {
this.crowd(); //第三栏
alert(1)
},
mounted: function() {
window.addEventListener('scroll', this.handleScroll)
... ... @@ -422,7 +421,7 @@
'XX-Token': getToken()
};
getRequest('post', 'portal/Goods/crowd', null, header).then(function(res) {
alert(JSON.stringify(res));
// alert(JSON.stringify(res));
if(res.data.code == 1) {
app.banner = res.data.data.banner;
app.state = res.data.data.state;
... ...