manage.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703
  1. //管理js文件 获取modeldata.js 判断是否有特殊的字段,如果有就先加载SpecialScene.js 里面有对特殊场景处理的代码 否则就直接加载main
  2. var Manage = function(){
  3. this.weixinURL = "https://res.wx.qq.com/open/js/jweixin-1.2.0.js",
  4. this.time = "?"+new Date().getTime();
  5. this.loadAudio();
  6. this.loadWeixin();
  7. }
  8. //动态加载js文件
  9. Manage.prototype.LoadJs = function(_files, succes){
  10. /* 已加载文件缓存列表,用于判断文件是否已加载过,若已加载则不再次加载*/
  11. var classcodes = [];
  12. var FileArray = [];
  13. if (typeof _files === "object") {
  14. FileArray = _files;
  15. } else {
  16. /*如果文件列表是字符串,则用,切分成数组*/
  17. if (typeof _files === "string") {
  18. FileArray = _files.split(",");
  19. }
  20. }
  21. if (FileArray != null && FileArray.length > 0) {
  22. var LoadedCount = 0;
  23. for (var i = 0; i < FileArray.length; i++) {
  24. loadFile(FileArray[i], function() {
  25. LoadedCount++;
  26. if (LoadedCount == FileArray.length) {
  27. try {
  28. succes();
  29. }
  30. catch(err) {
  31. console.log("err: 您未定义回调");
  32. }
  33. }
  34. })
  35. }
  36. }
  37. /*加载JS文件,url:文件路径,success:加载成功回调函数*/
  38. function loadFile(url, success) {
  39. if (!FileIsExt(classcodes, url)) {
  40. var _ThisType = GetFileType(url);
  41. var ThisType = _ThisType.indexOf("?") == -1 ? _ThisType : _ThisType.substring(0,_ThisType.indexOf("?"));
  42. var fileObj = null;
  43. if (ThisType == ".js") {
  44. fileObj = document.createElement('script');
  45. fileObj.src = url;
  46. } else if (ThisType == ".css") {
  47. fileObj = document.createElement('link');
  48. fileObj.href = url;
  49. fileObj.type = "text/css";
  50. fileObj.rel = "stylesheet";
  51. } else if (ThisType == ".less") {
  52. fileObj = document.createElement('link');
  53. fileObj.href = url;
  54. fileObj.type = "text/css";
  55. fileObj.rel = "stylesheet/less";
  56. }
  57. success = success || function() {};
  58. fileObj.onload = fileObj.onreadystatechange = function() {
  59. if (!this.readyState || 'loaded' === this.readyState || 'complete' === this.readyState) {
  60. success();
  61. classcodes.push(url)
  62. }
  63. }
  64. document.getElementsByTagName('head')[0].appendChild(fileObj);
  65. } else {
  66. success();
  67. }
  68. }
  69. /*获取文件类型,后缀名,小写*/
  70. function GetFileType(url) {
  71. if (url != null && url.length > 0) {
  72. return url.substr(url.lastIndexOf(".")).toLowerCase();
  73. }
  74. return "";
  75. }
  76. /*文件是否已加载*/
  77. function FileIsExt(FileArray, _url) {
  78. if (FileArray != null && FileArray.length > 0) {
  79. var len = FileArray.length;
  80. for (var i = 0; i < len; i++) {
  81. if (FileArray[i] == _url) {
  82. return true;
  83. }
  84. }
  85. }
  86. return false;
  87. }
  88. };
  89. //获取页面url后面的参数
  90. Manage.prototype.number = function(variable) {
  91. var query = window.location.search.substring(1);
  92. var vars = query.split("&");
  93. for (var i=0;i<vars.length;i++) {
  94. var pair = vars[i].split("=");
  95. if(pair[0] == variable){return pair[1];}
  96. }
  97. return(false);
  98. };
  99. Manage.prototype.loadWeixin = function() {
  100. var that = this;
  101. this.LoadJs(that.weixinURL+that.time,function(){ });
  102. }
  103. Manage.prototype.loadAudio = function() { //相关:g_tourAudio \ g_playAudio
  104. g_bgAudio = new Audio;
  105. g_bgAudio.loop = true;
  106. g_bgAudio.autoplay = true;
  107. g_bgAudio.id = "bgaudio";
  108. //https://www.cnblogs.com/interdrp/p/4211883.html 部分资料
  109. g_bgAudio.load(); // iOS 9 还需要额外的 load 一下, 否则直接 play 无效
  110. var play = function(){
  111. //if(window.tourAudioSta) return;
  112. if(this.bgmShouldPlay){
  113. this.switchBgmState(true)
  114. }
  115. document.removeEventListener("touchstart",play);
  116. document.removeEventListener("click",play);
  117. $('#player')[0].removeEventListener("touchstart", play);
  118. }.bind(this);
  119. g_bgAudio.oncanplay = ()=>{
  120. this.switchBgmState(true)
  121. }
  122. document.addEventListener("WeixinJSBridgeReady", ()=> {
  123. this.switchBgmState(true)
  124. }, false);
  125. document.addEventListener("touchstart", play);//ios需要加个事件才能播放 不能自动播放;如果还有浏览器不行,换成别的交互事件
  126. document.addEventListener("click", play);
  127. $('#player')[0].addEventListener("touchstart", play);
  128. g_bgAudio.addEventListener('ended', ()=>{
  129. this.switchBgmState(true)
  130. });
  131. $("#volume").on("click", ()=> {
  132. if($("#volume img")[0].src.indexOf("music_on.png")>-1)
  133. {
  134. this.switchBgmState(true);
  135. }
  136. else if($("#volume img")[0].src.indexOf("music_off.png")>-1)
  137. {
  138. this.switchBgmState(false);
  139. }
  140. })
  141. }
  142. Manage.prototype.switchBgmState = function(state){
  143. if(!g_bgAudio || !g_bgAudio.src) return;
  144. this.bgmShouldPlay = state
  145. var played = function(){
  146. console.log('begin play bgm');
  147. g_play = 1;
  148. g_playAudio = g_bgAudio;
  149. $("#volume img").attr("src", "./images/music_off.png")
  150. $("#volume").attr("title", "关闭声音");
  151. g_tourAudio && g_tourAudio.pause()
  152. }
  153. var paused = function(){
  154. g_play = 0;
  155. g_playAudio == g_bgAudio && (g_playAudio = null)
  156. $("#volume img").attr("src", "./images/music_on.png")
  157. $("#volume").attr("title", "打开声音");
  158. }
  159. if(state ){
  160. g_bgAudio.play();
  161. if(g_bgAudio.paused){
  162. paused()
  163. }else{
  164. played()
  165. return true
  166. }
  167. }else{
  168. g_bgAudio.pause();
  169. paused()
  170. }
  171. g_bgAudio.pauseByHot = false
  172. g_bgAudio.pauseByTour = false
  173. }
  174. Manage.prototype.weixinShare = function() {
  175. console.log("weixinShare")
  176. $.ajax({
  177. url:'https://www.4dage.com/wechat/jssdk/',
  178. type: "post",
  179. data : {
  180. 'url' : location.href.split('#')[0]
  181. },
  182. dataType:"jsonp",
  183. jsonpCallback:"success_jsonp",
  184. success:function(data,textStatus){
  185. console.log("weixinShare success")
  186. console.log(data.appId)
  187. wx.config({
  188. // debug : true,
  189. appId : data.appId,
  190. timestamp : data.timestamp,
  191. nonceStr : data.nonceStr,
  192. signature : data.signature,
  193. jsApiList : [ 'checkJsApi', 'onMenuShareTimeline',
  194. 'onMenuShareAppMessage', 'onMenuShareQQ',
  195. 'onMenuShareWeibo', 'hideMenuItems',
  196. 'showMenuItems', 'hideAllNonBaseMenuItem',
  197. 'showAllNonBaseMenuItem', 'translateVoice',
  198. 'startRecord', 'stopRecord', 'onRecordEnd',
  199. 'playVoice', 'pauseVoice', 'stopVoice',
  200. 'uploadVoice', 'downloadVoice', 'chooseImage',
  201. 'previewImage', 'uploadImage', 'downloadImage',
  202. 'getNetworkType', 'openLocation', 'getLocation',
  203. 'hideOptionMenu', 'showOptionMenu', 'closeWindow',
  204. 'scanQRCode', 'chooseWXPay',
  205. 'openProductSpecificView', 'addCard', 'chooseCard',
  206. 'openCard' ]
  207. });
  208. },
  209. error:function(XMLHttpRequest,textStatus,errorThrown){
  210. console.log("jsonp.error:"+textStatus);
  211. }
  212. });
  213. var success_jsonp = function(json){
  214. console.log(json);
  215. };
  216. wx.ready(function(){
  217. // config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行〿
  218. //对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中〿
  219. //分享到朋友圈
  220. console.log(g_weixinObj)
  221. wx.onMenuShareTimeline({
  222. title: g_weixinObj.title, // 分享标题
  223. link: g_weixinObj.lineLink, // 分享链接
  224. imgUrl: g_weixinObj.imgUrl, // 分享图标
  225. desc: g_weixinObj.desc
  226. });
  227. //获取“分享给朋友”按钮点击状态及自定义分享内容接叿
  228. wx.onMenuShareAppMessage({
  229. title: g_weixinObj.title, // 分享标题
  230. desc: g_weixinObj.desc, // 分享描述
  231. link: g_weixinObj.lineLink, // 分享链接
  232. imgUrl: g_weixinObj.imgUrl, // 分享图标
  233. type: '', // 分享类型,music、video或link,不填默认为link
  234. dataUrl: '' // 如果type是music或video,则要提供数据链接,默认为空
  235. });
  236. wx.onMenuShareWeibo({
  237. title: g_weixinObj.title, // 分享标题
  238. desc: g_weixinObj.desc, // 分享描述
  239. link: g_weixinObj.lineLink, // 分享链接
  240. imgUrl: g_weixinObj.imgUrl, // 分享图标
  241. success: function () {
  242. // 用户确认分享后执行的回调函数
  243. },
  244. cancel: function () {
  245. // 用户取消分享后执行的回调函数
  246. }
  247. });
  248. wx.onMenuShareQZone({
  249. title: g_weixinObj.title, // 分享标题
  250. desc: g_weixinObj.desc, // 分享描述
  251. link: g_weixinObj.lineLink, // 分享链接
  252. imgUrl: g_weixinObj.imgUrl, // 分享图标
  253. success: function () {
  254. // 用户确认分享后执行的回调函数
  255. },
  256. cancel: function () {
  257. // 用户取消分享后执行的回调函数
  258. }
  259. });
  260. wx.onMenuShareQQ({
  261. title: g_weixinObj.title, // 分享标题
  262. desc: g_weixinObj.desc, // 分享描述
  263. link: g_weixinObj.lineLink, // 分享链接
  264. imgUrl: g_weixinObj.imgUrl, // 分享图标
  265. success: function () {
  266. // 用户确认分享后执行的回调函数
  267. },
  268. cancel: function () {
  269. // 用户取消分享后执行的回调函数
  270. }
  271. });
  272. wx.error(function(res){
  273. // config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名〿
  274. });
  275. });
  276. }
  277. Manage.prototype.dealURL = function(src, type){
  278. //music: "///super.4dage.com/data/LYW/edit/20200928_151633415.mp3"
  279. //"https://super.4dage.com/data/LYW/edit/20200928_165319399.jpg"]
  280. if(window.isLocal && settings.localPrefix!=void 0){//本地将线上的前缀替换
  281. var oldPrefix = 'super.4dage.com/'; //最简单的地址写一个,如果有其他完全不一样的地址就用数组逐个判断
  282. var index = src.indexOf(oldPrefix);
  283. if(index>-1){
  284. var wholeOldPrefix = src.slice(0, index+oldPrefix.length);
  285. return src.replace(wholeOldPrefix, settings.localPrefix)
  286. }
  287. console.error("没有找到合适的本地链接")
  288. return src
  289. }else{
  290. //add https://
  291. var prefix = g_Prefix.replace('https://','').replace('http://','')
  292. if(!src.includes('http:/') && !src.includes('https:/') && src.includes(prefix)){
  293. src = 'https://'+src
  294. }
  295. return src
  296. }
  297. }
  298. Manage.prototype.removeSrcPostMark = function(url){//去除texture.load时自动加上的'?'
  299. var index = url.indexOf('?')
  300. if(index>-1){
  301. return url.slice(0, index)
  302. }else return url
  303. }
  304. Manage.prototype.showInfo = function (o) { // ({result:true, title:"发布成功"});
  305. var box = $(".resultBox");
  306. var title = o.title || o || i18n.get('保存成功');
  307. box.children().eq(0).html(title)
  308. //var time = o.time || THREE.Math.clamp((Config.lang=='en') ? title.length*50 : title.length*130 ,1300,5000);
  309. var time = o.time || THREE.Math.clamp(title.length*130 ,1300, 5000);
  310. o.time || console.log("showtime " + time)
  311. //实际有一半的时间在渐变透明度
  312. this.showInfoTimer && clearTimeout(this.showInfoTimer)
  313. box.removeClass("animate");//如果之后不久又要showinfo一个的话,先停止前面的animate
  314. setTimeout(function () {
  315. box.css(
  316. {
  317. '-webkit-animation-duration': time + 'ms',
  318. 'animation-duration': time + 'ms'
  319. }
  320. )
  321. if(o.top){
  322. box.children().css('top', o.top + "%");
  323. }else{
  324. box.children().css('top', '' )
  325. }
  326. box.removeClass("hide");
  327. box.addClass("animate");
  328. if (o.dontInteract) {//遮挡对屏幕的操作
  329. box.css('pointer-events', 'auto')
  330. } else {
  331. box.css('pointer-events', 'none')
  332. }
  333. this.showInfoTimer = setTimeout(function () {
  334. box.removeClass("animate");
  335. box.addClass("hide");
  336. this.showInfoTimer = null;
  337. }.bind(this), time + 20)
  338. }.bind(this), 50)//这个数字太小的话后面触发的没有重新animate的效果 应该要比帧率大吧
  339. }//like: manage.showInfo({title:'a', top:20})
  340. var manage = new Manage();
  341. //公用的函数
  342. function getQueryVariable(variable)
  343. {
  344. var query = window.location.search.substring(1);
  345. var vars = query.split("&");
  346. for (var i=0;i<vars.length;i++) {
  347. var pair = vars[i].split("=");
  348. if(pair[0] == variable){return pair[1];}
  349. }
  350. return(false);
  351. }
  352. //隐藏公司Logo
  353. function showLogo(){
  354. $("#myCompany").hide();
  355. $("#loaderCoBrandName").hide();
  356. $("#title-logo").hide();
  357. $(".title-container").css("justify-content","center")
  358. }
  359. //czj 添加随机的时间
  360. function randomTime(){
  361. return new Date()
  362. };
  363. function matcher(data){
  364. if(!data || !g_version ) return data;
  365. delete data.model.vision_version;
  366. var _data = {
  367. files: {
  368. "templates": ["images/images{{number}}/{{filename}}"]
  369. },
  370. model :{
  371. sid :window.number,
  372. camera_start:
  373. data.model.images && data.model.images.length != 0 ?
  374. {
  375. camera: {
  376. zoom: "-1",
  377. quaternion: [
  378. JSON.parse(data.model.images[0].metadata).camera_quaternion.z,
  379. JSON.parse(data.model.images[0].metadata).camera_quaternion.w,
  380. JSON.parse(data.model.images[0].metadata).camera_quaternion.x,
  381. JSON.parse(data.model.images[0].metadata).camera_quaternion.y
  382. ]
  383. },
  384. pano: { uuid: JSON.parse(data.model.images[0].metadata).scan_id },
  385. mode: "0"
  386. }
  387. : ''
  388. },
  389. sid: window.number,
  390. hoticon: {
  391. default: "https://super.4dage.com/images/4dagePoint2.png",
  392. higt: "https://super.4dage.com/images/4dagePoint.png"
  393. },
  394. special: "false",
  395. weixinDesc: ""
  396. };
  397. $.extend(true,data,_data)
  398. return data;
  399. }
  400. function hotMatcher(data={}){
  401. //if(!data || !g_version) return data;
  402. if(g_version) {
  403. data.tourAudio = data.audio || {};
  404. }else{
  405. data.tourAudio = {}
  406. }
  407. return data;
  408. }
  409. var GifTexDeal = {
  410. animateObjects : [],
  411. animateTexs : [] ,
  412. addAnimation : function(texture, owner, info, id){
  413. /* if(this.animateObjects.find(e=>
  414. e.texture == texture && !ifSame(info, e.info)
  415. )) */
  416. var animation
  417. var tex = this.animateTexs.find(e=>e.texture == texture)
  418. if(tex){
  419. animation = tex
  420. }else{
  421. animation = {texture,info }
  422. this.animateTexs.push(animation)
  423. this.setRepeart(animation)
  424. }
  425. var object = {
  426. animation, //默认相同的texture对应的info是一样的, 对应一个animation
  427. owner,
  428. }
  429. this.animateObjects.push(object)
  430. return object
  431. },
  432. remove : function(object){
  433. var index = this.animateObjects.indexOf(object)
  434. if(index>-1){
  435. this.animateObjects.splice(index, 1)
  436. if(!this.animateObjects.find(e=>e.animation == object.animation)){
  437. let i = this.animateTexs.indexOf(object.animation)
  438. this.animateTexs.splice(i, 1)
  439. object.animation.texture.repeat.set(1,1)
  440. }
  441. this.stop(object)
  442. }
  443. },
  444. setRepeart : function(animation){
  445. animation.texture.repeat.set(1/animation.info.cellXcount, 1/animation.info.cellYcount)
  446. },
  447. start: function(object){
  448. if(!object || object.started )return;
  449. object.started = true
  450. if(object.animation.started)return;
  451. object.animation.started = true
  452. var info = object.animation.info
  453. var count = info.cellXcount * info.cellYcount - (info.voidCount || 0)
  454. if(count <= 1)return;
  455. transitions.start( (progress)=>{
  456. var index = Math.floor(count * progress);
  457. var indexX = index % info.cellXcount
  458. var indexY = info.cellYcount - Math.floor(index /info.cellXcount ) - 1; //uv.offset.y是从下到上的
  459. object.animation.texture.offset.x = indexX / info.cellXcount;
  460. object.animation.texture.offset.y = indexY / info.cellYcount;
  461. //console.log(object.id + " : "+ object.texture.offset.toArray())
  462. } , info.duration * (-1), null,/* ()=>{//done (-1):循环
  463. object.started = false
  464. object.texture.offset.x = 0;
  465. object.texture.offset.y = 0;
  466. this.start(object)
  467. }, */ 0 ,null, object.id, "gif_"+object.animation.texture.id);
  468. },
  469. stop: function(object){
  470. if(!object || !object.started)return;
  471. object.started = false
  472. //只有该object对应的texture对应的所有object都停止了,才能真的停止动画:
  473. if(this.animateObjects.find(e=>e.animation == object.animation && e.started)) return;
  474. transitions.cancelById("gif_"+object.animation.texture.id);
  475. object.animation.texture.offset.set(0,0)
  476. object.animation.started = false
  477. }
  478. }
  479. var CloneObject = function(copyObj, result, isSimpleCopy, extraReplace) {
  480. //isSimpleCopy只复制最外层
  481. //复制json result的可能:普通数字或字符串、普通数组、复杂对象
  482. if(!copyObj)return copyObj //0 null undefined ''
  483. result = result || {};
  484. if (copyObj instanceof Array) {
  485. /* if (copyObj[0]instanceof Object) {
  486. //不支持含有 [[Object]] 这样二级数组里面还是复杂数据的,普通和复杂的数据混合可能也不支持
  487. console.error("不支持含有 [[Object]] 这样二级数组里面还是复杂数据的...")
  488. }
  489. return copyObj.slice(0);*/ //如果是数组,直接复制返回(排除数组内是object
  490. return copyObj.map(e=>{
  491. if(e instanceof Object){
  492. return CloneObject(e)
  493. }else return e
  494. })
  495. }else{
  496. if(copyObj.clone instanceof Function ){ //解决一部分
  497. return copyObj.clone()
  498. }
  499. }
  500. for (var key in copyObj) {
  501. if (copyObj[key] instanceof Object && !isSimpleCopy)
  502. result[key] = CloneObject(copyObj[key]);
  503. else
  504. result[key] = copyObj[key];
  505. //如果是函数类同基本数据,即复制引用
  506. }
  507. return result;
  508. }
  509. ;
  510. var ifSame = function(object1, object2){
  511. if(object1 == object2 )return true // 0 != undefined , 0 == ''
  512. else if(!object1 || !object2) return false
  513. else if(object1.constructor != object2.constructor){
  514. return false
  515. }else if(object1 instanceof Array ) {
  516. if(object1.length != object2.length)return false;
  517. var _object2 = object2.slice(0);
  518. for(let i=0;i<object1.length;i++){
  519. var u = _object2.find(e=>ifSame(object1[i], e));
  520. if(u == void 0 && !_object2.includes(u) && !object1.includes(u))return false;
  521. else{
  522. let index = _object2.indexOf(u);
  523. _object2.splice(index,1);
  524. }
  525. }
  526. return true
  527. }else if(object1.equals instanceof Function ){//复杂数据仅支持这种,其他的可能卡住?
  528. return object1.equals(object2)
  529. }else if(typeof object1 == 'number' || typeof object1 == 'string'){
  530. if(isNaN(object1) && isNaN(object2))return true
  531. else return object1 == object2
  532. }else if(typeof object1 == "object"){
  533. var keys1 = Object.keys(object1)
  534. var keys2 = Object.keys(object2)
  535. if(!ifSame(keys1,keys2))return false;
  536. for(let i in object1){
  537. var same = ifSame(object1[i], object2[i]);
  538. if(!same)return false
  539. }
  540. return true
  541. }else{
  542. console.log('isSame出现例外')
  543. }
  544. }
  545. var SoundPriority = {//暂不支持同时播放
  546. currentPlay:null,//当前正在播放list中的哪一个
  547. list:[
  548. {
  549. name:"bg",
  550. level : 0,//越大优先级越高
  551. canBeInterrupted : true ,
  552. },
  553. {
  554. name:"boxVideo",
  555. level : 1,
  556. canBeInterrupted : true,
  557. checkIfNeedPlay:function(){
  558. }
  559. },
  560. {
  561. name:"hot",
  562. level : 2,
  563. canBeInterrupted : true
  564. },
  565. {
  566. name:"tour",
  567. level : 3,
  568. canBeInterrupted : true
  569. },
  570. ],
  571. register:function(){
  572. }
  573. }
  574. //兼容一代的場景
  575. //請求地址統一管理
  576. var g_onePregix = "https://bigscene.4dage.com/" //对应一代 http://www.4dmodel.com/SuperPanoramic/index.html?m=55
  577. var g_version = manage.number("version");
  578. g_version === "one" ? g_Prefix = g_onePregix : '';