瀏覽代碼

问题修改

wenmenghao 2 年之前
父節點
當前提交
d7c6bca1f4
共有 1 個文件被更改,包括 6 次插入7 次删除
  1. 6 7
      jydocs-pc/src/views/Content.vue

+ 6 - 7
jydocs-pc/src/views/Content.vue

@@ -24,7 +24,7 @@
           剑鱼币,请先充值</div>
         <el-divider class="heng-line" v-if="lineShow"></el-divider>
         <div class="load-doc">
-          <el-button type="primary" @click="loadFile" v-if="btnName">{{ btnName }}</el-button>
+          <el-button type="primary" @click="loadFile" >{{ islogin ? btnName : '查看详情' }}</el-button>
           <div class="icons">
             <el-tooltip placement="bottom" effect="light" popper-class="f-share">
               <span class="spa1"><i class="el-icon-jy-share"></i>分享</span>
@@ -76,7 +76,7 @@
                 <span class="spa1"><i class="el-icon-jy-jubao"></i>投诉</span>
               </el-tooltip>
             </div>
-            <el-button type="primary" @click="loadFile">{{ btnName }}</el-button>
+            <el-button type="primary" @click="loadFile">{{ islogin? btnName : '查看详情' }}</el-button>
           </div>
         </div>
       </div>
@@ -142,8 +142,11 @@ export default {
     }
   },
   created () {
+    const this_ = this
     window.loginCallback = function () {
-      this.islogin = true
+      this_.islogin = true
+      this_.coined()
+      // console.log(this_)
     }
     this.docIds = this.$route.params.id
     this.locaHref = window.location.origin
@@ -263,10 +266,6 @@ export default {
       })
     },
     coined () {
-      if (!this.islogin) {
-        this.btnName = '查看详情'
-        return
-      }
       getCoin({ B: true }).then(res => {
         if (res.data.error_code === 0) {
           this.coinNum = res.data.data.points.balance