小程序编译中报错 卡在这个地方了
Identifier 'h' has already been declared
at js_sdk/AnalysysAgent-UNI-SDK/AnalysysAgent_UNI_SDK/sdk/AnalysysAgent_WX_SDK.es6.min.js:1:11802
1: var e={base:{outer:["appid","xwho","xwhat","xwhen","xcontext"],xcontext:["$lib","$lib_version","$platform","$debug","$is_login"]},$startup:{xcontext:["$brand","$model","$os","$os_version","$browser","$browser_version","$network","$screen_width","$screen_height","$utm_campaign_id","$utm_campaign","$utm_medium","$utm_source","$utm_content","$utm_term","$is_first_day","$time_zone","$language","$session_id","$is_time_calibrated","$is_first_time","$scene"]},$track:{xcontext:["$brand","$model","$os","$os_version","$browser","$browser_version","$network","$screen_width","$screen_height","$utm_campaign_id","$utm_campaign","$utm_medium","$utm_source","$utm_content","$utm_term","$is_first_day","$time_zone","$language","$session_id","$is_time_calibrated"]},$pageview:{xcontext:["$brand","$model","$os","$os_version","$browser","$browser_version","$network","$screen_width","$screen_height","$utm_campaign_id","$utm_campaign","$utm_medium","$utm_source","$utm_content","$utm_term","$is_first_day","$time_zone","$language","$session_id","$is_time_calibrated","$referrer","$scene","$startup_time","$url","$share_id","$share_path","$share_level"]},$alias:{xcontext:["$original_id"]},$getPresetProperties:{xcontext:["$time_zone","$language","$screen_width","$screen_height","$network","$first_visit_time","$brand","$model","$os","$session_id"]},$userClick:{xcontext:["$element_content","$element_id","$element_type","$element_name","$url","$is_first_day","$session_id","$is_time_calibrated","$brand","$model","$os","$os_version","$network","$screen_width","$screen_height"]}},t={base:{appid:"",$debug:0,$lib_version:"4.3.11",$lib:"WeChat",uploadURL:"",auto:!0,autoProfile:!0,encryptType:0,autoShare:!1,$share_level:"",$share_path:"",$share_id:"",appProperty:null,allowTimeCheck:!1,maxDiffTimeInterval:30,logflag:!1,userObj:{},userPageObj:{},autoTrack:!1,pageProperty:null,autoCompleteURL:!0},status:{code:200,FnName:"",key:"",value:"",errorCode:"",successCode:""},system:{system:{},netWork:{},scene:null},isStartUp:!1,FnCatch:[],FnSuperCatch:[],keywords:e.base.xcontext,baseJson:e.base.outer,sendNum:1800};var a=Object.freeze({proto:null,request:function(e){wx.request(e)}}),r=Object.freeze({proto:null,getStoragePromise:function(e){return new Promise((function(t,a){try{var r=wx.getStorageSync(e);t(r||{})}catch(r){wx.getStorage({key:e,success:function(e){t(e.data)},fail:function(e){a(e)}})}})).catch((function(e){}))},setStoragePromise:function(e,t){return new Promise((function(a,r){var n=t;try{wx.setStorageSync(e,n),a(200)}catch(t){wx.setStorage({key:e,data:n,success:function(){a(200)},fail:function(){r(400)}})}})).catch((function(e){}))}});var n=Object.freeze({proto:null,systemPromise:function(){return new Promise((function(e,t){wx.getSystemInfo({success:function(t){e(t)},fail:function(e){t(e)}})})).catch((function(e){}))}});var s=Object.freeze({proto:null,netWorkPromise:function(){return new Promise((function(e,t){wx.getNetworkType({success:function(t){e(t)},fail:function(e){t(e)}})})).catch((function(e){}))}});function o(){return t.system.scene?t.system.scene.toString():""}var u=Object.freeze({proto:null,getScene:o,getPackageName:function(){return""},getPath:function(){var e=getCurrentPages();if(e.length>0){var a=e[e.length-1].route,r=e[e.length-1].options;if(Object.keys(r).length>0&&1==t.base.autoCompleteURL){var n=a+"?";for(var s in r){n+=s+"="+r[s]+"&"}return n=n.substring(0,n.length-1)}return a}},getTitle:function(){return""},getReferer:function(){var e=getCurrentPages();return e.length>1&&e[e.length-2]?e[e.length-2].route:o()}}),i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},c=function(){function e(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,a,r){return a&&e(t.prototype,a),r&&e(t,r),t}}(),l=function(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t<e.length;t++)a[t]=e[t];return a}return Array.from(e)},p=new function e(){var t=this;i(this,e),this.AppObj=wx,this.Fetch=a,this.Storage=r,this.System=n,this.Network=s,this.Router=u,this.setPublicApp=function(e){t.AppObj=e},this.getPublicApp=function(){return t.AppObj}},y=p.Storage.getStoragePromise,m=p.Storage.setStoragePromise,f=new(function(){function e(){i(this,e),this.local={},this.Session={},this.localStatus=!1,this.getStoragePromise=p.Storage.getStoragePromise}return c(e,[{key:"initLocalData",value:function(){var e=this;return y("FZ_STROAGE").then((function(t){if(!e.localStatus){if(e.localStatus=!0,t||(t={}),"string"==typeof t)try{t=JSON.parse(t)}catch(e){t={}}e.local=Object.assign(t,e.local),m("FZ_STROAGE",e.local).then((function(){}),(function(e){})).catch((function(e){}))}}),(function(){e.local={}})).catch((function(e){}))}},{key:"setData",value:function(e,t){this.Session[e]=t}},{key:"getData",value:function(e){return void 0===this.Session[e]?"":this.Session[e]}},{key:"removeData",value:function(e){void 0!==this.Session[e]&&delete this.Session[e]}},{key:"clearData",value:function(){this.Session={}}},{key:"setLocal",value:function(e,t){this.local[e]=t;var a=this.local;m("FZ_STROAGE",a).then((function(){}),(function(e){})).catch((function(e){}))}},{key:"getLocal",value:function(e){return this.local[e]}},{key:"removeLocal",value:function(e){if(void 0!==this.local[e]){delete this.local[e];var t=this.local;m("FZ_STROAGE",t).then((function(){}),(function(){})).catch((function(e){}))}}}]),e}()),g=new(function(){function e(){i(this,e)}return c(e,[{key:"paramType",value:function(e){return Object.prototype.toString.call(e).replace("[object ","").replace("]","")}},{key:"delEmpty",value:function(e){var t=this,a=this.deepClone(e);return"Object"!==this.paramType(a)?{}:(Object.keys(a).forEach((function(e){var r=a[e];"Object"===t.paramType(r)&&(a[e]=t.delEmpty(a[e]),0===Object.keys(a[e]).length&&delete a[e]),""===r&&delete a[e]})),a)}},{key:"deepClone",value:function(e){var t=Object.getPrototypeOf(e);return Object.assign({},Object.create(t),e)}},{key:"mergeMsg",value:function(e,t){Object.assign(t,e)}},{key:"checkObj",value:function(e,t){var a={};if(1===arguments.length&&e.constructor===Array){for(var r=0;r<e.length;r++)a[e[r]]="";return a}return 1===arguments.length&&e.constructor===String?(a[e]=t||"",a):(arguments.length>1&&e.constructor!==Object?a[e]=t:a=e,a)}},{key:"isFristDay",value:function(){var e=new Date,t=e.getFullYear(),a=e.getMonth()+1;a=a<10?"0"+a:a;var r=e.getDate(),n=t+""+a+(r=r<10?"0"+r:r),s=f.getLocal("FRISTDAY");return(!s||n===s)&&(s||f.setLocal("FRISTDAY",n),!0)}},{key:"isFristTime",value:function(){var e=!1!==f.getLocal("FRISTIME");return e&&f.setLocal("FRISTIME",!1),e}},{key:"isEmptyObject",value:function(e){return!(Object.keys(e).length>0)}},{key:"setFristDay",value:function(){if("String"!==this.paramType(f.getLocal("FRISTDAY"))){var e=this.format(new Date,"yyyyMMdd");t.base.allowTimeCheck&&t.base.logflag&&(e=this.format(new Date(+new Date+(f.getLocal("ANSSERVERTIME")?Number(f.getLocal("ANSSERVERTIME")):0)),"yyyyMMdd")),f.setLocal("FRISTDAY",e)}}},{key:"setFristTime",value:function(){"Boolean"!==this.paramType(f.getLocal("FRISTIME"))&&f.setLocal("FRISTIME",!0)}},{key:"delFristDay",value:function(){f.removeLocal("FRISTDAY")}},{key:"delFristTime",value:function(){f.removeLocal("FRISTIME")}},{key:"checkURL",value:function(e){var t=e;return 1==new RegExp(/http(s)?:\/\/([\w-]+.)+[\w-]+(\/[\w- .\/?%&=])?/).test(t)}},{key:"firstVisitTime",value:function(){var e=!1!==f.getLocal("FIRSTVISITTIME");return e&&f.setLocal("FIRSTVISITTIME",!1),e}},{key:"toDeepObj",value:function(e,t,a){var r={};if("String"===this.paramType(e))return r=this.keyValueToObje(e,t);if("Array"===this.paramType(e))return r=this.ArrayToObj(e);if("Object"===this.paramType(e))for(var n in e)r[n]=this.toDeepObj(e[n]);return r}},{key:"ArrayToObj",value:function(e){for(var t={},a=0;a<e.length;a++)t[e[a]]="";return t}},{key:"keyValueToObje",value:function(e,t){var a={};return a[e]=t,a}},{key:"toObj",value:function(e,t,a){var r={};return"String"===this.paramType(e)?r=this.keyValueToObje(e,t):"Array"===this.paramType(e)?r=this.ArrayToObj(e):"Object"===this.paramType(e)?e:r}},{key:"objMerge",value:function(e,t){if("Object"!==this.paramType(e)||"Object"!==this.paramType(t))return e;var a={};for(var r in e)a[r]=e[r];for(var r in t)a[r]&&"Object"===this.paramType(a[r])&&"Object"===this.paramType(t[r])?a[r]=this.objMerge(a[r],t[r]):"Array"===this.paramType(a[r])&&"Array"===this.paramType(t[r])?a[r]=this.arrayMergeUnique(a[r],t[r]):a[r]=t[r];return a}},{key:"arrayUnique",value:function(e){for(var t=[],a={},r=0;r<e.length;r++)a[e[r]]||(a[e[r]]=!0,t.push(e[r]));return t}},{key:"arrayMerge",value:function(e,t){return e.push.apply(e,t),e}},{key:"arrayMergeUnique",value:function(e,t){return e.push.apply(e,t),this.arrayUnique(e)}},{key:"format",value:function(e,t){var a=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60a*1e3+288e5)).getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),"S+":e.getMilliseconds()};for(var n in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),r)new RegExp("("+n+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[n]).length<3?("00"+r[n]).substr(("00"+r[n]).length-3,("00"+r[n]).length):r[n]:("00"+r[n]).substr((""+r[n]).length)));return t}},{key:"objHasKay",value:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},{key:"clientTimeZone",value:function(){var e=(new Date).getTimezoneOffset(),t=parseInt(e/60),a=e%60,r="-";return(t<=0||a<0)&&(r="+",t=-t,a<0&&(a=-a)),1==(t+="").length&&(t="0"+t),1==(a+="").length&&(a="0"+a),r+t+":"+a}},{key:"objInArray",value:function(e){var t=[];return t.push(e),t}},{key:"stringSlice",value:function(e,t){return e.slice(0,t)}}]),e}()),v={common:"{FN}:Property key invalid, nonsupport value: $lib/$lib_version/$platform/$first_visit_time/$debug/$is_login \ncurrent KEY:{KEY}",60001:"{FN}:Property key invalid, support type: String \ncurrent key:{KEY}\ncurrent keyType:{KEYTYPE}",60002:"{FN}:Property value invalid of key[{KEY}], support type: Number \ncurrent value:{VALUE}\ncurrent type: {VALUETYPE}",60003:"{FN}:Property value invalid of key[{KEY}], support type: Boolean \ncurrent value:{VALUE}\ncurrent type: {VALUETYPE}",60004:"{FN}:Property value invalid of key[{KEY}], support type: Array \ncurrent value:{VALUE}\ncurrent type: {VALUETYPE}",60005:"{FN}:The length of the property[{KEY}] value (string[{VALUE}]) needs to be 1-255 !",60006:"Please set appkey first.",60007:"Please set uploadURL first.",60008:"Send message failed.",60009:"{FN}:The length of the property key (string[{KEY}]) needs to be 1-125 !",600010:"{FN}:The length of the property key (string[{KEY}]) needs to be 1-99 !",600011:"{FN}:[{KEY}] does not conform to naming rules!",600012:"{FN}:Property key invalid, nonsupport value: $lib/$lib_version/$platform/$first_visit_time/$debug/$is_login \ncurrent KEY:{KEY}",600013:"{FN}:Property value invalid of key[{KEY}], support type: Array with String as its internal element \ncurrent value:{VALUE}\ncurrent type: {VALUETYPE}",600016:"{FN}:Property value invalid of key[{KEY}], support type: Object \ncurrent value:{VALUE}\ncurrent type: {VALUETYPE}",600017:"{FN}:The length of the property key (string[{KEY}]) needs to be 1-255 !",600018:"{FN}:Property value invalid of key[{KEY}] invalid, support type: String \ncurrent value:{VALUE}\ncurrent type: {VALUETYPE}",600019:"{FN}:The length of the property[{KEY}] value (string[{VALUE}]) needs to be 1-255 !",600020:"DebugMode only can be 0,1,2",600021:"{FN}:Property value invalid of key[{KEY}], support type: Object, Object.keys length needs to be 1-499 \ncurrent length:{VALUE}\n"},h={common:...

奋斗不NG
- 发布:2025-03-02 17:55
- 更新:2025-03-02 17:55
- 阅读:24
0 个回复