Ben 9 years ago
parent
commit
c96ecff890

+ 2 - 1
wl/doc/req.txt

xqd
@@ -1,4 +1,5 @@
 1.  货源管理:名称、货物类型、车长、车型、报价、描述、联系人、电话、再预留10个空余的方便以后添加
 2.  车源管理:车牌号、类型、出发地、到达地、发车时间、途经地名、运价、随车联系电话、随车联系人、再预留10个空余的方便以后添加
 3.  会员系统:可以发布货源,货车主可以发布车源信息,然后可以车主可以去拍货源的单。
-4. 用户中心,可以修改密码 ,查看订单信息 ,可以查看余额.
+4. 用户中心,可以修改密码 ,查看订单信息 ,可以查看余额.
+

+ 57 - 1
wl/www/css/style.css

xqd
@@ -1 +1,57 @@
-/* Empty. Add your own CSS if you like */
+.logo {margin-top:10px;margin-left:23% }
+.user-box { background: url(../img/u_pic1.jpg) top center; -moz-background-size: cover; -webkit-background-size: cover; -o-background-size: cover; background-size: cover; color: #FFF; padding-top: 20px; text-align: center; padding-bottom: 50px; position: relative }
+.user-photo { width: 68px; height: 68px; border-radius: 100%; display: inline-block; padding: 2px; background-color: #FFF }
+.user-photo img { width: 64px; height: 64px; border-radius: 100%; }
+.user-info { line-height: 28px; font-size: 1.2em; padding-bottom: 10px; }
+.clearfix:after { content: ' '; visibility: hidden; display: block; height: 0; clear: both; }
+.fl { float: left; }
+.fr { float: right }
+.color-red a, .color-red { color: #F10 }
+.color-red a:hover { color: #F10 }
+.green, .green a, .color-green { color: rgba(45,183,29,1.00) }
+.row-border { border: 1px solid #EEE; border-width: 1px 0 1px 0; background-color: #FFF; padding: 0; }
+.row-border .button{margin: 0; padding: 5px 0;font-size: 14px;}
+.user-info a { color: #FFF; }
+.user-info span { padding-right: 10px; }
+.user-info span em { opacity: 0.7 }
+.userinfo-detail { float: left; padding-top: 5px; }
+.user-num { background-color: rgba(0,0,0,0.5); padding: 10px 10px; }
+.msg-user { background: rgba(0,0,0,0.40); color: #FFF; height: 50px; position: absolute; bottom: 0; width: 100%; }
+.msg-user .msg-item { width: 25%; float: left; }
+.msg-user .msg-item span { display: block; height: 20px; line-height: 20px; text-align: center; opacity: 0.7 }
+.msg-user .msg-item b { display: block; height: 25px; position: relative; line-height: 25px; font-size: 16px; font-family: Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif }
+.msg-user .msg-item b em { width: 9px; height: 9px; border-radius: 5px; background-color: rgba(252,101,34,1.00); position: absolute; z-index: 2; right: 30px; top: 0; }
+.msg-user a.msg-item { color: #FFF; }
+
+.list-set-arrow .item, .item.item-set-arrow { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D\'0%200%2060%20120\'%20xmlns%3D\'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg\'%3E%3Cpath%20d%3D\'m60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z\'%20fill%3D\'%23c7c7cc\'%2F%3E%3C%2Fsvg%3E"); background-position: -webkit-calc(100% - 15px) center; background-position: calc(100% - 15px) center; background-repeat: no-repeat; background-size: 10px 20px; padding-right: 30px; }
+.list-set-arrow .item-arrow-no, .item-arrow-no { background-image: none; padding-right: 15px; }
+.item-arrow-no .badge { right: 15px; }
+.list-user-set .item.item-icon-left { padding: 12px 16px 12px 54px; border-color: #EEE; }
+.list-user-set .item.item-icon-left i img { margin-top: 6px; }
+.list-user-set.list-set-arrow .item, .list-user-set .item.item-set-arrow { padding-right: 30px; }
+.i-user-phone, .i-user-email, .i-user-card, .i-user-fenqi, .i-user-sudai, .i-user-passsword, .i-user-set,.i-user-infoadd { background: no-repeat center/32px auto; width: 32px; height:32px; position: absolute; left: 11px; top: 6px; vertical-align: middle; }
+.item-icon-left i img { width: 32px; height: 32px; margin-top: 10px; }
+
+.i-user-infoadd { background-image: url(../img/icon/i_user_infoadd.png) }
+.i-user-set { background-image: url(../img/icon/i_user_set.png) }
+.i-user-sudai { background-image: url(../img/icon/i_user_wallet.png) }
+.i-user-fenqi { background-image: url(../img/icon/i_user_card.png) }
+.i-user-fenqi { background-image: url(../img/icon/i_user_card.png) }
+.i-user-passsword{ background-image: url(../img/icon/i_user_pass.png) }
+.casehistory-item { background-color: #FFF; border-radius: 3px; margin: 10px; box-shadow: 0 0 4px rgba(0,0,0,0.2); position: relative }
+.casehistory-item-photo { width: 84px; position: absolute; left: 0; top: 0; float: left; padding: 10px; height: 90px; background-color: #F7F7F7; border-radius: 3px 0 0 0; text-align: center; }
+.selftest-item-photo { background-size: 100% 100%; padding: 0; width: 80px; -webkit-background-size: 100% 100%; background-repeat: no-repeat; background-position: center; height: 80px; }
+.selftest-item-photo img { width: 80px; height: 90px; }
+.casehistory-item-info { float: left; width: 100%; height: 90px }
+.casehistory-item-info span.badge { font-size: 12px; font-weight: normal }
+.casehistory-item-info span.badge-position { position: absolute; width: auto; right: 0; top: 0; border-radius: 0 5px 0 5px; }
+.casehistory-item-info p { line-height: 25px; color: #999; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+.casehistory-item-info p:first-child { font-size: 14px; }
+.casehistory-item-info p span { color: #444 }
+.casehistory-photo-item-info { padding-left: 90px; height: 110px; width: 100%; }
+.casehistory-photo-item-info p { line-height: 14px; color: #999; font-size: 14px }
+.casehistory-photo-item-info p span { line-height: 24px; font-size: 14px }
+.list-pay .item-avatar { min-height: 60px; padding: 10px 120px 10px 10px; }
+.list-pay .item-avatar p { color: #999 }
+.list-pay .item-avatar .icon { position: absolute; left: 10px; max-height: 40px; max-width: 40px; color: #FFFFFF; line-height: 40px; font-weight: bold; font-size: 16px }
+.list-pay .item-avatar b { position: absolute; width: 110px; text-align: right; top: 20px; right: 10px; font-size: 18px }

+ 0 - 1
wl/www/index.html

xqd
@@ -27,7 +27,6 @@
 <script src="js/controllers/account.js"></script>
 <script src="js/controllers/goods.js"></script>
 <script src="js/controllers/car.js"></script>
-<script src="js/controllers/member.js"></script>
 <script src="js/controllers/my.js"></script>
 <!--services-->
 <script src="js/services/msgservice.js"></script>

+ 1 - 1
wl/www/js/app.js

xqd
@@ -16,7 +16,7 @@
 .run(["$ionicPlatform", "$location", "msg", "$rootScope", "$timeout", "$ionicHistory", "userService","$state",
     function ($ionicPlatform, $location, msg, $rootScope, $timeout, $ionicHistory, userService, $state) {
     $ionicPlatform.registerBackButtonAction(function (e) {
-        if ($location.path().indexOf("uf7/") != -1) {
+        if ($location.path().indexOf("wl/") != -1) {
             if ($rootScope.backButtonPressedOnceToExit) {
                 ionic.Platform.exitApp();
                 $rootScope.$destroy()

+ 1 - 1
wl/www/js/config/config.js

xqd
@@ -2,6 +2,6 @@
     //全局配置 
     app.constant("config", {
         //server: (!!window.cordova) ? "http://w2.9026.com/" : location.origin, //服务端,
-        server:"http://w2.9026.com/"
+        server: "http://120.25.204.211/"
     });
 })(angular.module('app'));

+ 1 - 10
wl/www/js/config/router.js

xqd
@@ -68,16 +68,7 @@
                     }
                 }
         })
-         //会员管理
-         .state('wl.member', {
-             url: '/member',
-             views: {
-                 'wl-member': {
-                     templateUrl: 'templates/member/index.html',
-                     controller: 'memberCtrl'
-                 }
-             }
-         })
+       
         //个人中心
         .state('wl.my', {
             url: '/my',

+ 37 - 5
wl/www/js/controllers/account.js

xqd xqd xqd xqd
@@ -7,7 +7,7 @@
         $scope.login = function () {
             data.setObject('user', { mobile: $scope.vm.mobile });
             data.set('token', '111111');
-            $state.go('uf7.home');
+            $state.go('wl.home');
             //userService.login($scope.vm.mobile, $scope.vm.password).then(function (result) {
 
             //}, function (error) {
@@ -15,7 +15,7 @@
             //});
         }
     }]);
-    app.controller('registerCtrl', ["$scope", 'msg', 'util', 'userService', '$timeout', '$state', function ($scope, msg, util, userService, $timeout, $state) {
+    app.controller('registerCtrl', ["$scope", 'msg', 'util', 'userService', '$timeout', '$state', 'data', function ($scope, msg, util, userService, $timeout, $state, data) {
         $scope.vm = {
             mobile: '',
             password: '',
@@ -23,7 +23,28 @@
             verifyCode:'',
             waitSeconds: "获取验证码"
         };
+        $scope.typeOpt = [
+            { name: "托运方", value: 1 },
+            { name: "承运方", value: 2 }
+        ];
+        $scope.idcard_typeOpt = [
+           { name: "身份证", value: 1 },
+           { name: "其它", value: 2 }
+        ];
+
         $scope.save = function () {
+            if (!$scope.vm.type) {
+                msg.text('请选择类型');
+                return;
+            }
+            if (!$scope.vm.idcard_type) {
+                msg.text('请选择证件类型');
+                return;
+            }
+            if (!$scope.vm.idcard_no) {
+                msg.text('请输入证件号码');
+                return;
+            }
             if (!util.isMobile($scope.vm.mobile)) {
                 msg.text('请输入正确的手机号', true);
                 return;
@@ -37,12 +58,23 @@
                 return;
             }
             msg.loading('请稍等...');
-            userService.register({ mobile: $scope.vm.mobile, password: $scope.vm.password, verifyCode: $scope.vm.verifyCode }).then(function (result) {
+            userService.register({
+                phone: $scope.vm.mobile, password: $scope.vm.password,
+                verifyCode: $scope.vm.verifyCode, idcard_type: $scope.vm.idcard_type, idcard_no: $scope.vm.idcard_no, type: $scope.vm.type
+            }).then(function (result) {
+                data.setObject('user', { mobile: $scope.vm.mobile, type: $scope.vm.type });
+                data.set('token', result.data.token);
                 msg.hide();
-                $state.go('uf7.home');
+                if ($scope.vm.type == 1) {//托运方
+                    $state.go('wl.car');
+                }
+                if ($scope.vm.type == 2) {//承运方
+                    $state.go('wl.goods');
+                }
+             
             }, function (erro) {
                 msg.hide();
-                msg.error(erro);
+                msg.error(JSON.stringify(erro.data));
             });
         }
         $scope.getVerifyCode = function () {

+ 0 - 17
wl/www/js/controllers/member.js

xqd
@@ -1,17 +0,0 @@
-(function (app) {
-    app.controller('memberCtrl', ["$scope", "$ionicSideMenuDelegate", "$state", function ($scope, $ionicSideMenuDelegate, $state) {
-        $scope.filter = {};
-        $scope.toggleRight = function () {
-            //$scope.load(true);
-            $ionicSideMenuDelegate.toggleRight();
-        };
-        $scope.load=function (init) {
-    
-        }
-    }
-    ]);
-     
-})(angular.module('app.controllers'));
-
-
-

+ 11 - 6
wl/www/js/services/userservice.js

xqd
@@ -15,12 +15,17 @@
                  });
             },
             register: function (model) {
-                return new Promise(function (resolve, reject) {
-                    data.setObject('user', { mobile: model.mobile });
-                    data.set('token', '111111');
-                    resolve('ok');
-                    // reject('654878');
-                });
+                return $http({
+                    url: config.server + 'api/auth/register',
+                    method: "post",
+                    data: model
+                })
+                //return new Promise(function (resolve, reject) {
+                //    data.setObject('user', { mobile: model.mobile });
+                //    data.set('token', '111111');
+                //    resolve('ok');
+                //    // reject('654878');
+                //});
             },
             isLogin: function () {
                 return !util.empty(data.get("token")) && data.getObject("user");

+ 1 - 2
wl/www/templates/account/login.html

xqd xqd
@@ -1,4 +1,4 @@
-<ion-view view-title="一站式消费分期平台">
+<ion-view view-title="掌上物流网">
     <ion-content>
         <img src="img/logo.png" class="logo" />
         <form>
@@ -11,7 +11,6 @@
                     <span class="input-label">密码</span>
                     <input type="password" ng-model="vm.password" placeholder="密码">
                 </label>
-               
             </div>
             <div class="padding">
                 <button type="submit" ng-click="login()"  class="button button-full button-positive">

+ 16 - 0
wl/www/templates/account/register.html

xqd
@@ -1,6 +1,22 @@
 <ion-view view-title="注册" hide-nav-bar="false">
     <ion-content >
         <div class="list">
+            <label class="item item-input item-select item-select-width">
+                <span class="input-label">
+                    类型
+                </span>
+                <select ng-model="vm.type" ng-options="x.value as x.name for x in typeOpt"></select>
+            </label>
+    
+            <label class="item item-input item-select item-select-width">
+                <span class="input-label">
+                    证件类型
+                </span>
+                <select ng-model="vm.idcard_type" ng-options="x.value as x.name for x in idcard_typeOpt"></select>
+            </label>
+            <label class="item item-input">
+                <input type="text" ng-model="vm.idcard_no" placeholder="证件号码">
+            </label>
             <div class="item item-input">
                 <input type="tel" ng-model="vm.mobile" placeholder="手机号码">
                 <button   ng-click="getVerifyCode()" class="button button-assertive" style="margin-right:5px">{{vm.waitSeconds}}</button>

+ 0 - 5
wl/www/templates/member/index.html

xqd
@@ -1,5 +0,0 @@
-<ion-view>
-    <ion-content>
-      test
-    </ion-content>
-</ion-view>

+ 5 - 5
wl/www/templates/my/index.html

xqd
@@ -15,19 +15,19 @@
             </div>
         </div>
         <div class="list list-user-set list-set-arrow">
-            <a class="item item-icon-left" ui-sref="uf7.my_apply">
+            <a class="item item-icon-left" ui-sref="wl.my_apply">
                 <i class="i-user-infoadd"></i><em class="fl">申请资料</em>
             </a>
-            <a class="item item-icon-left" ui-sref="uf7.my_fenqi">
+            <a class="item item-icon-left" ui-sref="wl.my_fenqi">
                 <i class="i-user-fenqi"></i><em class="fl">U分期</em>
             </a>
-            <a class="item item-icon-left" ui-sref="uf7.my_sudai">
+            <a class="item item-icon-left" ui-sref="wl.my_sudai">
                 <i class="i-user-sudai"></i><em class="fl">51速贷</em>
             </a>
-            <a class="item item-icon-left" ui-sref="uf7.my_setpassword">
+            <a class="item item-icon-left" ui-sref="wl.my_setpassword">
                 <i class="i-user-passsword"></i><em class="fl">修改密码</em>
             </a>
-            <a class="item item-icon-left" ui-sref="uf7.my_setting">
+            <a class="item item-icon-left" ui-sref="wl.my_setting">
                 <i class="i-user-set"></i><em class="fl"> 设置</em>
             </a>
             

+ 0 - 3
wl/www/templates/tabs.html

xqd
@@ -5,9 +5,6 @@
   <ion-tab title="车源" icon-off="ion-ios-cart-outline" icon-on="ion-ios-cart"  ui-sref="wl.car">
         <ion-nav-view name="wl-car"></ion-nav-view>
   </ion-tab>
-  <ion-tab title="会员" icon-off="ion-ios-people-outline" icon-on="ion-ios-people" ui-sref="wl.member">
-        <ion-nav-view name="wl-member"></ion-nav-view>
-  </ion-tab>
   <ion-tab title="我的" icon-off="ion-ios-gear-outline" icon-on="ion-ios-gear"  ui-sref="wl.my">
     <ion-nav-view name="wl-my"></ion-nav-view>
   </ion-tab>