From 2d384bd75f18ae487b648cfa86040197c48f0b87 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=93=E5=B9=B3=E8=89=BA?= <52643018@qq.com>
Date: Sat, 9 Oct 2021 12:27:55 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/lf-adModal/lf-adModal.vue | 2 +-
.../lf-indexShopMatrix/lf-indexShopMatrix.vue | 3 +-
.../lf-waterfall-pointgoods/lf-waterfall.vue | 4 +-
.../lf-waterfall-shopdetails/lf-waterfall.vue | 8 +--
pages/order/cashier/cashier.vue | 26 +++++-----
pages/order/confirm/confirm.vue | 18 ++++---
pages/order/index/onlineorder.vue | 9 +++-
pages/order/newdetail/newdetail.vue | 32 +++++++++++-
pages/shop/searchList.vue | 52 +++++++++++--------
pages/user/my/center.vue | 14 +++--
10 files changed, 109 insertions(+), 59 deletions(-)
diff --git a/components/lf-adModal/lf-adModal.vue b/components/lf-adModal/lf-adModal.vue
index 4b59d2e..493034d 100644
--- a/components/lf-adModal/lf-adModal.vue
+++ b/components/lf-adModal/lf-adModal.vue
@@ -10,7 +10,7 @@
-
+
diff --git a/components/lf-indexShopMatrix/lf-indexShopMatrix.vue b/components/lf-indexShopMatrix/lf-indexShopMatrix.vue
index 93d523f..be5b73e 100644
--- a/components/lf-indexShopMatrix/lf-indexShopMatrix.vue
+++ b/components/lf-indexShopMatrix/lf-indexShopMatrix.vue
@@ -63,7 +63,6 @@
.item{
width: 165rpx;
height: 165rpx;
- border: 1rpx solid #979797;
margin-right: 9rpx;
position: relative;
overflow: hidden;
@@ -84,7 +83,7 @@
.shop{
width: 100%;
height: 100%;
- background-color: rgba(0,0,0,0.1);
+ background-color: rgba(0,0,0,0.5);
display: flex;
flex-direction: column;
justify-content: center;
diff --git a/components/lf-waterfall-pointgoods/lf-waterfall.vue b/components/lf-waterfall-pointgoods/lf-waterfall.vue
index 3ad6a53..958935d 100644
--- a/components/lf-waterfall-pointgoods/lf-waterfall.vue
+++ b/components/lf-waterfall-pointgoods/lf-waterfall.vue
@@ -4,7 +4,7 @@
-
+
已兑{{item.sale}}
@@ -22,7 +22,7 @@
-
+
已兑{{item.sale}}
diff --git a/components/lf-waterfall-shopdetails/lf-waterfall.vue b/components/lf-waterfall-shopdetails/lf-waterfall.vue
index b9de73e..5456268 100644
--- a/components/lf-waterfall-shopdetails/lf-waterfall.vue
+++ b/components/lf-waterfall-shopdetails/lf-waterfall.vue
@@ -4,7 +4,7 @@
-
+
已售{{item.sale}}
@@ -19,7 +19,7 @@
-
+
{{item.title}}
@@ -135,7 +135,9 @@
},
clear() {
console.log('组件名',this.$refs)
- this.$refs.uWaterfall[0].clear();
+ if(this.$isRight(this.$refs)){
+ this.$refs.uWaterfall[0].clear();
+ }
}
}
}
diff --git a/pages/order/cashier/cashier.vue b/pages/order/cashier/cashier.vue
index 36aa351..ab0a1c7 100644
--- a/pages/order/cashier/cashier.vue
+++ b/pages/order/cashier/cashier.vue
@@ -20,25 +20,25 @@
-->
-
+
-
+
+
立即支付
《购买须知》
-
+
@@ -54,14 +54,16 @@
return {
pay_list: [{
name: '余额支付',
- icon: 'icon--',
+ icon: 'icon-yuebao',
type: 'balance',
- checked: false
+ checked: false,
+ color: '#15716E'
},{
name: '微信支付',
- icon: 'icon--1',
+ icon: 'icon-weixinzhifu',
type: 'wx_lite',
- checked: true
+ checked: true,
+ color: '#09BB07'
}],
time: new Date('2021/09/8 14:15:00').getTime() - new Date('2021/09/8 14:10:00').getTime(),
is_date_finish: false,
@@ -114,7 +116,6 @@
// 支付密码输入完成
payComfirm(event){
this.user_pw = event;
- this.show_pw = false;
this.confirm();
},
// 支付
@@ -151,7 +152,6 @@
Authorization: this.token
}
}).then(res => {
- console.log("-------------------", res)
res = res.data;
if (res.status) {
// this.formId = e.detail.formId || '';
@@ -159,14 +159,14 @@
this.balanceCharge();
} else {
this.newcharge(true, res.data.charge);
-
}
} else {
this.newcharge(false, res.message);
-
+ this.show_pw = false;
}
})
}).catch(() => {
+ this.show_pw = false;
this.setData({
loading: false
});
diff --git a/pages/order/confirm/confirm.vue b/pages/order/confirm/confirm.vue
index 5022094..06173e9 100644
--- a/pages/order/confirm/confirm.vue
+++ b/pages/order/confirm/confirm.vue
@@ -235,13 +235,19 @@
Authorization: this.token
}
}).then(res => {
- let detail = res.data.data;
- this.order_detail = detail;
- this.address = res.data.data.address;
- if(this.$isRight(detail.coupons)){
- this.coupon_index = 0;
+ if(res.data.code == 200){
+ let detail = res.data.data;
+ this.order_detail = detail;
+ this.address = res.data.data.address;
+ if(this.$isRight(detail.coupons)){
+ this.coupon_index = 0;
+ }
+ this.calcAmount();
+ }else{
+ this.$msg(res.data.message || '生成订单失败').then(() => {
+ this.$toBack();
+ })
}
- this.calcAmount();
uni.hideLoading()
}).catch(err => uni.hideLoading())
},
diff --git a/pages/order/index/onlineorder.vue b/pages/order/index/onlineorder.vue
index 2fd796d..f193dfa 100644
--- a/pages/order/index/onlineorder.vue
+++ b/pages/order/index/onlineorder.vue
@@ -168,10 +168,15 @@
return `calc(${this.scrollH}px - ${this.nav_height}px - 90rpx)`;
}
},
- onLoad(){
+ onLoad(options){
let info = uni.getSystemInfoSync();
this.scrollH = info.screenHeight;
- this.getData()
+ if(typeof options.current != 'undefined'){
+ this.current = Number(options.current) || 0;
+ this.getData()
+ }else{
+ this.getData()
+ }
},
methods: {
goDetails(type,id) {
diff --git a/pages/order/newdetail/newdetail.vue b/pages/order/newdetail/newdetail.vue
index 44bff31..7e66669 100644
--- a/pages/order/newdetail/newdetail.vue
+++ b/pages/order/newdetail/newdetail.vue
@@ -182,7 +182,7 @@
待付款
- 取消订单
+ 取消订单
立即付款
@@ -248,7 +248,8 @@
color: '#000000', //边框颜色支持渐变色
}
},
- logistics_data: {}
+ logistics_data: {},
+ show_count: 0
}
},
components: {
@@ -265,6 +266,13 @@
this.searchLogistics();
}
},
+ onShow(){
+ this.show_count++;
+ if(this.show_count > 1){
+ this.getOrderDetails();
+ this.searchLogistics();
+ }
+ },
methods: {
searchLogistics() {
this.$http.get({
@@ -290,6 +298,26 @@
this.show = false;
console.log("倒计时结束");
},
+ // 取消订单
+ cancelOrder(){
+ this.$http.post({
+ api: 'api/shopping/order/cancel',
+ data: {
+ order_no: this.order_no
+ },
+ header: {
+ Authorization: this.$cookieStorage.get('user_token')
+ }
+ }).then(res => {
+ if(res.data.code == 200){
+ this.$msg('订单取消成功', {icon: 'success'}).then(() => {
+ this.$toBack();
+ })
+ }else{
+ this.$msg(res.data.message || '订单取消失败');
+ }
+ })
+ },
countDown(munite, second) {
let m = munite;
let s = second;
diff --git a/pages/shop/searchList.vue b/pages/shop/searchList.vue
index 6d2ac40..8f378ed 100644
--- a/pages/shop/searchList.vue
+++ b/pages/shop/searchList.vue
@@ -111,32 +111,38 @@
page: this.page
}
}).then(res => {
- if(res.data.code == 200){
- let goods = res.data.data.goods;
- let brand = res.data.data.brand;
- let isPage = this.$isRight(goods.next_page_url);
- this.isPage = isPage;
-
- let list = goods.data.map(item => {
- return {
- id: item.id,
- original_price: item.min_market_price,
- picture: item.img,
- pictures: [item.img],
- price: item.min_price,
- sale: item.sale_count,
- title: item.name
+ if(res.data.status){
+ // TODO 搜索接口已改,需重新对接
+ if(this.$isRight(res.data.data)){
+ let goods = res.data.data.goods;
+ let brand = res.data.data.brand;
+ let isPage = this.$isRight(goods.next_page_url);
+ this.isPage = isPage;
+
+ let list = goods.data.map(item => {
+ return {
+ id: item.id,
+ original_price: item.min_market_price,
+ picture: item.img,
+ pictures: [item.img],
+ price: item.min_price,
+ sale: item.sale_count,
+ title: item.name
+ }
+ })
+
+ if(this.page == 1){
+ this.goods_list = list;
+ }else{
+ this.goods_list.push(...list);
}
- })
-
- if(this.page == 1){
- this.goods_list = list;
+ console.log("this.goods_list", this.goods_list)
+ this.brand_list = brand;
+ this.tab_list[1].name = `商户(${brand.length})`;
+ this.tab_list[0].name = `商品(${this.goods_list.length})`;
}else{
- this.goods_list.push(...list);
+ this.$msg('该关键词没有数据哦~')
}
- this.brand_list = brand;
- this.tab_list[1].name = `商户(${brand.length})`;
- this.tab_list[0].name = `商品(${this.goods_list.length})`;
}else{
this.$msg(res.data.message || '服务器错误,请稍后再试');
}
diff --git a/pages/user/my/center.vue b/pages/user/my/center.vue
index d1eef8d..1efb66e 100644
--- a/pages/user/my/center.vue
+++ b/pages/user/my/center.vue
@@ -75,7 +75,7 @@
+ @click="$url(item.path)">
{{ item.name }}
@@ -124,16 +124,20 @@
nav_bg_color: 'transparent' ,// 导航背景颜色
order_tablist: [{
name: '待付款',
- icon: 'icon-daifukuan'
+ icon: 'icon-daifukuan',
+ path: '/pages/order/index/onlineorder?current=1'
},{
name: '待发货',
- icon: 'icon-31daifahuo'
+ icon: 'icon-31daifahuo',
+ path: '/pages/order/index/onlineorder?current=2'
},{
name: '待收货',
- icon: 'icon-daishouhuo'
+ icon: 'icon-daishouhuo',
+ path: '/pages/order/index/onlineorder?current=3'
},{
name: '待提货',
- icon: 'icon-tihuo'
+ icon: 'icon-tihuo',
+ path: '/pages/order/index/onlineorder?current=4'
}],
my_service_list: [{
name: '会员服务',