Browse Source

Merge branch 'dev/v1.7.5_cyl' of jianyu/jy-points into feature/v1.7.5

cuiyalong 1 year ago
parent
commit
36cb6eda0d

+ 5 - 1
jypoints-pc/src/components/FileExchange.vue

@@ -4,7 +4,7 @@
       :title="title"
       :priceNum="productInfo.Point"
       :pointBalance="pointBalance"
-      :showToEarn="isPersonalIdentity"
+      :showToEarn="showEarnModule"
       @exchange="doExchange">
       <template #hd-img>
         <img src="@/assets/image/icon/icon-exchange-file@2x.png" alt="">
@@ -73,8 +73,12 @@ export default {
   },
   computed: {
     ...mapGetters('user', [
+      'isSubCount',
       'isPersonalIdentity'
     ]),
+    showEarnModule () {
+      return this.isPersonalIdentity && !this.isSubCount
+    },
   },
   created () {
     this.getProductInfo()

+ 4 - 0
jypoints-pc/src/store/user.js

@@ -66,6 +66,10 @@ export default {
     }
   },
   getters: {
+    // 是否是子账号
+    isSubCount (state) {
+      return state.userPowerInfo.isSubCount
+    },
     currentIdentity (state) {
       const checkedList = state.userIdentityList.filter(u => {
         return u.checked === 1

+ 7 - 3
jypoints-pc/src/views/Earn.vue

@@ -3,7 +3,7 @@
     <div class="earn-title-breadcrumbs" slot="title">
       <router-link to="/" tag="span" class="highlight-text pointer">剑鱼币</router-link> > <span>赚剑鱼币</span>
     </div>
-    <div class="page-content" v-if="isPersonalIdentity" v-loading="loading">
+    <div class="page-content" v-if="showEarnModule" v-loading="loading">
       <section class="earn-module get-mission-module">
         <GetMission @see-see="onSeeSee"></GetMission>
       </section>
@@ -101,8 +101,12 @@ export default {
       newbieTask: state => state.points.taskInfo.newbieTask || []
     }),
     ...mapGetters('user', [
+      'isSubCount',
       'isPersonalIdentity'
     ]),
+    showEarnModule () {
+      return this.isPersonalIdentity && !this.isSubCount
+    },
     isFree () {
       return this.powerInfo?.isFree
     },
@@ -122,7 +126,7 @@ export default {
   async created () {
     this.getUserPower()
     await this.getUserIdentityList()
-    if (this.isPersonalIdentity) {
+    if (this.showEarnModule) {
       await this.getTaskInfo()
     }
     this.loading = false
@@ -149,7 +153,7 @@ export default {
       return c
     },
     onSeeSee () {
-      if (!this.isPersonalIdentity) return
+      if (!this.showEarnModule) return
       // 页面无数据
       if (this.renderLimitedTask.length === 0 && this.newbieTask.length === 0 && completeNewbieTask.length < newbieTask.length) {
         return

+ 8 - 2
jypoints-pc/src/views/MyPoint.vue

@@ -3,7 +3,7 @@
     <section class="point-module my-point-overview">
       <PointOverview></PointOverview>
     </section>
-    <section class="point-module point-earn-module" v-if="!loading && isPersonalIdentity">
+    <section class="point-module point-earn-module" v-if="!loading && showEarnModule">
       <GetMission></GetMission>
     </section>
     <section class="point-module exchange-module">
@@ -73,14 +73,19 @@ export default {
       userAccountInfo: state => state.user.userAccountInfo
     }),
     ...mapGetters('user', [
+      'isSubCount',
       'isPersonalIdentity'
     ]),
+    showEarnModule () {
+      return this.isPersonalIdentity && !this.isSubCount
+    },
   },
   async created () {
+    this.getUserPower()
     this.getUserPointInfo()
     this.ajaxDocList()
     await this.getUserIdentityList()
-    if (this.isPersonalIdentity) {
+    if (this.showEarnModule) {
       await this.getTaskInfo()
     }
     this.loading = false
@@ -91,6 +96,7 @@ export default {
       'getTaskInfo'
     ]),
     ...mapActions('user', [
+      'getUserPower',
       'getUserIdentityList'
     ]),
     ajaxDocList () {