Преглед изворни кода

修改买家结算页订单备注字符串的问题和默认勾选第一条地址

hulh пре 8 година
родитељ
комит
d23540f33a

+ 3 - 5
src/main/webapp/resources/js/usercenter/controllers/forstore/order_pay_ctrl.js

@@ -142,11 +142,9 @@ define(['app/app'], function(app) {
 		$scope.loadShippingAddress = function () {
 			return ShippingAddress.get({send : false}, function(data) {
 				$scope.sendAddress = data;
-				angular.forEach($scope.sendAddress, function (shippingAddress) {
-					if (shippingAddress.num == 1) {
-						$scope.selectAdd(shippingAddress);
-					}
-				})
+				if (data.length != 0){
+					$scope.selectAdd($scope.sendAddress[0]);
+				}
 			}, function(response) {
 				toaster.pop("error", "获取收货地址信息失败 "  + response.data);
 			});

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

@@ -515,7 +515,7 @@
 							<span style="width: 100%">
 								<em>订单备注:</em>
 								<input ng-if="order.status==501" type="text"  class="form-control" placeholder="请填写订单备注" ng-model="remarkList[details[0].storeid]" maxlength="200"/>
-								<em ng-if="order.status!=501" ng-bind="remarkList[details[0].storeid] || '无'" style="margin-left: 0;"></em>
+								<em ng-if="order.status!=501" ng-bind="remarkList[order.storeid] || '无'" style="margin-left: 0;"></em>
 							</span>
 						</dd>
 						<dd class="line60">