Jelajahi Sumber

Merge branch 'dev/v1.0.98_yf' of jianyu/web into feature/v1.0.98

yangfeng 5 bulan lalu
induk
melakukan
b64c214246

+ 57 - 0
apps/mobile/src/api/modules/pay.js

@@ -349,3 +349,60 @@ export function setPhoneBind(data, type) {
     data
   })
 }
+
+// 赠送人超级订阅活动时间配置
+export function vipGiftActivityConfigAjax() {
+  return request({
+    url: '/subscribepay/vip/gift/configuration',
+    method: 'POST'
+  })
+}
+
+// 赠送人超级订阅可赠资源查询
+export function getSubResourcesAjax() {
+  return request({
+    url: '/subscribepay/vip/gift/getSubDuration',
+    method: 'POST'
+  })
+}
+
+// 根据手机号获取可赠信息
+export function getInfoByPhoneAjax(data) {
+  data = qs.stringify(data)
+  return request({
+    url: '/subscribepay/vip/gift/getInfoByPhone',
+    method: 'POST',
+    data
+  })
+}
+
+// 赠送超级订阅提交表单
+export function givingSuperVipAjax(data) {
+  data = qs.stringify(data)
+  return request({
+    url: '/subscribepay/vip/gift/transferSubDuration',
+    method: 'POST',
+    data
+  })
+}
+
+
+// 超级订阅赠送记录
+export function vipGiftRecordAjax(data) {
+  data = qs.stringify(data)
+  return request({
+    url: '/subscribepay/vip/gift/list',
+    method: 'POST',
+    data
+  })
+}
+
+// 超级订阅赠送记录详情
+export function vipGiftDetailAjax(data) {
+  data = qs.stringify(data)
+  return request({
+    url: '/subscribepay/vip/gift/informInfo',
+    method: 'POST',
+    data
+  })
+}

+ 22 - 8
apps/mobile/src/components/mine/MineHeader.vue

@@ -161,7 +161,7 @@
         </div>
       </div>
     </div>
-    <div class="gift-guide">
+    <div class="gift-guide" v-if="vipGiftPeriod">
       <span class="gift-guide-text">支持送好友超级订阅,快快送给好友吧!</span>
       <span class="gift-guide-btn" @click="sendToFriend">送给朋友</span>
     </div>
@@ -173,7 +173,7 @@
 <script>
 import OrderTabs from './OrderTabs.vue'
 import { Sticky } from 'vant'
-import { getAccountInfo, getUserAccountInfo } from '@/api/modules'
+import { getAccountInfo, getUserAccountInfo, vipGiftActivityConfigAjax } from '@/api/modules'
 import { AppIcon } from '@/ui'
 import { openAppOrWxPage, dateFormatter } from '@/utils'
 import { LINKS } from '@/data'
@@ -195,7 +195,9 @@ export default {
       accountInfo: {
         hasVip: false,
         hasBigmember: false
-      }
+      },
+      // 是否是超级订阅赠送活动期间
+      vipGiftPeriod: false
     }
   },
   computed: {
@@ -282,6 +284,7 @@ export default {
   },
   created() {
     this.init()
+    this.getVipActivityConfig()
   },
   methods: {
     ...mapActions('user', ['getUserIdentityList']),
@@ -447,6 +450,17 @@ export default {
         window.location.href = '/jyapp/free/customer'
       }
     },
+    // 获取超级订阅活动配置
+    async getVipActivityConfig() {
+      const { data } = await vipGiftActivityConfigAjax()
+      if (data) {
+        const { startTime, endTime } = data
+        // 校验时间有效性
+        const isValidPeriod = startTime && endTime && parseInt(startTime) < parseInt(endTime)
+        const nowTime = Math.floor(Date.now() / 1000)
+        this.vipGiftPeriod = isValidPeriod && nowTime >= parseInt(startTime) && nowTime <= parseInt(endTime)
+      }
+    },
     // 送好友
     sendToFriend() {
       const nowTime = Date.now()
@@ -498,7 +512,7 @@ export default {
   flex-shrink: 0;
   background-repeat: no-repeat;
   background-position: center top;
-  background-size: contain;
+  background-size: cover;
   &--blue {
     background-image: url(@/assets/image/mine/bg-blue.png);
   }
@@ -690,7 +704,6 @@ export default {
       display: flex;
       justify-content: space-between;
       margin-top: 8px;
-      margin-bottom: -2px;
       .gap {
         width: 8px;
       }
@@ -812,7 +825,7 @@ export default {
   display: flex;
   align-items: center;
   justify-content: space-between;
-  margin: 0 -8px;
+  margin: -4px -8px -8px;
   padding: 6px 20px 20px 20px;
   background: rgba(255, 255, 255, 0.8);
   border-radius: 0 16px 0 0;
@@ -823,7 +836,7 @@ export default {
     line-height: 18px;
   }
   &-btn {
-    padding: 2px 12px;
+    padding: 1px 12px;
     border: 1px solid rgba(255, 255, 255, 0.5);
     background: rgba(250, 231, 202, 1);
     box-shadow: 0px 4px 12px 0px rgba(186, 105, 31, 0.32);
@@ -831,6 +844,7 @@ export default {
     font-size: 14px;
     line-height: 20px;
     color: #171826;
+    box-sizing: border-box;
   }
 }
 ::v-deep {
@@ -838,7 +852,7 @@ export default {
     position: absolute;
     width: 100%;
     left: 0;
-    bottom: 8px;
+    bottom: 0;
     //height: 81px;
     border-top-right-radius: 16px;
     //box-shadow: 0 -8px 12px 0 rgba(92, 31, 5, 0.15);

+ 4 - 4
apps/mobile/src/router/modules/giving.js

@@ -18,7 +18,7 @@ export default [
     }
   },
   {
-    path: '/notify',
+    path: '/notify/:id',
     name: 'giving-notify',
     component: () => import('@/views/giving/notify.vue'),
     meta: {
@@ -27,9 +27,9 @@ export default [
     }
   },
   {
-    path: '/result',
-    name: 'giving-result',
-    component: () => import('@/views/giving/result.vue'),
+    path: '/share',
+    name: 'giving-share',
+    component: () => import('@/views/giving/share.vue'),
     meta: {
       title: '分享有礼',
       header: true

+ 9 - 0
apps/mobile/src/router/modules/static.js

@@ -88,5 +88,14 @@ export default [
       header: false,
       title: '超级订阅中转页'
     }
+  },
+  {
+    path: '/svip/gift/notice',
+    name: 'subscribe_transfer',
+    component: () => import('@/views/static/SVipGiftNotice.vue'),
+    meta: {
+      header: true,
+      title: '送好友超级订阅”产品须知'
+    }
   }
 ]

+ 24 - 0
apps/mobile/src/utils/utils.js

@@ -914,3 +914,27 @@ export function bSort (arr, value) {
   }
   return arr
 }
+
+// 月份数转换为“年+月”的组合格式
+export function formatMonthsToYearsMonths(months, lang = 'zh') {
+  const units = {
+    zh: { year: '年', month: '个月' },
+    en: { year: ' year', month: ' month', plural: 's' },
+  };
+  const { year, month, plural } = units[lang] || units.zh;
+
+  const years = Math.floor(months / 12);
+  const remainingMonths = months % 12;
+
+  let result = [];
+  if (years > 0) {
+    const yearUnit = lang === 'en' && years > 1 ? year + plural : year;
+    result.push(`${years}${yearUnit}`);
+  }
+  if (remainingMonths > 0) {
+    const monthUnit = lang === 'en' && remainingMonths > 1 ? month + plural : month;
+    result.push(`${remainingMonths}${monthUnit}`);
+  }
+
+  return result.join(' ') || `0${month}`;
+}

+ 81 - 15
apps/mobile/src/views/giving/friend.vue

@@ -1,10 +1,13 @@
 <script setup>
-import { ref, computed } from 'vue'
+import { ref, computed, onMounted, getCurrentInstance } from 'vue'
 import { CellGroup, Cell, Field, Checkbox, Dialog } from 'vant'
+import { getSubResourcesAjax, getInfoByPhoneAjax, givingSuperVipAjax } from '@/api/modules'
+
+const that = getCurrentInstance().proxy
 
 const accountInfo = ref({
-  province: '4个省',
-  month: 3
+  province: '',
+  duration: 0
 })
 const checked = ref(false)
 
@@ -16,10 +19,11 @@ const friendList = ref([
       phone: '',
       duration: ''
     },
-    isRegister: true
+    notRegister: false
   }
 ])
 
+// 显示已赠、剩余信息
 const showGifted = computed(() => {
   return friendList.value.some((item) => item.phone && item.duration)
 })
@@ -28,8 +32,8 @@ const showGifted = computed(() => {
 const isFormValid = computed(() => {
   return (
     friendList.value.every(
-      (item) => /^1[3-9]\d{9}$/.test(item.phone) && item.duration > 0
-    ) && checked.value
+      (item) => /^1[3-9]\d{9}$/.test(item.phone) && !item.errors.phone && item.duration > 0
+    ) && checked.value && !showExceedWarn.value
   )
 })
 
@@ -49,17 +53,23 @@ const giftedDuration = computed(() => {
 
 // 计算剩余时长
 const remainingDuration = computed(() => {
-  const calcMonth = accountInfo.value.month - giftedDuration.value
-  return calcMonth > 0 ? calcMonth : 0
+  const calcDuration = accountInfo.value.duration - giftedDuration.value
+  return calcDuration > 0 ? calcDuration : 0
 })
 
 // 超出时长提示
 const showExceedWarn = computed(() => {
-  return giftedDuration.value > accountInfo.value.month
+  return giftedDuration.value > accountInfo.value.duration
 })
 
 // 添加好友
 const addFriend = () => {
+  const canAdd = friendList.value.every(
+    (item) => /^1[3-9]\d{9}$/.test(item.phone) && item.duration > 0
+  )
+  if(!canAdd) {
+    return that.$toast('请先完成当前未完善的手机号和时长信息')
+  }
   friendList.value.push({
     phone: '',
     duration: '',
@@ -67,7 +77,7 @@ const addFriend = () => {
       phone: '',
       duration: ''
     },
-    isRegister: true
+    notRegister: false
   })
 }
 
@@ -83,6 +93,28 @@ const validatePhone = (index) => {
   const phone = friendList.value[index].phone
   const isValid = /^1[3-9]\d{9}$/.test(phone)
   friendList.value[index].errors.phone = isValid ? '' : '手机号格式不正确'
+  if (isValid) {
+    getInfoByPhoneAjax({
+      phone
+    }).then((res) => {
+      const { error_code: code, data } = res
+      if (code === 0 && data) {
+        if (data.status === -1) {
+          friendList.value[index].notRegister = true
+          friendList.value[index].errors.phone = ''
+        } else if (data.status === -2) {
+          friendList.value[index].notRegister = false
+          friendList.value[index].errors.phone = '手机号已是超级订阅会员,且购买省份与当前省份不一致,不可赠送。'
+        } else if (data.status === -3) {
+          friendList.value[index].notRegister = false
+          friendList.value[index].errors.phone = '不能将超级订阅赠送给自己,请更换手机号。'
+        } else {
+          friendList.value[index].notRegister = false
+          friendList.value[index].errors.phone = ''
+        }
+      }
+    })
+  }
 }
 
 // 时长校验
@@ -94,7 +126,7 @@ const validateDuration = (index) => {
 
 // 须知跳转
 const toLink = () => {
-  location.href = ''
+  that.$router.push('/static/svip/gift/notice')
 }
 
 // 取消
@@ -102,6 +134,37 @@ const onCancel = () => {
   history.back()
 }
 
+// 查询账号可赠资源
+const getSubResources = async () => {
+  const { error_code: code, data, error_msg: msg } = await getSubResourcesAjax()
+  if (code === 0 && data) {
+    accountInfo.value.province = data?.areacount === -1 ? '全国' : `${data?.areacount}个省`
+    accountInfo.value.duration = data?.gifted
+  } else {
+    console.error(msg)
+  }
+}
+
+onMounted(async () => {
+  await getSubResources()
+})
+
+const givingSubscribeResource = async () => {
+  const result = friendList.value.reduce((acc, cur) => {
+    acc[cur.phone] = cur.duration
+    return acc
+  }, {})
+  const params = {
+    phones: JSON.stringify(result)
+  }
+  const { error_code: code, error_msg: msg } = await givingSuperVipAjax(params)
+  if (code === 0) {
+    that.$router.push('/giving/record')
+  } else {
+    that.$toast(msg)
+  }
+}
+
 // 提交
 const onConfirm = () => {
   if (!isFormValid.value) {
@@ -121,6 +184,7 @@ const onConfirm = () => {
   })
     .then(() => {
       // on confirm
+      givingSubscribeResource()
     })
     .catch(() => {
       // on cancel
@@ -144,7 +208,7 @@ const onConfirm = () => {
           title-class="cell-title"
           value-class="cell-value"
           title="可赠送时长(取整)"
-          :value="accountInfo.month + '个月'"
+          :value="accountInfo.duration + '个月'"
         ></Cell>
       </CellGroup>
       <div class="add-container">
@@ -183,7 +247,7 @@ const onConfirm = () => {
                   :error-message="friend.errors.phone"
                   @blur="validatePhone(index)"
                 />
-                <p v-if="!friend.isRegister" class="unregistered-tips">
+                <p v-if="friend.notRegister" class="unregistered-tips" :class="{'pad-tips': friendList.length > 1}">
                   手机号尚未注册剑鱼,赠送其超级订阅后,平台会自动帮其按照对应手机号注册。
                 </p>
               </div>
@@ -314,11 +378,13 @@ const onConfirm = () => {
     color: #5f5e64;
   }
   .unregistered-tips {
-    padding: 0 48px 8px 110px;
-    margin-top: 8px;
+    padding: 0 48px 8px 104px;
     font-size: 12px;
     line-height: 18px;
     color: $main;
+    &.pad-tips {
+      padding: 0 8px 8px 104px;
+    }
   }
   .j-button-cancel {
     color: $main;

File diff ditekan karena terlalu besar
+ 3 - 5
apps/mobile/src/views/giving/notify.vue


+ 72 - 38
apps/mobile/src/views/giving/record.vue

@@ -1,13 +1,16 @@
 <script setup>
-import { ref, computed, onMounted, getCurrentInstance } from 'vue'
+import { ref, computed, onMounted, getCurrentInstance, nextTick } from 'vue'
 import { Tabs, Tab } from 'vant'
 import { useStore } from '@/store'
 import AppEmpty from '@/ui/empty/index.vue'
-import { getUserAccountInfo } from '@/api/modules'
+import { getUserAccountInfo, vipGiftRecordAjax } from '@/api/modules'
+import { dateFormatter, formatMonthsToYearsMonths } from '@/utils/utils'
 
 const { getters } = useStore()
 const that = getCurrentInstance().proxy
 
+const queryTab = that.$route.query?.activeTab
+
 // 是否是免费用户
 const isFree = computed(() => {
   return getters['user/isFree']
@@ -23,31 +26,11 @@ const expireTime = computed(() => {
   return superInfo.value.endTime
 })
 // tab索引
-const activeName = ref(0)
+const activeName = ref(1)
 // 赠送列表
-const giftList = ref([
-  {
-    id: '111',
-    phone: '1333333333',
-    duration: 2,
-    time: '2023-07-01'
-  },
-  {
-    id: '222',
-    phone: '1333333333',
-    duration: 1,
-    time: '2023-09-01'
-  }
-])
+const giftList = ref([])
 // 接收列表
-const receiveList = ref([
-  {
-    id: '333',
-    phone: '1333333333',
-    duration: 1,
-    time: '2023-09-01'
-  }
-])
+const receiveList = ref([])
 // 赠送为空提示
 const giftEmpty = computed(() => {
   if (isSuper.value) {
@@ -73,14 +56,59 @@ const giftEmpty = computed(() => {
   }
 })
 // 通知好友
-const onNotify = (item) => {
-  that.$router.push(`/giving/notify?id=${item.id}`)
+const onNotify = (id) => {
+  that.$router.push(`/giving/notify/${id}`)
 }
 // 跳转页面
 const goTargetPage = (link) => {
   that.$router.push(link)
 }
 
+// 获取赠送记录
+const getGiftRecordList = async (type = '1') => {
+  const { error_code: code, data } = await vipGiftRecordAjax({
+    giftType: type
+  })
+  if (code === 0 && data && data.list) {
+    if(type === '1') {
+      const convertedList = data.list.map(subArr => {
+        if (subArr.length === 0) return null
+        const { createTime } = subArr[0]
+        const arr = subArr.map(({ createTime, ...rest }) => rest);
+        return { arr, createTime }
+      }).filter(item => item !== null)
+      giftList.value = convertedList.map((item) => {
+        item.createTime = dateFormatter(item.createTime, 'yyyy.MM.dd HH:mm:ss')
+        item.arr = item.arr.map((v) => {
+          return  {
+            id: v.id,
+            phone: v.recipientUserPhone,
+            duration: v.duration
+          }
+        })
+        return item
+      })
+    } else {
+      receiveList.value = data.list.flat().map((item) => {
+        return {
+          id: item.id,
+          phone: item.giftUserPhone,
+          duration: formatMonthsToYearsMonths(item.duration),
+          createTime: dateFormatter(item.createTime, 'yyyy.MM.dd HH:mm:ss')
+        }
+      })
+    }
+  } else {
+    giftList.value = []
+    receiveList.value = []
+  }
+}
+
+const onTabChange = (name) => {
+  activeName.value = name
+  getGiftRecordList(name)
+}
+
 onMounted(async () => {
   if (isSuper.value) {
     const { data } = await getUserAccountInfo()
@@ -88,26 +116,31 @@ onMounted(async () => {
       superInfo.value = data?.list.find((v) => v.name === '超级订阅')
     }
   }
+  if (queryTab) {
+    activeName.value = queryTab
+  }
+  await nextTick()
+  getGiftRecordList(activeName.value)
 })
 </script>
 
 <template>
   <div class="j-container gift-record">
-    <Tabs class="j-container" v-model="activeName">
-      <Tab title="我赠送的" name="0">
+    <Tabs class="j-container" v-model="activeName"  @change="onTabChange">
+      <Tab title="我赠送的" name="1">
         <div v-if="giftList.length" class="gift-list">
-          <div class="gift-item" v-for="item in giftList" :key="item.id">
-            <div class="gift-item-time">赠送时间:{{ item.time }}</div>
-            <div class="flex flex-items-center">
+          <div class="gift-item" v-for="gift in giftList" :key="gift.createTime">
+            <div class="gift-item-time">赠送时间:{{ gift.createTime }}</div>
+            <div v-for="item in gift.arr" :key="item.id" class="flex flex-items-center">
               <div class="gift-item-info">
                 <span class="gift-item-label">手机号:</span>
                 <span class="gift-item-value">{{ item.phone }}</span>
               </div>
               <div class="flex-1 gift-item-info">
                 <span class="gift-item-label">时长:</span>
-                <span class="gift-item-value">{{ item.duration }} 个月</span>
+                <span class="gift-item-value">{{ item.duration }}个月</span>
               </div>
-              <div class="flex flex-items-center" @click.stop="onNotify(item)">
+              <div class="flex flex-items-center" @click.stop="onNotify(item.id)">
                 <span class="gift-item-notify">告知朋友</span>
                 <i class="j-icon j-base-icon icon-notify-active"></i>
               </div>
@@ -123,7 +156,7 @@ onMounted(async () => {
           </AppEmpty>
         </div>
       </Tab>
-      <Tab title="我接收的" name="1">
+      <Tab title="我接收的" name="2">
         <div v-if="receiveList.length" class="receive-list">
           <ul
             class="receive-item"
@@ -131,7 +164,7 @@ onMounted(async () => {
             :key="receive.id"
           >
             <li class="receive-item-time pb-4px">
-              赠送时间:{{ receive.time }}
+              赠送时间:{{ receive.createTime }}
             </li>
             <li class="flex flex-items-center pt-4px">
               <span class="receive-item-label">来自好友:</span>
@@ -140,7 +173,7 @@ onMounted(async () => {
             <li class="flex flex-items-center pt-4px">
               <span class="receive-item-label">得赠时长:</span>
               <span class="receive-item-value"
-                >{{ receive.duration }} 个月</span
+                >{{ receive.duration }}</span
               >
             </li>
           </ul>
@@ -235,7 +268,8 @@ onMounted(async () => {
       @include valueStyle;
     }
   }
-  .gift-empty {
+  .gift-empty,
+  .receive-empty {
     height: 100%;
     background: #fff;
   }

+ 41 - 21
apps/mobile/src/views/giving/result.vue → apps/mobile/src/views/giving/share.vue

@@ -1,35 +1,54 @@
 <script setup>
-import { ref, getCurrentInstance, nextTick } from 'vue'
+import { ref, getCurrentInstance, onMounted, nextTick } from 'vue'
 import { openAppOrWxPage } from '@/utils'
 import { LINKS } from '@/data'
+import { vipGiftDetailAjax } from '@/api/modules'
+import { dateFormatter } from '@/utils/utils'
 
 const that = getCurrentInstance().proxy
 
 const result = ref({
-  headImg:
-    'https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83erdz3icMTUOzPMoPuAicSt2Vjo3qsoibVVm9uw628VopnEVwUeo66J5XkyznqPmEUJ0fiaQtTyFIYpbvQ/132',
-  nickName: 'Wind',
-  phone: '1333333333',
+  headImg: new URL('@/assets/image/public/auto.png', import.meta.url).href,
+  giftUserPhone: '',
+  recipientUserPhone: '',
   duration: 1,
   province: 1,
-  time: '2024.08.13-2024.09.13'
+  vipStartTime: '',
+  vipEndTime: ''
 })
 
-const isBindPhone = ref(false)
-const isFollow = ref(false)
-const isSamePhone = ref(false)
+const query = that.$route.query
+const isBindPhone = query.isBinding === 'true'
+const isFollow = query.isSubscribe === 'true'
+const isSamePhone = query.isSame === 'true'
+const giftId = query.giftId
 
 const getDetail = async () => {
   // TODO: 接口请求
-  await nextTick()
+  const { error_code: code, data, error_msg: msg } = await vipGiftDetailAjax({
+    giftId
+  })
+  if (code === 0) {
+    const { areacount, duration, giftUserPhone, recipientUserPhone, vipStartTime, vipEndTime } = data
+    const headImg = new URL('@/assets/image/public/auto.png', import.meta.url).href
+    const province = areacount === -1 ? '全国' : `${areacount}个省级区域`
+    const time = dateFormatter(vipStartTime, 'yyyy.MM.dd') + '-' + dateFormatter(vipEndTime, 'yyyy.MM.dd')
+    result.value = { headImg, province, duration, giftUserPhone, recipientUserPhone, time }
+  } else {
+    that.$toast(msg)
+  }
 }
 
+onMounted(() => {
+  getDetail()
+})
+
 const onViewNow = async () => {
-  await getDetail()
-  if (isFollow.value) {
-    if (isBindPhone.value) {
-      if (isSamePhone.value) {
-        that.$router.push('/giving/record?id=111')
+  await nextTick()
+  if (isFollow) {
+    if (isBindPhone) {
+      if (isSamePhone) {
+        that.$router.push('/giving/record?activeTab=2')
       } else {
         that.$router.push('/tabbar/home')
       }
@@ -37,7 +56,8 @@ const onViewNow = async () => {
       openAppOrWxPage(LINKS.绑定手机号)
     }
   } else {
-    location.href = '/swordfish/about'
+    // return that.$toast('请先关注剑鱼标讯公众号')
+    location.href = '/swordfish/frontPage/user/free/redirect-wx'
   }
 }
 </script>
@@ -46,17 +66,17 @@ const onViewNow = async () => {
   <div class="j-container gift-result">
     <div class="result-card">
       <div class="card-container">
-        <div class="head-img">
+        <div class="flex flex-(items-center justify-center) head-img">
           <img :src="result.headImg" alt="head" />
         </div>
         <div class="gift-account">
           <p>
             你的好友&nbsp;&nbsp;<span class="highlight-text">{{
-              result.nickName
+              result.giftUserPhone
             }}</span>
           </p>
           <p>
-            送您剑鱼标讯账号{{ result.phone }}
+            送您剑鱼标讯账号{{ result.recipientUserPhone }}
             <span class="highlight-text">超级订阅</span> 服务
           </p>
         </div>
@@ -64,7 +84,7 @@ const onViewNow = async () => {
         <ul class="gift-content">
           <li class="gift-item">
             <span class="gift-item-label">购买区域:</span>
-            <span class="gift-item-value">{{ result.province }}个省级区域</span>
+            <span class="gift-item-value">{{ result.province }}</span>
           </li>
           <li class="gift-item">
             <span class="gift-item-label">订阅周期:</span>
@@ -88,7 +108,7 @@ const onViewNow = async () => {
   background: linear-gradient(180deg, #fff4dd 0%, #ffffff 100%);
 }
 .result-card {
-  margin: 80px 24px 32px;
+  margin: 80px 20px 32px;
   padding: 0 20px;
   background: linear-gradient(180deg, #ffffff 0%, #fff9f2 100%);
   box-shadow: 0px 16px 40px 0px rgba(253, 187, 96, 0.3);

+ 29 - 2
apps/mobile/src/views/order/components/vipsubscribe/Introduction.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="vip-rights">
+    <div class="giving-tips" v-if="vipGiftPeriod">支持送好友超级订阅,快快购买后送给好友吧!</div>
     <div class="buy-tip">
       <div class="buy-tip-header">购买须知</div>
       <div class="buy-tip-text">
@@ -11,15 +12,31 @@
   </div>
 </template>
 <script>
+import { vipGiftActivityConfigAjax } from '@/api/modules'
 export default {
   name: 'VipSubscribeIntroduction',
   components: {},
-  data: () => ({}),
+  data: () => ({
+    vipGiftPeriod: false
+  }),
   beforeCreate() {},
-  created() {},
+  created() {
+    this.getVipActivityConfig()
+  },
   methods: {
     goViewrights(){
       this.$router.push('/common/vipsubscribeRights')
+    },
+    // 获取超级订阅赠送好友活动配置
+    async getVipActivityConfig() {
+      const { data } = await vipGiftActivityConfigAjax()
+      if (data) {
+        const { startTime, endTime } = data
+        // 校验时间有效性
+        const isValidPeriod = startTime && endTime && parseInt(startTime) < parseInt(endTime)
+        const nowTime = Math.floor(Date.now() / 1000)
+        this.vipGiftPeriod = isValidPeriod && nowTime >= parseInt(startTime) && nowTime <= parseInt(endTime)
+      }
     }
   }
 }
@@ -66,5 +83,15 @@ export default {
     margin: auto;
     margin-bottom: 25px;
   }
+  .giving-tips{
+    margin-bottom: -1px;
+    margin-top: -8px;
+    padding: 6px 16px;
+    background: rgba(236, 250, 245, 1);
+    text-align: center;
+    font-size: 13px;
+    line-height: 20px;
+    color: $main;
+  }
 }
 </style>

+ 39 - 0
apps/mobile/src/views/static/SVipGiftNotice.vue

@@ -0,0 +1,39 @@
+<template>
+  <div class="vip-gift-notice">
+    <h1>“送好友超级订阅”产品须知</h1>
+    <h3>请您在下单赠送过程中接受本须知之前,务必审慎阅读、充分理解各条款内容。</h3>
+    <p>1.“送好友超级订阅”是剑鱼标讯推出的一项支持用户在线赠送超级订阅的功能,仅支持在个人身份下进行,若您在企业身份下,请切换至个人身份进行赠送。</p>
+    <p>2.赠送人购买超级订阅后输入“被赠送好友”的手机号即可进行赠送,完成赠送后,赠送人可通过海报、链接分享等方式告知“被赠送好友”,“被赠送好友”登录剑鱼标讯平台即可查看赠送的超级订阅权益。</p>
+    <p>3.购买超级订阅后赠送好友不支持退款,请确认无误后进行赠送。</p>
+    <p>4.在使用本功能过程中,如果用户出现违规行为,剑鱼标讯可限制用户使用本功能,并有权撤销违规交易,必要时追究法律责任。</p>
+    <p>5.如出现不可抗力或情势变更的情况,则平台可暂停本功能,并依相关法律法规的规定主张免责。</p>
+    <p>6.如有其他问题,请拨打客服热线400-108-6670进行反馈。</p>
+    <p>7.本活动最终解释权归北京剑鱼信息技术有限公司所有。</p>
+  </div>
+</template>
+
+<style scoped lang="scss">
+.vip-gift-notice {
+  box-sizing: border-box;
+  padding: 16px;
+  -webkit-overflow-scrolling: touch;
+  text-align: justify;
+  h1 {
+    line-height: 28px;
+    font-size: 16px;
+    margin-bottom: 8px;
+    text-align: center;
+  }
+  h3{
+    margin-bottom: 6px;
+    line-height: 20px;
+    font-size: 13px;
+    color: #1d1d1d;
+  }
+  p {
+    line-height: 22px;
+    font-size: 13px;
+    color: #5f5e64;
+  }
+}
+</style>

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini