作者 dl

时间模块 健康档案问题

... ... @@ -239,14 +239,18 @@ function formatTen(num) {
return num > 9 ? (num + "") : ("0" + num);
}
function formatDate(date) {
function formatDate(date, type) {
var year = date.getFullYear();
var month = date.getMonth() + 1;
var day = date.getDate();
var hour = date.getHours();
var minute = date.getMinutes();
var second = date.getSeconds();
return year + "-" + formatTen(month) + "-" + formatTen(day)
if (type == 1) {
return year + "-" + formatTen(month) + "-" + formatTen(day)
} else {
return year + "-" + formatTen(month) + "-" + formatTen(day) + ' ' + formatTen(hour) + ':' + formatTen(minute)
}
}
function timestampToTime(timestamp) {
... ... @@ -272,7 +276,7 @@ function checkDate(date, type) {
var dates = Math.floor(ms / 1000 / 60 / 60);
// alert(dates)
if (type == 1) {
if (dates < 3) {
if (dates < 3 || dates > 171) {
return false;
} else {
return true;
... ... @@ -299,12 +303,21 @@ function getTimeDetil(num) {
var date = new Date();
var Y, M, D, h, m, s;
Y = date.getFullYear() + '-';
M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
D = date.getDate() + ' ';
h = date.getHours() + num + ':';
M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1);
D = date.getDate();
h = date.getHours() + num;
m = date.getMinutes();
s = date.getSeconds();
return Y + M + D + h + m
if ((date.getHours() + num) > 24) {
h = h < 10 ? ('0' + (date.getHours() + num) % 24) : ((date.getHours() + num) % 24);
if (D < 30) {
D = parseInt(D) + Math.floor((date.getHours() + num) / 24)
} else {
D = '0' + 1;
M = M < 10 ? '0' + (parseInt(M) + 1) : parseInt(M) + 1;
}
}
return Y + M + '-' + D + ' ' + h + ':' + m
}
function toDecimal2(x) {
... ...
... ... @@ -6,6 +6,8 @@
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<title>CS</title>
<link rel="stylesheet" href="cs.min.css">
<link rel="stylesheet" href="../../css/weui.min.css">
<link rel="stylesheet" href="../../css/api.css">
<style>
.rongcloud-blueBg {
background: none;
... ... @@ -16,15 +18,30 @@
background: #dbb25f;
border-radius: 0.1rem;
}
.rongcloud-rong-send-btn {
background: #dbb25f !important;
}
.rongcloud-funcPanel .rongcloud-mode2 a {
color: #dbb25f
}
</style>
</head>
<body>
<div id="header" class="rongcloud-rong-header rongcloud-blueBg rongcloud-online">
<span class="rongcloud-phone-exit" onclick="closeWindow()"></span>
<div class="rongcloud-phone-infoBar">
<span class="rongcloud-phone-kefuName" style="font-size: 14px;">咨询客服</span>
</div>
</div>
<div id="rcs-app">
</div>
<script src="../../js/api.js"></script>
<script src="../../js/weui.min.js"></script>
<script src="../../js/axios.min.js"></script>
<script src="../../js/public.js"></script>
<!-- 可以将 SDK 下载到本地 配置 gruntfile 与 cs.js 合并压缩成一个 js 文件 -->
<script src="../RongIMLib-cs.min.js"></script>
<script src="//cdn.ronghub.com/RongIMVoice-2.2.4.min.js"></script>
... ... @@ -32,16 +49,20 @@
<script>
var rongYunToken = '';
var customerServiceId = '';
var user_type = [];
apiready = function () {
console.log(RCS)
rongYunToken = api.pageParam.rongYunToken;
customerServiceId = api.pageParam.userId;
user_type = api.pageParam.user_type;
RCS.init({
appKey: "c9kqb3rdkh4jj",
// token: "qjxXwJizd7Y62DTmUEluw5lzpNwuJBCkPrRErVG12EKi1UP6giNGqszv6IQX0IndGKwjoGwevVmUVSN0x458KOqK0LwxTuhy",
token:rongYunToken ,
appKey: "8w7jv4qb82s2y",
// token: "wG5sHjQtfgwuZ4F2Jl1f3DCABMOr8MwyoL1v7wbF6L6/yYC3MBnTnRoOlv2d4cOJoqNM2oO263uUt+JN9vbApg==",
token: rongYunToken,
target: document.getElementById('rcs-app'),
customerServiceId: "KEFU150535341165880", // 客服Id
customerServiceId: "KEFU153130751974494", // 客服Id
// customerServiceId: "KEFU150535341165880", // 客服Id
userIcon: 'http://7xo1cb.com1.z0.glb.clouddn.com/rongcloudkefu2.png',//用户默认头像,在用户没有头像的时候显示
csIcon: 'http://fsprodrcx.cn.ronghub.com/UQRxDVEHcD6_gHENUQRxDUs9XOZRBH25PGECfjBjFA/base64.png',//客服默认头像,在客服没有头像的时候显示,建议线上地址
showButton: false,
... ... @@ -51,9 +72,11 @@
},//连接中的执行的方法,例如显示加载页面,可不传
connectedCallback: function () {
},//连接成功之后的方法,例如关闭加载页面,可不传
disconnectedCallback: function () {
alert('连接断开');
closeWindow()
disconnectedCallback: function (e) {
toastMsg('连接断开');
setTimeout(function () {
closeWindow()
}, 1000)
},//断开连接之后的操作,可不传
templates: {
// button: ['<div class="rongcloud-consult">',
... ... @@ -73,8 +96,6 @@
// userInfo: 'templates/userInfo.html',
}
});
RCS.close();
}
</script>
... ...
... ... @@ -33,11 +33,13 @@
el: '#app',
data: {
rongYunToken: '',
userId: ''
userId: '',
user_type:[]
},
created: function () {
apiready = function () {
app.getRongYunToken();
app.getUserIndexInfo();
api.openFrame({
name: 'cs',
url: '../../assets/sobot/dist/cs.html',
... ... @@ -50,7 +52,8 @@
pageParam: {
rongYunToken: app.rongYunToken,
// rongYunToken: '122344545',
userId: app.userId
userId: app.userId,
user_type:app.user_type
}
});
... ... @@ -73,6 +76,20 @@
}
})
},
getUserIndexInfo: function () {
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function (res) {
// alert(JSON.stringify(res));
if (res.data.code == 1) {
app.user_type = res.data.data;
} else {
}
loadEnd()
});
}
}
})
</script>
\ No newline at end of file
... ...
... ... @@ -8,9 +8,8 @@
<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/style.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">
<style>
... ... @@ -36,10 +35,6 @@
height: 100%;
}
.v-modal {
background: none;
}
.meal {
display: flex;
flex-direction: column;
... ... @@ -53,36 +48,12 @@
background: none;
}
.mint-datetime-action {
color: #fff;
background-color: #dbb25f;
}
.mint-datetime-cancel {
background-color: #fff;
color: #424242;
}
.picker-slot {
font-size: 12px;
}
</style>
</head>
<body>
<div id="app" v-cloak>
<div @click="close" class="meal">
<mt-datetime-picker
ref="picker"
:endDate="endDate"
:startDate="startDate"
type="date"
v-model="pickerValue"
year-format="{value}年"
month-format="{value}月"
date-format="{value}日"
@confirm="choose_bro"
>
</mt-datetime-picker>
<div class="meal">
<input id="sever" autofocus placeholder="1" type="hidden">
</div>
</div>
</body>
... ... @@ -95,26 +66,39 @@
new FastClick(document.body);
</script>
<script type="text/javascript" src="../../assets/js/vue.min.js"></script>
<script type="text/javascript" src="../../assets/js/datePicker.js"></script>
<script>
var app = new Vue({
el: '#app',
data: {
pickerValue: '',
endDate: new Date(),
startDate: new Date()
},
data: {},
created: function () {
apiready = function () {
app.$refs.picker.open();
}
// apiready=function () {
var calendar = new datePicker();
calendar.init({
'trigger': '#sever', /*按钮选择器,用于触发弹出插件*/
'type': 'date', /*模式:date日期;datetime日期时间;time时间;ym年月;*/
// 'minDate':getTimeDetil(3), /*最小日期*/
'minDate': '', /*最小日期*/
'maxDate': formatDate(new Date(), 1), /*最大日期*/
'onSubmit': function () {/*确认时触发事件*/
api.sendEvent({
name: 'bro_time',
extra: {
broinfo: calendar.value
}
});
},
'onClose': function () {/*取消时触发事件*/
api.closeWin();
}
});
document.getElementById('sever').click()
},
methods: {
close: function () {
api.closeWin();
},
choose_bro: function () {
console.log(app.pickerValue)
},
// close: function () {
// api.closeWin();
// },
}
})
</script>
\ No newline at end of file
... ...
... ... @@ -82,9 +82,6 @@
w: 'auto',
h: 'auto'
},
pageParam: {
}
});
}
},
... ...
... ... @@ -8,7 +8,8 @@
<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/weui.min.css">
<link rel="stylesheet" href="../../assets/css/api.css">
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
<style>
... ... @@ -51,13 +52,14 @@
</head>
<body>
<div id="app" v-cloak>
<div class="meal" @click="close">
<div id="sever" >1</div>
<div class="meal">
<input id="sever" autofocus placeholder="1" type="hidden">
</div>
</div>
</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/public.js"></script>
<script type="text/javascript" src="../../assets/js/fastclick.js"></script>
<script>
... ... @@ -66,7 +68,7 @@
<script type="text/javascript" src="../../assets/js/vue.min.js"></script>
<script type="text/javascript" src="../../assets/js/datePicker.js"></script>
<script>
document.getElementById("sever").click();
var app = new Vue({
el: '#app',
data: {
... ... @@ -75,37 +77,37 @@
startDate_sev: new Date('2019-01-22')
},
created: function () {
apiready = function () {
api.addEventListener({
name: 'choose_sev'
}, function(ret, err) {
if(ret){
app.choose_sev()
}
});
}
// apiready=function () {
var calendar = new datePicker();
calendar.init({
'trigger': '#sever', /*按钮选择器,用于触发弹出插件*/
'type': 'datetime', /*模式:date日期;datetime日期时间;time时间;ym年月;*/
// 'minDate':getTimeDetil(3), /*最小日期*/
'minDate': formatDate(new Date(getTimeDetil(3)), 1), /*最小日期*/
'maxDate': '', /*最大日期*/
'onSubmit': function () {/*确认时触发事件*/
if (checkDate(calendar.value, 1)) {
api.sendEvent({
name: 'sev_time',
extra: {
dateinfo: calendar.value
}
});
} else {
alert('请选择3小时之后到7天之内的服务时间');
}
},
'onClose': function () {/*取消时触发事件*/
api.closeWin();
}
});
document.getElementById('sever').click()
},
methods: {
close: function () {
// api.closeWin({
// name: 'choose_meal_w'
// });
api.closeWin();
},
choose_sev: function () {
var calendar = new datePicker();
calendar.init({
'trigger': '#sever', /*按钮选择器,用于触发弹出插件*/
'type': 'datetime', /*模式:date日期;datetime日期时间;time时间;ym年月;*/
'minDate': '1900-1-1', /*最小日期*/
'maxDate': formatDate(new Date()), /*最大日期*/
'onSubmit': function () {/*确认时触发事件*/
console.log(calendar.value);
},
'onClose': function () {/*取消时触发事件*/
}
});
},
// close: function () {
// api.closeWin();
// },
}
})
</script>
\ No newline at end of file
... ...
... ... @@ -63,11 +63,8 @@
},
created: function () {
apiready = function () {
app.attribute = api.pageParam.attribute;
app.id = api.pageParam.id;
app.unit = api.pageParam.unit;
api.openFrame({
bgColor: 'rgba(0,0,0,0.02)',
bgColor: 'rgba(0,0,0,0)',
name: 'getSev_f',
url: './getSev_f.html',
bounces: false,
... ...
... ... @@ -164,7 +164,6 @@
},
created: function () {
apiready = function () {
app.getUserType();
api.addEventListener({
name: 'city'
}, function (ret, err) {
... ... @@ -329,33 +328,7 @@
}
});
},
// 判断登录用户
getUserType: function () {
if (getToken()) {
var header = {
'XX-Device-Type': getDevice(),
'XX-Token': getToken()
};
getRequest('post', 'home/index/getUserType', null, header).then(function (res) {
if (res.data.code == 1) {
if (res.data.data.user_type == 3) {
api.openWin({
name: 'doctor_win',
url: '../doctor/doctor_win.html',
});
api.sendEvent({
name: 'doctor_index0',
extra: {
index: 0
}
});
}
} else {
toastMsg(res.data.msg)
}
});
}
}
}
})
</script>
\ No newline at end of file
... ...
... ... @@ -225,17 +225,11 @@
// 打开健康档案
openHealth: function () {
app.img_active = false;
api.openFrame({
name: 'my_health',
url: '../my/my_health.html',
rect: {
x: 0,
y: 0,
w: 'auto',
h: 'auto'
},
api.openWin({
name: 'my_health_w',
url: '../my/my_health_w.html',
pageParam: {
rid: 1
rid: 0
}
});
api.sendEvent({
... ...
... ... @@ -135,7 +135,7 @@
}, 1000);
},
pay_money: function () {
openView('my_pay', 'my/my_pay', '订单支付')
openView('my_pay', 'my/my_pay', '订单支付','my_pay',false,false,false)
}
}
})
... ...
... ... @@ -115,7 +115,7 @@
<div class="service_icon"><span class="iconfont icon-yonghu"></span><span>服务对象</span></div>
<div class="service_input"><input type="text" placeholder="请输入姓名" v-model.trim="user_name"></div>
</div>
<div class="service_input_box" @click.stop="dateSelect">
<div class="service_input_box" @click.stop="dateSelect" id="sever">
<div class="service_icon"><span class="iconfont icon-shijian1"></span><span>服务时间</span></div>
<div class="service_input"><span v-if="date_info" class="date_info">{{date_info}}</span><span v-else>{{default_date}}</span>
</div>
... ... @@ -385,33 +385,47 @@
app.pos = 'fixed'
}
}, false);
api.addEventListener({
name: 'sev_time'
}, function (ret, err) {
if (ret) {
app.date_info = ret.value.dateinfo;
} else {
toastMsg('请重试')
}
});
api.addEventListener({
name: 'bro_time'
}, function (ret, err) {
if (ret) {
app.broth_info = ret.value.broinfo;
} else {
toastMsg('请重试')
}
});
// app.name=api.pageParam.name;
}
},
methods: {
// 选择服务日期
dateSelect: function () {
api.openWin({
name: 'getSev_w',
url: '../common/getSev_w.html'
});
api.sendEvent({
name: 'choose_sev'
});
},
// 选择生日
broSelect: function () {
api.openWin({
name: 'getBro_w',
url: '../common/getBro_w.html'
})
}
,
},
// 上传证明
openProve: function () {
openView('prove', 'index/prove', '上传就医证明')
openView('prove', 'index/prove', '上传就医证明','prove',false,false,false)
}
,
// 获取订单详情
... ...
... ... @@ -7,6 +7,7 @@
<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/weui.min.css">
<link rel="stylesheet" href="../../assets/css/api.css"/>
<link rel="stylesheet" href="../../assets/css/my_f.css"/>
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
... ... @@ -67,6 +68,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/public.js"></script>
<script type="text/javascript" src="../../assets/js/fastclick.js"></script>
<script>
... ... @@ -81,7 +83,7 @@
data: {
isLogin: true,
// user_info: [],
user_type: [],
user_type: [1],
avatar_default: '../../assets/image/mblogo_03.png',
default_name: '',
marginTop: '',
... ... @@ -91,7 +93,7 @@
created: function () {
apiready = function () {
app.type = api.pageParam.type ? api.pageParam.type : 0;
// app.getUserinfo();
app.getUserIndexInfo()
if (getToken()) {
app.getUserIndexInfo()
app.getNews();
... ... @@ -244,9 +246,9 @@
// alert(JSON.stringify(res));
if (res.data.code == 1) {
app.user_type = res.data.data;
loadEnd();
} else {
}
loadEnd()
});
}
}
... ...
... ... @@ -240,7 +240,7 @@
.health_menu {
position: absolute;
right: 0.42rem;
top: 0.8rem;
top: 1rem;
background-color: #fff;
padding: 0.06rem 0;
border-radius: 0.05rem;
... ... @@ -323,19 +323,19 @@
<div id="loadStart"></div>
<div id="app">
<div class="health_head">
<div class="health_top" :style="{top: 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="img_active=!img_active" 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 class="health_menu" v-show="img_active">
<div class="health_item" @click="addPerson">添加亲友档案</div>
<div class="health_item" @click="openFriend">查看亲友档案</div>
</div>`
<!--<div class="health_top" :style="{top: 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="img_active=!img_active" 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 class="health_menu" v-show="img_active">
<div class="health_item" @click="addPerson">添加亲友档案</div>
<div class="health_item" @click="openFriend">查看亲友档案</div>
</div>
<!--</div>-->
<div class="head_bgc">
<div class="circle">
<div class="track"></div>
... ... @@ -346,10 +346,10 @@
<div class="mask" :style="{opacity:mask_opacity}"></div>
</div>
<div class="head_info">
<span class="info_name clamp1">{{record_data.info.name?record_data.info.name:''}}</span>
<span class="info_name clamp1">{{info.name?info.name:''}}</span>
<span class="info_sex">
{{record_data.info.sex}},{{record_data.info.birthday?record_data.info.birthday:0}}岁</span>
<span class="info_pre">资料完整度{{record_data.complete}}%</span>
{{info.sex}},{{info.birthday?info.birthday:0}}岁</span>
<span class="info_pre">资料完整度{{record_data.complete?record_data.complete:0}}%</span>
</div>
</div>
</div>
... ... @@ -426,9 +426,6 @@
},
created: function () {
apiready = function () {
if (getDevice() == 'iPhone10,3') {
app.top = 35 + 'px'
}
app.rid = api.pageParam.rid;
app.type = api.pageParam.type ? api.pageParam.type : 0;
app.record();
... ... @@ -445,6 +442,11 @@
app.record();
app.getHeathlyRecord();
});
api.addEventListener({
name: 'showlist'
}, function (ret, err) {
app.img_active = ret.value.img_active;
});
}
},
methods: {
... ... @@ -471,11 +473,23 @@
// 添加亲友
addPerson: function () {
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})
},
// 健康数据
openData: function () {
app.img_active = false;
api.sendEvent({
name: 'hidelist',
extra: {
img_active:app.img_active
}
});
openView('my_healthData', 'my/my_healthData', '健康数据', 'my_healthData', false, {rid: app.rid})
},
// 健康史
... ... @@ -486,7 +500,7 @@
// 亲友档案
openFriend: function () {
app.img_active = false;
openView('my_fri', 'my/my_fri', '亲友健康档案');
openView('my_fri', 'my/my_fri', '亲友健康档案', 'my_fri', false, false, false);
},
// 获取个人档案完善情况
record: function () {
... ... @@ -501,6 +515,7 @@
// alert(JSON.stringify(res))
if (res.data.code == 1) {
app.record_data = res.data.data;
app.info = res.data.data.info;
app.percent = parseInt(app.record_data.complete);
if (app.percent < 50) {
app.left = 3.6 * app.percent;
... ...
<!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 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/index.css">
<link rel="stylesheet" href="../../assets/css/doc.css">
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
<style>
.health_head {
background-color: #dbb25f;
display: flex;
align-items: center;
justify-content: center;
padding-top: 20px;
position: relative;
/*overflow: hidden;*/
}
.health_top {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.29rem 0.42rem;
font-size: 15px;
color: #fff;
position: absolute;
left: 0;
top: 0;
/*top: 20px;*/
width: 100%;
z-index: 9999;
background-color: #dbb25f;
/*overflow: hidden;*/
}
.health_top div {
flex: 1;
}
.head_bgc {
width: 145px;
height: 145px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.head_info {
background-image: url("../../assets/image/head_bgc.png");
background-size: cover;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 10;
}
.info_name {
font-size: 18px;
color: #A6894B;
width: 1.2rem;
}
.info_sex {
font-size: 12px;
color: #A58541;
}
.info_pre {
font-size: 10px;
color: #C2A25E;
}
.icon-yiliao {
font-size: 18px;
}
.header_info_item {
font-size: 14px;
color: #525254;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.15rem 0.5rem;
border-bottom: 0.01rem solid #efefef;
}
.header_info_item:active {
background-color: rgba(0, 0, 0, 0.1);
}
.header_info_item img {
width: 0.35rem;
margin-right: 0.16rem;
}
.header_info_img {
display: flex;
align-items: center;
}
.icon-xiangyou {
margin-left: 0.14rem;
}
.life {
background-color: #f1f1f1;
}
.life_list {
padding: 0.46rem;
}
.life_item {
display: flex;
font-size: 11px;
}
.life_left {
width: 2rem;
}
.life_right {
padding: 0 0.28rem;
border-left: 2px solid #dbb25f;
padding-bottom: 0.5rem;
position: relative;
flex: 1;
}
.life_right_item {
padding: 0.1rem 0 0.1rem 0.44rem;
background-color: #dbb25f;
color: #fff;
border: 1px solid #dbb25f;
margin: 0 0 0 0.5rem;
}
.life_right_bottom {
border: 1px solid #dbb25f;
padding: 0.17rem 0.3rem;
margin: 0 0 0 0.5rem;
}
.life_circle {
width: 0.4rem;
height: 0.4rem;
border-radius: 50%;
background-color: #e5cb94;
position: absolute;
left: -0.2rem;
z-index: 2;
top: 0.1rem;
display: flex;
align-items: center;
justify-content: center;
}
.life_circle_item {
width: 0.25rem;
height: 0.25rem;
border-radius: 50%;
background-color: #ddbb37;
}
.life_tri {
width: 0;
height: 0;
border-top: 0.15rem solid transparent;
border-right: 0.3rem solid #ddbb73;
border-bottom: 0.15rem solid transparent;
position: relative;
left: -0.75rem;
}
.tans {
transform: rotate(0deg);
transition: 0.2s;
}
.tanss {
transition: 0.2s;
transform: rotate(90deg);
}
.icon-xiangyou {
color: #7E725D;
margin-left: 0.14rem;
}
.index_right {
display: flex;
align-items: center;
justify-content: flex-end;
/*text-align: center;*/
position: relative;
text-align: right;
}
.index_right:before {
position: absolute;
left: -0.1rem;
right: -0.1rem;
top: -0.1rem;
bottom: -0.1rem;
content: '';
}
.img_transform {
transform: rotate(45deg);
}
.index_right .icon-yiliao {
/*font-size: 25px;*/
}
.health_mid {
/*padding-left: 0.5rem;*/
text-align: center;
}
.index_right img {
height: 0.44rem;
}
.health_menu {
position: absolute;
right: 0.42rem;
top: 0.8rem;
background-color: #fff;
padding: 0.06rem 0;
border-radius: 0.05rem;
z-index: 30;
}
.health_item {
border-bottom: 1px solid #eeeeee;
padding: 0.06rem 0.12rem;
font-size: 13px;
color: #434A54;
}
.circle {
position: relative;
width: 130px;
height: 130px;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
}
.circle .track, .circle .left, .circle .right, .circle .mask {
width: 108px;
height: 108px;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
margin: auto;
border-radius: 50%;
border: 0.15rem #dbb25f solid;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
z-index: 20;
}
.circle .mask, .circle .left, .circle .right {
clip: rect(0 54px 108px 0);
}
.circle .left, .circle .right {
border-color: #C2A25E;
}
/*.circle .left {*/
/*border-color: #0bb20c;*/
/*background-color: #222222;*/
/*}*/
/*.circle .right {*/
/*border-color: #ce3c39;*/
/*background-color: #f2f2f2;*/
/*}*/
.circle .right {
opacity: 0;
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
-ms-transform: rotate(180deg);
-o-transform: rotate(180deg);
transform: rotate(180deg);
}
/* 进度显示文字样式 */
.transition-rotate {
-webkit-transition: transform 3s ease-in-out;
-moz-transition: transform 3s ease-in-out;
-ms-transition: transform 3s ease-in-out;
-o-transition: transform 3s ease-in-out;
transition: transform 3s ease-in-out;
}
</style>
</head>
<body>
<div id="app" v-cloak>
<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>
</body>
</html>
<script type="text/javascript" src="../../assets/js/api.js"></script>
<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);
</script>
<script type="text/javascript" src="../../assets/js/vue.min.js"></script>
<script type="text/javascript" src="../../assets/js/axios.min.js"></script>
<script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
<script>
var app = new Vue({
el: '#app',
data: {
img_active: false,
headerH: '',
rid: '',
type: ''
},
created: function () {
apiready = function () {
app.rid = api.pageParam.rid;
app.type = api.pageParam.type ? api.pageParam.type : 0;
app.headerH = $api.offset($api.dom('header')).h;
api.openFrame({
name: 'my_health',
url: './my_health.html',
// bounces: true,
rect: {
x: 0,
y: app.headerH,
w: api.frameWidth,
h: api.winHeight - app.headerH
},
pageParam: {
rid: app.rid,
type: app.type
}
});
api.addEventListener({
name: 'hidelist'
}, function (ret, err) {
app.img_active = ret.value.img_active
});
}
},
methods: {
show_list: function () {
app.img_active = !app.img_active;
api.sendEvent({
name: 'showlist',
extra: {
img_active: app.img_active
}
});
}
}
})
</script>
\ No newline at end of file
... ...
... ... @@ -224,7 +224,7 @@
name: 'cancel_order',
});
setTimeout(res => {
openView('my_orderlist', 'my/my_orderlist', '我的订单')
openView('my_orderlist', 'my/my_orderlist', '我的订单','',false,false,false)
}, 2000);
} else {
toastMsg(res.data.msg)
... ...
... ... @@ -184,7 +184,7 @@
if (res.data.code == 1) {
toastMsg(res.data.msg);
setTimeout(res => {
openView('my_orderlist', 'my/my_orderlist', '我的订单')
openView('my_orderlist', 'my/my_orderlist', '我的订单','my_orderlist',false,false,false)
}, 2000);
api.sendEvent({
name: 'cancel_order',
... ...
... ... @@ -323,7 +323,7 @@
if (res.data.code == 1) {
toastMsg(res.data.msg);
setTimeout(res => {
openView('my_orderlist', 'my/my_orderlist', '我的订单')
openView('my_orderlist', 'my/my_orderlist', '我的订单','my_orderlist',false,false,false)
}, 2000);
api.sendEvent({
name: 'cancel_order',
... ... @@ -417,7 +417,7 @@
if (res.data.code == 1) {
toastMsg('退款成功');
setTimeout(function () {
openView('my_orderlist', 'my/my_orderlist', '我的订单')
openView('my_orderlist', 'my/my_orderlist', '我的订单','my_orderlist',false,false,false)
}, 2000);
api.sendEvent({
name:'re_money'
... ...
... ... @@ -70,7 +70,7 @@
<span>{{order_info.order_type}}</span>
</div>
<div class="pay_detail">
<div class="pay_detail_item">
<div class="pay_detail_item">
<span class="iconfont icon-xingbie"></span>
<span class="pay_detail_label">投保金额</span>
<span>¥8868</span>
... ... @@ -233,25 +233,14 @@
// toastMsg(res.data.msg);
api.hideProgress();
toastMsg(res.data.msg);
setTimeout(res => {
openView('my_orderlist', 'my/my_orderlist', '我的订单')
setTimeout(function () {
openView('my_orderlist', 'my/my_orderlist', '我的订单','my_orderlist',false,false,false)
}, 2000)
} else {
toastMsg(res.data.msg)
}
});
},
// 去详情页
// go_detail:function (id) {
// api.openWin({
// name: 'care_w',
// url: '../index/care_w.html',
// pageParam: {
// id: id,
// cid: app.cid,
// }
// })
// }
}
})
</script>
\ No newline at end of file
... ...
... ... @@ -129,7 +129,7 @@
<span class="order_label">{{item.name}}</span>
<div class="order_content clamp1">【{{item.post_title}}】{{item.other_title}}</div>
<div class="order_time">
<div v-if="item.goods_type==2||item.goods_type==4">下单时间:{{item.addtime}}</div>
<div v-if="item.goods_type==2||item.goods_type==4">下单时间:{{item.addtime}}</div>
<div v-else>预约服务时间:{{item.service_time}}</div>
</div>
<div class="order_total"><span>合计:</span><span class="total_num">¥{{item.price}}</span></div>
... ... @@ -146,7 +146,7 @@
<span class="order_label">{{item.name}}</span>
<div class="order_content clamp1">【{{item.post_title}}】{{item.other_title}}</div>
<div class="order_time">
<div v-if="item.goods_type==2||item.goods_type==4">下单时间:{{item.addtime}}</div>
<div v-if="item.goods_type==2||item.goods_type==4">下单时间:{{item.addtime}}</div>
<div v-else>预约服务时间:{{item.service_time}}</div>
</div>
<div class="order_total"><span>合计:</span><span class="total_num">¥{{item.price}}</span></div>
... ... @@ -163,7 +163,7 @@
<span class="order_label">{{item.name}}</span>
<div class="order_content clamp1">【{{item.post_title}}】{{item.other_title}}</div>
<div class="order_time">
<div v-if="item.goods_type==2||item.goods_type==4">下单时间:{{item.addtime}}</div>
<div v-if="item.goods_type==2||item.goods_type==4">下单时间:{{item.addtime}}</div>
<div v-else>预约服务时间:{{item.service_time}}</div>
</div>
<div class="order_total"><span>合计:</span><span class="total_num">¥{{item.price}}</span></div>
... ... @@ -181,7 +181,7 @@
<span class="order_label">{{item.name}}</span>
<div class="order_content clamp1">【{{item.post_title}}】{{item.other_title}}</div>
<div class="order_time">
<div v-if="item.goods_type==2||item.goods_type==4">下单时间:{{item.addtime}}</div>
<div v-if="item.goods_type==2||item.goods_type==4">下单时间:{{item.addtime}}</div>
<div v-else>预约服务时间:{{item.service_time}}</div>
</div>
<div class="order_total"><span>合计:</span><span class="total_num">¥{{item.price}}</span></div>
... ... @@ -208,7 +208,12 @@
paying: false,
pay: false,
paied: false,
myOrder_data: {}
myOrder_data: {
all: [],
complete: [],
unpay: [],
doing: []
}
},
created: function () {
apiready = function () {
... ... @@ -227,25 +232,13 @@
app.myOrder();
}
});
api.setRefreshHeaderInfo({
// loadingImg: 'widget://assets/image/head.png',
loadingImg: 'widget://assets/image/loading.gif',
bgColor: '#fff',
textColor: '#d8b25f',
textDown: '下拉刷新...',
textUp: '松开刷新...'
}, function (ret, err) {
app.myOrder_data.all = [];
app.myOrder();
api.refreshHeaderLoadDone()
});
}
},
methods: {
// 去详情页
go_detail: function (order_id, order_type, goods_type) {
// alert(goods_type);
if (goods_type == 2 ) {
if (goods_type == 2) {
openView('my_order', 'my/my_order', '订单详情', 'my_order', false, {
order_id: order_id,
order_type: order_type
... ... @@ -257,7 +250,7 @@
order_type: order_type
})
}
else if(goods_type==4){
else if (goods_type == 4) {
openView('my_order_ben', 'my/my_order_ben', '订单详情', 'my_order_ben', false, {
order_id: order_id,
order_type: order_type
... ... @@ -303,7 +296,10 @@
getRequest('post', 'user/Order/myOrder', null, header).then(function (res) {
// alert(JSON.stringify(res));
if (res.data.code == 1) {
app.myOrder_data = res.data.data;
app.myOrder_data.all = res.data.data.all;
app.myOrder_data.unpay = res.data.data.unpay;
app.myOrder_data.doing = res.data.data.doing;
app.myOrder_data.complete = res.data.data.complete;
loadEnd()
} else {
toastMsg(res.data.msg)
... ...
... ... @@ -238,7 +238,7 @@
if (res.data.code == 1) {
toastMsg('提交成功');
setTimeout(function () {
openView('my_orderlist', 'my/my_orderlist', '我的订单')
openView('my_orderlist', 'my/my_orderlist', '我的订单','my_orderlist',false,false,false)
}, 2000)
} else {
// toastMsg(res.data.msg)
... ...
... ... @@ -249,7 +249,7 @@
</div>
<div class="set_item">
<div><span class="iconfont icon-jiejuefangan"></span><span>服务项目</span></div>
<div>{{serverReport_list.server_name}}</div>
<div>{{serverReport_list.title}}</div>
</div>
<div class="set_item border0">
<div>
... ...
... ... @@ -138,7 +138,7 @@
},
// 修改密码
forget: function () {
openView('forgot_f', 'login/forgot_f', '修改密码')
openView('forgot_f', 'login/forgot_f', '修改密码','forgot_f',false,false,false)
},
// 清除缓存
clear_ache: function () {
... ... @@ -152,26 +152,14 @@
// 退出登录
login_out: function () {
$api.rmStorage('token');
openView('login_index', 'login/login_index', '登录');
openView('login_index', 'login/login_index', '登录','login_index',false,false,false);
window.location.reload()
},
// 关于我们
about_us: function () {
openView('my_about', 'my/my_about', '关于我们')
openView('my_about', 'my/my_about', '关于我们','my_about',false,false,false)
},
// 去医护端
// provider: function () {
// api.openWin({
// name: 'doctor_win',
// url: '../doctor/doctor_win.html',
// });
// api.sendEvent({
// name: 'doctor_index0',
// extra: {
// index: 0
// }
// });
// },
// 拨打客服电话
callNumber: function () {
api.call({
... ...