|
|
import wx from '../../utils/wx';
|
|
|
import event from '../../common/event';
|
|
|
import config from '../../common/config';
|
|
|
import Yas from '../../common/yas';
|
|
|
import shopModel from '../../models/product/shop';
|
...
|
...
|
@@ -27,7 +28,13 @@ Page({ |
|
|
resource: config.resourceContentCode
|
|
|
},
|
|
|
onLoad: function() {
|
|
|
this.productList({ page: 1, limit: 20});
|
|
|
if (app.globalData.appShopId) {
|
|
|
this.productList({ page: 1, limit: 20});
|
|
|
} else {
|
|
|
event.on('app_shop_id_update', () => {
|
|
|
this.productList({ page: 1, limit: 20});
|
|
|
});
|
|
|
}
|
|
|
yas = new Yas(app);
|
|
|
},
|
|
|
onReady: function() {
|
...
|
...
|
@@ -123,6 +130,7 @@ Page({ |
|
|
this.data.isLoading = true;
|
|
|
wx.showLoading({title: '加载中'});
|
|
|
delete params.setScrollPos;
|
|
|
params.shop_id = app.getShopId();
|
|
|
shopModel.shopProductList(params).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
const keyAdapter = {
|
...
|
...
|
|