diff --git a/wx-mini-program/app.json b/wx-mini-program/app.json
index 5be7013..e39e689 100644
--- a/wx-mini-program/app.json
+++ b/wx-mini-program/app.json
@@ -5,6 +5,7 @@
"pages/newGoods/newGoods",
"pages/hotGoods/hotGoods",
"pages/ucenter/index/index",
+ "pages/ucenter/main/index",
"pages/ucenter/address/address",
"pages/ucenter/addressAdd/addressAdd",
"pages/ucenter/feedback/feedback",
@@ -49,13 +50,13 @@
"lib/home/index"
],
"window": {
- "navigationBarBackgroundColor": "#85c43f",
- "navigationBarTitleText": "聚惠星",
- "enablePullDownRefresh": true,
- "navigationBarTextStyle": "white",
- "backgroundColor": "#FFFFFF",
- "backgroundTextStyle": "dark"
- },
+ "navigationBarBackgroundColor": "#85c43f",
+ "navigationBarTitleText": "聚惠星",
+ "enablePullDownRefresh": true,
+ "navigationBarTextStyle": "white",
+ "backgroundColor": "#FFFFFF",
+ "backgroundTextStyle": "dark"
+},
"tabBar": {
"backgroundColor": "#fafafa",
"borderStyle": "white",
diff --git a/wx-mini-program/app.wxss b/wx-mini-program/app.wxss
index ae8ce80..aa11dd5 100644
--- a/wx-mini-program/app.wxss
+++ b/wx-mini-program/app.wxss
@@ -80,4 +80,4 @@ button::after{border:0;}
.loading .text{position: relative;display: inline-block;padding: 0 20rpx;background: #fff;z-index: 2;color: #777;}
.loadingicon .loading {animation: load linear 1s infinite;font-size:45rpx;color:#000;}
-.loadingicon{width:100%;height:80rpx;}
+.loadingicon{width:100%;height:80rpx;}
\ No newline at end of file
diff --git a/wx-mini-program/config/api.js b/wx-mini-program/config/api.js
index 057ac73..a8ed0e1 100644
--- a/wx-mini-program/config/api.js
+++ b/wx-mini-program/config/api.js
@@ -92,7 +92,7 @@ module.exports = {
CouponReceive: WxApiRoot + 'coupon/receive', //优惠券领取
CouponReceiveAll: WxApiRoot + 'coupon/receiveAll', //优惠券领取
CouponExchange: WxApiRoot + 'coupon/exchange', //优惠券兑换
- GetUserCoupon:WxApiRoot + 'coupon/getUserCoupon',//用户个人可领取优惠券查询
+ GetUserCoupon: WxApiRoot + 'coupon/getUserCoupon',//用户个人可领取优惠券查询
StorageUpload: WxApiRoot + 'storage/upload', //图片上传,
@@ -100,5 +100,7 @@ module.exports = {
BrokerageMain: WxApiRoot + 'brokerage/main',//佣金收益主页面
SettleOrderList: WxApiRoot + 'brokerage/settleOrderList',//佣金收益主页面
ExtractList: WxApiRoot + 'brokerage/extractList',//佣金账号提现记录
- ArticleDetail: WxApiRoot + 'article/detail' //公告详情
+ ArticleDetail: WxApiRoot + 'article/detail',//公告详情
+ ApplyAgency: WxApiRoot + 'user/applyAgency',//代理申请
+ GetSharedUrl: WxApiRoot + 'user/getSharedUrl' //获取推广二维码
};
\ No newline at end of file
diff --git a/wx-mini-program/pages/brandDetail/brandDetail.js b/wx-mini-program/pages/brandDetail/brandDetail.js
index 8944cd7..f7552c4 100644
--- a/wx-mini-program/pages/brandDetail/brandDetail.js
+++ b/wx-mini-program/pages/brandDetail/brandDetail.js
@@ -10,7 +10,8 @@ Page({
brand: {},
goodsList: [],
page: 1,
- size: 200
+ size: 10,
+ totalPages: 1
},
onLoad: function(options) {
// 页面初始化 options为页面跳转所带来的参数
@@ -45,7 +46,8 @@ Page({
.then(function(res) {
if (res.errno === 0) {
that.setData({
- goodsList: res.data.goodsList
+ goodsList: that.data.goodsList.concat(res.data.goodsList),
+ totalPages: res.data.totalPages
});
}
});
@@ -65,5 +67,20 @@ Page({
onUnload: function() {
// 页面关闭
- }
+ },
+ onReachBottom:function() {
+ if (this.data.totalPages > this.data.page) {
+ this.setData({
+ page: this.data.page + 1
+ });
+ } else {
+ wx.showToast({
+ title: '已经到底了!',
+ icon: 'none',
+ duration: 2000
+ });
+ return false;
+ }
+ this.getGoodsList();
+ }
})
\ No newline at end of file
diff --git a/wx-mini-program/pages/cart/cart.wxml b/wx-mini-program/pages/cart/cart.wxml
index 1925c2b..04c8302 100644
--- a/wx-mini-program/pages/cart/cart.wxml
+++ b/wx-mini-program/pages/cart/cart.wxml
@@ -9,7 +9,7 @@
全场优惠券抵扣
7天无忧快速退货
- 满66元免邮费
+ 满40元免邮费
diff --git a/wx-mini-program/pages/category/category.js b/wx-mini-program/pages/category/category.js
index b4e2a37..c8b734e 100644
--- a/wx-mini-program/pages/category/category.js
+++ b/wx-mini-program/pages/category/category.js
@@ -11,7 +11,8 @@ Page({
scrollTop: 0,
scrollHeight: 0,
page: 1,
- size: 500
+ size: 10,
+ totalPages: 1
},
onLoad: function(options) {
// 页面初始化 options为页面跳转所带来的参数
@@ -100,7 +101,8 @@ Page({
})
.then(function(res) {
that.setData({
- goodsList: res.data.goodsList,
+ goodsList: that.data.goodsList.concat(res.data.goodsList),
+ totalPages: res.data.totalPages
});
});
},
@@ -124,9 +126,27 @@ Page({
});
}
this.setData({
- id: event.currentTarget.dataset.id
+ id: event.currentTarget.dataset.id,
+ goodsList: [],
+ page: 1,
+ totalPages: 1
});
this.getCategoryInfo();
- }
+ },
+ onReachBottom:function() {
+ if (this.data.totalPages > this.data.page) {
+ this.setData({
+ page: this.data.page + 1
+ });
+ } else {
+ wx.showToast({
+ title: '已经到底了!',
+ icon: 'none',
+ duration: 2000
+ });
+ return false;
+ }
+ this.getGoodsList();
+ }
})
\ No newline at end of file
diff --git a/wx-mini-program/pages/hotGoods/hotGoods.js b/wx-mini-program/pages/hotGoods/hotGoods.js
index c2b246e..2405b9f 100644
--- a/wx-mini-program/pages/hotGoods/hotGoods.js
+++ b/wx-mini-program/pages/hotGoods/hotGoods.js
@@ -16,7 +16,8 @@ Page({
currentSort: 'browse',
currentSortOrder: 'desc',
page: 1,
- size: 200
+ size: 10,
+ totalPages: 1
},
getCategoryList: function() {
var that = this;
@@ -46,8 +47,9 @@ Page({
.then(function(res) {
if (res.errno === 0) {
that.setData({
- goodsList: res.data.goodsList,
- filterCategory: res.data.filterCategoryList
+ goodsList: that.data.goodsList.concat(res.data.goodsList),
+ filterCategory: res.data.filterCategoryList,
+ totalPages: res.data.totalPages
});
}
});
@@ -128,5 +130,20 @@ Page({
'categoryId': this.data.filterCategory[currentIndex].id
});
this.getGoodsList();
+ },
+ onReachBottom:function() {
+ if (this.data.totalPages > this.data.page) {
+ this.setData({
+ page: this.data.page + 1
+ });
+ } else {
+ wx.showToast({
+ title: '已经到底了!',
+ icon: 'none',
+ duration: 2000
+ });
+ return false;
+ }
+ this.getGoodsList();
}
})
\ No newline at end of file
diff --git a/wx-mini-program/pages/newGoods/newGoods.js b/wx-mini-program/pages/newGoods/newGoods.js
index aea4879..dc8c4a2 100644
--- a/wx-mini-program/pages/newGoods/newGoods.js
+++ b/wx-mini-program/pages/newGoods/newGoods.js
@@ -16,7 +16,8 @@ Page({
currentSort: 'add_time',
currentSortOrder: 'desc',
page: 1,
- size: 200
+ size: 10,
+ totalPages: 1
},
getGoodsList: function() {
var that = this;
@@ -32,8 +33,9 @@ Page({
.then(function(res) {
if (res.errno === 0) {
that.setData({
- goodsList: res.data.goodsList,
- filterCategory: res.data.filterCategoryList
+ goodsList: that.data.goodsList.concat(res.data.goodsList),
+ filterCategory: res.data.filterCategoryList,
+ totalPages: res.data.totalPages
});
}
});
@@ -113,6 +115,20 @@ Page({
'categoryId': this.data.filterCategory[currentIndex].id
});
this.getGoodsList();
-
+ },
+ onReachBottom:function() {
+ if (this.data.totalPages > this.data.page) {
+ this.setData({
+ page: this.data.page + 1
+ });
+ } else {
+ wx.showToast({
+ title: '已经到底了!',
+ icon: 'none',
+ duration: 2000
+ });
+ return false;
+ }
+ this.getGoodsList();
}
})
\ No newline at end of file
diff --git a/wx-mini-program/pages/search/search.js b/wx-mini-program/pages/search/search.js
index 88a4c61..5debee6 100644
--- a/wx-mini-program/pages/search/search.js
+++ b/wx-mini-program/pages/search/search.js
@@ -17,8 +17,9 @@ Page({
defaultKeyword: {},
hotKeyword: [],
page: 1,
- size: 20,
- categoryId: 0
+ size: 10,
+ categoryId: 0,
+ totalPages: 1
},
//事件处理函数
closeSearch: function() {
@@ -104,8 +105,9 @@ Page({
that.setData({
searchStatus: true,
categoryFilter: false,
- goodsList: res.data.goodsList,
- filterCategory: res.data.filterCategoryList
+ goodsList: that.data.goodsList.concat(res.data.goodsList),
+ filterCategory: res.data.filterCategoryList,
+ totalPages: res.data.totalPages
});
}
@@ -125,6 +127,7 @@ Page({
this.setData({
keyword: keyword,
page: 1,
+ totalPages: 1,
categoryId: 0,
goodsList: []
});
@@ -185,11 +188,27 @@ Page({
categoryFilter: false,
categoryId: currentCategory.id,
page: 1,
+ totalPages: 1,
goodsList: []
});
this.getGoodsList();
},
onKeywordConfirm(event) {
this.getSearchResult(event.detail.value);
- }
+ },
+ onReachBottom:function() {
+ if (this.data.totalPages > this.data.page) {
+ this.setData({
+ page: this.data.page + 1
+ });
+ } else {
+ wx.showToast({
+ title: '已经到底了!',
+ icon: 'none',
+ duration: 2000
+ });
+ return false;
+ }
+ this.getGoodsList();
+ }
})
\ No newline at end of file
diff --git a/wx-mini-program/project.config.json b/wx-mini-program/project.config.json
index 65940ce..e74b646 100644
--- a/wx-mini-program/project.config.json
+++ b/wx-mini-program/project.config.json
@@ -40,7 +40,7 @@
"list": []
},
"miniprogram": {
- "current": 22,
+ "current": 38,
"list": [
{
"id": -1,
@@ -269,6 +269,13 @@
"name": "优惠券列表",
"pathName": "pages/coupon/coupon",
"query": ""
+ },
+ {
+ "id": 38,
+ "name": "QcCode",
+ "pathName": "pages/index/index",
+ "query": "shareUserId=100",
+ "scene": 1011
}
]
}