Pārlūkot izejas kodu

wip: 分支合并

Signed-off-by: tangshizhe <48740614+tangshizhe@users.noreply.github.com>
tangshizhe 4 mēneši atpakaļ
vecāks
revīzija
9afb4f1f52

+ 22 - 31
apps/mobile/src/views/order/components/vipsubscribe/Introduction.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="vip-rights">
-    <div class="giving-tips" v-if="isShowGift">
+    <div v-if="isShowGift" class="giving-tips">
       支持送好友超级订阅,快快购买后送给好友吧!
     </div>
     <div class="buy-tip">
@@ -33,22 +33,16 @@
 </template>
 
 <script>
-<<<<<<< HEAD
+import { mapActions, mapGetters, mapMutations, mapState } from 'vuex'
+import { throttle } from 'lodash'
 import IntroductionCard from './IntroductionCard.vue'
+import { vipGiftActivityConfigAjax } from '@/api/modules'
 
 export default {
   name: 'VipSubscribeIntroduction',
   components: {
     IntroductionCard
   },
-  data: () => ({}),
-=======
-import { mapState, mapMutations, mapActions, mapGetters } from 'vuex'
-import { vipGiftActivityConfigAjax } from '@/api/modules'
-import { throttle } from 'lodash'
-export default {
-  name: 'VipSubscribeIntroduction',
-  components: {},
   data: () => ({
     vipGiftPeriod: false,
     type: '',
@@ -59,14 +53,13 @@ export default {
     ...mapGetters('user', ['userIdentityType']),
     isShowGift() {
       return (
-        this.vipGiftPeriod &&
-        this.isScroll &&
-        (!this.type || this.type === 'buy') &&
-        this.userIdentityType === 0
+        this.vipGiftPeriod
+        && this.isScroll
+        && (!this.type || this.type === 'buy')
+        && this.userIdentityType === 0
       )
     }
   },
->>>>>>> main
   beforeCreate() {},
   async created() {
     this.type = this.$route.query.type || ''
@@ -86,16 +79,14 @@ export default {
     }
   },
   methods: {
-<<<<<<< HEAD
+    ...mapMutations('createOrder', ['updateLayout', 'setShowGiftNotice']),
+    ...mapActions('user', ['getUserIdentityList']),
     goViewrights() {
       this.$router.push('/common/vipsubscribeRights')
     },
     goBuyMember() {
       this.$router.push('/order/create/bigmember?meal=sj')
-    }
-=======
-    ...mapMutations('createOrder', ['updateLayout', 'setShowGiftNotice']),
-    ...mapActions('user', ['getUserIdentityList']),
+    },
     goViewrights() {
       this.$router.push('/common/vipsubscribeRights')
     },
@@ -105,17 +96,17 @@ export default {
       if (data) {
         const { startTime, endTime } = data
         // 校验时间有效性
-        const isValidPeriod =
-          startTime && endTime && parseInt(startTime) < parseInt(endTime)
+        const isValidPeriod
+          = startTime && endTime && Number.parseInt(startTime) < Number.parseInt(endTime)
         const nowTime = Math.floor(Date.now() / 1000)
-        this.vipGiftPeriod =
-          isValidPeriod &&
-          nowTime >= parseInt(startTime) &&
-          nowTime <= parseInt(endTime)
+        this.vipGiftPeriod
+          = isValidPeriod
+            && nowTime >= Number.parseInt(startTime)
+            && nowTime <= Number.parseInt(endTime)
         this.setShowGiftNotice(
-          this.vipGiftPeriod &&
-            (!this.type || this.type === 'buy') &&
-            this.userIdentityType === 0
+          this.vipGiftPeriod
+          && (!this.type || this.type === 'buy')
+          && this.userIdentityType === 0
         )
         this.updateLayout({
           footerNotice:
@@ -132,7 +123,8 @@ export default {
         this.updateLayout({
           footerNotice: false
         })
-      } else {
+      }
+      else {
         this.isScroll = false
         this.updateLayout({
           footerNotice:
@@ -140,7 +132,6 @@ export default {
         })
       }
     }, 300)
->>>>>>> main
   }
 }
 </script>