caiyuqin 2 месяцев назад
Родитель
Сommit
b1ecff4c29

+ 3 - 0
src/api/home.ts

@@ -159,6 +159,9 @@ export function getIssuanceSituation(params = {}) {
 export function queryTemplateByIdDetails(params = {}) {
     return http.Get('/couponCenter/APP/couponTemplate/queryTemplateByIdDetails', {
         params,
+        meta: {
+            ignoreAuth: true,
+        },
     })
 }
 

+ 8 - 8
src/pages-A/shareCoupon/index.vue

@@ -560,20 +560,20 @@ async function drawPosterBottomContent(ctx, canvas, width, scale, yScale) {
 }
 //头像绘制
 async function drawMerchantLine(ctx, canvas, centerX, y, maxWidth, scale) {
-//   const avatars = couponDetail.value.merchantInfoVOList
-//     ?.filter(item => item?.logo)
-//     ?.map(item => item.logo) || [];
- const avatars=['https://life.baoxianzhanggui.com/pro-img/securities/index/rank.png','https://life.baoxianzhanggui.com/pro-img/securities/index/rank.png','https://life.baoxianzhanggui.com/pro-img/securities/index/rank.png']
+  const avatars = couponDetail.value.merchantInfoVOList
+    ?.filter(item => item?.logo)
+    ?.map(item => item.logo) || [];
+ //const avatars=['https://life.baoxianzhanggui.com/pro-img/securities/index/rank.png','https://life.baoxianzhanggui.com/pro-img/securities/index/rank.png','https://life.baoxianzhanggui.com/pro-img/securities/index/rank.png']
   const label = '适用商家:'
   const avatarSize = 36 * scale
   const overlap = 12 * scale
   const gap = 8 * scale
 
-  //  最多显示 3 个头像
+  //  最多显示 3 个头像
   const MAX_AVATARS = 3
   const displayAvatars = avatars.slice(0, MAX_AVATARS)
 
-  //  检查是否有 GIF 格式图片
+  //  检查是否有 GIF 格式图片
   const hasGifAvatar = displayAvatars.some(avatarUrl => /\.gif$/i.test(avatarUrl))
   if (hasGifAvatar) {
     uni.showToast({
@@ -583,10 +583,10 @@ async function drawMerchantLine(ctx, canvas, centerX, y, maxWidth, scale) {
     console.warn('检测到GIF图片,小程序Canvas不支持GIF格式,跳过头像绘制')
   }
 
-  // 如果有 GIF 图片,不绘制头像
+  // 如果有 GIF 图片,不绘制头像
   const hasAvatars = displayAvatars.length > 0 && !hasGifAvatar
 
-  //  如果有超出,显示 "+N"
+  //  如果有超出,显示 "+N"
   const countText = couponDetail.value.numberMerchants
   const extraText = countText > 99 ? `+${countText}` : ''
   const displayCountText = extraText || countText

+ 3 - 1
src/pages-C/my/myGroup.vue

@@ -6,6 +6,7 @@ import {
   getTeamMembers,
 } from "@/api/my";
 import LsvList from "@/components/listScrollView/index.vue";
+import DateRangePicker from "@/components/dateRangePicker/index.vue";
 import { useRequest } from "alova/client";
 
 definePage({
@@ -430,11 +431,12 @@ const leaveClick = (item: { label: string; value: string }) => {
 
       .summary-divider {
         position: absolute;
-        top: 20rpx;
+        top: 50%;
         right: 0;
         width: 1rpx;
         height: 30rpx;
         background: #d9d9d9;
+        margin-top:-15rpx;
       }
     }
 

+ 1 - 0
src/pages-C/my/myNewUsers.vue

@@ -2,6 +2,7 @@
 import { computed, ref } from "vue";
 import { getImageUrl } from "@/utils/imageUtil";
 import LsvList from "@/components/listScrollView/index.vue";
+import DateRangePicker from "@/components/dateRangePicker/index.vue";
 import { getNewInvitationList } from "@/api/my";
 
 definePage({

+ 23 - 14
src/pages-C/my/myShare.vue

@@ -2,6 +2,7 @@
 import { ref } from "vue";
 import { getImageUrl } from "@/utils/imageUtil";
 import LsvList from "@/components/listScrollView/index.vue";
+import DateRangePicker from "@/components/dateRangePicker/index.vue";
 import { getProfitList } from "@/api/my";
 
 definePage({
@@ -102,20 +103,22 @@ onLoad((options) => {
           <text class="income-amount">{{totalAmount || 0}}</text>
         </view>
 
-        <view class="filter-box">
-          <view class="filter-bar">
-            <view class="filter-tabs">
-              <view v-for="(item, index) in tabList" :key="index" class="filter-tab"
-                :class="{ active: currentTab === item.value }" @click="handleTabClick(item.value)">
-                <text class="tab-text">{{ item.label }}</text>
+        <view class="filter-content">
+          <view class="filter-box">
+            <view class="filter-bar">
+              <view class="filter-tabs">
+                <view v-for="(item, index) in tabList" :key="index" class="filter-tab"
+                  :class="{ active: currentTab === item.value }" @click="handleTabClick(item.value)">
+                  <text class="tab-text">{{ item.label }}</text>
+                </view>
               </view>
             </view>
-          </view>
-          <view class="income-line"></view>
-          <view class='income-select'>
-            <view class='income-time' @click='showPicker=true'>
-              <view class='income-time-name'>{{dateRangeText}} </view>
-              <view class="caret" />
+            <view class="income-line"></view>
+            <view class='income-select'>
+              <view class='income-time' @click='showPicker=true'>
+                <view class='income-time-name'>{{dateRangeText}} </view>
+                <view class="caret" />
+              </view>
             </view>
           </view>
         </view>
@@ -212,15 +215,20 @@ onLoad((options) => {
       line-height: 56rpx;
     }
   }
+  .filter-content {
+    overflow: hidden;
+    background: #ffffff;
+    padding: 0 32rpx;
+  }
   .filter-box {
     display: flex;
     width: 100%;
     height: 92rpx;
-    background: #ffffff;
     margin: 32rpx 0;
-    padding: 0 32rpx;
     box-sizing: border-box;
     align-items: center;
+    overflow-x: auto;
+    white-space: nowrap;
     .filter-bar {
       display: flex;
       justify-content: space-between;
@@ -264,6 +272,7 @@ onLoad((options) => {
       display: flex;
       align-items: center;
       justify-content: space-between;
+      width: 0;
 
       .income-time-name {
         font-size: 28rpx;

+ 1 - 0
src/pages-C/my/myWriteOff.vue

@@ -2,6 +2,7 @@
 import { computed, ref } from "vue";
 import { getImageUrl } from "@/utils/imageUtil";
 import LsvList from "@/components/listScrollView/index.vue";
+import DateRangePicker from "@/components/dateRangePicker/index.vue";
 import { getWriteOffIncomeList } from "@/api/my";
 
 definePage({

+ 11 - 5
src/pages-C/share/shareInfo.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import { onLoad } from "@dcloudio/uni-app";
+import { onLoad, onShow } from "@dcloudio/uni-app";
 import { ref, computed } from "vue";
 import { getImageUrl } from "@/utils/imageUtil";
 import Upopup from "@/components/popup/index.vue";
@@ -27,6 +27,13 @@ onLoad(async (options: any) => {
   shareType.value = options.shareType;
   // 调用接口获取优惠券详情
   await fetchCouponDetail();
+  
+});
+
+// 页面每次可见时重新拉取数据(登录回来后自动刷新)
+onShow(async () => {
+  await fetchCouponDetail();
+
 });
 
 // 获取优惠券详情
@@ -149,14 +156,13 @@ async function getShareId() {
 
 async function receive() {
   if (!hasLogin.value) {
-    // 未登录 → 去登录,登录后回到当前页
+    // 未登录 → 去登录
     const currentPage = getCurrentPages()[getCurrentPages().length - 1];
-    const redirectUrl = `/${currentPage.route}`;
+    const redirectUrl = `/${currentPage.route}${currentPage.options ? '?' + Object.entries(currentPage.options).map(([k, v]) => `${k}=${v}`).join('&') : ''}`;
     toLoginPage({
+      mode: 'reLaunch',
       queryString: `?redirect=${encodeURIComponent(redirectUrl)}`,
     });
-    fetchCouponDetail();
-    getShareId();
     return;
   }
   // 已登录 → 跳转其他小程序领券