diff --git a/common/js/config.js b/common/js/config.js
index 8c40c53..0d601a8 100644
--- a/common/js/config.js
+++ b/common/js/config.js
@@ -16,7 +16,7 @@ export default {
//https://demo-guojiang-ec-api.guojiang.club/
baseUrl: process.env.NODE_ENV === 'development' ?
- 'http://192.168.3.29/' : 'https://v3-ec-admin-dev.guojiang.club/', // 运行时自动替换变量
+ 'http://192.168.3.165/' : 'https://v3-ec-admin-dev.guojiang.club/', // 运行时自动替换变量
},
PACKAGES: {
activity: false,
diff --git a/components/lf-nav/lf-nav.vue b/components/lf-nav/lf-nav.vue
index ebbbd71..c38ea7f 100644
--- a/components/lf-nav/lf-nav.vue
+++ b/components/lf-nav/lf-nav.vue
@@ -170,7 +170,20 @@
display: flex;
justify-content: space-between;
align-items: center;
- padding: 0 12rpx;
+ // padding: 0 12rpx;
+}
+.head .head-nav>text{
+ display: inline-block;
+ width: 50%;
+ height: 100%;
+ line-height: 57rpx;
+}
+.head .head-nav>text:nth-child(1){
+ padding-left: 12rpx;
+}
+.head .head-nav>text:nth-child(2){
+ text-align: right;
+ padding-right: 12rpx;
}
.head .head-nav::after{
position: absolute;
diff --git a/components/lf-swipeAction/lf-swipeAction.vue b/components/lf-swipeAction/lf-swipeAction.vue
index ff0940e..2e2d2f7 100644
--- a/components/lf-swipeAction/lf-swipeAction.vue
+++ b/components/lf-swipeAction/lf-swipeAction.vue
@@ -17,6 +17,7 @@
+
+
diff --git a/pages/index/index/index.vue b/pages/index/index/index.vue
index 95021d2..405e818 100644
--- a/pages/index/index/index.vue
+++ b/pages/index/index/index.vue
@@ -503,7 +503,8 @@
price: item.associate.max_price,
product_id: item.associate.id,
sale: item.associate.sale_count,
- title: item.associate.name
+ title: item.associate.name,
+ id: item.associate.id
}
});
return new_list;
diff --git a/pages/point/shoppingMall/shoppingMall.vue b/pages/point/shoppingMall/shoppingMall.vue
index b0268a0..f5a0464 100644
--- a/pages/point/shoppingMall/shoppingMall.vue
+++ b/pages/point/shoppingMall/shoppingMall.vue
@@ -8,7 +8,7 @@
- 783
+ {{ point.point }}
当前积分
@@ -34,15 +34,17 @@
@change="tabChange">
-
+
{{ item }}
+ @click="activeFilter(index)">{{ item.name }}
-
-
+
+
+
@@ -56,87 +58,146 @@
lfWaterfall
},
data(){
- let _public = {
- page: 1,
- isPage: true,
- loadingClass: true,
- loadingText: '正在加载中'
- }
return {
tab_current: 0,
- tab_list: [{
- name: '全部',
- list: [],
- ..._public
+ tab_list: [],
+ filter_list: [{
+ name: '1~100',
+ point_start: '1',
+ point_end: '100'
},{
- name: '时尚尖货',
- list: [],
- ..._public
+ name: '100~1万',
+ point_start: '100',
+ point_end: '10000'
},{
- name: '美容美妆',
- list: [],
- ..._public
+ name: '1万~2万',
+ point_start: '10000',
+ point_end: '20000'
},{
- name: '家具用品',
- list: [],
- ..._public
+ name: '2万~5万',
+ point_start: '20000',
+ point_end: '50000'
},{
- name: '儿童玩具',
- list: [],
- ..._public
+ name: '>5万',
+ point_start: '50000',
+ point_end: ''
}],
- filter_list: ['1~100','100~1万','1万~2万','2万~5万','>5万'],
filter_current: null,
- goods_list: [
- {
- id: 10,
- original_price: "4111.00",
- picture: "https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png",
- pictures: ["https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png"],
- price: "2412.00",
- product_id: 1008,
- sale: 0,
- title: "AIMER MEN爱慕先生爱慕先生"
- },
- {
- id: 10,
- original_price: "4111.00",
- picture: "https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png",
- pictures: ["https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png"],
- price: "2412.00",
- product_id: 1008,
- sale: 0,
- title: "AIMER MEN爱慕先生爱慕先生"
- },
- {
- id: 10,
- original_price: "4111.00",
- picture: "https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png",
- pictures: ["https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png"],
- price: "2412.00",
- product_id: 1008,
- sale: 0,
- title: "AIMER MEN爱慕先生爱慕先生"
- },
- {
- id: 10,
- original_price: "4111.00",
- picture: "https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png",
- pictures: ["https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png"],
- price: "2412.00",
- product_id: 1008,
- sale: 0,
- title: "AIMER MEN爱慕先生爱慕先生"
- }
- ]
+ token: '',
+ point: {point: 0}
}
},
onLoad(){
-
+ this.token = this.$cookieStorage.get('user_token');
+ this.getTotalPoint();
+ this.getCategoryList();
},
methods: {
+ getTotalPoint(){
+ this.$http.get({
+ api: 'api/users/point',
+ header: {
+ Authorization: this.token
+ }
+ }).then(res => {
+ console.log("getTotalPoint", res)
+ this.point = res.data.data;
+ });
+ },
+ getCategoryList(){
+ uni.showLoading({
+ title: '正在获取分类'
+ })
+ this.$http.get({
+ api: 'api/category/list',
+ header: {
+ Authorization: this.token
+ }
+ }).then(res => {
+ let list = res.data.data.map(item => {
+ return {
+ c_id: item.id,
+ name: item.name,
+ list: [],
+ page: 1,
+ isPage: true,
+ loadingClass: true,
+ loadingText: '正在加载中'
+ }
+ })
+ this.tab_list = list;
+ uni.hideLoading();
+ this.getPointList();
+ }).catch(err => uni.hideLoading())
+ },
+ getPointList(){
+ uni.showLoading({
+ title: '正在获取商品'
+ })
+ let tabItem = this.tab_list[this.tab_current];
+ let par = {
+ is_largess: 1,
+ page: tabItem.page,
+ c_id: tabItem.c_id
+ };
+ if(this.filter_current != null){
+ let f_item = this.filter_list[this.filter_current];
+ par.point_start = f_item.point_start;
+ par.point_end = f_item.point_end;
+ }
+ this.$http.get({
+ api: 'api/store/list',
+ data: par,
+ header: {
+ Authorization: this.token
+ }
+ }).then(res => {
+ let list = res.data.data.map(item => {
+ return {
+ id: item.id,
+ sale: item.sale_count,
+ picture: item.img,
+ title: item.name,
+ store_nums: item.store_nums
+ }
+ })
+ let pagination = res.data.meta.pagination;
+ tabItem.isPage = pagination.current_page < pagination.total_pages;
+ if(tabItem.page == 1){
+ tabItem.list = list;
+ }else{
+ tabItem.list.push(...list);
+ }
+ uni.hideLoading();
+ }).catch(err => uni.hideLoading())
+ },
+ activeFilter(index){
+ if(this.filter_current == index){
+ this.filter_current = null;
+ }else{
+ this.filter_current = index;
+ }
+ let tabItem = this.tab_list[this.tab_current];
+ tabItem.page = 1;
+ tabItem.isPage = true;
+ tabItem.loadingClass = true;
+ tabItem.loadingText = '正在加载中';
+ this.getPointList();
+ },
tabChange(event){
this.tab_current = event;
+ if(this.tab_list[event].list.length <= 0){
+ this.getPointList();
+ }
+ }
+ },
+ onReachBottom(){
+ let tabItem = this.tab_list[this.tab_current];
+ if(tabItem.isPage){
+ tabItem.page = tabItem.page+1;
+ this.getPointList();
+ }else{
+ this.$msg('没有更多啦~')
}
}
}
diff --git a/pages/recharge/balance/balance.vue b/pages/recharge/balance/balance.vue
index 85f6fb6..11d70a1 100644
--- a/pages/recharge/balance/balance.vue
+++ b/pages/recharge/balance/balance.vue
@@ -19,22 +19,27 @@
余额变动明细
- {{ date || '2021-09-01' }}
+ {{ date || getDay }}
-
+
- {{ index % 2 ? '-250' : '+80' }}
- 线上-商城内消费
+ {{ item.value }}
+
+ {{ item.note }}
- ¥374.38
- 2021-09-01 18:27:58
+ ¥{{ item.current_balance }}
+ {{ item.created_at }}
+
+
@@ -74,6 +79,11 @@
config: ''
}
},
+ computed: {
+ getDay(){
+ return this.$shared.recordTime(new Date(), '-', 'date');
+ }
+ },
onLoad(e){
// TODO 将list数据渲染到页面上,,根据date请求筛选
// 第三方平台配置颜色
@@ -98,6 +108,11 @@
methods: {
dateChange(event){
this.date = event.detail.value;
+ this.page = 0;
+ this.more = true;
+ this.show = false;
+ this.showText = '正在加载下一页数据';
+ this.queryBalanceList();
},
queryBalanceList() {
@@ -106,10 +121,16 @@
// type
// } : {};
// params.page = page;
+ uni.showLoading({
+ title: '正在获取中'
+ })
let token = this.token;
let params = {
page: this.page
};
+ if(this.date){
+ params.day = this.date;
+ }
this.$http.get({
api: 'api/users/balance/list',
header: {
@@ -121,25 +142,31 @@
res = res.data;
// this.result(res, status);
var page = res.meta.pagination;
- this.list = res.data;
this.page = page.current_page;
this.more = page.current_page < page.total_pages;
this.show = false;
+ console.log("page", page);
+ if(page.current_page == 1){
+ this.list = res.data;
+ }else{
+ this.list.push(...res.data);
+ }
+ console.log("res.data", this.list);
} else {
- wx.showModal({
+ uni.showModal({
title: '提示',
content: '数据请求失败',
success: res => {}
});
}
- wx.hideLoading();
+ uni.hideLoading();
}).catch(rej => {
- wx.showToast({
+ uni.showToast({
title: "请求失败",
image: '../../../static/error.png'
});
- wx.hideLoading();
+ uni.hideLoading();
});
},
// 获取总余额
diff --git a/pages/shop/goodsdetail.vue b/pages/shop/goodsdetail.vue
index f64555d..931c22d 100644
--- a/pages/shop/goodsdetail.vue
+++ b/pages/shop/goodsdetail.vue
@@ -204,10 +204,10 @@