// share/pages/buildprogress/buildprogress.js const app = getApp(); var utils = require("../../../utils/http"); let time = 0; var timer = null, page = 1; var designTimer = null; var vrpage = 1; var videopage = 1; Page({ /** * 页面的初始数据 */ data: { showAction: false, loginFlag: false, mobileflag: false, canIUseGetUserProfile: false, showContent: false, datashow: false, showAddress: false, dialog: false, showInput: false, moreVideoBol: false, moreVrBol: false, cid: '', clientype: '', dscTitle: '', labelId: "", dscDataMsg: {}, scrollTop: 0, detail: {}, companyobj: {}, progresslist: [], labelArr: [], sharepersonMsg: {}, personMsg: app.globalData.personMsg, type: 3, constructnum: 0, imgUrl: app.globalData.imgUrl, imageArr: [], VRlinklist: [], videolink: {}, allDataCount: 1, showVrOrVideo: false, devCaseShow: false, priceflag: false, showArticle: '', activeType: '', showSortNum: 1, showType: 'vr', houseTypeActive: 0, swiperIndex: 0, showVideoNum: 1, currentVideoIndex: 0, tab: [{ name: '实景', type: '', count: 1 }, { name: '效果图', type: 'img', count: 0 }, { name: 'VR', type: 'vr', count: 0 }, { name: '视频', type: 'video', count: 0 }], houseTypeTab: [], houseTypeArr: ['全部', '一居', '二居', '三居', '四居', '五居', '六居', '七居', '八居', '别墅'], houseTypelists: [], houseTypeItemlist: [], devCaselist: [], designPlan: false, isBroker: false, viewMore: 3, devCaseData: [], top: app.globalData.statusBarHeight, hgt: app.globalData.titleBarHeight, employeeflag: false, index: '', showMask: false, fPhone: "", agid: "" }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { page = 1; time = 0; this.setData({ index: options.index ? options.index : '' }) if (!options.type) { wx.hideHomeButton(); } if (wx.getUserProfile) { this.setData({ canIUseGetUserProfile: true }) } if (!!options.scene) { options = unescape(options.scene); let arr = options.split('&'); let obj = {}; for (let i = 0; i < arr.length; i++) { let arr1 = arr[i].split('='); obj[arr1[0]] = arr1[1]; } if (obj.g) { this.setData({ cid: obj.c, clientype: obj.t, isBroker: true, agid: obj.g }) app.globalData.clientype = obj.t; app.globalData.shareuserid = obj.u; app.globalData.brokeruserId = obj.g; } else { this.setData({ cid: obj.c, clientype: obj.t }) app.globalData.clientype = obj.t; app.globalData.shareuserid = obj.u; app.globalData.sharempid = obj.e; } } else { if (!!options.cid) { this.setData({ cid: options.cid }) } if (!!options.ctp) { this.setData({ clientype: options.ctp }) app.globalData.clientype = options.ctp; } if (!!options.uid) { app.globalData.shareuserid = options.uid; } if (!!options.empid) { app.globalData.sharempid = options.empid; } if (!!options.agid) { this.setData({ isBroker: true, agid: options.agid }) app.globalData.brokeruserId = options.agid; } } this.logindata() }, logindata: function () { var that = this; wx.showLoading(); wx.login({ success: function (data) { if (data.errMsg == 'login:ok') { utils.$post({ url: app.globalData.webUrl + 'api/users/code2sessionmini', data: { client_type: that.data.clientype, code: data.code, share: app.globalData.shareuserid, share_agent_id: app.globalData.brokeruserId }, success: function (r) { if (r.data.code == '0') { app.globalData.sharepersonobj = r.data.share; app.globalData.token = r.data.token; that.sharecompany(); if (r.data.share) { app.globalData.vrString = r.data.share.str; } that.setData({ sharepersonMsg: app.globalData.sharepersonobj, }) app.globalData.personMsg = r.data.user; app.globalData.companyname = r.data.company; app.globalData.official_openid = r.data.official_openid; app.globalData.agentEmployeEid = r.data.agent_employee_id; if (!!r.data.user.phone) { app.globalData.use_id = r.data.user.id; app.globalData.personMsg = r.data.user; app.globalData.userflag = false; //有个人信息 var nickname = r.data.user.nickname; var phone = r.data.user.phone; that.setData({ fPhone: phone, loginFlag: false, personMsg: r.data.user, mobileflag: false, employeeflag: (!!r.data.user.binded && r.data.user.binded.state == '在职') ? true : false }) if (!!r.data.user.binded && r.data.user.binded.state == '在职') { app.globalData.currentUserId = r.data.user.binded.id; } that.getBuildingProgressDetail(); } else { that.getBuildingProgressDetail(); that.setData({ loginFlag: false, mobileflag: true }) } } } }) } } }) }, cancelGetPhone() { designTimer = setTimeout(() => { this.setData({ designPlan: true }) }, 4000) }, jumpHousetype(e) { wx.navigateTo({ url: '/share/pages/housetype/housetype?c=' + app.globalData.clientype + "&u=" + app.globalData.shareuserid + "&d=" + e.currentTarget.dataset.cid + "&type=98", }) }, goindextap: function () { if (!this.data.employeeflag) { wx.reLaunch({ url: '/pages/index/index', }) } else { wx.reLaunch({ url: '/pages/consoledesk/consoledesk', }) } }, golastap: function () { wx.navigateBack({ delta: 1, success: function (r) { }, fail: function (r) { wx.reLaunch({ url: '/pages/index/index?state=1', }) }, }) }, sharecompany: function () { const that = this; utils.$post({ url: app.globalData.webUrl + 'client/index/content_belong_company', header: { 'Authorization': 'bearer ' + app.globalData.token }, data: { client_type: app.globalData.clientype, uid: app.globalData.shareuserid }, success: function (res) { if (res.data.code == '0') { let companyInfo = res.data.data; app.globalData.companyobj = res.data.data; app.globalData.currentUserId = companyInfo.employee_id; if (app.globalData.brokeruserId) { app.globalData.sharempid = companyInfo.employee_id; } if (companyInfo.company_name) { if (companyInfo.company_name.length > 6) { companyInfo.company_name = companyInfo.company_name.substring(0, 6); } } that.setData({ companyobj: companyInfo }) } }, complete(res) { wx.hideLoading() } }) }, getImageAndVRAndVideo(type) { var that = this; let dataObj = {}; if (type == 'vr') { dataObj = { id: that.data.cid, type: type, page: vrpage, }; } else { dataObj = { id: that.data.cid, type: type, page: videopage, }; } utils.$post({ url: app.globalData.webUrl + 'client/building/progress', header: { 'Authorization': 'bearer ' + app.globalData.token }, data: dataObj, success: function (res) { if (videopage > 1 || vrpage > 1) { setTimeout(() => { wx.hideLoading(); }, 1000) } if (res.data.code == '0') { if (type == 'vr') { that.getImageAndVRAndVideo('video'); if (dataObj.page == 1) { that.data.VRlinklist = []; } if (res.data.data.length == 0) { that.setData({ moreVrBol: true }) } let vrlist = []; res.data.data.forEach(v => { if (v.vr && v.vr.length > 0) { vrlist.push(...v.vr); } }) that.data.VRlinklist = that.data.VRlinklist.concat(vrlist); that.data.tab[2].count = that.data.VRlinklist.length; that.setData({ VRlinklist: that.data.VRlinklist, tab: that.data.tab }) if (dataObj.page > 1) { that.setData({ allDataCount: that.data.VRlinklist.length }) } } else { that.buildingProgress(); if (dataObj.page == 1) { that.data.videolink = []; } if (res.data.data.length == 0) { that.setData({ moreVideoBol: true }) } let videoArr = res.data.data.map(v => { return { video: v.video, cover: v.img.length ? v.img[0] : '' } }); that.data.videolink = that.data.videolink.concat(videoArr); that.data.tab[3].count = that.data.videolink.length; that.setData({ videolink: that.data.videolink, tab: that.data.tab }) if (dataObj.page > 1) { that.setData({ allDataCount: that.data.videolink.length }) } } } } }) }, closeDesigntap(e) { if (designTimer) { clearTimeout(designTimer); } if (e.detail.type == 'success') { this.setData({ designPlan: false }) } else { this.setData({ designPlan: false }) } }, /** * 排序 */ compare(property) { return function (a, b) { var value1 = a[property]; var value2 = b[property]; return value1 - value2; } }, getBuildingProgresslabel() { const that = this; utils.$post({ url: app.globalData.webUrl + 'client/buildingLabel/index', header: { 'Authorization': 'bearer ' + app.globalData.token }, data: {}, success: function (res) { if (res.data.code == 0) { that.setData({ labelArr: res.data.data }) } } }) }, switchlabelFun(e) { page = 1; this.setData({ labelId: e.currentTarget.dataset.id }) wx.showLoading({ title: '加载中...', }) this.buildingProgress(); }, viewDevCase(e) { let id = e.currentTarget.dataset.id; var that = this; utils.$get({ url: app.globalData.webUrl + 'client/building/dev_case_list', header: { 'Authorization': 'bearer ' + app.globalData.token }, data: { id: id, }, success: function (res) { if (res.data.code == '0') { that.setData({ devCaselist: res.data.data, devCaseShow: true }) } else { wx.showToast({ title: res.data.msg, icon: 'none', duration: 1500 }) } } }) }, devCaseDetail(e) { let id = e.currentTarget.dataset.id; let type = e.currentTarget.dataset.type; if (type == 1) { var that = this; utils.$get({ url: app.globalData.webUrl + 'client/building/dev_case_detail', header: { 'Authorization': 'bearer ' + app.globalData.token }, data: { id: id, }, success: function (res) { if (res.data.code == '0') { let vrlink = res.data.data.vr_link; if (vrlink) { wx.navigateTo({ url: '/pages/other/other?type=vr&vrurl=' + escape(vrlink) + '&uid=' + app.globalData.shareuserid + '&cty=building' + '&ctp=' + app.globalData.clientype + '&aid=' + that.data.detail.id, }) } else { wx.showToast({ title: '未上传VR链接', icon: 'none', duration: 1500 }) } } else { wx.showToast({ title: res.data.msg, icon: 'none', duration: 1500 }) } } }) } else { wx.navigateTo({ url: '/index/pages/viewcase/viewcase?cid=' + id + '&type=2' + '&ctp=' + app.globalData.clientype + '&uid=' + app.globalData.shareuserid, }) } }, /** * 前往个人名片 */ toPageNameCard() { wx.navigateTo({ url: '/share/pages/shareCard/shareCard?uid=' + app.globalData.shareuserid + '&empid=' + app.globalData.currentUserId + '&ctp=' + app.globalData.clientype + '&ftype=share', }) }, jumpNameCard() { wx.navigateTo({ url: '/share/pages/shareCard/shareCard?uid=' + app.globalData.shareuserid + '&ctp=' + app.globalData.clientype + '&empid=' + app.globalData.currentUserId + '&ftype=share' }) }, swiperChange(e) { let currentItemId = e.detail.currentItemId; if (currentItemId.indexOf('img') > -1) { let index = currentItemId.split('-')[1]; let type = currentItemId.split('-')[0]; this.setData({ activeType: type, showSortNum: parseInt(index) + 1, allDataCount: this.data.imageArr.length }) } if (currentItemId.indexOf('vr') > -1) { let index = currentItemId.split('-')[1]; let type = currentItemId.split('-')[0]; this.setData({ activeType: type, showSortNum: parseInt(index) + 1, allDataCount: this.data.VRlinklist.length }) if (!this.data.moreVrBol && (index == (this.data.VRlinklist.length - 1))) { wx.showLoading({ title: '正在加载数据...', }) vrpage = vrpage * 1 + 1; this.getImageAndVRAndVideo('vr'); } } if (currentItemId.indexOf('video') > -1) { let index = currentItemId.split('-')[1]; let type = currentItemId.split('-')[0]; this.setData({ activeType: type, showSortNum: parseInt(index) + 1, allDataCount: this.data.videolink.length }) for (let i = 0; i < this.data.videolink.length; i++) { let videoEle = this.selectComponent(`#videolink${i}`); videoEle.pause(); } if (!this.data.moreVideoBol && (index == (this.data.videolink.length - 1))) { wx.showLoading({ title: '正在加载数据...', }) videopage = videopage * 1 + 1; this.getImageAndVRAndVideo('video'); } } if (currentItemId.indexOf('cover') > -1) { this.setData({ activeType: '', showSortNum: 1, allDataCount: 1 }) } }, closeMask() { this.setData({ showVrOrVideo: false, dialog: false, showInput: false, devCaseShow: false }) }, handleShowInput() { this.data.showInput = !this.data.showInput; this.setData({ showInput: this.data.showInput }) }, handleMore() { if (this.data.viewMore == this.data.progresslist.length) { this.setData({ viewMore: 3 }) } else { this.setData({ viewMore: this.data.progresslist.length }) } }, dothis() { }, callphonetap: function () { if (app.globalData.sharepersonobj.phone) { wx.makePhoneCall({ phoneNumber: app.globalData.sharepersonobj.phone //仅为示例,并非真实的电话号码 }) } else { wx.makePhoneCall({ phoneNumber: app.globalData.personMsg.phone//仅为示例,并非真实的电话号码 }) } }, prelooktap(e) { let type = e.currentTarget.dataset.type; if (!app.globalData.sharepersonobj.qrcode) { let tips = type == 'inquiry' ? '未上传二维码' : '当前专属客服的二维码为空!'; wx.showToast({ title: tips, icon: 'none', duration: 2000 }) return false; } wx.previewImage({ current: app.globalData.imgUrl + app.globalData.sharepersonobj.qrcode, // 当前显示图片的http链接 urls: [app.globalData.imgUrl + app.globalData.sharepersonobj.qrcode]// 需要预览的图片http链接列表 }) }, getBuildingProgressDetail(e) { var that = this; wx.showLoading({ title: '加载中...', }) utils.$post({ url: app.globalData.webUrl + 'client/building/view', header: { 'Authorization': 'bearer ' + app.globalData.token }, data: { id: that.data.cid }, success: function (res) { if (res.data.code == 0) { that.getBuildingProgresslabel(); that.getImageAndVRAndVideo('vr'); let dataMsg = res.data.data; dataMsg.update_time = dataMsg.update_time ? dataMsg.update_time.split(' ')[0] : ''; dataMsg.areastr = dataMsg.area_list.map(v => `${v}㎡`).join('/'); dataMsg.content = dataMsg.content.replace(/\r|\n/ig, ""); let houseTypeArry = []; let devCaselist = []; if (dataMsg.housetype && Object.keys(dataMsg.housetype).length > 0) { Object.keys(dataMsg.housetype).forEach(v => { houseTypeArry.push({ name: that.data.houseTypeArr[v], id: v, count: dataMsg.housetype[v].length, list: dataMsg.housetype[v] }) }) if (houseTypeArry.length) { houseTypeArry[0].list.forEach(v => { if (v.devcase && v.devcase.length) { devCaselist.push(...v.devcase) } }) } } that.data.tab[1].count = dataMsg.cover.length; that.setData({ detail: dataMsg, imageArr: dataMsg.cover, tab: that.data.tab, houseTypelists: houseTypeArry.length ? houseTypeArry.sort(that.compare("id")) : [], houseTypeItemlist: houseTypeArry.length ? houseTypeArry[0].list : [], devCaseData: devCaselist }) if (that.data.detail.name) { wx.setNavigationBarTitle({ title: that.data.detail.name, }) } } else { setTimeout(() => { wx.hideLoading(); }, 1500) } } }) }, houseTypeDsc(e) { let index = e.currentTarget.dataset.index; let title = e.currentTarget.dataset.title; let room = e.currentTarget.dataset.room; this.setData({ dscDataMsg: this.data.houseTypeItemlist[index], dscTitle: room == 9 ? '别墅' : title, dialog: true }) }, hiddenMaskFunc() { this.setData({ showMask: false }) }, getPhoneNumberTap(res) { let type = res.currentTarget.dataset.type; let that = this; if (res.detail.errMsg == 'getPhoneNumber:ok') { utils.$post({ url: app.globalData.webUrl + 'api/users/setUserMobile', data: { encryptedData: res.detail.encryptedData, iv: res.detail.iv }, header: { 'Authorization': 'bearer ' + app.globalData.token }, success: function (r) { if (r.data.code == '0') { that.setData({ fPhone: r.data.mobile, }) if (type == 'broker') { that.setData({ showMask: true }) return false; } // if (type == "update") { // that.urgeUpdateData(); // } else { // that.signUpClient(r.data.mobile); // } } else { wx.showToast({ title: r.data.msg, icon: "none", duration: 2000 }); } } }) } else { this.setData({ showMask: true }) } }, urgeUpdateData() { var that = this; utils.$post({ url: app.globalData.webUrl + 'client/building/urge', header: { 'Authorization': 'bearer ' + app.globalData.token }, data: { employee_id: app.globalData.sharempid, building_id: that.data.cid }, success: function (res) { if (res.data.code == 0) { wx.showToast({ title: '催更成功', icon: 'success', duration: 1500 }) } } }) }, signUpClient(phone) { var that = this; utils.$post({ url: app.globalData.webUrl + 'client/index/signUp', header: { 'Authorization': 'bearer ' + app.globalData.token }, data: { mobile: phone, type: 'building', id: that.data.cid, }, success: function (res) { if (res.data.code == 0) { wx.showToast({ title: '恭喜您报名成功,稍后会有服务顾问跟您联系', icon: 'none', duration: 1500 }) } } }) }, /** * 切换 */ handleSwitch(e) { let type = e.currentTarget.dataset.type; let count = e.currentTarget.dataset.count; let swiperIndex = 0; if (type == 'img') { swiperIndex = 1; } else if (type == 'vr') { swiperIndex = this.data.imageArr.length + 1; } else if (type == 'video') { swiperIndex = this.data.imageArr.length + this.data.VRlinklist.length + 1; } else { swiperIndex = 0; } this.setData({ swiperIndex: swiperIndex, activeType: type, allDataCount: count, showSortNum: 1, }) }, toggleClass(e) { let id = e.currentTarget.dataset.cid; if (id == this.data.showArticle) { this.setData({ showArticle: '' }) } else { this.setData({ showArticle: id }) } }, handleFullPlay(e) { let videoId = e.currentTarget.dataset.id; var videoContext = this.selectComponent(`#${videoId}`); videoContext.requestFullScreen({ direction: 0 }) }, /** * 户型切换 */ handlelist(e) { let type = e.currentTarget.dataset.type; let idx = e.currentTarget.dataset.index; let devCaselist = []; this.data.houseTypelists[idx].list.forEach(v => { if (v.devcase && v.devcase.length) { devCaselist.push(...v.devcase); } }) this.setData({ houseTypeActive: type, houseTypeItemlist: this.data.houseTypelists[idx].list, devCaseData: devCaselist }) }, priceshowtap() { this.setData({ priceflag: true }) }, closepricetap() { this.setData({ priceflag: false }) }, /** * 放大图片 * @param {*} e */ previewImage(e) { let type = e.currentTarget.dataset.type; if (type == 'cover') { let imgUrl = e.currentTarget.dataset.img; if (imgUrl) { wx.previewImage({ current: imgUrl, urls: [imgUrl] }) } else { wx.showToast({ title: '暂无图片展示', icon: 'none', }) } } else if (type == 'image') { let imgUrl = e.currentTarget.dataset.img; wx.previewImage({ current: imgUrl, urls: this.data.imageArr }) } else if (type == 'vr') { this.setData({ showVrOrVideo: true, showType: 'vr' }) } else if (type == 'video') { this.setData({ showVrOrVideo: true, showType: 'video', currentVideoIndex: this.data.showSortNum - 1 < 0 ? 0 : (this.data.showSortNum - 1), showVideoNum: this.data.showSortNum }) } else if (type == 'himg') { let idx = e.currentTarget.dataset.index; let imgUrl = e.currentTarget.dataset.img; wx.previewImage({ current: imgUrl, urls: this.data.houseTypeItemlist[idx].house_img, }) } else { let imgUrl = e.currentTarget.dataset.img; let index = e.currentTarget.dataset.index; var arr = this.data.progresslist[index].img; wx.previewImage({ current: imgUrl, urls: arr, }) } }, openVRLink(e) { let type = e.currentTarget.dataset.type; if (type == 2) { let vrlink = e.currentTarget.dataset.vr; wx.navigateTo({ url: '/pages/other/other?type=vr&vrurl=' + escape(vrlink) + '&uid=' + app.globalData.shareuserid + '&cty=building' + '&ctp=' + app.globalData.clientype + '&aid=' + this.data.detail.id, }) } else { let aid = e.currentTarget.dataset.id; let vrlink = e.currentTarget.dataset.vrlink; wx.navigateTo({ url: '/pages/other/other?type=vr&vrurl=' + escape(vrlink) + '&cty=materialCase' + '&uid=' + app.globalData.shareuserid + '&ctp=' + app.globalData.clientype + '&aid=' + aid, }) } }, showAllContent() { let showContent = !this.data.showContent; this.setData({ showContent: showContent }) }, buildingProgress() { var that = this; utils.$post({ url: app.globalData.webUrl + 'client/building/progress', header: { 'Authorization': 'bearer ' + app.globalData.token }, data: { id: that.data.cid, page: page, label_id: that.data.labelId }, success: function (res) { wx.hideLoading(); if (res.data.code == 0) { let progress = res.data.data; that.setData({ progresslist: progress, datashow: true, }) } } }) }, /** * 展示地址 */ showAddressName(e) { let type = e.currentTarget.dataset.type; if (type == 'hide') { this.setData({ showAddress: false }) } else { this.setData({ showAddress: true }) } }, operateBtn() { this.setData({ showAction: false }) }, sharelogtap: function () { var that = this; utils.$post({ url: app.globalData.webUrl + 'api/share/addlog', header: { 'Authorization': 'bearer ' + app.globalData.token }, data: { id: that.data.cid, type: 'building' }, success: function (r) { } }) }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady() { }, /** * 生命周期函数--监听页面显示 */ onShow() { this.setData({ imgUrl: app.globalData.imgUrl, }) timer = setInterval(function () { time = time * 1 + 1; }, 1000) }, /** * 生命周期函数--监听页面隐藏 */ onHide() { if (timer) { clearInterval(timer) } this.visitimefun(); }, visitimefun() { const that = this; utils.$post({ url: app.globalData.webUrl + 'client/index/visit_due_time', header: { 'Authorization': 'bearer ' + app.globalData.token }, data: { id: that.data.cid, pipe_type: 'building', time: time, }, success: function (res) { } }) }, /** * 生命周期函数--监听页面卸载 */ onUnload() { this.visitimefun(); }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh() { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom() { wx.showLoading({ title: '加载中...', }) page = page * 1 + 1; var that = this; utils.$post({ url: app.globalData.webUrl + 'client/building/progress', header: { 'Authorization': 'bearer ' + app.globalData.token }, data: { id: that.data.cid, page: page }, success: function (res) { setTimeout(() => { wx.hideLoading(); }, 1000); if (res.data.code == 0) { let progress = res.data.data; if (page > 1 && !progress.length) { wx.showToast({ title: '没有更多数据了', icon: "none" }) return; } that.data.progresslist = that.data.progresslist.concat(progress); that.setData({ progresslist: that.data.progresslist, datashow: true, }) } } }) }, /** * 用户点击右上角分享 */ onShareAppMessage(e) { const that = this; let type = e.target ? e.target.dataset.type : ''; let id = e.target ? e.target.dataset.id : ''; if (type == "progress") { return { title: that.data.detail.name + '-楼盘进度', imageUrl: that.data.detail.cover_share_img ? that.data.detail.cover_share_img : that.data.detail.cover[0], path: '/share/pages/buildShare/buildShare?cid=' + id + '&uid=' + app.globalData.personMsg.id + '&ctp=' + app.globalData.clientype + '&empid=' + app.globalData.personMsg.binded.id } } else { if (app.globalData.brokeruserId) { this.sharelogtap(); return { title: this.data.detail.name, imageUrl: that.data.detail.cover_share_img ? that.data.detail.cover_share_img : this.data.detail.cover[0], path: '/share/pages/buildprogress/buildprogress?cid=' + this.data.cid + '&uid=' + app.globalData.shareuserid + '&ctp=' + app.globalData.clientype + '&agid=' + app.globalData.brokeruserId } } else { this.sharelogtap(); return { title: this.data.detail.name, imageUrl: that.data.detail.cover_share_img ? that.data.detail.cover_share_img : this.data.detail.cover[0], path: '/share/pages/buildprogress/buildprogress?cid=' + this.data.cid + '&uid=' + app.globalData.shareuserid + '&ctp=' + app.globalData.clientype + '&empid=' + app.globalData.sharempid } } } } })