zoukankan      html  css  js  c++  java
  • 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>
     
  • 相关阅读:
    Vue.js监听事件
    Vue.js组件传值
    Vue.js安装
    C#中输入法全角转换半角
    文件夹操作
    转JSON字符串,并进行AES加密
    ReportView报表的使用
    c++读入优化
    快读板子
    【转】2020年 大二上 ACM
  • 原文地址:https://www.cnblogs.com/shiningrise/p/6540991.html
Copyright © 2011-2022 走看看