Przeglądaj źródła

联系卖家弹框

yangc 8 lat temu
rodzic
commit
375d350316

+ 1 - 0
src/main/webapp/WEB-INF/views/normal/user_center.html

@@ -23,6 +23,7 @@
 <link rel="stylesheet" type="text/css" href="static/lib/keyboard/css/softkeys-0.0.1.css">
 <link rel="stylesheet" href="static/lib/angular/ng-table.css">
     <link rel="stylesheet" href="static/css/commonComponent.css" />
+	<link rel="stylesheet" href="static/css/common/linkSaler.css" />
 </head>
 <body>
 

+ 1 - 0
src/main/webapp/WEB-INF/views/normal/vendor_center.html

@@ -20,6 +20,7 @@
 <link rel="stylesheet" href="static/lib/angular/ng-table.css">
 <link rel="stylesheet" type="text/css" href="static/lib/keyboard/css/softkeys-0.0.1.css">
 <link rel="stylesheet" href="static/css/commonComponent.css" />
+	<link rel="stylesheet" href="static/css/common/linkSaler.css" />
 </head>
 <body>
 	<!-- 消息提示框  Start-->

+ 1 - 1
src/main/webapp/resources/css/common.css

@@ -966,4 +966,4 @@ input[type="number"]{
 }
 select {
 	-moz-appearance: none;
-}
+}

+ 23 - 11
src/main/webapp/resources/js/common/module/chat_web_module.js

@@ -113,7 +113,7 @@ define([ 'common/query/chat', 'common/query/enterprise' ], function() {
 		this.getAdminInfo = getAdminInfo;
 	}]);
 
-	module.controller('ChatContactCtrl', ['$rootScope', 'ChatBusinessLayer', 'toaster','Enterprise', function ($rootScope, ChatBusinessLayer, toaster, Enterprise) {
+	module.controller('ChatContactCtrl', ['$rootScope', '$scope', 'ChatBusinessLayer', 'toaster','Enterprise', function ($rootScope, $scope, ChatBusinessLayer, toaster, Enterprise) {
 
 		var vm = this;
 		vm.param = {};
@@ -134,26 +134,38 @@ define([ 'common/query/chat', 'common/query/enterprise' ], function() {
 		 * @param userType	联系人用户类型
 		 */
 		function contactWithOther(phone, enUU, userType) {
-			//获得窗口的垂直位置
-			var iTop = (window.screen.availHeight - 30 - 780) / 2;
-			//获得窗口的水平位置
-			var iLeft = (window.screen.availWidth - 10 - 1030) / 2;
-			if (!/^1\d{10}$/.test(phone)){
+			// //获得窗口的垂直位置
+			// var iTop = (window.screen.availHeight - 30 - 780) / 2;
+			// //获得窗口的水平位置
+			// var iLeft = (window.screen.availWidth - 10 - 1030) / 2;
+			// if (!/^1\d{10}$/.test(phone)){
+			if (phone){
 				ChatBusinessLayer.getAdminInfo(enUU).then(function (userTel) {
 					phone = userTel;
 					/*if (!/^1\d{10}$/.test(phone)){
 						toaster.pop('warning', '该店铺暂无管理员电话号码!');
 						return;
 					}*/
-					console.log(phone, enUU, userType,iTop,iLeft);
-					startChat(phone,enUU,userType,iTop,iLeft);
+					openChatBox(phone);
+					// startChat(phone,enUU,userType,iTop,iLeft);
 				});
 			}else {
-                startChat(phone,enUU,userType,iTop,iLeft);
+				openChatBox(phone);
+                // startChat(phone,enUU,userType,iTop,iLeft);
 			}
 		}
 
-		var startChat= function (phone,enUU,userType,iTop,iLeft) {
+		$scope.showLinkBox = false;
+		var openChatBox = function (phone) {
+			$scope.phone = phone;
+			$scope.showLinkBox = true;
+			console.log(phone);
+		}
+		$scope.setShowLinkBox = function (flag) {
+			$scope.showLinkBox = flag;
+		}
+
+		/*var startChat= function (phone,enUU,userType,iTop,iLeft) {
             if ($rootScope.newTab){
                 $rootScope.newTab.close();
             }
@@ -182,7 +194,7 @@ define([ 'common/query/chat', 'common/query/enterprise' ], function() {
                 toaster.pop('warning', '对方没有开通客服系统,请联系官方客服!');
             });
             $rootScope.newTab = newTab;
-        }
+        }*/
 
 	}]);
 

+ 15 - 1
src/main/webapp/resources/view/usercenter/forstore/buyer_order.html

@@ -811,7 +811,21 @@
                         </span>
 						<span style="position: relative; width: 10%;">
                             <img src="static/img/common/songguo.png"/>
-                            <a name="{{order.id}}" href="javascript:void(0)" class="contact_btn" ng-controller="ChatContactCtrl as chat" ng-click="chat.contactWithOther(order.sellPhone, order.sellerenuu, chat.UserType.STORE)">联系卖家</a>
+							<div style="display: inline-block" ng-controller="ChatContactCtrl as chat">
+                            	<a name="{{order.id}}" href="javascript:void(0)" class="contact_btn" ng-click="chat.contactWithOther(order.sellPhone, order.sellerenuu, 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>
+									</div>
+									<div class="content">
+									  <p><i class="fa fa-exclamation-circle"></i>抱歉,暂时无法与卖家在线沟通!</p>
+									  <p>卖家联系电话:<span ng-bind="phone"></span></p>
+									  <div>
+										<a ng-click="setShowLinkBox(false)">我知道了</a>
+									  </div>
+									</div>
+								  </div>
+							</div>
 							<!--<a name="{{order.id}}" href="javascript:void(0)" class="contact_btn" ng-click="contactSeller(order)">联系卖家</a>-->
                              <div name="{{order.id}}" class="seller-contact" ng-if="order.active" ng-class="{true : 'seller-contact-info', false : 'display-none'}[order.active]">
                                  <div class="contact-title">

+ 15 - 1
src/main/webapp/resources/view/usercenter/forstore/order_detail.html

@@ -419,7 +419,21 @@
 								<a ng-href="store/{{order.orderDetails[0].storeid}}" ng-bind="order.storeName" class="hover-color" target="_blank"></a>
 							</i>
 							<img src="static/img/common/songguo.png" style="margin-right:0; ">
-							<a href="javascript:void(0)" class="contact_btn" title="联系卖家" ng-controller="ChatContactCtrl as chat" ng-click="chat.contactWithOther(order.buyerTel, order.buyerenuu, chat.UserType.STORE)">联系卖家</a>
+                            <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>
+								<div class="com-mall-del-box link-saler-box" ng-if="showLinkBox">
+									<div class="title">
+									  <i ng-click="setShowLinkBox(false)"></i>
+									</div>
+									<div class="content">
+									  <p><i class="fa fa-exclamation-circle"></i>抱歉,暂时无法与卖家在线沟通!</p>
+									  <p>卖家联系电话:<span ng-bind="phone"></span></p>
+									  <div>
+										<a ng-click="setShowLinkBox(false)">我知道了</a>
+									  </div>
+									</div>
+								  </div>
+							</div>
 							<!--<a href="javascript:void(0)" class="contact_btn" title="联系卖家" ng-click="contactSeller()">联系卖家</a>-->
 							<div class="contact-box" ng-if="contactBNox">
 								<div class="title"><i class="fa fa-close fa-lg" ng-click="closeBox()"></i></div>

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

@@ -701,7 +701,21 @@
                             &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; ">
-							<a href="javascript:void(0)" class="contact_btn" title="联系卖家" ng-controller="ChatContactCtrl as chat" ng-click="chat.contactWithOther(order.buyerTel, order.buyerenuu, chat.UserType.STORE)">联系卖家</a>
+							<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>
+								<div class="com-mall-del-box link-saler-box" ng-if="showLinkBox">
+									<div class="title">
+									  <i ng-click="setShowLinkBox(false)"></i>
+									</div>
+									<div class="content">
+									  <p><i class="fa fa-exclamation-circle"></i>抱歉,暂时无法与卖家在线沟通!</p>
+									  <p>卖家联系电话:<span ng-bind="phone"></span></p>
+									  <div>
+										<a ng-click="setShowLinkBox(false)">我知道了</a>
+									  </div>
+									</div>
+								  </div>
+							</div>
 							<!--<a class="contact_btn" title="联系卖家" name="{{key}}" ng-click="contactSeller(key)">联系卖家</a>-->
 							<!--<a class="contact_btn" title="联系卖家" ng-click="contactSeller(details[0])">联系卖家</a>-->
 							<div class="contact-box" ng-if="storeContactInfos[key].contactSeller" name="{{key}}">

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

@@ -879,7 +879,21 @@
                                             </div>
                                         </td>
                                         <td width="186" class="operate">
-                                            <a href="javascript:void(0)" ng-controller="ChatContactCtrl as chat" ng-click="chat.contactWithOther('12345', go.enUU, chat.UserType.ENTERPRISE)">联系卖家<img src="static/img/seekPurchase/link-buyer.png" alt=""></a>
+                                            <div style="display: inline-block" ng-controller="ChatContactCtrl as chat">
+                                                <a href="javascript:void(0)" ng-click="chat.contactWithOther('12345', go.enUU, chat.UserType.ENTERPRISE)">联系卖家<img src="static/img/seekPurchase/link-buyer.png" alt=""></a>
+                                                <div class="com-mall-del-box link-saler-box" ng-if="showLinkBox">
+                                                    <div class="title">
+                                                        <i ng-click="setShowLinkBox(false)"></i>
+                                                    </div>
+                                                    <div class="content">
+                                                        <p><i class="fa fa-exclamation-circle"></i>抱歉,暂时无法与卖家在线沟通!</p>
+                                                        <p>卖家联系电话:<span ng-bind="phone"></span></p>
+                                                        <div>
+                                                            <a ng-click="setShowLinkBox(false)">我知道了</a>
+                                                        </div>
+                                                    </div>
+                                                </div>
+                                            </div>
                                             <span ng-click = "purchase(go, $index)">立即购买</span>
                                         </td>
                                     </tr>
@@ -1053,7 +1067,7 @@
         </div>
         <div class="content">
             <p><i class="fa fa-exclamation-circle"></i>抱歉,暂时无法与卖家在线沟通!</p>
-            <p>卖家联系电话:<span ng-bind="currentSeek.qutations[linkBoxIndex].userTel"></span></p>
+            <p>卖家联系电话:<span ng-bind="currentSeek.qutations[linkBoxIndex].userTel || currentSeek.qutations[linkBoxIndex].user.userTel || '-'"></span></p>
             <div>
                 <a ng-click="setLinkBoxIndex(-1)">我知道了</a>
             </div>