2024-04-11 06:31:44 +00:00
"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 ] ) ;
}
}
2024-04-12 08:30:22 +00:00
var env = "dev" ;
var configs = {
dev : {
apiBaseUrl : "https://warehouse.szjixun.cn/oa_backend" ,
2024-06-18 07:22:58 +00:00
h5Url : "http://192.168.88.37:8080/#/"
2024-04-12 08:30:22 +00:00
} ,
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 ] ;
2024-04-11 06:31:44 +00:00
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 ) => {
2024-04-12 08:30:22 +00:00
formatAppLog ( "log" , "at pages/index/index.nvue:38" , e2 ) ;
2024-04-11 06:31:44 +00:00
}
} ) ;
}
}
} ;
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" } , [
2024-04-12 08:30:22 +00:00
( 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" ] )
2024-04-11 06:31:44 +00:00
] )
] ) ;
} ;
}
} ;
var index = /* @__PURE__ */ _export _sfc ( _sfc _main , [ [ "styles" , [ _style _0 ] ] , [ "__file" , "D:/WebstormProjects/oa-base/pages/index/index.nvue" ] ] ) ;
// <stdin>
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" ) ;
}
} ) ( ) ;