You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
17 KiB

2 months ago
  1. "use weex:vue";
  2. if (typeof Promise !== 'undefined' && !Promise.prototype.finally) {
  3. Promise.prototype.finally = function(callback) {
  4. const promise = this.constructor
  5. return this.then(
  6. value => promise.resolve(callback()).then(() => value),
  7. reason => promise.resolve(callback()).then(() => {
  8. throw reason
  9. })
  10. )
  11. }
  12. };
  13. if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
  14. const global = uni.requireGlobal()
  15. ArrayBuffer = global.ArrayBuffer
  16. Int8Array = global.Int8Array
  17. Uint8Array = global.Uint8Array
  18. Uint8ClampedArray = global.Uint8ClampedArray
  19. Int16Array = global.Int16Array
  20. Uint16Array = global.Uint16Array
  21. Int32Array = global.Int32Array
  22. Uint32Array = global.Uint32Array
  23. Float32Array = global.Float32Array
  24. Float64Array = global.Float64Array
  25. BigInt64Array = global.BigInt64Array
  26. BigUint64Array = global.BigUint64Array
  27. };
  28. (()=>{var B=Object.create;var m=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,Q=Object.prototype.hasOwnProperty;var I=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var E=(e,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of w(t))!Q.call(e,o)&&o!==a&&m(e,o,{get:()=>t[o],enumerable:!(n=b(t,o))||n.enumerable});return e};var O=(e,t,a)=>(a=e!=null?B(P(e)):{},E(t||!e||!e.__esModule?m(a,"default",{value:e,enumerable:!0}):a,e));var f=I((L,C)=>{C.exports=Vue});var d={data(){return{locale:"en",fallbackLocale:"en",localization:{en:{done:"OK",cancel:"Cancel"},zh:{done:"\u5B8C\u6210",cancel:"\u53D6\u6D88"},"zh-hans":{},"zh-hant":{},messages:{}},localizationTemplate:{}}},onLoad(){this.initLocale()},created(){this.initLocale()},methods:{initLocale(){if(this.__initLocale)return;this.__initLocale=!0;let e=(plus.webview.currentWebview().extras||{}).data||{};if(e.messages&&(this.localization.messages=e.messages),e.locale){this.locale=e.locale.toLowerCase();return}let t={chs:"hans",cn:"hans",sg:"hans",cht:"hant",tw:"hant",hk:"hant",mo:"hant"},a=plus.os.language.toLowerCase().split("/")[0].replace("_","-").split("-"),n=a[1];n&&(a[1]=t[n]||n),a.length=a.length>2?2:a.length,this.locale=a.join("-")},localize(e){let t=this.locale,a=t.split("-")[0],n=this.fallbackLocale,o=s=>Object.assign({},this.localization[s],(this.localizationTemplate||{})[s]);return o("messages")[e]||o(t)[e]||o(a)[e]||o(n)[e]||e}}},h={onLoad(){this.initMessage()},methods:{initMessage(){let{from:e,callback:t,runtime:a,data:n={},useGlobalEvent:o}=plus.webview.currentWebview().extras||{};this.__from=e,this.__runtime=a,this.__page=plus.webview.currentWebview().id,this.__useGlobalEvent=o,this.data=JSON.parse(JSON.stringify(n)),plus.key.addEventListener("backbutton",()=>{typeof this.onClose=="function"?this.onClose():plus.webview.currentWebview().close("auto")});let s=this,r=function(l){let A=l.data&&l.data.__message;!A||s.__onMessageCallback&&s.__onMessageCallback(A.data)};if(this.__useGlobalEvent)weex.requireModule("globalEvent").addEventListener("plusMessage",r);else{let l=new BroadcastChannel(this.__page);l.onmessage=r}},postMessage(e={},t=!1){let a=JSON.parse(JSON.stringify({__message:{__page:this.__page,data:e,keep:t}})),n=this.__from;if(this.__runtime==="v8")this.__useGlobalEvent?plus.webview.postMessageToUniNView(a,n):new BroadcastChannel(n).postMessage(a);else{let o=plus.webview.getWebviewById(n);o&&o.evalJS(`__plusMessage&&__plusMessage(${JSON.stringify({data:a})})`)}},onMessage(e){this.__onMessageCallback=e}}};var i=O(f());var v=(e,t)=>{let a=e.__vccOpts||e;for(let[n,o]of t)a[n]=o;return a};var x={page:{"":{flex:1}},"flex-r":{"":{flexDirection:"row",flexWrap:"nowrap"}},"flex-c":{"":{flexDirection:"column",flexWrap:"nowrap"}},"flex-fill":{"":{flex:1}},"a-i-c":{"":{alignItems:"center"}},"j-c-c":{"":{justifyContent:"center"}},target:{"":{paddingTop:10,paddingBottom:10}},"text-area":{"":{paddingLeft:10,paddingRight:10,flex:1}},name:{"":{fontSize:16,lines:1,textOverflow:"ellipsis"}},address:{"":{fontSize:14,color:"#808080",lines:1,textOverflow:"ellipsis",marginTop:2}},"goto-area":{"":{width:50,height:50,paddingTop:8,paddingRight:8,paddingBottom:8,paddingLeft:8,backgroundColor:"#007aff",borderRadius:50,marginRight:10}},"goto-icon":{"":{width:34,height:34}},"goto-text":{"":{fontSize:14,color:"#FFFFFF"}}},z={mixins:[h,d],data(){return{bottom:"0px",longitude:"",latitude:"",markers:[],name:"",address:"",localizationTemplate:{en:{"map.title.amap":"AutoNavi Maps","map.title.baidu":"Baidu Maps","map.title.tencent":"Tencent Maps","map.title.apple":"Apple Maps","map.title.google":"Google Maps","location.title":"My Location","select.cancel":"Cancel"},zh:{"map.title.amap":"\u9AD8\u5FB7\u5730\u56FE","map.title.baidu":"\u767E\u5EA6\u5730\u56FE","map.title.tencent":"\u817E\u8BAF\u5730\u56FE","map.title.apple":"\u82F9\u679C\u5730\u56FE","map.title.google":"\u8C37\u6B4C\u5730\u56FE","location.title":"\u6211\u7684\u4F4D\u7F6E","select.cancel":"\u53D6\u6D88"}},android:weex.config.env.platfor