作者 朱振飞

合并分支 'Branch_zhu' 到 'master'

Branch zhu



查看合并请求 !13
... ... @@ -622,14 +622,14 @@ 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;*/
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 {
... ...
... ... @@ -51,13 +51,12 @@
agreement_data: ''
},
created: function () {
apiready = function () {
app.id = api.pageParam.id;
app.getAgreement();
}
this.id = localStorage.getItem('id');
this.getAgreement();
},
methods: {
getAgreement: function () {
var app = this;
var post = {
id: app.id
};
... ...
... ... @@ -151,7 +151,6 @@
<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',
... ... @@ -225,7 +224,12 @@
app.advantage = res.data.data.advantage;
app.service_step = res.data.data.service_step;
app.price = res.data.data.price ? res.data.data.price : 0;
loadEnd();
app.url = app.url = escape2Html(res.data.data.url);
if(app.url){
window.location.href = app.url;
}else{
loadEnd();
}
// app.banner = app.proCareInfoInfo_data.banner
}
})
... ... @@ -233,7 +237,7 @@
},
// 获取个人的基本信息
getUserIndexInfo: function () {
var app = this
var app = this;
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
... ... @@ -248,7 +252,7 @@
},
// 打开客服
openSever: function () {
var app = this
var app = this;
api.openWin({
name: 'cs_win',
url: '../common/cs_win.html'
... ...
... ... @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<title>选择城市</title>
<link rel="stylesheet" href="../../assets/css/reset.css">
<link rel="stylesheet" type="text/css" href="../../assets/css/city.css">
<style>
... ... @@ -39,13 +39,6 @@
</head>
<body>
<header>
<div class="index_header">
<div class="close_left" @click.stop="close"><span class="iconfont icon-fanhui"></span></div>
<div>选择城市</div>
<div></div>
</div>
</header>
<div class="city">
<div class="city-wrapper city-wrapper-hook">
<div class="scroller-hook">
... ... @@ -57,6 +50,7 @@
<script src="../../assets/js/bscroll.min.js"></script>
<script src="../../assets/js/city.js"></script>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script>
var cityWrapper = document.querySelector('.city-wrapper-hook');
var cityScroller = document.querySelector('.scroller-hook');
... ... @@ -77,7 +71,7 @@
lists += '<div class="title">'+name+'</div>';
lists += '<ul>';
group.cities.forEach(function(g) {
lists += '<li class="item" data-name="'+ g.name +'" data-id="'+ g.cityid +'"><span class="border-1px name">'+ g.name +'</span></li>';
lists += '<li class="item" data-name="'+ g.name +'" data-id="'+ g.cityid +'" onclick="getCityName(event)"><span class="border-1px name">'+ g.name +'</span></li>';
});
lists += '</ul>';
var name = group.name.substr(0, 1);
... ... @@ -94,7 +88,8 @@
shortcut.style.top = (cityWrapper.clientHeight - shortcut.clientHeight) / 2 + 'px';
scroll = new window.BScroll(cityWrapper, {
probeType: 3
probeType: 3,
click: true
});
// scroll.on('scroll', function (pos) {
... ... @@ -139,6 +134,11 @@
}
}
}
function getCityName(event){
var cityName = event.target.innerText;
localStorage.setItem('cityName',cityName)
window.history.back()
}
initCities();
bindEvent();
... ...
... ... @@ -214,18 +214,7 @@
<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",
data: {
... ... @@ -265,11 +254,35 @@
},
mounted: function () {
window.addEventListener('scroll', this.handleScroll)
// new Swiper('.swiper-container', {
// autoplay: true,
// observer: true,
// observeParents: true,
// slidesPerView: 1,
// autoplayDisableOnInteraction: false,
// loop: true,
// autoHeight: false,
// speed: 1500
// });
new Swiper('.swiper-container', {
initialSlide :0,
autoplay: 2000,
observer: true,
observeParents: true,
slidesPerView: 1,
autoplayDisableOnInteraction: false,
loop: true,
navigation: {
nextEl: '.change_slide',
},
autoHeight: false,
speed: 1500
});
},
methods: {
// 我的消息
my_news: function () {
openView('my_news', 'my/my_news', '消息通知', 'my_news', false, {
openView('my_news', '../my/my_news', '消息通知', 'my_news', false, {
new_type: 0
})
},
... ... @@ -339,9 +352,7 @@
// });
// });
}
function onError(erro) {
console.log(erro)
// 定位出错
toastMsg('请开启定位功能')
}
... ... @@ -456,10 +467,7 @@
},
// 轮播图跳转详情
care: function (id, care_name) {
window.location.href = 'care_f.html';
localStorage.removeItem('cid');
localStorage.setItem('id',id);
localStorage.setItem('care_name',care_name);
var app = this ;
// api.openWin({
// name: 'care_w',
// url: './care_w.html',
... ... @@ -468,6 +476,22 @@
// care_name: care_name
// }
// })
if(care_name.indexOf('旅游') == -1){
localStorage.removeItem('cid');
openWin({
name: 'care_w',
url: './care_f.html',
pageParam: {
id: id,
care_name: care_name
}
})
}else{
localStorage.setItem('cid',id);
localStorage.setItem('cityName',app.cityname);
window.location.href = 'tral_f.html';
}
},
getUserIndexInfo: function () {
var header = {
... ... @@ -494,59 +518,59 @@
openItem: function (id, name) {
switch (id) {
case 1:
url = 'nursing_f'
url = 'nursing_f';
// openView('nursing_f', 'index/nursing_f', name, 'nursing_f', false, {
// cid: id,
// cityname: app.cityname
// });
break;
case 2:
url = 'disease_f'
url = 'disease_f';
// openView('disease_f', 'index/disease_f', name, 'disease_f', false, {
// cid: id,
// cityname: app.cityname
// });
break;
case 3:
url = 'disease_f'
url = 'disease_f';
// openView('disease_f', 'index/disease_f', name, 'disease_f', false, {
// cid: id,
// cityname: app.cityname
// });
break;
case 4:
url = 'examination_f'
url = 'examination_f';
// openView('examination_f', 'index/examination_f', name, 'examination_f', false, {
// cid: id,
// cityname: app.cityname
// });
break;
case 5:
url = 'doc_home_f'
url = 'doc_home_f';
break;
case 6:
url = 'disease_f'
url = 'disease_f';
// openView('disease_f', 'index/disease_f', name, 'disease_f', false, {
// cid: id,
// cityname: app.cityname
// });
break;
case 7:
url = 'examination_f'
url = 'examination_f';
// openView('examination_f', 'index/examination_f', name, 'examination_f', false, {
// cid: id,
// cityname: app.cityname
// });
break;
case 8:
url = 'examination_f'
url = 'examination_f';
// openView('examination_f', 'index/examination_f', name, 'examination_f', false, {
// cid: id,
// cityname: app.cityname
// });
break;
case 9:
url = 'Insurance'
url = 'Insurance';
// api.openWin({
// name: 'Insurance_w',
// url: './Insurance_w.html',
... ... @@ -557,7 +581,7 @@
// });
break;
case 10:
url = 'tral_f'
url = 'tral_f';
// api.openWin({
// name: 'tral_w',
// url: './tral_w.html',
... ... @@ -587,18 +611,35 @@
},
// 获取严选推荐列表
show: function () {
var app = this;
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 {}
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
}
},
// 初始化轮播
initSwiper() {
new Swiper('.swiper-container', {
autoplay: true,
observer: true,
observeParents: true,
autoplayDisableOnInteraction: true,
loop: true,
nextButton: '.change_slide',
autoHeight: true,
speed: 1500,
lazyLoading: true
});
}
}
})
... ...
... ... @@ -90,7 +90,7 @@
.city_top {
position: fixed;
left: 0;
top: 0;
top: 0.68rem;
width: 100%;
display: flex;
align-items: center;
... ... @@ -739,10 +739,24 @@
margin: 0.21rem 0.24rem 0.8rem 0.24rem;
overflow: hidden;
}
.close_top{
display: flex;
height: 0.68rem;
align-items: center;
justify-content: flex-end;
padding: 0 15px;
}
#warp{
-webkit-overflow-scrolling:touch;
}
.over_hidden{
height: 100%;
overflow: hidden;
}
</style>
<body>
<div id="loadStart"></div>
<div id="app" v-cloak>
<div id="warp" :class="{over_hidden:city}" v-cloak>
<div class="swiper_item margin0">
<div class="swiper_item_img"><img :src="goods.icon" alt=""></div>
<div class="swiper_item_right">
... ... @@ -911,6 +925,11 @@
<div class="city_container" v-if="city">
<div v-cloak>
<div id="container"></div>
<div class="close_top">
<div class="meal_title">
<span class="iconfont icon-cuohao" @click="close"></span>
</div>
</div>
<div class="city_top">
<div class="city_name_box" @click="choose_city_fun">
<span class="iconfont icon-dizhi"></span>
... ... @@ -990,18 +1009,25 @@
</div>
<div @click="close" class="meal" v-if="taocan">
<div class="meal_item" @click.stop>
<div class="meal_title"><span></span><span>选择套餐</span><span class="iconfont icon-cuohao"
@click="close"></span></div>
<div class="meal_title">
<span></span>
<span>选择套餐</span>
<span class="iconfont icon-cuohao" @click="close"></span>
</div>
<div class="meal_price_box">
<div><span>服务价格</span><span class="meal_price">优惠价格¥{{Math.abs(priceList.count)?Math.abs(priceList.count):0}}</span>
<div>
<span>服务价格</span>
<span class="meal_price">优惠价格¥{{Math.abs(priceList.count)?Math.abs(priceList.count):0}}</span>
</div>
<div class="price">
<span class="meal_price">¥{{priceList.price?priceList.price:0}}</span>
<span class="old_price">原价¥{{priceList.o_price?priceList.o_price:0}}</span>
</div>
<div class="price"><span class="meal_price">¥{{priceList.price?priceList.price:0}}</span><span
class="old_price">原价¥{{priceList.o_price?priceList.o_price:0}}</span></div>
</div>
<div class="incer">此服务由慈界平台优质服务商提供</div>
<div class="sever_list"><span :class="{'span_active':index==active_index}"
v-for="(item,index) in attribute"
@click="t_choose_sever(item,index)">{{item}}</span></div>
<div class="sever_list">
<span :class="{'span_active':index==active_index}" v-for="(item,index) in attribute" @click="t_choose_sever(item,index)">{{item}}</span>
</div>
<div class="pay_box">
<span class="pay_num">购买数量 <span
class="limit">(限购<span>{{priceList.limit_num?priceList.limit_num:0}}</span>{{unit}})</span></span>
... ... @@ -1082,7 +1108,7 @@
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>
<script>
var app = new Vue({
el: '#app',
el: '#warp',
data: {
img_show: true,
imgshow: true,
... ... @@ -1269,10 +1295,9 @@
'trigger': '#sever', /*按钮选择器,用于触发弹出插件*/
'type': 'datetime', /*模式:date日期;datetime日期时间;time时间;ym年月;*/
// 'minDate':getTimeDetil(3), /*最小日期*/
'minDate': formatDate(new Date(getTimeDetil(3)), 1), /*最小日期*/
'maxDate': '', /*最大日期*/
'minDate': getTimeDetil(3), /*最小日期*/
'maxDate': formatDate(new Date(getTimeDetil(168))), /*最大日期*/
'onSubmit': function () {/*确认时触发事件*/
console.log(calendar.value);
if (checkDate(calendar.value, 1)) {
app.date_info = calendar.value;
calendar.onClose()
... ... @@ -1680,6 +1705,7 @@
this.taocan = false;
this.room = false;
this.tool = false;
this.city = false;
},
t_choose_sever: function (attr, index) {
var app = this;
... ...
... ... @@ -482,7 +482,7 @@
getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function(res) {
// alert(JSON.stringify(res));
if(res.data.code == 1) {
res.data.data.avatar = 'http://wx.cijievip.com'+res.data.data.avatar
res.data.data.avatar = res.data.data.avatar
app.user_type = res.data.data;
} else {}
loadEnd()
... ...
... ... @@ -100,8 +100,6 @@
// var app = this;
// app.rid = api.pageParam.rid;
this.rid = localStorage.getItem('rid');
// alert(app.rid);
this.healthData();
// api.addEventListener({
// name: 'sugar'
... ... @@ -148,15 +146,17 @@
'XX-Token': getToken()
};
getRequest('post', 'user/index/healthData', post, header).then(function (res) {
loadEnd();
console.log(res)
console.log(res);
if (res.data.code == 1) {
app.sugar_data = res.data.data.suger.data ? res.data.data.suger.data : 0;
app.puser_data = res.data.data.puser.data ? res.data.data.puser.data : 0/0;
var puser_data = res.data.data.puser.data;
var suger_data = res.data.data.suger.data;
app.sugar_data = !isNaN(suger_data) ? res.data.data.suger.data : 0;
app.puser_data = !isNaN(puser_data) ? res.data.data.puser.data : 0/0;
}
loadEnd();
})
}
}
})
</script>
... ...
... ... @@ -53,8 +53,6 @@
.date_box {
position:relative;
width:7.5rem;
display: flex;
align-items: center;
justify-content: space-between;
... ... @@ -75,7 +73,6 @@
position:absolute;
right:0.9rem;
top:0.4rem;
}
.save_btn {
... ... @@ -108,6 +105,10 @@
height:0.68rem;
border:none;
}
.jebody{
width: 100%;
overflow: hidden;
}
body .weui-toast{
min-height: 40px;
line-height: 40px;
... ... @@ -140,14 +141,11 @@
<!--<div class="date_item">请选择测量时间</div>-->
<!--<div class="iconfont icon-xiangyou"></div>-->
<!--</div>-->
<div class="jeitem">
<div class="date_box" id="choose_time">
<input type="text" id="chosetime" placeholder="请选择测量时间">
<div class="date_box" id="choose_times">
<input type="text" readonly id="chosetime" placeholder="请选择测量时间">
</div>
</div>
<div class="save_btn">保存</div>
</body>
</html>
... ... @@ -168,11 +166,10 @@
<script type="text/javascript" src="../../assets/js/jedate.js"></script>
<script type="text/javascript">
$(document).ready(function () {
var type=1
var type=1;
$(".knob").knob();
loadEnd();
var rid=localStorage.getItem("rid")
var rid=localStorage.getItem("rid");
function getSugar() {
var header = {
"XX-Device-Type": getDevice(),
... ... @@ -185,6 +182,7 @@
getRequest('post', 'user/index/getLastBoolData', post, header).then(function (res) {
if (res.data.code == 1) {
$('.knob').val(res.data.data.data);
$('#chosetime').val(res.data.data.time);
$('.date_item').text(res.data.data.time);
$('.sugar_type span').removeClass('spanactive').eq(res.data.data.time_type-1).addClass('spanactive');
} else {
... ... @@ -204,75 +202,32 @@
});
$('.date_box').click(function () {
// if (api.systemType == 'ios') {
// api.openPicker({
// type: 'date_time',
// date: new Date(),
// maxDate: getTimeDetil(0),
// title: '测量时间'
// }, function (ret, err) {
// console.log(ret)
// if (ret) {
// var year = ret.year;
// var month = ret.month;
// var day = ret.day;
// var hour = ret.hour;
// var minute = ret.minute;
// var date_info = year + '-' + add0(month) + '-' + add0(day) + ' ' + add0(hour) + ':' + add0(minute);
// if (checkDate(date_info, 2)) {
// $('.date_item').html(date_info)
// } else {
// toastMsg('选择日期不能大于当前时间');
// $('.date_item').html('请选择测量时间')
// }
// } else {
// console.log(err)
// }
// });
// }
// else {
// api.openPicker({
// type: 'date',
// title: '服务日期',
// }, function (ret, err) {
// if (ret) {
// var year = ret.year;
// var month = ret.month;
// var day = ret.day;
// api.openPicker({
// type: 'time',
// title: '服务时间'
// }, function (rets, errs) {
// if (rets) {
// var hour = rets.hour;
// var minute = rets.minute;
// var date_info = year + '-' + add0(month) + '-' + add0(day) + ' ' + add0(hour) + ':' + add0(minute);
// if (checkDate(date_info, 2)) {
// $('.date_item').html(date_info);
// } else {
// toastMsg('选择日期不能大于当前时间');
// $('.date_item').html('请选择测量时间')
// }
// } else {
// console.log(errs)
// }
// });
// } else {
// console.log(err)
// }
// });
// }
});
//时间选择
$('#choose_times').click(function(){
var calendar = new datePicker();
calendar.init({
'trigger': '#choose_times', /*按钮选择器,用于触发弹出插件*/
'type': 'datetime', /*模式:date日期;datetime日期时间;time时间;ym年月;*/
// 'minDate':getTimeDetil(3), /*最小日期*/
'minDate': '', /*最小日期*/
'maxDate': '', /*最大日期*/
'onSubmit': function () {/*确认时触发事件*/
if (calendar.value) {
$('#chosetime').val(calendar.value);
calendar.onClose()
}
},
'onClose': function () {/*取消时触发事件*/
// api.closeWin();
}
});
})
$('.save_btn').click(function () {
var rid=localStorage.getItem("rid");
var value = $('.knob').val();
var date = $('#chosetime').val();
date=date.split("T");
date=date[0]+" " +date[1];
type = $('.spanactive').attr('data-id')
// console.log(type)
var post = {
... ...
... ... @@ -162,9 +162,9 @@
position: fixed;
width: 100%;
left: 0;
bottom: 1.3rem;
bottom: 1.31rem;
z-index: 2;
/*border-top: 1px solid #fff;*/
border-bottom: 1px solid #f2f2f2;
}
.strict_btn_price {
... ... @@ -354,7 +354,7 @@
// 我的消息
// 去认购
go_pay: function() {
openView('strict_pay', 'strict/strict_pay', '认购')
openView('strict_pay', '../strict/strict_pay', '认购')
},
// 分享
share: function() {
... ...
... ... @@ -7,9 +7,10 @@
<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/api.css"/>
<link rel="stylesheet" href="../../assets/css/style.css">
<link rel="stylesheet" href="../../assets/css/index.css">
<link rel="stylesheet" href="../../assets/css/weui.min.css">
<link rel="stylesheet" href="../../assets/css/api.css"/>
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
<title></title>
<style>
... ... @@ -209,6 +210,7 @@
</body>
</html>
<script type="text/javascript" src="../../assets/js/api.js"></script>
<script type="text/javascript" src="../../assets/js/weui.min.js"></script>
<script type="text/javascript" src="../../assets/js/vue.min.js"></script>
<script type="text/javascript" src="../../assets/js/index.js"></script>
<script type="text/javascript" src="../../assets/js/public.js"></script>
... ... @@ -235,28 +237,28 @@
pos: 'fixed'
},
created: function () {
apiready = function () {
app.crowdPrice();
var client_h = window.innerHeight;
window.addEventListener('resize', function () {
if (window.innerHeight < client_h) {
app.pos = 'relative'
} else {
app.pos = 'fixed'
}
}, false);
}
this.crowdPrice();
var client_h = window.innerHeight;
window.addEventListener('resize', function () {
if (window.innerHeight < client_h) {
app.pos = 'relative'
} else {
app.pos = 'fixed'
}
}, false);
},
methods: {
// 认购协议
openAgree: function () {
openView('agree_content', 'common/agree_content', '认购协议', 'agree_content', false, {
openView('agree_content', '../common/agree_content', '认购协议', 'agree_content', false, {
title_name: '认购协议',
id: 4
}, false)
},
// 选择权益
power: function (index, type) {
var app = this;
app.type_vip = type;
app.popupVisible = false;
app.strict_num = app.price_data[index].mix_price;
... ... @@ -265,6 +267,7 @@
},
// 减少数量
reduce: function () {
var app = this;
if (app.strict_num > 1) {
app.strict_num--;
for (var i in app.price_data) {
... ... @@ -283,6 +286,7 @@
},
// 增加数量
plus: function () {
var app = this
app.strict_num++;
for (var i in app.price_data) {
if (app.strict_num > parseInt(app.price_data[app.price_data.length - 1].max_price)) {
... ... @@ -300,6 +304,7 @@
},
// 改变数量 输入框
change_value: function () {
var app = this
if (!/^[2-9]+\d*$/.test(app.strict_num)) {
toastMsg('请输入大于等于2的整数');
app.strict_num = 1;
... ... @@ -320,6 +325,7 @@
},
// 获取方案信息
crowdPrice: function () {
var app = this
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
... ... @@ -336,6 +342,7 @@
},
// 提交认购
pay_vip: function () {
var app = this
if (app.strict_num < 1 && app.plan_id == '') {
toastMsg('请选择权益方案')
} else if (app.name == '') {
... ... @@ -366,7 +373,7 @@
// alert(JSON.stringify(res));
if (res.data.code == 1) {
var order_id = res.data.data.oid;
openView('my_pay', 'my/my_pay', '支付', 'my_pay', false, {order_id: order_id});
openView('my_pay', '../my/my_pay', '支付', 'my_pay', false, {order_id: order_id});
} else {
toastMsg(res.data.msg)
}
... ...