浏览代码

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

Charlie 8 年之前
父节点
当前提交
f202415661

文件差异内容过多而无法显示
+ 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/main.js


+ 1 - 1
www/webapp/o2o/dist/js/model/order.js

@@ -1 +1 @@
-define(["base","$","native","product","api"],function(e,t,n,r,i){var s=function(){if(typeof s.instance=="object")return s.instance;s.instance=this,this.storagePrefix="order_",this.memo="",this.cost=0,this.price=0,this.couponValue=0,this.payValue=0,this.bookingDate="",this.bookingTime="",this.bookingTimeStr="",this.address=this.getCache("address",null),this.productType="",this.productID="",this.productCount=1,this.couponID="",this.stationID=this.getCache("stationID",null,""),this.cacheReview=this.getCache("cacheReview",null,""),this.precedence="",this.extraService=[],this.extraServiceType=[],this.serviceName="",this.servicePrice="",this.appendID="",this.beautician={name:"请选择",id:""}};return s.prototype=new e,s.prototype.reset=function(){this.couponID="",this.bookingTime="",this.bookingTimeStr="",this.bookingDate="",this.productType="",this.productID="",this.extraService=[],this.serviceName="",this.servicePrice="",this.productCount=1,this.precedence="",this.extraServiceType=[],this.beautician={name:"",id:""}},s.prototype.addOrder=function(e,t,n){var r=this,s=[{product_id:this.productID,count:this.productCount}],o=[];this.couponID!=""&&o.push(this.couponID);var u="";this.appendID&&(u=JSON.stringify([{type:this.appendID,price:this.price}])),i.addOrder({balance:this.payValue,products:JSON.stringify(s),memo:this.memo,precedence:"0",booking_time:this.bookingDate+" "+this.bookingTime+":00",address_id:this.address.address_id,coupons:JSON.stringify(o),station:this.stationID,type:this.productType,counts:this.productCount,extra:u,tech_id:this.beautician.id,user_id:e,order_channel:t},function(e){e.success&&(r.id=e.data.id),typeof n=="function"&&n(e)})},s.prototype.appendOrder=function(e,t,n,r){var s=this;i.appendOrder({order_id:e,products:n,user_id:t},function(e){e.success&&(s.appendID=e.data.id),typeof r=="function"&&r(e)})},new s});
+define(["base","$","native","product","api"],function(e,t,n,r,i){var s=function(){if(typeof s.instance=="object")return s.instance;s.instance=this,this.storagePrefix="order_",this.memo="",this.cost=0,this.price=0,this.couponValue=0,this.balance=0,this.payValue=0,this.bookingDate="",this.bookingTime="",this.bookingTimeStr="",this.address=this.getCache("address",null),this.productType="",this.productID="",this.productCount=1,this.couponID="",this.stationID=this.getCache("stationID",null,""),this.cacheReview=this.getCache("cacheReview",null,""),this.precedence="",this.extraService=[],this.extraServiceType=[],this.serviceName="",this.servicePrice="",this.appendID="",this.beautician={name:"请选择",id:""}};return s.prototype=new e,s.prototype.reset=function(){this.couponID="",this.bookingTime="",this.bookingTimeStr="",this.bookingDate="",this.productType="",this.productID="",this.extraService=[],this.serviceName="",this.servicePrice="",this.productCount=1,this.precedence="",this.extraServiceType=[],this.beautician={name:"",id:""}},s.prototype.addOrder=function(e,t,n){var r=this,s=[{product_id:this.productID,count:this.productCount}],o=[];this.couponID!=""&&o.push(this.couponID);var u="";this.appendID&&(u=JSON.stringify([{type:this.appendID,price:this.price}])),i.addOrder({balance:this.balance,products:JSON.stringify(s),memo:this.memo,precedence:"0",booking_time:this.bookingDate+" "+this.bookingTime+":00",address_id:this.address.address_id,coupons:JSON.stringify(o),station:this.stationID,type:this.productType,counts:this.productCount,extra:u,tech_id:this.beautician.id,user_id:e,order_channel:t},function(e){e.success&&(r.id=e.data.id),typeof n=="function"&&n(e)})},s.prototype.appendOrder=function(e,t,n,r){var s=this;i.appendOrder({order_id:e,products:n,user_id:t},function(e){e.success&&(s.appendID=e.data.id),typeof r=="function"&&r(e)})},new s});

文件差异内容过多而无法显示
+ 0 - 0
www/webapp/o2o/dist/js/model/user.js


文件差异内容过多而无法显示
+ 0 - 1
www/webapp/o2o/dist/js/page/myCoupon.js


文件差异内容过多而无法显示
+ 0 - 0
www/webapp/o2o/dist/js/page/myOrder.js


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

@@ -1 +1 @@
-define(["$","template","api","native","config","user"],function(e,t,n,r,i,s){function c(){e(document).trigger("spa:navigate",{hash:o,pushData:{dontNeedReload:!0,animate:"slideOutDown"}})}var o,u,a,f,l=!1;return{title:"壹管家上门服务",body:"",init:function(t,o){function h(e){f.trigger("spa:closeloader");if(e.success){var t=s.getOrderInfo(u),n={orderInfo:t,charge:e.data};r.pay(n,function(e){e.success?f.trigger("spa:navigate",{hash:"paySuccess"}):f.trigger("spa:openpanel",["simpleAlert",{message:e.message}])})}else f.trigger("spa:openpanel",["simpleAlert",{message:e.message}])}var a=this,f=e(document);e.newTouch(".pay-option",function(t){t.preventDefault();var n=e(this).data("value");e(".btn-pay",a).attr("data-pay-channel",n),e(this).addClass("checked").parent().siblings().find("a").removeClass("checked")},a),e.newTouch(".btn-pay",function(t){t.preventDefault();var r=e(this).attr("data-pay-channel");i.isWX&&(r="wx_pub");if(!r)return;f.trigger("spa:openloader");var o={user_id:s.id,order_id:u,pay_channel:r};l?n.payRecharge(o,function(e){h(e)}):n.getPayCharge(o,function(e){h(e)})},a),e.newTouch(".cancel-button",function(e){e.preventDefault(),c.call(this,e)},a),a.on("tapBackButton",function(e){e.preventDefault(),c.call(this,e)}),o.resolve()},beforeopen:function(n,r){var c=this,h=n.pushData;u=h.orderID,o=h.backHash?h.backHash:"",l=h.isRecharge;var p=s.orders[1].data;for(var d=0,v=p.length;d<v;d++)p[d].id==u&&(a=p[d].products[0].product.name,f=p[d].final_price);var m=t("pay/index",{showNavBar:!i.isWX&&!i.isChubao,wxPub:!0,orderType:a,orderPrice:f});e(".spa-page-body",c).html(m),r.resolve()}}});
+define(["$","template","api","native","config","user"],function(e,t,n,r,i,s){function p(){e(document).trigger("spa:navigate",{hash:o,pushData:{dontNeedReload:!0,animate:"slideOutDown"}})}var o,u,a,f,l,c,h=!1;return{title:"壹管家上门服务",body:"",init:function(t,o){function l(e){f.trigger("spa:closeloader");if(e.success){var t=s.getOrderInfo(u),n={orderInfo:t,charge:e.data};r.pay(n,function(e){e.success?f.trigger("spa:navigate",{hash:"paySuccess"}):f.trigger("spa:openpanel",["simpleAlert",{message:e.message}])})}else f.trigger("spa:openpanel",["simpleAlert",{message:e.message}])}var a=this,f=e(document);e.newTouch(".pay-option",function(t){t.preventDefault();var n=e(this).data("value");e(".btn-pay",a).attr("data-pay-channel",n),e(this).addClass("checked").parent().siblings().find("a").removeClass("checked")},a),e.newTouch(".btn-pay",function(t){t.preventDefault();var r=e(this).attr("data-pay-channel");i.isWX&&(r="wx_pub");if(!r)return;f.trigger("spa:openloader");var o={user_id:s.id,order_id:u,pay_channel:r};h?n.payRecharge(o,function(e){l(e)}):n.getPayCharge(o,function(e){l(e)})},a),e.newTouch(".cancel-button",function(e){e.preventDefault(),p.call(this,e)},a),a.on("tapBackButton",function(e){e.preventDefault(),p.call(this,e)}),o.resolve()},beforeopen:function(n,r){var p=this,d=n.pushData;u=d.orderID,o=d.backHash?d.backHash:"",h=d.isRecharge;var v=s.orders[1].data;for(var m=0,g=v.length;m<g;m++)if(v[m].id==u){var y=v[m];a=y.products[0].product.name;if(y.coupons&&y.coupons.length)for(m in y.coupons)f+=y.coupons[m].coupon.value;y.pay_price&&y.pay_price!=0&&(l=y.final_price-y.pay_price),y.pay_price&&y.pay_price!=0?c=y.pay_price:c=y.final_price}var b=t("pay/index",{showNavBar:!i.isWX&&!i.isChubao,wxPub:!0,orderType:a,isRecharge:h,isShow:!h,orderCoupon:f,orderBalance:l,orderPayValue:c});e(".spa-page-body",p).html(b),r.resolve()}}});

文件差异内容过多而无法显示
+ 0 - 0
www/webapp/o2o/dist/js/page/placeOrder.js


+ 0 - 3
www/webapp/o2o/js/api.js

@@ -176,9 +176,6 @@ define(['config', 'base'], function(config, base) {
 
 	//提交订单
 	API.prototype.addOrder = function(data, callback) {
-
-		console.log(data)
-
 		var that = this;
 		$.signAjax({
 			url: config.apiPath + '/index.php?r=o2o/order/add',

文件差异内容过多而无法显示
+ 0 - 383
www/webapp/o2o/js/build/template.js


+ 3 - 2
www/webapp/o2o/js/model/order.js

@@ -13,7 +13,8 @@ define(['base', '$', 'native', 'product', 'api'], function (base, $, native, pro
         this.cost = 0; // 总价
         this.price = 0; // 单价
         this.couponValue = 0; // 代金券
-        this.payValue = 0; // 实际支付
+        this.balance = 0; // 余额支付的费用
+        this.payValue = 0; // 微信支付的费用
 
         this.bookingDate = '';
         this.bookingTime = '';
@@ -79,7 +80,7 @@ define(['base', '$', 'native', 'product', 'api'], function (base, $, native, pro
         }
 
         api.addOrder({
-            balance: this.payValue,
+            balance: this.balance,
             products: JSON.stringify(productParam),
             memo: this.memo,
             precedence: '0',

+ 34 - 65
www/webapp/o2o/js/model/user.js

@@ -42,9 +42,12 @@ define(['base', '$', 'native', 'api', 'order', 'config', 'address'], function(ba
       }
     };
     this.appendOrder = {};//追加订单
-    this.coupons = [];//优惠券
-    this.orderCoupons = [];// 优惠券顺序
-    this.unuseable_coupons = []; //优惠券不可用
+
+    this.orderCoupons = [];// 所有优惠券按顺序排好
+    this.usable_coupons = [];// 可用优惠券
+    this.used_coupons = [];// 用过的优惠券
+    this.overtime_coupons = [];// 过期的优惠券
+
     this.activities = this.getCache('activities', null, {//活动
       "visited_dog": false,
       "visited_order0104": false
@@ -144,41 +147,27 @@ define(['base', '$', 'native', 'api', 'order', 'config', 'address'], function(ba
         break;
       }
     }
-
     return couponValue;
   };
 
+  //获取各类产品的优惠券
+  User.prototype.getProductCoupon = function(products, time, type, callback){
+    var that = this;
+    api.getCouponList({
+      products: products,//产品
+      booking_time: time,//预订时间
+      user_id: this.id,//用户id
+      type: type//资源
+    }, function(res) {
+      if (res.success) {
+        that.orderCoupons = res.data;//订购优惠券
+        that.unuseable_coupons = res.unuseable_coupons;//不可用的优惠券
+      }
 
-  //获取最多可以使用的优惠券
-  User.prototype.getMaxAvailableCoupon = function () {
-    var couponSelectVal = 0;
-    var couponTmp = 0;
-    $.each(this.orderCoupons, function(index, val) {
-      if (val.coupon.value > couponSelectVal) {
-        couponSelectVal = val.coupon.value;
-        couponTmp = index;
-      };
-    });
-    return {
-      couponSelectVal: couponSelectVal,//选择优惠券
-      couponIndex: couponTmp//优惠券索引
-    }
-  };
-
-  //给每一个获取到的优惠券进行排序--index索引
-  User.prototype.getAvailableCoupon = function () {
-    var couponSelectVal = 0;
-    var couponTmp = 0;
-    $.each(this.orderCoupons, function(index, val) {
-      if (val.coupon.value > couponSelectVal) {
-        couponSelectVal = val.coupon.value;
-        couponTmp = index;
-      };
+      if (typeof(callback) == 'function') {//true  回调函数  中将传值res
+        callback(res);
+      }
     });
-    return {
-      couponSelectVal: couponSelectVal,
-      couponIndex: couponTmp
-    }
   };
 
   //优惠券列表
@@ -192,28 +181,28 @@ define(['base', '$', 'native', 'api', 'order', 'config', 'address'], function(ba
       if (res.success) {
         // 现有可用优惠券,按照面额降序排序;已经过期的优惠券,按照过期时间由近到远排序
         var now = new Date().getTime() / 1000;
-        var useable_coupons = res.data.useable_coupons;
-        var used_coupons = res.data.used_coupons;
-        var overtime_coupons = res.data.overtime_coupons;
+        that.usable_coupons = res.data.useable_coupons;
+        that.used_coupons = res.data.used_coupons;
+        that.overtime_coupons = res.data.overtime_coupons;
 
-        useable_coupons.sort(function (a, b) {
+        that.usable_coupons.sort(function (a, b) {
           return b.coupon.value - a.coupon.value;
-        })
+        });
 
-        used_coupons.sort(function (a, b) {
+        that.used_coupons.sort(function (a, b) {
           return a.end_time - b.end_time;
-        })
+        });
 
-        overtime_coupons.sort(function (a, b) {
+        that.overtime_coupons.sort(function (a, b) {
           return a.end_time - b.end_time;
-        })
+        });
 
-        useable_coupons.forEach(function(item, index){
+        that.usable_coupons.forEach(function(item, index){
           var isRemind = (item.end_time - now) / (60 * 60 * 24) <= 7;
           item.isRemind = isRemind;
-        })
+        });
 
-        that.coupons = res.data;
+        that.orderCoupons = that.usable_coupons.concat(that.used_coupons).concat(that.overtime_coupons);
       }
 
       if (typeof(callback) == 'function') {
@@ -222,26 +211,6 @@ define(['base', '$', 'native', 'api', 'order', 'config', 'address'], function(ba
     });
   };
 
-  //获取各类产品的优惠券
-  User.prototype.getProductCoupon = function(products, time, type, callback){
-    var that = this;
-    api.getCouponList({
-      products: products,//产品
-      booking_time: time,//预订时间
-      user_id: this.id,//用户id
-      type: type//资源
-    }, function(res) {
-      if (res.success) {
-        that.orderCoupons = res.data;//订购优惠券
-        that.unuseable_coupons = res.unuseable_coupons;//不可用的优惠券
-      }
-
-      if (typeof(callback) == 'function') {//true  回调函数  中将传值res
-        callback(res);
-      }
-    });
-  };
-
   //兑换优惠券   api预先定义的函数
   User.prototype.exchangeCoupon = function(couponCode, callback){
     var that = this;

+ 4 - 2
www/webapp/o2o/js/page/myCoupon.js

@@ -88,8 +88,10 @@ define(['$', 'template', 'user', 'config', 'IScroll'], function ($, template, us
                     $doc.trigger('spa:closeloader');
                     if (res.success) {
                         var tpl = template('myCoupon/index', {
-                            coupons: user.coupons,
-                            showNavBar: !config.isWX && !config.isChubao
+                            showNavBar: !config.isWX && !config.isChubao,
+                            usable_coupons: user.usable_coupons,
+                            used_coupons: user.used_coupons,
+                            overtime_coupons: user.overtime_coupons
                         });
                         $('.spa-page-body', $view).html(tpl);
                         fixScroll(pageData);

+ 1 - 2
www/webapp/o2o/js/page/myOrder.js

@@ -18,7 +18,6 @@ define(['$', 'template', 'user', 'config', 'native', 'IScroll'], function ($, te
         user.getOrderList(user.id, type, function (res) {
             $doc.trigger('spa:closeloader');
             if (res.success) {
-                console.log(user.orders[type].data)
                 var time = new Date().getTime();
                 var tpl = template('myOrder/list', {
                     orders: user.orders[type].data,
@@ -43,7 +42,7 @@ define(['$', 'template', 'user', 'config', 'native', 'IScroll'], function ($, te
 
                 setTimeout(function () {
                     pageData.scroll = new IScroll('#myOrderScroll');
-                }, 50);
+                }, 1000);
 
                 // if (pageData.scroll) {
                 // 	pageData.scroll.refresh();

+ 23 - 4
www/webapp/o2o/js/page/pay.js

@@ -3,7 +3,9 @@ define(['$', 'template', 'api', 'native', 'config', 'user'], function ($, templa
     var backHash; // 回退页面
     var orderID; // 订单ID
     var orderType; // 订单类型
-    var orderPrice; // 订单价格
+    var orderCoupon; // 使用代金券支付的金额
+    var orderBalance; // 使用余额支付的金额
+    var orderPayValue; // 使用微信支付的金额
     var isRecharge = false; // 是否是充值
 
     function back() {
@@ -104,8 +106,21 @@ define(['$', 'template', 'api', 'native', 'config', 'user'], function ($, templa
             var orders = user.orders[1].data;
             for (var i = 0, len = orders.length; i < len; i++) {
                 if (orders[i].id == orderID) {
-                    orderType = orders[i].products[0].product.name;
-                    orderPrice = orders[i].final_price;
+                    var selectOrder = orders[i];
+                    orderType = selectOrder.products[0].product.name;
+                    if (selectOrder.coupons && selectOrder.coupons.length){
+                        for (i in selectOrder.coupons){
+                            orderCoupon += selectOrder.coupons[i].coupon.value;
+                        }
+                    }
+                    if (selectOrder.pay_price && selectOrder.pay_price != 0){
+                        orderBalance = selectOrder.final_price - selectOrder.pay_price;
+                    }
+                    if (selectOrder.pay_price && selectOrder.pay_price != 0){
+                        orderPayValue = selectOrder.pay_price;
+                    }else {
+                        orderPayValue = selectOrder.final_price;
+                    }
                 }
             }
 
@@ -113,7 +128,11 @@ define(['$', 'template', 'api', 'native', 'config', 'user'], function ($, templa
                 showNavBar: !config.isWX && !config.isChubao,
                 wxPub: true,
                 orderType: orderType,
-                orderPrice: orderPrice
+                isRecharge: isRecharge,
+                isShow: !isRecharge,
+                orderCoupon: orderCoupon,
+                orderBalance: orderBalance,
+                orderPayValue: orderPayValue
             });
             $('.spa-page-body', $view).html(tpl);
 

+ 9 - 25
www/webapp/o2o/js/page/placeOrder.js

@@ -600,19 +600,6 @@ define(['$', 'template', 'order', 'native', 'helper', 'user', 'api', 'config', '
                     callback: {
                         // 选完之后的回调。values:[日期,时间];texts:时间字符串;precedence:是否加急;
                         onSelect: function (values, texts, precedence) {
-                            // var couponValue = 0;
-                            // var precedenceCost = product.precedence;
-                            // if (order.couponID) {
-                            //     couponValue = user.getCouponValue(order.couponID);
-                            // }
-                            // 根据是否加急更新订单详情中的加急模块
-                            // if (precedence) {
-                            //     $('.select-precedence', $view).removeClass('hide').find('.precedence-cost').html('¥' + precedenceCost);
-                            //     $('.order-cost', $view).attr('data-precedence', precedenceCost);
-                            // } else {
-                            //     $('.select-precedence', $view).addClass('hide').find('.precedence-cost').html('¥ 0');
-                            //     $('.order-cost', $view).attr('data-precedence', '0');
-                            // }
                             // 填写order
                             order.bookingDate = values[0];
                             order.bookingTime = values[1];
@@ -636,25 +623,15 @@ define(['$', 'template', 'order', 'native', 'helper', 'user', 'api', 'config', '
                     }]);
                     return;
                 }
-                // 获取用户的优惠券
-                var coupons = $.extend(true, [], user.orderCoupons);
-                // /这不知道是干什么的
-                for (var i in coupons) {
-                    if (coupons[i]['id'] == order.couponID) {
-                        coupons[i]['selected'] = true;
-                        break;
-                    }
-                }
                 // 跳转到picker页面,展示优惠券
                 $doc.trigger('spa:navigate', {
                     hash: 'picker',
                     pushData: {
-                        options: coupons,
-                        unuseables: user.unuseable_coupons,
+                        options: user.usable_coupons,
+                        unuseables: [],
                         temp: 'picker/coupon',
                         title: '选择优惠券',
                         backHash: 'placeOrder',
-                        pickType: 'coupon',
                         products: JSON.stringify([{
                             product_id: order.productID,
                             count: 1
@@ -737,6 +714,13 @@ define(['$', 'template', 'order', 'native', 'helper', 'user', 'api', 'config', '
 
                 /* 向服务器下订单 */
                 $doc.trigger('spa:openloader');
+                if (user.balance >= order.payValue){
+                    order.balance = order.payValue;
+                    order.payValue = 0;
+                }else {
+                    order.balance = user.balance;
+                    order.payValue = order.payValue - order.balance;
+                }
                 order.addOrder(user.id, payChannel, function (res) {
                     $doc.trigger('spa:closeloader');
                     if (res.success) {

+ 3 - 3
www/webapp/o2o/tpl/myCoupon/index.html

@@ -18,7 +18,7 @@
       </div>
       <div class="coupon-items">
         <p class="coupon-info">兑换码的获取请随时关注壹管家的优惠活动。</p>
-        {{ each coupons.useable_coupons as coupon i }}
+        {{ each usable_coupons as coupon i }}
           <div class="card coupon-card">
             <ul class="table-view">
               <li class="table-view-cell coupon-cell">
@@ -27,7 +27,7 @@
             </ul>
           </div>
         {{ /each }}
-        {{ each coupons.used_coupons as coupon i }}
+        {{ each used_coupons as coupon i }}
           <div class="card coupon-card used">
             <ul class="table-view">
               <li class="table-view-cell coupon-cell">
@@ -36,7 +36,7 @@
             </ul>
           </div>
         {{ /each }}
-        {{ each coupons.overtime_coupons as coupon i }}
+        {{ each overtime_coupons as coupon i }}
           <div class="card coupon-card disabled">
             <ul class="table-view">
               <li class="table-view-cell coupon-cell">

+ 1 - 1
www/webapp/o2o/tpl/myOrder/detail.html

@@ -83,7 +83,7 @@
           <li class="table-view-cell">
             <div class="order-label">
               <div class="label-name">总价</div>
-              <div class="label-value">{{order.pay_price}}元</div>
+              <div class="label-value">{{order.final_price}}元</div>
             </div>
           </li>
           <li class="table-view-cell">

+ 48 - 44
www/webapp/o2o/tpl/pay/index.html

@@ -1,52 +1,56 @@
 {{ if showNavBar }}
 <header class="bar bar-nav">
-	<a class="cancel-button left-button">
-		<div class="icon icon-left-nav"></div>
-	</a>
-	<h1 class="title">收银台</h1>
+    <a class="cancel-button left-button">
+        <div class="icon icon-left-nav"></div>
+    </a>
+    <h1 class="title">收银台</h1>
 </header>
 {{ /if }}
 <div class="content">
-	<ul class="table-view ">
-		<li class="table-view-cell order-info">
-			<a><span>订单类型:</span>{{orderType}}</a>
-			<a><span>支付金额:</span>{{orderPrice}}元</a>
-		</li>
-	</ul>
-	{{if chubao}}
+    <ul class="table-view ">
+        <li class="table-view-cell order-info">
+            <div>订单类型:{{orderType}}</div>
+            {{ if isShow }}
+            <div>代金券支付:{{orderCoupon}}元</div>
+            <div>余额支付:{{orderBalance}}元</div>
+            {{ /if }}
+            <div>微信支付:{{orderPayValue}}元</div>
+        </li>
+    </ul>
+    {{if chubao}}
 
-	{{else}}
-		<div class="content-padded "> 支付方式 </div>
-		{{if wxPub}}
-			<ul class="table-view">
-				<li class="table-view-cell">
-					<a href="javascript:void(0)
+    {{else}}
+    <div class="content-padded "> 支付方式</div>
+    {{if wxPub}}
+    <ul class="table-view">
+        <li class="table-view-cell">
+            <a href="javascript:void(0)
 					" class="pay-option checked" data-value="wx_pub">
-						<i class="icon-weixin"></i>
-						微信支付
-					</a>
-				</li>
-			</ul>
-		{{else}}
-			<ul class="table-view">
-				<li class="table-view-cell">
-					<a href="javascript:void(0)" class="pay-option checked" data-value="alipay">
-						<i class="icon-alipay"></i>
-						支付宝
-					</a>
-				</li>
-				{{if showWX}}
-				<li class="table-view-cell">
-					<a href="javascript:void(0)" class="pay-option" data-value="wx">
-						<i class="icon-weixin"></i>
-						微信支付
-					</a>
-				</li>
-				{{/if}}
-			</ul>
-		{{/if}}
-	{{/if}}
-	<div class="content-padded ">
-		<a class="btn btn-main btn-block btn-pay" data-pay-channel="{{if wxPub}}wx_pub{{else}}alipay{{/if}}">确认支付</a>
-	</div>
+                <i class="icon-weixin"></i>
+                微信支付
+            </a>
+        </li>
+    </ul>
+    {{else}}
+    <ul class="table-view">
+        <li class="table-view-cell">
+            <a href="javascript:void(0)" class="pay-option checked" data-value="alipay">
+                <i class="icon-alipay"></i>
+                支付宝
+            </a>
+        </li>
+        {{if showWX}}
+        <li class="table-view-cell">
+            <a href="javascript:void(0)" class="pay-option" data-value="wx">
+                <i class="icon-weixin"></i>
+                微信支付
+            </a>
+        </li>
+        {{/if}}
+    </ul>
+    {{/if}}
+    {{/if}}
+    <div class="content-padded ">
+        <a class="btn btn-main btn-block btn-pay" data-pay-channel="{{if wxPub}}wx_pub{{else}}alipay{{/if}}">确认支付</a>
+    </div>
 </div>

+ 247 - 246
www/webapp/o2o/tpl/placeOrder/index.html

@@ -1,246 +1,247 @@
-{{ if showNavBar }}
-<header class="bar bar-nav">
-  <a class="left-button back-button">
-    <div class="icon icon-left-nav"></div>
-  </a>
-  <h1 class="title">{{title}}</h1>
-</header>
-{{ /if }}
-<div class="content">
-  <div class="box-container">
-    <div class="box-container box box-vertical">
-      <div id="placeOrderScroll" class="scroll-container box-flex-1">
-        <div class="scroller">
-          <div class="">
-            <ul class="table-view">
-              <li id="product-pic-bg" class="table-view-cell">
-                <a class="navigate-right product-pic" style="background-image: url({{imgSrc}});">
-                  <div class="product-name">{{title}}详情及评价 <span>&gt;&gt;&gt;</span></div>
-                </a>
-              </li>
-            </ul>
-            <!-- 选择extra -->
-            {{if extra}}
-            <div class="table-view main-service">
-              <p class="main-service-title">请选择</p>
-              {{each extra as e}}
-              <div class="width-percent-50">
-                <div class="btn btn-main-service" data-extra-type="{{e.type}}" data-extra-price="{{e.price}}">{{e.type}}</div>
-              </div>
-              {{/each}}
-            </div>
-            {{/if}}
-            <ul class="table-view">
-              <!-- 选择数量 -->
-              <li class="table-view-cell">
-                <div class="link-label show-product-picker selected">
-                  购买数量
-                  <div class="service-count">
-                    <div class="btn btn-sub">-</div>
-                    <span class="num">1</span>
-                    <div class="btn btn-add">+</div>
-                  </div>
-                </div>
-              </li>
-              <li class="table-view-cell">
-                <a class="navigate-right select-address" style="display: flex; justify-content:space-between; align-items: center; padding-right: 2rem">
-                  地址
-                  <div class="table-view-cell-right-label media-body has-address" style="display: block; position: static;" >
-                    <span class="order-username"></span>
-                    <span class="order-mobile">添加服务地址</span>
-                    <p class="order-address"></p>
-                  </div>
-                </a>
-              </li>
-              <!-- 不选宠物
-              <li class="table-view-cell">
-                {{if type == 7}}
-                <div class="link-label show-product-picker selected">
-                  狗狗数量
-                  <div class="service-count">
-                    <div class="btn btn-sub">-</div>
-                    <span class="num">1</span>
-                    <div class="btn btn-add">+</div>
-                  </div>
-                </div>
-                {{else if type == 6}}
-                <div class="link-label show-product-picker selected">
-                  宠物
-                  <span class="table-view-cell-right-label pet-info">
-                    {{ if petName == '' || petWeight == '' }}
-                      选择宠物类型
-                    {{ else }}
-                      {{petName}} ({{petWeight}})
-                    {{ /if }}
-                  </span>
-                </div>
-                {{else}}
-                <a class="navigate-right show-product-picker">
-                  宠物
-                  <span class="table-view-cell-right-label pet-info">
-                    {{if petName == '' || petWeight == ''}}
-                      选择宠物类型
-                    {{else}}
-                      {{petName}} ({{petWeight}})
-                    {{/if}}
-                  </span>
-                </a>
-                {{/if}}
-              </li>
-              -->
-              <li class="table-view-cell">
-                <a class="navigate-right show-time-picker">
-                  服务时间
-                  <span class="table-view-cell-right-label booking-time">选择服务时间</span>
-                </a>
-              </li>
-            </ul>
-            <!-- 附加服务
-            <div class="extra-service-title">附加服务</div>
-            <ul class="table-view extra-service-list">
-              {{if extraServiceType == 11}}
-              <li class="table-view-cell">
-                <a class="navigate-right item-checkbox checked" data-name="体外驱虫"> 体外驱虫 (40元)</a>
-              </li>
-              <li class="table-view-cell">
-                <a class="navigate-right item-checkbox" data-name="体内驱虫"> 体内驱虫 (30元)</a>
-              </li>
-              <li class="table-view-cell">
-                <a class="navigate-right item-checkbox" data-name="药浴"> 药浴 (40元)</a>
-              </li>
-              <li class="table-view-cell">
-                <a class="navigate-right item-checkbox" data-name="一次性局部染色"> 一次性局部染色 (28元)</a>
-              </li>
-              {{else if extraServiceType == 12}}
-              <li class="table-view-cell">
-                <a class="navigate-right item-checkbox" data-name="体外驱虫"> 体外驱虫 (40元)</a>
-              </li>
-              <li class="table-view-cell">
-                <a class="navigate-right item-checkbox" data-name="体内驱虫"> 体内驱虫 (30元)</a>
-              </li>
-              <li class="table-view-cell">
-                <a class="navigate-right item-checkbox checked" data-name="药浴"> 药浴 (40元)</a>
-              </li>
-              <li class="table-view-cell">
-                <a class="navigate-right item-checkbox" data-name="一次性局部染色"> 一次性局部染色 (28元)</a>
-              </li>
-              {{else if extraServiceType == 13}}
-              <li class="table-view-cell">
-                <a class="navigate-right item-checkbox" data-name="体外驱虫"> 体外驱虫 (40元)</a>
-              </li>
-              <li class="table-view-cell">
-                <a class="navigate-right item-checkbox" data-name="体内驱虫"> 体内驱虫 (30元)</a>
-              </li>
-              <li class="table-view-cell">
-                <a class="navigate-right item-checkbox" data-name="药浴"> 药浴 (40元)</a>
-              </li>
-              <li class="table-view-cell">
-                <a class="navigate-right item-checkbox checked" data-name="一次性局部染色"> 一次性局部染色 (28元)</a>
-              </li>
-              {{/if}}
-              {{ each extraService as extraServiceList i }}
-              <li class="table-view-cell">
-                <a class="navigate-right item-checkbox" data-select="0" data-id="{{extraServiceList.id}}" data-price="{{extraServiceList.price}}" data-name="{{extraServiceList.name}}" data-serviceType="{{extraServiceList.serviceType}}">
-                {{extraServiceList.name}} ({{extraServiceList.price}}元)
-                </a>
-              </li>
-              {{ /each }}
-            </ul>
-            -->
-            <!-- 选择保洁师
-            <ul class="table-view">
-              <li class="table-view-cell">
-                <a class="navigate-right show-beautician-picker">
-                  系统推荐保洁师
-                  <span class="table-view-cell-right-label booking-people">
-                    {{if beauticianName !== ''}}{{beauticianName}}{{else}}请选择{{/if}}
-                  </span>
-                </a>
-              </li>
-            </ul>
-            -->
-            <!-- 优惠券 -->
-            <ul class="table-view">
-              <li class="table-view-cell {{if !showCoupon }}disabled{{/if}}">
-                <a class="navigate-right show-coupon-picker">优惠券
-                  <span class="table-view-cell-right-label coupon-selected-name">选择优惠券</span>
-                </a>
-              </li>
-              <li class="table-view-cell memo">
-                    <form class="input-group" id="order-form">
-                        <input type="text" class="order-memo" id="order-memo" placeholder="(备注)可填写附加要求">
-                    </form>
-                </li>
-            </ul>
-            <!-- 订单详情
-            <ul class="table-view order-list">
-              <li class="table-view-cell select-pet {{if petName == ''}}hide{{/if}}">
-                <div class="link-label pet-type">{{petName}} ({{petWeight}})</div>
-                <div class="link-label">
-                  <span class="service-name">{{productType}}</span>
-                  <span class="table-view-cell-right-label total-cost">¥ {{petPrice}}</span>
-                </div>
-              </li>
-              <li class="table-view-cell calc-items hide">
-                {{if extraServiceType == 11}}
-                <div class="link-label select-extra-service" data-price="40">体外驱虫
-                  <span class="table-view-cell-right-label precedence-cost">¥ 40</span>
-                </div>
-                {{else if extraServiceType == 12}}
-                <div class="link-label select-extra-service" data-price="40">药浴
-                  <span class="table-view-cell-right-label precedence-cost">¥ 40</span>
-                </div>
-                {{else if extraServiceType == 13}}
-                <div class="link-label select-extra-service" data-price="28">一次性局部染色
-                  <span class="table-view-cell-right-label precedence-cost">¥ 28</span>
-                </div>
-                {{/if}}
-                {{each extraService as extraServiceList i}}
-                  <div class="link-label select-extra-service" data-price="{{extraServiceList.price}}">{{extraServiceList.name}}
-                    <span class="table-view-cell-right-label precedence-cost">¥{{extraServiceList.price}}</span>
-                  </div>
-                {{/each}}
-              </li>
-              <li class="table-view-cell select-precedence {{if !precedence}}hide{{/if}}">
-                <div class="link-label select-precedence-label">加急
-                  <span class="table-view-cell-right-label precedence-cost">¥ {{precedence}}</span>
-                </div>
-              </li>
-              <li class="table-view-cell select-coupon {{if !couponVal}}hide{{/if}}">
-                <div class="link-label select-coupon-label">优惠券
-                  <span class="table-view-cell-right-label coupon-cost">
-                    - {{couponVal}}
-                  </span>
-                </div>
-              </li>
-            </ul>
-            -->
-            <!-- 用户协议 -->
-            <div class="box bottom-box">
-              <div class="agreement-box">
-                <div class="agreement-touch-area">
-                </div>
-                <input type="checkbox" class="agreement-checkbox" checked="checked" />
-                <span>
-                  同意<a class="agreement">壹管家用户服务协议</a>
-                </span>
-              </div>
-            </div>
-          </div>
-        </div>
-      </div>
-      <div class="result-item btn-container prevent-scroll" style="padding-left: 15px; display: flex; justify-content: space-between; align-items: center">
-        <div style="font-size: 14px">
-          账户余额
-          <span style="font-size: 14px; color: #ec5330; text-align: right; display: inline" >¥ {{balance}}</span>
-        </div>
-        <div style="font-size: 14px">
-          费用总计
-          <span class="order-cost" style="font-size: 14px; color: #ec5330; text-align: right; display: inline">¥ 0</span>
-        </div>
-        <a class="btn btn-main btn-block btn-place">确认预约</a>
-      </div>
-    </div>
-    </div>
-  </div>
-</div>
+{{ if showNavBar }}
+<header class="bar bar-nav">
+  <a class="left-button back-button">
+    <div class="icon icon-left-nav"></div>
+  </a>
+  <h1 class="title">{{title}}</h1>
+</header>
+{{ /if }}
+<div class="content">
+  <div class="box-container">
+    <div class="box-container box box-vertical">
+      <div id="placeOrderScroll" class="scroll-container box-flex-1">
+        <div class="scroller">
+          <div class="">
+            <ul class="table-view">
+              <li id="product-pic-bg" class="table-view-cell">
+                <a class="navigate-right product-pic" style="background-image: url({{imgSrc}});">
+                  <div class="product-name">{{title}}详情及评价 <span>&gt;&gt;&gt;</span></div>
+                </a>
+              </li>
+            </ul>
+            <!-- 选择extra -->
+            {{if extra}}
+            <div class="table-view main-service">
+              <p class="main-service-title">请选择</p>
+              {{each extra as e}}
+              <div class="width-percent-50">
+                <div class="btn btn-main-service" data-extra-type="{{e.type}}" data-extra-price="{{e.price}}">{{e.type}}</div>
+              </div>
+              {{/each}}
+            </div>
+            {{/if}}
+            <ul class="table-view">
+              <!-- 选择数量 -->
+              <li class="table-view-cell">
+                <div class="link-label show-product-picker selected">
+                  购买数量
+                  <div class="service-count">
+                    <div class="btn btn-sub">-</div>
+                    <span class="num">1</span>
+                    <div class="btn btn-add">+</div>
+                  </div>
+                </div>
+              </li>
+              <li class="table-view-cell">
+                <a class="navigate-right select-address" style="display: flex; justify-content:space-between; align-items: center; padding-right: 2rem">
+                  地址
+                  <div class="table-view-cell-right-label media-body has-address" style="display: block; position: static;" >
+                    <span class="order-username"></span>
+                    <span class="order-mobile">添加服务地址</span>
+                    <p class="order-address"></p>
+                  </div>
+                </a>
+              </li>
+              <!-- 不选宠物
+              <li class="table-view-cell">
+                {{if type == 7}}
+                <div class="link-label show-product-picker selected">
+                  狗狗数量
+                  <div class="service-count">
+                    <div class="btn btn-sub">-</div>
+                    <span class="num">1</span>
+                    <div class="btn btn-add">+</div>
+                  </div>
+                </div>
+                {{else if type == 6}}
+                <div class="link-label show-product-picker selected">
+                  宠物
+                  <span class="table-view-cell-right-label pet-info">
+                    {{ if petName == '' || petWeight == '' }}
+                      选择宠物类型
+                    {{ else }}
+                      {{petName}} ({{petWeight}})
+                    {{ /if }}
+                  </span>
+                </div>
+                {{else}}
+                <a class="navigate-right show-product-picker">
+                  宠物
+                  <span class="table-view-cell-right-label pet-info">
+                    {{if petName == '' || petWeight == ''}}
+                      选择宠物类型
+                    {{else}}
+                      {{petName}} ({{petWeight}})
+                    {{/if}}
+                  </span>
+                </a>
+                {{/if}}
+              </li>
+              -->
+              <li class="table-view-cell">
+                <a class="navigate-right show-time-picker" style="display: flex; justify-content:space-between; align-items: center; padding-right: 2rem">
+                  服务时间
+                  <span class="table-view-cell-right-label booking-time" style="display: block; position: static; text-align: right">选择服务时间</span>
+                </a>
+              </li>
+              <li class="table-view-cell memo">
+                <form class="input-group" id="order-form">
+                  <input type="text" class="order-memo" id="order-memo" placeholder="(备注)可填写附加要求">
+                </form>
+              </li>
+            </ul>
+            <!-- 附加服务
+            <div class="extra-service-title">附加服务</div>
+            <ul class="table-view extra-service-list">
+              {{if extraServiceType == 11}}
+              <li class="table-view-cell">
+                <a class="navigate-right item-checkbox checked" data-name="体外驱虫"> 体外驱虫 (40元)</a>
+              </li>
+              <li class="table-view-cell">
+                <a class="navigate-right item-checkbox" data-name="体内驱虫"> 体内驱虫 (30元)</a>
+              </li>
+              <li class="table-view-cell">
+                <a class="navigate-right item-checkbox" data-name="药浴"> 药浴 (40元)</a>
+              </li>
+              <li class="table-view-cell">
+                <a class="navigate-right item-checkbox" data-name="一次性局部染色"> 一次性局部染色 (28元)</a>
+              </li>
+              {{else if extraServiceType == 12}}
+              <li class="table-view-cell">
+                <a class="navigate-right item-checkbox" data-name="体外驱虫"> 体外驱虫 (40元)</a>
+              </li>
+              <li class="table-view-cell">
+                <a class="navigate-right item-checkbox" data-name="体内驱虫"> 体内驱虫 (30元)</a>
+              </li>
+              <li class="table-view-cell">
+                <a class="navigate-right item-checkbox checked" data-name="药浴"> 药浴 (40元)</a>
+              </li>
+              <li class="table-view-cell">
+                <a class="navigate-right item-checkbox" data-name="一次性局部染色"> 一次性局部染色 (28元)</a>
+              </li>
+              {{else if extraServiceType == 13}}
+              <li class="table-view-cell">
+                <a class="navigate-right item-checkbox" data-name="体外驱虫"> 体外驱虫 (40元)</a>
+              </li>
+              <li class="table-view-cell">
+                <a class="navigate-right item-checkbox" data-name="体内驱虫"> 体内驱虫 (30元)</a>
+              </li>
+              <li class="table-view-cell">
+                <a class="navigate-right item-checkbox" data-name="药浴"> 药浴 (40元)</a>
+              </li>
+              <li class="table-view-cell">
+                <a class="navigate-right item-checkbox checked" data-name="一次性局部染色"> 一次性局部染色 (28元)</a>
+              </li>
+              {{/if}}
+              {{ each extraService as extraServiceList i }}
+              <li class="table-view-cell">
+                <a class="navigate-right item-checkbox" data-select="0" data-id="{{extraServiceList.id}}" data-price="{{extraServiceList.price}}" data-name="{{extraServiceList.name}}" data-serviceType="{{extraServiceList.serviceType}}">
+                {{extraServiceList.name}} ({{extraServiceList.price}}元)
+                </a>
+              </li>
+              {{ /each }}
+            </ul>
+            -->
+            <!-- 选择保洁师
+            <ul class="table-view">
+              <li class="table-view-cell">
+                <a class="navigate-right show-beautician-picker">
+                  系统推荐保洁师
+                  <span class="table-view-cell-right-label booking-people">
+                    {{if beauticianName !== ''}}{{beauticianName}}{{else}}请选择{{/if}}
+                  </span>
+                </a>
+              </li>
+            </ul>
+            -->
+            <!-- 优惠券 -->
+            <ul class="table-view">
+              <li class="table-view-cell {{if !showCoupon }}disabled{{/if}}">
+                <a class="navigate-right show-coupon-picker" style="display: flex; justify-content:space-between; align-items: center; padding-right: 2rem">
+                  优惠券
+                  <span class="table-view-cell-right-label coupon-selected-name" style="display: block; position: static; text-align: right">选择优惠券</span>
+                </a>
+              </li>
+            </ul>
+            <!-- 订单详情
+            <ul class="table-view order-list">
+              <li class="table-view-cell select-pet {{if petName == ''}}hide{{/if}}">
+                <div class="link-label pet-type">{{petName}} ({{petWeight}})</div>
+                <div class="link-label">
+                  <span class="service-name">{{productType}}</span>
+                  <span class="table-view-cell-right-label total-cost">¥ {{petPrice}}</span>
+                </div>
+              </li>
+              <li class="table-view-cell calc-items hide">
+                {{if extraServiceType == 11}}
+                <div class="link-label select-extra-service" data-price="40">体外驱虫
+                  <span class="table-view-cell-right-label precedence-cost">¥ 40</span>
+                </div>
+                {{else if extraServiceType == 12}}
+                <div class="link-label select-extra-service" data-price="40">药浴
+                  <span class="table-view-cell-right-label precedence-cost">¥ 40</span>
+                </div>
+                {{else if extraServiceType == 13}}
+                <div class="link-label select-extra-service" data-price="28">一次性局部染色
+                  <span class="table-view-cell-right-label precedence-cost">¥ 28</span>
+                </div>
+                {{/if}}
+                {{each extraService as extraServiceList i}}
+                  <div class="link-label select-extra-service" data-price="{{extraServiceList.price}}">{{extraServiceList.name}}
+                    <span class="table-view-cell-right-label precedence-cost">¥{{extraServiceList.price}}</span>
+                  </div>
+                {{/each}}
+              </li>
+              <li class="table-view-cell select-precedence {{if !precedence}}hide{{/if}}">
+                <div class="link-label select-precedence-label">加急
+                  <span class="table-view-cell-right-label precedence-cost">¥ {{precedence}}</span>
+                </div>
+              </li>
+              <li class="table-view-cell select-coupon {{if !couponVal}}hide{{/if}}">
+                <div class="link-label select-coupon-label">优惠券
+                  <span class="table-view-cell-right-label coupon-cost">
+                    - {{couponVal}}
+                  </span>
+                </div>
+              </li>
+            </ul>
+            -->
+            <!-- 用户协议 -->
+            <div class="box bottom-box">
+              <div class="agreement-box">
+                <div class="agreement-touch-area">
+                </div>
+                <input type="checkbox" class="agreement-checkbox" checked="checked" />
+                <span>
+                  同意<a class="agreement">壹管家用户服务协议</a>
+                </span>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="result-item btn-container prevent-scroll" style="padding-left: 15px; display: flex; justify-content: space-between; align-items: center">
+        <div style="font-size: 14px">
+          账户余额
+          <span style="font-size: 14px; color: #ec5330; text-align: right; display: inline" >¥ {{balance}}</span>
+        </div>
+        <div style="font-size: 14px">
+          费用总计
+          <span class="order-cost" style="font-size: 14px; color: #ec5330; text-align: right; display: inline">¥ 0</span>
+        </div>
+        <a class="btn btn-main btn-block btn-place">确认预约</a>
+      </div>
+    </div>
+    </div>
+  </div>
+</div>

部分文件因为文件数量过多而无法显示