From 42b544b4a6c4580b6aa18cd17efdf87831d6e996 Mon Sep 17 00:00:00 2001 From: sws <1141121512@qq.com> Date: Tue, 10 Oct 2023 10:32:42 +0800 Subject: [PATCH] =?UTF-8?q?1=E8=A7=A3=E5=86=B3=E6=94=AF=E4=BB=98=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/payment/payment.vue | 66 ++++++---- pages/index/index.css | 7 ++ pages/index/index.vue | 20 +-- pages/plugins/points/index/index.vue | 179 ++++++++++++++------------- static/icon/iconfont.css | 1 - 5 files changed, 152 insertions(+), 121 deletions(-) diff --git a/components/payment/payment.vue b/components/payment/payment.vue index 9114fa54..e191b925 100644 --- a/components/payment/payment.vue +++ b/components/payment/payment.vue @@ -282,6 +282,7 @@ // 现金支付 uni.showModal({ content: res.data.msg, + showCancel: false, success(res) { if (res.confirm) { // 跳转订单列表页 @@ -309,14 +310,13 @@ popup_view_pay_html_is_show: true, }); } else { - app.globalData.showToast(res.data.msg); + this.order_item_pay_fail_handle(res.data.data, order_id, res.data.msg); } - this.order_item_pay_fail_handle(res.data.data, order_id); } }, - fail: () => { + fail: (res) => { uni.hideLoading(); - app.globalData.showToast('服务器请求出错'); + this.order_item_pay_fail_handle(res.data.data, order_id, '服务器请求出错'); }, }); } else { @@ -333,8 +333,7 @@ self.order_item_pay_success_handle(data, order_id); }, fail: (res) => { - app.globalData.showToast('支付失败'); - self.order_item_pay_fail_handle(data, order_id); + self.order_item_pay_fail_handle(data, order_id, '支付失败'); }, }); }, @@ -360,13 +359,13 @@ success: (res) => { // #ifdef MP-ALIPAY if (res.resultCode != 9000) { - app.globalData.showToast(res.memo || '支付失败'); + self.order_item_pay_fail_handle(data, order_id, res.memo || '支付失败'); return false; } // #endif // #ifdef MP-TOUTIAO if (res.code != 0) { - app.globalData.showToast('支付失败'); + self.order_item_pay_fail_handle(data, order_id, '支付失败'); return false; } // #endif @@ -374,8 +373,7 @@ self.order_item_pay_success_handle(data, order_id); }, fail: (res) => { - app.globalData.showToast('支付失败'); - self.order_item_pay_fail_handle(data, order_id); + self.order_item_pay_fail_handle(data, order_id, '支付失败'); }, }); }, @@ -395,7 +393,7 @@ this.$emit('reset-event'); }, fail: function (res) { - app.globalData.showToast('支付失败'); + self.order_item_pay_fail_handle(data, order_id, '支付失败'); }, }); } else { @@ -429,7 +427,7 @@ // 数据设置 self.order_item_pay_success_handle(data, order_id); } else { - self.order_item_pay_fail_handle(data, order_id); + self.order_item_pay_fail_handle(data, order_id, res.err_msg); } } ); @@ -484,8 +482,7 @@ }, fail: () => { clearInterval(self.popup_view_pay_timer); - app.globalData.showToast('服务器请求出错'); - self.order_item_pay_fail_handle(data, order_id); + self.order_item_pay_fail_handle(data, order_id, '服务器请求出错'); }, }); }, 3000); @@ -524,8 +521,8 @@ this.to_success_page_event(); } }, - // 支付失败数据设置 data:后台返回的参数, order_id: 订单id - order_item_pay_fail_handle(data, order_id) { + // 支付失败数据设置 data:后台返回的参数, order_id: 订单id, msg: 错误提示信息 + order_item_pay_fail_handle(data, order_id, msg) { let newData = { data: data, order_id: order_id, @@ -533,7 +530,7 @@ payment_id: this.propPaymentId, }; this.$emit('pay-fail', newData); - this.to_fail_page_event(); + this.to_fail_page_event(msg); }, // 成功跳转 to_success_page_event() { @@ -554,13 +551,33 @@ } }, // 失败跳转 - to_fail_page_event() { - console.log(this.propToFailPage); - if (this.propToFailPage) { - // 跳转支付页面 - uni.navigateTo({ - url: this.propToFailPage, - }); + to_fail_page_event(msg) { + let to_fail_page = this.propToFailPage; + if (to_fail_page) { + if (msg) { + // 现金支付 + uni.showModal({ + content: msg, + showCancel: false, + success(res) { + if (res.confirm) { + // 跳转支付页面 + uni.redirectTo({ + url: to_fail_page, + }); + } + }, + }); + } else { + // 跳转支付页面 + uni.redirectTo({ + url: to_fail_page, + }); + } + } else { + if (msg) { + app.globalData.showToast(msg); + } } }, // 页面卸载 @@ -572,6 +589,7 @@ this.setData({ popup_view_pay_html_is_show: false, }); + this.to_fail_page_event(); }, }, }; diff --git a/pages/index/index.css b/pages/index/index.css index edafc78c..90c62c40 100644 --- a/pages/index/index.css +++ b/pages/index/index.css @@ -83,6 +83,13 @@ /* #endif */ } +.search-content-animation { + transition: all 0.2s ease; + /* #ifdef MP-WEIXIN */ + transition: all 1s linear; + /* #endif */ +} + /* #ifdef H5 || MP-TOUTIAO || APP */ .search-content-fixed .nav-top-right-icon { top: 9px !important; diff --git a/pages/index/index.vue b/pages/index/index.vue index 9be453c1..a12cf559 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -17,14 +17,13 @@ - + - + - @@ -541,8 +540,8 @@ // 页面滚动监听 onPageScroll(e) { if (this.common_app_is_header_nav_fixed == 1 && this.common_app_is_enable_search == 1) { - var top = e.scrollTop > 35 ? 35 : e.scrollTop; - var num = top * 7; + var top = e.scrollTop > 42 ? 42 : e.scrollTop; + var num = top; var base = 230; // #ifdef MP-ALIPAY base = 235; @@ -553,14 +552,21 @@ // #endif // 开启哀悼插件的时候不需要浮动导航并且搜索框也不需要缩短、开启站点灰度会导致浮动失效 if (!this.plugins_mourning_data_is_app) { - var top_val = 35; - var val = num > base ? base : num; + var top_val = 42; + var val = num * 6 > base ? base : num * 6; // #ifdef MP-TOUTIAO top_val = 0; val = base; // #endif + console.log('num', num); + // console.log('base', base); this.setData({ + // #ifdef H5 || MP-TOUTIAO || APP search_style: 'width: calc(100% - ' + (val < 0 ? 0 : val) + 'rpx);', + // #endif + // #ifdef MP-WEIXIN + search_style: 'width: calc(100% - ' + (e.scrollTop > 200 ? 200 : e.scrollTop) + 'px);', + // #endif search_is_fixed: top >= top_val ? 1 : 0, }); } diff --git a/pages/plugins/points/index/index.vue b/pages/plugins/points/index/index.vue index 25cd273e..a2b7abe7 100644 --- a/pages/plugins/points/index/index.vue +++ b/pages/plugins/points/index/index.vue @@ -9,106 +9,107 @@ - - - - - - - - - - - - - - - - - - - - - - - 获知会员积分详情 - - - - - - {{ user.user_name_view }} - 当前可用 - - {{ user_integral.integral || 0 }} - - 积分 + + + + + + + + + + + + + + + + + + + + + + + 获知会员积分详情 - - - - - - - - - - - - - - 原始 - {{ item.original_integral }} - / - 最新 - {{ item.new_integral }} + + + + + {{ user.user_name_view }} + 当前可用 + + {{ user_integral.integral || 0 }} + + 积分 - {{ item.add_time_time }} - - {{ item.msg }} - {{ item.type == 1 ? '+' : '-' }} {{ item.operation_integral }} + + + + + + + + + + + + + 原始 + {{ item.original_integral }} + / + 最新 + {{ item.new_integral }} + + {{ item.add_time_time }} + + + {{ item.msg }} + {{ item.type == 1 ? '+' : '-' }} {{ item.operation_integral }} + + + + + - - - - + + + + + + + + - - - - - - - + + + + + + 积分规则 + + {{ item }} + + + + - - - - - - - 积分规则 - - {{ item }} - - - - diff --git a/static/icon/iconfont.css b/static/icon/iconfont.css index d8f41272..dca819b3 100644 --- a/static/icon/iconfont.css +++ b/static/icon/iconfont.css @@ -1,7 +1,6 @@ @font-face { font-family: "iconfont"; /* Project id 4227145 */ - /* Project id 4227145 */ /* 全局注册需要切换成绝对路径 */ /* @/static/icon/ */ src: url('@/static/icon/iconfont.ttf?t=1693280977762') format('truetype');