@@ -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: "家电清洗"}],
@@ -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='';
@@ -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();
@@ -832,6 +832,7 @@ define(['$', 'template', 'order', 'native', 'helper', 'user', 'api', 'config', '
$doc.trigger('spa:navigate', {
hash: 'paySuccess'
+
} else {
hash: 'pay',
@@ -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) {
@@ -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>