From 05bb8528f097dc21f56a2ab32d87b123e6c1a803 Mon Sep 17 00:00:00 2001 From: ndbs Date: Mon, 23 May 2022 14:11:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E6=9C=BA=E7=AB=AF=E6=A1=8C=E9=9D=A2?= =?UTF-8?q?=E9=9A=90=E8=97=8F=E6=B6=88=E6=81=AF;=E9=80=9A=E8=AE=AF?= =?UTF-8?q?=E5=BD=95=E5=8E=BB=E6=8E=89=E7=82=B9=E5=87=BB=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../www/pages/contacts/contacts.js | 214 +++++++++--------- .../www/scripts/index.js | 14 +- 2 files changed, 114 insertions(+), 114 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/contacts/contacts.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/contacts/contacts.js index 3474acb8c..365ec1237 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/contacts/contacts.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/contacts/contacts.js @@ -1,4 +1,4 @@ -/*页面js模板,必须有init方法*/ +/*页面js模板,必须有init方法*/ (function () { var companyMap; var departmentMap; @@ -104,112 +104,112 @@ } - // 注册点击事件 - $('#lr_contact_companylist').on('tap', function (e) { - e = e || window.event; - console.log(1213); - var et = e.target || e.srcElement; - var $et = $(et); - if (et.tagName === 'IMG' || et.tagName === 'SPAN') { - $et = $et.parent(); - } - - var $list = $('
'); - var flag = false; - var id = $et.attr('data-value'); - console.log(id); - if ($et.hasClass('company')) { - if ($et.hasClass('bottom')) { - $et.removeClass('bottom'); - $et.parent().find('.lr-user-list').remove(); - } - else { - $list.css({ 'padding-left': '10px' }); - // 加载人员 - $.each(userMap[id] || [], function (_index, _item) { - var _html = '\ -
\ - \ - ' + _item.name + '\ -
'; - - $list.append(_html); - flag = true; - }); - // 加载部门 - $.each(departmentMap[id] || [], function (_index, _item) { - var _html = '\ -
\ - ' + _item.name + '\ -
'; - - $list.append(_html); - flag = true; - }); - // 加载公司 - $.each(companyMap[id] || [], function (_index, _item) { - var _html = '\ -
\ - ' + _item.name + '\ -
'; - - $list.append(_html); - flag = true; - }); - - if (flag) { - $et.parent().append($list); - } - $et.addClass('bottom'); - } - $list = null; - return false; - } - else if ($et.hasClass('department')) { - if ($et.hasClass('bottom')) { - $et.removeClass('bottom'); - $et.parent().find('.lr-user-list').remove(); - } - else { - $list.css({ 'padding-left': '10px' }); - // 加载人员 - $.each(userMap[id] || [], function (_index, _item) { - var _html = '\ -
\ - \ - ' + _item.name + '\ -
'; - - $list.append(_html); - flag = true; - }); - // 加载部门 - $.each(departmentMap[id] || [], function (_index, _item) { - var _html = '\ -
\ - ' + _item.name + '\ -
'; - - $list.append(_html); - flag = true; - }); - - if (flag) { - $et.parent().append($list); - } - $et.addClass('bottom'); - } - $list = null; - return false; - } - else if ($et.hasClass('user')) { - var userName = $et.find('span').text(); - learun.nav.go({ path: 'chat', title: userName, isBack: true, isHead: true, param: { hasHistory: true, userId: id }, type: 'right' }); - $list = null; - return false; - } - - }); + // 注册点击事件 + $('#lr_contact_companylist').on('tap', function (e) { + e = e || window.event; + console.log(1213); + var et = e.target || e.srcElement; + var $et = $(et); + if (et.tagName === 'IMG' || et.tagName === 'SPAN') { + $et = $et.parent(); + } + + var $list = $('
'); + var flag = false; + var id = $et.attr('data-value'); + console.log(id); + if ($et.hasClass('company')) { + if ($et.hasClass('bottom')) { + $et.removeClass('bottom'); + $et.parent().find('.lr-user-list').remove(); + } + else { + $list.css({ 'padding-left': '10px' }); + // 加载人员 + $.each(userMap[id] || [], function (_index, _item) { + var _html = '\ +
\ + \ + ' + _item.name + '\ +
'; + + $list.append(_html); + flag = true; + }); + // 加载部门 + $.each(departmentMap[id] || [], function (_index, _item) { + var _html = '\ +
\ + ' + _item.name + '\ +
'; + + $list.append(_html); + flag = true; + }); + // 加载公司 + $.each(companyMap[id] || [], function (_index, _item) { + var _html = '\ +
\ + ' + _item.name + '\ +
'; + + $list.append(_html); + flag = true; + }); + + if (flag) { + $et.parent().append($list); + } + $et.addClass('bottom'); + } + $list = null; + return false; + } + else if ($et.hasClass('department')) { + if ($et.hasClass('bottom')) { + $et.removeClass('bottom'); + $et.parent().find('.lr-user-list').remove(); + } + else { + $list.css({ 'padding-left': '10px' }); + // 加载人员 + $.each(userMap[id] || [], function (_index, _item) { + var _html = '\ +
\ + \ + ' + _item.name + '\ +
'; + + $list.append(_html); + flag = true; + }); + // 加载部门 + $.each(departmentMap[id] || [], function (_index, _item) { + var _html = '\ +
\ + ' + _item.name + '\ +
'; + + $list.append(_html); + flag = true; + }); + + if (flag) { + $et.parent().append($list); + } + $et.addClass('bottom'); + } + $list = null; + return false; + } + // else if ($et.hasClass('user')) { + // var userName = $et.find('span').text(); + // learun.nav.go({ path: 'chat', title: userName, isBack: true, isHead: true, param: { hasHistory: true, userId: id }, type: 'right' }); + // $list = null; + // return false; + // } + + }); // 点击搜索框 $page.find('.searchBox').on('tap', function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/scripts/index.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/scripts/index.js index b34a06580..cb39c8e42 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/scripts/index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/scripts/index.js @@ -1,4 +1,4 @@ -// 有关“空白”模板的简介,请参阅以下文档: +// 有关“空白”模板的简介,请参阅以下文档: // http://go.microsoft.com/fwlink/?LinkID=397704 // 若要在 cordova-simulate 或 Android 设备/仿真器上在页面加载时调试代码: 启动应用,设置断点, // 然后在 JavaScript 控制台中运行 "window.location.reload()"。 @@ -12,12 +12,12 @@ img: 'images/tab10.png', fillimg: 'images/tab11.png' }, - { - page: 'message', - text: '消息', - img: 'images/tab20.png', - fillimg: 'images/tab21.png' - }, + // { + // page: 'message', + // text: '消息', + // img: 'images/tab20.png', + // fillimg: 'images/tab21.png' + // }, { page: 'contacts', text: '通讯录',