xgwangman 4 жил өмнө
parent
commit
62425fa9f5

+ 28 - 3
jydocs-mobile/src/api/main.ts

@@ -46,11 +46,27 @@ export function getDetails (data: any) {
   })
 }
 
+export function getShow (data: any) {
+  return $request({
+    url: '/getShow',
+    method: 'post',
+    data: data
+  })
+}
+
+export function getDown (data: any) {
+  return $request({
+      url: '/getDown',
+      method: 'post',
+      data: data
+  })
+}
+
 export function getAdd (data: any) {
   console.log(data)
   // data = qs.stringify(data)
   return $request({
-    url: '/userCollectAdd',
+    url: '/user/collect/add',
     method: 'post',
     data
   })
@@ -60,7 +76,7 @@ export function getRemove (data: any) {
   console.log(data)
   // data = qs.stringify(data)
   return $request({
-    url: '/userCollectRemove',
+    url: '/user/collect/remove',
     method: 'post',
     data
   })
@@ -69,7 +85,16 @@ export function getRemove (data: any) {
 export function getCoin (data: any) {
   console.log(data)
   return $request({
-    url: '/coin',
+    url: '/jyintegral/getList',
+    method: 'post',
+    data
+  })
+}
+
+export function getShare (data: any) {
+  console.log(data)
+  return $request({
+    url: '/share/url',
     method: 'post',
     data
   })

+ 16 - 0
jydocs-mobile/src/store/modules/main.ts

@@ -6,6 +6,8 @@ import {
   getCashOutInfo,
   submitCashOutInfo,
   getDetails,
+  getShow,
+  getDown,
   getRemove,
   getAdd,
   getCoin,
@@ -160,6 +162,20 @@ const modulesOption: modulesOption = {
         return res.data
       } catch (error) {}
     },
+    async getShow (state, data) {
+      try {
+        const res = await getShow(data)
+        console.log(res)
+        return res.data
+      } catch (error) {}
+    },
+    async getDown (state, data) {
+      try {
+        const res = await getDown(data)
+        console.log(res)
+        return res.data
+      } catch (error) {}
+    },
     // 文库收藏
     async getAdd (state, data) {
       try {

+ 17 - 7
jydocs-mobile/src/views/details/details.vue

@@ -12,9 +12,9 @@
             <div class="continue" v-show="!buyed">全文共{{detailData.docPageSize}}页,<span @click="continued">继续阅读<van-icon name="arrow-down" size="18" /></span></div>
         </div>
         <div class="botts" v-show="buyed">
-            <div class="cont-page">
-                优化招投标市场营商环境与国企采购人主体责任、采购与招标培训资料摘要摘要。优化招投标市场营商环境与国企采购人主体责任、采购与招标培训资料摘要摘要。优化招投标市场营商环境与国企采购人主体责任、采购与招标培训资料摘要摘要。优化招投标市场营商环境与国企采购人主体责任、采购与招标培训资料摘要摘要。优化招投标市场营商环境与国企采购人主体责任、采购与招标培训资料摘要摘要。优化招投标市场营商环境与国企采购人主体责任、采购与招标培训资料摘要摘要。
-            </div>
+            <!-- <div class="cont-page"> -->
+                <iframe :src="conts.data" width="920" height="900"></iframe>
+            <!-- </div> -->
         </div>
         <van-goods-action>
             <van-goods-action-icon class="no-icon">
@@ -53,6 +53,7 @@ import Purchase from '@/components/RechargeHave.vue'
   methods: {
     ...mapActions({
       getDetails: 'main/getDetails',
+      getShow: 'main/getShow',
       getCoin: 'main/getCoin',
       getAdd: 'main/getAdd',
       getRemove: 'main/getRemove'
@@ -62,27 +63,36 @@ import Purchase from '@/components/RechargeHave.vue'
 export default class extends Vue {
   getDetails: any
   getCoin: any
+  getShow: any
+  docIds: string = ''
   coins: any = []
+  conts: any = []
   getAdd: any
   getRemove: any
   detailData: any = []
   collectd = 0
   buyed = 0
   created () {
+    this.docIds = this.$route.params.id
+    // this.docIds = '19d53d64-8890-11eb-8699-0050568f51e7'
     this.onList()
   }
 
   onList () {
-    this.getDetails({ docId: '111' }).then((res: any) => {
+    this.getDetails({ docId: this.docIds }).then((res: any) => {
       console.log(res.data)
       this.detailData = res.data.detail
       this.buyed = res.data.status
       this.collectd = res.data.docCang
     })
-    this.getCoin({ L: true }).then((res: any) => {
+    this.getCoin({ B: true }).then((res: any) => {
       console.log(res.data.data)
       this.coins = res.data.data.points
     })
+    this.getShow({ docId: this.docIds }).then((res: any) => {
+      console.log(res.data)
+      this.conts = res.data
+    })
   }
 
   jubaod () {
@@ -94,7 +104,7 @@ export default class extends Vue {
 
   canged () {
     if (this.collectd === 0) {
-      this.getAdd({ docId: '111' }).then((res: any) => {
+      this.getAdd({ docId: this.docIds }).then((res: any) => {
         console.log(res)
         if (res.error_code === 0) {
           this.collectd = 1
@@ -102,7 +112,7 @@ export default class extends Vue {
         }
       })
     } else {
-      this.getRemove({ docId: '111' }).then((res: any) => {
+      this.getRemove({ docId: this.docIds }).then((res: any) => {
         console.log(res)
         if (res.error_code === 0) {
           this.collectd = 0