|
@@ -277,7 +277,7 @@
|
|
|
|
|
|
<script lang="ts">
|
|
|
import { Component, Vue } from 'vue-property-decorator'
|
|
|
-import { mapActions, mapMutations } from 'vuex'
|
|
|
+import { mapActions, mapMutations, mapState } from 'vuex'
|
|
|
import { Icon, Toast, GoodsAction, GoodsActionIcon, GoodsActionButton, Sticky } from 'vant'
|
|
|
import Recharge from '@/components/Recharge.vue'
|
|
|
import sharePop from '@/components/SharePopup.vue'
|
|
@@ -315,6 +315,11 @@ import '@vue-office/excel/lib/index.css'
|
|
|
VueOfficeDocx,
|
|
|
VueOfficeExcel
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapState('main', {
|
|
|
+ loginInfo: (state: any) => state.loginInfo
|
|
|
+ })
|
|
|
+ },
|
|
|
methods: {
|
|
|
dateFormatter,
|
|
|
...mapActions({
|
|
@@ -339,7 +344,7 @@ export default class extends Vue {
|
|
|
getDown: any
|
|
|
getShow: any
|
|
|
getShare: any
|
|
|
- loginInfo: any = sessionStorage.getItem('jy-login-info')
|
|
|
+ loginInfo: any
|
|
|
links = ''
|
|
|
docIds = ''
|
|
|
fixed = false
|
|
@@ -376,7 +381,8 @@ export default class extends Vue {
|
|
|
}
|
|
|
|
|
|
TopConfig: any = {
|
|
|
- actionRightText: this.loginInfo ? '<div style="display:flex;flex-direction: column;align-items: center;"><i class="j-icon icon-iconJianYu"></i><p style="color: #171826;font-size: 10px;line-height: 12px;margin-top:3px;">分享赚剑鱼币</p></div>' : '',
|
|
|
+ actionRightText: '',
|
|
|
+ // actionRightText: this.loginInfo ? '<div style="display:flex;flex-direction: column;align-items: center;"><i class="j-icon icon-iconJianYu"></i><p style="color: #171826;font-size: 10px;line-height: 12px;margin-top:3px;">分享赚剑鱼币</p></div>' : '',
|
|
|
actionRightCallback: this.shared,
|
|
|
actionRightStyle: {
|
|
|
color: '#5F5E64',
|
|
@@ -398,6 +404,10 @@ export default class extends Vue {
|
|
|
docLoadError = false
|
|
|
|
|
|
created () {
|
|
|
+ console.log(this.loginInfo)
|
|
|
+ if (this.loginInfo) {
|
|
|
+ this.TopConfig.actionRightText = '<div style="display:flex;flex-direction: column;align-items: center;"><i class="j-icon icon-iconJianYu"></i><p style="color: #171826;font-size: 10px;line-height: 12px;margin-top:3px;">分享赚剑鱼币</p></div>'
|
|
|
+ }
|
|
|
this.docIds = this.$route.params.id
|
|
|
this.getPower()
|
|
|
this.onList()
|
|
@@ -833,19 +843,20 @@ export default class extends Vue {
|
|
|
readAll () {
|
|
|
console.log(444444444)
|
|
|
console.log(this.loginInfo)
|
|
|
- if (this.isvipFree && this.buyed === 0 && this.isviper) { // 会员免费 未下载 会员
|
|
|
- this.getFile()
|
|
|
- } else if ((this.power.freeDownload === 2 || this.power.freeDownload === 0) && this.isvipFree && this.buyed === 0 && !this.isviper) {
|
|
|
- this.bottomBtn('使用免费下载特权')
|
|
|
- } else if (this.isvipFree && this.buyed === 0 && !this.isviper && this.power.freeDownload === 1) { // 会员免费 未下载 不是会员 使用过免费下载次数
|
|
|
- this.bottomBtn('开通文库会员')
|
|
|
- } else if (this.boutique && this.buyed === 0 && this.isviper) {
|
|
|
- this.bottomBtn('会员获取文档')
|
|
|
- } else if (this.boutique && this.buyed === 0 && !this.isviper) {
|
|
|
- this.bottomBtn('开通文库会员')
|
|
|
- } else if (this.buyed === 1) {
|
|
|
- this.uploaded('down')
|
|
|
- }
|
|
|
+ // return
|
|
|
+ // if (this.isvipFree && this.buyed === 0 && this.isviper) { // 会员免费 未下载 会员
|
|
|
+ // this.getFile()
|
|
|
+ // } else if ((this.power.freeDownload === 2 || this.power.freeDownload === 0) && this.isvipFree && this.buyed === 0 && !this.isviper) {
|
|
|
+ // this.bottomBtn('使用免费下载特权')
|
|
|
+ // } else if (this.isvipFree && this.buyed === 0 && !this.isviper && this.power.freeDownload === 1) { // 会员免费 未下载 不是会员 使用过免费下载次数
|
|
|
+ // this.bottomBtn('开通文库会员')
|
|
|
+ // } else if (this.boutique && this.buyed === 0 && this.isviper) {
|
|
|
+ // this.bottomBtn('会员获取文档')
|
|
|
+ // } else if (this.boutique && this.buyed === 0 && !this.isviper) {
|
|
|
+ // this.bottomBtn('开通文库会员')
|
|
|
+ // } else if (this.buyed === 1) {
|
|
|
+ // this.uploaded('down')
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
fileType (val: any) {
|