panhui 5 лет назад
Родитель
Сommit
4338020f7b
47 измененных файлов с 472 добавлено и 219 удалено
  1. 9 2
      project.config.json
  2. 15 4
      src/App.vue
  3. 3 3
      src/components/ChatInfo.vue
  4. 2 2
      src/components/FixedButton.vue
  5. 3 3
      src/components/Member.vue
  6. 35 4
      src/components/News/Grid.vue
  7. 3 3
      src/components/News/Row.vue
  8. 4 1
      src/components/SortList.vue
  9. 29 4
      src/components/bar/CustomBar.vue
  10. 9 9
      src/components/bar/FilterSortBar.vue
  11. 3 3
      src/components/filter/Application.vue
  12. 1 1
      src/components/imt/Bottom.vue
  13. 3 3
      src/components/product/Grid.vue
  14. 3 3
      src/components/product/GridBig.vue
  15. 3 3
      src/components/product/Row.vue
  16. 20 9
      src/components/product/RowMini.vue
  17. 5 5
      src/components/product/RowNormal.vue
  18. 3 3
      src/components/vendor/Case.vue
  19. 6 6
      src/components/vendor/Grid.vue
  20. 5 5
      src/components/vendor/Row.vue
  21. 0 1
      src/mixins/searchList.js
  22. 1 1
      src/pages/Chat.vue
  23. 1 1
      src/pages/Home.vue
  24. 1 1
      src/pages/My.vue
  25. 1 1
      src/pagesChat/ChatDetail.vue
  26. 1 1
      src/pagesChat/ChatForm.vue
  27. 0 1
      src/pagesHome/ChatPage.vue
  28. 4 4
      src/pagesHome/Edit.vue
  29. 1 1
      src/pagesHome/FilterPage.vue
  30. 3 3
      src/pagesHome/Search.vue
  31. 1 1
      src/pagesHome/VendorList.vue
  32. 1 1
      src/pagesImt/Index.vue
  33. 3 3
      src/pagesImt/Service.vue
  34. 1 1
      src/pagesMine/Account.vue
  35. 37 14
      src/pagesMine/Activity.vue
  36. 3 3
      src/pagesMine/ChangeEmail.vue
  37. 3 3
      src/pagesMine/ChangePhone.vue
  38. 3 3
      src/pagesMine/ChangePsd.vue
  39. 3 3
      src/pagesMine/OrderDetail.vue
  40. 31 8
      src/pagesNews/Detail.vue
  41. 5 5
      src/pagesNews/News.vue
  42. 50 8
      src/pagesNews/Submit.vue
  43. 12 2
      src/pagesProduct/Contrast.vue
  44. 121 61
      src/pagesProduct/Detail.vue
  45. 0 1
      src/pagesProduct/FilterVendor.vue
  46. 17 7
      src/pagesProduct/IntentionList.vue
  47. 4 4
      src/pagesVendor/Detail.vue

+ 9 - 2
project.config.json

@@ -66,8 +66,8 @@
                     "name": "我的",
                     "pathName": "pages/My",
                     "scene": null
-								},
-								{
+                },
+                {
                     "id": -1,
                     "name": "搜索",
                     "pathName": "pagesHome/Search",
@@ -106,6 +106,13 @@
                     "pathName": "pagesProduct/Detail",
                     "query": "id=14857",
                     "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "活动信息",
+                    "pathName": "pagesNews/Submit",
+                    "query": "infoId=23151&activityId=26963",
+                    "scene": null
                 }
             ]
         }

+ 15 - 4
src/App.vue

@@ -48,6 +48,9 @@ export default {
 };
 </script>
 <style lang="less">
+.pageBottom {
+    padding-bottom: 100px;
+}
 h1 {
     font-size: 20px;
     font-weight: bolder;
@@ -154,10 +157,14 @@ page {
 }
 
 .my-icon {
-    &:active {
-        color: @warn!important;
-        background-color: darken(#fff, 5);
-    }
+    // &:active {
+    //     color: @warn!important;
+    //     background-color: darken(#fff, 5);
+    // }
+}
+
+.van-button--normal {
+    // font-weight: bold;
 }
 
 @keyframes iconAnimate {
@@ -184,6 +191,10 @@ page {
     animation: iconAnimate ease-in-out 0.3s;
 }
 
+.van-button--normal {
+    --button-normal-font-size: 15px;
+}
+
 .btn_icon {
     display: flex;
     align-items: center;

+ 3 - 3
src/components/ChatInfo.vue

@@ -201,9 +201,9 @@ export default {
         margin: 0 8px;
         overflow: hidden;
         flex-direction: row-reverse;
-        &:active {
-            background-color: darken(#fff, 2);
-        }
+        // &:active {
+        //     background-color: darken(#fff, 2);
+        // }
         .order-info {
             padding: 10px 12px;
             .name {

+ 2 - 2
src/components/FixedButton.vue

@@ -44,7 +44,7 @@ export default {
             padding: 0 6px;
         }
         .van-button {
-            height: 40px;
+            --button-default-height: 44px;
         }
         padding-top: 8px;
         padding-left: 10px;
@@ -71,7 +71,7 @@ export default {
         z-index: 99;
         box-shadow: 0px -1px 2px 0px rgba(0, 0, 0, 0.04);
         .van-button {
-            height: 44px;
+            --button-default-height: 44px;
         }
     }
 }

+ 3 - 3
src/components/Member.vue

@@ -174,8 +174,8 @@ export default {
             }
         }
     }
-    &:active {
-        background-color: darken(#fff, 5);
-    }
+    // &:active {
+    //     background-color: darken(#fff, 5);
+    // }
 }
 </style>

+ 35 - 4
src/components/News/Grid.vue

@@ -13,8 +13,19 @@
             </div>
 
             <div class="btn">
+                <van-button
+                    class="cancel"
+                    type="primary"
+                    v-if="activityId && !isEnd"
+                    color="#565B66"
+                    plain
+                    :radius="4"
+                    @click.stop="cancel"
+                    >取消报名</van-button
+                >
+
                 <van-button :color="$colors.warn" :radius="4" :disabled="isEnd" :readonly="userActivity">{{
-                    isEnd ? $t('bao-ming-jie-shu') : userActivity ? '报名中' : '活动报名'
+                    isEnd ? $t('bao-ming-jie-shu') : activityId ? '报名中' : '活动报名'
                 }}</van-button>
             </div>
         </div>
@@ -32,6 +43,10 @@ export default {
         userActivity: {
             type: Boolean,
             default: false
+        },
+        activityId: {
+            type: Number,
+            default: 0
         }
     },
     data() {
@@ -51,6 +66,11 @@ export default {
         isEnd() {
             return this.info.isEnd || false;
         }
+    },
+    methods: {
+        cancel() {
+            this.$emit('cancel', this.activityId);
+        }
     }
 };
 </script>
@@ -70,9 +90,9 @@ export default {
         line-height: 24px;
     }
 
-    &:active {
-        background-color: darken(#fff, 10);
-    }
+    // &:active {
+    //     background-color: darken(#fff, 10);
+    // }
 
     .activity {
         display: flex;
@@ -103,7 +123,18 @@ export default {
             min-width: 110px;
             height: 36px;
         }
+
+        ._van-button + ._van-button {
+            margin-left: 10px;
+        }
     }
     padding: 0 16px 16px 12px;
 }
+
+.cancel {
+    .van-button--plain {
+        --button-border-width: 0px;
+        --button-plain-background-color: #f5f7fa;
+    }
+}
 </style>

+ 3 - 3
src/components/News/Row.vue

@@ -47,9 +47,9 @@ export default {
             margin-top: 6px;
         }
     }
-    &:active {
-        background-color: darken(#fff, 10);
-    }
+    // &:active {
+    //     background-color: darken(#fff, 10);
+    // }
 }
 </style>
 <style lang="less">

+ 4 - 1
src/components/SortList.vue

@@ -52,9 +52,12 @@ export default {
 </script>
 
 <style lang="less">
+page {
+    padding-bottom: 0px;
+}
 .list-row {
     background: @bg;
-    padding: 6px 0;
+    padding: 6px 0 50px;
     box-sizing: border-box;
 
     .van-empty__image {

+ 29 - 4
src/components/bar/CustomBar.vue

@@ -1,15 +1,23 @@
 <template>
     <div :style="{ height: fixed ? 0 : fixedHieght + 'px' }">
-        <div class="navBar" :style="narStyle" id="searchBar">
+        <div class="navBar custom" :style="narStyle" id="searchBar">
             <van-icon
                 name="icon-home"
                 class-prefix="iconfont"
                 v-if="isHome"
                 @click="goHome"
-                :size="24"
+                :size="22"
                 :color="fontColor"
+                :class="{ iconBg: detail && fontColor === '#fff' }"
+            />
+            <van-icon
+                name="arrow-left"
+                v-else
+                @click="navigateBack"
+                :size="22"
+                :color="fontColor"
+                :class="{ iconBg: detail && fontColor === '#fff' }"
             />
-            <van-icon name="arrow-left" v-else @click="navigateBack" :size="24" :color="fontColor" />
 
             <div class="text" v-if="!topHide || ratio" :style="{ fontColor: fontColor }">{{ title }}</div>
         </div>
@@ -49,6 +57,10 @@ export default {
         topHide: {
             type: Boolean,
             default: true
+        },
+        detail: {
+            type: Boolean,
+            default: false
         }
     },
     data() {
@@ -72,7 +84,7 @@ export default {
                 style.background = 'rgba(255, 255, 255,' + (this.pre + (1 - this.pre) * this.ratio) + ')';
             }
             if (this.menuButtonInfo.top) {
-                style.padding = this.menuButtonInfo.top + 'px ' + (15 + this.menuButtonInfo.width) + 'px 15px 15px';
+                style.padding = this.menuButtonInfo.top + 'px ' + (15 + this.menuButtonInfo.width) + 'px 15px 11px';
                 style.height = this.menuButtonInfo.height + 'px';
             }
             if (this.bg) {
@@ -135,4 +147,17 @@ export default {
         line-height: 20px;
     }
 }
+.custom {
+    .van-icon {
+        transition: all ease-in-out 0.3s;
+        padding: 5px 6px 5px 4px;
+        border-radius: 100px;
+    }
+
+    .iconBg {
+        .van-icon {
+            background-color: #00000048;
+        }
+    }
+}
 </style>

+ 9 - 9
src/components/bar/FilterSortBar.vue

@@ -182,9 +182,9 @@ export default {
         span {
             margin-right: 4px;
         }
-        &:active {
-            background-color: overlay(@bg, #000);
-        }
+        // &:active {
+        //     background-color: overlay(@bg, #000);
+        // }
 
         &::before {
             content: '';
@@ -199,9 +199,9 @@ export default {
         padding: 0 16px;
         align-self: center;
         line-height: 16px;
-        &:active {
-            background-color: overlay(@bg, #000);
-        }
+        // &:active {
+        //     background-color: overlay(@bg, #000);
+        // }
     }
 
     .sort-left {
@@ -227,9 +227,9 @@ export default {
                 }
             }
 
-            &:active {
-                color: @warn;
-            }
+            // &:active {
+            //     color: @warn;
+            // }
 
             // display: flex;
             // align-items: center;

+ 3 - 3
src/components/filter/Application.vue

@@ -95,9 +95,9 @@ export default {
         display: flex;
         align-items: center;
         justify-content: space-between;
-        &:active {
-            background-color: overlay(#fff, #000);
-        }
+        // &:active {
+        //     background-color: overlay(#fff, #000);
+        // }
 
         .van-icon {
             transition: transform ease-in-out 0.3s;

+ 1 - 1
src/components/imt/Bottom.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="imt-bottom">
         <div class="bottom">
-            <van-grid clickable column-num="4" :border="false">
+            <van-grid column-num="4" :border="false">
                 <block v-for="(item, index) in navigations" :key="index">
                     <van-grid-item
                         :icon="value === index ? item.img2 : item.img1"

+ 3 - 3
src/components/product/Grid.vue

@@ -58,9 +58,9 @@ export default {
         }
     }
     background-color: @bgw;
-    &:active {
-        background-color: darken(#fff, 5);
-    }
+    // &:active {
+    //     background-color: darken(#fff, 5);
+    // }
 
     p {
         white-space: nowrap;

+ 3 - 3
src/components/product/GridBig.vue

@@ -57,9 +57,9 @@ export default {
     }
     background-color: @bgw;
 
-    &:active {
-        background-color: darken(#fff, 5);
-    }
+    // &:active {
+    //     background-color: darken(#fff, 5);
+    // }
 
     .grid-logo {
         flex-shrink: 0;

+ 3 - 3
src/components/product/Row.vue

@@ -45,8 +45,8 @@ export default {
         margin-left: 8px;
         overflow: hidden;
     }
-    &:active {
-        background-color: darken(#fff, 5);
-    }
+    // &:active {
+    //     background-color: darken(#fff, 5);
+    // }
 }
 </style>

+ 20 - 9
src/components/product/RowMini.vue

@@ -2,8 +2,11 @@
     <div class="product" @click="choose">
         <van-icon
             v-if="hasCheck && checkPosition === 'left'"
-            :name="checked ? 'checked' : 'circle'"
-            :color="checked ? $colors.warn : '#BCC1CC'"
+            :name="
+                checked
+                    ? 'http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/icon_list_duoxuan.png'
+                    : 'http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/icon_list_duoxuan_dis.png'
+            "
             :size="16"
             style="margin-right: 12px;"
         />
@@ -15,11 +18,19 @@
                 <p>{{ info.model }}</p>
             </div>
         </div>
-        <van-icon v-if="hasDel" @click.stop="del" :size="20" color="#BCC1CC" name="delete" />
+        <van-icon
+            v-if="hasDel"
+            @click.stop="del"
+            :size="24"
+            name="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/icon_oudlined_del.png"
+        />
         <van-icon
             v-if="hasCheck && checkPosition === 'right'"
-            :name="checked ? 'checked' : 'circle'"
-            :color="checked ? $colors.warn : '#BCC1CC'"
+            :name="
+                checked
+                    ? 'http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/icon_list_duoxuan.png'
+                    : 'http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/icon_list_duoxuan_dis.png'
+            "
             :size="16"
         />
     </div>
@@ -80,7 +91,7 @@ export default {
     overflow: hidden;
     .info {
         flex-grow: 1;
-        margin-left: 8px;
+        margin: 0 8px;
         overflow: hidden;
     }
 
@@ -88,8 +99,8 @@ export default {
         align-self: center;
     }
 
-    &:active {
-        background-color: darken(#fff, 5);
-    }
+    // &:active {
+    //     background-color: darken(#fff, 5);
+    // }
 }
 </style>

+ 5 - 5
src/components/product/RowNormal.vue

@@ -100,11 +100,11 @@ export default {
         display: flex;
         flex-direction: column;
     }
-    &:active {
-        .info {
-            background-color: darken(#fff, 5);
-        }
-    }
+    // &:active {
+    //     .info {
+    //         background-color: darken(#fff, 5);
+    //     }
+    // }
 }
 
 .sub {

+ 3 - 3
src/components/vendor/Case.vue

@@ -34,9 +34,9 @@ export default {
     border-radius: 4px;
     overflow: hidden;
 
-    &:active {
-        background-color: darken(#fff, 5);
-    }
+    // &:active {
+    //     background-color: darken(#fff, 5);
+    // }
 }
 .case + .case {
     margin-left: 16px;

+ 6 - 6
src/components/vendor/Grid.vue

@@ -24,11 +24,11 @@ export default {
 .bg-white {
     border-radius: @radius;
     overflow: hidden;
-    &:active {
-        background-color: darken(#fff, 5);
-        .van-image {
-            opacity: 0.6;
-        }
-    }
+    // &:active {
+    //     background-color: darken(#fff, 5);
+    //     .van-image {
+    //         opacity: 0.6;
+    //     }
+    // }
 }
 </style>

+ 5 - 5
src/components/vendor/Row.vue

@@ -87,11 +87,11 @@ export default {
             margin-bottom: 8px;
         }
     }
-    &:active {
-        .content {
-            background-color: darken(#fff, 5);
-        }
-    }
+    // &:active {
+    //     .content {
+    //         background-color: darken(#fff, 5);
+    //     }
+    // }
 }
 
 .info {

+ 0 - 1
src/mixins/searchList.js

@@ -179,7 +179,6 @@ export default {
             });
         },
         refreash() {
-            console.log('刷新');
             this.list = [];
             this.page = 1;
             this.getData();

+ 1 - 1
src/pages/Chat.vue

@@ -5,7 +5,7 @@
 }
 </config>
 <template>
-    <div>
+    <div class="pageBottom">
         <member :info="emailInfo" type="system" />
         <member :info="adminInfo" type="admin" />
         <van-divider />

+ 1 - 1
src/pages/Home.vue

@@ -57,7 +57,7 @@
                         <div class="text">{{ $t('xin-yu-bao-zhang') }}</div>
                     </div>
 
-                    <van-grid clickable icon-size="40" :border="false" click>
+                    <van-grid icon-size="40" :border="false" click>
                         <van-grid-item
                             content-class="menu-info"
                             icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/home_icon_zhanshang.png"

+ 1 - 1
src/pages/My.vue

@@ -8,7 +8,7 @@
 }
 </config>
 <template>
-    <div class="my">
+    <div class="my pageBottom">
         <div class="top">
             <van-image
                 width="100%"

+ 1 - 1
src/pagesChat/ChatDetail.vue

@@ -74,7 +74,7 @@
         </div>
 
         <div class="upload" v-if="showImg">
-            <van-grid clickable :gutter="16" :border="false">
+            <van-grid :gutter="16" :border="false">
                 <van-grid-item icon="photo" text="图片" @click="choosePhoto" />
             </van-grid>
         </div>

+ 1 - 1
src/pagesChat/ChatForm.vue

@@ -4,7 +4,7 @@
 }
 </config>
 <template>
-    <div>
+    <div class="pageBottom">
         <van-cell-group :border="false">
             <van-cell :border="false" title="姓名" :value="info.nickname" />
             <van-cell :border="false" title="称呼" v-if="sex" :value="sex" />

+ 0 - 1
src/pagesHome/ChatPage.vue

@@ -1,6 +1,5 @@
 <template>
     <div>
-        19282
         <member :info="systemInfo" type="system" />
         <member :info="adminInfo" type="admin" />
         <van-divider />

+ 4 - 4
src/pagesHome/Edit.vue

@@ -4,7 +4,7 @@
 }
 </config>
 <template>
-    <div>
+    <div class="pageBottom">
         <div class="takePhoto" @click="choosePhoto">
             <van-image :src="carImg" v-if="carImg" :width="`calc(100vw - 40rpx)`" height="240rpx" fit="contain" />
             <template v-else>
@@ -333,8 +333,8 @@ export default {
         margin-top: 8px;
     }
 
-    &:active {
-        background-color: darken(#fff, 5);
-    }
+    // &:active {
+    //     background-color: darken(#fff, 5);
+    // }
 }
 </style>

+ 1 - 1
src/pagesHome/FilterPage.vue

@@ -5,7 +5,7 @@
 }
 </config>
 <template>
-    <div>
+    <div class="pageBottom">
         <product-customCateId-filter
             v-model="customCateId"
             :list="customCateList"

+ 3 - 3
src/pagesHome/Search.vue

@@ -375,9 +375,9 @@ export default {
         margin-right: 8px;
         margin-bottom: 8px;
 
-        &:active {
-            background-color: darken(@bg, 5);
-        }
+        // &:active {
+        //     background-color: darken(@bg, 5);
+        // }
     }
 }
 </style>

+ 1 - 1
src/pagesHome/VendorList.vue

@@ -80,7 +80,7 @@ export default {
             categoryIds: '',
             countries: '',
             continent: '',
-            url: '/vendorInfo/show',
+            url: '/vendorInfo/show1',
             tagIds: '',
             applicationField: '',
             main: null,

+ 1 - 1
src/pagesImt/Index.vue

@@ -7,7 +7,7 @@
 }
 </config>
 <template>
-    <div class="imt">
+    <div class="imt pageBottom">
         <custom-bar
             :title="title"
             :pre="0"

+ 3 - 3
src/pagesImt/Service.vue

@@ -54,9 +54,9 @@ export default {
         flex-grow: 1;
     }
 
-    &:active {
-        background-color: darken(#ffffff, 10);
-    }
+    // &:active {
+    //     background-color: darken(#ffffff, 10);
+    // }
 }
 .service-item + .service-item {
     margin-top: 12px;

+ 1 - 1
src/pagesMine/Account.vue

@@ -5,7 +5,7 @@
 }
 </config>
 <template>
-    <div class="edit">
+    <div class="edit pageBottom">
         <van-cell-group :border="false">
             <van-cell title="ID账号" :value="myInfo.id" />
             <van-cell

+ 37 - 14
src/pagesMine/Activity.vue

@@ -4,19 +4,22 @@
 }
 </config>
 <template>
-    <sort-list
-        :empty="showListEmpty"
-        emptyText="未参加任何活动哦"
-        :loading="loading"
-        :finish="finish"
-        :top="`0px + ${barHeight}px`"
-    >
-        <div class="list">
-            <block v-for="item in showList" :key="item.id">
-                <news-grid :info="item.information" userActivity></news-grid>
-            </block>
-        </div>
-    </sort-list>
+    <div>
+        <sort-list
+            :empty="showListEmpty"
+            emptyText="未参加任何活动哦"
+            :loading="loading"
+            :finish="finish"
+            :top="`0px + ${barHeight}px`"
+        >
+            <div class="list">
+                <block v-for="item in showList" :key="item.id">
+                    <news-grid :info="item.information" :activityId="item.id" userActivity @cancel="cancel"></news-grid>
+                </block>
+            </div>
+        </sort-list>
+        <van-dialog id="van-dialog" />
+    </div>
 </template>
 <script>
 import SortList from '../components/SortList.vue';
@@ -40,7 +43,7 @@ export default {
         ...mapState(['userInfo', 'barHeight']),
         listQuery() {
             return {
-                query: { userId: this.userInfo.id }
+                query: { userId: this.userInfo.id, del: false }
             };
         },
         showList() {
@@ -68,6 +71,26 @@ export default {
             this.page++;
             this.getData();
         }
+    },
+    methods: {
+        cancel(activityId) {
+            this.dialog('确定要取消报名吗?', true).then(() => {
+                this.$loading('加载中...');
+                return this.$http
+                    .post('/eventRegistration/del/' + activityId)
+                    .then(res => {
+                        this.$loading.close();
+                        this.toast('取消成功!', 'success');
+                        this.refreash();
+                    })
+                    .catch(e => {
+                        if (e.error) {
+                            this.$loading.close();
+                            this.toast(e.error);
+                        }
+                    });
+            });
+        }
     }
 };
 </script>

+ 3 - 3
src/pagesMine/ChangeEmail.vue

@@ -93,9 +93,9 @@ export default {
         align-items: center;
         margin-top: 10px;
         overflow: hidden;
-        &:active {
-            background: darken(@bg, 5);
-        }
+        // &:active {
+        //     background: darken(@bg, 5);
+        // }
         .text {
             flex-grow: 1;
             font-size: 14px;

+ 3 - 3
src/pagesMine/ChangePhone.vue

@@ -200,9 +200,9 @@ export default {
         align-items: center;
         margin-top: 10px;
         overflow: hidden;
-        &:active {
-            background: darken(@bg, 5);
-        }
+        // &:active {
+        //     background: darken(@bg, 5);
+        // }
         .text {
             flex-grow: 1;
             font-size: 14px;

+ 3 - 3
src/pagesMine/ChangePsd.vue

@@ -104,9 +104,9 @@ export default {
         align-items: center;
         margin-top: 10px;
         overflow: hidden;
-        &:active {
-            background: darken(@bg, 5);
-        }
+        // &:active {
+        //     background: darken(@bg, 5);
+        // }
         .text {
             flex-grow: 1;
             font-size: 14px;

+ 3 - 3
src/pagesMine/OrderDetail.vue

@@ -227,9 +227,9 @@ export default {
         align-items: center;
         margin-top: 10px;
         overflow: hidden;
-        &:active {
-            background: darken(@bg, 5);
-        }
+        // &:active {
+        //     background: darken(@bg, 5);
+        // }
         .text {
             flex-grow: 1;
             font-size: 14px;

+ 31 - 8
src/pagesNews/Detail.vue

@@ -10,7 +10,7 @@
 </config>
 <template>
     <div>
-        <custom-bar :pre="0" :title="isActivity ? '活动详情' : '新闻详情'" :barTop="260"></custom-bar>
+        <custom-bar detail :pre="0" :title="isActivity ? '活动详情' : '新闻详情'" :barTop="260"></custom-bar>
         <banner :banners="banners" fixed :height="260" :radius="0"></banner>
 
         <div class="main" id="main">
@@ -97,27 +97,50 @@ export default {
         this.$http.get('/information/get/' + options.id).then(res => {
             this.info = res;
         });
-        this.getActivity();
     },
     onShow() {
-        if (this.informationId) {
+        const app = getApp();
+        if (app.globalData.initialize) {
             this.getActivity();
+        } else {
+            app.globalData.initializeCallback = () => {
+                this.getActivity();
+            };
         }
     },
     methods: {
         getActivity() {
             this.$http
-                .get('/eventRegistration/myEvent', {
-                    informationId: this.informationId
-                })
+                .post(
+                    '/eventRegistration/all',
+                    {
+                        query: {
+                            userId: this.$store.state.userInfo.id,
+                            informationId: this.$mp.options.informationId,
+                            del: false
+                        }
+                    },
+                    {
+                        header: {
+                            'Content-Type': 'application/json'
+                        }
+                    }
+                )
                 .then(res => {
-                    if (res) {
-                        this.activityId = res.id;
+                    if (!res.empty) {
+                        this.activityId = res.content[0].id;
                     }
                 });
         }
     },
     onPageScroll() {},
+    onShareAppMessage(from, target) {
+        return {
+            title: 'IMT科技平台——' + this.info.title,
+            path: '/pagesNews/Detail?id=' + this.informationId,
+            imageUrl: this.getList(this.info.img) + '?x-oss-process=image/resize,m_pad,h_400,w_500,color_FFFFFF'
+        };
+    },
     components: {
         Banner,
         CustomBar,

+ 5 - 5
src/pagesNews/News.vue

@@ -118,11 +118,11 @@ export default {
     onPageScroll() {},
     onReady() {
         this.main = wx.createSelectorQuery().select('#main');
-        this.main
-            .boundingClientRect(rect => {
-                this.searchTop = rect.top - this.barHeight;
-            })
-            .exec();
+        // this.main
+        //     .boundingClientRect(rect => {
+        //         this.searchTop = rect.top - this.barHeight;
+        //     })
+        //     .exec();
     },
     onReachBottom() {
         if (!this.loading && !this.finish) {

+ 50 - 8
src/pagesNews/Submit.vue

@@ -77,12 +77,22 @@
                 />
             </van-cell-group>
 
-            <fixed-button v-if="!activityId">
-                <van-button block :color="$colors.warn" :disabled="!canNext" :radius="4" @click="submit"
+            <fixed-button v-if="!information.isEnd">
+                <van-button
+                    v-if="!activityId"
+                    block
+                    :color="$colors.warn"
+                    :disabled="!canNext"
+                    :radius="4"
+                    @click="submit"
                     >提交</van-button
                 >
+                <van-button class="cancel" v-else block color="#565B66" plain :radius="4" @click="cancel"
+                    >取消报名</van-button
+                >
             </fixed-button>
         </div>
+        <van-dialog id="van-dialog" />
     </div>
 </template>
 <script>
@@ -174,7 +184,7 @@ export default {
                 this.$toast('请输入邮箱');
                 return;
             }
-
+            this.$loading('加载中...');
             this.$http
                 .post(
                     '/eventRegistration/save',
@@ -188,11 +198,15 @@ export default {
                     }
                 )
                 .then(res => {
-                    this.$toast('报名成功!', 'success');
-                    this.navigateBack();
+                    this.$loading.close();
+                    this.toast('报名成功!', 'success');
+                    setTimeout(() => {
+                        this.navigateBack();
+                    }, 1000);
                 })
                 .catch(e => {
-                    this.$toast(e.error);
+                    this.$loading.close();
+                    this.toast(e.error);
                 });
         },
         setInfo() {
@@ -233,6 +247,27 @@ export default {
                     console.log(res.errMsg);
                 }
             });
+        },
+        cancel() {
+            this.dialog('确定要取消报名吗?', true).then(() => {
+                this.$loading('加载中...');
+                this.$http
+                    .post('/eventRegistration/del/' + this.activityId, '', '', true)
+                    .then(res => {
+                        console.log('aaaaa');
+                        this.$loading.close();
+                        this.toast('取消成功!', 'success');
+                        setTimeout(() => {
+                            this.navigateBack();
+                        }, 1000);
+                    })
+                    .catch(e => {
+                        if (e.error) {
+                            this.$loading.close();
+                            this.toast(e.error);
+                        }
+                    });
+            });
         }
     },
     components: {
@@ -322,8 +357,8 @@ export default {
                     width: 16px;
                     height: 16px;
                     position: absolute;
-                    right: 0;
-                    bottom: 0;
+                    right: -1px;
+                    bottom: -1px;
                     display: none;
                 }
             }
@@ -339,4 +374,11 @@ export default {
         }
     }
 }
+
+.cancel {
+    .van-button--plain {
+        --button-border-width: 0px;
+        --button-plain-background-color: #f5f7fa;
+    }
+}
 </style>

+ 12 - 2
src/pagesProduct/Contrast.vue

@@ -35,7 +35,17 @@
             </div>
         </div>
 
-        <van-empty description="暂无对比商品" v-else />
+        <van-empty
+            description="当前暂无可对比产品哦~"
+            image="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/kong_img_duibi.png"
+            v-else
+        >
+            <div class="empty-button">
+                <van-button :color="$colors.warn" :radius="4" block @click="navigateTo('/pagesProduct/FilterVendor')"
+                    >添加产品</van-button
+                >
+            </div>
+        </van-empty>
 
         <div class="contrast-content" v-if="showList.length > 0">
             <div class="title">同类别推荐</div>
@@ -63,7 +73,7 @@
             </div>
         </van-dialog>
 
-        <fixed-button btnList>
+        <fixed-button btnList v-if="category.id">
             <van-button
                 block
                 :radius="4"

+ 121 - 61
src/pagesProduct/Detail.vue

@@ -8,7 +8,7 @@
 </config>
 <template>
     <div>
-        <custom-bar title="产品详情" :pre="0" :dark="!!productInfo.video" :barTop="375"></custom-bar>
+        <custom-bar detail title="产品详情" :pre="0" :dark="!!productInfo.video" :barTop="375"></custom-bar>
         <banner :banners="banners" :height="375" :radius="0" :autoplay="false"></banner>
         <div class="main" id="main">
             <div id="detailTop">
@@ -25,20 +25,25 @@
                         <div class="sub">{{ productInfo.model }}</div>
 
                         <div class="btn">
-                            <van-icon
-                                @click="collection"
-                                :custom-class="animate ? 'my-icon iconAnimate' : 'my-icon'"
-                                :name="isCollection ? 'icon-aixin' : 'icon-icon_collect'"
-                                :size="42"
-                                :color="isCollection ? $colors.warn : '#BCC1CC'"
-                                class-prefix="iconfont"
-                            />
-                            <van-button
-                                plain
-                                icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/icon_share.png"
-                                size="small"
-                                open-type="share"
-                            ></van-button>
+                            <div :class="animate ? 'my-icon iconAnimate' : 'my-icon'" @click="collection">
+                                <van-icon
+                                    v-if="isCollection"
+                                    :size="24"
+                                    name="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/icon_collect_pre.png"
+                                />
+                                <van-icon
+                                    v-else
+                                    name="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/icon_collect.png"
+                                    :size="24"
+                                />
+                            </div>
+
+                            <button class="share" open-type="share">
+                                <van-icon
+                                    name="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/icon_share.png"
+                                    :size="24"
+                                />
+                            </button>
                         </div>
                     </div>
                     <van-divider />
@@ -71,7 +76,11 @@
                 </div>
 
                 <div class="vendor" @click="navigateTo('/pagesVendor/Detail?id=' + vendorInfo.id)">
-                    <van-image class="logo" :radius="4" :src="vendorInfo.logo" :width="60" :height="60" />
+                    <image
+                        :src="vendorInfo.logo"
+                        style="width:60px;height:60px;border-radius:4px;border:1px solid #f2f4f5"
+                    />
+                    <!-- <van-image class="logo" :radius="4" :src="vendorInfo.logo" :width="60" :height="60" /> -->
                     <div class="vendor-info">
                         <div class="vendor-title">
                             <h3>
@@ -127,7 +136,16 @@
                     </van-tab>
                     <van-tab title="PDF资料" name="pdf" v-if="pdf.length > 0">
                         <div class="detail-content">
-                            正在打开pdf...
+                            <van-empty
+                                class="pdf"
+                                image="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/kong_img_pdf.png"
+                            >
+                                <div class="empty-button">
+                                    <van-button @click="showPdf" :radius="4" color="#F5F7FA" block
+                                        >查看PDF文件</van-button
+                                    >
+                                </div>
+                            </van-empty>
                         </div>
                     </van-tab>
                 </van-tabs>
@@ -158,6 +176,7 @@
                             :radius="0"
                             :disabled="isIntented"
                             @click="addIntentionList"
+                            class="intentionList"
                             >{{ isIntented ? '已添加' : '添加意向单' }}</van-button
                         >
                         <van-button :color="$colors.warn" @click="goConnect" type="primary" :radius="0"
@@ -344,36 +363,39 @@ export default {
         tabChange(e) {
             this.hotActive = e.detail.index;
             if (e.detail.name === 'pdf') {
-                wx.showActionSheet({
-                    itemList: [...this.pdf].map((item, index) => {
-                        const name = item.name.indexOf('http') !== -1 ? `文件${index + 1}` : item.name;
-                        return name;
-                    }),
-                    success: res => {
-                        this.$loading('加载中...');
-                        wx.downloadFile({
-                            url: this.pdf[res.tapIndex].url,
-                            fileType: 'pdf',
-                            success: res => {
-                                this.hotActive = 0;
-                                console.log(res);
-                                const filePath = res.tempFilePath;
-                                wx.openDocument({
-                                    filePath: filePath,
-                                    success: res => {}
-                                });
-                            },
-                            complete: () => {
-                                this.$loading.close();
-                            }
-                        });
-                    },
-                    fail(res) {
-                        console.log(res.errMsg);
-                    }
-                });
+                this.showPdf();
             }
         },
+        showPdf() {
+            wx.showActionSheet({
+                itemList: [...this.pdf].map((item, index) => {
+                    const name = item.name.indexOf('http') !== -1 ? `文件${index + 1}` : item.name;
+                    return name;
+                }),
+                success: res => {
+                    this.$loading('加载中...');
+                    wx.downloadFile({
+                        url: this.pdf[res.tapIndex].url,
+                        fileType: 'pdf',
+                        success: res => {
+                            this.hotActive = 0;
+                            console.log(res);
+                            const filePath = res.tempFilePath;
+                            wx.openDocument({
+                                filePath: filePath,
+                                success: res => {}
+                            });
+                        },
+                        complete: () => {
+                            this.$loading.close();
+                        }
+                    });
+                },
+                fail(res) {
+                    console.log(res.errMsg);
+                }
+            });
+        },
         tabClick(e) {
             wx.pageScrollTo({
                 scrollTop: this.detailTop,
@@ -503,24 +525,24 @@ export default {
     .btn {
         position: absolute;
         right: 0px;
-        bottom: 0px;
+        bottom: 10px;
         display: flex;
         align-items: center;
 
-        ._van-icon {
-            margin-left: 10px;
-        }
+        // ._van-icon {
+        //     margin-left: 10px;
+        // }
 
-        ._van-button {
-            height: 40px;
-            margin-left: 5px;
-        }
+        // ._van-button {
+        //     height: 40px;
+        //     margin-left: 5px;
+        // }
 
         .van-button {
             --button-small-min-width: 0px;
             --button-small-height: 40px;
             --button-border-width: 0px;
-            --button-small-font-size: 24px;
+            --button-small-font-size: 20px;
         }
     }
 
@@ -606,7 +628,7 @@ export default {
         flex-shrink: 0;
 
         .van-image {
-            border: 1px solid #dcdfe6;
+            border: 1px solid #f5f7fa;
         }
     }
 }
@@ -672,9 +694,9 @@ export default {
 
     .fixed-bottom-content {
         background-color: @bgw;
-        padding: 8px 16px;
-        padding-bottom: calc(8px + constant(safe-area-inset-bottom));
-        padding-bottom: calc(8px + env(safe-area-inset-bottom));
+        padding: 0px 16px;
+        padding-bottom: calc(0px + constant(safe-area-inset-bottom));
+        padding-bottom: calc(0px + env(safe-area-inset-bottom));
 
         position: fixed;
         left: 0;
@@ -698,9 +720,9 @@ export default {
                 white-space: nowrap;
             }
 
-            &:active {
-                background-color: darken(#fff, 5);
-            }
+            // &:active {
+            //     background-color: darken(#fff, 5);
+            // }
         }
 
         .btn-list {
@@ -715,6 +737,14 @@ export default {
 
                 --button-border-radius: 0px;
             }
+
+            .intentionList {
+                .van-button {
+                    &.van-button--disabled {
+                        --button-disabled-opacity: 0.2;
+                    }
+                }
+            }
         }
     }
 }
@@ -733,4 +763,34 @@ export default {
     align-items: center;
     justify-content: center;
 }
+
+.pdf {
+    .van-empty {
+        .empty-button {
+            max-width: 165px;
+            .van-button {
+                color: @warn!important;
+            }
+        }
+    }
+}
+
+.share {
+    background-color: transparent;
+    padding: 0;
+    margin: 0;
+    line-height: 20px;
+    border-width: 0px;
+    margin-left: 20px;
+    height: 24px;
+
+    .van-icon {
+        display: block;
+        height: 24px;
+    }
+
+    &::after {
+        border: none;
+    }
+}
 </style>

+ 0 - 1
src/pagesProduct/FilterVendor.vue

@@ -31,7 +31,6 @@
                         :border="false"
                         v-for="prod in item[1]"
                         :key="prod.id"
-                        clickable
                         :url="
                             '/pagesProduct/FilterProduct?vendorId=' +
                                 prod.id +

+ 17 - 7
src/pagesProduct/IntentionList.vue

@@ -15,16 +15,21 @@
                 @del="delContrast"
             ></product-row>
         </div>
-        <van-empty description="什么都没有哦" v-else />
+
+        <van-empty
+            description="当前暂无意向产品哦~"
+            image="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/kong_img_duibi.png"
+            v-else
+        >
+            <div class="empty-button">
+                <van-button :color="$colors.warn" :radius="4" block @click="goHome">去逛逛</van-button>
+            </div>
+        </van-empty>
 
         <van-dialog id="van-dialog"> </van-dialog>
 
-        <fixed-button v-if="chooseIds.length > 0">
-            <van-button
-                block
-                :color="$colors.warn"
-                :radius="4"
-                @click="navigateTo('/pagesProduct/Inquiry?chooseIds=' + chooseIds.join(','))"
+        <fixed-button v-if="intentionList.length > 0">
+            <van-button block :color="$colors.warn" :radius="4" :disabled="chooseIds.length === 0" @click="goNext"
                 >批量询价</van-button
             >
         </fixed-button>
@@ -81,6 +86,11 @@ export default {
                 chooseIds.push(id);
             }
             this.chooseIds = [...chooseIds];
+        },
+        goNext() {
+            if (this.chooseIds.length > 0) {
+                this.navigateTo('/pagesProduct/Inquiry?chooseIds=' + [...this.chooseIds].join(','));
+            }
         }
     },
     components: {

+ 4 - 4
src/pagesVendor/Detail.vue

@@ -242,10 +242,10 @@ export default {
         }
 
         .my-icon {
-            &:active {
-                color: @warn!important;
-                background-color: darken(@prim, 5);
-            }
+            // &:active {
+            //     color: @warn!important;
+            //     background-color: darken(@prim, 5);
+            // }
         }
     }
 }