瀏覽代碼

Merge branch 'test' of https://git.oschina.net/yiguanjia/php into test

Charlie 8 年之前
父節點
當前提交
a0c3f9dc45

二進制
www/images/qryiguanjia.jpg


+ 1 - 0
www/protected/modules/common/CommonModule.php

@@ -8,6 +8,7 @@ class CommonModule extends CWebModule
         $this->setImport(array(
             'common.controllers.*',
             'common.components.*',
+            'o2o.components.*',
         ));
     }
 }

+ 136 - 3
www/protected/modules/common/controllers/ActivityController.php

@@ -5,14 +5,147 @@
  * Date: 2016/10/9
  * Time: 14:44
  */
-class ActivityController extends CController  {
+
+class ActivityController extends O2oBaseController  {
     //扫码获取代金券
+
+    public function actionIndex(){
+
+    }
+
     public function actionGetCoupon() {
-        echo "123";
+        $signPackage = CommonWeixin::get_sign();
         $coupon_id = Yii::app()->request->getParam('coupon_id','');//获取代金券id
-        var_dump( $coupon_id);
+        $code = Yii::app()->getRequest()->getParam("code");
+        $state = Yii::app()->getRequest()->getParam("state");
+        $home_page = Yii::app()->getRequest()->getParam("home_page",'');
+        $userId = '';
+        $appToken = '';
+        if($code && $state){
+            $accessInfo = CommonWeixin::getAccessInfo($code);
+            $userId = '';
+            echo "1";exit;
+            if (!isset($accessInfo['errcode']) && $state == 'yiguanjia') {
+                echo "2";
+                $appToken = md5(substr($accessInfo['openid'],2));
+                //微信校验通过,登录(注册),分发token
+                $userInfo = CommonWeixin::getUserInfo($accessInfo['access_token'], $accessInfo['openid']);
+                if (!isset($accessInfo['errcode'])) {
+                    echo "3";
+                    //检查是否有注册,没有就注册
+                    $criteria = new EMongoCriteria();
+                    $criteria->unionid('==', $accessInfo['unionid']);
+                    $user = RUser::model()->find($criteria);
+                    if ($user) {
+                        echo "4";
+                        $userId = $user->_id;
+                        if(!isset($user->wx_pub_openid) || empty($user->wx_pub_openid)){
+                            $user->wx_pub_openid = $accessInfo['openid'];
+                            $user->wx_have_follow = 1;
+                            $user->update(array('wx_pub_openid','wx_have_follow'),true);
+                        }
+                    }else{
+                        echo "5";
+                        $userAr  = new RUser();
+                        $userAr->user_name = $userInfo['nickname'];
+                        $userAr->avatar = $userInfo['headimgurl'];
+                        $userAr->wx_pub_openid = $userInfo['openid'];
+                        $userAr->unionid = $userInfo['unionid'];
+                        $userAr->sex = $userInfo['sex'];
+                        $userAr->register_time = time();
+                        $userAr->channel = 'wxpub';
+                        $userAr->wx_have_follow = 1;
+                        $u_criteria = new EMongoCriteria();
+                        $u_criteria->user_name('==',$userInfo['nickname']);
+                        $olduser = RUser::model()->find($u_criteria);
+                        if($olduser){
+                            $user_new_neme = $userAr->user_name.'_'.substr(time(),-7);
+                            $userAr->user_name = $user_new_neme;
+                        }
+
+                        $result = $userAr->save();
+                        if($result){
+                            echo "6";
+                            //异步同步微信头像到七牛
+                            if (!empty($userAr->unionid) && (strpos($userAr->avatar, 'qiniu') === false)) {
+                                $list = new ARedisList('after_user_reg');
+                                $user_id = (string)$userAr->_id;
+                                $list->push($user_id);
+                            }
+                            $userId = (string)$userAr->_id;
+                        }else{
+                            var_dump($userAr);exit;
+                        }
+                    }
+                    //用户注册后,发放代金券
+                    echo "7";
+                    $coupon_id =new MongoId($coupon_id);
+                    $start_time = time();                 //发放优惠券可用开始时间
+                    $end_time = $start_time + 86400*30;   //发放优惠券过期时间
+                    if (CommonFn::isMongoId($coupon_id)) {
+                        if (CommonFn::isMongoId($user->_id)) {
+                            echo "8";
+                            Service::factory('CouponService')->giveCoupon($user->_id, $coupon_id, $start_time, $end_time);//发放代金券
+                        }
+                    }
+                }else{
+                    echo $accessInfo['errcode'];
+                    die();
+                }
+            }
+        }
+
+        if($home_page){
+            echo "9";exit;
+            $this->renderpartial('//o2o/web/index', array(
+                'version' => '2015111601',
+                'debug' => 'false',
+                'signPackage' => $signPackage,
+                'userId' => $userId,
+                'appToken' => $appToken,
+            ));
+        }else{
+
+            $this->renderpartial('getCoupon', array(
+                'version' => '2015111601',
+                'debug' => 'false',
+                'signPackage' => $signPackage,
+                'userId' => $userId,
+                'appToken' => $appToken,
+                'coupon_id' => $coupon_id,
+            ));
+        }
+
+
+
+    }
+
+    //检查微信登录页
+    public function actionWxIndex() {
+
+        $wxConfig = Yii::app()->params['wxConfig'];
+        $home_page = Yii::app()->getRequest()->getParam("home_page",'');
+        $coupon_id = Yii::app()->request->getParam('coupon_id', '');
+        $redirectURI = 'http://' . $_SERVER['HTTP_HOST'] . Yii::app()->request->baseUrl . '/index.php?r=/common/activity/getCoupon&coupon_id='.$coupon_id;
+
+        if($home_page){
+            $appURI = Yii::app()->request->baseUrl . '/common/activity/getCoupon'.'&home_page='.$home_page;
+            $redirectURI = $redirectURI.'/'.$home_page;
+        }else{
+
 
+            $appURI = Yii::app()->request->baseUrl . '/common/activity/getCoupon&coupon_id='.$coupon_id;
+        }
+        $scope = 'snsapi_userinfo';
+        $state = 'yiguanjia';
+        echo "1";
+        var_dump($redirectURI);exit;
+        $codeURI = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' . $wxConfig['appId'] . '&redirect_uri=' . urlencode($redirectURI) . '&response_type=code&scope=' . $scope . '&state=' . $state . '#wechat_redirect';
 
+        $this->renderpartial('wxIndex', array(
+            'codeURI' => $codeURI,
+            'appURI' => $appURI
+        ));
     }
 
 }

文件差異過大導致無法顯示
+ 15 - 0
www/protected/modules/common/views/activity/getCoupon.php


+ 20 - 0
www/protected/modules/common/views/activity/index.php

@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<!--HTML5 doctype-->
+<html>
+
+<head>
+    <title>壹管家</title>
+    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
+    <meta http-equiv="Pragma" content="no-cache">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+</head>
+
+<body>
+    <h1>扫码关注壹管家获取更多资讯</h1>
+    <img src="<?php echo Yii::app()->request->baseUrl; ?>/images/qryiguanjia.jpg" class="index_logo" />
+</body>
+
+</html>

+ 31 - 0
www/protected/modules/common/views/activity/wxIndex.php

@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<!--HTML5 doctype-->
+<html>
+
+<head>
+    <title>壹管家</title>
+    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
+    <meta http-equiv="Pragma" content="no-cache">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+</head>
+
+<body>
+    <script type="text/javascript">
+    (function(){
+        var codeURI = '<?php echo $codeURI; ?>';
+        var appURI = '<?php echo $appURI; ?>';
+        var wxUserID = localStorage.getItem('wxUserID');
+
+        if (wxUserID) {
+            location.href = appURI;
+        } else {
+            location.href = codeURI;
+        }
+    })();
+    </script>
+</body>
+
+</html>

+ 4 - 4
www/webapp/common/js/config.js

@@ -26,10 +26,10 @@ define(function (require) {
   }
 
   var ua = navigator.userAgent.toLowerCase();
-
   if (ua.match(/MicroMessenger/i) == 'micromessenger') {
     isWX = true;
-    // require(['../../common/js/jweixin-1.0.0'], function(wx) {
+    require(['http://res.wx.qq.com/open/js/jweixin-1.0.0.js'], function(wx) {
+      if (typeof wx === 'undefined') return;
       var wxSignObject = document.getElementById('wxMain');
       if (wxSignObject) {
         var wxConfig = JSON.parse(wxSignObject.getAttribute('data-sign'));
@@ -92,7 +92,7 @@ define(function (require) {
               }
           });
           wx.onMenuShareTimeline({
-            title: '宠物上门服务,首选壹管家APP',
+            title: '家政服务,首选壹管家APP',
             link: 'http://common.yiguanjia.me/o2o/web/index',
             imgUrl: 'http://wozhua-others.qiniudn.com/icon-o2o-home.jpg'
           });
@@ -104,7 +104,7 @@ define(function (require) {
           });
         });
       }
-    // });
+    });
   }
   // 判断触宝客户端UA
   if (ua.match(/cootekservice/i) == 'cootekservice') {

+ 1 - 1
www/webapp/common/js/spa.js

@@ -2121,7 +2121,7 @@ define(['zepto'], function ($) {
 			hash = url + '#' + hash
 
 			// 如果在页面视图中,并且路由请求和当前路由重复,则不继续执行
-			if (!$curPage.hasClass('spa-panel') && hashhistory.length && '#' + hashhistory[hashhistory.length - 1] === hash) {
+			if ($curPage && !$curPage.hasClass('spa-panel') && hashhistory.length && '#' + hashhistory[hashhistory.length - 1] === hash) {
 				return
 			}
 

文件差異過大導致無法顯示
+ 0 - 0
www/webapp/o2o/dist/js/api.js


文件差異過大導致無法顯示
+ 0 - 0
www/webapp/o2o/dist/js/build/template.js


文件差異過大導致無法顯示
+ 0 - 0
www/webapp/o2o/dist/js/config.js


文件差異過大導致無法顯示
+ 0 - 0
www/webapp/o2o/dist/js/main.js


文件差異過大導致無法顯示
+ 0 - 0
www/webapp/o2o/dist/js/model/user.js


+ 1 - 1
www/webapp/o2o/dist/js/page/agreement.js

@@ -1 +1 @@
-define(["template","native","config"],function(e,t,n){function r(e){e.preventDefault(),$(document).trigger("spa:navigate",{hash:"placeOrder"})}return{title:"壹管家上门服务",body:"",init:function(i,s){var o=this,u=$(document),a=e("agreement/index",{showNavBar:!n.isWX&&!n.isChubao});$(".spa-page-body",o).html(a),setTimeout(function(){i.scroll=new IScroll("#agreementScroll")},50),$.newTouch(".back-button",function(e){r.call(this,e)},o),o.on("tapBackButton",function(e){r.call(this,e)}),o.on("swipeRight",function(e){r.call(this,e)}),$.newTouch(".service-telephone",function(e){e.preventDefault(),t.call("4000328170")},o),s.resolve()}}});
+define(["$","template","native","config","api"],function(e,t,n,r,i){function s(t){t.preventDefault(),e(document).trigger("spa:navigate",{hash:"placeOrder"})}return{title:"壹管家上门服务",body:"",init:function(i,o){var u=this,a=e(document),f=t("agreement/index",{showNavBar:!r.isWX&&!r.isChubao});e(".spa-page-body",u).html(f),setTimeout(function(){i.scroll=new IScroll("#agreementScroll")},50),e.newTouch(".back-button",function(e){s.call(this,e)},u),u.on("tapBackButton",function(e){s.call(this,e)}),u.on("swipeRight",function(e){s.call(this,e)}),e.newTouch(".service-telephone",function(e){e.preventDefault(),n.call("4000328170")},u),o.resolve()},beforeopen:function(e,t){t.resolve()},afteropen:function(n,s){var o=this,u=e(document);u.trigger("spa:openloader"),i.getAgreement({},function(i){if(i.success){var a=t("agreement/index",{showNavBar:!r.isWX});e(".spa-page-body",o).html(a),e(".page-content",o).html(i.data.content),setTimeout(function(){n.scroll=new IScroll("#agreementScroll")},500),s.resolve(),u.trigger("spa:closeloader")}})},beforeclose:function(e,t){t.resolve()}}});

文件差異過大導致無法顯示
+ 0 - 0
www/webapp/o2o/dist/js/spa.js


+ 675 - 653
www/webapp/o2o/js/api.js

@@ -4,658 +4,680 @@
  * date: 2015-04-11
  */
 // define(['config', 'base', '$'], function(config, base, $) {
-define(['config', 'base'], function(config, base) {
-	var API = function() {
-		if (typeof API.instance === 'object') {
-			return API.instance;
-		}
-		API.instance = this;
-		this.isLoading = false;
-	}
-
-	API.prototype = new base();
-
-	var apiErrorResult = {
-		success: false,
-		message: '加载哥遇到瓶颈再来一遍嘛 <( ̄︶ ̄)>'
-	};
-
-	//获取用户信息
-	API.prototype.getUserInfo = function(data, callback) {
-		var that = this;
-		this.isLoading = true;
-		$.signAjax({
-			url: config.apiPath + '/index.php?r=api/user/info',
-			data: data,
-			dataType: 'JSON',
-			success: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(res);
-				}
-			},
-			error: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(apiErrorResult);
-				}
-			}
-		});
-	};
-	API.prototype.getO2oUserInfo = function(data, callback) {
-		var that = this;
-		this.isLoading = true;
-		$.signAjax({
-			url: config.apiPath + '/index.php?r=o2o/user/info',
-			data: data,
-			dataType: 'JSON',
-			success: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(res);
-				}
-			},
-			error: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(apiErrorResult);
-				}
-			}
-		});
-	};
-
-	API.prototype.getHelp = function(data, callback) {
-		var that = this;
-		this.isLoading = true;
-		$.signAjax({
-			url: config.apiPath + '/index.php?r=api/common/staticSource&key=help_center',
-			data: data,
-			dataType: 'JSON',
-			success: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(res);
-				}
-			},
-			error: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(apiErrorResult);
-				}
-			}
-		});
-	};
-
-	API.prototype.getAbout = function(data, callback) {
-		var that = this;
-		this.isLoading = true;
-		$.signAjax({
-			url: config.apiPath + '/index.php?r=api/common/staticSource&key=about_us',
-			data: data,
-			dataType: 'JSON',
-			success: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(res);
-				}
-			},
-			error: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(apiErrorResult);
-				}
-			}
-		});
-	};
-
-	//获取优惠券列表
-	API.prototype.getCouponList = function(data, callback) {
-		var that = this;
-		$.signAjax({
-			url: config.apiPath + '/index.php?r=o2o/order/usableCoupon',
-			data: data,
-			dataType: 'JSON',
-			success: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(res);
-				}
-			},
-			error: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(apiErrorResult);
-				}
-			}
-		});
-	};
-
-	//兑换优惠券
-	API.prototype.exchangeCoupon = function(data, callback) {
-		var that = this;
-		$.signAjax({
-			url: config.apiPath + '/index.php?r=o2o/user/exchangeCoupon',
-			data: data,
-			dataType: 'JSON',
-			success: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(res);
-				}
-			},
-			error: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(apiErrorResult);
-				}
-			}
-		});
-	};
-
-	//检查用户的地址是否在服务站内
-	API.prototype.checkAddress = function (data, callback) {
-		var that = this;
-		$.signAjax({
-			url: config.apiPath + '/index.php?r=o2o/order/checkAddress',
-			data: data,
-			dataType: 'JSON',
-			success: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(res);
-				}
-			},
-			error: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(apiErrorResult);
-				}
-			}
-		});
-	};
-
-	//提交订单
-	API.prototype.addOrder = function(data, callback) {
-		var that = this;
-		$.signAjax({
-			url: config.apiPath + '/index.php?r=o2o/order/add',
-			data: data,
-			dataType: 'JSON',
-			success: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(res);
-				}
-			},
-			error: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(apiErrorResult);
-				}
-			}
-		});
-	};
-
-	//取消订单
-	API.prototype.cancelOrder = function(data, callback) {
-		var that = this;
-		$.signAjax({
-			url: config.apiPath + '/index.php?r=o2o/order/del',
-			data: data,
-			dataType: 'JSON',
-			success: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(res);
-				}
-			},
-			error: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(apiErrorResult);
-				}
-			}
-		});
-	};
-
-  // 追加订单
-  API.prototype.appendOrder = function(data, callback) {
-    var that = this;
-    $.signAjax({
-      url: config.apiPath + '/index.php?r=o2o/order/append',
-      data: data,
-      dataType: 'JSON',
-      success: function(res) {
-        that.isLoading = false;
-        if (callback) {
-          callback(res);
+define(['config', 'base'], function (config, base) {
+    var API = function () {
+        if (typeof API.instance === 'object') {
+            return API.instance;
         }
-      },
-      error: function(res) {
-        that.isLoading = false;
-        if (callback) {
-          callback(apiErrorResult);
-        }
-      }
-    });
-  };
-
-  // 订单详情
-  API.prototype.getOrderDetail = function(data, callback) {
-    var that = this;
-    $.signAjax({
-      url: config.apiPath + '/index.php?r=o2o/order/detail',
-      data: data,
-      dataType: 'JSON',
-      success: function(res) {
-        that.isLoading = false;
-        if (callback) {
-          callback(res);
-        }
-      },
-      error: function(res) {
-        that.isLoading = false;
-        if (callback) {
-          callback(apiErrorResult);
-        }
-      }
-    });
-  };
-
-	//获取支付信息
-	API.prototype.getPayCharge = function(data, callback) {
-		var that = this;
-		$.signAjax({
-			url: config.apiPath + '/index.php?r=o2o/order/pay',
-			data: data,
-			dataType: 'JSON',
-			success: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(res);
-				}
-			},
-			error: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(apiErrorResult);
-				}
-			}
-		});
-	};
-
-  // 获取追加订单信息
-  API.prototype.getAppendPayCharge = function(data, callback) {
-    var that = this;
-    $.signAjax({
-      url: config.apiPath + '/index.php?r=o2o/order/appendPay',
-      data: data,
-      dataType: 'JSON',
-      success: function(res) {
-        that.isLoading = false;
-        if (callback) {
-          callback(res);
-        }
-      },
-      error: function(res) {
-        that.isLoading = false;
-        if (callback) {
-          callback(apiErrorResult);
-        }
-      }
-    });
-  };
-
-	//获取我的订单列表
-	API.prototype.getMyOrderList = function(data, callback) {
-		var that = this;
-		$.signAjax({
-			url: config.apiPath + '/index.php?r=o2o/order/list',
-			data: data,
-			dataType: 'JSON',
-			success: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(res);
-				}
-			},
-			error: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(apiErrorResult);
-				}
-			}
-		});
-	};
-
-	//发表评价
-	API.prototype.postReview = function(data, callback) {
-		var that = this;
-		$.signAjax({
-			url: config.apiPath + '/index.php?r=o2o/product/comment',
-			data: data,
-			dataType: 'JSON',
-			success: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(res);
-				}
-			},
-			error: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(apiErrorResult);
-				}
-			}
-		});
-	};
-
-	//评价列表
-	API.prototype.getReviewList = function(data, callback) {
-		var that = this;
-		$.signAjax({
-			url: config.apiPath + '/index.php?r=o2o/product/commentList',
-			data: data,
-			dataType: 'JSON',
-			success: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(res);
-				}
-			},
-			error: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(apiErrorResult);
-				}
-			}
-		});
-	};
-
-	//地址列表
-	API.prototype.getAddressList = function(data, callback) {
-		var that = this;
-		$.signAjax({
-			url: config.apiPath + '/index.php?r=api/shop/addressList',
-			data: data,
-			dataType: 'JSON',
-			success: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(res);
-				}
-			},
-			error: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(apiErrorResult);
-				}
-			}
-		});
-	};
-
-	//新增地址
-	API.prototype.addAddress = function(data, callback) {
-		var that = this;
-		$.signAjax({
-			url: config.apiPath + '/index.php?r=api/shop/addAddress',
-			data: data,
-			dataType: 'JSON',
-			success: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(res);
-				}
-			},
-			error: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(apiErrorResult);
-				}
-			}
-		});
-	};
-
-	//删除地址
-	API.prototype.deleteAddress = function(data, callback) {
-		var that = this;
-		$.signAjax({
-			url: config.apiPath + '/index.php?r=api/shop/delAddress',
-			data: data,
-			dataType: 'JSON',
-			success: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(res);
-				}
-			},
-			error: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(apiErrorResult);
-				}
-			}
-		});
-	};
-
-	// 修改地址
-	API.prototype.editAddress = function(data, callback) {
-		var that = this;
-		$.signAjax({
-			url: config.apiPath + '/index.php?r=api/shop/editAddress',
-			data: data,
-			dataType: 'JSON',
-			success: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(res);
-				}
-			},
-			error: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(apiErrorResult);
-				}
-			}
-		});
-	};
-
-  // 获取上传图片token
-  API.prototype.gettoken = function(data, callback) {
-    var that = this;
-    $.signAjax({
-      url: config.apiPath + '/index.php?r=api/upload/gettoken',
-      data: data,
-      dataType: 'JSON',
-      success: function(res) {
-        that.isLoading = false;
-        if (callback) {
-          callback(res);
-        }
-      },
-      error: function(res) {
-        that.isLoading = false;
-        if (callback) {
-          callback(apiErrorResult);
-        }
-      }
-    });
-  };
-
-  // 退款
-  API.prototype.refundOrder = function(data, callback) {
-    var that = this;
-    $.signAjax({
-      url: config.apiPath + '/index.php?r=o2o/order/retrieve',
-      data: data,
-      dataType: 'JSON',
-      success: function(res) {
-        that.isLoading = false;
-        if (callback) {
-          callback(res);
-        }
-      },
-      error: function(res) {
-        that.isLoading = false;
-        if (callback) {
-          callback(apiErrorResult);
-        }
-      }
-    });
-  };
-
-  // 确认完成
-  API.prototype.finishOrder = function(data, callback) {
-    var that = this;
-    $.signAjax({
-      url: config.apiPath + '/index.php?r=o2o/order/confirmComplete',
-      data: data,
-      dataType: 'JSON',
-      success: function(res) {
-        that.isLoading = false;
-        if (callback) {
-          callback(res);
-        }
-      },
-      error: function(res) {
-        that.isLoading = false;
-        if (callback) {
-          callback(apiErrorResult);
-        }
-      }
-    });
-  };
-
-  // 触宝 获取加密支付信息
-  API.prototype.getTradeStr = function(data, callback) {
-    var that = this;
-    $.signAjax({
-      url: config.apiPath + '/index.php?r=o2o/chubao/chubaoPay',
-      data: data,
-      dataType: 'JSON',
-      success: function(res) {
-        that.isLoading = false;
-        if (callback) {
-          callback(res);
-        }
-      },
-      error: function(res) {
-        that.isLoading = false;
-        if (callback) {
-          callback(apiErrorResult);
-        }
-      }
-    });
-  };
-
-  // 选择保洁师
-  API.prototype.selectTech = function(data, callback) {
-    var that = this;
-    $.signAjax({
-      url: config.apiPath + '/index.php?r=o2o/order/selectTech',
-      data: data,
-      dataType: 'JSON',
-      success: function(res) {
-        that.isLoading = false;
-        if (callback) {
-          callback(res);
-        }
-      },
-      error: function(res) {
-        that.isLoading = false;
-        if (callback) {
-          callback(apiErrorResult);
-        }
-      }
-    });
-  };
-
-  API.prototype.techComment = function(data, callback) {
-    var that = this;
-    $.signAjax({
-      url: config.apiPath + '/index.php?r=o2o/order/techComment',
-      data: data,
-      dataType: 'JSON',
-      success: function(res) {
-        that.isLoading = false;
-        if (callback) {
-          callback(res);
-        }
-      },
-      error: function(res) {
-        that.isLoading = false;
-        if (callback) {
-          callback(apiErrorResult);
-        }
-      }
-    });
-  };
-
-  //创建充值卡订单
-	API.prototype.addRechargeorder = function(data, callback) {
-		var that = this;
-		$.signAjax({
-			url: config.apiPath + '/index.php?r=o2o/recharge/addRechargeorder',
-			data: data,
-			dataType: 'JSON',
-			success: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(res);
-				}
-			},
-			error: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(apiErrorResult);
-				}
-			}
-		});
-	};
-
-	//充值卡支付
-	API.prototype.payRecharge = function(data, callback) {
-		var that = this;
-		$.signAjax({
-			url: config.apiPath + '/index.php?r=o2o/recharge/payRecharge',
-			data: data,
-			dataType: 'JSON',
-			success: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(res);
-				}
-			},
-			error: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(apiErrorResult);
-				}
-			}
-		});
-	};
-
-	//充值卡列表
-	API.prototype.getRechargeList = function(data, callback) {
-		var that = this;
-		$.signAjax({
-			url: config.apiPath + '/index.php?r=o2o/recharge/rechargeList',
-			data: data,
-			dataType: 'JSON',
-			success: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(res);
-				}
-			},
-			error: function(res) {
-				that.isLoading = false;
-				if (callback) {
-					callback(apiErrorResult);
-				}
-			}
-		});
-	};
-
-  return new API();
+        API.instance = this;
+        this.isLoading = false;
+    }
+
+    API.prototype = new base();
+
+    var apiErrorResult = {
+        success: false,
+        message: '加载哥遇到瓶颈再来一遍嘛 <( ̄︶ ̄)>'
+    };
+
+    //获取用户信息
+    API.prototype.getUserInfo = function (data, callback) {
+        var that = this;
+        this.isLoading = true;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=api/user/info',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+    API.prototype.getO2oUserInfo = function (data, callback) {
+        var that = this;
+        this.isLoading = true;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=o2o/user/info',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    API.prototype.getAgreement = function (data, callback) {
+        var that = this;
+        this.isLoading = true;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=api/common/staticSource&key=agreement',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    API.prototype.getHelp = function (data, callback) {
+        var that = this;
+        this.isLoading = true;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=api/common/staticSource&key=help_center',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    API.prototype.getAbout = function (data, callback) {
+        var that = this;
+        this.isLoading = true;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=api/common/staticSource&key=about_us',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    //获取优惠券列表
+    API.prototype.getCouponList = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=o2o/order/usableCoupon',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    //兑换优惠券
+    API.prototype.exchangeCoupon = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=o2o/user/exchangeCoupon',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    //检查用户的地址是否在服务站内
+    API.prototype.checkAddress = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=o2o/order/checkAddress',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    //提交订单
+    API.prototype.addOrder = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=o2o/order/add',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    //取消订单
+    API.prototype.cancelOrder = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=o2o/order/del',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    // 追加订单
+    API.prototype.appendOrder = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=o2o/order/append',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    // 订单详情
+    API.prototype.getOrderDetail = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=o2o/order/detail',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    //获取支付信息
+    API.prototype.getPayCharge = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=o2o/order/pay',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    // 获取追加订单信息
+    API.prototype.getAppendPayCharge = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=o2o/order/appendPay',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    //获取我的订单列表
+    API.prototype.getMyOrderList = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=o2o/order/list',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    //发表评价
+    API.prototype.postReview = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=o2o/product/comment',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    //评价列表
+    API.prototype.getReviewList = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=o2o/product/commentList',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    //地址列表
+    API.prototype.getAddressList = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=api/shop/addressList',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    //新增地址
+    API.prototype.addAddress = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=api/shop/addAddress',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    //删除地址
+    API.prototype.deleteAddress = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=api/shop/delAddress',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    // 修改地址
+    API.prototype.editAddress = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=api/shop/editAddress',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    // 获取上传图片token
+    API.prototype.gettoken = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=api/upload/gettoken',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    // 退款
+    API.prototype.refundOrder = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=o2o/order/retrieve',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    // 确认完成
+    API.prototype.finishOrder = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=o2o/order/confirmComplete',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    // 触宝 获取加密支付信息
+    API.prototype.getTradeStr = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=o2o/chubao/chubaoPay',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    // 选择保洁师
+    API.prototype.selectTech = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=o2o/order/selectTech',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    API.prototype.techComment = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=o2o/order/techComment',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    //创建充值卡订单
+    API.prototype.addRechargeorder = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=o2o/recharge/addRechargeorder',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    //充值卡支付
+    API.prototype.payRecharge = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=o2o/recharge/payRecharge',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    //充值卡列表
+    API.prototype.getRechargeList = function (data, callback) {
+        var that = this;
+        $.signAjax({
+            url: config.apiPath + '/index.php?r=o2o/recharge/rechargeList',
+            data: data,
+            dataType: 'JSON',
+            success: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(res);
+                }
+            },
+            error: function (res) {
+                that.isLoading = false;
+                if (callback) {
+                    callback(apiErrorResult);
+                }
+            }
+        });
+    };
+
+    return new API();
 })

文件差異過大導致無法顯示
+ 0 - 1
www/webapp/o2o/js/build/template.js


+ 1 - 0
www/webapp/o2o/js/main.js

@@ -1,5 +1,6 @@
 require.config({
   urlArgs: 'v=' + (new Date()).getTime(),
+  waitSeconds: 0,
   paths: {
     zepto: '../../common/js/zepto.min',
     wx: '../../common/js/jweixin-1.0.0',

+ 1 - 1
www/webapp/o2o/js/model/user.js

@@ -8,7 +8,7 @@ define(['base', '$', 'native', 'api', 'order', 'config', 'address'], function(ba
     }
     User.instance = this;
     this.storagePrefix = 'user_';
-    this.id = ''; //57e22bb59f5160c2048b456c
+    this.id = '57e22bb59f5160c2048b456c'; //57e22bb59f5160c2048b456c
     this.lastID = this.getCache('lastID', null, '');
     this.name = '';
     this.mobile = '';

+ 28 - 1
www/webapp/o2o/js/page/agreement.js

@@ -1,4 +1,4 @@
-define(['template', 'native', 'config'], function (template, native, config) {
+define(['$', 'template', 'native', 'config', 'api'], function ($, template, native, config, api) {
 	function back(event) {
 		event.preventDefault();
 
@@ -43,6 +43,33 @@ define(['template', 'native', 'config'], function (template, native, config) {
 				native.call('4000328170');
 			}, $view);
 
+			dtd.resolve();
+		},
+		beforeopen: function (pageData, dtd) {
+			dtd.resolve();
+		},
+		afteropen: function (pageData, dtd) {
+			var $view = this;
+			var $doc = $(document);
+			$doc.trigger('spa:openloader');
+			api.getAgreement({}, function (res) {
+				if (res.success) {
+					var tpl = template('agreement/index', {
+						showNavBar: !config.isWX
+					});
+					$('.spa-page-body', $view).html(tpl);
+					$('.page-content', $view).html(res.data.content);
+
+					setTimeout(function () {
+						pageData.scroll = new IScroll('#agreementScroll');
+					}, 500);
+
+					dtd.resolve();
+					$doc.trigger('spa:closeloader');
+				}
+			});
+		},
+		beforeclose: function (pageData, dtd) {
 			dtd.resolve();
 		}
 	}

+ 1 - 30
www/webapp/o2o/tpl/agreement/index.html

@@ -10,36 +10,7 @@
 <div class="content" id="agreementScroll">
     <div class="scroller">
         <div class="page-content">
-            1、阅读提示<br />
-            如您阅读以下文件有困难,请通过您的移动设备致电<a class="service-telephone">400-032-8170</a>联系我们的客服,我们将为您详细解答。本协议系由用户与壹管家APP【上海灿通文化传播有限公司】提供的服务所达成的协议。<br />
-            欢迎申请使用壹管家APP【上海灿通文化传播有限公司】(下列简称为“我们”或“服务人员”)提供的服务。请您(下列简称为“客户”)仔细阅读以下全部内容。如客户不同意本协议之任意内容,请勿支付相关订单费用。如客户进入我们的程序并勾选“我同意本协议的全部条款”,即表示客户与我们已达成协议,用户选择同意本协议,表明用户自愿承诺接受本协议,如发生纠纷,用户不得以未仔细阅读本协议为由实行抗辩。<br />
-            <br />
-            2、下单前提示<br />
-            2.1 为了确保我们能为宠物顺利进行服务。客户必须确保宠物没有任何攻击性,客户家里卫生间的空间足够让我们给宠物提供洗澡服务的操作;如空间不足,无法进行操作,我们有权取消订单并按照订单金额扣除50%的费用。<br />
-            2.2 客户务必在我们提供服务之前与我们沟通您宠物的特殊性格与脾气秉性以及洗澡前身体状况等;客户保证其宠物是完全健康的,且没有任何疾病,否则因此造成的所有损失均由客户承担。<br />
-            2.3 客户在订单约定的服务时间之前2小时取消订单的,我们将全额退款;客户在订单约定的服务时间2小时以内取消订单的,我们将按照订单额度退还客户50%的费用;<br />
-            2.4 以下不在壹管家上门服务范围内:a.体重超过10kg的狗/猫;b.怀孕期的母狗/猫,c.疫苗未完成的幼犬/猫(最后一针疫苗完成后10天方可服务;免疫续证期间确认接种疫苗10天后可服务)d.高龄犬(10岁以上)不提供服务。e. 具有强烈攻击性的犬猫不提供服务。<br />
-            <br />
-            3、服务进行时提示<br />
-            3.1 如果宠物的品种/体重与订单存在较大差异,超出服务范围的,服务人员有权向<a class="service-telephone">400-032-8170</a>申请更改订单,如不愿接受,服务人员有权取消订单,并按照订单金额扣除50%的费用。<br />
-            3.2 如果宠物因长期不打理造成毛发打结,我们将额外收取开结费,每小时收费60元。宠物毛发打结严重,客户拒绝支付开结费用的,我们有权放弃订单并按照订单金额扣除50%的费用;<br />
-            3.3 如果我们的服务人员在工作时发现客户的宠物有主动攻击倾向,经过尝试无法服务的,我们有权停止工作并扣除50%订单金额;如发现宠物有健康隐患时(例如:心脏病,癫痫,明显外伤,以及传染病等)我们有权停止服务并扣除50%订单金额;如若客户仍坚持需要进行服务,须签订免责协议;<br />
-            3.4因天气原因(根据气象台,橙色或者橙色以上预警)造成订单时间更改 ,给您造成的不变敬请谅解,如需取消订单,我方将全额退款。<br />
-            <br />
-            4、双方的责任义务<br />
-            4.1 我们的服务人员在服务过程中,因客户或宠物的原因导致服务人员受伤,服务人员有权立刻中止、终止工作,并联系公司相关负责人。公司会根据情况决定是否安排其他服务人员继续前往工作,同时服务人员的医疗费用(仅限于轻微伤的情况,医疗费用仅限于打狂犬疫苗,简单的缝合处理)由我方承担;如咬伤抓伤等情况达到轻伤及轻伤以上的情况下,客户需要承担全部的人身损害赔偿责任;<br />
-            4.2 如果在洗澡过程中,因客户或其宠物的原因,使客户的宠物出现受伤、死亡等状况,我们会及时协助处理,产生的所有损失由客户承担。如果因为我们的服务人员的问题,导致客户的宠物受到严重的烫伤或划伤或死亡的,我们将配合客户予以救治,并赔偿因此给客户造成的直接损失(该损失仅包括因治疗产生的医疗费,不包括间接损失及其他任何名义的费用)。<br />
-            4.3 在服务过程如果出现服务人员未按服务流程操作,客户有权直接拨打<a class="service-telephone">400-032-8170</a>进行投诉;<br />
-            4.4 用户有权向壹管家APP提出合理化意见和建议,有权对壹管家APP的服务进行善意的监督;<br />
-            4.5 凡客户以任何方式登陆壹管家APP并支付订单服务费用的,视为客户自愿接受我们的客户协议,客户应一并遵守;<br />
-            4.6 本协议未涉及的问题可依据国家有关法律法规,当本条款与国家法律法规冲突时,依据国家法律法规为准;<br />
-            4.7 因不可抗力的原因造成对宠物的伤害使服务终止。我们不承担任何责任,但将尽力减少因此而给用户造成的损失;<br />
-            <br />
-            5、其他<br />
-            5.1 本协议声明以及其修改权、更新权及最终解释权归上海灿通文化传播有限公司所有。<br />
-            5.2 我们不行使、未能及时行使或者未充分行使本协议或者按照法律规定所享有的权利,不应被视为放弃该权利,也不影响我们在将来行使该权利。<br />
-            5.3 如本协议中的任何条款无论因何种原因完全或部分无效或不具有执行力,本协议的其余条款仍应有效且具有约束力,我们及客户均应尽力使该条款设定的本意得到实现。<br />
-            5.4 本协议中的标题仅为方便而设,不作为解释本条款的依据。
+
         </div>
     </div>
 </div>

+ 2 - 1
www/webapp/o2o/tpl/recharge/cell.html

@@ -1,5 +1,6 @@
 {{ each recharges as recharge i }}
-<li class="table-view-cell media">
+<li class="table-view-cell media btn-add-recharge" data-id="{{ recharge.id }}" data-value="{{ recharge.denomination }}"
+    data-index="{{ i }}">
     <a class="address-item">
         <div class="media-body">
 			<span class="denomination" style="font-size: 18px; color: #59616c">充值{{ recharge.denomination }}元</span>

部分文件因文件數量過多而無法顯示