Răsfoiți Sursa

优化:优惠券跳转广誉源地址

lishanshan 4 luni în urmă
părinte
comite
06c41c000f

+ 8 - 1
src/components/couponList.vue

@@ -15,6 +15,12 @@ import { safeAreaInsets } from '@/utils'
 import { useTokenStore } from '@/store/token'
 import { toLoginPage } from '@/utils/toLoginPage'
 
+const props = defineProps<{
+    stickyTop?: number
+}>()
+
+const stickyTop = computed(() => props.stickyTop || 0)
+
 const tokenStore = useTokenStore()
 const { hasLogin } = storeToRefs(tokenStore)
 definePage({
@@ -24,6 +30,7 @@ definePage({
     },
 })
 
+
 const areaStore = useAreaStore()
 const { currentCity } = storeToRefs(areaStore)
 
@@ -343,7 +350,7 @@ async function couponTypeChange(type) {
                     <template v-else>
                         <view v-for="item in data" :key="item.templateId" class="invite-content-item">
                             <!-- <invite-item :data="item" /> -->
-                            <!-- 优惠券类型:4-兑换券,2-折扣券,3-满减券 -->
+                            <!-- 优惠券类型:1-权益券,2-折扣券,3-满减券,4-兑换券 -->
                             <template v-if="item.type == '4'">
                                 <ExchangeCoupon :coupon="item" />
                             </template>

+ 11 - 5
src/components/templateCoupon.vue

@@ -48,6 +48,8 @@ const category = computed(() => {
         if (relatedType === '2') {
             relatedName = getLastPartAfterSlash(coupon.value.relatedName)
             return `仅限${relatedName}分类商品使用`
+        } else if (relatedType === '3') {
+            return `仅限部分商品使用`
         }
         else {
             return `仅限${relatedName}商品使用`
@@ -101,7 +103,7 @@ function handleCloseShareModal() {
         <view class="discount-coupon-content">
             <view class="discount-coupon-info-container">
                 <view class="discount-coupon-info-content">
-                    <view class="discount-coupon-info-price">
+                    <view :class="coupon.ruleReductionAmount && String(coupon.ruleReductionAmount).length > 2 ? 'discount-coupon-info-price scale' : 'discount-coupon-info-price'">
                         <text class="discount-coupon-info-number">
                             {{ coupon.type === '2' ? coupon?.ruleDiscountRate : coupon?.ruleReductionAmount }}
                         </text>
@@ -145,15 +147,15 @@ function handleCloseShareModal() {
                 <view class="info-item">
                     <view class="item-title">限定地区:</view>
                     <view class="item-content">
-                        {{ coupon?.locality && coupon?.locality !== 'null' ?
-                            `仅可在${coupon?.locality}地区的商户使用` : '不限地区' }}
+                        <view v-if="coupon.relatedType == '3'">仅可在部分地区使用</view>
+                        <view v-else>{{ coupon?.locality && coupon?.locality !== 'null' ? `仅可在${coupon?.locality}地区的商户使用` : '不限地区' }}</view>
                     </view>
                 </view>
                 <view class="info-item">
                     <view class="item-title">限定商户:</view>
                     <view class="item-content">
-                        {{ coupon?.storeName && coupon?.storeName !== 'null' ?
-                            `仅限${coupon?.storeName}商户使用` : '不限商户' }}
+                        <view v-if="coupon.relatedType == '3'">仅限部分商户使用</view>
+                        <view v-else>{{ coupon?.storeName && coupon?.storeName !== 'null' ? `仅限${coupon?.storeName}商户使用` : '不限商户' }}</view>
                     </view>
                 </view>
                 <view class="info-item">
@@ -238,6 +240,10 @@ function handleCloseShareModal() {
                     }
                 }
 
+                .scale {
+                    scale: 0.8;
+                }
+
                 .discount-coupon-info-desc {
                     display: flex;
                     flex-direction: column;

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

@@ -18,7 +18,7 @@
             <!-- 广誉源H5链接-二维码 -->
             <view v-if="couponDetail.platformSource == '2'" class="qc-code-img">
                 <uqrcode ref="uqrcodeRef" :hide="true" canvas-id="qrcode" size="240" sizeUnit="rpx"
-                    :value="`https://city.baoxianzhanggui.com/fragrance/#/pages/login/wxLogin?shareType='COUPON'&shareContentId=${shareId}`"
+                    :value="`https://city.baoxianzhanggui.com/fragrance/#/pages/index/index?shareType='COUPON'&shareContentId=${shareId}`"
                     h5DownloadName="领取优惠券" :h5SaveIsDownload="true" logo="@/static/images/gyy_logo.png" :logoSize="60" :logoBorderRadius="8" logoBorderColor="#FFFFFF" :logoBorderWidth="2" />
                     <!-- h5DownloadName="领取优惠券" :h5SaveIsDownload="true" /> -->
 

+ 1 - 0
src/utils/platformSource.ts

@@ -3,6 +3,7 @@
  */
 const platformSourceMap = {
     '1': '晋掌柜生活',
+    '2': '广誉源',
 }
 
 /**