作者 朱振飞

逻辑修改

... ... @@ -38,14 +38,14 @@
display: flex;
align-items: center;
justify-content: space-between;
background-color: #fff;
background-color: #FFF;
width: 100%;
position: fixed;
bottom: 0;
left: 0;
padding: 0 0 0 0.41rem;
font-size: 13px;
z-index: 0;
z-index: 2;
}
.doc_left {
... ...
... ... @@ -423,7 +423,6 @@ footer {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 0.15rem;
}
.nurse_text {
... ... @@ -623,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 {
... ...
... ... @@ -241,5 +241,6 @@
.icon-Fill:before { content: "\e630"; }
#app{
-webkit-overflow-scrolling:touch;
}
\ No newline at end of file
... ...
... ... @@ -246,10 +246,8 @@ $(function () {
// jQuery plugin
$.fn.knob = $.fn.dial = function (gopt) {
return this.each(
function () {
var $this = $(this), opt;
if ($this.data('dialed')) {
... ...
... ... @@ -377,7 +377,6 @@ function getRequest(type, url, params, header) {
loadEnd();
// resolve(res)
}).catch(function (err) {
console.log(121212)
toastMsg('网络错误');
// openView('wrong', 'common/wrong', '网络错误', 'wrong', false, false, false);
// alert(JSON.stringify(err))
... ... @@ -449,4 +448,3 @@ function escape2Html(str) {
return arrEntities[t];
});
}
... ...
... ... @@ -82,32 +82,41 @@
name: '',
goods: [],
related_service: [],
introduce: [],
introduce: []
},
created: function () {
apiready = function () {
app.cid = api.pageParam.cid;
app.getInsurance();
api.setFrameAttr({
name: 'Insurance',
bounces: true
});
}
this.cid = localStorage.getItem('cid');
this.getInsurance();
},
methods: {
openDoc: function (care_name, id, url) {
api.openWin({
var app = this;
if(url){
openWin({
name: 'care_w',
url: './insurance_detial.html',
pageParam: {
id: id,
cid: app.id,
url:escape2Html(url),
cid: app.cid,
url: escape2Html(url),
name: care_name
}
})
}else{
openWin({
name: 'care_w',
url: './care_f.html',
pageParam: {
id: id,
cid: app.cid
}
})
}
},
getInsurance: function () {
var app = this;
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
... ...
... ... @@ -203,8 +203,8 @@
},
// 去常见问题
question: function () {
var app = this
openView('my_que', 'my/my_que', '常见问题', 'my_que', false, {
var app = this;
openView('my_que', '../my/my_que', '常见问题', 'my_que', false, {
id: app.id
})
},
... ...
... ... @@ -109,7 +109,7 @@
},
methods: {
getDoctor: function () {
var that = this
var that = this;
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
... ... @@ -135,7 +135,7 @@
},
// 去预约
go_home: function () {
openView('doc_package_f', 'index/doc_package_f', app.post_title, 'doc_package_f', false, {
openView('doc_package_f', '../index/doc_package_f', app.post_title, 'doc_package_f', false, {
id: app.id,
cid: app.cid
})
... ... @@ -179,7 +179,7 @@
},
// 获取个人的基本信息
getUserIndexInfo: function () {
var app = this
var app = this ;
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
... ... @@ -194,7 +194,7 @@
},
// 获取客服token
getRongYunToken: function () {
var app = this
var app = this;
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
... ...
... ... @@ -961,7 +961,7 @@
tel: app.tel,
attribute_id: app.attribute_id,
num: app.num,
price: app.total,
price: app.total
};
var header = {
"XX-Device-Type": getDevice(),
... ... @@ -970,7 +970,7 @@
getRequest('post', 'portal/Goods/applyOrder', post, header).then(function (res) {
if (res.data.code == 1) {
app.order_id = res.data.data.oid;
openView('my_pay', 'my/my_pay', '支付', 'my_pay', false, {order_id: app.order_id});
openView('my_pay', '../my/my_pay', '支付', 'my_pay', false, {order_id: app.order_id});
} else {
toastMsg(res.data.msg)
}
... ... @@ -1076,7 +1076,6 @@
var app = this;
app.active_index = index;
app.active_name = app.attribute[index];
app.attribute_id = app.attribute[index].id;
var post = {
id: app.id,
attribute: attr
... ... @@ -1089,6 +1088,7 @@
// alert(JSON.stringify(res))
if (res.data.code == 1) {
app.priceList = res.data.data;
app.attribute_id = res.data.data.attribute_id
} else {
toastMsg(res.msg)
}
... ... @@ -1170,7 +1170,7 @@
if (res.data.code == 1) {
app.price_info = res.data.data;
app.num = app.price_info.limit_num;
app.attribute_id = app.price_info.attribute_id
app.attribute_id = res.data.data.attribute_id
}
})
} else {
... ... @@ -1181,16 +1181,6 @@
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
// }
// });
app.room = app.active_left + ',' + app.active_right + ',' + app.num + app.unit;
// // alert(JSON.stringify(ret.value));
// app.num = ret.value.num;
... ...
... ... @@ -50,9 +50,8 @@
.examination_box {
flex:1;
margin: 0.1rem 0;
/*margin: 0.1rem 0;*/
background-color: #fff;
box-shadow: 0.01rem 0.02rem 0.05rem #C8C6C6;
display: flex;
display: -webkit-flex;
display: -webkit-box;
... ... @@ -96,17 +95,8 @@
<!-- 背景充满 -->
<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>-->
<div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">
<div class="nurse_text">{{name}}</div>
<!--<div class="nurse_text">{{name}}</div>-->
</div>
<div class="examination_swiper">
<div class="swiper-container">
... ...
... ... @@ -127,7 +127,6 @@
</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>
... ... @@ -355,7 +354,7 @@
},
// 切换当前城市
goToCity: function () {
var app = this
var app = this;
if (app.cityname == '') {
toastMsg('定位中')
} else {
... ... @@ -547,7 +546,7 @@
// });
break;
case 9:
url = 'examination_f'
url = 'Insurance'
// api.openWin({
// name: 'Insurance_w',
// url: './Insurance_w.html',
... ...
... ... @@ -46,14 +46,9 @@
</style>
</head>
<body>
<div id="loadStart"></div>
<div id="app" v-cloak>
<header id="header">
<div class="index_header">
<div class="close_left" @click="closeWindow()"><span class="iconfont icon-fanhui"></span></div>
<div>{{name}}</div>
<div></div>
</div>
</header>
</div>
</body>
</html>
... ... @@ -72,24 +67,17 @@
data: {
headerH: '',
name: '',
url: '',
url: ''
},
created: function () {
apiready = function () {
app.name = api.pageParam.name;
app.url = api.pageParam.url;
// alert(app.url);
$api.fixStatusBar($api.dom('header'));
api.setStatusBarStyle({
style: 'dark'
});
app.headerH = $api.offset($api.dom('header')).h;
app.openInsurance()
}
this.name = localStorage.getItem('name');
this.url = localStorage.getItem('url');
this.openInsurance()
},
methods: {
openInsurance: function () {
var app = this;
if (app.url == '' || app.url == null || app.url == undefined) {
api.alert({
title: '暂无相关商品',
... ... @@ -101,17 +89,9 @@
});
}
else {
api.openFrame({
name: 'Insurance',
url: app.url,
rect: {
x: 0,
y: app.headerH,
w: api.frameWidth,
h: api.frameHeight - app.headerH
},
});
window.location.href = app.url
}
loadEnd();
}
}
})
... ...
... ... @@ -18,13 +18,13 @@
<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>-->
... ... @@ -89,6 +89,7 @@
this.cid = localStorage.getItem('cid');
this.cityname = localStorage.getItem('cityName');
this.winTitle = localStorage.getItem('winTitle')
document.title = localStorage.getItem('winTitle')
this.getCatInfo();
},
methods: {
... ...
... ... @@ -17,7 +17,7 @@
<style>
body {
background-color: #f2f2f2;
padding-bottom: 1.5rem;
padding-bottom: 1.12rem;
}
.imgList {
... ... @@ -734,6 +734,11 @@
border-radius: 0.1rem;
font-size: 15px;
}
/*套餐选择*/
.img_box {
margin: 0.21rem 0.24rem 0.8rem 0.24rem;
overflow: hidden;
}
</style>
<body>
<div id="loadStart"></div>
... ... @@ -1052,6 +1057,12 @@
<div class="save_btn" @click="auth_next">提交</div>
<div class="auth2_tips">为提高审核速度,请最少上传1张清晰的图片</div>
</div>
<!--上门类工具提示-->
<div @click="close" class="meal" v-if="tool">
<div class="img_box" @click.stop><img src="../../assets/image/price_img.png" alt="" width="100%"></div>
<!--<div v-html="tool_img"></div>-->
<div class="save_btn" @click="close">确定</div>
</div>
</div>
</body>
</html>
... ... @@ -1161,7 +1172,10 @@
popupVisible1: false,
popupVisible2: false,
popupVisible3: false,
configinfo: []
configinfo: [],
// 上门工具
tool: false ,
second: false
},
created: function () {
var app = this;
... ... @@ -1382,7 +1396,10 @@
openIsPro: function () {
var app = this;
app.isPro = !app.isPro;
window.location.href = '../common/tool_fm.html';
if(!app.second){
this.tool = true;
app.second = true
}
},
// 去协议
getAgreement: function (name, id) {
... ... @@ -1662,6 +1679,7 @@
// });
this.taocan = false;
this.room = false;
this.tool = false;
},
t_choose_sever: function (attr, index) {
var app = this;
... ... @@ -1800,6 +1818,8 @@
api.closeWin();
}
},
//工具否
// 去预约
appointment: function () {
... ...
... ... @@ -13,6 +13,7 @@
<link rel="stylesheet" href="../../assets/css/doc.css">
<link rel="stylesheet" href="../../assets/css/pay_form_f.css">
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
<title>健康旅游</title>
<style>
body {
background-color: #f5f5f5;
... ... @@ -307,22 +308,12 @@
.tral_fee_box{
background-color: #fff;
}
.swiper-container{
margin-top: 44px;
}
</style>
</head>
<body>
<div id="loadStart"></div>
<div id="app" v-cloak>
<div class="health_swiper">
<header id="header" class="border0 index_header">
<div :class="['index_header',color_change?'index_on':'','border0']">
<span class="iconfont icon-fanhui" onclick="closeWindow()"></span>
<span>健康旅游</span>
<span class="iconfont icon-fenxiang-tianchong" @click="share"></span>
</div>
</header>
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide" v-for="(item,index) in banner"
... ... @@ -415,10 +406,6 @@
<div class="health_tral border0" @click="body_show=!body_show">
<div class="health_tral_top"><span>费用不包含</span></div>
</div>
<!---->
<!--<ul class="tral_fee_item">-->
<!--<li></li>-->
<!--</ul>-->
<div v-html="noinclude">
</div>
... ... @@ -469,13 +456,13 @@
app.health_swiper = new Swiper('.swiper-container', {
effect: 'fade',
fade: {
crossFade: true,
crossFade: true
},
autoplay: 3000,
pagination: '.swiper-pagination',
paginationClickable: true,
observer: true,
observeParents: true,
observeParents: true
});
app.travel()
},
... ... @@ -491,13 +478,12 @@
})
},
travel: function () {
var app = this
var app = this;
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
getRequest('post', 'portal/Goods/travel', null, header).then(function (res) {
// alert(JSON.stringify(res));
if (res.data.code == 1) {
app.banner = res.data.data.banner;
app.day_num = res.data.data.day_num;
... ...
... ... @@ -86,7 +86,7 @@
};
var header = {
'XX-Device-Type': getDevice()
}
};
getRequest('POST', 'home/index/loginBySMS', post, header).then(function (res) {
console.log(res);
if(res.data.code ===1){
... ... @@ -136,7 +136,6 @@
'XX-Device-Type': getDevice()
};
getRequest('post', 'home/index/checkSMS', post, header).then(function (res) {
alert(JSON.stringify(res))
if (res.data.code == 1) {
localStorage.setItem('token', res.data.data.token);
window.location.href = '../index/index_f.html'
... ...
... ... @@ -128,7 +128,7 @@
// app.type_id = api.pageParam.id;
// app.rid = api.pageParam.rid;
this.type_id=localStorage.getItem("id");
this.rid=localStorage.getItem("rid")
this.rid=localStorage.getItem("rid");
this.typeInfo();
// }
},
... ... @@ -232,15 +232,7 @@
// 保存选择结果
save_info: function () {
var app=this;
toastMsg('正在保存')
// api.showProgress({
// title: '保存中',
// text: '正在保存……',
// modal: false
// });
// toastMsg('正在保存')
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
... ... @@ -267,14 +259,10 @@
getRequest('post', 'user/index/Answer', post, header).then(function (res) {
// alert(JSON.stringify(res));
if (res.data.code == 1) {
api.sendEvent({
name: 'history',
});
setTimeout(function() {
api.hideProgress();
toastMsg('保存成功');
api.closeWin();
}, 2000)
setTimeout(function(){
window.history.back()
},1500)
}
})
}
... ...
... ... @@ -290,30 +290,30 @@
created: function () {
var app = this;
for (var i = 0; i < 300; i++) {
app.weight_list.push({
this.weight_list.push({
"label": i + 'kg',
"value": i,
})
}
for (var j = 50; j < 300; j++) {
app.height_list.push(
this.height_list.push(
{
"label": j + 'cm',
"value": j,
}
)
}
app.user_type_name = localStorage.getItem('name');
app.rid = localStorage.getItem('rid');
this.user_type_name = localStorage.getItem('name');
this.rid = localStorage.getItem('rid');
// alert(app.rid)
app.type = localStorage.getItem('type');
if (app.type == 0) {
app.getUserinfo();
this.type = localStorage.getItem('type');
if (this.type == 0) {
this.getUserinfo();
}
app.getJob();
app.getCulture();
app.getMedical();
app.getRelationship();
this.getJob();
this.getCulture();
this.getMedical();
this.getRelationship();
},
methods: {
// 获取个人信息
... ... @@ -717,6 +717,7 @@
},
// 设置信息
setPersonal: function () {
var app = this;
var post = {
rid: app.rid,
avatar: app.head_img,
... ... @@ -765,9 +766,7 @@
// alert(JSON.stringify(res));
if (res.data.code == 1) {
app.user_info = res.data.data;
api.sendEvent({
name: 'changeInfo',
});
toastMsg(res.data.msg);
setTimeout(function () {
api.closeWin();
... ...
... ... @@ -337,7 +337,7 @@
if(app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_detail', 'my/my_detail', '个人资料', 'my_detail', false, {
openView('my_detail', '../my/my_detail', '个人资料', 'my_detail', false, {
rid: 0,
type: 0
})
... ... @@ -345,7 +345,7 @@
},
// 设置
set: function() {
window.location.href = 'my_set.html'
window.location.href = '../my/my_set.html'
// openView('my_set', 'my/my_set', '设置', 'my_set', false, false, false)
},
// 常见问题
... ... @@ -354,7 +354,7 @@
if(app.user_type == '') {
toastMsg('未登录')
} else {
window.location.href = 'my_que.html'
window.location.href = '../my/my_que.html'
// openView('my_que', 'my/my_que', '常见问题', 'my_que', false, false, false)
}
},
... ... @@ -377,7 +377,7 @@
if(app.user_type == '') {
toastMsg('未登录')
} else {
window.location.href = 'my_orderlist.html';
window.location.href = '../my/my_orderlist.html';
// openView('my_orderlist', 'my/my_orderlist', '我的订单', 'my_orderlist', false, false, false);
}
},
... ... @@ -387,7 +387,7 @@
if(app.user_type == '') {
toastMsg('未登录')
} else {
openView('my_news', 'my/my_news', '消息通知', 'my_news', false, {
openView('my_news', '../my/my_news', '消息通知', 'my_news', false, {
new_type: 0
})
}
... ... @@ -438,7 +438,7 @@
} else {
getRequest('post', 'user/index/myRights', null, header).then(function(res) {
if(res.data.code == 1) {
window.location.href = 'my_benefit.html'
window.location.href = '../my/my_benefit.html'
// openView('my_benefit', 'my/my_benefit', '我的权益', 'my_benefit', false, false, false)
} else {
toastMsg(res.data.msg);
... ... @@ -454,7 +454,7 @@
} else {
localStorage.setItem('rid','0');
localStorage.setItem('Htype','0');
window.location.href = 'my_health.html';
window.location.href = '../my/my_health.html';
// api.openFrame({
// name: 'my_health',
// url: './my_health.html',
... ... @@ -489,7 +489,7 @@
});
}, //底部菜单跳转
changeTab(index){
var url = index==0?'../index/index_f.html':index == 1?'../strict/strict_f.html':'my_f.html'
var url = index==0?'../index/index_f.html':index == 1?'../strict/strict_f.html':'../my/my_f.html'
window.location.href = url
}
... ...
... ... @@ -150,27 +150,8 @@
familyRecord_data: []
},
created: function () {
apiready = function () {
app.familyRecord();
var mySwiper = new Swiper('.swiper-container', {
speed: 1000,
observer: true,
observeParents: true,
effect: 'coverflow',
slidesPerView: 1,
coverflow: {
rotate: 0,
depth: 60,
modifier: 2,
stretch: 20,
slideShadows: false
},
pagination: {
el: '.swiper-pagination',
clickable: true
},
});
}
this.familyRecord();
},
methods: {
// 获取亲友信息档案
... ... @@ -191,22 +172,35 @@
},
// 跳转详情页面
openFri: function (rid) {
api.openFrame({
openWin({
name: 'my_health',
url: './my_health.html',
// bounces: true,
rect: {
x: 0,
y: 0,
w: 'auto',
h: 'auto',
},
pageParam: {
rid: rid,
type:0
}
});
}
},
mounted(){
var mySwiper = new Swiper('.swiper-container', {
speed: 1000,
observer: true,
observeParents: true,
effect: 'coverflow',
slidesPerView: 1,
coverflow: {
rotate: 0,
depth: 60,
modifier: 2,
stretch: 20,
slideShadows: false
},
pagination: {
el: '.swiper-pagination',
clickable: true
}
});
}
})
</script>
\ No newline at end of file
... ...
... ... @@ -323,6 +323,17 @@
<body>
<div id="loadStart"></div>
<div id="app">
<header id="header">
<div class="health_top">
<div @click="closeWindow()" class="close_left"><span class="iconfont icon-fanhui"></span></div>
<div class="health_mid" v-if="rid==0">健康档案</div>
<div class="health_mid" v-else>亲友档案</div>
<div class="index_right" @click="show_list" v-if="rid==0">
<img src="../../assets/image/plus.png" alt="" :class="{img_transform:img_active}">
</div>
<div class="index_right" v-else></div>
</div>
</header>
<div class="health_head">
<!--<div class="health_top" :style="{top: top}">-->
<!--<div @click="closeWindow()" class="close_left"><span class="iconfont icon-fanhui"></span></div>-->
... ... @@ -367,6 +378,7 @@
<div><span v-if="record_data.history==1">已完善</span><span v-else>未完善</span><span
class="iconfont icon-xiangyou"></span></div>
</div>
<div class="header_info_item" @click="openData">
<div class="header_info_img"><img src="../../assets/image/h3.png" alt=""><span>健康数据</span></div>
<div><span v-if="record_data.h_data==1">已完善</span><span v-else>未完善</span><span
... ... @@ -451,12 +463,10 @@
// });
},
methods: {
// close: function () {
// alert(1)
// api.closeWin({
// name: 'my_health'
// });
// },
show_list: function () {
var app = this;
app.img_active = !app.img_active;
},
// 个人资料
openPerson: function () {
var app = this;
... ... @@ -476,13 +486,7 @@
addPerson: function () {
var app = this;
app.img_active = false;
api.sendEvent({
name: 'hidelist',
extra: {
img_active:app.img_active
}
});
openView('my_detail', 'my/my_detail', '添加亲友档案', 'my_detail', false, {type: 1, rid: app.rid})
openView('my_detail', '../my/my_detail', '添加亲友档案', 'my_detail', false, {type: 1, rid: app.rid})
},
// 健康数据
openData: function () {
... ... @@ -506,7 +510,7 @@
openFriend: function () {
var app = this;
app.img_active = false;
openView('my_fri', 'my/my_fri', '亲友健康档案', 'my_fri', false, false, false);
openView('my_fri', '../my/my_fri', '亲友健康档案', 'my_fri', false, false, false);
},
// 获取个人档案完善情况
record: function () {
... ...
... ... @@ -8,10 +8,14 @@
<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/pay.css">
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
<link rel="stylesheet" href="../../assets/css/weui.min.css">
<title></title>
<style>
body, html {
... ... @@ -138,6 +142,11 @@
.price_fee {
color: #424242;
}
.weui-toast{
height: 36px;
min-height: 30px;
top: 50%;
}
</style>
</head>
<body>
... ... @@ -230,24 +239,10 @@
pay_price: 0,//最终支付价格
},
created: function () {
apiready = function () {
app.order_id = api.pageParam.order_id;
app.add();
app.getOrderPay();
app.getConsumeMoney();
api.addEventListener({
name: 'price_event'
}, function (ret, err) {
app.fee_price = parseFloat(ret.value.price);
app.discount_id = ret.value.id;
app.fee_pay = ret.value.fee_pay;
if (ret.value.fee_pay) {
app.getRealPay(1)
} else {
app.getRealPay(0)
}
});
}
this.order_id = localStorage.getItem('order_id');
this.add();
this.getOrderPay();
this.getConsumeMoney();
},
watch: {
second: {
... ... @@ -272,6 +267,7 @@
methods: {
// 获取订单详情
getOrderPay: function () {
var app = this;
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
... ... @@ -303,6 +299,7 @@
},
// 支付倒计时
add: function () {
var app = this;
var time = window.setInterval(function () {
if (app.seconds == 0 && app.minutes != 0) {
app.seconds = 59;
... ... @@ -320,6 +317,7 @@
},
// 获取消费金张数
getConsumeMoney: function () {
var app = this;
var post = {
order_id: app.order_id
};
... ... @@ -338,6 +336,7 @@
},
// 消费金支付
fee_choose: function () {
var app = this;
// toastMsg('暂无消费金')
if (app.balance_type == true) {
app.wx_type = false;
... ... @@ -351,6 +350,7 @@
},
// 微信支付
choose_wx: function () {
var app = this;
app.fee_pay = false;
app.zhifu_type = false;
if (app.wx_type == true) {
... ... @@ -361,6 +361,7 @@
},
// 支付宝支付
choose_zhi_fu: function () {
var app = this;
app.fee_pay = false;
app.wx_type = false;
// app.zhifu_type = true;
... ... @@ -373,6 +374,7 @@
},
// 余额支付
choose_yue: function () {
var app = this;
app.balance_type = !app.balance_type;
if (app.balance_type == true && app.fee_pay == true) {
app.wx_type = false;
... ... @@ -393,6 +395,7 @@
},
// 支付
pay_order: function () {
var app = this;
if (app.wx_type == false && app.balance_type == false && app.zhifu_type == false && app.fee_pay == false) {
toastMsg('请选择支付方式')
}
... ... @@ -449,6 +452,7 @@
// 获取价格
getRealPay: function (pay_type) {
var app = this;
var post = {
order_id: app.order_id,
pay_type: pay_type,
... ... @@ -468,6 +472,7 @@
},
// 取消支付
cancel_order: function () {
var app = this;
api.showProgress({
title: '取消订单',
text: '正在处理...',
... ... @@ -492,6 +497,7 @@
},
// 消费金单独支付
fee_pay_fun: function () {
var app = this;
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
... ... @@ -527,6 +533,7 @@
},
// 余额单独支付
packetPay: function (type) {
var app = this;
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
... ... @@ -550,6 +557,7 @@
},
// 微信支付
WeChatPay: function (type) {
var app = this;
var wx = api.require('wxPay');
var header = {
"XX-Device-Type": getDevice(),
... ... @@ -601,6 +609,7 @@
},
//支付宝支付
aliPay: function (type) {
var app = this;
var aliPay = api.require('aliPay');
var post = {
order_id: app.order_id,
... ...
... ... @@ -68,10 +68,10 @@
</head>
<body>
<div id="app">
<div :class="['que_body',ind==index?'':'que_show']" v-for="(item,index) in getQA_data">
<div :class="['que_body',item.ind==index?'':'que_show']" v-for="(item,index) in getQA_data">
<div class="que_box" @click="transform_fn(index)">
<div><span class="iconfont icon-wenhao1"></span><span>{{item.question}}</span></div>
<div :class="['iconfont','icon-xiangyou',ind==index?'tans':'tanss']"></div>
<div class="describle"><span class="iconfont icon-wenhao1"></span><span>{{item.question}}</span></div>
<div :class="['iconfont','icon-xiangyou',item.ind==index?'tans':'tanss']"></div>
</div>
<div class="que_content">
<span class="iconfont icon-xiaoxiwei"></span>
... ... @@ -98,32 +98,37 @@
ind: -1
},
created: function () {
apiready = function () {
app.getQA()
}
this.getQA()
},
methods: {
getQA: function () {
var app = this;
var post = {};
// var header = {
// 'XX-Device-Type': getDevice(),
// 'XX-Token': getToken()
// };
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
getRequest('post', 'user/index/getQA', post, header).then(function (res) {
if (res.data.code == 1) {
for(var i in res.data.data){
res.data.data[i].ind = i
}
app.getQA_data = res.data.data;
}
})
},
transform_fn: function (index) {
if (app.ind == index) {
app.ind = -1
var app = this;
// if (app.ind == index) {
// app.ind = -1
// } else {
// app.ind = index
// }
if (app.getQA_data[index].ind == index) {
app.getQA_data[index].ind = -1
} else {
app.ind = index
app.getQA_data[index].ind = index
}
}
}
... ...
... ... @@ -3,21 +3,21 @@
<head>
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!--<link rel="stylesheet" href="../../assets/css/jeDate-test.css">-->
<!--<link rel="stylesheet" href="../../assets/css/jedate.css">-->
<link rel="stylesheet" href="../../assets/css/weui.min.css">
<link rel="stylesheet" href="../../assets/css/jeDate-test.css">
<link rel="stylesheet" href="../../assets/css/jedate.css">
<link rel="stylesheet" href="../../assets/css/base.css">
<link rel="stylesheet" href="../../assets/css/style1.css">
<link rel="stylesheet" href="../../assets/css/common1.css">
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
<title></title>
<style type="text/css">
body {
background-color: #f5f5f5;
margin: 0;
}
.sugar_type {
display: flex;
align-items: center;
... ... @@ -108,6 +108,11 @@
height:0.68rem;
border:none;
}
body .weui-toast{
min-height: 40px;
line-height: 40px;
top: 50%;
}
</style>
</head>
... ... @@ -118,7 +123,7 @@
<div id="background">
<input type="number" step="0.1" name="test" class="knob" data-width="140" data-height='140' data-fgColor="#fff"
data-skin="tron"
data-thickness=".1" value="0" placeholder="">
data-thickness=".1" value="0.0" placeholder="" id="circle_value">
</div>
</div>
<div class="sugar_type" data-type="">
... ... @@ -136,12 +141,9 @@
<!--<div class="iconfont icon-xiangyou"></div>-->
<!--</div>-->
<div class="jeitem ">
<div class="jelabel ">请选择测量时间</div>
<div class="date_box">
<!--<div class="jeinpbox" style="width:95%"><input type="text" class="jeinput" id="test04" placeholder="请选择测量时间" style="width:96%" readonly></div>-->
<!--<div class="iconfont icon-xiangyou" ></div>-->
<input type="datetime-local" id="chosetime" placeholder="请选择测量时间">
<div class="jeitem">
<div class="date_box" id="choose_time">
<input type="text" id="chosetime" placeholder="请选择测量时间">
</div>
</div>
... ... @@ -152,6 +154,7 @@
<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/public.js"></script>
<script type="text/javascript" src="../../assets/js/fastclick.js"></script>
<script>
... ... @@ -161,14 +164,10 @@
<script src="../../assets/js/jquery.knob.js" type="text/javascript"></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/datePicker.js"></script>
<script type="text/javascript" src="../../assets/js/jedate.js"></script>
<!--<script type="text/javascript" src="../../assets/js/demo.js"></script>-->
<script type="text/javascript" src="../../assets/js/weui.min.js"></script>
<script type="text/javascript">
$(function () {
// apiready = function () {
$(document).ready(function () {
var type=1
$(".knob").knob();
loadEnd();
... ... @@ -184,7 +183,6 @@
type: 1
};
getRequest('post', 'user/index/getLastBoolData', post, header).then(function (res) {
// alert(JSON.stringify(res))
if (res.data.code == 1) {
$('.knob').val(res.data.data.data);
$('.date_item').text(res.data.data.time);
... ... @@ -270,17 +268,11 @@
});
$('.save_btn').click(function () {
var rid=localStorage.getItem("rid")
var rid=localStorage.getItem("rid");
var value = $('.knob').val();
var date = $('#chosetime').val();
date=date.split("T");
date=date[0]+" " +date[1];
// type = $('.sugar_type').attr('data-type');
type = $('.spanactive').attr('data-id')
// console.log(type)
var post = {
... ... @@ -295,32 +287,26 @@
'XX-Token': getToken()
};
if (value == '') {
toastMsg('请记录血糖值')
toastMsg('请记录血糖值');
return false
} else if (type == '') {
toastMsg('请选择具体测试时间')
toastMsg('请选择选择测量节点');
return false
}
else if (date == '') {
toastMsg('请选择测量时间')
toastMsg('请选择测量时间');
return false
} else {
getRequest('post', 'user/index/setBoolData', post, header).then(function (res) {
// alert(JSON.stringify(res))
if (res.data.code == 1) {
toastMsg('记录成功');
setTimeout(function () {
api.sendEvent({
name: 'sugar',
});
api.closeWin()
}, 1000)
} else {
toastMsg(res.data.msg)
}
console.log($('.weui-toast').html())
})
}
});
})
// }
});
</script>
... ...
... ... @@ -162,7 +162,7 @@
position: fixed;
width: 100%;
left: 0;
bottom: 0;
bottom: 1.3rem;
z-index: 2;
/*border-top: 1px solid #fff;*/
}
... ... @@ -439,8 +439,10 @@
})
},
// 切换底部导航
changeTab: function (res) {
changeTab: function (index) {
//跳转页面
var url = index == 0 ? '../index/index_f.html' : index == 1 ? '../strict/strict_f.html' : '../my/my_f.html';
window.location.href = url
}
}
})
... ...