From 2b3f6c5a46a46b7ad780b3d71f478d81bfa36592 Mon Sep 17 00:00:00 2001 From: jiazhipeng Date: Mon, 8 Sep 2025 16:34:54 +0800 Subject: [PATCH] 1 --- pages/index/index.vue | 2 +- static/js/request.js | 8 +++-- subPackages/activity/suchao.vue | 44 +++++++++++++++++++++----- subPackages/techan/selfPickUpPoint.vue | 2 +- 4 files changed, 43 insertions(+), 13 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index c202818..f9668da 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -138,7 +138,7 @@ }, // 离开当前页面时获取定位 onHide() { - // this.getLocation() + this.getLocation() }, onReady() { this.initRectInfo() diff --git a/static/js/request.js b/static/js/request.js index f81f834..cfb2213 100644 --- a/static/js/request.js +++ b/static/js/request.js @@ -51,9 +51,11 @@ Vue.prototype.Post = (params = {}, apiurl) => { params.token = token; } return new Promise((resolve, reject) => { - uni.showLoading({ - title: '加载中' - }); + if (!params.noShowLoading) { + uni.showLoading({ + title: '加载中' + }); + } uni.request({ method: params.method || 'GET', url: Vue.prototype.NEWAPIURL + apiurl, diff --git a/subPackages/activity/suchao.vue b/subPackages/activity/suchao.vue index aaa9e1c..1f44b0d 100644 --- a/subPackages/activity/suchao.vue +++ b/subPackages/activity/suchao.vue @@ -5,10 +5,11 @@ - + + 活动规则 @@ -44,10 +45,8 @@ viewNum: 4, headImg: '', couponList: [ - {id: null, img: "https://static.ticket.sz-trip.com/uploads/20250903/ecbb6d745d444fa838649e67b9901ac8.png"}, - {id: null, img: "https://static.ticket.sz-trip.com/uploads/20250903/0d0e31d8cc6b3eef8fa83016b9dd93dd.png"}, - {id: null, img: "https://static.ticket.sz-trip.com/uploads/20250903/7762e7eea2e005d8c16587f7065e6d3e.png"}, - {id: null, img: "https://static.ticket.sz-trip.com/uploads/20250903/fcd19b70b45f80509b0363ef72902974.png"}, + {id: null, img: "https://static.ticket.sz-trip.com/uploads/20250904/6bb90a456a4800a99df91b97197fbc76.png"}, + {id: null, img: "https://static.ticket.sz-trip.com/uploads/20250904/a20709036f31e6979c9ae84c543a8538.png"}, ], isReceive: true, @@ -75,15 +74,27 @@ } }); }, + goRule (id) { + uni.navigateTo({ + url:"/subPackages/activity/commonRule?id="+id + }) + }, // 产品列表 getGoods() { + // 太慢了 先请求5条 this.Post({ tag_id: 101, offset: 0, - limit: 999, + limit: 5, },'/api/product/get_product_by_tag_subject').then(res => { this.list = res.data.list + this.Post({ + tag_id: 101,offset: 0, + limit: 999,noShowLoading: true, + },'/api/product/get_product_by_tag_subject').then(res => { + this.list = res.data.list + }) }) }, @@ -150,12 +161,29 @@ display: block; } } + .rule{ + width: 109rpx; + height: 41rpx; + background: #319F56; + border-radius: 7rpx 0rpx 0rpx 7rpx; + font-weight: 600; + font-size: 24rpx; + color: #FFFFFF; + + position: absolute; + top: 20rpx; + right: 0; + display: flex; + align-items: center; + justify-content: center; + line-height: 41rpx; + } .coupon-box{ - height: 466rpx; + height: 293rpx; background: #F4FFFE; border-radius:0 0 25rpx 25rpx; position: relative; - padding: 40rpx 26rpx 0; + padding: 80rpx 26rpx 0; overflow: hidden; margin-bottom: 44rpx; diff --git a/subPackages/techan/selfPickUpPoint.vue b/subPackages/techan/selfPickUpPoint.vue index 3a0c84e..cd5893a 100644 --- a/subPackages/techan/selfPickUpPoint.vue +++ b/subPackages/techan/selfPickUpPoint.vue @@ -51,7 +51,7 @@ this.getList() }, onShow(options) { - + this.getLocation() }, methods: {