正在显示
5 个修改的文件
包含
157 行增加
和
70 行删除
1 | -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | 1 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
2 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
2 | <html xmlns="http://www.w3.org/1999/xhtml"> | 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
3 | <head> | 4 | <head> |
4 | -<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"> | ||
5 | -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
6 | -<link rel="stylesheet" type="text/css" href="css/base.css" /> | ||
7 | -<link rel="stylesheet" type="text/css" href="css/style.css" /> | ||
8 | -<link rel="stylesheet" type="text/css" href="css/blood.css" /> | ||
9 | -<link rel="stylesheet" type="text/css" href="css/jquery-labelauty.css"> | ||
10 | -<link rel="stylesheet" type="text/css" href="css/common.css"> | ||
11 | -<script src="js/base.js" type="text/javascript" charset="utf-8"></script> | ||
12 | -<title>记血糖</title> | 5 | + <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"> |
6 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | ||
7 | + <link rel="stylesheet" type="text/css" href="css/base.css"/> | ||
8 | + <link rel="stylesheet" type="text/css" href="css/style.css"/> | ||
9 | + <link rel="stylesheet" type="text/css" href="css/blood.css"/> | ||
10 | + <link rel="stylesheet" type="text/css" href="css/jquery-labelauty.css"> | ||
11 | + <link rel="stylesheet" type="text/css" href="css/common.css"> | ||
12 | + <script src="js/base.js" type="text/javascript" charset="utf-8"></script> | ||
13 | + <title>记血糖</title> | ||
13 | </head> | 14 | </head> |
14 | 15 | ||
15 | <body> | 16 | <body> |
16 | <div style="background-color:#fff;"> | 17 | <div style="background-color:#fff;"> |
17 | -<div class="perheader center"> | ||
18 | - <div class="left perback"><a href="#" onClick="javascript:history.back(-1);"><img src="images/care_03.jpg"/></a></div> | ||
19 | - <div class="bloodtext">记血糖</div> | ||
20 | -</div> | 18 | + <div class="perheader center"> |
19 | + <div class="left perback"><a href="#" onClick="javascript:history.back(-1);"><img src="images/care_03.jpg"/></a> | ||
20 | + </div> | ||
21 | + <div class="bloodtext">记血糖</div> | ||
22 | + </div> | ||
21 | </div> | 23 | </div> |
22 | <div class="perpart1 center"> | 24 | <div class="perpart1 center"> |
23 | - <div style="position: relative;color: #fff;top: 2.5rem;">mmol/L</div> | ||
24 | - | ||
25 | - <div id="background" style="background-color:#d8b25f;color:#FFF;padding:10px; border-radius:50%; display:inline-block;margin-top:20px;"> | ||
26 | - <input type="text" step="0.1" name="test" class="knob" data-width="270" data-fgColor="#fff" data-skin="tron" data-thickness=".1" value="2.5" > | 25 | + <div style="position: relative;color: #fff;top: 2.5rem;">mmol/L</div> |
26 | + | ||
27 | + <div id="background" | ||
28 | + style="background-color:#d8b25f;color:#FFF;padding:10px; border-radius:50%; display:inline-block;margin-top:20px;"> | ||
29 | + <input type="text" step="0.1" name="test" class="knob" data-width="270" data-fgColor="#fff" data-skin="tron" | ||
30 | + data-thickness=".1" value="2.5"> | ||
27 | </div> | 31 | </div> |
28 | 32 | ||
29 | <form action="#"> | 33 | <form action="#"> |
30 | - <div class="blli"> | ||
31 | - <ul class="dowebok"> | ||
32 | - <li><input type="radio" name="radio" data-id="1" class="time_type" data-labelauty="空腹"></li> | ||
33 | - <li><input type="radio" name="radio" data-id="2" class="time_type" data-labelauty="早餐后"></li> | ||
34 | - <li><input type="radio" name="radio" data-id="3" class="time_type" data-labelauty="午餐前"></li> | ||
35 | - <li><input type="radio" name="radio" data-id="4" class="time_type" data-labelauty="午餐后"></li> | ||
36 | - <li><input type="radio" name="radio" data-id="5" class="time_type" data-labelauty="晚餐前"></li> | ||
37 | - <li><input type="radio" name="radio" data-id="6" class="time_type" data-labelauty="晚餐后"></li> | ||
38 | - <li><input type="radio" name="radio" data-id="7" class="time_type" data-labelauty="睡前"></li> | ||
39 | - <li><input type="radio" name="radio" data-id="8" class="time_type" data-labelauty="凌晨"></li> | ||
40 | - </ul> | ||
41 | - </div> | 34 | + <div class="blli"> |
35 | + <ul class="dowebok"> | ||
36 | + <li><input type="radio" name="radio" data-id="1" class="time_type" data-labelauty="空腹"></li> | ||
37 | + <li><input type="radio" name="radio" data-id="2" class="time_type" data-labelauty="早餐后"></li> | ||
38 | + <li><input type="radio" name="radio" data-id="3" class="time_type" data-labelauty="午餐前"></li> | ||
39 | + <li><input type="radio" name="radio" data-id="4" class="time_type" data-labelauty="午餐后"></li> | ||
40 | + <li><input type="radio" name="radio" data-id="5" class="time_type" data-labelauty="晚餐前"></li> | ||
41 | + <li><input type="radio" name="radio" data-id="6" class="time_type" data-labelauty="晚餐后"></li> | ||
42 | + <li><input type="radio" name="radio" data-id="7" class="time_type" data-labelauty="睡前"></li> | ||
43 | + <li><input type="radio" name="radio" data-id="8" class="time_type" data-labelauty="凌晨"></li> | ||
44 | + </ul> | ||
45 | + </div> | ||
42 | </div> | 46 | </div> |
43 | 47 | ||
44 | <div class="bltime"> | 48 | <div class="bltime"> |
45 | -<input id="endTime" class="kbtn" style="font-size:0.22rem;" value="2018-01-20 18:03" /><span class="right">></span></div> | ||
46 | -<div ><button type="button" class="blbut"/>保存</div> | 49 | + <input id="endTime" class="kbtn" style="font-size:0.22rem;" value="2018-01-20 18:03"/><span class="right">></span> |
50 | +</div> | ||
51 | +<div> | ||
52 | + <button type="button" class="blbut"/> | ||
53 | + 保存 | ||
54 | +</div> | ||
47 | </form> | 55 | </form> |
48 | <div id="datePlugin"></div> | 56 | <div id="datePlugin"></div> |
49 | - | 57 | +<script type="text/javascript" src="js/axios.min.js"></script> |
50 | <script type="text/javascript" src="js/common.js"/> | 58 | <script type="text/javascript" src="js/common.js"/> |
51 | <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> | 59 | <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> |
52 | <script type="text/javascript" src="js/jquery.min.js"></script> | 60 | <script type="text/javascript" src="js/jquery.min.js"></script> |
@@ -54,18 +62,18 @@ | @@ -54,18 +62,18 @@ | ||
54 | <script src="js/jquery-labelauty.js"></script> | 62 | <script src="js/jquery-labelauty.js"></script> |
55 | <script src="js/jquery.knob.js"></script> | 63 | <script src="js/jquery.knob.js"></script> |
56 | 64 | ||
57 | -<script type="text/javascript" src="js/date.js" ></script> | ||
58 | -<script type="text/javascript" src="js/iscroll.js" ></script> | 65 | +<script type="text/javascript" src="js/date.js"></script> |
66 | +<script type="text/javascript" src="js/iscroll.js"></script> | ||
59 | <script type="text/javascript"> | 67 | <script type="text/javascript"> |
60 | - $(function(){ | ||
61 | - $('#endTime').date({theme:"datetime"}); | 68 | + $(function () { |
69 | + $('#endTime').date({theme: "datetime"}); | ||
62 | }); | 70 | }); |
63 | 71 | ||
64 | - $(function() { | 72 | + $(function () { |
65 | $(".knob").knob(); | 73 | $(".knob").knob(); |
66 | }); | 74 | }); |
67 | 75 | ||
68 | - $(function(){ | 76 | + $(function () { |
69 | $(':input').labelauty(); | 77 | $(':input').labelauty(); |
70 | }); | 78 | }); |
71 | var time_type; | 79 | var time_type; |
@@ -77,33 +85,51 @@ | @@ -77,33 +85,51 @@ | ||
77 | }) | 85 | }) |
78 | $('.blbut').click(function () { | 86 | $('.blbut').click(function () { |
79 | type_sugar = $('.knob').val() | 87 | type_sugar = $('.knob').val() |
80 | - endTime = $('#endTime').val() | 88 | + endTime = $('#endTime').val(); |
81 | var time3 = Date.parse(endTime); | 89 | var time3 = Date.parse(endTime); |
82 | - console.log(time3) | ||
83 | - time3 = time3/1000; | ||
84 | - $.ajax({ | ||
85 | - type:"POST", | ||
86 | - url: baseUrl+"user/index/setBoolData", | ||
87 | - dataType:"json", | ||
88 | - headers:{ | ||
89 | - "DeviceType":getDevice(), | ||
90 | - "token":"1", | ||
91 | - "Content-Type":"text/plain;charset=UTF-8" | ||
92 | - }, | ||
93 | - data:{ | ||
94 | - rid:0, | ||
95 | - time_type:time_type, | ||
96 | - time:time3, | ||
97 | - type:1, | ||
98 | - data:type_sugar, | ||
99 | - }, | ||
100 | - success:function (res) { | ||
101 | - console.log(res.data) | ||
102 | - } | ||
103 | - }) | 90 | + time3 = time3 / 1000; |
91 | + var post = { | ||
92 | + rid: 0, | ||
93 | + time_type: time_type, | ||
94 | + time: time3, | ||
95 | + type: 1, | ||
96 | + data: type_sugar, | ||
97 | + }; | ||
98 | + var header = { | ||
99 | + "DeviceType": '1', | ||
100 | + "Token": '1', | ||
101 | + "Accept": 'application/json;text/plain', | ||
102 | + } | ||
103 | + if (type_sugar != '' && endTime != '' && time3 != '') { | ||
104 | + getRequest('post', "user/index/setBoolData", post, header).then(function (res) { | ||
105 | + alert(res) | ||
106 | + }) | ||
107 | + } else { | ||
108 | + return false; | ||
109 | + } | ||
110 | + // $.ajax({ | ||
111 | + // type:"POST", | ||
112 | + // url: "http://kindapp.w.bronet.cn/api/user/index/setBoolData", | ||
113 | + // dataType:"json", | ||
114 | + // headers:{ | ||
115 | + // "DeviceType":'1', | ||
116 | + // "Token":'1', | ||
117 | + // "Accept":'application/json;text/plain', | ||
118 | + // // "Content-Type":"text/plain;charset=UTF-8" | ||
119 | + // "Content-Type": 'application/x-www-form-urlencoded' | ||
120 | + // }, | ||
121 | + // data:{ | ||
122 | + // rid:0, | ||
123 | + // time_type:time_type, | ||
124 | + // time:time3, | ||
125 | + // type:1, | ||
126 | + // data:type_sugar, | ||
127 | + // }, | ||
128 | + // success:function (res) { | ||
129 | + // console.log(res.data) | ||
130 | + // } | ||
131 | + // }) | ||
132 | + | ||
104 | }) | 133 | }) |
105 | }) | 134 | }) |
106 | -</script> | ||
107 | - | ||
108 | -</body> | ||
109 | -</html> | ||
135 | +</script> |
js/axios.min.js
0 → 100644
1 | +/* axios v0.18.0 | (c) 2018 by Matt Zabriskie */ | ||
2 | +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){var t=new s(e),n=i(s.prototype.request,t);return o.extend(n,s.prototype,t),o.extend(n,t),n}var o=n(2),i=n(3),s=n(5),u=n(6),a=r(u);a.Axios=s,a.create=function(e){return r(o.merge(u,e))},a.Cancel=n(23),a.CancelToken=n(24),a.isCancel=n(20),a.all=function(e){return Promise.all(e)},a.spread=n(25),e.exports=a,e.exports.default=a},function(e,t,n){"use strict";function r(e){return"[object Array]"===R.call(e)}function o(e){return"[object ArrayBuffer]"===R.call(e)}function i(e){return"undefined"!=typeof FormData&&e instanceof FormData}function s(e){var t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function u(e){return"string"==typeof e}function a(e){return"number"==typeof e}function c(e){return"undefined"==typeof e}function f(e){return null!==e&&"object"==typeof e}function p(e){return"[object Date]"===R.call(e)}function d(e){return"[object File]"===R.call(e)}function l(e){return"[object Blob]"===R.call(e)}function h(e){return"[object Function]"===R.call(e)}function m(e){return f(e)&&h(e.pipe)}function y(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function w(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function g(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function v(e,t){if(null!==e&&"undefined"!=typeof e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}function x(){function e(e,n){"object"==typeof t[n]&&"object"==typeof e?t[n]=x(t[n],e):t[n]=e}for(var t={},n=0,r=arguments.length;n<r;n++)v(arguments[n],e);return t}function b(e,t,n){return v(t,function(t,r){n&&"function"==typeof t?e[r]=E(t,n):e[r]=t}),e}var E=n(3),C=n(4),R=Object.prototype.toString;e.exports={isArray:r,isArrayBuffer:o,isBuffer:C,isFormData:i,isArrayBufferView:s,isString:u,isNumber:a,isObject:f,isUndefined:c,isDate:p,isFile:d,isBlob:l,isFunction:h,isStream:m,isURLSearchParams:y,isStandardBrowserEnv:g,forEach:v,merge:x,extend:b,trim:w}},function(e,t){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function r(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}/*! | ||
3 | + * Determine if an object is a Buffer | ||
4 | + * | ||
5 | + * @author Feross Aboukhadijeh <https://feross.org> | ||
6 | + * @license MIT | ||
7 | + */ | ||
8 | +e.exports=function(e){return null!=e&&(n(e)||r(e)||!!e._isBuffer)}},function(e,t,n){"use strict";function r(e){this.defaults=e,this.interceptors={request:new s,response:new s}}var o=n(6),i=n(2),s=n(17),u=n(18);r.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),e=i.merge(o,{method:"get"},this.defaults,e),e.method=e.method.toLowerCase();var t=[u,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},i.forEach(["delete","get","head","options"],function(e){r.prototype[e]=function(t,n){return this.request(i.merge(n||{},{method:e,url:t}))}}),i.forEach(["post","put","patch"],function(e){r.prototype[e]=function(t,n,r){return this.request(i.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=r},function(e,t,n){"use strict";function r(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function o(){var e;return"undefined"!=typeof XMLHttpRequest?e=n(8):"undefined"!=typeof process&&(e=n(8)),e}var i=n(2),s=n(7),u={"Content-Type":"application/x-www-form-urlencoded"},a={adapter:o(),transformRequest:[function(e,t){return s(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};a.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(e){a.headers[e]={}}),i.forEach(["post","put","patch"],function(e){a.headers[e]=i.merge(u)}),e.exports=a},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(2),o=n(9),i=n(12),s=n(13),u=n(14),a=n(10),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(15);e.exports=function(e){return new Promise(function(t,f){var p=e.data,d=e.headers;r.isFormData(p)&&delete d["Content-Type"];var l=new XMLHttpRequest,h="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in l||u(e.url)||(l=new window.XDomainRequest,h="onload",m=!0,l.onprogress=function(){},l.ontimeout=function(){}),e.auth){var y=e.auth.username||"",w=e.auth.password||"";d.Authorization="Basic "+c(y+":"+w)}if(l.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,l[h]=function(){if(l&&(4===l.readyState||m)&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in l?s(l.getAllResponseHeaders()):null,r=e.responseType&&"text"!==e.responseType?l.response:l.responseText,i={data:r,status:1223===l.status?204:l.status,statusText:1223===l.status?"No Content":l.statusText,headers:n,config:e,request:l};o(t,f,i),l=null}},l.onerror=function(){f(a("Network Error",e,null,l)),l=null},l.ontimeout=function(){f(a("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",l)),l=null},r.isStandardBrowserEnv()){var g=n(16),v=(e.withCredentials||u(e.url))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;v&&(d[e.xsrfHeaderName]=v)}if("setRequestHeader"in l&&r.forEach(d,function(e,t){"undefined"==typeof p&&"content-type"===t.toLowerCase()?delete d[t]:l.setRequestHeader(t,e)}),e.withCredentials&&(l.withCredentials=!0),e.responseType)try{l.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){l&&(l.abort(),f(e),l=null)}),void 0===p&&(p=null),l.send(p)})}},function(e,t,n){"use strict";var r=n(10);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(11);e.exports=function(e,t,n,o,i){var s=new Error(e);return r(s,t,n,o,i)}},function(e,t){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e}},function(e,t,n){"use strict";function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var o=n(2);e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(o.isURLSearchParams(t))i=t.toString();else{var s=[];o.forEach(t,function(e,t){null!==e&&"undefined"!=typeof e&&(o.isArray(e)?t+="[]":e=[e],o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),s.push(r(t)+"="+r(e))}))}),i=s.join("&")}return i&&(e+=(e.indexOf("?")===-1?"?":"&")+i),e}},function(e,t,n){"use strict";var r=n(2),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,s={};return e?(r.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;"set-cookie"===t?s[t]=(s[t]?s[t]:[]).concat([n]):s[t]=s[t]?s[t]+", "+n:n}}),s):s}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t){"use strict";function n(){this.message="String contains an invalid character"}function r(e){for(var t,r,i=String(e),s="",u=0,a=o;i.charAt(0|u)||(a="=",u%1);s+=a.charAt(63&t>>8-u%1*8)){if(r=i.charCodeAt(u+=.75),r>255)throw new n;t=t<<8|r}return s}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.prototype=new Error,n.prototype.code=5,n.prototype.name="InvalidCharacterError",e.exports=r},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,i,s){var u=[];u.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),r.isString(o)&&u.push("path="+o),r.isString(i)&&u.push("domain="+i),s===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";function r(){this.handlers=[]}var o=n(2);r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var o=n(2),i=n(19),s=n(20),u=n(6),a=n(21),c=n(22);e.exports=function(e){r(e),e.baseURL&&!a(e.url)&&(e.url=c(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]});var t=e.adapter||u.adapter;return t(e).then(function(t){return r(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return s(t)||(r(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(23);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}}])}); | ||
9 | +//# sourceMappingURL=axios.min.map |
1 | // var baseUrl = 'http://kindapp.w.bronet.cn/api/'; | 1 | // var baseUrl = 'http://kindapp.w.bronet.cn/api/'; |
2 | -var baseUrl = 'http://192.168.1.3/api/'; | 2 | +// var baseUrl = 'http://192.168.1.3/api/'; |
3 | +var baseUrl = 'http://kindapp.w.bronet.cn/api/' | ||
3 | 4 | ||
4 | function sendAjax(post, url, params, header, callback) { | 5 | function sendAjax(post, url, params, header, callback) { |
5 | $.ajax({ | 6 | $.ajax({ |
@@ -73,4 +74,23 @@ function getUrlParam(name) { | @@ -73,4 +74,23 @@ function getUrlParam(name) { | ||
73 | var r = window.location.search.substr(1).match(reg); //匹配目标参数 | 74 | var r = window.location.search.substr(1).match(reg); //匹配目标参数 |
74 | if (r != null) return unescape(r[2]); | 75 | if (r != null) return unescape(r[2]); |
75 | return null; //返回参数值 | 76 | return null; //返回参数值 |
77 | +} | ||
78 | + | ||
79 | + | ||
80 | + | ||
81 | +function getRequest(type, url, params, header) { | ||
82 | + var promise = new Promise(function (resolve, reject) { | ||
83 | + axios({ | ||
84 | + method: type, | ||
85 | + url: baseUrl + url, | ||
86 | + params: params, | ||
87 | + headers: header | ||
88 | + }).then(function (res) { | ||
89 | + resolve(res) | ||
90 | + }).catch(function (err) { | ||
91 | + // toastMsg('网络错误'); | ||
92 | + reject(err) | ||
93 | + }) | ||
94 | + }); | ||
95 | + return promise | ||
76 | } | 96 | } |
@@ -41,21 +41,21 @@ | @@ -41,21 +41,21 @@ | ||
41 | <div class="phyp"> | 41 | <div class="phyp"> |
42 | <span>体检日期</span> | 42 | <span>体检日期</span> |
43 | <span class="right"> | 43 | <span class="right"> |
44 | - <input type="text" id="beginTime" placeholder="日期" /> | 44 | + <input type="text" id="beginTime" value="日期" /> |
45 | <img src="images/pergo_03.jpg" /> | 45 | <img src="images/pergo_03.jpg" /> |
46 | </span> | 46 | </span> |
47 | </div> | 47 | </div> |
48 | <div class="phyp"> | 48 | <div class="phyp"> |
49 | <span>体检名称</span> | 49 | <span>体检名称</span> |
50 | <span class="right"> | 50 | <span class="right"> |
51 | - <input type="text" class="select-value25" placeholder="名称" /> | 51 | + <input type="text" class="select-value25" id="names" value="名称" /> |
52 | <img src="images/pergo_03.jpg" /> | 52 | <img src="images/pergo_03.jpg" /> |
53 | </span> | 53 | </span> |
54 | </div> | 54 | </div> |
55 | <div class="phyp"> | 55 | <div class="phyp"> |
56 | <span>体检机构</span> | 56 | <span>体检机构</span> |
57 | <span class="right"> | 57 | <span class="right"> |
58 | - <input type="text" class="select-value16" placeholder="慈界医养" /> | 58 | + <input type="text" class="select-value16" id="org" value="慈界医养" /> |
59 | <img src="images/pergo_03.jpg" /> | 59 | <img src="images/pergo_03.jpg" /> |
60 | </span> | 60 | </span> |
61 | </div> | 61 | </div> |
@@ -108,5 +108,37 @@ | @@ -108,5 +108,37 @@ | ||
108 | $(document).ready(function () { | 108 | $(document).ready(function () { |
109 | 109 | ||
110 | }) | 110 | }) |
111 | + | ||
112 | + var checktime,name,org,descript,pic,r_type,code; | ||
113 | + $('.phybut').click(function () { | ||
114 | + checktime=$('#beginTime').val(); | ||
115 | + name=$('#names').val() | ||
116 | + org=$('#org').val() | ||
117 | + descript=$('.pharea').val() | ||
118 | + pic='https://f11.baidu.com/it/u=1562411134,1079853278&fm=173&app=25&f=JPEG?w=640&h=564&s=5A12758DCA255E8EBA8889500300D0B1&access=215967316'; | ||
119 | + code='https://f11.baidu.com/it/u=1562411134,1079853278&fm=173&app=25&f=JPEG?w=640&h=564&s=5A12758DCA255E8EBA8889500300D0B1&access=215967316'; | ||
120 | + $.ajax({ | ||
121 | + type:"POST", | ||
122 | + url: "http://kindapp.w.bronet.cn/api/user/index/addReport", | ||
123 | + dataType:"json", | ||
124 | + header:{ | ||
125 | + DeviceType:1, | ||
126 | + Token:1, | ||
127 | + // "Content-Type":"text/plain;charset=UTF-8" | ||
128 | + //'Content-Type': 'application/x-www-form-urlencoded' | ||
129 | + }, | ||
130 | + data:{ | ||
131 | + checktime:checktime, | ||
132 | + name:name, | ||
133 | + org:org, | ||
134 | + descript:descript, | ||
135 | + pic:pic, | ||
136 | + code:code | ||
137 | + }, | ||
138 | + success:function (res) { | ||
139 | + console.log(res.data) | ||
140 | + } | ||
141 | + }) | ||
142 | + }) | ||
111 | </script> | 143 | </script> |
112 | </body> | 144 | </body> |
新建文本文档.66666txt
已删除
100644 → 0
-
请 注册 或 登录 后发表评论