洪海涛 8 years ago
parent
commit
043eb8ce71

File diff suppressed because it is too large
+ 0 - 0
www/webapp/o2o/dist/js/build/template.js


File diff suppressed because it is too large
+ 0 - 0
www/webapp/o2o/dist/js/main.js


File diff suppressed because it is too large
+ 0 - 0
www/webapp/o2o/dist/js/model/user.js


File diff suppressed because it is too large
+ 0 - 0
www/webapp/o2o/dist/js/page/home.js


File diff suppressed because it is too large
+ 0 - 1
www/webapp/o2o/js/build/template.js


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

@@ -1197,7 +1197,7 @@ define(['base', '$', 'api'], function (base, $, api) {
                 ]
             },
 	          {
-		        id: "5835418aa84ea0a7748b4587",//5835418aa84ea0a7748b4587
+		        id: "5835418aa84ea0a7748b4587",
 		        name: "小时工单次",
 		        imgSrc: 'http://odulvej8l.bkt.clouddn.com/8%E7%A7%9F%E6%88%BF%E5%A4%A7%E6%89%AB%E9%99%A4%E9%A6%96%E5%9B%BE%E6%94%B9.jpg',
 		        desc: [{content: "http://odqeoyzxd.bkt.clouddn.com/image/image_jdqx.jpg"}, {content: "家电清洗"}],

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

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

+ 17 - 1
www/webapp/o2o/js/page/home.js

@@ -79,7 +79,23 @@ define(['$', 'template', 'IScroll', 'product', 'user', 'native', 'config', 'addr
 					}
 				});
 			}, $view);
-
+			/* 点击产品列表的某一项 */
+			$.newTouch('.btn-appliances', function (event) {
+				event.preventDefault();
+				// var type = 4;
+				var type = parseInt($(this).attr('data-product-type'));
+				/*
+				 * 这个写法是SPA路由框架规定的。
+				 * $(selector).trigger(event, params)是jQuery的:触发被选元素上的指定事件
+				 */
+				$doc.trigger('spa:navigate', {
+					hash: 'placeOrder',
+					pushData: {
+						product: product.allList[type - 1],
+						needReset: true
+					}
+				});
+			}, $view);
 			/* 点击标签
 			 $.newTouch('.btn-product-group', function (event) {
 			 event.preventDefault();

+ 1 - 0
www/webapp/o2o/js/page/placeOrder.js

@@ -832,6 +832,7 @@ define(['$', 'template', 'order', 'native', 'helper', 'user', 'api', 'config', '
 							$doc.trigger('spa:navigate', {
 								hash: 'paySuccess'
 							});
+
 						} else {
 							$doc.trigger('spa:navigate', {
 								hash: 'pay',

+ 1 - 1
www/webapp/o2o/js/page/secondary.js

@@ -46,7 +46,7 @@ define(['$', 'template', 'IScroll', 'user', 'product', 'native', 'config', 'addr
 			$view.on('tapBackButton', function (event) {
 				back.call(this, event);
 			});
-			/*长期订入口-。.secondary-img*/
+			/*长期订入口-。.secondary-img/*/
 			$.newTouch('.secondary-img', function (event) {
 				event.preventDefault();
 				$doc.trigger('spa:navigate', {

+ 1 - 1
www/webapp/o2o/tpl/placeOrder/index.html

@@ -15,7 +15,7 @@
                     <div class="">
                         <ul class="table-view product-pic-o2o">
                             <li id="product-pic-bg">
-                                <img class="lazy product-pic-o2o" src="{{imgSrc}}" style="width: 100%;" alt="">
+                                <img class="lazy" src="{{imgSrc}}" style="width: 100%;" alt="">
                                 <div class="product-img"></div>
                             </li>
                         </ul>

Some files were not shown because too many files changed in this diff