From bed3debb59f79253bfa73c049c407d48747fa225 Mon Sep 17 00:00:00 2001 From: Phoenix <64720302+Concur-max@users.noreply.github.com> Date: Tue, 18 Jun 2024 15:59:32 +0800 Subject: [PATCH] 1 --- config/index.js | 2 +- unpackage/dist/dev/.nvue/app.css.js | 3 +- unpackage/dist/dev/.nvue/app.js | 3 - unpackage/dist/dev/.nvue/pages/index/index.js | 102 -------- .../dist/dev/app-plus/__uniappautomator.js | 3 +- .../dist/dev/app-plus/app-config-service.js | 4 +- unpackage/dist/dev/app-plus/app-service.js | 73 ++++++ unpackage/dist/dev/app-plus/manifest.json | 23 +- .../dist/dev/app-plus/pages/index/index.js | 219 ------------------ .../dist/dev/app-plus/uni-app-view.umd.js | 8 +- 10 files changed, 96 insertions(+), 344 deletions(-) delete mode 100644 unpackage/dist/dev/.nvue/pages/index/index.js delete mode 100644 unpackage/dist/dev/app-plus/pages/index/index.js diff --git a/config/index.js b/config/index.js index b236c73..da1ad67 100644 --- a/config/index.js +++ b/config/index.js @@ -10,7 +10,7 @@ const configs = { }, prod: { apiBaseUrl: 'https://oa-a.szjixun.cn/api', - h5Url:'https://oa-a.szjixun.cn/#/' + h5Url:'https://oa.szjixun.cn/#/' }, }; diff --git a/unpackage/dist/dev/.nvue/app.css.js b/unpackage/dist/dev/.nvue/app.css.js index 686161d..c5ba808 100644 --- a/unpackage/dist/dev/.nvue/app.css.js +++ b/unpackage/dist/dev/.nvue/app.css.js @@ -4,7 +4,8 @@ var __commonJS = (cb, mod) => function __require() { }; var require_app_css = __commonJS({ "app.css.js"(exports) { - exports.styles = []; + const _style_0 = {}; + exports.styles = [_style_0]; } }); export default require_app_css(); diff --git a/unpackage/dist/dev/.nvue/app.js b/unpackage/dist/dev/.nvue/app.js index f6c77af..8236d9e 100644 --- a/unpackage/dist/dev/.nvue/app.js +++ b/unpackage/dist/dev/.nvue/app.js @@ -1,5 +1,2 @@ -Promise.resolve("./pages/index/index.js").then((res) => { - res.length; -}); Promise.resolve("./app.css.js").then(() => { }); diff --git a/unpackage/dist/dev/.nvue/pages/index/index.js b/unpackage/dist/dev/.nvue/pages/index/index.js deleted file mode 100644 index 315f7cd..0000000 --- a/unpackage/dist/dev/.nvue/pages/index/index.js +++ /dev/null @@ -1,102 +0,0 @@ -import { ref, openBlock, createElementBlock, createElementVNode, normalizeStyle, unref } from "vue"; -function formatAppLog(type, filename, ...args) { - if (uni.__log__) { - uni.__log__(type, filename, ...args); - } else { - console[type].apply(console, [...args, filename]); - } -} -const env = "dev"; -const configs = { - dev: { - apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend", - h5Url: "http://192.168.88.35:8080/" - }, - test: { - apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend", - h5Url: "http://172.16.100.93:8041/#/" - }, - prod: { - apiBaseUrl: "https://oa.szjixun.cn/api", - h5Url: "https://oa.szjixun.cn/#/" - } -}; -const config = configs[env]; -const sendWebWiew = (refValue, paramValue, callName = "onReceive") => { - if (!refValue) { - formatAppLog("error", "at utils/communicate/index.js:3", "evalJs: The reference to the webview is not provided or is null."); - return; - } - if (typeof refValue.evalJs !== "function") { - formatAppLog("error", "at utils/communicate/index.js:8", "evalJs: The evalJs method is not available on the provided reference."); - return; - } - try { - const jsonString = JSON.stringify(paramValue); - const jsCode = `window.${callName}(${jsonString})`; - refValue.evalJs(jsCode); - } catch (error) { - formatAppLog("error", "at utils/communicate/index.js:18", "evalJs: An error occurred while trying to stringify the parameter value or while invoking evalJs.", error); - } -}; -const receiveWebView = (e) => { - return e.detail.data[0]; -}; -const _style_0 = { "content": { "": { "display": "flex", "flex": 1 } } }; -const _export_sfc = (sfc, props) => { - const target = sfc.__vccOpts || sfc; - for (const [key, val] of props) { - target[key] = val; - } - return target; -}; -const _sfc_main = { - __name: "index", - setup(__props) { - const webViewRef = ref(null); - const systemInfo = uni.getSystemInfoSync(); - const webLoad = (e) => { - const m = receiveWebView(e); - switch (m.action) { - case "load-complete": { - const systemInfo2 = uni.getSystemInfoSync(); - uni.getLocation({ - type: "gcj02", - geocode: false, - isHighAccuracy: false, - success: async (res) => { - sendWebWiew(webViewRef.value, { ...res, systemInfo: systemInfo2 }); - }, - fail: (e2) => { - formatAppLog("log", "at pages/index/index.nvue:38", e2); - } - }); - } - } - }; - return (_ctx, _cache) => { - return openBlock(), createElementBlock("scroll-view", { - scrollY: true, - showScrollbar: true, - enableBackToTop: true, - bubble: "true", - style: { flexDirection: "column" } - }, [ - createElementVNode("div", { class: "content" }, [ - createElementVNode("u-web-view", { - class: "webview", - "on:onPostMessage": webLoad, - style: normalizeStyle({ height: `${unref(systemInfo).windowHeight}px`, width: `${unref(systemInfo).windowWidth}` }), - ref_key: "webViewRef", - ref: webViewRef, - src: unref(config).h5Url - }, null, 44, ["src"]) - ]) - ]); - }; - } -}; -const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["styles", [_style_0]], ["__file", "D:/WebstormProjects/oa-base/pages/index/index.nvue"]]); -export { - index as default -}; diff --git a/unpackage/dist/dev/app-plus/__uniappautomator.js b/unpackage/dist/dev/app-plus/__uniappautomator.js index 81157f7..2471e2e 100644 --- a/unpackage/dist/dev/app-plus/__uniappautomator.js +++ b/unpackage/dist/dev/app-plus/__uniappautomator.js @@ -1,3 +1,4 @@ +var n; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -12,4 +13,4 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ -function __spreadArrays(){for(var s=0,i=0,il=arguments.length;i]*>)(]*>[^<]*<\/span>)(.*?<\/uni-text>)/g,"$1$3").replace(/<\/?[^>]*>/g,(function(replacement){return-1":""===replacement?"":0!==replacement.indexOf("n;n++)r(e,e._deferreds[n]);e._deferreds=null}function c(e,n){var t=!1;try{e((function(e){t||(t=!0,i(n,e))}),(function(e){t||(t=!0,f(n,e))}))}catch(o){if(t)return;t=!0,f(n,o)}}var a=setTimeout;o.prototype.catch=function(e){return this.then(null,e)},o.prototype.then=function(e,n){var o=new this.constructor(t);return r(this,new function(e,n,t){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof n?n:null,this.promise=t}(e,n,o)),o},o.prototype.finally=e,o.all=function(e){return new o((function(t,o){function r(e,n){try{if(n&&("object"==typeof n||"function"==typeof n)){var u=n.then;if("function"==typeof u)return void u.call(n,(function(n){r(e,n)}),o)}i[e]=n,0==--f&&t(i)}catch(c){o(c)}}if(!n(e))return o(new TypeError("Promise.all accepts an array"));var i=Array.prototype.slice.call(e);if(0===i.length)return t([]);for(var f=i.length,u=0;i.length>u;u++)r(u,i[u])}))},o.resolve=function(e){return e&&"object"==typeof e&&e.constructor===o?e:new o((function(n){n(e)}))},o.reject=function(e){return new o((function(n,t){t(e)}))},o.race=function(e){return new o((function(t,r){if(!n(e))return r(new TypeError("Promise.race accepts an array"));for(var i=0,f=e.length;f>i;i++)o.resolve(e[i]).then(t,r)}))},o._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){a(e,0)},o._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var l=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}();"Promise"in l?l.Promise.prototype.finally||(l.Promise.prototype.finally=e):l.Promise=o},"object"==typeof exports&&"undefined"!=typeof module?n():"function"==typeof define&&define.amd?define(n):n();var getRandomValues="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),rnds8=new Uint8Array(16);function rng(){if(!getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}for(var byteToHex=[],i=0;i<256;++i)byteToHex[i]=(i+256).toString(16).substr(1);function v4(options,buf,offset){var i=buf&&offset||0;"string"==typeof options&&(buf="binary"===options?new Array(16):null,options=null);var rnds=(options=options||{}).random||(options.rng||rng)();if(rnds[6]=15&rnds[6]|64,rnds[8]=63&rnds[8]|128,buf)for(var ii=0;ii<16;++ii)buf[i+ii]=rnds[ii];return buf||function(buf,offset){var i=offset||0,bth=byteToHex;return[bth[buf[i++]],bth[buf[i++]],bth[buf[i++]],bth[buf[i++]],"-",bth[buf[i++]],bth[buf[i++]],"-",bth[buf[i++]],bth[buf[i++]],"-",bth[buf[i++]],bth[buf[i++]],"-",bth[buf[i++]],bth[buf[i++]],bth[buf[i++]],bth[buf[i++]],bth[buf[i++]],bth[buf[i++]]].join("")}(rnds)}var hasOwnProperty=Object.prototype.hasOwnProperty,isArray=Array.isArray,PATH_RE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;function getPaths(path,data){if(isArray(path))return path;if(data&&(val=data,key=path,hasOwnProperty.call(val,key)))return[path];var val,key,res=[];return path.replace(PATH_RE,(function(match,p1,offset,string){return res.push(offset?string.replace(/\\(\\)?/g,"$1"):p1||match),string})),res}function getDataByPath(data,path){var dataPath,paths=getPaths(path,data);for(dataPath=paths.shift();null!=dataPath;){if(null==(data=data[dataPath]))return;dataPath=paths.shift()}return data}var elementMap=new Map;function transEl(el){var _a;if(!function(el){if(el){var tagName=el.tagName;return 0===tagName.indexOf("UNI-")||"BODY"===tagName||0===tagName.indexOf("V-UNI-")||el.__isUniElement}return!1}(el))throw Error("no such element");var element,elementId,elem={elementId:(element=el,elementId=element._id,elementId||(elementId=v4(),element._id=elementId,elementMap.set(elementId,{id:elementId,element:element})),elementId),tagName:el.tagName.toLocaleLowerCase().replace("uni-","")};if(el.__vue__)(vm=el.__vue__)&&(vm.$parent&&vm.$parent.$el===el&&(vm=vm.$parent),vm&&!(null===(_a=vm.$options)||void 0===_a?void 0:_a.isReserved)&&(elem.nodeId=function(vm){if(vm._$weex)return vm._uid;if(vm._$id)return vm._$id;if(vm.uid)return vm.uid;var parent_1=function(vm){for(var parent=vm.$parent;parent;){if(parent._$id)return parent;parent=parent.$parent}}(vm);if(!vm.$parent)return"-1";var vnode=vm.$vnode,context=vnode.context;return context&&context!==parent_1&&context._$id?context._$id+";"+parent_1._$id+","+vnode.data.attrs._i:parent_1._$id+","+vnode.data.attrs._i}(vm)));else var vm;return"video"===elem.tagName&&(elem.videoId=elem.nodeId),elem}function getVm(el){return el.__vue__?{isVue3:!1,vm:el.__vue__}:{isVue3:!0,vm:el.__vueParentComponent}}function getScrollViewMain(el){var _a=getVm(el),isVue3=_a.isVue3,vm=_a.vm;return isVue3?vm.exposed.$getMain():vm.$refs.main}var FUNCTIONS={input:{input:function(el,value){var _a=getVm(el),isVue3=_a.isVue3,vm=_a.vm;isVue3?vm.exposed&&vm.exposed.$triggerInput({value:value}):(vm.valueSync=value,vm.$triggerInput({},{value:value}))}},textarea:{input:function(el,value){var _a=getVm(el),isVue3=_a.isVue3,vm=_a.vm;isVue3?vm.exposed&&vm.exposed.$triggerInput({value:value}):(vm.valueSync=value,vm.$triggerInput({},{value:value}))}},"scroll-view":{scrollTo:function(el,x,y){var main=getScrollViewMain(el);main.scrollLeft=x,main.scrollTop=y},scrollTop:function(el){return getScrollViewMain(el).scrollTop},scrollLeft:function(el){return getScrollViewMain(el).scrollLeft},scrollWidth:function(el){return getScrollViewMain(el).scrollWidth},scrollHeight:function(el){return getScrollViewMain(el).scrollHeight}},swiper:{swipeTo:function(el,index){el.__vue__.current=index}},"movable-view":{moveTo:function(el,x,y){el.__vue__._animationTo(x,y)}},switch:{tap:function(el){el.click()}},slider:{slideTo:function(el,value){var vm=el.__vue__,slider=vm.$refs["uni-slider"],offsetWidth=slider.offsetWidth,boxLeft=slider.getBoundingClientRect().left;vm.value=value,vm._onClick({x:(value-vm.min)*offsetWidth/(vm.max-vm.min)+boxLeft})}}};function createTouchList(touchInits){var _a,touches=touchInits.map((function(touch){return function(touch){if(document.createTouch)return document.createTouch(window,touch.target,touch.identifier,touch.pageX,touch.pageY,touch.screenX,touch.screenY);return new Touch(touch)}(touch)}));return document.createTouchList?(_a=document).createTouchList.apply(_a,touches):touches}var WebAdapter={getWindow:function(pageId){return window},getDocument:function(pageId){return document},getEl:function(elementId){var element=elementMap.get(elementId);if(!element)throw Error("element destroyed");return element.element},getOffset:function(node){var rect=node.getBoundingClientRect();return Promise.resolve({left:rect.left+window.pageXOffset,top:rect.top+window.pageYOffset})},querySelector:function(context,selector){return"page"===selector&&(selector="body"),Promise.resolve(transEl(context.querySelector(selector)))},querySelectorAll:function(context,selector){var elements=[],nodeList=document.querySelectorAll(selector);return[].forEach.call(nodeList,(function(node){try{elements.push(transEl(node))}catch(e){}})),Promise.resolve({elements:elements})},queryProperties:function(context,names){return Promise.resolve({properties:names.map((function(name){var value=getDataByPath(context,name.replace(/-([a-z])/g,(function(g){return g[1].toUpperCase()})));return"document.documentElement.scrollTop"===name&&0===value&&(value=getDataByPath(context,"document.body.scrollTop")),value}))})},queryAttributes:function(context,names){return Promise.resolve({attributes:names.map((function(name){return String(context.getAttribute(name))}))})},queryStyles:function(context,names){var style=getComputedStyle(context);return Promise.resolve({styles:names.map((function(name){return style[name]}))})},queryHTML:function(context,type){return Promise.resolve({html:(html="outer"===type?context.outerHTML:context.innerHTML,html.replace(/\n/g,"").replace(/(]*>)(]*>[^<]*<\/span>)(.*?<\/uni-text>)/g,"$1$3").replace(/<\/?[^>]*>/g,(function(replacement){return-1":""===replacement?"":0!==replacement.indexOf("(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute)); - __uniConfig.styles=[{}];//styles + const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"navigationBar":{"titleText":"uni-app","style":"custom","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute)); + __uniConfig.styles=[];//styles __uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}}); __uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}}); service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:16})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:u,window:u,document:u,frames:u,self:u,location:u,navigator:u,localStorage:u,history:u,Caches:u,screen:u,alert:u,confirm:u,prompt:u,fetch:u,XMLHttpRequest:u,WebSocket:u,webkit:u,print:u}}}}); diff --git a/unpackage/dist/dev/app-plus/app-service.js b/unpackage/dist/dev/app-plus/app-service.js index 16b4c3e..b4dd280 100644 --- a/unpackage/dist/dev/app-plus/app-service.js +++ b/unpackage/dist/dev/app-plus/app-service.js @@ -31,6 +31,24 @@ if (uni.restoreGlobal) { } (function(vue) { "use strict"; + const env = "prod"; + const configs = { + dev: { + apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend", + h5Url: "http://192.168.88.37:8080/#/" + }, + test: { + apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend", + h5Url: "http://172.16.100.93:8041/#/" + }, + prod: { + apiBaseUrl: "https://oa-a.szjixun.cn/api", + h5Url: "https://oa.szjixun.cn/#/" + } + }; + const config = configs[env]; + const ON_SHOW = "onShow"; + const ON_HIDE = "onHide"; function formatAppLog(type, filename, ...args) { if (uni.__log__) { uni.__log__(type, filename, ...args); @@ -38,6 +56,11 @@ if (uni.restoreGlobal) { console[type].apply(console, [...args, filename]); } } + const createHook = (lifecycle) => (hook, target = vue.getCurrentInstance()) => { + !vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target); + }; + const onShow = /* @__PURE__ */ createHook(ON_SHOW); + const onHide = /* @__PURE__ */ createHook(ON_HIDE); const _export_sfc = (sfc, props) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props) { @@ -45,6 +68,56 @@ if (uni.restoreGlobal) { } return target; }; + const _sfc_main$1 = { + __name: "index", + setup(__props) { + const networkStatusChange = (res) => { + if (res.isConnected) { + uni.redirectTo({ + url: "/pages/index/index" + }); + } else { + uni.showToast({ + title: "网络无连接", + icon: "none" + }); + } + }; + const webViewObj = vue.ref(null); + onShow(() => { + uni.onNetworkStatusChange(networkStatusChange); + }); + onHide(() => { + uni.offNetworkStatusChange(networkStatusChange); + }); + const webLoad = (e2) => { + var _a, _b; + const h5SendString = (_b = (_a = e2.detail.data) == null ? void 0 : _a[0]) == null ? void 0 : _b.action; + switch (h5SendString) { + case "load-complete": { + const { statusBarHeight } = uni.getSystemInfoSync(); + const currentWebview = getCurrentPages().pop().$getAppWebview(); + webViewObj.value = currentWebview.children()[0]; + webViewObj.value.setStyle({ + top: statusBarHeight, + bottom: 0 + }); + } + } + }; + return (_ctx, _cache) => { + return vue.openBlock(), vue.createElementBlock("web-view", { + class: "webview", + onMessage: webLoad, + style: { "flex": "1" }, + ref: "webViewRef", + src: vue.unref(config).h5Url + }, null, 40, ["src"]); + }; + } + }; + const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "D:/WebstormProjects/oa-base/pages/index/index.vue"]]); + __definePage("pages/index/index", PagesIndexIndex); const _sfc_main = { onLaunch: function() { }, diff --git a/unpackage/dist/dev/app-plus/manifest.json b/unpackage/dist/dev/app-plus/manifest.json index 5bbe35b..1bf47c1 100644 --- a/unpackage/dist/dev/app-plus/manifest.json +++ b/unpackage/dist/dev/app-plus/manifest.json @@ -4,11 +4,11 @@ "iPhone", "iPad" ], - "id": "__UNI__4796942", - "name": "泰丰考勤", + "id": "__UNI__70C49A3", + "name": "oa考勤系统", "version": { - "name": "1.0.0", - "code": 100 + "name": "1.1.5", + "code": 115 }, "description": "", "developer": { @@ -43,14 +43,6 @@ "usingComponents": true, "nvueStyleCompiler": "uni-app", "compilerVersion": 3, - "statusbar": { - "immersed": "supportedDevice", - "style": "dark", - "background": "#000000" - }, - "navigationbar": { - "hidden": true - }, "distribute": { "icons": { "android": { @@ -147,7 +139,6 @@ "UniversalLinks": "" } }, - "push": {}, "audio": { "mp3": { "description": "Android平台录音支持MP3格式文件" @@ -155,7 +146,11 @@ } } }, - "nativePlugins": {}, + "statusbar": { + "immersed": "supportedDevice", + "style": "dark", + "background": "#F8F8F8" + }, "uniStatistics": { "enable": false }, diff --git a/unpackage/dist/dev/app-plus/pages/index/index.js b/unpackage/dist/dev/app-plus/pages/index/index.js deleted file mode 100644 index 1c1a4ac..0000000 --- a/unpackage/dist/dev/app-plus/pages/index/index.js +++ /dev/null @@ -1,219 +0,0 @@ -"use weex:vue"; - -if (typeof Promise !== 'undefined' && !Promise.prototype.finally) { - Promise.prototype.finally = function(callback) { - const promise = this.constructor - return this.then( - value => promise.resolve(callback()).then(() => value), - reason => promise.resolve(callback()).then(() => { - throw reason - }) - ) - } -}; - -if (typeof uni !== 'undefined' && uni && uni.requireGlobal) { - const global = uni.requireGlobal() - ArrayBuffer = global.ArrayBuffer - Int8Array = global.Int8Array - Uint8Array = global.Uint8Array - Uint8ClampedArray = global.Uint8ClampedArray - Int16Array = global.Int16Array - Uint16Array = global.Uint16Array - Int32Array = global.Int32Array - Uint32Array = global.Uint32Array - Float32Array = global.Float32Array - Float64Array = global.Float64Array - BigInt64Array = global.BigInt64Array - BigUint64Array = global.BigUint64Array -}; - - -(() => { - var __create = Object.create; - var __defProp = Object.defineProperty; - var __defProps = Object.defineProperties; - var __getOwnPropDesc = Object.getOwnPropertyDescriptor; - var __getOwnPropDescs = Object.getOwnPropertyDescriptors; - var __getOwnPropNames = Object.getOwnPropertyNames; - var __getOwnPropSymbols = Object.getOwnPropertySymbols; - var __getProtoOf = Object.getPrototypeOf; - var __hasOwnProp = Object.prototype.hasOwnProperty; - var __propIsEnum = Object.prototype.propertyIsEnumerable; - var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; - var __spreadValues = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - if (__getOwnPropSymbols) - for (var prop of __getOwnPropSymbols(b)) { - if (__propIsEnum.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - } - return a; - }; - var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); - var __commonJS = (cb, mod) => function __require() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; - }; - var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; - }; - var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod - )); - var __async = (__this, __arguments, generator) => { - return new Promise((resolve, reject) => { - var fulfilled = (value) => { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - }; - var rejected = (value) => { - try { - step(generator.throw(value)); - } catch (e) { - reject(e); - } - }; - var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); - step((generator = generator.apply(__this, __arguments)).next()); - }); - }; - - // vue-ns:vue - var require_vue = __commonJS({ - "vue-ns:vue"(exports, module) { - module.exports = Vue; - } - }); - - // D:/WebstormProjects/oa-base/unpackage/dist/dev/.nvue/pages/index/index.js - var import_vue = __toESM(require_vue()); - function formatAppLog(type, filename, ...args) { - if (uni.__log__) { - uni.__log__(type, filename, ...args); - } else { - console[type].apply(console, [...args, filename]); - } - } - var env = "dev"; - var configs = { - dev: { - apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend", - h5Url: "http://192.168.88.35:8080/" - }, - test: { - apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend", - h5Url: "http://172.16.100.93:8041/#/" - }, - prod: { - apiBaseUrl: "https://oa.szjixun.cn/api", - h5Url: "https://oa.szjixun.cn/#/" - } - }; - var config = configs[env]; - var sendWebWiew = (refValue, paramValue, callName = "onReceive") => { - if (!refValue) { - formatAppLog("error", "at utils/communicate/index.js:3", "evalJs: The reference to the webview is not provided or is null."); - return; - } - if (typeof refValue.evalJs !== "function") { - formatAppLog("error", "at utils/communicate/index.js:8", "evalJs: The evalJs method is not available on the provided reference."); - return; - } - try { - const jsonString = JSON.stringify(paramValue); - const jsCode = `window.${callName}(${jsonString})`; - refValue.evalJs(jsCode); - } catch (error) { - formatAppLog("error", "at utils/communicate/index.js:18", "evalJs: An error occurred while trying to stringify the parameter value or while invoking evalJs.", error); - } - }; - var receiveWebView = (e) => { - return e.detail.data[0]; - }; - var _style_0 = { "content": { "": { "display": "flex", "flex": 1 } } }; - var _export_sfc = (sfc, props) => { - const target = sfc.__vccOpts || sfc; - for (const [key, val] of props) { - target[key] = val; - } - return target; - }; - var _sfc_main = { - __name: "index", - setup(__props) { - const webViewRef = (0, import_vue.ref)(null); - const systemInfo = uni.getSystemInfoSync(); - const webLoad = (e) => { - const m = receiveWebView(e); - switch (m.action) { - case "load-complete": { - const systemInfo2 = uni.getSystemInfoSync(); - uni.getLocation({ - type: "gcj02", - geocode: false, - isHighAccuracy: false, - success: (res) => __async(this, null, function* () { - sendWebWiew(webViewRef.value, __spreadProps(__spreadValues({}, res), { systemInfo: systemInfo2 })); - }), - fail: (e2) => { - formatAppLog("log", "at pages/index/index.nvue:38", e2); - } - }); - } - } - }; - return (_ctx, _cache) => { - return (0, import_vue.openBlock)(), (0, import_vue.createElementBlock)("scroll-view", { - scrollY: true, - showScrollbar: true, - enableBackToTop: true, - bubble: "true", - style: { flexDirection: "column" } - }, [ - (0, import_vue.createElementVNode)("div", { class: "content" }, [ - (0, import_vue.createElementVNode)("u-web-view", { - class: "webview", - "on:onPostMessage": webLoad, - style: (0, import_vue.normalizeStyle)({ height: `${(0, import_vue.unref)(systemInfo).windowHeight}px`, width: `${(0, import_vue.unref)(systemInfo).windowWidth}` }), - ref_key: "webViewRef", - ref: webViewRef, - src: (0, import_vue.unref)(config).h5Url - }, null, 44, ["src"]) - ]) - ]); - }; - } - }; - var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["styles", [_style_0]], ["__file", "D:/WebstormProjects/oa-base/pages/index/index.nvue"]]); - - // - var webview = plus.webview.currentWebview(); - if (webview) { - const __pageId = parseInt(webview.id); - const __pagePath = "pages/index/index"; - let __pageQuery = {}; - try { - __pageQuery = JSON.parse(webview.__query__); - } catch (e) { - } - index.mpType = "page"; - const app = Vue.createPageApp(index, { $store: getApp({ allowDefault: true }).$store, __pageId, __pagePath, __pageQuery }); - app.provide("__globalStyles", Vue.useCssStyles([...__uniConfig.styles, ...index.styles || []])); - app.mount("#root"); - } -})(); diff --git a/unpackage/dist/dev/app-plus/uni-app-view.umd.js b/unpackage/dist/dev/app-plus/uni-app-view.umd.js index 1309a52..2d71e6e 100644 --- a/unpackage/dist/dev/app-plus/uni-app-view.umd.js +++ b/unpackage/dist/dev/app-plus/uni-app-view.umd.js @@ -1 +1,7 @@ -!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t={exports:{}},n={exports:{}},r={exports:{}},i=r.exports={version:"2.6.12"};"number"==typeof __e&&(__e=i);var a=r.exports,o={exports:{}};o.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),"number"==typeof __g&&(__g=window);var s=o.exports,l=a,u="__core-js_shared__",c=window[u]||(window[u]={});(n.exports=function(e,t){return c[e]||(c[e]=void 0!==t?t:{})})("versions",[]).push({version:l.version,mode:"window",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"});var d=n.exports,h=0,f=Math.random(),p=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++h+f).toString(36))},v=d("wks"),g=p,m=s.Symbol,_="function"==typeof m;(t.exports=function(e){return v[e]||(v[e]=_&&m[e]||(_?m:g)("Symbol."+e))}).store=v;var y,b,w=t.exports,x={},S=function(e){return"object"==typeof e?null!==e:"function"==typeof e},k=S,T=function(e){if(!k(e))throw TypeError(e+" is not an object!");return e},E=function(e){try{return!!e()}catch(t){return!0}},C=!E((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}));function O(){if(b)return y;b=1;var e=S,t=s.document,n=e(t)&&e(t.createElement);return y=function(e){return n?t.createElement(e):{}}}var M=!C&&!E((function(){return 7!=Object.defineProperty(O()("div"),"a",{get:function(){return 7}}).a})),I=S,A=T,L=M,B=function(e,t){if(!I(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!I(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!I(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!I(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},N=Object.defineProperty;x.f=C?Object.defineProperty:function(e,t,n){if(A(e),t=B(t,!0),A(n),L)try{return N(e,t,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e};var R=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},P=x,D=R,z=C?function(e,t,n){return P.f(e,t,D(1,n))}:function(e,t,n){return e[t]=n,e},F=w("unscopables"),$=Array.prototype;null==$[F]&&z($,F,{});var j={},V={}.toString,W=function(e){return V.call(e).slice(8,-1)},U=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},H=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==W(e)?e.split(""):Object(e)},q=U,Y=function(e){return H(q(e))},X={exports:{}},Z={}.hasOwnProperty,G=function(e,t){return Z.call(e,t)},K=d("native-function-to-string",Function.toString),J=z,Q=G,ee=p("src"),te=K,ne="toString",re=(""+te).split(ne);a.inspectSource=function(e){return te.call(e)},(X.exports=function(e,t,n,r){var i="function"==typeof n;i&&(Q(n,"name")||J(n,"name",t)),e[t]!==n&&(i&&(Q(n,ee)||J(n,ee,e[t]?""+e[t]:re.join(String(t)))),e===window?e[t]=n:r?e[t]?e[t]=n:J(e,t,n):(delete e[t],J(e,t,n)))})(Function.prototype,ne,(function(){return"function"==typeof this&&this[ee]||te.call(this)}));var ie=X.exports,ae=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e},oe=ae,se=a,le=z,ue=ie,ce=function(e,t,n){if(oe(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},de=function(e,t,n){var r,i,a,o,s=e&de.F,l=e&de.G,u=e&de.S,c=e&de.P,d=e&de.B,h=l?window:u?window[t]||(window[t]={}):(window[t]||{}).prototype,f=l?se:se[t]||(se[t]={}),p=f.prototype||(f.prototype={});for(r in l&&(n=t),n)a=((i=!s&&h&&void 0!==h[r])?h:n)[r],o=d&&i?ce(a,window):c&&"function"==typeof a?ce(Function.call,a):a,h&&ue(h,r,a,e&de.U),f[r]!=a&&le(f,r,o),c&&p[r]!=a&&(p[r]=a)};window.core=se,de.F=1,de.G=2,de.S=4,de.P=8,de.B=16,de.W=32,de.U=64,de.R=128;var he,fe,pe,ve=de,ge=Math.ceil,me=Math.floor,_e=function(e){return isNaN(e=+e)?0:(e>0?me:ge)(e)},ye=_e,be=Math.min,we=_e,xe=Math.max,Se=Math.min,ke=Y,Te=function(e){return e>0?be(ye(e),9007199254740991):0},Ee=function(e,t){return(e=we(e))<0?xe(e+t,0):Se(e,t)},Ce=d("keys"),Oe=p,Me=function(e){return Ce[e]||(Ce[e]=Oe(e))},Ie=G,Ae=Y,Le=(he=!1,function(e,t,n){var r,i=ke(e),a=Te(i.length),o=Ee(n,a);if(he&&t!=t){for(;a>o;)if((r=i[o++])!=r)return!0}else for(;a>o;o++)if((he||o in i)&&i[o]===t)return he||o||0;return!he&&-1}),Be=Me("IE_PROTO"),Ne="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),Re=function(e,t){var n,r=Ae(e),i=0,a=[];for(n in r)n!=Be&&Ie(r,n)&&a.push(n);for(;t.length>i;)Ie(r,n=t[i++])&&(~Le(a,n)||a.push(n));return a},Pe=Ne,De=Object.keys||function(e){return Re(e,Pe)},ze=x,Fe=T,$e=De,je=C?Object.defineProperties:function(e,t){Fe(e);for(var n,r=$e(t),i=r.length,a=0;i>a;)ze.f(e,n=r[a++],t[n]);return e};var Ve=T,We=je,Ue=Ne,He=Me("IE_PROTO"),qe=function(){},Ye=function(){var e,t=O()("iframe"),n=Ue.length;for(t.style.display="none",function(){if(pe)return fe;pe=1;var e=s.document;return fe=e&&e.documentElement}().appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("