angular

diff --git a/CanDoo.Host/CanDoo.MvcHost/Areas/ShopA/Views/Home/Index.cshtml b/CanDoo.Host/CanDoo.MvcHost/Areas/ShopA/Views/Home/Index.cshtml
index dbe87f1..aa4d1cc 100644
--- a/CanDoo.Host/CanDoo.MvcHost/Areas/ShopA/Views/Home/Index.cshtml
+++ b/CanDoo.Host/CanDoo.MvcHost/Areas/ShopA/Views/Home/Index.cshtml
@@ -1,89 +1,111 @@
 @*@model CanDoo.MvcHost.Areas.ShopA.Models.IndexModule*@
 @{
     ViewBag.Title = "Index";
 }
 
 <div ng-app="myApp" ng-controller="myCtrl">
 
     <div>
+        <h2>广告---------------------------------------------------------------------------------------------------------</h2>
+        <div ng-repeat="x in gg1">
+            <h3 ng-bind="x.Name"></h3>
+            <p ng-bind="x.PicUrl"></p>
+            <p ng-bind="x.Url"></p>
+            <p ng-bind="x.Id"></p>
+        </div>
+    </div>
+
+    <div>
         <h2>母婴用品</h2>
         <div ng-repeat="x in data">
             <h3 ng-bind="x.AliasName"></h3>
             <p ng-bind="x.Id"></p>
             <p ng-bind="x.Img0"></p>
             <p ng-bind="x.Price"></p>
         </div>
     </div>
 
     <div>
         <h2>日化</h2>
         <div ng-repeat="x in dataShuma">
             <h3 ng-bind="x.AliasName"></h3>
             <p ng-bind="x.Id"></p>
             <p ng-bind="x.Img0"></p>
             <p ng-bind="x.Price"></p>
         </div>
     </div>
 
     <div>
         <h2>日化fdddddddddddddddddddddddddddddddddddddddddd</h2>
         <div ng-repeat="x in data2">
             <h3 ng-bind="x.AliasName"></h3>
             <p ng-bind="x.Id"></p>
             <p ng-bind="x.Img0"></p>
             <p ng-bind="x.Price"></p>
         </div>
     </div>
 
+
+
 </div>
 
 <script>
     var app = angular.module('myApp', []);
     app.controller('myCtrl', function ($scope,$http) {
 
         $scope.list = function () {
             $http.post("/api/ProductMainApi/GetList", { ProductTypeId:"79377144530079744"})
                 .then(function (response) {
                     $scope.data = response.data.Data;
                     
                 })
                 .catch(function (result) { //捕捉错误处理
                     //错误内容
                     console.log(result)
                 });
         }
-        $scope.list();
-
 
         $scope.listShuma = function () {
-            $http.post("/api/ProductMainApi/GetList", { ProductTypeId: "79377143980625920" })
+            $http.post("/api/ProductMainApi", { ProductTypeId: "79377143980625920" })
                 .then(function (response) {
                     $scope.dataShuma = response.data.Data;
                     console.log(response)
                 })
                 .catch(function (result) { //捕捉错误处理
                     //错误内容
                     console.log(result)
                 });
         }
 
         $scope.list2 = function () {
             $http.post("/api/ProductMainApi/GetList", { ProductTypeId: "79377144530079744" })
                 .then(function (response) {
                     $scope.data2 = response.data.Data;
                     console.log(response)
                 })
                 .catch(function (result) { //捕捉错误处理
                     //错误内容
                     console.log(result)
                 });
         }
 
+        $scope.listGg1 = function () {
+            $http.post("/api/ShopADApi/GetList", { ShopADTypeId: "79575310986645504" })
+                .then(function (response) {
+                    $scope.gg1 = response.data.Data;
+                    console.log(response)
+                })
+                .catch(function (result) { //捕捉错误处理
+                    //错误内容
+                    console.log(result)
+                });
+        }
+        $scope.listGg1();
         $scope.list();
-        $scope.list2();
-        $scope.listShuma();
+        //$scope.list2();
+        //$scope.listShuma();
     });
 
 
 </script>
 

 

posted @ 2017-03-13 08:36  shiningrise  阅读(220)  评论(0编辑  收藏  举报
// 侧边栏目录 // https://blog-static.cnblogs.com/files/douzujun/marvin.nav.my1502.css