Просмотр исходного кода

Merge remote-tracking branch 'origin/dev-mysql' into dev-mysql

hubert 7 лет назад
Родитель
Сommit
587c8f9e4e

+ 1 - 0
src/main/java/com/uas/platform/b2c/prod/store/service/impl/StoreApplyServiceImpl.java

@@ -122,6 +122,7 @@ public class StoreApplyServiceImpl implements StoreApplyService {
 		storeApply.setUserUU(user.getUserUU());
 		storeApply.setUserName(user.getUserName());
 		storeApply.setCreateTime(date);
+		//将storeApply设置为预审核状态;
 		storeApply.setStatus(StoreApply.ApplyStatus.PREPARE);
 		// 设置店铺基础信息
 		storeApply.setEnUU(user.getEnterprise().getUu());

+ 1 - 1
src/main/resources/dev/account.properties

@@ -11,7 +11,7 @@ sso.cookie.secure=false
 sso.cookie.browser=false
 sso.login.url=http://192.168.253.6:32323
 sso.logout.url=http://192.168.253.6:32323/logquit
-sso.register.url=http://192.168.253.6:32323/register/personalRegistration?appId=mall
+sso.register.url=http://192.168.253.6:32323/register/personalRegistration
 sso.updatePassword.url=http://192.168.253.6:32323/reset/changePasswordChooseStyle
 sso.updateMobile.url=http://192.168.253.6:32323/validation/phoneValidation
 sso.updateEmail.url=http://192.168.253.6:32323/validation/emailValidation

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

@@ -10,7 +10,7 @@ sso.cookie.secure=false
 sso.cookie.browser=false
 sso.login.url=https://sso.ubtob.com
 sso.logout.url=https://sso.ubtob.com/logquit
-sso.register.url=https://sso.ubtob.com/register/personalRegistration?appId=mall
+sso.register.url=https://sso.ubtob.com/register/personalRegistration
 sso.updatePassword.url=https://sso.ubtob.com/reset/changePasswordChooseStyle
 sso.updateMobile.url=https://sso.ubtob.com/validation/phoneValidation
 sso.updateEmail.url=https://sso.ubtob.com/validation/emailValidation

+ 1 - 1
src/main/resources/test/account.properties

@@ -10,7 +10,7 @@ sso.cookie.secure=false
 sso.cookie.browser=false
 sso.login.url=http://192.168.253.6:32323
 sso.logout.url=http://192.168.253.6:32323/logquit
-sso.register.url=http://192.168.253.6:32323/register/personalRegistration?appId=mall
+sso.register.url=http://192.168.253.6:32323/register/personalRegistration
 sso.updatePassword.url=http://192.168.253.6:32323/reset/changePasswordChooseStyle
 sso.updateMobile.url=http://192.168.253.6:32323/validation/phoneValidation
 sso.updateEmail.url=http://192.168.253.6:32323/validation/emailValidation

+ 7 - 3
src/main/webapp/resources/js/admin/controllers/help/HelpDetailCtrl.js

@@ -76,8 +76,10 @@ define(['app/app'], function(app) {
             var imgs = els.find('img');
             var promises = [];
             angular.forEach(imgs, function (img) {
-                promises.push(switchBase64ToImg(img).$promise);
-            })
+                if (img.src && img.src.indexOf('http://') < 0) {
+                    promises.push(switchBase64ToImg(img).$promise);
+                }
+            });
             $q.all(promises).then(function () {
                 // console.log(els.html());
                 $scope.issue.article = els.html()
@@ -99,7 +101,9 @@ define(['app/app'], function(app) {
             var imgs = els.find('img');
             var promises = [];
             angular.forEach(imgs, function (img) {
-                promises.push(switchBase64ToImg(img).$promise);
+                if (img.src && img.src.indexOf('http://') < 0) {
+                    promises.push(switchBase64ToImg(img).$promise);
+                }
             })
             $q.all(promises).then(function () {
                 // console.log(els.html());

+ 3 - 1
src/main/webapp/resources/js/admin/controllers/help/HelpEditCtrl.js

@@ -59,7 +59,9 @@ define(['app/app'], function(app) {
             var imgs = els.find('img');
             var promises = [];
             angular.forEach(imgs, function (img) {
-                promises.push(switchBase64ToImg(img).$promise);
+                if (img.src && img.src.indexOf('http://') < 0) {
+                    promises.push(switchBase64ToImg(img).$promise);
+                }
             })
             $q.all(promises).then(function () {
                 // console.log(els.html());

+ 34 - 17
src/main/webapp/resources/js/common/controllers/commonCtrls.js

@@ -1752,26 +1752,43 @@ define([ 'app/app' ], function(app) {
 		};
 	}]);
 
-  /**
-   * 左侧导航栏控制器
-   */
-	app.controller('leftNavCtrl', ["$scope", "toaster", function($scope, toaster){
+	/**
+	 * 左侧导航栏控制器
+	 */
+	app.controller('leftNavCtrl', ["$scope", "toaster", '$modal', '$rootScope', function($scope, toaster, $modal, $rootScope){
+		//安全设置提醒框
+		$scope.openHomeCenterModel = function() {
+			var modalInstance = $modal.open({
+				animation: true,
+				templateUrl: $rootScope.rootPath + '/static/view/usercenter/modal/homeCenter_modal.html',
+				controller:'homeModalCtrl'
+			});
+			modalInstance.result.then(function(){
+			}, function(){
+			});
+		};
 		$scope.promptUpdate = function() {
-			console.info($scope.userInfo.pwdEnable);
-			if (!$scope.userInfo.pwdEnable) {
-        toaster.pop("info", "请修改登录密码");
-        return;
+			if (!$scope.userInfo.pwdEnable || !$scope.userInfo.userEmail || !$scope.userInfo.haveUserQuestion) {
+				$scope.openHomeCenterModel();
 			}
-      if (!$scope.userInfo.emailValidCode || $scope.userInfo.emailValidCode != 2) {
-        toaster.pop("info", "请绑定邮箱");
-        return;
-      }
-      if (!$scope.userInfo.haveUserQuestion) {
-        toaster.pop("info",  "请设置密保问题 ");
-        return;
-      }
+		};
+	}]);
+
+	app.controller('homeModalCtrl', ['$rootScope', '$scope',  '$modalInstance', 'toaster', '$http', 'ShippingAddress','$state', function($rootScope, $scope, $modalInstance, toaster, $http, ShippingAddress,$state){
+		$rootScope.$on('$stateChangeStart',
+			function(event, toState, toParams, fromState, fromParams){
+				$modalInstance.dismiss();
+			})
+		$scope.goLink = function(op) {
+			$state.go('vendor_account_management',{op:op});
+			$modalInstance.dismiss('cancel');
+		}
+
+		$scope.cancel = function () {
+			$modalInstance.dismiss('cancel');
 		}
-  }]);
+	}]);
+
 	var getOriginalData = function(data) {
 		var result = {};
 		if(data&&data.length) {

+ 56 - 50
src/main/webapp/resources/js/vendor/app.js

@@ -631,53 +631,58 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
 		$rootScope.rootPath = BaseService.getRootPath();
 		$rootScope.page = 'vendor';// 导航栏状态,'个人中心'状态激活
 
-		$rootScope.$on('$stateChangeStart', function (event, toState) {
+		var getToStateName = function () {
+			if ($rootScope.store && (!$rootScope.store.status || $rootScope.store.status === 'OPENED')) {
+				return 'vendor_store_maintain';
+			} else if ($rootScope.store && $rootScope.store.status && $rootScope.store.status !== 'OPENED') {
+				return 'vendor_store_close';
+			} else if ($rootScope.applyStatus === 'NONE') {
+				return 'vendor_store_apply';
+			} else if ($rootScope.applyStatus === 'PREPARE') {
+				return 'vendor_store_wait';
+			} else if ($rootScope.applyStatus === 'PASS') {
+				return 'vendor_store_info';
+			} else {
+				return 'vendor_index';
+			}
+		};
 
-			var getToStateName = function () {
-				if ($rootScope.store && (!$rootScope.store.status || $rootScope.store.status === 'OPENED')) {
-					return 'vendor_store_maintain';
-				} else if ($rootScope.store && $rootScope.store.status && $rootScope.store.status !== 'OPENED') {
-					return 'vendor_store_close';
-				} else if ($rootScope.applyStatus === 'NONE') {
-					return 'vendor_store_apply';
-				} else if ($rootScope.applyStatus === 'PREPARE') {
-					return 'vendor_store_wait';
-				} else if ($rootScope.applyStatus === 'PASS') {
-					return 'vendor_store_info';
-				} else {
-					return 'vendor_index';
-				}
-			};
+		// 创建店铺的Promise对象
+		var deferred = $q.defer();
+		StoreInfo.existStore({}, {}, function (store) {
+			deferred.resolve(store);
+		}, function (error) {
+			deferred.reject(error);
+		});
+		var storePromise = deferred.promise;
+		$rootScope.storePromise = storePromise;
 
-			// 创建店铺的Promise对象
-			var deferred = $q.defer();
-			StoreInfo.existStore({}, {}, function (store) {
-				deferred.resolve(store);
-			}, function (error) {
-				deferred.reject(error);
-			});
-			var storePromise = deferred.promise;
-			$rootScope.storePromise = storePromise;
+		// 创建开店申请的Promise对象
+		var deferred1 = $q.defer();
+		StoreInfo.findShopOwnerApplyByNormalStatus({}, {}, function (result) {
+			deferred1.resolve(result);
+		}, function (error) {
+			deferred1.reject(error);
+		});
+		var applyPromise = deferred1.promise;
 
-			// 创建开店申请的Promise对象
-			var deferred1 = $q.defer();
-			StoreInfo.findShopOwnerApplyByNormalStatus({}, {}, function (result) {
-				deferred1.resolve(result);
-			}, function (error) {
-				deferred1.reject(error);
-			});
-			var applyPromise = deferred1.promise;
+		// 合并多个Promise对象
+		$q.all([storePromise, applyPromise]).then(function (result) {
+			$rootScope.store = result[0] && result[0].uuid ? result[0] : null;
+			$rootScope.applyInfo = null;
+			if (result[1] && result[1].success) {
+				$rootScope.applyInfo = result[1].data;
+				$rootScope.applyStatus = result[1].data ? result[1].data.status : 'NONE';
+			} else {
+				$rootScope.applyStatus = 'NONE';
+			}
 
-			// 合并多个Promise对象
-			$q.all([storePromise, applyPromise]).then(function (result) {
-				$rootScope.store = result[0] && result[0].uuid ? result[0] : null;
-				$rootScope.applyInfo = null;
-				if (result[1] && result[1].success) {
-					$rootScope.applyInfo = result[1].data;
-					$rootScope.applyStatus = result[1].data ? result[1].data.status : 'NONE';
-				} else {
-					$rootScope.applyStatus = 'NONE';
-				}
+
+			if ($rootScope.applyStatus === 'NONE') {
+				$state.go('vendor_store_apply');
+			}
+
+			$rootScope.$on('$stateChangeStart', function (event, toState) {
 
 				if (toState.name === 'vendor_store_apply' && $rootScope.applyStatus !== 'NONE') {
 					event.preventDefault();
@@ -714,14 +719,15 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
 					return ;
 				}
 				console.log('route', toState.name);
-			})['catch'](function () {
-				$rootScope.store = null;
-				$rootScope.applyInfo = null;
-				$rootScope.applyStatus = 'NONE';
-				event.preventDefault();
-				console.log('route', toState.name, 'vendor_index');
-				$state.go('vendor_index');
+
 			});
+
+		})['catch'](function () {
+			$rootScope.store = null;
+			$rootScope.applyInfo = null;
+			$rootScope.applyStatus = 'NONE';
+			event.preventDefault();
+			$state.go('vendor_index');
 		});
 	}]);
 

+ 4 - 4
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_store_maintain_ctrl.js

@@ -221,10 +221,10 @@ define(['app/app'], function (app) {
 				toaster.pop('error', '企业信息不能为空');
 				return false;
 			}
-			if (!$scope.sampleStore.enterprise.enUrl || $scope.sampleStore.enterprise.enUrl == '') {
+			/*if (!$scope.sampleStore.enterprise.enUrl || $scope.sampleStore.enterprise.enUrl == '') {
 				toaster.pop('error', '企业官网地址不能为空');
 				return false;
-			}
+			}*/
 			if (!$scope.sampleStore.enterprise.address || $scope.sampleStore.enterprise.address == '') {
 				toaster.pop('error', '企业地址不能为空');
 				return false;
@@ -233,10 +233,10 @@ define(['app/app'], function (app) {
 				toaster.pop('error', '请输入正确的电话号码');
 				return false;
 			}
-			if (!$scope.sampleStore.enterprise.enFax || $scope.sampleStore.enterprise.enFax == '') {
+			/*if (!$scope.sampleStore.enterprise.enFax || $scope.sampleStore.enterprise.enFax == '') {
 				toaster.pop('error', '请输入正确的企业传真');
 				return false;
-			}
+			}*/
 			var store = {};
 			store.storeShortName = $scope.sampleStore.storeShortName;
             store.storeName = $scope.sampleStore.storeName;

+ 1 - 1
src/main/webapp/resources/view/vendor/forstore/vendor_store_apply.html

@@ -481,7 +481,7 @@
 	</div>-->
 </div>
 <div class="container vendor_store_apply user_right" style="margin-top: 15px;padding: 0;min-height: 330px; padding-top: 20px; padding-bottom: 20px;">
-	<div class="result" ng-if="resultTip"><span class="fl"><em>*</em>店铺开通后,可<a href="vendor#/vendor_upload">&nbsp;上传产品&nbsp;</a>至自己的店铺展示销售;如不想开店,可<a href="vendor#/vendor_upload">&nbsp;上传产品&nbsp;</a>在优软商城中寄售由商城代为售卖。</span><a ng-click="closeTip()" class="fr">&times;</a></div>
+	<div class="result" ng-if="resultTip"><span class="fl"><em>*</em>店铺开通后,可<a href="vendor#/vendor_upload" target="_blank">&nbsp;上传产品&nbsp;</a>至自己的店铺展示销售;如不想开店,可<a href="vendor#/vendor_upload" target="_blank">&nbsp;上传产品&nbsp;</a>在优软商城中寄售由商城代为售卖。</span><a ng-click="closeTip()" class="fr">&times;</a></div>
 	<div>
 		<!-- Nav tabs -->
 		<ul class="nav nav-tabs" role="tablist" style="height: 41px; background: none;padding: 0 40px;">

+ 1 - 1
src/main/webapp/resources/view/vendor/forstore/vendor_store_maintain.html

@@ -731,7 +731,7 @@
 			</div>
 			<div class="row com_row" style="margin-top: 10px;">
 				<div class="col-md-2 custom_col">
-					<span>传&nbsp;&nbsp;&nbsp;&nbsp;真<strong class="text-inverse">*</strong></span>
+					<span>传&nbsp;&nbsp;&nbsp;&nbsp;真</span>
 				</div>
 				<div class="col-md-10 custom_col">
 					<input type="text" class="form-control" style="border-radius: inherit;" title="enFax" ng-pattern="/^[\d-]{0,20}$/" ng-model="sampleStore.enterprise.enFax" maxlength="20"/>