Przeglądaj źródła

修改im数据获取方式

yangc 7 lat temu
rodzic
commit
f7f8f91ba1

+ 24 - 15
src/main/webapp/resources/js/common/module/chat_web_module.js

@@ -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;

+ 4 - 0
src/main/webapp/resources/js/common/query/enterprise.js

@@ -157,6 +157,10 @@ define([ 'angular', 'ui-bootstrap', 'ngResource' ], function(angular) {
                 url : 'basic/enterprise/:enuu/admin',
                 method : 'GET'
             },
+			getEnterPriseTelOrAdminTel: {
+				url : 'basic/enterprise/:enuu/tels',
+				method : 'GET'
+			},
 			getAllUsersByEnuu : {
 				url : 'basic/user/enterprise/info',
 				method : 'GET'

+ 2 - 2
src/main/webapp/resources/view/usercenter/forstore/order_pay.html

@@ -695,14 +695,14 @@
 						<span>物料编码</span>
 						<span>备注</span>
 					</dt>
-					<div ng-repeat="(key, details) in $$orderDetailsMap">
+					<div ng-repeat="(key, details) in $$orderDetailsMap track by $index">
 						<dd style="height: 50px; line-height: 50px;">
                         <span style="white-space: nowrap; width: 100%; text-align: left; line-height: 50px; position: relative;">
                             &nbsp;&nbsp;<img src="static/img/user/images/shop_home01.png"/>
 							店铺:<a ng-href="store/{{details[0].storeid}}" ng-bind="::key" class="hover-color" target="_blank"></a>
 							<img src="static/img/common/songguo.png" style="margin-left: 110px; margin-right:0; ">
 							<div style="display: inline-block" ng-controller="ChatContactCtrl as chat">
-								<a href="javascript:void(0)" class="contact_btn" title="联系卖家" ng-click="chat.contactWithOther(order.buyerTel, order.buyerenuu, chat.UserType.STORE)">联系卖家</a>
+								<a href="javascript:void(0)" class="contact_btn" title="联系卖家" ng-click="chat.contactWithOther(null, order.orderDetails[$index].supEnUU, chat.UserType.STORE)">联系卖家</a>
 								<div class="com-mall-del-box link-saler-box" ng-if="showLinkBox">
 									<div class="title">
 									  <i ng-click="setShowLinkBox(false)"></i>