浏览代码

Merge remote-tracking branch 'origin/master' into hotfix-hejq-201808

hejq 7 年之前
父节点
当前提交
9e37607ab6

+ 10 - 2
pom.xml

@@ -29,6 +29,7 @@
                 <static-path>static</static-path>
             </properties>
 
+            <!-- 默认 -->
             <activation>
                 <activeByDefault>true</activeByDefault>
             </activation>
@@ -41,8 +42,15 @@
                 <!-- static plugin -->
                 <static-path>static</static-path>
             </properties>
-            <!-- 默认 -->
-
+        </profile>
+        <profile>
+            <!-- 腾讯云环境 -->
+            <id>cloud</id>
+            <properties>
+                <profile>cloud</profile>
+                <!-- static plugin -->
+                <static-path>static</static-path>
+            </properties>
         </profile>
     </profiles>
 

+ 26 - 0
src/main/resources/cloud/account.properties

@@ -0,0 +1,26 @@
+### account center config, 
+account.us.save.url=https://sso.ubtob.com/api/userspace
+account.user.save.url=https://sso.ubtob.com/api/user
+account.user.getPartners.url = https://sso.ubtob.com/api/partners
+account.user.getContactPage.url=https://sso.ubtob.com/business/groups
+
+### sso config
+sso.app=b2b
+# token secretkey
+sso.secretkey=0taQcW073Z7G628g5H
+sso.cookie.domain=ubtob.com
+sso.cookie.secure=false
+sso.cookie.browser=false
+sso.login.url=https://sso.ubtob.com
+
+#cross domain
+sso.ask.url=https://sso.ubtob.com/sso/login/ask
+sso.askout.url=https://sso.ubtob.com/sso/logout/ask
+sso.updatePassword.url=https://sso.ubtob.com/reset/forgetPasswordValidationAccount
+sso.cloudcenter.url=https://sso.ubtob.com/cloudcenter
+mall.login.url=https://www.usoftmall.com/newLogin/other
+sso.proxy.uri=login/proxy
+sso.authcookie.secretkey=Z318866alN6gA0piuO
+sso.client.private_key=MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAIquTH9rOygR1iyMzU1CSQDXG+lJpMQgWkRWMwO3lzS+UJ3GRq1yxxD8mPFZCuItMRxP4Mvu3nvxDvsJx8lfRXk4MGswROIBPcdBAnasphN7wS5mDvDe/VBIKv+fg4j4VEnak9VUAQhS1gDtp+ZmQ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.host=smtp.mxhichina.com
+email.port=25
+email.username=admin@usoftchina.com
+email.password=Youruan888
+email.from=admin@usoftchina.com

+ 32 - 0
src/main/resources/cloud/jdbc.properties

@@ -0,0 +1,32 @@
+#jdbc.driverClassName=oracle.jdbc.driver.OracleDriver
+#jdbc.url=jdbc:oracle:thin:@10.10.100.200:1521:orcl
+#jdbc.username=platform$b2b
+#jdbc.password=select*fromuu
+#jdbc.driverClassName=com.mysql.jdbc.Driver
+#jdbc.url=jdbc:mysql://192.168.253.12:3306/b2b_dev_dongbw?characterEncoding=utf-8&allowMultiQueries=true&rewriteBatchedStatements=true
+#jdbc.username=root
+#jdbc.password=select111***
+jdbc.initialSize=5
+jdbc.maxActive=100
+jdbc.minIdle=5
+jdbc.suspectTimeout=60
+jdbc.timeBetweenEvictionRunsMillis=30000
+jdbc.minEvictableIdleTimeMillis=60000
+jdbc.validationQuery=SELECT 1 FROM DUAL
+jdbc.testWhileIdle=true
+jdbc.testOnBorrow=true
+jdbc.testOmReturn=false
+jdbc.removeAbandoned=true
+jdbc.removeAbandonedTimeout=1800
+
+#manage.ubtob.com
+manage.jdbc.driverClassName=oracle.jdbc.driver.OracleDriver
+manage.jdbc.url=jdbc:oracle:thin:@//10.10.100.215:1521/orcl
+manage.jdbc.username=platformmanager
+manage.jdbc.password=select!#%*(
+
+
+jdbc.driverClassName=com.mysql.jdbc.Driver
+jdbc.url=jdbc:mysql://10.10.100.18:3306/b2b_prod?characterEncoding=UTF-8&allowMultiQueries=true&rewriteBatchedStatements=true
+jdbc.username=root
+jdbc.password=select

+ 20 - 0
src/main/resources/cloud/message.properties

@@ -0,0 +1,20 @@
+tplInvitationForB2B=e565c0cf-87a2-4d18-8ce8-c5be757f5a3d
+msgInvitationForB2B=73c513f8-7423-49c4-b57c-50a63bd8a0af
+tplAfterBeAddedtoB2B=b9dee589-9fd8-45d3-9b2a-64b56d65e7e2
+msgTenderForB2B=f9e29b6f-4116-4d33-9bde-048aa037f8c6
+tplInvitationForERP=d8324da8-fa97-429c-8293-761698a94db8
+msgInvitationForERP=5081e29f-47af-4556-a560-9213af11753f
+
+## messageConfig
+tplInquiryForB2B=d94e931b-b699-46d7-8bb2-94604a3352c0
+tplAutoInquiryForB2B=fe01ead8-1e26-43d9-8278-4f8a9b4b343c
+msgInquiryForB2B=629edeb3-a87e-4a40-a5e5-51d9ae734f1b
+msgAutoInquiryForB2B=8cf71d56-09bb-4d60-993e-ed87ce72ec3b
+messageUrl=http://message.ubtob.com/sms/send
+msgAddPartForB2B=5222f956-69e8-4692-9b14-9711a4ead828
+msgAddPartNoticeManager=4d55f1aa-be3e-4690-9b0d-9f31f75deecb
+msgAddPartNoticeContact=
+
+messagePublicServiceDevUrl=http://10.10.100.23:24000
+#wangyc localhost
+#messagePublicServiceDevUrl=http://192.168.253.131:20000

+ 2 - 0
src/main/resources/cloud/redis.properties

@@ -0,0 +1,2 @@
+redis.host=10.10.100.200
+redis.port=6379

+ 23 - 0
src/main/resources/cloud/sys.properties

@@ -0,0 +1,23 @@
+#path
+b2b=http://uas.ubtob.com
+manage=http://manage.ubtob.com
+manageInner=http://10.10.100.81:8080
+im=http://113.105.74.140:8092
+b2c=https://www.usoftmall.com
+registerUrl=https://sso.ubtob.com/register/enterpriseRegistration
+
+#report url
+reportPrintUrl=http://pre-print.ubtob.com/report/print?userName=B2B%s&profile=${profile}&reportName=%s&whereCondition=%s
+reportUploadUrl=http://pre-print.ubtob.com/report/fileUpload?userName=B2B%s
+
+#product service url
+productServiceUrl=https://api-product.usoftmall.com/
+
+#inquiry service url
+inquiryServiceUrl=https://api-inquiry.usoftmall.com/
+
+#message service ip
+messageServiceIp=http://message.ubtob.com/
+
+#search url
+searchUrl=http://10.10.100.179:8081

+ 1 - 1
src/main/resources/prod/sys.properties

@@ -3,7 +3,7 @@ b2b=http://uas.ubtob.com
 manage=http://manage.ubtob.com
 manageInner=http://10.10.100.81:8080
 im=http://113.105.74.140:8092
-b2c=http://www.usoftmall.com
+b2c=https://www.usoftmall.com
 registerUrl=https://sso.ubtob.com/register/enterpriseRegistration
 
 #report url

+ 39 - 12
src/main/webapp/resources/js/index/app.js

@@ -24088,13 +24088,47 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
      * B2C搜索
      */
     app.controller('SearchCtrl', ['$scope', '$http', '$rootScope', 'SessionService', 'AccountEnterprise', function($scope, $http, $rootScope, SessionService, AccountEnterprise) {
+        $scope.hotwords = new Array();
+        var hasBrand = false;
+        var hasComponent = false;
+
+        // 热词搜索品牌
+        var hotBrand = function () {
+            $http.get($scope.toB2cLink + '/api/product/brand/mostSearchBrands'
+            ).success(function(data){
+                hasBrand = true;
+
+                angular.forEach(data, function (value) {
+                    $scope.hotwords.push({name: value.nameEn, url: $scope.toB2cLink + '/search?w='+ value.nameEn +'&type=brand'})
+                })
+                if (hasBrand) {
+                    hotComponent();
+                }
+            }).error(function(response) {
+                console.log(response)
+            });
+        };
+
+        // 热词搜索器件
+        var hotComponent = function () {
+            $http.get($scope.toB2cLink + '/api/product/component/mostSearchComponent'
+            ).success(function(data){
+                hasComponent = true;
+                if (hasBrand && hasComponent) {
+                    angular.forEach(data, function (value) {
+                        $scope.hotwords.push({name: value.code, url: $scope.toB2cLink + '/search?w='+ value.code +'&type=component'})
+                    })
+                }
+            }).error(function(response) {
+                console.log(response)
+            });
+        };
+
         AccountEnterprise.getB2cUrl({}, function(data) {
             $scope.toB2cLink = data.url
-            // 热门搜索跳转
-            angular.forEach($scope.hotwords, function (value, key) {
-                $scope.hotwords[key].url = $scope.toB2cLink + '/' + value.url
-            })
-        })
+            hotBrand();
+        });
+
         // 默认搜索类型
         $scope.searchType = 'component';
         $scope.placeholderSearch = '请输入型号';
@@ -24188,13 +24222,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             $scope.associateEnter = false;
         };
 
-        // 热词
-        $scope.hotwords = [{name : 'SCT2080KEC', url : 'product/component/1100400300009990/', id : 0},
-            {name : '电池组', url : 'product/kinds/346', id : 1},
-            {name : 'Vishay',url : 'product/brand/30327265e42a871be050007f01003d96/', id : 2},
-            {name : 'Panasonic Battery', url : 'product/brand/30327265e4e7871be050007f01003d96/', id : 3}];
-
-
         // 跳转到B2C
         $scope.b2cLink = function (url) {
             window.location.href = $scope.toB2cLink + url;

+ 2 - 2
src/main/webapp/resources/tpl/index/common/header.html

@@ -55,7 +55,7 @@
 		margin-bottom: 10px;
 	}
 	#header .header-main .mall-search input.form-control, #header .header-main .mall-search button.btn-default {
-		width: 441px;
+		width: 440px;
 		height: 40px;
 		border: 2px solid #5078cb;
 		border-radius: 0;
@@ -206,7 +206,7 @@
                             <div class="active-search">
                                 <ul class="list-untyled active-search-body" style="padding: 0;">
                                     <li class="active-search-item">热门搜索</li>
-                                    <li class="active-search-item" ng-repeat="hw in hotwords track by hw.id"><a ng-href="{{hw.url}}" ng-bind="hw.name"></a></li>
+                                    <li class="active-search-item" ng-repeat="hw in hotwords"><a ng-href="{{hw.url}}" ng-bind="hw.name"></a></li>
                                 </ul>
                             </div>
                         </div>