Răsfoiți Sursa

Merge branch 'main' into feature/v1.0.28

lianbingjie 1 an în urmă
părinte
comite
bba33c569a
25 a modificat fișierele cu 1217 adăugiri și 206 ștergeri
  1. 3 0
      apps/bigmember_pc/index.html
  2. 10 0
      apps/bigmember_pc/src/api/modules/subscribe.js
  3. BIN
      apps/bigmember_pc/src/assets/images/recommend-hd.png
  4. BIN
      apps/bigmember_pc/src/assets/images/setkey-dialog.png
  5. 7 3
      apps/bigmember_pc/src/components/article-item/ArticleItem.vue
  6. 5 0
      apps/bigmember_pc/src/components/dialog/Dialog.vue
  7. 4 1
      apps/bigmember_pc/src/components/forecast/ForeCast.vue
  8. 2 2
      apps/bigmember_pc/src/components/push-setting/setList.vue
  9. 25 2
      apps/bigmember_pc/src/components/subscribe-manager/KeyConfig.vue
  10. 1 1
      apps/bigmember_pc/src/components/subscribe-manager/SubConfig.vue
  11. 36 2
      apps/bigmember_pc/src/components/subscribe-manager/index.vue
  12. 1 0
      apps/bigmember_pc/src/router/router-interceptors.js
  13. 6 0
      apps/bigmember_pc/src/router/routers.js
  14. 5 0
      apps/bigmember_pc/src/store/workspace/subscribe.js
  15. 207 0
      apps/bigmember_pc/src/views/recommen-list/recommenList.vue
  16. 42 2
      apps/bigmember_pc/src/views/subscribe/components/key/KeyConfig.vue
  17. 85 20
      apps/bigmember_pc/src/views/workspace/components/SubscribeList.vue
  18. 7 1
      apps/bigmember_pc/src/views/workspace/ui/ListCard.vue
  19. 23 13
      apps/mobile/src/api/modules/subscribe.js
  20. BIN
      apps/mobile/src/assets/image/public/goset.png
  21. 14 1
      apps/mobile/src/router/modules/tabbar.js
  22. 3 3
      apps/mobile/src/views/push/PushSetting.vue
  23. 1 1
      apps/mobile/src/views/tabbar/Home.vue
  24. 288 0
      apps/mobile/src/views/tabbar/RecommendedBannerlist.vue
  25. 442 154
      apps/mobile/src/views/tabbar/Subscribe.vue

+ 3 - 0
apps/bigmember_pc/index.html

@@ -54,6 +54,9 @@
     .big-member-page {
       margin: 0 auto;
     }
+    body.big-transparent{
+      background-color: transparent!important;
+    }
   </style>
   <body style="background-color: #f2f2f4;">
     <noscript>

+ 10 - 0
apps/bigmember_pc/src/api/modules/subscribe.js

@@ -241,3 +241,13 @@ export function relatesInformation(data) {
     data: data
   })
 }
+
+// 获取推荐标讯列表数据
+export function getRecommenListData(data) {
+  return request({
+    baseURL: '/jyapi/jybx',
+    url: '/subscribe/getRecList',
+    method: 'post',
+    data: data
+  })
+}

BIN
apps/bigmember_pc/src/assets/images/recommend-hd.png


BIN
apps/bigmember_pc/src/assets/images/setkey-dialog.png


+ 7 - 3
apps/bigmember_pc/src/components/article-item/ArticleItem.vue

@@ -51,10 +51,14 @@
           >企业手动分发</span
         >
         <span class="tag" v-if="article.area">{{ article.area }}</span>
-        <span class="tag orange" v-if="article.type">{{ article.type }}</span>
-        <span class="tag green" v-if="article.buyerclass">{{
-          article.buyerclass
+        <span class="tag orange" v-if="article.type || article.subtype">{{
+          article.type || article.subtype
         }}</span>
+        <span
+          class="tag green"
+          v-if="article.buyerclass || article.buyerClass"
+          >{{ article.buyerclass || article.buyerClass }}</span
+        >
         <span class="tag dpink" v-if="calcBudget && calcBudget !== '0元'">{{
           calcBudget
         }}</span>

+ 5 - 0
apps/bigmember_pc/src/components/dialog/Dialog.vue

@@ -6,6 +6,7 @@
     :show-close="showClose"
     :visible="visible"
     @update:visible="update"
+    v-component-change-mount="{ selector: comMount }"
     @open="$emit('open')"
     @opened="$emit('opened')"
     @close="$emit('close')"
@@ -41,6 +42,10 @@ export default {
   props: {
     visible: Boolean,
     showClose: Boolean,
+    comMount: {
+      type: String,
+      default: ''
+    },
     showFooter: {
       type: Boolean,
       default() {

+ 4 - 1
apps/bigmember_pc/src/components/forecast/ForeCast.vue

@@ -457,7 +457,10 @@
         >前往订阅设置</el-button
       >
     </Empty>
-    <Empty v-else-if="showEmpty && potenCode == 1" images="jy-cry.png">
+    <Empty
+      v-else-if="showEmpty && potenCode == 1"
+      :images="getAssetsFile('empty/jy-cry.png')"
+    >
       <div name="default">
         <div class="poten_tip">暂未设置订阅关键词,无法进行预测</div>
         <div class="setKeyWords" v-if="!info.isSubCount">

+ 2 - 2
apps/bigmember_pc/src/components/push-setting/setList.vue

@@ -14,14 +14,14 @@
               :append-to-body="false"
               placement="top"
               trigger="hover"
-              content="根据订阅条件,未匹配到新的招投标公告信息时,将为您发送提醒通知"
+              content="根据您在平台的订阅词/搜索词/浏览标讯进行联想推荐,剑鱼标讯智能推荐为您推送新的标讯信息。"
             >
               <img
                 src="@/assets/images/icon/help.png"
                 alt=""
                 slot="reference"
               /> </el-popover
-            >消息提醒:
+            >推荐消息提醒:
           </p>
           <el-radio-group v-model="nomsgtipRadio" @input="nomsgtipRadioChange">
             <el-radio :label="1">开启</el-radio>

+ 25 - 2
apps/bigmember_pc/src/components/subscribe-manager/KeyConfig.vue

@@ -7,8 +7,20 @@
           ><em style="color: #2cb7ca"> {{ keyCounts }}</em
           >/{{ maxCount }}</span
         >
-        <p style="font-size: 14px; color: #2cb7ca">
+        <p
+          style="
+            display: flex;
+            align-items: center;
+            font-size: 14px;
+            color: #2cb7ca;
+          "
+        >
           注:任意1组关键词组匹配成功即推送相关信息
+          <img
+            @click="setClickEvent"
+            src="@/assets/images/icon/help.png"
+            class="icon-help-img"
+          />
         </p>
       </div>
       <div class="add-classify" @click="addClassifyFn">
@@ -83,7 +95,8 @@ export default {
         dialog: false,
         className: ''
       },
-      sort: 1
+      sort: 1,
+      showSetKeyDialog: false
     }
   },
   computed: {
@@ -98,6 +111,9 @@ export default {
     }
   },
   methods: {
+    setClickEvent() {
+      this.$emit('closeDilog')
+    },
     onUpdateKey(data) {
       this.keywordsList = data || []
       this.$emit('update', this.keywordsList)
@@ -172,6 +188,13 @@ export default {
     color: #1d1d1d;
     line-height: 28px;
     border-bottom: 1px solid #ececec;
+    .icon-help-img {
+      display: inline-block;
+      width: 18px;
+      height: 18px;
+      margin: 0 7px 0 8px;
+      cursor: pointer;
+    }
     .add-classify {
       width: 110px;
       height: 38px;

+ 1 - 1
apps/bigmember_pc/src/components/subscribe-manager/SubConfig.vue

@@ -233,7 +233,7 @@ export default {
       timeout: null,
       entStatus: false,
       districtMapData: {},
-      areaMapData: {},
+      areaMapData: this.area,
       regionMapData: this.regionMap
     }
   },

+ 36 - 2
apps/bigmember_pc/src/components/subscribe-manager/index.vue

@@ -17,8 +17,23 @@
       :list="setData.keyList"
       :max-count="setData.maxCount"
       @update="onUpdateKey"
+      @closeDilog="showSetKeyDialog = true"
     >
     </KeyConfig>
+    <common-dialog
+      width="500px"
+      :com-mount="'.drawer-dialog'"
+      class="setkey-dialog"
+      :visible="showSetKeyDialog"
+      :show-footer="false"
+    >
+      <img
+        @click="showSetKeyDialog = false"
+        class="setkey-img"
+        src="@/assets/images/setkey-dialog.png"
+        alt=""
+      />
+    </common-dialog>
     <!-- <PushConfig
       :rateModel="setData.rateModel"
       :mailPush="setData.mailPush"
@@ -33,6 +48,7 @@
 <script>
 import SubConfig from '@/components/subscribe-manager/SubConfig'
 import KeyConfig from '@/components/subscribe-manager/KeyConfig'
+import commonDialog from '@/components/dialog/Dialog'
 // import PushConfig from '@/components/subscribe-manager/PushConfig'
 export default {
   name: 'subscribeManage',
@@ -46,7 +62,8 @@ export default {
   },
   components: {
     SubConfig,
-    KeyConfig
+    KeyConfig,
+    commonDialog
   },
   data() {
     return {
@@ -71,7 +88,8 @@ export default {
         canSetCityCount: -1,
         // 县区
         district: {}
-      }
+      },
+      showSetKeyDialog: false
     }
   },
   watch: {
@@ -439,5 +457,21 @@ export default {
       padding: 0 0 32px;
     }
   }
+  .custom-dialog.setkey-dialog {
+    z-index: 2100 !important;
+    .el-dialog__header {
+      display: none;
+    }
+    .el-dialog__body {
+      padding: 0;
+    }
+  }
+}
+</style>
+<style lang="scss" scoped>
+.setkey-img {
+  position: absolute;
+  cursor: pointer;
+  top: calc(100% + 100px);
 }
 </style>

+ 1 - 0
apps/bigmember_pc/src/router/router-interceptors.js

@@ -40,6 +40,7 @@ const powerCheckWhiteList = [
   'unit_portrayal_id',
   'set-password',
   'portrayal_loading',
+  'recommen-list',
   'business_detail'
 ]
 

+ 6 - 0
apps/bigmember_pc/src/router/routers.js

@@ -246,6 +246,12 @@ export default [
     name: 'set-identity-info',
     component: () => import('@/views/accountInfo/SetIdentityInfo.vue')
   },
+  // 推荐标讯列表
+  {
+    path: '/recommen-list',
+    name: 'recommen-list',
+    component: () => import('@/views/recommen-list/recommenList.vue')
+  },
   // 商机情报-详情页
   {
     path: '/business_detail/:id',

+ 5 - 0
apps/bigmember_pc/src/store/workspace/subscribe.js

@@ -13,6 +13,7 @@ export default {
     hasKey: false,
     loading: true,
     loaded: false,
+    isRecommend: '1',
     list: [],
     subscribeKeyList: []
   }),
@@ -22,6 +23,9 @@ export default {
         state.list = list
       }
     },
+    setRecommenStatus(state, f = false) {
+      state.isRecommend = f
+    },
     changeLoading(state, f = false) {
       state.loading = f
     },
@@ -71,6 +75,7 @@ export default {
             }
           })
           // commit('changeHasKeyState', hasKey)
+          commit('setRecommenStatus', data.isRecommend)
           commit('changeList', list)
         }
         commit('changeLoading', false)

+ 207 - 0
apps/bigmember_pc/src/views/recommen-list/recommenList.vue

@@ -0,0 +1,207 @@
+<template>
+  <div class="recommend-list">
+    <div class="recommon-main">
+      <div class="content-header">
+        <span class="header-left card-title">推荐标讯列表</span>
+      </div>
+      <div class="content-config" @click="setKeyEvent">
+        <img src="@/assets/images/recommend-hd.png" alt="" />
+      </div>
+      <FollowOfficialAccountDialog
+        :visible.sync="toFollowOfficialAccount"
+      ></FollowOfficialAccountDialog>
+      <div class="recommend-pushList">
+        <div
+          class="info-list"
+          element-loading-background="rgba(255,255,255, .4)"
+          element-loading-custom-class="self-export-loading"
+          v-loading="exportLoading"
+        >
+          <article-item
+            @setShow="setShow(item._id)"
+            class="list-item"
+            v-for="(item, index) in listState.list"
+            :class="{ visited: item.visited || item.ca_isvisit }"
+            :key="index"
+            :index="index + 1"
+            :article="item"
+            :config="config"
+            :vt="vt"
+            @onClick="toDetail(item)"
+          >
+            <template #right-time>
+              <span>{{ dateFromNow(item.publishTime * 1000) }}</span>
+            </template>
+          </article-item>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import ArticleItem from '@/components/article-item/ArticleItem.vue'
+import FollowOfficialAccountDialog from '@/components/dialog/FollowOfficialAccountDialog.vue'
+import {
+  getViewStatus,
+  setSubscribeInfoRead,
+  getRecommenListData
+} from '@/api/modules/'
+import { mixinVisited } from '@/utils/mixins/visited'
+import { dateFromNow, openSelfLink, openLinkInWorkspace } from '@/utils/'
+import { mapGetters } from 'vuex'
+export default {
+  name: 'recommendList',
+  mixins: [mixinVisited],
+  components: {
+    ArticleItem,
+    FollowOfficialAccountDialog
+  },
+  data() {
+    return {
+      listState: {
+        list: []
+      },
+      exportLoading: false,
+      config: {
+        gray: true,
+        table: false,
+        collect: false
+      },
+      statusList: [],
+      vt: '',
+      toFollowOfficialAccount: false
+    }
+  },
+  computed: {
+    ...mapGetters('user', {
+      autoVt: 'vt'
+    })
+  },
+  created() {
+    this.getParams()
+    this.getListData()
+  },
+  methods: {
+    dateFromNow,
+    // 获取列表数据
+    async getListData() {
+      const params = {
+        spath: '1'
+      }
+      const { data, error_code: code } = await getRecommenListData(params)
+      if (code === 0 && data) {
+        this.listState.list = data.list
+      }
+    },
+    getParams() {
+      const { vt } = this.$route.query
+      if (vt) {
+        this.vt = vt
+      } else {
+        this.vt = this.autoVt
+      }
+    },
+    setKeyEvent() {
+      // 前往订阅管理
+      if (this.vt === 'f' || this.vt === 'v') {
+        // 弹窗提示关注公众号
+        this.toFollowOfficialAccount = true
+      } else if (this.vt === 'm') {
+        openSelfLink(this.$router.resolve('/set_subscribe/config'))
+      } else if (this.vt === 's') {
+        // 商机管理跳转老页面(框架内打开)
+        const url = '/entpc/newBus/set_subscribe'
+        window.open(url)
+      }
+    },
+    // 查看分发状态
+    async setShow(id) {
+      const query = {
+        infoId: id
+      }
+      const { data, error_code: code } = await getViewStatus(this.vt, query)
+      if (code === 0) {
+        data.forEach((item) => {
+          if (item.isvisit === 0 || !item.isvisit) {
+            item.isvisit = '未读'
+          } else if (item.isvisit === 1) {
+            item.isvisit = '已读'
+          }
+          if (item.visittime) {
+            item.visittime = `${item.visittime.split(' ')[0]}\n${
+              item.visittime.split(' ')[1]
+            }`
+          } else {
+            item.visittime = '-'
+          }
+          if (item.date) {
+            item.date = `${item.date.split(' ')[0]}\n${item.date.split(' ')[1]}`
+          } else {
+            item.date = '-'
+          }
+        })
+        this.statusList = data
+      }
+    },
+    async toDetail(item) {
+      const { _id, matchKeys, ca_index } = item
+      item.visited = true
+      if (this.vt !== 'q') {
+        await setSubscribeInfoRead(this.vt, {
+          vsid: ca_index,
+          isEnt: this.$route.query?.vt === 'q'
+        })
+      }
+      this.pathVisiting(
+        this.createPathItem('/article/content/*.html', `id=${_id}`)
+      )
+      let match = ''
+      if (Array.isArray(matchKeys) && matchKeys.length) {
+        match = matchKeys.join(' ')
+        if (match) {
+          match = encodeURIComponent(match)
+        }
+      }
+      // 在工作桌面内打开三级页
+      openLinkInWorkspace(true, {
+        url: `/article/content/${_id}.html?kds=${match}`,
+        newTab: true
+      })
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.recommend-list {
+  padding: 24px;
+  box-sizing: border-box;
+  background: #fff;
+  .recommon-main {
+    margin: 0 auto;
+    width: 1200px;
+  }
+  ::v-deep {
+    .a-i-right {
+      padding: 8px 0 0 0px;
+    }
+  }
+  .card-title {
+    font-size: 24px;
+    color: #1d1d1d;
+    line-height: 36px;
+  }
+  .content-config {
+    margin-top: 16px;
+    height: 60px;
+    cursor: pointer;
+    & > img {
+      height: 100%;
+      width: 1200px;
+    }
+  }
+  .list-item:hover {
+    background: #f7f9fc;
+  }
+}
+</style>

+ 42 - 2
apps/bigmember_pc/src/views/subscribe/components/key/KeyConfig.vue

@@ -10,11 +10,28 @@
         <span style="font-size: 14px; color: #2cb7ca; margin-left: 16px"
           >注:任意1组关键词组匹配成功即推送相关信息</span
         >
+        <img
+          @click="showSetKeyDialog = true"
+          src="@/assets/images/icon/help.png"
+          class="icon-help-img"
+        />
       </div>
       <div class="add-classfily" @click="addClassfilyFn()">
         <i class="el-icon-plus"></i> 新增分类
       </div>
     </div>
+    <common-dialog
+      width="500px"
+      :visible="showSetKeyDialog"
+      :show-footer="false"
+    >
+      <img
+        @click="showSetKeyDialog = false"
+        class="setkey-img"
+        src="@/assets/images/setkey-dialog.png"
+        alt=""
+      />
+    </common-dialog>
     <div class="key-content">
       <!-- <div v-if="datas.keyList.length === 0">
         <div class="classify-title">
@@ -62,6 +79,7 @@
 import { Input, Button, Dialog, RadioGroup, Radio } from 'element-ui'
 import KeyCard from '@/components/selector/SelectorCard'
 import { setUserInfoVip } from '@/api/modules'
+import commonDialog from '@/components/dialog/Dialog'
 export default {
   name: 'key-config',
   props: {
@@ -77,7 +95,8 @@ export default {
     [Button.name]: Button,
     [RadioGroup.name]: RadioGroup,
     [Radio.name]: Radio,
-    KeyCard
+    KeyCard,
+    commonDialog
     // Edit
   },
   data() {
@@ -85,7 +104,8 @@ export default {
       add: {
         dialog: false,
         className: ''
-      }
+      },
+      showSetKeyDialog: false
     }
   },
   computed: {
@@ -181,6 +201,13 @@ export default {
     color: #1d1d1d;
     line-height: 28px;
     border-bottom: 1px solid #ececec;
+    .icon-help-img {
+      display: inline-block;
+      width: 18px;
+      height: 18px;
+      margin: 0 7px 0 8px;
+      cursor: pointer;
+    }
     .add-classfily {
       width: 110px;
       height: 38px;
@@ -265,5 +292,18 @@ export default {
       width: 352px;
     }
   }
+  ::v-deep {
+    .el-dialog__header {
+      display: none;
+    }
+    .el-dialog__body {
+      padding: 0;
+    }
+  }
+}
+.setkey-img {
+  position: absolute;
+  cursor: pointer;
+  top: calc(100% + 100px);
 }
 </style>

+ 85 - 20
apps/bigmember_pc/src/views/workspace/components/SubscribeList.vue

@@ -1,13 +1,25 @@
 <template>
   <ListCard
     class="subscribe-list"
-    :list="subscribeList"
+    :list="setListData"
     title="订阅推送"
     @clickListItem="clickListItem"
     @linkMore="linkMore"
+    :is-recommend="isRecommend"
     :loading="loading"
     :loaded="loaded"
   >
+    <template #dialog>
+      <FollowOfficialAccountDialog
+        :visible.sync="toFollowOfficialAccount"
+      ></FollowOfficialAccountDialog>
+    </template>
+    <template #warn-text>
+      <div v-show="showRecommend" class="warn-text">
+        <span>标准匹配不精准?</span>
+        <span @click="addSet">点击设置精准匹配></span>
+      </div>
+    </template>
     <div slot="empty-content" class="empty-content">
       <div v-if="emptyButtonShow">
         <p>暂无订阅信息</p>
@@ -24,9 +36,6 @@
         <p v-else>对不起,没有匹配到数据,请修改订阅设置</p>
         <button class="empty-button mt12" @click="addSet">前往订阅设置</button>
       </div>
-      <FollowOfficialAccountDialog
-        :visible.sync="toFollowOfficialAccount"
-      ></FollowOfficialAccountDialog>
     </div>
   </ListCard>
 </template>
@@ -56,8 +65,23 @@ export default {
       hasKey: (state) => state.workspace.subscribe.hasKey, // 是否有订阅关键词
       loading: (state) => state.workspace.subscribe.loading,
       loaded: (state) => state.workspace.subscribe.loaded,
-      subscribeList: (state) => state.workspace.subscribe.list.slice(0, 10)
-    })
+      subscribeList: (state) => state.workspace.subscribe.list.slice(0, 10),
+      isRecommend: (state) => state.workspace.subscribe.isRecommend
+    }),
+    showRecommend() {
+      return this.isRecommend === '2' || this.isRecommend === '3'
+    },
+    setListData() {
+      if (this.showRecommend) {
+        if (this.subscribeList.length > 9) {
+          return this.subscribeList.slice(0, 9)
+        } else {
+          return this.subscribeList
+        }
+      } else {
+        return this.subscribeList
+      }
+    }
   },
   data() {
     return {
@@ -66,7 +90,8 @@ export default {
   },
   created() {
     this.getList({
-      notReturnCount: 1
+      notReturnCount: 1,
+      stag: 'home'
     })
     this.getSubscribeKeywordList({
       vt: this.vt,
@@ -98,20 +123,30 @@ export default {
       })
     },
     linkMore() {
-      tryCallHooks({
-        fn: () => {
-          this.$BRACE.methods.open({
-            route: {
-              link: `/big_subscribe?vt=${this.vt}`,
-              appName: 'big',
-              appType: 'qiankun'
+      if (this.showRecommend) {
+        // 跳转到推荐标讯列表页面
+        openSelfLink(this.$router.resolve('/recommen-list'))
+      } else {
+        tryCallHooks({
+          fn: () => {
+            this.$BRACE.methods.open({
+              route: {
+                link: `/big_subscribe?vt=${this.vt}`,
+                appName: 'big',
+                appType: 'qiankun'
+              }
+            })
+          },
+          spareFn: () => {
+            if (this.showRecommend) {
+              // 跳转到推荐标讯列表页面
+              openSelfLink(this.$router.resolve('/recommen-list'))
+            } else {
+              openSelfLink(this.$router.resolve(`/big_subscribe?vt=${this.vt}`))
             }
-          })
-        },
-        spareFn: () => {
-          openSelfLink(this.$router.resolve(`/big_subscribe?vt=${this.vt}`))
-        }
-      })
+          }
+        })
+      }
     },
     addSet() {
       // 前往订阅管理
@@ -129,3 +164,33 @@ export default {
   }
 }
 </script>
+
+<style lang="scss" scoped>
+.warn-text {
+  padding: 4px 20px;
+  margin-bottom: 8px;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  font-size: 14px;
+  background-color: #fff5ec;
+  & > span {
+    line-height: 22px;
+    color: #ff9f40;
+  }
+  & > span:last-child {
+    cursor: pointer;
+    font-weight: bold;
+  }
+}
+::v-deep {
+  .card-content {
+    padding-left: 0;
+    padding-right: 0;
+  }
+  .article-item.list-item {
+    padding-left: 20px;
+    padding-right: 20px;
+  }
+}
+</style>

+ 7 - 1
apps/bigmember_pc/src/views/workspace/ui/ListCard.vue

@@ -4,7 +4,7 @@
       <div
         slot="header-right"
         class="h-header-more"
-        v-show="list.length !== 0"
+        v-show="list.length !== 0 && isRecommend !== '3'"
         @click="linkMore"
       >
         <span class="more-text">更多</span>
@@ -12,6 +12,8 @@
       </div>
     </slot>
     <div class="list-container" v-loading="loading">
+      <slot name="dialog"></slot>
+      <slot name="warn-text"></slot>
       <slot name="default">
         <ArticleItem
           class="list-item"
@@ -52,6 +54,10 @@ export default {
       type: String,
       default: ''
     },
+    isRecommend: {
+      type: String,
+      default: ''
+    },
     loading: {
       type: Boolean,
       default: false

+ 23 - 13
apps/mobile/src/api/modules/subscribe.js

@@ -4,7 +4,7 @@ import { envs } from '@/utils/prototype/modules/platform'
 
 // 获取用户订阅信息
 // https://yapi.jydev.jianyu360.com/project/63/interface/api/191
-export function getUserSubscribeList (type = 'fType', data) {
+export function getUserSubscribeList(type = 'fType', data) {
   // fType免费用户  vType超级订阅用户  mType大会员用户  eType商机管理用户
   return request({
     url: `/jyapi/jybx/subscribe/${type}/list`,
@@ -13,10 +13,18 @@ export function getUserSubscribeList (type = 'fType', data) {
     data
   })
 }
-
+export function getRecList(data) {
+  // 订阅推荐列表
+  return request({
+    url: '/jyapi/jybx/subscribe/getRecList',
+    method: 'post',
+    noToast: true,
+    data
+  })
+}
 // 获取用户订阅信息其他额外的信息
 // https://yapi.jydev.jianyu360.com/project/63/interface/api/203
-export function getUserSubscribeSomeInfo (type = 'fType') {
+export function getUserSubscribeSomeInfo(type = 'fType') {
   return request({
     url: `/jyapi/jybx/subscribe/${type}/someInfo`,
     method: 'post',
@@ -26,7 +34,7 @@ export function getUserSubscribeSomeInfo (type = 'fType') {
 
 // 获取用户订阅筛选关键词
 // 返回内容中,合并了企业订阅的关键词
-export function getUserSubscribeKeywords (type = 'fType', data) {
+export function getUserSubscribeKeywords(type = 'fType', data) {
   data = qs.stringify(data)
   return request({
     url: `/jyapi/jybx/subscribe/${type}/getKey`,
@@ -37,7 +45,7 @@ export function getUserSubscribeKeywords (type = 'fType', data) {
 }
 
 // 推送数据浏览状态修改
-export function setUserSubscribeListVisited (type = 'fType', data) {
+export function setUserSubscribeListVisited(type = 'fType', data) {
   data = qs.stringify(data)
   return request({
     url: `/jyapi/jybx/subscribe/${type}/setRead`,
@@ -48,17 +56,19 @@ export function setUserSubscribeListVisited (type = 'fType', data) {
 }
 
 // 免费用户设置订阅关键词
-export function freeSubscribeKeys (data) {
+export function freeSubscribeKeys(data) {
   data = qs.stringify(data)
   return request({
-    url: envs.inWX ? '/member/swordfish/ajaxReq' : '/jyapp/member/swordfish/ajaxReq',
+    url: envs.inWX
+      ? '/member/swordfish/ajaxReq'
+      : '/jyapp/member/swordfish/ajaxReq',
     method: 'post',
     data
   })
 }
 
 // 企业订阅接收人员获取
-export function getDistributorPerson (type = 'fType', data) {
+export function getDistributorPerson(type = 'fType', data) {
   // data = qs.stringify(data)
   return request({
     url: `/jyapi/jybx/subscribe/${type}/distributor`,
@@ -69,7 +79,7 @@ export function getDistributorPerson (type = 'fType', data) {
 }
 
 // 订阅页面数据导出接口
-export function getPushListDataExportId (type = 'fType', data) {
+export function getPushListDataExportId(type = 'fType', data) {
   return request({
     url: `/jyapi/jybx/subscribe/${type}/byPushHistory`,
     method: 'post',
@@ -79,7 +89,7 @@ export function getPushListDataExportId (type = 'fType', data) {
 
 // 推送设置接口
 // 用户信息获取
-export function getUser (data) {
+export function getUser(data) {
   return request({
     url: '/jyapi//jybx/subscribe/getUser',
     method: 'post',
@@ -88,7 +98,7 @@ export function getUser (data) {
 }
 
 // 用户信息设置
-export function setUser (data) {
+export function setUser(data) {
   return request({
     url: '/jyapi//jybx/subscribe/setUser',
     method: 'post',
@@ -97,7 +107,7 @@ export function setUser (data) {
 }
 
 // 推送设置获取
-export function getPushSet (data) {
+export function getPushSet(data) {
   return request({
     url: '/jyapi/jybx/subscribe/getPushSet',
     method: 'post',
@@ -106,7 +116,7 @@ export function getPushSet (data) {
 }
 
 // 推送设置修改
-export function setPushSet (data) {
+export function setPushSet(data) {
   return request({
     url: '/jyapi/jybx/subscribe/setPushSet',
     method: 'post',

BIN
apps/mobile/src/assets/image/public/goset.png


+ 14 - 1
apps/mobile/src/router/modules/tabbar.js

@@ -58,7 +58,10 @@ export default [
       {
         path: 'message',
         name: 'tabbar-message',
-        alias: ['/jyapp/frontPage/messageCenter/sess/index', '/weixin/frontPage/messageCenter/sess/index'],
+        alias: [
+          '/jyapp/frontPage/messageCenter/sess/index',
+          '/weixin/frontPage/messageCenter/sess/index'
+        ],
         component: () => import('@/views/tabbar/Message.vue'),
         meta: {
           title: '消息中心',
@@ -76,5 +79,15 @@ export default [
       //   }
       // }
     ]
+  },
+  {
+    path: '/recommendedlist',
+    name: 'tabbar-recommendedlist',
+    component: () => import('@/views/tabbar/RecommendedBannerlist.vue'),
+    meta: {
+      header: true,
+      title: '推荐标讯列表'
+      // tabbar: 'subscribe'
+    }
   }
 ]

+ 3 - 3
apps/mobile/src/views/push/PushSetting.vue

@@ -37,7 +37,7 @@
           </template>
           <div class="noMessage" v-if="item.title === '我的订阅'">
             <div class="left_">
-              <div class="title">消息提醒</div>
+              <div class="title">推荐消息提醒</div>
               <div class="warm" @click.stop="PopupBox"></div>
               <div class="states">{{ item.i_nomsgtip ? '已开启' : '已关闭' }}</div>
             </div>
@@ -748,8 +748,8 @@ export default {
     },
     PopupBox () {
       this.$dialog.confirm({
-        title: '消息提醒',
-        message: '根据订阅条件,未匹配到新的招投标公告信息时,将为您发送提醒通知。',
+        title: '推荐消息提醒',
+        message: '根据您在平台的订阅词/搜索词/浏览标讯进行联想推荐,剑鱼标讯智能推荐为您推送新的标讯信息。',
         className: 'j-confirm-dialog',
         messageAlign: 'left',
         showCancelButton: false,

+ 1 - 1
apps/mobile/src/views/tabbar/Home.vue

@@ -337,7 +337,7 @@ export default {
       //   this.toLogin()
       // }
     },
-    toSearch () {
+    toSearch () { 
       this.$router.push({
         name: 'search-middle-bidding',
         params: {

+ 288 - 0
apps/mobile/src/views/tabbar/RecommendedBannerlist.vue

@@ -0,0 +1,288 @@
+<template>
+  <div class="RecommendedBannerlist">
+    <div class="listContent">
+      <div @click="toSubManagePage">
+        <img src="@/assets/image/public/goset.png" alt="" class="topimg" />
+      </div>
+      <ProjectCell
+        v-for="item in list"
+        class="list-item"
+        cardType="simplify"
+        :class="item.className"
+        :detailList="item.detailList"
+        @click="onClickCell(item)"
+        :title="item.title"
+        :time="item.dateTime"
+        :isFile="item.isFile"
+        :keys="item.matchKeys"
+        :leftTopBadgeText="item.leftTopBadgeText"
+        :tags="item.tagList"
+        :pushSource="item.pushSource"
+        :key="item.id"
+        v-visited:subscribe="item._id"
+      >
+      </ProjectCell>
+      <AppEmpty
+        class="center"
+        state="sleep"
+        v-show="list.length === 0"
+      ></AppEmpty>
+    </div>
+  </div>
+</template>
+<script>
+import { mapGetters, mapState } from 'vuex'
+import qs from 'qs'
+import { AppEmpty, ProjectCell } from '@/ui'
+import {
+  getRecList,
+  getUserSubscribeSomeInfo,
+  getUserSubscribeKeywords
+} from '@/api/modules'
+import { LINKS } from '@/data'
+import {
+  openAppOrWxPage,
+  openLinkOfOther,
+  getRandomString,
+  formatMoney
+} from '@/utils'
+export default {
+  name: 'RecommendedBannerlist',
+  components: {
+    [ProjectCell.name]: ProjectCell,
+    [AppEmpty.name]: AppEmpty
+  },
+  computed: {
+    ...mapState('user', ['power', 'mySelectEntInfo']),
+    ...mapGetters('user', [
+      'isLogin',
+      'restfulApiUserTypeWitchVSwitch',
+      'vSwitch'
+    ]),
+    isHasKey() {
+      return this.mergedKeywords.length > 0
+    }
+  },
+  data() {
+    return {
+      isEntSubscribe: '',
+      mergedKeywords: [],
+      list: [],
+      // 用户其他信息
+      someInfo: {
+        userId: '',
+        hasKey: false, // 是否订阅关键词
+        isInTSguide: false, // 是否进入向导
+        isExpire: 0, // 超级订阅到期提醒
+        isOnTail: false, // 超级订阅试用状态
+        isPassCount: false, // 推送数量达到上限校验
+        otherFlag: false, // 首次用户推送查询“其他”
+        isread: false, // 某个通知??是否已读
+        industry: [] // 会员订阅的行业
+      }
+    }
+  },
+
+  created() {
+    this.getUserSubscribeSomeInfo()
+    this.getMergedEntSubscribeKeywords()
+    this.getList()
+  },
+  methods: {
+    formatMoney,
+    async onClickCell(item) {
+      const { _id, industry } = item
+      const { inWX } = this.$envs
+      const query = {}
+      if (industry) {
+        query.industry = industry
+      }
+      if (item.matchKeys) {
+        query.keywords = item.matchKeys.join(' ')
+      }
+      const targetMap = {
+        wx: `/article/content/${_id}.html?${qs.stringify(query)}`,
+        h5: `/jyapp/article/content/${_id}.html?${qs.stringify(query)}`,
+        app: `/jyapp/article/content/${_id}.html?${qs.stringify(query)}`
+      }
+      if (!this.isLogin) {
+        return openLinkOfOther(LINKS.APP登录页.app, {
+          query: {
+            url: inWX ? targetMap.wx : targetMap.app
+          }
+        })
+      }
+      openAppOrWxPage(targetMap)
+    },
+    // 去订阅页面
+    toSubManagePage() {
+      const { isUpgrade } = this.power
+      const { isInTSguide } = this.someInfo
+      // 打开订阅页面
+      // 商机管理跳转商机管理页面
+      if (this.vSwitch === 's') {
+        openLinkOfOther('/page_entniche_new/page/subsetting/sub_entrance.html')
+      } else if (this.vSwitch === 'v' || this.vSwitch === 'm') {
+        // 超级订阅/大会员
+        openAppOrWxPage(LINKS.订阅管理页面, {
+          query: {
+            vSwitch: this.vSwitch
+          }
+        })
+      } else {
+        // vSwitch === 'f' || vSwitch === ''
+        // 是否是免费用户订阅升级用户 默认true
+        if (isInTSguide) {
+          openAppOrWxPage(LINKS.老关键词列表)
+        } else {
+          if (isUpgrade || !this.isHasKey) {
+            // 无关键词时候,也要跳转订阅管理
+            openAppOrWxPage(LINKS.订阅管理页面)
+          } else {
+            // 老用户订阅用户跳转老订阅管理
+            openAppOrWxPage(LINKS.老关键词列表)
+          }
+        }
+      }
+
+      // openLinkOfOther(
+      //   '/page_entniche_new/page/sub_management/sub_management_system.html?pagesource=enterprise'
+      // )
+    },
+    // 获取用户订阅信息
+    async getUserSubscribeSomeInfo() {
+      try {
+        const {
+          data = {},
+          error_code: code = 0,
+          // eslint-disable-next-line no-unused-vars
+          error_msg: msg
+        } = await getUserSubscribeSomeInfo(this.restfulApiUserTypeWitchVSwitch)
+        if (code === 0 && data) {
+          Object.assign(this.someInfo, data)
+        }
+      } catch (error) {
+        // eslint-disable-next-line no-empty
+      } finally {
+      }
+    },
+    async getMergedEntSubscribeKeywords() {
+      const {
+        ent_buy_vip: entBuyVip,
+        ent_buy_member: entBuyMember,
+        power_source: powerSource,
+        user_power: userPower
+      } = this.mySelectEntInfo
+      const params = {
+        ent_buy_vip: entBuyVip,
+        ent_buy_member: entBuyMember,
+        powerSource,
+        userPower,
+        isEnt: false
+      }
+      const {
+        data,
+        error_code: code,
+        error_msg: msg
+      } = await getUserSubscribeKeywords(
+        this.restfulApiUserTypeWitchVSwitch,
+        params
+      )
+      if (code === 0) {
+        this.mergedKeywords = data?.items || []
+      } else {
+        // eslint-disable-next-line no-console
+        console.warn(msg)
+      }
+    },
+    async getList() {
+      const loading = this.$toast.loading({
+        duration: 0,
+        message: 'loading...'
+      })
+      const {
+        data = {},
+        error_code: code = 0,
+        error_msg: msg
+      } = await getRecList({ spath: '2' }) // 1订阅更多 2模版消息
+      loading.clear()
+      if (code === 0 && data) {
+        const list = data.list
+        if (Array.isArray(list)) {
+          this.preSortList(list)
+          this.list = list
+        }
+      } else {
+        this.$toast(msg || '请求失败')
+      }
+    },
+    preSortList(list = []) {
+      if (!Array.isArray(list)) return
+      list.forEach(this.preSortItem)
+    },
+    // 格式化查询后的每一项数据
+    preSortItem(item) {
+      if (!item) return
+      const { area, collection, projectInfo } = item
+      const {
+        vip_power: vipPower,
+        member_power: memberPower,
+        user_power: userPower
+      } = this.mySelectEntInfo
+      item.star = !!collection
+      // 参标状态
+      item.isCB = {
+        id: '',
+        value: 0
+      }
+      // 是否有附件
+      item.isFile = item?.ca_fileExists || false
+      item.leftTopBadgeText = item.site === '剑鱼信息发布平台' ? '用户发布' : ''
+      // 拟建项目独有参数
+      if (projectInfo) {
+        Object.assign(item, projectInfo)
+      }
+      if (!Array.isArray(item.matchKeys)) {
+        item.matchKeys = []
+      }
+
+      // 个人订阅下, 来自企业分发的信息(企业超级订阅/企业大会员/企业商机管理), 都要添加标签
+      const powerFromEnt =
+        vipPower === 1 || memberPower === 1 || userPower === 1
+      if (powerFromEnt) {
+        item.pushSource = item.source
+      }
+      const buyerClass =
+        item?.buyerClass && item?.buyerClass !== '其它'
+          ? item?.buyerClass
+          : undefined
+      // 标签
+      item.tagList = [
+        area || '全国',
+        buyerClass,
+        item?.type || item?.subtype,
+        // 有中标金额取中标金额,没有取预算,预算没有置空
+        // eslint-disable-next-line prettier/prettier
+        item?.bidAmount ? formatMoney(item?.bidAmount - 0) : item?.budget ? formatMoney(item?.budget - 0)  : ''
+      ].filter((v) => v)
+
+      // 添加随机id
+      item.id = `${item._id}--${getRandomString(8).toLowerCase()}`
+      item.dateTime = item.publishTime ? item.publishTime * 1000 : ''
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.topimg {
+  width: 100%;
+  display: block;
+  // position: fixed;
+  // top: 0;
+  // left: 0;
+}
+.listContent {
+  // padding-top: 0.96rem;
+}
+</style>

Fișier diff suprimat deoarece este prea mare
+ 442 - 154
apps/mobile/src/views/tabbar/Subscribe.vue


Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff