|
@@ -226,8 +226,9 @@ var _default =
|
|
firstName: '',
|
|
firstName: '',
|
|
firstArr: ['不限', '1-15天', '15-30天', '30天以上'],
|
|
firstArr: ['不限', '1-15天', '15-30天', '30天以上'],
|
|
isHave: false,
|
|
isHave: false,
|
|
- shopData: [1, 2, 3, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2] };
|
|
|
|
-
|
|
|
|
|
|
+ shopData: [1, 2, 3, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
|
|
|
|
+ page: 1,
|
|
|
|
+ noMoreShow: false };
|
|
|
|
|
|
},
|
|
},
|
|
onShow: function onShow() {
|
|
onShow: function onShow() {
|
|
@@ -239,23 +240,32 @@ var _default =
|
|
that.lng = res.longitude;
|
|
that.lng = res.longitude;
|
|
that.lat = res.latitude;
|
|
that.lat = res.latitude;
|
|
|
|
|
|
- // that.getShopData()
|
|
|
|
|
|
+ that.page = 1;
|
|
|
|
+ //that.getShopData()
|
|
} });
|
|
} });
|
|
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ goEntered: function goEntered() {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: 'entered' });
|
|
|
|
+
|
|
|
|
+ },
|
|
searchDone: function searchDone() {
|
|
searchDone: function searchDone() {
|
|
this.searchValue = e.target.value;
|
|
this.searchValue = e.target.value;
|
|
|
|
+ this.page = 1;
|
|
// this.getShopData()
|
|
// this.getShopData()
|
|
},
|
|
},
|
|
bindPickerChange: function bindPickerChange(e) {
|
|
bindPickerChange: function bindPickerChange(e) {
|
|
this.firstIndex = Number(e.target.value);
|
|
this.firstIndex = Number(e.target.value);
|
|
this.firstName = this.firstArr[this.firstIndex];
|
|
this.firstName = this.firstArr[this.firstIndex];
|
|
|
|
+ this.page = 1;
|
|
// this.getShopData()
|
|
// this.getShopData()
|
|
},
|
|
},
|
|
|
|
|
|
changeHave: function changeHave() {
|
|
changeHave: function changeHave() {
|
|
this.isHave = !this.isHave;
|
|
this.isHave = !this.isHave;
|
|
|
|
+ this.page = 1;
|
|
// this.getShopData()
|
|
// this.getShopData()
|
|
},
|
|
},
|
|
|
|
|
|
@@ -266,22 +276,46 @@ var _default =
|
|
|
|
|
|
var url = 'accompany/SuperAccounts/queryShopListByManagerID',
|
|
var url = 'accompany/SuperAccounts/queryShopListByManagerID',
|
|
params = {
|
|
params = {
|
|
|
|
+ page: this.page,
|
|
|
|
+ limit: 20,
|
|
managerID: this.managerID,
|
|
managerID: this.managerID,
|
|
shopName: this.searchValue,
|
|
shopName: this.searchValue,
|
|
lng: this.lng,
|
|
lng: this.lng,
|
|
lat: this.lat };
|
|
lat: this.lat };
|
|
|
|
|
|
this.$http(url, params, 'GET').then(function (res) {
|
|
this.$http(url, params, 'GET').then(function (res) {
|
|
- _this.shopData = res.data;
|
|
|
|
|
|
+ var list = res.data.Items;
|
|
|
|
+
|
|
|
|
+ // 处理 undefined和null转为空白字符串
|
|
|
|
+ list.forEach(function (item, index) {
|
|
|
|
+ for (var key in item) {
|
|
|
|
+ item[key] = _this.$praseStrEmpty(item[key]);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ if (list.length < 20) {
|
|
|
|
+ _this.noMoreShow = true;
|
|
|
|
+ }
|
|
|
|
+ if (_this.page == 1) {
|
|
|
|
+ _this.shopData = list;
|
|
|
|
+ } else {
|
|
|
|
+ _this.shopData = _this.shopData.concat(list);
|
|
|
|
+ }
|
|
|
|
|
|
});
|
|
});
|
|
} },
|
|
} },
|
|
|
|
|
|
|
|
+ // 下拉刷新 上拉加载更多
|
|
|
|
+
|
|
onPullDownRefresh: function onPullDownRefresh() {
|
|
onPullDownRefresh: function onPullDownRefresh() {
|
|
this.getShopData();
|
|
this.getShopData();
|
|
setTimeout(function () {
|
|
setTimeout(function () {
|
|
uni.stopPullDownRefresh();
|
|
uni.stopPullDownRefresh();
|
|
}, 1000);
|
|
}, 1000);
|
|
|
|
+ },
|
|
|
|
+ onReachBottom: function onReachBottom() {
|
|
|
|
+ this.page++;
|
|
|
|
+ this.getShopData();
|
|
} };exports.default = _default;
|
|
} };exports.default = _default;
|
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
|
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
|
|
|
|
|