From 6eabd3a575383fdbb933faa582a0ce20f1f16e47 Mon Sep 17 00:00:00 2001
From: ghusermoon <2673031505@qq.com>
Date: Mon, 27 Jul 2020 17:59:47 +0800
Subject: [PATCH] loadmore 7.27
---
common/api/shop.js | 11 ++
common/api/user.js | 4 +
components/loadmore/index.vue | 11 --
components/mine/order-item/index.vue | 1 +
components/shop/list/index.vue | 7 +-
pageB/comment/index.vue | 47 +++--
pageB/sdetails/index.vue | 18 +-
pageB/triedDress/index.vue | 260 +++++++++++++++++++++++++++
pageC/cart/ConfirmOrder.vue | 8 +-
pageC/groupBuy/index.vue | 33 ++--
pageE/mine/MedalIntroduction.vue | 16 +-
pageE/mine/MemberServeCoupon.vue | 23 +++
pageE/mine/MineProgress.vue | 4 +-
pageE/order/Index.vue | 19 ++
pageE/tool/SendWash.vue | 4 +-
pageE/tool/WashOrder.vue | 2 +-
pages.json | 11 ++
17 files changed, 421 insertions(+), 58 deletions(-)
create mode 100644 pageB/triedDress/index.vue
diff --git a/common/api/shop.js b/common/api/shop.js
index 19eb9a8..bda384f 100644
--- a/common/api/shop.js
+++ b/common/api/shop.js
@@ -278,6 +278,17 @@ export default {
searchwordlist() {
return vm.$u.post('ShopSearch/searchwordlist')
},
+ saveGoodsTry({ member_name, member_mobile, area_info, address_detail, goods_id, num, store_id }) {
+ return vm.$u.post('Order/saveGoodsTry', {
+ member_name: member_name,
+ member_mobile: member_mobile,
+ area_info: area_info,
+ address_detail: address_detail,
+ goods_id: goods_id,
+ num: num,
+ store_id: store_id,
+ })
+ },
}
}
diff --git a/common/api/user.js b/common/api/user.js
index 68fef94..bd1ad4e 100644
--- a/common/api/user.js
+++ b/common/api/user.js
@@ -240,6 +240,10 @@ export default {
getAfterSaleList({ page }) {
return vm.$u.post('order/afterSaleList', { page: page });
},
+ // 试穿列表
+ goodsTryOrderList() {
+ return vm.$u.post('order/goodsTryOrderList');
+ },
// 订单详情
getOrderInfo({ order_id }) {
return vm.$u.post('Order/orderInfo', { order_id: order_id });
diff --git a/components/loadmore/index.vue b/components/loadmore/index.vue
index e52261f..cea80bc 100644
--- a/components/loadmore/index.vue
+++ b/components/loadmore/index.vue
@@ -42,17 +42,6 @@ export default {
// this.loadStatus = "nomore";
// this.tpage--;
// })
- // this.$parent.callback({ page: this.tpage }).then(length => {
- // if(length == 0) {
- // this.tpage--;
- // this.status = 'nomore';
- // } else {
- // this.status = 'loading';
- // }
- // }).catch(() => {
- // this.loadStatus = "nomore";
- // this.tpage--;
- // })
}
}
};
diff --git a/components/mine/order-item/index.vue b/components/mine/order-item/index.vue
index 97800b7..c0c3af9 100644
--- a/components/mine/order-item/index.vue
+++ b/components/mine/order-item/index.vue
@@ -96,6 +96,7 @@ export default {
if(res.errCode == 0) {
this.$emit("refreshOrderList", { reload: 'again' });
}
+ this.$u.toast(res.message);
})
},
toOtherPage(url) {
diff --git a/components/shop/list/index.vue b/components/shop/list/index.vue
index 55d8653..13b6c83 100644
--- a/components/shop/list/index.vue
+++ b/components/shop/list/index.vue
@@ -14,12 +14,10 @@
-
+
\ No newline at end of file
diff --git a/pageC/cart/ConfirmOrder.vue b/pageC/cart/ConfirmOrder.vue
index 91ccfc1..d6f076c 100644
--- a/pageC/cart/ConfirmOrder.vue
+++ b/pageC/cart/ConfirmOrder.vue
@@ -68,13 +68,13 @@
优惠券详情
- 店铺优惠券
+ 平台优惠券
优惠券详情
- 平台优惠券
+ 店铺优惠券
@@ -121,7 +121,6 @@ export default {
choiceCoupon: {}, // 使用的平台优惠券
goodsClass: [],
orderType: '', // 订单类型 1 普通订单 2 拼团订单 3 秒杀订单 4 优惠券 5 购物车订单
-
}
},
components: {
@@ -152,6 +151,8 @@ export default {
this.getGoodsClass();
},
onShow() {
+ this.storeCoupon = {};
+ this.choiceCoupon = {};
// 判断是不是从选择地址页面返回
if(JSON.stringify(this.$store.state.orderAddress) == '{}') {
this.$store.commit('updateAddress', this.orderInfo.address_info);
@@ -256,6 +257,7 @@ export default {
this.$u.api.sendOrder(params).then(res => {
if(res.errCode == 0) {
this.$u.route({
+ type: 'redirect',
url: '/pageC/cart/cashier',
params: {
pay_sn: res.data.pay_sn,
diff --git a/pageC/groupBuy/index.vue b/pageC/groupBuy/index.vue
index a63ac9b..baa8dca 100644
--- a/pageC/groupBuy/index.vue
+++ b/pageC/groupBuy/index.vue
@@ -7,7 +7,7 @@
-
+
@@ -39,8 +39,7 @@ export default {
},
watch: {
current(index) {
- // console.log(this.tabList);
- this.getPinTuanList({id: this.tabList[index].gc_id });
+ this.getPinTuanList({ id: this.tabList[index].gc_id });
}
},
methods: {
@@ -81,20 +80,20 @@ export default {
// scroll-view到底部加载更多
onreachBottom() {
this.$$refs.loadmore.reachBottom();
- // if(!this.timer) return false;
- // this.loadStatus = "loading";
- // this.page++;
- // this.getPinTuanList().then(length => {
- // if(length == 0) {
- // this.page--;
- // this.status = 'nomore';
- // } else {
- // this.status = 'loading';
- // }
- // }).catch(() => {
- // this.loadStatus = "nomore";
- // this.page--;
- // })
+ if(!this.timer) return false;
+ this.loadStatus = "loading";
+ this.page++;
+ this.getPinTuanList().then(length => {
+ if(length == 0) {
+ this.page--;
+ this.status = 'nomore';
+ } else {
+ this.status = 'loading';
+ }
+ }).catch(() => {
+ this.loadStatus = "nomore";
+ this.page--;
+ })
},
setViewHeight() {
const res = uni.getSystemInfoSync();
diff --git a/pageE/mine/MedalIntroduction.vue b/pageE/mine/MedalIntroduction.vue
index 6025fa5..1265c43 100644
--- a/pageE/mine/MedalIntroduction.vue
+++ b/pageE/mine/MedalIntroduction.vue
@@ -13,11 +13,25 @@
diff --git a/pageE/mine/MemberServeCoupon.vue b/pageE/mine/MemberServeCoupon.vue
index 4ca97f4..094ab67 100644
--- a/pageE/mine/MemberServeCoupon.vue
+++ b/pageE/mine/MemberServeCoupon.vue
@@ -34,6 +34,8 @@ export default {
couponGroupList: [],
couponList: [],
page: 0,
+ loadStatus: 'loadmore',
+ timer: true,
}
},
components: {
@@ -50,6 +52,27 @@ export default {
}
},
methods: {
+ loadMore(page) {
+ if(!this.timer) return false;
+ this.loadStatus = "loading";
+ this.page++;
+ this.getGoodsRecommend({
+ gc_id: this.classifyList[this.current].gc_id,
+ page: this.page,
+ reload: false,
+ }).then(length => {
+ // console.log(length);
+ if(length == 0) {
+ this.page--;
+ this.loadStatus = 'nomore';
+ } else {
+ this.loadStatus = 'loading';
+ }
+ }).catch(() => {
+ this.loadStatus = "nomore";
+ this.page--;
+ })
+ },
getGoodsClass() {
this.$u.api.getGoodsClass().then(res => {
if(res.errCode == 0) {
diff --git a/pageE/mine/MineProgress.vue b/pageE/mine/MineProgress.vue
index 198465d..2b276b6 100644
--- a/pageE/mine/MineProgress.vue
+++ b/pageE/mine/MineProgress.vue
@@ -73,7 +73,7 @@ export default {
},
filters: {
percentExp(value, rank) {
- console.log(rank);
+ // console.log(rank);
let result = '0/0';
if(rank) result = value + '/' + rank.max;
return result;
@@ -93,7 +93,7 @@ export default {
if (res.errCode == 0) {
this.memberInfo = res.data;
this.percent = (this.memberInfo.member_exppoints / this.rank[this.memberInfo.member_level - 1].max) * 100;
- console.log(this.percent);
+ // console.log(this.percent);
}
})
},
diff --git a/pageE/order/Index.vue b/pageE/order/Index.vue
index 4ff6db6..3683c9e 100644
--- a/pageE/order/Index.vue
+++ b/pageE/order/Index.vue
@@ -55,6 +55,13 @@ export default {
this.page = 0;
// again 重新请求列表 不然往列表里添加
value == 6 ? this.getAfterSaleList({ reload: 'again' }): this.getOrderList({ reload: 'again' });
+ if(value == 6) {
+ this.getAfterSaleList({ reload: 'again' });
+ } else if(value == 4) {
+ this.goodsTryOrderList({ reload: 'again' });
+ } else {
+ this.getOrderList({ reload: 'again' });
+ }
},
},
onLoad(option) {
@@ -113,6 +120,17 @@ export default {
}
return res;
},
+ async goodsTryOrderList({ reload = '' } = {}) {
+ const res = await this.$u.api.goodsTryOrderList({
+ page: this.page,
+ })
+ this.timer = true;
+ if(res.errCode == 0) {
+ if(reload) this.orderList = res.data;
+ else this.orderList.push(...res.data);
+ }
+ return res;
+ },
reachBottom() {
// 大于15条才会加载更多
if(this.orderList.length < 15) return false;
@@ -122,6 +140,7 @@ export default {
this.page++;
let promise;
if(this.current == 6) promise = this.getAfterSaleList();
+ else if(this.current == 4) promise = this.goodsTryOrderList();
else promise = this.getOrderList();
promise.then(res => {
this.loadStatus.splice(this.current, 1, "nomore");
diff --git a/pageE/tool/SendWash.vue b/pageE/tool/SendWash.vue
index d400fbd..e67d218 100644
--- a/pageE/tool/SendWash.vue
+++ b/pageE/tool/SendWash.vue
@@ -88,7 +88,6 @@ export default {
this.toApplyPage(current);
},
toApplyPage(index) {
- console.log(index)
var that = this;
if(index == 1) {
this.showPopup = false
@@ -175,7 +174,7 @@ export default {
}
}
}
- .send-btn{
+ .send-btn {
width: 100%;
display: flex;
justify-content: flex-end;
@@ -183,7 +182,6 @@ export default {
.btn{
width: 154rpx;
height: 54rpx;
- background: RGBA(255, 254, 255, 1);
border-radius: 49rpx;
transform: translate(-50%, 0);
font-size: 26rpx;
diff --git a/pageE/tool/WashOrder.vue b/pageE/tool/WashOrder.vue
index 0fc9b83..c104247 100644
--- a/pageE/tool/WashOrder.vue
+++ b/pageE/tool/WashOrder.vue
@@ -131,7 +131,7 @@
-
+
胖胖的店
diff --git a/pages.json b/pages.json
index 44c90a6..a7ab21a 100644
--- a/pages.json
+++ b/pages.json
@@ -113,6 +113,17 @@
}
}
},
+ {
+ "path": "triedDress/index",
+ "style": {
+ "navigationBarTitleText": "试穿订单",
+ "app-plus":{
+ "titleNView":{
+ "backgroundColor":"#ffffff"
+ }
+ }
+ }
+ },
{
"path": "comment/index",
"style": {