1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204 |
- var app = getApp();
- const util = require('@/static/utils/util.js');
- const config = require('@/static/config.js');
- import requestConfig from '@/static/lib/requestConfig';
- import Bus from '@/common/bus';
- export default {
- data(){
- return {
- repeatFlag: false,
- showShareOptions:false,
- projectCode: "",
- isInMakePhone: false,
- jumpTempData: null,
- }
- },
- watch:{
- },
- methods:{
- optionChange(val) {
- this.showShareOptions = val;
- },
- navigateToCityFromNav(e) {
- this.navigateToCity(e);
- },
- swipeItemClk(e) {
- this.navigateFuc(e);
- },
- cityProductComponentClk(e) {
- this.navigateFuc(e);
- },
- cityListComponentClk(e) {
- this.navigateFuc(e);
- },
- navigateToZhuangHu(e){
- let jumplink = e.currentTarget.dataset.jumplink;
-
- let jumpvalue = e.currentTarget.dataset.jumpvalue;
- if(!jumplink||!jumpvalue){
- uni.showToast({
- title:'敬请期待',
- icon:'none',
- duration:1500
- })
- }else{
- uni.navigateTo({
- url:`/onlineHouseHold/pages/chooseRoom/homePage?houseId=${jumpvalue}&activityId=${jumplink}`
- })
- }
- },
-
- navigateToCity(e) {
- uni.navigateTo({
- url: '/subPackage/pages/addressModule/addressModule'
- });
- },
- resetParentScroll() {
- this.scrollTop = this.old.scrollTop;
- this.$nextTick(() => {
- this.scrollTop = 0;
- });
- },
-
- refreshCityProductView() {
- this.scrollTop = this.old.scrollTop;
- this.$nextTick(() => {
- this.scrollTop = 0;
- });
- },
- expandCityProductView(e) {
- let one = app.globalData.systemInfo.windowWidth / 750;
- console.log("expandCityProductView:" + JSON.stringify(e));
- let scrollDistance = e.scrollDistance;
- scrollDistance += this.scrollDistance2;
- if (this.navigateHasPadding) {
- scrollDistance -= app.globalData.navigateStatusContainerHeight;
- }
- console.log("expandCityProductView111:" + scrollDistance);
- if (this.specialPage) {
- scrollDistance -= 69 * one;
- scrollDistance -= 6;
- console.log("expandCityProductView222:" + scrollDistance);
- }
- if(this.houseId){
- let marginTop = e.marginTop.replace('rpx', "") || 0
- scrollDistance -= marginTop * one;
- }
- this.scrollTop = this.old.scrollTop;
- this.$nextTick(() => {
- this.scrollTop = scrollDistance;
- });
- },
- expandCityListView(e) {
- let one = app.globalData.systemInfo.windowWidth / 750;
- console.log("expandCityListView:" + JSON.stringify(e));
- let scrollDistance = e.scrollDistance;
- scrollDistance += this.scrollDistance2;
- if (this.navigateHasPadding) {
- scrollDistance -= app.globalData.navigateStatusContainerHeight;
- }
- console.log("expandCityProductView111:" + scrollDistance);
- if (this.specialPage) {
- scrollDistance -= 69 * one;
- scrollDistance -= 6;
- console.log("expandCityProductView222:" + scrollDistance);
- }
- if(this.houseId){
- let marginTop = e.marginTop.replace('rpx', "") || 0
- scrollDistance -= marginTop * one;
- }
- this.scrollTop = this.old.scrollTop;
- this.$nextTick(() => {
- this.scrollTop = scrollDistance;
- });
- },
- swipeUnitScrollHandle(e) {
- console.log("swipeUnitScrollHandle:" + JSON.stringify(e));
- if (e.detail.event == 0) {
- this.scrollAble = false;
- } else {
- this.scrollAble = true;
- }
- },
-
- afterUserHandle(e) {
- console.warn("afterUserHandle", e);
- var _type = e.detail ? e.detail.type : e.type;
- let isSuc = _type === 'fail' ? false : true;
- let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
- let para = {
- type: 'CLK',
- clkId: 'clk_2cmina_137',
- clkName: "wechatauthorize",
- clkParams: {
- "userInfo": app.globalData.userInfo || '',
- "phone": app.globalData.phone || '',
- "uni.authorize.scope": "uni.getUserInfo",
- "type": _type,
- },
- };
- util.trackRequest(para);
- if (e) {
- this.showInfoModel = false;
- }
- },
- async afterShareOptionHandle(e) {
- if (this.repeatFlag) {
- return;
- }
- this.repeatFlag = true;
- var pages = getCurrentPages();
- var page = pages[pages.length - 1];
- var pageInstance = page ? page.$vm : {};
- var currentRoute = page ? page.route : "";
- console.log("afterShareOptionHandle", currentRoute);
- if (!currentRoute.startsWith('/')) {
- currentRoute = ('/' + currentRoute);
- }
- let path = currentRoute;
- let subtype = "",houseId='',fromProject='',logo='',gpName='',pageId='',fromBrand=false;
-
-
- if(currentRoute.indexOf('/groupIndex')>-1){
- subtype = 'brand';
- houseId = '';
- fromProject = app.globalData.brandShare;
- logo = app.globalData.logo || '';
- gpName = app.globalData.projectName || '';
- fromBrand = true;
- }
- else if(currentRoute.indexOf('/index/index/')>-1){
- subtype = 'project';
- houseId = pageInstance.houseId;
- fromProject = app.globalData.projectShare;
- logo = app.globalData.houseProject.logo || '';
- gpName = app.globalData.houseProject.projectName || '';
- }
- else if(pageInstance.houseId){
- subtype = 'project';
- houseId = pageInstance.houseId;
- fromProject = app.globalData.projectShare;
- logo = app.globalData.houseProject.logo || '';
- gpName = app.globalData.houseProject.projectName || '';
- pageId = pageInstance.pageId || '';
- fromBrand = pageInstance.fromBrand || '';
- }
- else{
- subtype = 'brand';
- houseId = '';
- fromProject = app.globalData.brandShare;
- logo = app.globalData.logo || '';
- gpName = app.globalData.projectName || '';
- pageId = pageInstance.pageId || '';
- fromBrand = pageInstance.fromBrand || '';
- }
- let attrs = {
- shareType: 'qrcode',
- fromProject: fromProject,
- pageId: pageId,
- fromBrand: fromBrand,
-
-
- };
- if(path.indexOf('/activityWorking')>-1){
- attrs.sharerId = pageInstance.currentShareInfo && pageInstance.currentShareInfo.productionOwnerId ? pageInstance.currentShareInfo.productionOwnerId : '';
- attrs.productionId = pageInstance.currentShareInfo && pageInstance.currentShareInfo.productionId ? pageInstance.currentShareInfo.productionId : '';
- attrs.activityPageId = pageInstance.activityPageId;
- attrs.activityId = pageInstance.activityId;
- }
- else if(path.indexOf('/photoActivity')>-1){
- attrs.sharerId = pageInstance.currentShareInfo && pageInstance.currentShareInfo.productionOwnerId ? pageInstance.currentShareInfo.productionOwnerId : '';
- attrs.productionId = pageInstance.currentShareInfo && pageInstance.currentShareInfo.productionId ? pageInstance.currentShareInfo.productionId : '';
- attrs.activityId = pageInstance.activityId;
- if (pageInstance.currentShareInfo && pageInstance.currentShareInfo.productionOwnerId) {
- path = '/activityPackage/pages/photoCenter/photoCenter'
- } else {
- path = '/activityPackage/pages/photoActivity/photoActivity'
- }
- }
- let sign = await app.setShareToken({
- subtype: subtype,
- houseId: houseId,
- attrs: attrs,
- });
- let obj = {
- type: 8,
- path: path,
- shareToken: sign || app.globalData.shareToken,
- houseId: houseId,
- logo: logo,
- gpName: gpName,
- defaultImage: 'https://dm.static.elab-plus.com/miniprogramDemo/projectDemo/demo1.png',
- };
- if(path.indexOf('/activityWarmUp')>-1 || path.indexOf('/activityWorking')>-1
- || path.indexOf('/photoActivity')>-1 || path.indexOf('/photoCenter')>-1){
- obj.isActivity = 1;
- obj.defaultImage = pageInstance.activityDataDetail&&pageInstance.activityDataDetail.poster?pageInstance.activityDataDetail.poster:''
- }
- app.globalData.shareCardData = JSON.stringify(obj);
- uni.navigateTo({
- url: '/pages/shareCard/shareCard?houseId=' + houseId,
- })
- setTimeout(() => {
- this.repeatFlag = false;
- }, 2000)
- },
-
- jumpCheck(e) {
- this.jumpTempData = e;
- app.globalData.authComponentData = {
- componentType:e.currentTarget.dataset.clickid || '',
- componentId:e.currentTarget.dataset.areacpid || '',
- componentJumpType:e.currentTarget.dataset.jumptype
- }
- this.componentId = e.currentTarget.dataset.areacpid || '';
- this.componentType = e.currentTarget.dataset.clickid || '';
- this.diyArea = e.currentTarget.dataset.diyarea || '';
- if (e.currentTarget.dataset.jumptype == 0 && e.currentTarget.dataset.functype != 4) {
- return
- }
- this.afterAuthCheck()
- },
- afterAuthCheck(isSuc) {
- console.log(this.jumpTempData, 'afterAuthCheck即将跳转')
- if (this.jumpTempData) {
- if (this.jumpTempData.currentTarget.dataset.functype == 4) {
- this.goChatList(this.jumpTempData);
- } else if (this.jumpTempData.currentTarget.dataset.jumplink &&
- (this.jumpTempData.currentTarget.dataset.jumplink.indexOf('wxxf.fangzg') > -1 ||
- this.jumpTempData.currentTarget.dataset.jumplink.indexOf('wxxf.niu6666') > -1) && !app.globalData
- .phone) {
- uni.showToast({
- title: '您未授权号码,无法进入',
- icon: 'none',
- duration: 1500,
- });
- } else {
- this.navigateFuc(this.jumpTempData)
- }
- this.jumpTempData = null
- }
- },
-
- async navigateFuc(e) {
- var self = this;
- console.log("navigateFuc", e);
- let currPageRoute = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length -1].route : null;
-
-
-
-
-
-
-
- app.globalData.componentId = e.currentTarget.dataset.areacpid || '';
- app.globalData.componentType = e.currentTarget.dataset.clickid || '';
- app.globalData.diyArea = e.currentTarget.dataset.diyarea || '';
-
- if (e.currentTarget.dataset.jumptype == 1) {
- let link = e.currentTarget.dataset.jumplink;
- if (link && link.startsWith('/')) {
- e.currentTarget.dataset.jumptype = 13;
- }
- }
- if (e.currentTarget.dataset.jumptype == -2 || e.currentTarget.dataset.jumptype == 14) {
- this.navigateConcern(e);
- } else if (e.currentTarget.dataset.jumptype == 0) {
- return false;
- } else if (e.currentTarget.dataset.jumptype == 1) {
- this.navigateWebView(e);
- } else if (e.currentTarget.dataset.jumptype == 2) {
- this.navigateImgSwip(e);
- } else if (e.currentTarget.dataset.jumptype == 3) {
- this.navigateHouseType(e);
- } else if (e.currentTarget.dataset.jumptype == 4) {
- this.navigateMoment(e);
- } else if (e.currentTarget.dataset.jumptype == 5) {
- this.navigateToMiniPage(e);
- } else if (e.currentTarget.dataset.jumptype == 6) {
- if(currPageRoute.indexOf('pages/index/index')>-1){
- uni.showToast({
- title: '敬请期待',
- icon: 'none',
- duration: 1500,
- });
- return false;
- }
- else{
- this.navigateToProjectIndexPage(e);
- }
- } else if (e.currentTarget.dataset.jumptype == 7) {
- this.navigateToWaitToast(e);
- } else if (e.currentTarget.dataset.jumptype == 8) {
- this.navigateToSearch();
- } else if (e.currentTarget.dataset.jumptype == 9) {
- this.navigateToNewsList(e);
- } else if (e.currentTarget.dataset.jumptype == 10) {
- this.navigateToSearchForContation(e);
- } else if (e.currentTarget.dataset.jumptype == 12) {
- this.goNewVideo(e);
- } else if (e.currentTarget.dataset.jumptype == 17) {
- this.navigateToQuanMin(e);
- } else if (e.currentTarget.dataset.jumptype == 14) {
- this.optionChange(true);
- } else if (e.currentTarget.dataset.jumptype == 15) {
- this.goVideoChat(e);
- } else if (e.currentTarget.dataset.jumptype == 16) {
- this.goChatList(e);
- } else if (e.currentTarget.dataset.jumptype == 13) {
- this.goOtherOriginPage(e)
- } else if (e.currentTarget.dataset.jumptype == 18) {
- this.goOtherMini(e);
- } else if (e.currentTarget.dataset.jumptype == 20) {
- this.navigateToZhuangHuShopCar(e);
- } else if (e.currentTarget.dataset.jumptype == 21) {
- this.goMapPage(e);
- } else if (e.currentTarget.dataset.jumptype == 22) {
- this.navigateToSplendActivity(e);
- } else if (e.currentTarget.dataset.jumptype == 23) {
- this.navigateToPreheatActivity(e);
- } else if (e.currentTarget.dataset.jumptype == 31) {
- this.navigateToBuyActivity(e);
- } else if (e.currentTarget.dataset.jumptype == 32) {
- this.navigateToPhotoActivity(e);
- } else if (e.currentTarget.dataset.jumptype == 33) {
- this.navigateToLoan(e);
- } else if (e.currentTarget.dataset.jumptype == 34) {
- this.goVrRoom(e)
- } else if (e.currentTarget.dataset.jumptype == 35) {
- app.goToShareFriend(e,this.houseId?1:0);
- } else if (e.currentTarget.dataset.jumptype == 36) {
- this.goAppointmentPage(e);
- } else if (e.currentTarget.dataset.jumptype == 70) {
- app.navigateToQuestionnaire(e,this.houseId?1:0);
- } else if (e.currentTarget.dataset.jumptype == 37) {
- app.navigateToSearchResult(e);
- } else if (e.currentTarget.dataset.jumptype == 38) {
- this.navigateToZhuangHu(e);
- } else if (e.currentTarget.dataset.jumptype == 39) {
- this.autoRegister(e);
- }
- },
-
- async navigateToQuanMin(e) {
-
- uni.showToast({
- title: '敬请期待',
- icon: 'none',
- duration: 1500,
- });
- return false;
-
-
- let jumplink = e.currentTarget.dataset.jumplink || "extraPackage/pages/panKeBao/record/record";
-
- let jumpvalue = e.currentTarget.dataset.jumpvalue || "extraPackage/pages/panKeBao/shareFriends/shareFriends";
- var pages = getCurrentPages();
- var page = pages[pages.length - 1];
- var pageInstance = page ? page.$vm : {};
- let data = {};
- let requestUrl = "";
- if(pageInstance.houseId){
- data = {
- customerId: (app.globalData.single && app.globalData.single.id) ? app.globalData.single.id : '',
- houseId: pageInstance.houseId,
- mobile: app.globalData.phone,
- };
- requestUrl = "getAuthenticationStatus";
- if (jumplink.indexOf('houseId') == -1) {
- let _next = jumplink.indexOf('?')>-1 ? ('&houseId=' + pageInstance.houseId) : ('?houseId=' + pageInstance.houseId)
- jumplink = jumplink + _next;
- }
- if (jumpvalue.indexOf('houseId') == -1) {
- let _next = jumpvalue.indexOf('?')>-1 ? ('&houseId=' + pageInstance.houseId) : ('?houseId=' + pageInstance.houseId)
- jumpvalue = jumpvalue + _next;
- }
- }
- else{
- data = {
- brandId: config.brandId,
- mobile: app.globalData.phone,
- };
- requestUrl = "getAuthenticationStatusOnBrand";
- }
- const res = await requestConfig(requestUrl, data);
- console.log("checkoutRecordStatus:", res);
- if (res.success && res.single && res.single.verificationStatus == 1) {
- if (!jumpvalue.startsWith('http')) {
- if (!jumpvalue.startsWith('/')) {
- jumpvalue = ('/' + jumpvalue);
- }
- uni.navigateTo({
- url: jumpvalue,
- });
- } else {
- uni.navigateTo({
- url: '/pages/webView/webView?view=' + encodeURIComponent(jumpvalue),
- fail: function(res) {
- console.log(res)
- },
- });
- }
- } else {
- if (!jumplink.startsWith('http')) {
- if (!jumplink.startsWith('/')) {
- jumplink = ('/' + jumplink);
- }
-
- uni.navigateTo({
- url: jumplink,
- });
- } else {
- uni.navigateTo({
- url: '/pages/webView/webView?view=' + encodeURIComponent(jumplink),
- fail: function(res) {
- console.log(res)
- },
- });
- }
- }
- },
-
- navigateConcern(e) {
- let type = e.currentTarget.dataset.jumptype;
- if (type == -1) {} else if (type == -2 || type == 14) {
- this.optionChange(true);
- }
- },
-
- autoRegister(e) {
- app.checkAuthTotal(5, (res) => {
- this.showPhoneModel = res.showPhoneModel
- this.showInfoModel = res.showInfoModel
-
- if (!res.showPhoneModel && !this.showInfoModel) {
- this.autoRegisterHandle();
- }
- else{
- app.globalData.authCallbackList.push(this.autoRegisterHandle);
- }
- })
- },
-
- async autoRegisterHandle() {
-
- if(app.globalData.phone && (app.globalData.isUserInfo || uni.getStorageSync('userInfo'))){
- var userInfo = app.globalData.userInfo ? app.globalData.userInfo : uni.getStorageSync('userInfo');
- let parameter = {
- kolName: (userInfo && userInfo.nickName ? userInfo.nickName : "未知用户"),
- kolSex: '2',
- type: 1,
- kolMobile: app.globalData.phone,
- brandId: config.brandId,
- checkStatus: 0,
- creator: (userInfo && userInfo.nickName ? userInfo.nickName : "未知用户"),
- houseId: (this.houseId || ''),
- status: 1,
- all_income: 0,
- };
- const res = await requestConfig('anchorSave', parameter);
- if (res.success == true) {
- uni.showToast({
- title: '您已成功注册',
- icon: 'none',
- duration: 1500,
- })
- } else {
- uni.showToast({
- title: res.message,
- icon: 'none',
- duration: 1500,
- })
- }
- }
- },
-
- beforeNavigateMakePhone(e) {
- this.jumpTempData = e;
- app.checkAuthTotal(2, (res) => {
- if (res.showPhoneModel) {
- this.isInMakePhone = true;
- this.showPhoneModel = true;
- } else {
- this.navigateMakePhone()
- }
- })
- },
-
- navigateMakePhone() {
- let e = this.jumpTempData;
- let phone = e.currentTarget.dataset.phone;
- this.isInMakePhone = false;
- uni.makePhoneCall({
- phoneNumber: phone
- })
- },
-
- navigateWebView: function(e) {
- console.log(e.currentTarget.dataset);
- const title = e.currentTarget.dataset.title || '';
- const jumpLink = e.currentTarget.dataset.jumplink;
- console.log("title" + title);
- let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
- let houseId = this.houseId || app.globalData.houseId || (currPage?currPage.houseId:'');
- if (jumpLink && jumpLink.length > 0) {
- app.globalData.currDespage = e.currentTarget.dataset.despage || "";
- let type = jumpLink.substring(jumpLink.lastIndexOf('.')).toLocaleLowerCase();
-
- if (type && type == ".mp4") {
- let url = '/pages/bearVideo/bearVideo?source=' + jumpLink + '&title=' + title;
- if (houseId) {
- url += ('&houseId=' + houseId);
- }
- uni.navigateTo({
- url: url,
- fail: function(res) {
-
- console.log(res)
- },
- })
- } else {
- let webviewUrl = '/pages/webView/webView?view=' + encodeURIComponent(jumpLink) + '&title=' + title;
- if (houseId) {
- webviewUrl += ('&houseId=' + houseId);
- } else {
- webviewUrl += ('&brandId=' + config.brandId);
- }
- if (app.checkWebviewLink(jumpLink)) {
- uni.showToast({
- title: '敬请期待',
- icon: 'none',
- duration: 1500,
- })
- } else {
- uni.navigateTo({
- url: webviewUrl,
- fail: function(res) {
- console.log(res)
- },
- })
- }
- }
- app.makeClkTrackRequest(jumpLink)
- }
- },
-
- async handleHouseType(e) {
- let link = e.currentTarget.dataset.jumplink;
- let value = e.currentTarget.dataset.jumpvalue;
- console.log("handleHouseType 跳转户型", e);
- if (value) {
- uni.navigateTo({
- url: '/subPackage/pages/groupHouseTypeDetail/groupHouseTypeDetail?houseId=' + this.houseId +
- '&layoutId=' +
- value,
- });
- } else if (link) {
- const res = await requestConfig('pageListLayoutByBuilding', {
- "houseId": this.houseId,
- buildingId: link
- });
- if (res && res.success && res.pageModel.resultSet) {
- if (res.pageModel.resultSet.length > 0) {
- let houseUrl = '/subPackage/pages/groupHouseType/groupHouseType?houseId=' + this.houseId +
- '&buildingId=' + link;
- if (app.globalData.houseProject.shareControl.houseModule == 2) {
- houseUrl = '/subPackage/pages/groupHouseList/groupHouseList?houseId=' + this.houseId +
- '&buildingId=' + link;
- }
- uni.navigateTo({
- url: houseUrl,
- });
- } else {
- uni.showToast({
- title: '敬请期待',
- icon: 'none',
- duration: 1500,
- })
- }
- } else {
- uni.showToast({
- title: '敬请期待',
- icon: 'none',
- duration: 1500,
- })
- }
- }
- },
-
- navigateHouseType: function(e) {
- app.globalData.pageDesc = this.pvCurPageName ? this.pvCurPageName : (this.navbar ? this.navbar.pageName : '');
- if(this.houseId){
- this.handleHouseType(e);
- }
- else{
- uni.showToast({
- title: '敬请期待',
- })
- }
- },
-
- async navigateMoment(e) {
- console.log('此时此刻', e);
- let _data = {}
- let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
- let houseId = this.houseId || app.globalData.houseId || (currPage?currPage.houseId:'');
- if (houseId) {
- _data.houseId = houseId;
- } else {
- _data.brandId = config.brandId;
- }
- const res = await requestConfig('queryMomentCurrent', _data);
- if (res && res.success && res.single) {
- let url = "";
- if (houseId) {
- url = '/pages/video/video?houseId=' + houseId;
- } else {
- url = '/pages/video/video?brandId=' + config.brandId;
- }
-
- if(this.pageId == 3601 || this.pageId == '3601' || this.pageId == 3591 || this.pageId == '3591'){
- url = url + "&fixBrand=1"
- }
- uni.navigateTo({
- url: url,
- })
- } else {
- uni.showToast({
- title: '敬请期待',
- })
- }
- },
-
- navigateToProjectIndexPage(e) {
- let houseId = e.currentTarget.dataset.jumpvalue;
- if (houseId && houseId.toString().length > 0) {
- uni.navigateTo({
- url: '/pages/index/index?houseId=' + houseId,
- fail: function(res) {
- console.log(res);
- },
- })
- }
- },
-
- navigateToWaitToast(e) {
- uni.showToast({
- title: '敬请期待'
- });
- },
-
- navigateToSearch(type) {
-
- let url = '/subPackage/pages/searchNewModule/searchNewModule';
-
-
-
-
-
-
-
-
-
- uni.navigateTo({
- url: url,
- });
- },
-
- navigateToSearchForContation(e) {
- let url = '/subPackage/pages/searchCondition/searchCondition';
- uni.navigateTo({
- url: url,
- });
- },
-
- navigateToNewsList(e) {
- let _url = "/subPackage/pages/news/newsList/newsList";
- let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
- let houseId = this.houseId || app.globalData.houseId || (currPage?currPage.houseId:'');
- if (houseId) {
- _url = _url + "?houseId=" + houseId;
- }
- uni.navigateTo({
- url: _url
- });
- },
-
- goNewVideo(e) {
- let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
- const jumpLink = e.currentTarget.dataset.jumplink;
- const videoId = e.currentTarget.dataset.jumpvalue || '';
- const title = e.currentTarget.dataset.expand || '';
- let houseId = this.houseId || app.globalData.houseId || (currPage?currPage.houseId:'');
- let url = '/pages/bearVideo/bearVideo?source=' + jumpLink + '&title=' + title + '&videoId=' + videoId;
- if (houseId) {
- url += ('&houseId=' + houseId);
- }
- uni.navigateTo({
- url: url,
- })
- },
-
- goVideoChat(e) {
- if (!e.currentTarget.dataset) {
- uni.showToast({
- title: '敬请期待'
- });
- return
- }
- let url = "/imRoom/pages/multiroom/aide/aide";
- let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
- let houseId = this.houseId || app.globalData.houseId || (currPage?currPage.houseId:'');
- if (houseId) {
- url += '?houseId=' + houseId;
- } else {
-
- url += '?houseId=' + e.currentTarget.dataset.jumpvalue;
- }
- app.checkAuthTotal(2, (checkRes) => {
- this.showPhoneModel = checkRes.showPhoneModel;
- if (!checkRes.showPhoneModel) {
-
-
-
- uni.navigateTo({
- url: url,
- fail: (res) => {
- uni.showToast({
- duration: 1500,
- title: '敬请期待'
- });
- },
- })
- let param = {
- type: 'CLK',
- clkId: 'clk_2cmina_94',
- clkName: 'videoChat-click',
- };
- util.trackRequest(param);
- }
- }, true);
- },
-
- async goVrRoom(e){
- if (!e.currentTarget.dataset) {
- uni.showToast({
- title: '敬请期待'
- });
- return
- }
- app.goVrRoom(Number(e.currentTarget.dataset.jumpvalue),Number(e.currentTarget.dataset.jumplink))
- },
-
- async goChatList(e) {
- let houseId = e.currentTarget.dataset.jumpvalue || this.houseId || app.globalData.houseId;
- if(!houseId){
- uni.showToast({
- title: '敬请期待'
- });
- return false;
- }
- console.log("***goChatList***",houseId)
- if (this.showPhoneModel || this.showInfoModel) {
- return false
- }
-
-
-
- app.checkAuthTotal(2, (checkRes) => {
- this.showPhoneModel = checkRes.showPhoneModel;
- if (!checkRes.showPhoneModel) {
-
-
-
- if (app.handleGoChat(houseId)) {
- console.log("***goChatList-over***")
- }
- }
- }, true);
- },
-
- async getProjectGUIDByHouseId() {
- let requestData = {
- houseId: this.houseId
- };
- const res = await requestConfig('getProjectGUIDByHouseId', requestData);
- if (res && res.success && res.single) {
- this.projectCode = res.single;
- }
- },
- async goOtherMini(e) {
- let jumpLink = e.currentTarget.dataset.jumplink;
- let appid = e.currentTarget.dataset.jumpvalue || '';
- jumpLink = jumpLink.trim();
- let projectCodeIdx = jumpLink.indexOf('?projectCode=');
- if(projectCodeIdx >= 0){
- this.projectCode = jumpLink.substring(projectCodeIdx+13,jumpLink.length);
- jumpLink = jumpLink.substring(0,projectCodeIdx);
- }
- let extraData = {};
-
- if (appid == 'wx38d0e39f4c57c4de' && this.houseId) {
- if (!this.projectCode) {
- await this.getProjectGUIDByHouseId();
- }
- if (!app.globalData.phone) {
-
- this.showPhoneModel = true;
-
- return
- }
- extraData = {
- projectcode: this.projectCode,
- phonenumber: app.globalData.phone,
- consultanttel: '',
- consultantname: '',
- }
- console.log("navigate to Other miniprogram", extraData);
- }
- uni.navigateToMiniProgram({
- appId: appid,
- path: jumpLink,
- extraData: extraData,
- envVersion: 'release',
- fail(err) {
- console.warn("***打开其他小程fail***", err)
- }
- })
- },
-
- async goOtherOriginPage(e) {
- var self = this;
- let link = e.currentTarget.dataset.jumplink;
- if (link.startsWith('/')) {
- link = link.substring(link.indexOf('/') + 1);
- }
- link = link.trim();
- console.log("goOtherOriginPage-link:" + link);
-
- if ((link.indexOf('/scoreCenter') > -1 || link.indexOf('/myCard') > -1 || link.indexOf('/liveRoom') > -1)
- && !app.globalData.phone) {
- this.showPhoneModel = true;
- return
- }
-
-
- if (link.indexOf("/panKeBao") > -1 || link.indexOf("/defineShare/defineShare") > -1
- || link.indexOf("/myCard/myCard") > -1 || link.indexOf('liveRoom') > -1) {
- uni.showToast({
- title: '敬请期待',
- icon: 'none',
- duration: 1500,
- });
- return false;
- }
-
-
-
- if (link.includes('extraPackage/pages/hostProve/hostProve') && app.globalData.phone) {
- let obj = await this.queryAnchorInfo(app.globalData.phone);
- if (obj.status) {
- link = obj.url;
- }
- }
- if(this.houseId){
- if(!link.includes('&houseId=')&&!link.includes('?houseId=')){
- if (link.indexOf('?') == -1) {
- link = link + '?houseId=' + self.houseId;
- } else {
- link = link + '&houseId=' + self.houseId;
- }
- }
- }else{
- if (link.indexOf('?') >= 0) {
- link += '&fromBrand=true';
- } else {
- link += '?fromBrand=true';
- }
- }
- uni.navigateTo({
- url: '/' + link,
- fail: (res) => {
- uni.showToast({
- title: '敬请期待',
- icon: 'none',
- duration: 1500,
- });
- },
- })
- },
-
- navigateToMiniPage(e) {
- var self = this;
- let link = e.currentTarget.dataset.jumplink;
- let pageId = e.currentTarget.dataset.jumpvalue;
- let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
- let houseId = this.houseId || app.globalData.houseId || (currPage?currPage.houseId:'');
- if (link.startsWith('/')) {
- link = link.substring(link.indexOf('/') + 1);
- }
- link = link.trim();
- console.log("navigateToMiniPage-link:" + link);
- if(!link){
- uni.showToast({
- title: '敬请期待'
- });
- return false;
- }
-
- if (link.indexOf("groupIndex1") >= 0 || link.indexOf("groupIndex2") >= 0
- || link.indexOf("groupIndex3") >= 0 || link.indexOf("groupIndex4") >= 0) {
- uni.switchTab({
- url: "/" + link,
- })
- } else {
- let url = '/' + link + '?pageId=' + pageId;
- if (!houseId) {
- url += '&fromBrand=true';
- } else {
- url += ('&houseId=' + houseId);
- }
- uni.navigateTo({
- url: url,
- fail: (res) => {
- uni.showToast({
- title: '敬请期待'
- });
- }
- })
- }
- },
-
- navigateImgSwip(e) {
- var self = this;
- let type = e.currentTarget.dataset.jumpvalue;
- if(!type){
- uni.showToast({
- title: '敬请期待',
- });
- return false;
- }
- let _url = '/subPackage/pages/groupScaleImg/groupScaleImg?type=' + type
- if(this.houseId){
- _url = _url + '&houseId=' + this.houseId;
- }
- else{
- _url = _url + '&brandId=' + config.brandId;
- }
- uni.navigateTo({
- url: _url,
- });
- },
-
- navigateToLoan(e) {
- let path = "/subPackage/pages/calculator/calculatorSwitch/calculatorSwitch";
- if (this.houseId) {
- path += ('?houseId=' + this.houseId);
- }
- uni.navigateTo({
- url: path
- })
- },
-
- navigateToSplendActivity(e) {
-
- if(!e.currentTarget.dataset.jumpvalue){
- uni.showToast({
- title: '敬请期待',
- });
- return false;
- }
- let path = "/activityPackage/pages/activityWorking/activityWorking";
- let value = JSON.parse(e.currentTarget.dataset.jumpvalue);
- let pageId = value.pageId;
- path += '?activityPageId=' + e.currentTarget.dataset.jumplink + '&pageId=' + pageId
- if (this.houseId) {
- path += ('&houseId=' + this.houseId);
- }
- else{
- path += '&fromBrand=true';
- }
- uni.navigateTo({
- url: path
- })
- },
-
- navigateToPreheatActivity(e) {
-
- if(!e.currentTarget.dataset.jumpvalue){
- uni.showToast({
- title: '敬请期待',
- });
- return false;
- }
- let url = '/activityPackage/pages/activityWarmUp/activityWarmUp?pageId=' + e.currentTarget.dataset.jumpvalue;
- if (this.houseId) {
- url += ('&houseId=' + this.houseId);
- }
- else{
- url += '&fromBrand=true';
- }
- uni.navigateTo({
- url: url
- })
- },
-
- navigateToPhotoActivity(e) {
-
- if(!e.currentTarget.dataset.jumpvalue){
- uni.showToast({
- title: '敬请期待',
- });
- return false;
- }
- let path = "/activityPackage/pages/photoActivity/photoActivity?pageId=" + e.currentTarget.dataset.jumpvalue;
- if (this.houseId) {
- path += ('&houseId=' + this.houseId);
- }
- else{
- path += '&fromBrand=true';
- }
- uni.navigateTo({
- url: path
- })
- },
-
- navigateToBuyActivity(e) {
-
- if(!e.currentTarget.dataset.jumplink){
- uni.showToast({
- title: '敬请期待',
- });
- return false;
- }
- let path = "/activityPackage/pages/activityCommonPages/activityCommonPages";
- let houseId = e.currentTarget.dataset.jumpvalue;
- if (houseId) {
- path += ('?pageId=' + e.currentTarget.dataset.jumplink + '&houseId=' + houseId)
- } else {
- path += ('?pageId=' + e.currentTarget.dataset.jumplink + '&fromBrand=true')
- }
- uni.navigateTo({
- url: path
- })
- },
-
- goMapPage(e){
- if(!this.houseId){
- uni.showToast({
- title: '敬请期待',
- icon: 'none',
- duration: 1500,
- })
- return
- }
- let url = config.host + '/index.html#/pages/zongMap/map?houseId=' + this.houseId;
- uni.navigateTo({
- url: '/pages/webView/webView?view=' + encodeURIComponent(url) +
- '&title=地段配套' + '&houseId=' + this.houseId,
- fail: function(res) {
- console.log(res)
- },
- })
- },
-
- goAppointmentPage(e){
- let pageId = e.currentTarget.dataset.jumpvalue;
- let houseId = this.houseId||''
- if(!pageId){
- uni.showToast({
- title: '敬请期待',
- icon: 'none',
- duration: 1500,
- });
- return
- }
- let path = '/activityPackage/pages/appointment/appointment?houseId=' + houseId + '&pageId='+pageId;
- if (!this.houseId) {
- path += '&fromBrand=true'
- }
- uni.navigateTo({
- url: path,
- fail: (res) => {
- uni.showToast({
- title: '敬请期待'
- });
- },
- })
- },
-
- navigateToZhuangHuShopCar(e) {
- uni.navigateTo({
- url: '/onlineHouseHold/pages/roomShoppingCart/roomShoppingCart',
- })
- },
-
- async queryAnchorInfo(mobile) {
- uni.showLoading({
- title: '加载中'
- });
- const res = await requestConfig('anchorInfo', {
- mobile,
- brandId: config.brandId,
- });
- uni.hideLoading();
- if (res.success && res.single && res.single.checkStatus !==2) {
-
- return {
- url: `extraPackage/pages/results/results?type=${res.single.checkStatus}`,
- status: true
- }
- } else {
- return {
- status: false
- };
- }
- },
- }
- }
|