소스 검색

Merge branch 'master' of http://192.168.3.207:10080/jianyu/jy-docs

zhangyuhan 4 년 전
부모
커밋
dbf66e8c3f

+ 11 - 1
jydocs-mobile/src/api/main.ts

@@ -1,6 +1,7 @@
-import $request from '@/api/index'
 import qs from 'qs'
 
+import $request from '@/api/index'
+
 export function getHomeHot (data: any) {
   return $request({
     url: '/topList',
@@ -34,3 +35,12 @@ export function submitCashOutInfo (data: any) {
     data
   })
 }
+
+export function getDetails (data: any) {
+  //   data = qs.stringify(data)
+  return $request({
+    url: '/jydocs/detail',
+    method: 'post',
+    params: data
+  })
+}

+ 2 - 2
jydocs-mobile/src/components/Recharge.vue

@@ -28,7 +28,7 @@
             </div>
         </div>
         <div class="recharge_footer">
-                <button class="j-button-cancel btn_active">取消</button>
+                <button class="j-button-cancel btn_active" @click="closePopup()">取消</button>
                 <button class="j-button-sure btn_active">去充值</button>
         </div>
     </van-popup>
@@ -51,7 +51,7 @@ import { Icon, Popup, Sticky } from 'vant'
     }
   })
 export default class extends Vue {
-    show = true
+    show = false
     closePopup () {
       this.show = false
     }

+ 2 - 2
jydocs-mobile/src/components/RechargeHave.vue

@@ -46,7 +46,7 @@
                 <van-checkbox v-model="checked" checked-color="#2ABED1" >我已阅读,理解并接受<a href="javascript:;" class="clause" @click="clause()">《剑鱼伙伴服务条款》</a></van-checkbox>
             </div>
             <div class="apply_footer">
-                <button class="j-button-cancel btn_active">取消</button>
+                <button class="j-button-cancel btn_active" @click="closePopup()">取消</button>
                 <button class="j-button-sure btn_active" :disabled="!this.checked" @click="exchange()">去充值</button>
             </div>
         </div>
@@ -70,7 +70,7 @@ import { Icon, Popup, Checkbox } from 'vant'
     }
   })
 export default class extends Vue {
-    show = true
+    show = false
     checked = false
     closePopup () {
       this.show = false

+ 161 - 26
jydocs-mobile/src/views/details/details.vue

@@ -2,72 +2,207 @@
     <div class="details-p">
         <div class="tops">
             <h3>
-                <i class="el-icon-jy-word"></i>
-                优化招投标市场营商环境与国企采购人主体责任、采购与招标培训资料
+                <van-icon class="word01" name="diy-word" />
+                优化招投标市场营商环境与国企采购人主体责任、采购与招标
             </h3>
         </div>
-
+        <div class="middles">
+            <h3>摘要</h3>
+            <p>优化招投标市场营商环境与国企采购人主体责任、采购与招标培训资料摘要摘要。</p>
+            <div class="continue">全文共18页,<span>继续阅读<van-icon name="arrow-down" size="18" /></span></div>
+        </div>
+        <div class="botts">
+            <div class="cont-page">
+                优化招投标市场营商环境与国企采购人主体责任、采购与招标培训资料摘要摘要。优化招投标市场营商环境与国企采购人主体责任、采购与招标培训资料摘要摘要。优化招投标市场营商环境与国企采购人主体责任、采购与招标培训资料摘要摘要。优化招投标市场营商环境与国企采购人主体责任、采购与招标培训资料摘要摘要。优化招投标市场营商环境与国企采购人主体责任、采购与招标培训资料摘要摘要。优化招投标市场营商环境与国企采购人主体责任、采购与招标培训资料摘要摘要。
+            </div>
+        </div>
         <van-goods-action>
             <van-goods-action-icon class="no-icon">
                 <template #default>
-                    <p style="color:#2ABED1;font-size: 12px;line-height: 18px;">剑鱼币</p>
-                    <p style="color:#2ABED1;font-size: 18px;line-height: 26px;">500</p>
+                    <p class="p1">剑鱼币</p>
+                    <p class="p2">500</p>
                 </template>
             </van-goods-action-icon>
-            <van-goods-action-icon icon="cart-o" text="购物车" />
-            <van-goods-action-icon icon="shop-o" text="店铺" />
-            <van-goods-action-button
-                type="danger"
-                text="立即购买"
-            />
+            <van-goods-action-icon icon="diy-jubao" text="投诉举报" @click="jubaod" />
+            <van-goods-action-icon :icon="collectd?'diy-weiguanzhu':'diy-guanzhu'" text="收藏" @click="canged" />
+            <van-goods-action-button text="下载文档" @click="uploaded" />
         </van-goods-action>
+        <!-- 充值 -->
+        <recharge ref="charge"></recharge>
+        <!-- 购买 -->
+        <purchase ref="buys"></purchase>
     </div>
 </template>
 
 <script lang="ts">
 import { Component, Vue } from 'vue-property-decorator'
-import { GoodsAction, GoodsActionIcon, GoodsActionButton } from 'vant'
+import { mapActions } from 'vuex'
+import { Icon, Toast, GoodsAction, GoodsActionIcon, GoodsActionButton } from 'vant'
+import Recharge from '@/components/Recharge.vue'
+import Purchase from '@/components/RechargeHave.vue'
 @Component({
   name: 'details-p',
   components: {
+    [Icon.name]: Icon,
     [GoodsAction.name]: GoodsAction,
     [GoodsActionIcon.name]: GoodsActionIcon,
-    [GoodsActionButton.name]: GoodsActionButton
+    [GoodsActionButton.name]: GoodsActionButton,
+    Recharge,
+    Purchase
+  },
+  methods: {
+    ...mapActions({
+      detailData: 'main/getDetails'
+    })
   }
 })
 export default class extends Vue {
+  detailData: any
+  collectd = true
+  nums = 1
+  created () {
+    this.onList()
+  }
+
+  onList () {
+    this.detailData({ docId: '111' }).then((res: any) => {
+      console.log(res)
+    })
+  }
+
+  jubaod () {
+    Toast({
+      duration: 3500,
+      message: '如果您发现此内容有侵权行为,请联系客服400-108-6670进行投诉'
+    })
+  }
 
+  canged () {
+    this.collectd = !this.collectd
+  }
+
+  uploaded () {
+    if (this.nums === 0) {
+      this.$refs.charge.show = true
+    } else {
+      this.$refs.buys.show = true
+    }
+  }
 }
 </script>
 
-<style lang="scss">
+<style lang="scss" scoped>
+@include diy-icon('word', 24, 24);
+@include diy-icon('jubao', 20, 20);
+@include diy-icon('weiguanzhu', 20, 20);
+@include diy-icon('guanzhu', 20, 20);
 .details-p {
+    display: flex;
+    flex-direction: column;
     .tops {
+        display: flex;
         background: #fff;
-        padding: 32px 40px;
-        border-radius: 4px;
+        padding: 24px 16px;
         h3 {
             display: flex;
-            align-items: center;
-            color: #1d1d1d;
+            flex-direction: initial;
+            color: #171826;
+            font-weight: 500;
+            font-size: 20px;
+            line-height: 30px;
+            .word01 {
+                display: inline-table;
+                width: 24px;
+                height: 24px;
+                margin-right: 6px;
+            }
+        }
+    }
+    .middles {
+        padding: 16px;
+        background: #fff;
+        margin: 8px 0;
+        h3 {
+            font-size: 16px;
+            line-height: 24px;
             font-weight: 500;
-            font-size: 24px;
-            line-height: 36px;
-            i {
-                margin-right: 8px;
+            color: #171826;
+        }
+        p {
+            color: #5F5E64;
+            font-size: 14px;
+            line-height: 20px;
+            margin-top: 8px;
+        }
+        .continue {
+            color: #5F5E64;
+            font-size: 14px;
+            line-height: 20px;
+            text-align: center;
+            margin-top: 32px;
+            span {
+                color: #2ABED1;
+                cursor: pointer;
+                i {
+                    margin-left: 4px;
+                }
             }
         }
     }
+    .botts {
+        padding: 16px 24px;
+        background: #fff;
+        .cont-page {
+            height: 900px;
+        }
+    }
     .van-goods-action {
-        height: 56px;
-        padding: 0 16px;
+        // height: 56px;
+        padding: 8px 16px;
+        box-shadow: 0px -2px 8px 0px #eee;
+        display: flex;
+        justify-content: space-between;
         .no-icon {
+            p {
+                color:#2ABED1;
+            }
+            .p1 {
+                font-size: 12px;
+                line-height: 18px;
+            }
+            .p2 {
+                font-size: 18px;
+                line-height: 26px;
+            }
             .van-icon {
                 display: none!important;
             }
         }
-        .van-button {
-            padding: 8px 50px;
+        .van-goods-action-icon:not(.no-icon) {
+            font-size: 10px;
+            color: #5F5E64;
+        }
+        .van-goods-action-button--first {
+            margin-left: 0;
+        }
+        .van-goods-action-button--last {
+            margin-right: 0;
+        }
+        .van-goods-action-button {
+            flex: none;
+        }
+        .van-button--large {
+            width: 165px;
+            height: 40px;
+        }
+        ::v-deep .van-button--default {
+            background-color: #2ABED1;
+            .van-button__content {
+                .van-button__text {
+                    color: #fff;
+                    font-size: 16px;
+                }
+            }
         }
     }
 }

+ 1 - 1
jydocs-pc/src/views/Content.vue

@@ -313,7 +313,7 @@ export default {
           flex-direction: column;
           .page {
               .head-tip {
-                  width: 840px;
+                  width: 920px;
                   height: 42px;
                   background: #fcfcfc;
                   // filter:alpha(opacity=80); //IE