Commit 650324ce authored by wildfirecode13's avatar wildfirecode13

11

parent c15da497
...@@ -87,4 +87,4 @@ function removeCalendarEvent(json) { ...@@ -87,4 +87,4 @@ function removeCalendarEvent(json) {
// // bridge.callHandler('currentLocation', { '': 'currentLocation', 'body': str3 }, function () { // // bridge.callHandler('currentLocation', { '': 'currentLocation', 'body': str3 }, function () {
// // }) //ios获取定位 // // }) //ios获取定位
// // }); // // });
// });</script><link href="//yun.duiba.com.cn/spark/v2/temp_base/1636525717529/styles/main.0c7bb4f306758b20f733.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="//yun.duiba.com.cn/spark/v2/temp_base/1636525717529/js/runtime-main.2d7f2d5c.js" crossorigin="anonymous"></script><script src="//yun.duiba.com.cn/spark/v2/temp_base/1636525717529/js/vendors.9d1efc92.js" crossorigin="anonymous"></script><script src="//yun.duiba.com.cn/spark/v2/temp_base/1636525717529/js/main.b2548918.js" crossorigin="anonymous"></script></body></html> // });</script><link href="//yun.duiba.com.cn/spark/v2/temp_base/1636529415099/styles/main.32334a210a2be0fa86d0.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="//yun.duiba.com.cn/spark/v2/temp_base/1636529415099/js/runtime-main.a5528f31.js" crossorigin="anonymous"></script><script src="//yun.duiba.com.cn/spark/v2/temp_base/1636529415099/js/vendors.33d53b6d.js" crossorigin="anonymous"></script><script src="//yun.duiba.com.cn/spark/v2/temp_base/1636529415099/js/main.30e7d26e.js" crossorigin="anonymous"></script></body></html>
\ No newline at end of file \ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{"+2NO":function(t,e,n){},"8TUu":function(t,e,n){var o=n("LboF"),a=n("Ftvq");"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[t.i,a,""]]);var r={insert:"head",singleton:!1};o(a,r);t.exports=a.locals||{}},Ftvq:function(t,e,n){},k7yg:function(t,e,n){"use strict";n.r(e);var o,a=n("lwsE"),r=n.n(a),c=n("W8MJ"),i=n.n(c),l=n("7W2i"),s=n.n(l),u=n("a1gu"),p=n.n(u),f=n("Nsbk"),d=n.n(f),h=n("J4zp"),v=n.n(h),m=n("q1tI"),y=n.n(m),g=n("i8i4"),w=n.n(g),k=(n("mPlr"),n("8TUu"),n("TyAF")),E=n("RIqP"),L=n.n(E),b=n("aFzQ"),D={},I=Object(b.l)({popList:[],pushPop:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.popList.length){var o,a=this.popList.slice();a.push({key:t,data:e,isMulti:n}),a=a.sort((function(t,e){return(D[e.key]?D[e.key]:10)-(D[t.key]?D[t.key]:10)})),this.popList.clear(),(o=this.popList).push.apply(o,L()(a))}else this.popList.push({key:t,data:e,isMulti:n})},closePop:function(t){if(t){var e,n=this.popList.slice();n=n.filter((function(e){return e.key!=t})),this.popList.clear(),(e=this.popList).push.apply(e,L()(n))}else this.popList.shift()},closePopAll:function(){this.popList.clear()}});function O(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=d()(t);if(e){var a=d()(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return p()(this,n)}}var R={},F=Object(k.a)(o=function(t){s()(n,t);var e=O(n);function n(t){return r()(this,n),e.call(this,t)}return i()(n,[{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var t,e,n,o,a=Object(b.p)(I.popList);if(!a.length)return document.body.style.overflow="auto",y.a.createElement("section",null);if(a.length>1&&1==a[a.length-1].isMulti){var r=a[a.length-1];n=R[r.key],o=r.data}var c=a[0];return t=R[c.key],e=c.data,(t||n)&&(document.body.style.overflow="hidden"),y.a.createElement("section",{className:"modal-hoc-bg",style:{zIndex:I.popList.length?1e3:-1,display:I.popList.length?"block":"none"}},t&&y.a.createElement(t,{popData:e}),n&&y.a.createElement("section",{className:"modal-hoc-bg",style:{zIndex:I.popList.length?1e3:-1,display:I.popList.length?"block":"none"}},y.a.createElement(n,{popData:o})))}}]),n}(m.Component))||o,M=n("/2d7"),C=CFG.appID,J="202."+CFG.projectId+".0.0",N=[{ele:".test-md1",data:{dpm:"".concat(C,".110.5.1"),dcm:J,domain:"//embedlog.duiba.com.cn",appId:C},once:!1}];function S(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=d()(t);if(e){var a=d()(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return p()(this,n)}}Object(M.a)({show:N,click:N});var T=function(t){s()(n,t);var e=S(n);function n(){return r()(this,n),e.apply(this,arguments)}return i()(n,[{key:"componentDidMount",value:function(){console.warn("JSInterface",window.JSInterface);var t={pushIndex:1,title:"测试标题",startDate:"2021-11-10 16:00",endTime:"5",alarmTime:"2",notes:""},e=[1,2,3],n=[["15","40"],["15","50"],["16","00"]];(e=e.map((function(t){return e=t,n=new Date,o=n.getFullYear(),a=n.getMonth()+1,r=n.getDate(),o.toString()+a.toString()+r.toString()+"_"+e.toString();var e,n,o,a,r}))).forEach((function(e,o){var a,r,c,i,l,s,u,p,f=JSON.parse(JSON.stringify(t));f.startDate=(a=n[o],r=v()(a,2),c=r[0],i=r[1],l=new Date,s=l.getFullYear(),u=l.getMonth()+1,p=l.getDate(),"".concat(s,"-").concat(u,"-").concat(p," ").concat(c,":").concat(i)),f.title="测试标题".concat(e),console.warn("eventId",e),console.warn("do addCalendarEvent 1",e);var d={callBackHandlerName:"addCalendarEvent1",eventId:e,title:f.title,startDate:f.startDate,endTime:f.endTime,alarmTime:f.alarmTime,notes:f.notes};console.warn("json "+e,d)})),window.addCalendarEvent1=function(t){var e;if(console.warn("哈哈 回调执行了,回调数据是: 2",t),e=(e=JSON.parse(t)).errorCode,console.warn(e),console.warn("000"==e),"000"==e){console.warn("???",e);var n=new Event("addCalendarEvent1");document.dispatchEvent(n)}}}},{key:"render",value:function(){return y.a.createElement("div",null,y.a.createElement("div",null,"请在app.jsx中指定首页"),y.a.createElement(F,null))}}]),n}(m.Component);w.a.render(y.a.createElement(T,null),document.getElementById("root"))},mPlr:function(t,e,n){var o=n("LboF"),a=n("+2NO");"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[t.i,a,""]]);var r={insert:"head",singleton:!1};o(a,r);t.exports=a.locals||{}}},[["k7yg",1,2]]]);
//# sourceMappingURL=main.30e7d26e.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{"+2NO":function(e,t,n){},"8TUu":function(e,t,n){var o=n("LboF"),r=n("Ftvq");"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var a={insert:"head",singleton:!1};o(r,a);e.exports=r.locals||{}},Ftvq:function(e,t,n){},k7yg:function(e,t,n){"use strict";n.r(t);var o,r=n("lwsE"),a=n.n(r),i=n("W8MJ"),l=n.n(i),c=n("7W2i"),s=n.n(c),u=n("a1gu"),p=n.n(u),d=n("Nsbk"),f=n.n(d),h=n("q1tI"),v=n.n(h),y=n("i8i4"),m=n.n(y),g=(n("mPlr"),n("8TUu"),n("TyAF")),k=n("RIqP"),w=n.n(k),E=n("aFzQ"),L={},b=Object(E.l)({popList:[],pushPop:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.popList.length){var o,r=this.popList.slice();r.push({key:e,data:t,isMulti:n}),r=r.sort((function(e,t){return(L[t.key]?L[t.key]:10)-(L[e.key]?L[e.key]:10)})),this.popList.clear(),(o=this.popList).push.apply(o,w()(r))}else this.popList.push({key:e,data:t,isMulti:n})},closePop:function(e){if(e){var t,n=this.popList.slice();n=n.filter((function(t){return t.key!=e})),this.popList.clear(),(t=this.popList).push.apply(t,w()(n))}else this.popList.shift()},closePopAll:function(){this.popList.clear()}});function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=f()(e);if(t){var r=f()(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return p()(this,n)}}var R={},C=Object(g.a)(o=function(e){s()(n,e);var t=I(n);function n(e){return a()(this,n),t.call(this,e)}return l()(n,[{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var e,t,n,o,r=Object(E.p)(b.popList);if(!r.length)return document.body.style.overflow="auto",v.a.createElement("section",null);if(r.length>1&&1==r[r.length-1].isMulti){var a=r[r.length-1];n=R[a.key],o=a.data}var i=r[0];return e=R[i.key],t=i.data,(e||n)&&(document.body.style.overflow="hidden"),v.a.createElement("section",{className:"modal-hoc-bg",style:{zIndex:b.popList.length?1e3:-1,display:b.popList.length?"block":"none"}},e&&v.a.createElement(e,{popData:t}),n&&v.a.createElement("section",{className:"modal-hoc-bg",style:{zIndex:b.popList.length?1e3:-1,display:b.popList.length?"block":"none"}},v.a.createElement(n,{popData:o})))}}]),n}(h.Component))||o,F=n("/2d7"),M=CFG.appID,O="202."+CFG.projectId+".0.0",D=[{ele:".test-md1",data:{dpm:"".concat(M,".110.5.1"),dcm:O,domain:"//embedlog.duiba.com.cn",appId:M},once:!1}];function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=f()(e);if(t){var r=f()(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return p()(this,n)}}Object(F.a)({show:D,click:D});var x=function(e){s()(n,e);var t=P(n);function n(){return a()(this,n),t.apply(this,arguments)}return l()(n,[{key:"componentDidMount",value:function(){console.error("JSInterface",window.JSInterface);var e,t,n,o,r,a="测试标题",i="2021-11-10 16:00",l="120",c="15",s="",u={callBackHandlerName:"addCalendarEvent1",eventId:(e=1,t=new Date,n=t.getFullYear(),o=t.getMonth()+1,r=t.getDate(),n.toString()+o.toString()+r.toString()+e.toString()),title:a,startDate:i,endTime:l,alarmTime:c,notes:s};console.error("do addCalendarEvent 1"),window.addCalendarEvent(u),window.addCalendarEvent1=function(e){var t;if(console.error("哈哈 回调执行了,回调数据是: 2",e),t=(t=JSON.parse(e)).errorCode,console.error(t),console.error("000"==t),"000"==t){console.error("???",t);var n=new Event("addCalendarEvent1");document.dispatchEvent(n)}}}},{key:"render",value:function(){return v.a.createElement("div",null,v.a.createElement("div",null,"请在app.jsx中指定首页"),v.a.createElement(C,null))}}]),n}(h.Component);m.a.render(v.a.createElement(x,null),document.getElementById("root"))},mPlr:function(e,t,n){var o=n("LboF"),r=n("+2NO");"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var a={insert:"head",singleton:!1};o(r,a);e.exports=r.locals||{}}},[["k7yg",1,2]]]);
//# sourceMappingURL=main.b2548918.js.map
\ No newline at end of file
!function(e){function r(r){for(var n,a,l=r[0],i=r[1],p=r[2],c=0,s=[];c<l.length;c++)a=l[c],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,p||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var i=t[l];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={1:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,function(r){return e[r]}.bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="//yun.duiba.com.cn/spark/v2/temp_base/1636525717529/";var l=window.webpackJsonp=window.webpackJsonp||[],i=l.push.bind(l);l.push=r,l=l.slice();for(var p=0;p<l.length;p++)r(l[p]);var f=i;t()}([]); !function(e){function r(r){for(var n,a,l=r[0],i=r[1],p=r[2],c=0,s=[];c<l.length;c++)a=l[c],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,p||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var i=t[l];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={1:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,function(r){return e[r]}.bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="//yun.duiba.com.cn/spark/v2/temp_base/1636529415099/";var l=window.webpackJsonp=window.webpackJsonp||[],i=l.push.bind(l);l.push=r,l=l.slice();for(var p=0;p<l.length;p++)r(l[p]);var f=i;t()}([]);
//# sourceMappingURL=runtime-main.2d7f2d5c.js.map //# sourceMappingURL=runtime-main.a5528f31.js.map
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
...@@ -23,4 +23,4 @@ body { ...@@ -23,4 +23,4 @@ body {
z-index: 1000; z-index: 1000;
} }
/*# sourceMappingURL=main.0c7bb4f306758b20f733.css.map*/ /*# sourceMappingURL=main.32334a210a2be0fa86d0.css.map*/
\ No newline at end of file \ No newline at end of file
{"version":3,"sources":[],"names":[],"mappings":"","file":"styles/main.0c7bb4f306758b20f733.css","sourceRoot":""} {"version":3,"sources":[],"names":[],"mappings":"","file":"styles/main.32334a210a2be0fa86d0.css","sourceRoot":""}
\ No newline at end of file \ No newline at end of file
...@@ -9,6 +9,6 @@ module.exports ={ ...@@ -9,6 +9,6 @@ module.exports ={
"IMAGE_Q1": 0.6, "IMAGE_Q1": 0.6,
"IMAGE_Q2": 0.8, "IMAGE_Q2": 0.8,
"RES_PATH": "/src/assets/", "RES_PATH": "/src/assets/",
"RES_PATH_PROD": "//yun.duiba.com.cn/spark/v2/temp_base/1636525715091", "RES_PATH_PROD": "//yun.duiba.com.cn/spark/v2/temp_base/1636529465463",
"JS_PATH_PROD": "https://yun.duiba.com.cn/spark/v2/temp_base/1636525717529/js" "JS_PATH_PROD": "https://yun.duiba.com.cn/spark/v2/temp_base/1636529467876/js"
} }
\ No newline at end of file
...@@ -7,54 +7,86 @@ MD(); ...@@ -7,54 +7,86 @@ MD();
//此处为spark-cli动态生成 //此处为spark-cli动态生成
function getEventId(pushIndex){ function getEventId(pushId) {
var now = new Date(); var now = new Date();
var year = now.getFullYear(); var year = now.getFullYear();
var month = now.getMonth() + 1; var month = now.getMonth() + 1;
var day = now.getDate(); var day = now.getDate();
var eventId = year.toString() + month.toString() + day.toString() + pushIndex.toString() var eventId = year.toString() + month.toString() + day.toString() + '_' + pushId.toString()
return eventId; return eventId;
} }
function getStartDate([hours, min]) {
var now = new Date();
var year = now.getFullYear();
var month = now.getMonth() + 1;
var day = now.getDate();
return `${year}-${month}-${day} ${hours}:${min}`
}
class App extends Component { class App extends Component {
componentDidMount() { componentDidMount() {
console.error('JSInterface',window.JSInterface); console.warn('JSInterface', window.JSInterface);
var pushData = { const endTime = '5';
pushIndex:1, const alarmTime = '2';
title:"测试标题",
startDate:"2021-11-10 16:00", var TEMPLATE = {
endTime:"120", pushIndex: 1,
alarmTime:"15", title: "测试标题",
notes:"" startDate: "2021-11-10 16:00",
endTime: endTime,
alarmTime: alarmTime,
notes: ""
}; };
var eventId = getEventId(pushData.pushIndex); let eventIds = [1, 2, 3];
let startHours = [
['15', '40'],
['15', '50'],
['16', '00']
];
var json = { eventIds = eventIds.map(id => getEventId(id));
"callBackHandlerName": "addCalendarEvent1",
"eventId": eventId,
"title": pushData.title, eventIds.forEach((eventId, index) => {
"startDate": pushData.startDate,
"endTime": pushData.endTime, var pushData = JSON.parse(JSON.stringify(TEMPLATE));
"alarmTime": pushData.alarmTime, pushData.startDate = getStartDate(startHours[index]);
"notes": pushData.notes pushData.title = `测试标题${eventId}`
} console.warn('eventId', eventId);
console.error("do addCalendarEvent 1")
console.warn("do addCalendarEvent 1", eventId)
var json = {
"callBackHandlerName": "addCalendarEvent1", //必填项,用于返回成功状态及提示语
"eventId": eventId, //必填项,删除事件时需要传入相同事件标识
"title": pushData.title,
"startDate": pushData.startDate,
"endTime": pushData.endTime,
"alarmTime": pushData.alarmTime,
"notes": pushData.notes
}
console.warn('json ' + eventId, json)
window['addCalendarEvent'](json)
})
window['addCalendarEvent'](json)
window['addCalendarEvent1'] = function (data) { window['addCalendarEvent1'] = function (data) {
console.error('哈哈 回调执行了,回调数据是: 2',data) console.warn('哈哈 回调执行了,回调数据是: 2', data)
var code; var code;
code = JSON.parse(data) code = JSON.parse(data)
code = code.errorCode code = code.errorCode
console.error(code) console.warn(code)
console.error(code == "000") console.warn(code == "000")
if (code == "000") { if (code == "000") {
console.error("???", code) console.warn("???", code)
var addCalendarEvent1 = new Event("addCalendarEvent1"); var addCalendarEvent1 = new Event("addCalendarEvent1");
document.dispatchEvent(addCalendarEvent1) document.dispatchEvent(addCalendarEvent1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment