|
|
@@ -30,10 +30,10 @@ define([ 'common/query/chat', 'common/query/enterprise' ], function() {
|
|
|
return;
|
|
|
});
|
|
|
*/
|
|
|
- var promise = Enterprise.getEnterpriseAdminInfo({enuu : enUU}, {}).$promise;
|
|
|
+ var promise = Enterprise.getEnterPriseTelOrAdminTel({enuu : enUU}, {}).$promise;
|
|
|
|
|
|
return promise.then(function (data) {
|
|
|
- return data.userTel;
|
|
|
+ return data.data.entel || data.data.adminTel;
|
|
|
}, function () {
|
|
|
return 0;
|
|
|
});
|
|
|
@@ -139,20 +139,29 @@ define([ 'common/query/chat', 'common/query/enterprise' ], function() {
|
|
|
// //获得窗口的水平位置
|
|
|
// var iLeft = (window.screen.availWidth - 10 - 1030) / 2;
|
|
|
// if (!/^1\d{10}$/.test(phone)){
|
|
|
- if (!phone || !/^1\d{10}$/.test(phone)){
|
|
|
- ChatBusinessLayer.getAdminInfo(enUU).then(function (userTel) {
|
|
|
- phone = userTel;
|
|
|
- /*if (!/^1\d{10}$/.test(phone)){
|
|
|
- toaster.pop('warning', '该店铺暂无管理员电话号码!');
|
|
|
- return;
|
|
|
- }*/
|
|
|
- openChatBox(phone);
|
|
|
- // startChat(phone,enUU,userType,iTop,iLeft);
|
|
|
- });
|
|
|
- }else {
|
|
|
+ // if (!phone){
|
|
|
+ // ChatBusinessLayer.getAdminInfo(enUU).then(function (tel) {
|
|
|
+ // phone = tel;
|
|
|
+ // /*if (!/^1\d{10}$/.test(phone)){
|
|
|
+ // toaster.pop('warning', '该店铺暂无管理员电话号码!');
|
|
|
+ // return;
|
|
|
+ // }*/
|
|
|
+ // openChatBox(phone);
|
|
|
+ // // startChat(phone,enUU,userType,iTop,iLeft);
|
|
|
+ // });
|
|
|
+ // }else {
|
|
|
+ // openChatBox(phone);
|
|
|
+ // // startChat(phone,enUU,userType,iTop,iLeft);
|
|
|
+ // }
|
|
|
+ ChatBusinessLayer.getAdminInfo(enUU).then(function (tel) {
|
|
|
+ phone = tel;
|
|
|
+ /*if (!/^1\d{10}$/.test(phone)){
|
|
|
+ toaster.pop('warning', '该店铺暂无管理员电话号码!');
|
|
|
+ return;
|
|
|
+ }*/
|
|
|
openChatBox(phone);
|
|
|
- // startChat(phone,enUU,userType,iTop,iLeft);
|
|
|
- }
|
|
|
+ // startChat(phone,enUU,userType,iTop,iLeft);
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
$scope.showLinkBox = false;
|