From 73678fdd2f4f06c1d231e0ca6b0d7422406a1fdf Mon Sep 17 00:00:00 2001 From: jiazhipeng Date: Thu, 14 Aug 2025 14:40:51 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E8=B4=AD=E7=89=A9=E8=BD=A6=E4=B8=8D?= =?UTF-8?q?=E5=BC=BA=E5=88=B6=E7=99=BB=E5=BD=95+=E4=BC=98=E6=83=A0?= =?UTF-8?q?=E5=88=B8=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/cartData.vue | 2 +- mixins/myMixins.js | 10 +++++----- static/css/base.css | 3 +++ static/js/request.js | 18 ++++++++++-------- subPackages/food/detail.vue | 2 +- subPackages/homestay/detail.vue | 2 +- subPackages/order/orderCoupon.vue | 2 +- subPackages/ticket/detail.vue | 2 +- 8 files changed, 23 insertions(+), 18 deletions(-) diff --git a/components/cartData.vue b/components/cartData.vue index ee914f8..ff52186 100644 --- a/components/cartData.vue +++ b/components/cartData.vue @@ -144,7 +144,7 @@ this.cartData = data this.setAllSelect() } else { - this.Post({},'/api/cart/get_post_list').then(res => { + this.Post({noForceLogin: true},'/api/cart/get_post_list').then(res => { if (res) { this.cartData = (res.data || []).map(v=>{return {...v, isSelected:selectedData.includes(v.specifications_id)}}) this.setAllSelect() diff --git a/mixins/myMixins.js b/mixins/myMixins.js index 2f412e9..a559b4d 100644 --- a/mixins/myMixins.js +++ b/mixins/myMixins.js @@ -15,10 +15,10 @@ export const myMixins ={ // 分享到朋友圈 onShareTimeline() { return { - title: '智游常熟', + title: '时味苏州', type: 0, summary: "edewdewdewf", - imageUrl: "https://static.ticket.sz-trip.com/dongtai/images/index/share.jpg" + imageUrl: "https://static.ticket.sz-trip.com/uploads/20250813/b31ec3969350407f4fca5c0d283d9102.png" } }, onShareAppMessage() { @@ -33,10 +33,10 @@ export const myMixins ={ console.log(111,url,`${view.route}?url=${url}`) return { - title: '智游常熟', // 分享的名称 + title: '时味苏州', // 分享的名称 path: `${view.route}?url=${url}`, // 将 url 作为参数传递 - imageUrl: "https://static.ticket.sz-trip.com/dongtai/images/index/share.jpg", - mpId: 'wxb8f15afe2765976d' // 此处配置微信小程序的 AppId + imageUrl: "https://static.ticket.sz-trip.com/uploads/20250813/b31ec3969350407f4fca5c0d283d9102.png", + mpId: 'wx699ed131345cf8dd' // 此处配置微信小程序的 AppId }; } } \ No newline at end of file diff --git a/static/css/base.css b/static/css/base.css index dd4a34b..5f10854 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -89,6 +89,9 @@ view { } .h-1rpx{ height: 1rpx; +} +.no-scrollbar::-webkit-scrollbar{ + display: none; } .no-data-zhanwei{ display: flex; diff --git a/static/js/request.js b/static/js/request.js index 5c647d1..7d9e24e 100644 --- a/static/js/request.js +++ b/static/js/request.js @@ -20,15 +20,17 @@ const getToken = () => { }; // 定义错误处理函数 -const handleError = (res, reject) => { +const handleError = (res, reject, noForceLogin) => { setTimeout(() => { - uni.showToast({ - title: res.data?.msg || res.msg, - icon: 'none' - }); + if (!noForceLogin) { + uni.showToast({ + title: res.data?.msg || res.msg, + icon: 'none' + }); + } reject(res); }, 0); - if (res.data?.code === 401) { + if (res.data?.code === 401 && !noForceLogin) { store.commit('changeLoginPath'); } }; @@ -64,13 +66,13 @@ Vue.prototype.Post = (params = {}, apiurl) => { if (res.data.code === 200 || res.data.code === 1) { resolve(res.data); } else { - handleError(res, reject); + handleError(res, reject,params.noForceLogin); } }, fail: (err) => { console.log('err', err); uni.hideLoading() - handleError(err, reject); + handleError(err, reject,params.noForceLogin); } }); }); diff --git a/subPackages/food/detail.vue b/subPackages/food/detail.vue index 7150516..cb7eac8 100644 --- a/subPackages/food/detail.vue +++ b/subPackages/food/detail.vue @@ -257,7 +257,7 @@ }, getCartList () { - this.Post({},'/api/cart/get_cart_count').then(res=>{ + this.Post({noForceLogin: true},'/api/cart/get_cart_count').then(res=>{ this.cartNum = res.data || 0 }) }, diff --git a/subPackages/homestay/detail.vue b/subPackages/homestay/detail.vue index fdcda2c..ccdb684 100644 --- a/subPackages/homestay/detail.vue +++ b/subPackages/homestay/detail.vue @@ -244,7 +244,7 @@ methods: { // 获取购物车数量 getCartList () { - this.Post({},'/api/cart/get_cart_count').then(res=>{ + this.Post({noForceLogin: true},'/api/cart/get_cart_count').then(res=>{ this.cartNum = res.data || 0 }) }, diff --git a/subPackages/order/orderCoupon.vue b/subPackages/order/orderCoupon.vue index 6e7df49..1870428 100644 --- a/subPackages/order/orderCoupon.vue +++ b/subPackages/order/orderCoupon.vue @@ -114,7 +114,7 @@ console.log('选中的',this.list[index].selected); if(item.selected) { if (item.activity.discount_type == 'pricebreak') { - this.reducePrice = item.activity.mini_money/100+'元' + this.reducePrice = item.activity.money/100+'元' this.coupon = item } else{ this.coupon = item diff --git a/subPackages/ticket/detail.vue b/subPackages/ticket/detail.vue index 5eadb92..802396f 100644 --- a/subPackages/ticket/detail.vue +++ b/subPackages/ticket/detail.vue @@ -517,7 +517,7 @@ // 购物车 getCartList () { - this.Post({},'/api/cart/get_cart_count').then(res=>{ + this.Post({noForceLogin: true},'/api/cart/get_cart_count').then(res=>{ this.cartNum = res.data || 0 }) }, From dfdcc146ba1ee643e754d33bf2f8e5fe4df01cb7 Mon Sep 17 00:00:00 2001 From: jiazhipeng Date: Thu, 14 Aug 2025 14:41:39 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E5=A4=B4=E5=9B=BE=E9=AB=98=E5=BA=A6?= =?UTF-8?q?=E8=87=AA=E9=80=82=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- subPackages/food/index.vue | 3 +-- subPackages/homestay/index.vue | 3 +-- subPackages/line/index.vue | 8 ++++++++ subPackages/ticket/index.vue | 4 ++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/subPackages/food/index.vue b/subPackages/food/index.vue index 27d5fcf..7d4230b 100644 --- a/subPackages/food/index.vue +++ b/subPackages/food/index.vue @@ -1,7 +1,7 @@