Browse Source

Merge branch 'main' into feature/v1.0.88

yuelujie 6 months ago
parent
commit
302c85d67d

+ 12 - 1
apps/mobile/src/api/modules/public.js

@@ -228,6 +228,17 @@ export function setSubscribePageAreaPackTipClose() {
   })
 }
 
+/**
+ * 是否关注公众号接口
+ */
+export function getSubscribeStatus() {
+  return request({
+    url: '/publicapply/detail/checkSubscribe',
+    noToast: true,
+    method: 'get'
+  })
+}
+
 /**
  * 百度广告曝光接口
  */
@@ -381,6 +392,6 @@ export function getRecommend(data) {
   return request({
     url: envs.inWX ? '/member/getRecomKWs' : '/jyapp/member/getRecomKWs',
     method: 'post',
-    data: data
+    data
   })
 }

+ 36 - 34
apps/mobile/src/components/subscribe/RecommendedWords.vue

@@ -1,38 +1,38 @@
 <template>
   <div class="keywords-container">
     <div class="keywords-card">
-      <slot name="header"></slot>
+      <slot name="header" />
       <div class="flex flex-(wrap items-center) keywords-list">
         <div
-          class="flex flex-items-center selected-key-item"
           v-for="(item, index) in keywords.list"
           :key="index"
+          class="flex flex-items-center selected-key-item"
         >
           <span>{{ item }}</span>
-          <van-icon @click="onDeleteItem(item)" name="clear" />
+          <van-icon name="clear" @click="onDeleteItem(item)" />
         </div>
       </div>
       <div class="flex flex-items-center keywords-input">
         <van-field
-          class="keyword-field"
           v-model="keywords.input"
+          class="keyword-field"
           format-trigger="onBlur"
           maxlength="15"
           show-word-limit
           placeholder="请输入关键词"
           clearable
           @input="onKeywordInput"
-        ></van-field>
+        />
         <span class="add-action" @click="onAddKeyword">添加</span>
       </div>
     </div>
-    <div class="rec-card" v-show="isShowRecommend">
+    <div v-show="isShowRecommend" class="rec-card">
       <div class="flex flex-(items-center justify-between) rec-header">
         <div class="rec-title">相似订阅推荐</div>
         <div
+          v-show="recListState.listAll.length > recListState.pageSize"
           class="rec-change"
           @click="nextPageRec"
-          v-show="recListState.listAll.length > recListState.pageSize"
         >
           <!-- <van-icon :class="recListState.loading ? 'active' : ''" name="@/assets/image/icon/shuaxin.png"></van-icon> -->
           <img
@@ -48,9 +48,9 @@
       <div class="rec-content">
         <div class="rec-tags">
           <div
-            class="ellipsis tag"
             v-for="(item, index) in recListState.list"
             :key="index"
+            class="ellipsis tag"
             @click="clickTag(item)"
           >
             {{ item }}
@@ -63,15 +63,20 @@
 
 <script>
 import { Field, Icon } from 'vant'
+import { debounce } from 'lodash'
 import { getRecommend } from '@/api/modules'
 import { bSort } from '@/utils/utils'
-import { debounce } from 'lodash'
+
 export default {
   name: 'RecommendedWords',
   components: {
     [Field.name]: Field,
     [Icon.name]: Icon
   },
+  model: {
+    prop: 'value',
+    event: 'change'
+  },
   props: {
     vSwitch: {
       type: String,
@@ -86,10 +91,6 @@ export default {
       default: () => []
     }
   },
-  model: {
-    prop: 'value',
-    event: 'change'
-  },
   data() {
     return {
       keywords: {
@@ -107,15 +108,6 @@ export default {
       }
     }
   },
-  watch: {
-    value() {
-      this.keywords.list = this.value || []
-      this.getKeyRecommend()
-    },
-    'keywords.input'(val) {
-      // console.log(val, 'watch input')
-    }
-  },
   computed: {
     isShowRecommend() {
       return (
@@ -124,6 +116,15 @@ export default {
       )
     }
   },
+  watch: {
+    value() {
+      this.keywords.list = this.value || []
+      this.getKeyRecommend()
+    },
+    'keywords.input': function (val) {
+      // console.log(val, 'watch input')
+    }
+  },
   mounted() {
     this.getKeyRecommend()
   },
@@ -132,8 +133,9 @@ export default {
       if (
         !this.keywords.input.trim() ||
         this.keywords.list.length >= this.maxlength
-      )
+      ) {
         return
+      }
       const formatVal =
         this.vSwitch === 'f' || !this.vSwitch
           ? this.keywords.input.replace(/\s+/g, '')
@@ -169,19 +171,19 @@ export default {
         console.log('type error!')
         return
       }
-      var array = []
-      for (var i = 0; i < arr.length; i++) {
-        if (array.indexOf(arr[i]) === -1) {
+      const array = []
+      for (let i = 0; i < arr.length; i++) {
+        if (!array.includes(arr[i])) {
           array.push(arr[i])
         }
       }
       return array
     },
     getKeyRecommend(selected = this.value) {
-      var keysArr = []
+      const keysArr = []
       selected.forEach((item) => {
         if (item) {
-          if (item instanceof Array) {
+          if (Array.isArray(item)) {
             keysArr.push(item.join('+'))
           } else {
             keysArr.push(item)
@@ -197,7 +199,7 @@ export default {
       }
       getRecommend(params).then((res) => {
         this.recListState.loading = false
-        if (res && res instanceof Array && res.length !== 0) {
+        if (res && Array.isArray(res) && res.length !== 0) {
           this.loadKeyRecommend(res)
         }
       })
@@ -221,13 +223,13 @@ export default {
       const afterTile = []
 
       // 已订阅关键词数组
-      const allKeyArr = []
+      let allKeyArr = []
       const allKeyArrLower = []
 
       // 已订阅关键词的整理 -----
       // 将所有关键词整理到一个数组中
       this.value.forEach((item) => {
-        if (item instanceof Array) {
+        if (Array.isArray(item)) {
           allKeyArr = allKeyArr.concat(item)
         } else {
           allKeyArr.push(item)
@@ -321,12 +323,12 @@ export default {
     },
     // 手动赋值后 触发 input 事件(正常不会自动触发)
     changInputValue(inputDom, newText) {
-      let lastValue = inputDom.value // 获取输入框当前的值
+      const lastValue = inputDom.value // 获取输入框当前的值
       inputDom.value = newText // 设置新的值
-      let event = new Event('input', { bubbles: true }) // 创建输入事件
+      const event = new Event('input', { bubbles: true }) // 创建输入事件
       event.simulated = true
       // 处理 React 或 Arco Design 框架的输入值追踪
-      let tracker = inputDom._valueTracker
+      const tracker = inputDom._valueTracker
       if (tracker) {
         tracker.setValue(lastValue) // 如果存在追踪器,更新值
       }

+ 18 - 13
apps/mobile/src/composables/attachment-download/component/AttachmentDownload.vue

@@ -1,12 +1,12 @@
 <template>
-  <section class="attachment-download-container" v-if="renderAttachList.length">
+  <section v-if="renderAttachList.length" class="attachment-download-container">
     <div class="others-header flex flex-(items-center justify-between)">
       <div class="content-file-attachment-left flex flex-items-center">
         <span class="left-icon flex flex-items-center">
-          <span class="j-icon icon-data-download"></span>
+          <span class="j-icon icon-data-download" />
           <span class="file-attachment-text text-nowrap">附件下载</span>
         </span>
-        <div class="right-content flex flex-items-center" v-if="canShowTip">
+        <div v-if="canShowTip" class="right-content flex flex-items-center">
           <!-- 免费用户,无体验次数(没体验过) -->
           <template v-if="isFree && freeFileNum === 0">
             <span class="attachment-tag text-nowrap">
@@ -33,11 +33,11 @@
           </template>
         </div>
       </div>
-      <div class="content-file-attachment-actions" v-if="canShowTip">
+      <div v-if="canShowTip" class="content-file-attachment-actions">
         <span
+          v-if="isNewSuper && !memberHasAttachPower"
           class="action-button"
           @click="chargeFilePack"
-          v-if="isNewSuper && !memberHasAttachPower"
         >
           立即充值
         </span>
@@ -45,10 +45,10 @@
     </div>
     <div class="file-attachment-list">
       <div
-        class="file-attachment-item highlight-text underline clickable"
         v-for="(attach, index) in renderAttachList"
-        @click="startDownloadFile(attach)"
         :key="index"
+        class="file-attachment-item highlight-text underline clickable"
+        @click="startDownloadFile(attach)"
       >
         {{ attach.name }}
       </div>
@@ -57,14 +57,14 @@
       v-model="attachment.emailSendDialog"
       :email.sync="attachment.email"
       title="发送邮箱地址"
-      contentTipText="附件将以邮件的形式发送至您的邮箱"
-      :beforeClose="beforeEmailDialogClose"
+      content-tip-text="附件将以邮件的形式发送至您的邮箱"
+      :before-close="beforeEmailDialogClose"
     />
   </section>
 </template>
 
 <script>
-import { mapState, mapGetters } from 'vuex'
+import { mapGetters, mapState } from 'vuex'
 import { Icon } from 'vant'
 import { AppIcon } from '@/ui'
 import { useGetContentAttachment } from '@/composables/attachment-download/'
@@ -73,7 +73,8 @@ import { LINKS } from '@/data'
 import { openAppOrWxPage } from '@/utils/'
 import { emailRegExp } from '@/utils/constant/'
 import { attachmentSendToEmail } from '@/api/modules/bigmember'
-import { downLoadFile, compareVersion } from '@/utils/callFn'
+import { compareVersion, downLoadFile } from '@/utils/callFn'
+import downloadApp from '@/utils/mixins/modules/to-download-app'
 
 export default {
   name: 'AttachmentDownload',
@@ -82,6 +83,7 @@ export default {
     EmailDialog,
     [Icon.name]: Icon
   },
+  mixins: [downloadApp],
   props: {
     customSkip: {
       type: Boolean,
@@ -187,7 +189,7 @@ export default {
       return this.power.viper && this.isSuper
     },
     memberHasAttachPower() {
-      return this.isMember && this.bigMemberPower.indexOf(3) !== -1
+      return this.isMember && this.bigMemberPower.includes(3)
     },
     renderAttachList() {
       const { inApp, inIos } = this.$envs
@@ -198,7 +200,7 @@ export default {
         }
         return {
           name: a.fileName,
-          size: size,
+          size,
           type: a.fileType
         }
       })
@@ -245,6 +247,9 @@ export default {
       })
     },
     async startDownloadFile(file) {
+      if (this.$envs.inWxMini) {
+        return this.toFollowGuidePage()
+      }
       // 定制化用户直接下载
       if (this.IsCustomTopNet) {
         return this.downloadFile(file)

+ 1 - 1
apps/mobile/src/data/links.js

@@ -7,7 +7,7 @@
 export const LINKS = {
   下载APP: {
     app: '',
-    h5: 'https://wx.jianyu360.cn/front/downloadapppage/normal', // 需要参数 ?source=H5 / source=WX
+    h5: 'https://h5.jianyu360.cn/front/downloadapppage/normal', // 需要参数 ?source=H5 / source=WX
     wx: 'https://wx.jianyu360.cn/front/downloadapppage/normal'
   },
   客服: {

+ 9 - 0
apps/mobile/src/router/modules/static.js

@@ -8,6 +8,15 @@ export default [
       title: '引导页'
     }
   },
+  {
+    path: '/follow_guide',
+    name: 'follow_guide',
+    component: () => import('@/views/static/FollowGuide.vue'),
+    meta: {
+      header: true,
+      title: '关注公众号'
+    }
+  },
   {
     path: '/open_in_browser',
     name: 'open_in_browser',

+ 19 - 0
apps/mobile/src/utils/mixins/modules/to-download-app.js

@@ -0,0 +1,19 @@
+/* eslint-disable no-undef */
+import { openLinkOfOther } from '@/utils'
+import { LINKS } from '@/data'
+
+export default {
+  methods: {
+    toFollowGuidePage() {
+      try {
+        wx.miniProgram.navigateTo({
+          url: '/pages/guide/download'
+        })
+      }
+      catch (error) {
+        openLinkOfOther(LINKS.下载APP.h5)
+        console.error(error)
+      }
+    }
+  }
+}

+ 13 - 5
apps/mobile/src/views/article/components/DownProjectReport.vue

@@ -1,6 +1,6 @@
 <template>
   <TabActionItem
-    showText
+    show-text
     :direction="direction"
     class="download-project-doc"
     @click.native.stop="doAction"
@@ -11,20 +11,22 @@
         v-model="dialog.show"
         :email.sync="dialog.email"
         title="发送邮箱地址"
-        contentTipText="项目报告文件将以邮件的形式发送至您的邮箱"
-        :beforeClose="beforeEmailDialogClose"
+        content-tip-text="项目报告文件将以邮件的形式发送至您的邮箱"
+        :before-close="beforeEmailDialogClose"
       />
       <span>下载项目报告</span>
     </template>
   </TabActionItem>
 </template>
+
 <script>
+import { mapGetters } from 'vuex'
 import TabActionItem from '@/views/article/ui/TabActionItem.vue'
 import { AppIcon } from '@/ui'
 import { getProjectReport, sendProjectPdfFile } from '@/api/modules/'
-import { mapGetters } from 'vuex'
 import EmailDialog from '@/components/common/EmailDialog.vue'
 import { emailRegExp } from '@/utils/constant/'
+import downloadApp from '@/utils/mixins/modules/to-download-app'
 
 export default {
   name: 'DownloadProjectReport',
@@ -33,6 +35,7 @@ export default {
     EmailDialog,
     AppIcon
   },
+  mixins: [downloadApp],
   props: {
     id: {
       type: String,
@@ -79,6 +82,10 @@ export default {
         return this.goToSvipBuy()
       }
 
+      if (this.$envs.inWxMini) {
+        return this.toFollowGuidePage()
+      }
+
       if (this.link) {
         return this.downFile(this.name, this.link)
       }
@@ -153,7 +160,8 @@ export default {
         downurl: fileUrl,
         email
       }
-      const { error_msg: msg, error_code: code } = await sendProjectPdfFile(params)
+      const { error_msg: msg, error_code: code } =
+        await sendProjectPdfFile(params)
       if (code === 0) {
         done && done()
         // this.$toast(`已发送至 ${email}`)

+ 30 - 0
apps/mobile/src/views/article/content.vue

@@ -524,6 +524,36 @@ export default {
         keywords,
         description
       })
+      this.setAMiniProgramShareTitle(title)
+    },
+    setAMiniProgramShareTitle(title) {
+      // if (!this.$envs.inWxMini) return
+      let subType = ''
+      try {
+        subType = this.content?._ob?.subType
+      } catch (error) {
+        console.log(error)
+      }
+      let prefix = ''
+      if (subType) {
+        prefix = `【${subType}】`
+      }
+      const newTitle = prefix + title
+      this.postMessageToMiniProgram(newTitle)
+    },
+    postMessageToMiniProgram(title) {
+      try {
+        wx.miniProgram.postMessage({
+          data: {
+            post: 'share',
+            type: 'common',
+            desc: '标讯详情',
+            title
+          }
+        })
+      } catch (e) {
+        console.log(e)
+      }
     },
     getParams() {
       const { params } = this.$route

+ 96 - 92
apps/mobile/src/views/invoice/viewInvoice.vue

@@ -1,23 +1,21 @@
 <template>
   <div class="Invoicing">
     <div class="header">
-      <p class="rightBtn" @click="tipShow = true" v-if="!$envs.inApp">
+      <p v-if="!$envs.inApp" class="rightBtn" @click="tipShow = true">
         开票规则
       </p>
-      <invoiceList
-        :list="invoiceList"
-        @change="invoiceChange"
+      <InvoiceList
         v-if="invoiceList.length > 1"
         ref="invoice_list"
-      >
-      </invoiceList>
-      <invoiceProgress
+        :list="invoiceList"
+        @change="invoiceChange"
+      />
+      <InvoiceProgress
         v-if="status !== -1 && status !== -2"
         :active="status | statusFilter"
         :steps="steps"
-      >
-      </invoiceProgress>
-      <invoiceErr :desc="errdesc" v-if="status === -1"></invoiceErr>
+      />
+      <InvoiceErr v-if="status === -1" :desc="errdesc" />
     </div>
     <div class="j-body">
       <div class="j-content">
@@ -29,7 +27,7 @@
           type="textarea"
           rows="1"
           autosize
-        ></van-field>
+        />
         <van-field
           :value="infoMap.type | typeFilter"
           label="发票类型:"
@@ -37,13 +35,9 @@
           type="textarea"
           rows="1"
           autosize
-        ></van-field>
+        />
 
-        <van-field
-          v-model.trim="infoMap.content"
-          label="发票内容:"
-          readonly
-        ></van-field>
+        <van-field v-model.trim="infoMap.content" label="发票内容:" readonly />
 
         <van-field
           :value="infoMap.invoiceHeader | invoiceHeaderFilter"
@@ -52,150 +46,151 @@
           type="textarea"
           rows="1"
           autosize
-        ></van-field>
+        />
 
         <van-field
+          v-if="showModule.company"
           v-model.trim="infoMap.company"
           label="公司名称:"
           maxlength="50"
           :required="requireds.company"
-          v-if="showModule.company"
           type="textarea"
           rows="1"
           autosize
           readonly
-        ></van-field>
+        />
 
         <van-field
+          v-if="showModule.dutyparagraph"
           v-model.trim="infoMap.dutyparagraph"
           label="单位税号:"
           :required="requireds.dutyparagraph"
-          v-if="showModule.dutyparagraph"
           type="textarea"
           rows="1"
           autosize
           readonly
-        ></van-field>
+        />
 
         <van-field
+          v-if="showModule.unitAddress"
           v-model.trim="infoMap.unitAddress"
           label="单位地址:"
           :required="requireds.unitAddress"
-          v-if="showModule.unitAddress"
           type="textarea"
           rows="1"
           autosize
           readonly
-        ></van-field>
+        />
 
         <van-field
+          v-if="showModule.tel"
           v-model.trim="infoMap.tel"
           label="电话号码:"
           :required="requireds.tel"
-          v-if="showModule.tel"
           readonly
-        ></van-field>
+        />
 
         <van-field
+          v-if="showModule.bank"
           v-model.trim="infoMap.bank"
           label="开户银行:"
           :required="requireds.bank"
-          v-if="showModule.bank"
           type="textarea"
           rows="1"
           autosize
           readonly
-        ></van-field>
+        />
 
         <van-field
+          v-if="showModule.bankCode"
           v-model.trim="infoMap.bankCode"
           label="银行账号:"
           :required="requireds.bankCode"
-          v-if="showModule.bankCode"
           type="textarea"
           rows="1"
           autosize
           readonly
-        ></van-field>
+        />
       </div>
       <div class="j-content">
         <van-field
+          v-if="showModule.desc"
           v-model.trim="infoMap.desc"
           label="开票备注:"
           :required="requireds.desc"
-          v-if="showModule.desc"
           type="textarea"
           rows="1"
           autosize
           readonly
-        ></van-field>
+        />
       </div>
       <div class="j-content">
         <van-field
+          v-if="showModule.name"
           v-model.trim="infoMap.name"
           label="收件人:"
           :required="requireds.name"
-          v-if="showModule.name"
           readonly
-        ></van-field>
+        />
 
         <van-field
           v-model.trim="infoMap.phone"
           label="联系电话:"
           :required="requireds.phone"
           readonly
-        ></van-field>
+        />
 
         <van-field
+          v-if="showModule.deliveryAddress"
           v-model.trim="infoMap.deliveryAddress"
           label="收件地址:"
           :required="requireds.deliveryAddress"
           type="textarea"
           rows="1"
           autosize
-          v-if="showModule.deliveryAddress"
           readonly
-        ></van-field>
+        />
 
         <van-field
+          v-if="showModule.email"
           v-model.trim="infoMap.email"
           label="电子邮箱:"
           :required="requireds.email"
           type="textarea"
           rows="1"
           autosize
-          v-if="showModule.email"
           readonly
-        ></van-field>
+        />
       </div>
     </div>
     <div class="j-bottom">
-      <p class="b-desc" v-if="desc">{{ desc }}</p>
+      <p v-if="desc" class="b-desc">
+        {{ desc }}
+      </p>
       <div class="j-button-group">
         <button
-          v-if="!(!this.url && btntext === '查看发票')"
-          :class="{ 'j-button-confirm': true }"
-          @click="confirm_ok"
+          v-if="!(!url && btntext === '查看发票')"
+          class="j-button-confirm"
           :disabled="btntext === '开票中'"
+          @click="confirm_ok"
         >
           {{ btntext }}
         </button>
         <button
-          :class="{ 'j-button-confirm': true, grey: true }"
-          @click="Replace"
           v-if="Secondbtn === '换开申请'"
+          class="j-button-confirm grey"
           style="margin-left: 13px"
+          @click="Replace"
         >
           {{ Secondbtn }}
         </button>
       </div>
     </div>
-    <popupTip
+    <PopupTip
       v-model="tipShow"
       text="开票规则:<br>1.平台提供电子普通发票、电子专用发票,发票内容为可选“信息技术服务-技术服务费”、“信息技术服务-会员费”、“信息技术服务-招投标数据服务”;<br>2.您申请的电子发票将在3个工作日内由平台开具并发送至您的邮箱,请注意查收;<br>3.电子发票共有3种格式:PDF、OFD、XML,手机端查看发票默认为PDF格式,如需OFD、XML格式,您可前往邮箱或剑鱼标讯电脑端查看发票并下载;<br>4.如有问题可联系客服,客服电话:400-108-6670。"
-    >
-    </popupTip>
-    <popupTip v-model="logisticsShow">
+    />
+    <PopupTip v-model="logisticsShow">
       <div class="logistics">
         <div class="logistics_title">查看物流</div>
         <div class="logistics_content">
@@ -212,31 +207,62 @@
           </div>
         </div>
       </div>
-    </popupTip>
+    </PopupTip>
   </div>
 </template>
+
 <script>
+import { Button, Field, Icon } from 'vant'
 import EventBus from '@/utils/eventBus'
 import { ajaxInvoiceQuery, ajaxInvoiceShowList } from '@/api/modules'
 import { copyText, openAppOrWxPage, toWxGzhProfile } from '@/utils/'
 import { androidOrIOS } from '@/utils/prototype/modules/platform'
 import { LINKS } from '@/data'
-import { Field, Icon, Button } from 'vant'
 import popupTip from '@/components/invoice/popupTip'
 import invoiceList from '@/components/invoice/invoiceList'
 import invoiceErr from '@/components/invoice/invoiceErr'
 import invoiceProgress from '@/views/order/components/dataexport/DataExportProgress'
+import downloadApp from '@/utils/mixins/modules/to-download-app'
+
 export default {
-  name: 'viewInvoice',
+  name: 'ViewInvoice',
   components: {
     [Field.name]: Field,
     [Icon.name]: Icon,
     [Button.name]: Button,
-    popupTip,
-    invoiceProgress,
-    invoiceList,
-    invoiceErr
+    PopupTip: popupTip,
+    InvoiceProgress: invoiceProgress,
+    InvoiceList: invoiceList,
+    InvoiceErr: invoiceErr
   },
+  filters: {
+    invoiceHeaderFilter(val) {
+      if (val === '1') {
+        return '个人'
+      } else if (val === '2') {
+        return '单位'
+      }
+    },
+    typeFilter(val) {
+      if (val === '1') {
+        return '电子普通发票'
+      } else if (val === '2') {
+        return '电子专用发票'
+      } else if (val === '3') {
+        return '纸质普通发票'
+      } else if (val === '4') {
+        return '纸质专用发票'
+      }
+    },
+    statusFilter(val) {
+      if (val === 0) {
+        return 2
+      } else if (val === 1) {
+        return 3
+      }
+    }
+  },
+  mixins: [downloadApp],
   data() {
     return {
       steps: [
@@ -401,33 +427,6 @@ export default {
       }
     }
   },
-  filters: {
-    invoiceHeaderFilter(val) {
-      if (val === '1') {
-        return '个人'
-      } else if (val === '2') {
-        return '单位'
-      }
-    },
-    typeFilter(val) {
-      if (val === '1') {
-        return '电子普通发票'
-      } else if (val === '2') {
-        return '电子专用发票'
-      } else if (val === '3') {
-        return '纸质普通发票'
-      } else if (val === '4') {
-        return '纸质专用发票'
-      }
-    },
-    statusFilter(val) {
-      if (val === 0) {
-        return 2
-      } else if (val === 1) {
-        return 3
-      }
-    }
-  },
   created() {
     this.initData()
   },
@@ -446,12 +445,12 @@ export default {
   },
   methods: {
     initData() {
-      let { onlyIdentifying, invoiceMoney, operator, order_code } =
+      const { onlyIdentifying, invoiceMoney, operator, order_code } =
         this.$route.query
-      this.onlyIdentifying = onlyIdentifying ? onlyIdentifying : ''
-      this.invoiceMoney = invoiceMoney ? invoiceMoney : ''
-      this.operator = operator ? operator : ''
-      this.order_code = order_code ? order_code : ''
+      this.onlyIdentifying = onlyIdentifying || ''
+      this.invoiceMoney = invoiceMoney || ''
+      this.operator = operator || ''
+      this.order_code = order_code || ''
       if (this.enterSource === 'qrcode') {
         this.urlparms = {
           onlyIdentifying: this.onlyIdentifying,
@@ -580,6 +579,8 @@ export default {
         } else {
           const href = new URL(this.url)
           const path = href.pathname
+          const myHost = href.hostname?.includes('jianyu360')
+          const seeLink = myHost ? path : this.url
           // 非app内打开
           if (
             this.infoMap.type === '2' ||
@@ -587,12 +588,15 @@ export default {
               this.infoMap.price >= 10000 &&
               this.enterSource === 'qrcode')
           ) {
-            //扫码入口且金额大于10000
-            window.open(path)
+            // 扫码入口且金额大于10000
+            window.open(seeLink)
           } else {
             // 我的订单入口
             if (androidOrIOS() === 'ios') {
-              window.open(path)
+              if (this.$envs.inWxMini) {
+                return this.toFollowGuidePage()
+              }
+              window.open(seeLink)
             } else {
               const eleLink = document.createElement('a') // 新建A标签
               eleLink.href = this.url // 下载的路径
@@ -629,7 +633,7 @@ export default {
       }
     },
     Replace() {
-      //换开
+      // 换开
       if (!this.redInvoiceSwitch && this.enterSource === 'myorder') {
         this.$dialog
           .confirm({

+ 79 - 66
apps/mobile/src/views/push/PushSetting.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="push-setting" ref="pushBox">
+  <div ref="pushBox" class="push-setting">
     <div class="push-module">
       <div class="push-module-title">
         <img src="@/assets/image/icon/wayForSend.png" alt="" />
@@ -7,12 +7,12 @@
       </div>
       <van-cell-group>
         <van-cell
-          @click="setMailEvent"
           class="email-cell"
           :class="{ emailbind: mailWay.isFollow }"
           is-link
           :value="mailWay.value"
           :label="mailWay.email"
+          @click="setMailEvent"
         >
           <template #title>
             <div class="email_title">
@@ -23,23 +23,23 @@
         </van-cell>
         <van-cell
           class="wx_cell"
-          @click="setWxEvent"
           :is-link="!wxWay.isFollow"
           :class="{ wxValue: wxWay.isFollow, wxBind: wxWay.isBind }"
           title="微信提醒"
           label="根据设置的推送时间通过微信公众号发送消息"
+          @click="setWxEvent"
         >
           <template #extra>
-            <span class="van-cell__value" v-html="wxWay.value"></span>
+            <span class="van-cell__value" v-html="wxWay.value" />
           </template>
         </van-cell>
         <van-cell
-          @click="setAppEvent"
           is-link
           title="APP提醒总开关"
           :value="appWay.value"
           :label="appWay.label"
-        ></van-cell>
+          @click="setAppEvent"
+        />
       </van-cell-group>
     </div>
     <div class="push-module">
@@ -49,19 +49,23 @@
       </div>
       <van-collapse v-model="activeName">
         <van-collapse-item
-          :border="false"
-          :name="index"
           v-for="(item, index) in pushFunction"
           :key="index"
+          :border="false"
+          :name="index"
         >
           <template #title>
-            <div class="collapse_title">{{ item.title }}</div>
-            <div class="collapse_label">{{ item.label }}</div>
+            <div class="collapse_title">
+              {{ item.title }}
+            </div>
+            <div class="collapse_label">
+              {{ item.label }}
+            </div>
           </template>
-          <div class="noMessage" v-if="item.title === '我的订阅'">
+          <div v-if="item.title === '我的订阅'" class="noMessage">
             <div class="left_">
               <div class="title">推荐消息提醒</div>
-              <div class="warm" @click.stop="PopupBox"></div>
+              <div class="warm" @click.stop="PopupBox" />
               <div class="states">
                 {{ item.i_nomsgtip ? '已开启' : '已关闭' }}
               </div>
@@ -73,57 +77,59 @@
               {{ !item.i_nomsgtip ? '点击开启' : '点击关闭' }}
             </div>
           </div>
-          <div class="collapse_content" v-if="item.title === '消息'">
-            <div class="msg_list" v-for="iitem in item.content" :key="iitem.id">
-              <div class="msg_list_title">{{ iitem.title }}</div>
+          <div v-if="item.title === '消息'" class="collapse_content">
+            <div v-for="iitem in item.content" :key="iitem.id" class="msg_list">
+              <div class="msg_list_title">
+                {{ iitem.title }}
+              </div>
               <div class="msg_list_switch switch_list">
-                <div class="list_way" v-if="iitem.isWxShow">
+                <div v-if="iitem.isWxShow" class="list_way">
                   <span>微信提醒</span>
                   <van-switch
-                    @change="ChangeEvent(item, 'wx', iitem)"
                     v-model="iitem.i_wxpush"
+                    @change="ChangeEvent(item, 'wx', iitem)"
                   />
                 </div>
-                <div class="list_way" v-if="showApp">
+                <div v-if="showApp" class="list_way">
                   <span>APP提醒</span>
                   <van-switch
-                    @change="ChangeEvent(item, 'app', iitem)"
                     v-model="iitem.i_apppush"
+                    @change="ChangeEvent(item, 'app', iitem)"
                   />
                 </div>
               </div>
             </div>
           </div>
-          <div class="collapse_content" v-else>
+          <div v-else class="collapse_content">
             <div class="switch_list">
-              <div class="list_way" v-if="item.isMailShow">
+              <div v-if="item.isMailShow" class="list_way">
                 <span>邮件提醒</span>
                 <van-switch
-                  @change="ChangeEvent(item, 'mail')"
                   v-model="item.i_mailpush"
+                  @change="ChangeEvent(item, 'mail')"
                 />
               </div>
-              <div class="list_way" v-if="item.isWxShow">
+              <div v-if="item.isWxShow" class="list_way">
                 <span>微信提醒</span>
                 <van-switch
-                  @change="ChangeEvent(item, 'wx')"
                   v-model="item.i_wxpush"
+                  @change="ChangeEvent(item, 'wx')"
                 />
               </div>
-              <div class="list_way" v-if="showApp">
+              <div v-if="showApp" class="list_way">
                 <span>APP提醒</span>
                 <van-switch
-                  @change="ChangeEvent(item, 'app')"
                   v-model="item.i_apppush"
+                  @change="ChangeEvent(item, 'app')"
                 />
               </div>
             </div>
             <div
-              class="set-push-time"
               v-if="
                 needEditTimesType.indexOf(item.param) > -1 &&
                 editResultTime[item.param]
               "
+              class="set-push-time"
             >
               <div class="push-time-left">
                 <span>推送时间:</span>
@@ -146,7 +152,7 @@
                   }}</span>
                 </span>
               </div>
-              <div @click="editTimeEvent(item)" class="push-time-right">
+              <div class="push-time-right" @click="editTimeEvent(item)">
                 编辑
               </div>
             </div>
@@ -170,10 +176,10 @@
           </template>
           <template #right-icon>
             <van-switch
-              @change="setInterestedEvent"
-              :class="{ active: recSwitch }"
               v-model="recSwitch"
-            ></van-switch>
+              :class="{ active: recSwitch }"
+              @change="setInterestedEvent"
+            />
           </template>
         </van-cell>
       </van-cell-group>
@@ -191,18 +197,18 @@
         "
         @closeIconClick="closePopup"
       >
-        <div class="select_push_time" slot="default">
+        <div slot="default" class="select_push_time">
           <van-cell-group>
             <van-cell
+              v-for="item in pushCycle"
+              :key="item.id"
               :class="
                 item.id === 2 && selectTimeSlot.length !== 0
                   ? `dayPush ${getHaveLine}`
                   : ''
               "
-              @click="setPushTime(item)"
               :title="item.title"
-              v-for="item in pushCycle"
-              :key="item.id"
+              @click="setPushTime(item)"
             >
               <template #right-icon>
                 <div class="select_right">
@@ -215,15 +221,15 @@
                   <van-icon v-if="item.id === 2" name="arrow" color="#9B9CA3" />
                 </div>
               </template>
-              <template #label v-if="item.id === 2">
+              <template v-if="item.id === 2" #label>
                 <div class="show-time-main">
-                  <div class="time-list" v-for="v in selectTimeSlot" :key="v">
+                  <div v-for="v in selectTimeSlot" :key="v" class="time-list">
                     <span v-if="v < 10">0{{ v }}:00</span>
                     <span v-if="v >= 10">{{ v }}:00</span>
                     <van-icon
-                      @click.stop="deleteTimeEvent(v)"
                       name="clear"
                       color="#2ABED1"
+                      @click.stop="deleteTimeEvent(v)"
                     />
                   </div>
                 </div>
@@ -231,7 +237,7 @@
             </van-cell>
           </van-cell-group>
         </div>
-        <div class="select_push_footer" slot="footer">
+        <div slot="footer" class="select_push_footer">
           <button @click="setTimeCancel">取消</button>
           <button @click="setTimeConfirm">确认</button>
         </div>
@@ -245,13 +251,13 @@
       get-container="body"
     >
       <PopupLayout title="选择时间" @closeIconClick="closeTimeListPopup">
-        <div class="select_push_time_list" slot="default">
+        <div slot="default" class="select_push_time_list">
           <div
-            @click="setTimeSlot(item)"
-            :class="{ active: item.active }"
-            class="time-btn"
             v-for="item in timeList"
             :key="item.time"
+            :class="{ active: item.active }"
+            class="time-btn"
+            @click="setTimeSlot(item)"
           >
             <span v-if="item.time < 10">0{{ item.time }}:00</span>
             <span v-if="item.time >= 10">{{ item.time }}:00</span>
@@ -263,7 +269,7 @@
             />
           </div>
         </div>
-        <div class="select_push_footer" slot="footer">
+        <div slot="footer" class="select_push_footer">
           <button @click="setTimeSlotCancel">取消</button>
           <button :disabled="isShowBtn" @click="setTimeSlotConfirm">
             确认
@@ -272,7 +278,7 @@
       </PopupLayout>
     </van-popup>
     <Dialog
-      :confirmButtonDisabled="confirmDisabled"
+      :confirm-button-disabled="confirmDisabled"
       title="绑定邮箱地址"
       :show-dialog="mailWay.mailDialog"
       @cancel="mailCancel"
@@ -280,18 +286,18 @@
     >
       <van-field
         slot="content"
-        @input="setEmailRule"
-        class="attachment-email-input"
         v-model="mailWay.filedEmail"
+        class="attachment-email-input"
         placeholder="输入邮箱地址"
+        @input="setEmailRule"
       />
     </Dialog>
     <Dialog
       :title="dparam.setTitle"
       :show-dialog="dparam.setDialog"
+      :confirm-button-text="dparam.confirmButtonText"
       @cancel="cancel"
       @confirm="confirm"
-      :confirmButtonText="dparam.confirmButtonText"
     >
       <p v-if="dparam.showTextP === 1" slot="content">
         您尚未关注微信公众号,无法开启微信提醒,建议您前往关注后再开启。
@@ -315,30 +321,33 @@
     </Dialog>
   </div>
 </template>
+
 <script>
 import {
-  CellGroup,
   Cell,
+  CellGroup,
   Collapse,
   CollapseItem,
-  Switch,
   Field,
+  Icon,
   Popup,
-  Icon
+  Switch
 } from 'vant'
+import { mapState } from 'vuex'
 import {
-  getUser,
+  getMergeInfo,
   getPushSet,
+  getUser,
   setPushSet,
-  setUser,
-  getMergeInfo
+  setUser
 } from '@/api/modules'
 import { openSystemNotification } from '@/utils/callFn/appFn'
 import Dialog from '@/components/common/Dialog.vue'
 import PopupLayout from '@/components/common/PopupLayout.vue'
-import { mapState } from 'vuex'
+import downloadApp from '@/utils/mixins/modules/to-download-app'
+
 export default {
-  name: 'push-setting',
+  name: 'PushSetting',
   components: {
     [CellGroup.name]: CellGroup,
     [Cell.name]: Cell,
@@ -351,6 +360,7 @@ export default {
     Dialog,
     PopupLayout
   },
+  mixins: [downloadApp],
   data() {
     return {
       confirmDisabled: false,
@@ -600,12 +610,12 @@ export default {
     },
     // 判断每日推送高度
     getHaveLine() {
-      let num = parseInt(this.selectTimeSlot.length / 3)
-      const remain = parseInt(this.selectTimeSlot.length % 3)
+      let num = Number.parseInt(this.selectTimeSlot.length / 3)
+      const remain = Number.parseInt(this.selectTimeSlot.length % 3)
       if (remain !== 0) {
         num++
       }
-      return 'line_' + num
+      return `line_${num}`
     },
     isShowBtn() {
       return (
@@ -683,7 +693,7 @@ export default {
         }
         this.timeList.forEach((item, index) => {
           item.active = false
-          if (this.selectTimeSlot.indexOf(item.time) > -1) {
+          if (this.selectTimeSlot.includes(item.time)) {
             item.active = true
           }
         })
@@ -740,7 +750,7 @@ export default {
       const param = {
         item: this.editTimesFlag || 'o_subset',
         setType: 'a_times',
-        ratemode: ratemode
+        ratemode
       }
       if (ratemode === 2) {
         const timeArr = []
@@ -789,7 +799,7 @@ export default {
             if (data[v.param]) {
               // 可编辑推送时间段
               if (
-                this.needEditTimesType.indexOf(v.param) > -1 &&
+                this.needEditTimesType.includes(v.param) &&
                 this.editResultTime[v.param]
               ) {
                 if (v.param === 'o_subset') {
@@ -935,7 +945,7 @@ export default {
       const newArr = []
       arr.forEach((v) => {
         v = v.slice(0, 2)
-        v = parseInt(v, 10)
+        v = Number.parseInt(v, 10)
         newArr.push(v)
       })
       return newArr
@@ -1045,7 +1055,8 @@ export default {
     PopupBox() {
       this.$dialog.confirm({
         title: '推荐消息提醒',
-        message: '根据您在平台的订阅词/搜索词/浏览标讯进行联想推荐,剑鱼标讯智能推荐为您推送新的标讯信息。',
+        message:
+          '根据您在平台的订阅词/搜索词/浏览标讯进行联想推荐,剑鱼标讯智能推荐为您推送新的标讯信息。',
         className: 'j-confirm-dialog',
         messageAlign: 'left',
         showCancelButton: false,
@@ -1080,8 +1091,7 @@ export default {
     },
     // 校验邮箱规则
     setEmailRule(value) {
-      const reg =
-        /^[a-zA-Z0-9]+([-_.][A-Za-zd]+)*@([a-zA-Z0-9]+[-.])+[A-Za-zd]{2,5}$/
+      const reg = /^[a-z0-9]+([-_.][A-Z]+)*@([a-z0-9]+[-.])+[A-Z]{2,5}$/i
       if (!reg.test(value)) {
         this.confirmDisabled = true
       } else {
@@ -1107,6 +1117,9 @@ export default {
     },
     // app提醒
     setAppEvent() {
+      if (this.$envs.inWxMini) {
+        return this.toFollowGuidePage()
+      }
       if (this.$env.platform === 'app') {
         // 实现轮询
         this.timer = window.setInterval(() => {

+ 50 - 42
apps/mobile/src/views/reportAnalysis/reportDownload.vue

@@ -5,7 +5,7 @@
       <div class="desc">注:请在有效期内使用,过期清零,不可转赠。</div>
       <div class="box_content">
         <div class="item">
-          <div class="line green"></div>
+          <div class="line green" />
           <div class="btnGroup">
             <div class="left">
               <span class="count">{{ winner.total }}</span>
@@ -13,7 +13,7 @@
               <span class="textbtn" @click="goDetail('企业中标分析报告')"
                 >查明细</span
               >
-              <span class="texticon"></span>
+              <span class="texticon" />
             </div>
             <div class="right" @click="rechargeNow('企业中标分析报告')">
               立即充值
@@ -21,13 +21,13 @@
           </div>
           <div class="textGroup">
             <div class="left">企业中标分析报告下载余额</div>
-            <div class="right" v-if="winner.minEndTime">
+            <div v-if="winner.minEndTime" class="right">
               最近有效期至:{{ winner.minEndTime }}
             </div>
           </div>
         </div>
         <div class="item">
-          <div class="line yellow"></div>
+          <div class="line yellow" />
           <div class="btnGroup">
             <div class="left">
               <span class="count">{{ buyer.total }}</span>
@@ -35,7 +35,7 @@
               <span class="textbtn" @click="goDetail('业主采购分析报告')"
                 >查明细</span
               >
-              <span class="texticon"></span>
+              <span class="texticon" />
             </div>
             <div class="right" @click="rechargeNow('业主采购分析报告')">
               立即充值
@@ -43,13 +43,13 @@
           </div>
           <div class="textGroup">
             <div class="left">业主采购分析报告下载余额</div>
-            <div class="right" v-if="buyer.minEndTime">
+            <div v-if="buyer.minEndTime" class="right">
               最近有效期至:{{ buyer.minEndTime }}
             </div>
           </div>
         </div>
         <div class="item">
-          <div class="line blue"></div>
+          <div class="line blue" />
           <div class="btnGroup">
             <div class="left">
               <span class="count">{{ market.total }}</span>
@@ -57,7 +57,7 @@
               <span class="textbtn" @click="goDetail('市场分析定制报告')"
                 >查明细</span
               >
-              <span class="texticon"></span>
+              <span class="texticon" />
             </div>
             <div class="right" @click="rechargeNow('市场分析定制报告')">
               立即充值
@@ -65,7 +65,7 @@
           </div>
           <div class="textGroup">
             <div class="left">市场分析定制报告下载余额</div>
-            <div class="right" v-if="market.minEndTime">
+            <div v-if="market.minEndTime" class="right">
               最近有效期至:{{ market.minEndTime }}
             </div>
           </div>
@@ -75,26 +75,26 @@
         <div class="title">报告下载记录</div>
         <div class="list_box">
           <van-list
+            ref="vanList"
             v-model="list.loading"
             :finished="list.finished"
             :offset="list.offset"
-            @load="onLoad"
             class="more-list"
-            ref="vanList"
+            @load="onLoad"
           >
-            <listItem
+            <ListItem
+              v-for="(item, index) in list.value"
+              :key="index"
               :data="item"
               :tagclass="item.type | colorFilter"
               @download="download"
               @titleClick="titleClick"
-              v-for="(item, index) in list.value"
-              :key="index"
-            ></listItem>
+            />
           </van-list>
-          <empty
-            @btnclick="viewReport"
+          <Empty
             v-if="list.value.length === 0 && list.loaded"
-          ></empty>
+            @btnclick="viewReport"
+          />
         </div>
       </div>
     </div>
@@ -108,8 +108,8 @@
       <div class="attachment-content">
         <div class="attachment-tip-text">附件将以邮件的形式发送至您的邮箱</div>
         <van-field
-          class="attachment-email-input"
           v-model="attachment.email"
+          class="attachment-email-input"
           placeholder="输入邮箱地址"
         />
       </div>
@@ -118,28 +118,31 @@
 </template>
 
 <script>
+import { mapGetters } from 'vuex'
+import { Field, List } from 'vant'
 import empty from './components/empty.vue'
 import listItem from './components/listItem.vue'
 import { compareVersion } from '@/utils/callFn/index.js'
 import { appDownLoadFile } from '@/utils/callFn/appFn.js'
 import { dateFormatter, openLinkOfOther } from '@/utils/'
-import { mapGetters } from 'vuex'
+import downloadApp from '@/utils/mixins/modules/to-download-app'
 import {
-  pdfSendEmail,
   getPdfEmail,
   getPdfList,
+  pdfSendEmail,
   pdfaccount
 } from '@/api/modules'
 import { emailRegExp } from '@/utils/constant/'
-import { List, Field } from 'vant'
+
 export default {
-  name: 'reportDownload',
+  name: 'ReportDownload',
   components: {
     [List.name]: List,
     [Field.name]: Field,
-    listItem,
-    empty
+    ListItem: listItem,
+    Empty: empty
   },
+  mixins: [downloadApp],
   data() {
     return {
       market: {},
@@ -244,13 +247,14 @@ export default {
       this.$router.push({
         path: '/reportanalysis/reportdownloadDetails',
         query: {
-          title: type + '下载余额明细',
-          type: type
+          title: `${type}下载余额明细`,
+          type
         }
       })
     },
     titleClick(item) {
-      if (item.type === '1') { // 企业画像
+      if (item.type === '1') {
+        // 企业画像
         const url = this.$envs.inWX
           ? '/weixin/frontPage/collection/sess/ent_portrait'
           : '/jyapp/big/page/ent_portrait'
@@ -259,24 +263,24 @@ export default {
             eId: item.ent
           }
         })
-      } else { // 采购单位画像
+      } else {
+        // 采购单位画像
         // 跳转页面
         let goLink = ''
         if (this.$envs.inWX) {
-          goLink =
-            '/big/wx/page/unit_portrayal?entName=' +
-            encodeURIComponent(item.entName)
+          goLink = `/big/wx/page/unit_portrayal?entName=${encodeURIComponent(
+            item.entName
+          )}`
         } else {
           // 新商机管理采购单位画像
           if (this.isNewBusiness) {
-            goLink =
-              '/jyapp/big/page/client_portrayal?entName=' +
-              encodeURIComponent(item.entName) +
-              '&from=client'
+            goLink = `/jyapp/big/page/client_portrayal?entName=${encodeURIComponent(
+              item.entName
+            )}&from=client`
           } else {
-            goLink =
-              '/jyapp/big/page/unit_portrayal?entName=' +
-              encodeURIComponent(item.entName)
+            goLink = `/jyapp/big/page/unit_portrayal?entName=${encodeURIComponent(
+              item.entName
+            )}`
           }
         }
         openLinkOfOther(goLink)
@@ -287,6 +291,10 @@ export default {
       this.attachment.fileUrl = fileUrl
       const { platform, platformOS, appVersion } = this.$env
 
+      if (this.$envs.inWxMini) {
+        return this.toFollowGuidePage()
+      }
+
       if (platform === 'app' && platformOS === 'ios') {
         const newIOSApp = appVersion && compareVersion(appVersion, '3.0.4') > 0
         let defaultName = '报告'
@@ -340,7 +348,7 @@ export default {
         location.href = '/big/wx/page/report_analysis'
       }
     },
-    //以下流程暂未使用
+    // 以下流程暂未使用
     async sendEmailConfirm(done) {
       // const { email } = this.attachment
       const params = {
@@ -380,11 +388,11 @@ export default {
       }
     },
     getFileSize(url, callback) {
-      var xhr = new XMLHttpRequest()
+      const xhr = new XMLHttpRequest()
       xhr.open('HEAD', url, true)
       xhr.onreadystatechange = function () {
         if (xhr.readyState === 4 && xhr.status === 200) {
-          var fileSize = xhr.getResponseHeader('Content-Length')
+          const fileSize = xhr.getResponseHeader('Content-Length')
           console.log(fileSize, '文件大小')
           try {
             callback(fileSize)

+ 66 - 0
apps/mobile/src/views/static/FollowGuide.vue

@@ -0,0 +1,66 @@
+<template>
+  <div class="page-follow-guide" @touchstart="hideBottom">
+    <AdSingle
+      class="miniprogram-follow-guide"
+      :config="checkSubscribeConfig"
+      :before-open="beforeOpenMiniBanner"
+      :show-tag="false"
+      :show-close-icon="false"
+    />
+  </div>
+</template>
+
+<script>
+import AdSingle from '@/components/ad/Ad'
+import { callHideTab } from '@/utils'
+import { getSubscribeStatus } from '@/api/modules'
+
+export default {
+  name: 'FollowGuidePage',
+  components: {
+    AdSingle
+  },
+  data() {
+    return {
+      checkSubscribeConfig: {}
+    }
+  },
+  created() {
+    this.hideBottom()
+    this.getSubscribeGuideInfo()
+  },
+  mounted() {
+    this.hideBottom()
+  },
+  methods: {
+    // 隐藏底部栏
+    hideBottom() {
+      callHideTab(0)
+    },
+    // 中止广告事件
+    beforeOpenMiniBanner() {
+      return false
+    },
+    async getSubscribeGuideInfo() {
+      const { error_code: code, data } = await getSubscribeStatus()
+      if (code === 0 && data) {
+        const r = {
+          pic: data.step_img,
+          link: ''
+        }
+        this.$set(this, 'checkSubscribeConfig', r)
+      }
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.page-follow-guide {
+  ::v-deep {
+    .van-image {
+      width: 100%;
+    }
+  }
+}
+</style>

+ 89 - 39
apps/mobile/src/views/tabbar/Home.vue

@@ -13,7 +13,7 @@
         <img
           src="@/assets/image/public/logo-text-transparent-bg@2x.png"
           alt=""
-        >
+        />
       </div>
     </h5>
     <!-- 搜索框 -->
@@ -35,11 +35,7 @@
     />
     <div :class="{ 'home-content-container': isLogin }">
       <!-- 金刚区广告位 -->
-      <SwipeFloor
-        v-if="isLogin"
-        class="swipe-floor"
-        :images="AD.floor"
-      />
+      <SwipeFloor v-if="isLogin" class="swipe-floor" :images="AD.floor" />
       <!-- 轮播广告位 -->
       <Swipe v-if="isLogin" :images="AD.swipe" />
       <!-- 内容区域 -->
@@ -90,6 +86,20 @@
     <!-- <div class="new-user--pop-bottom" :class="{ 'has-wx': $envs.inWX }" v-if="isLogin && newUserPopConfig.showBottomPop && AD.newUserPopOfBottom.pic">
       <ad-single class="subscribe-top-box" :config="AD.newUserPopOfBottom"  :before-open="beforeOpenNewUserAD"  :show-tag="false" @close="closeNewUserPopOfBottom" @load="toggleMessagePopShow(false)"></ad-single>
     </div> -->
+
+    <!-- 微信小程序底部悬浮,未关注引导广告位 -->
+    <div
+      v-if="showMiniProgramAppBottomAd"
+      class="miniprogram--pop-bottom has-wx"
+    >
+      <AdSingle
+        class="miniprogram-follow-guide"
+        :config="AD.checkSubscribeConfig"
+        :before-open="beforeOpenMiniBanner"
+        :show-tag="false"
+        :show-close-icon="false"
+      />
+    </div>
   </div>
 </template>
 
@@ -107,7 +117,8 @@ import {
   ajaxGetAD,
   ajaxGetNewUserAD,
   ajaxSetNewUserADRead,
-  getConfiguration
+  getConfiguration,
+  getSubscribeStatus
 } from '@/api/modules'
 import MessageCard from '@/components/message/message-card'
 import CustomerCorner from '@/components/customer/index'
@@ -192,6 +203,7 @@ export default {
       swipe: [],
       floor: [],
       side: {},
+      checkSubscribeConfig: {},
       newUserPop: {},
       newUserPopOfBottom: {}
     },
@@ -202,6 +214,7 @@ export default {
       toSearch: false
     },
     dialog: {
+      followFollowGuide: false,
       checkUserShow: false
     },
     sideStatus: true,
@@ -219,11 +232,18 @@ export default {
       const { inAppOrH5 } = this.$envs
       if (this.isLogin) {
         return inAppOrH5
-      }
-      else {
+      } else {
         return false
       }
     },
+    showMiniProgramAppBottomAd() {
+      const envPass = this.$envs.inWxMini
+      return (
+        envPass &&
+        this.AD.checkSubscribeConfig.pic &&
+        this.dialog.followFollowGuide
+      )
+    },
     getHeaderAD() {
       return {
         'background-image': `url(${this.AD.header.pic})`
@@ -244,6 +264,7 @@ export default {
     checkAppUpdate()
     this._CACHE_KEY = 'home-page'
     this.doRecovery()
+    this.checkSubscribe()
   },
   mounted() {
     this.showNoLoginHeader()
@@ -295,16 +316,27 @@ export default {
       if (code === 0) {
         const thisTime = Math.round(new Date() / 1000)
         if (
-          thisTime >= data?.bulletFrameStart
-          && thisTime <= data?.bulletFrameEnd
+          thisTime >= data?.bulletFrameStart &&
+          thisTime <= data?.bulletFrameEnd
         ) {
           this.showTutorial = true
-        }
-        else {
+        } else {
           this.showTutorial = false
         }
       }
     },
+    async checkSubscribe() {
+      if (!this.$envs.inWxMini) return
+      const { error_code: code, data } = await getSubscribeStatus()
+      if (code === 0 && data) {
+        const r = {
+          pic: data.sub_img,
+          link: ''
+        }
+        this.dialog.followFollowGuide = !data.is_subscribe
+        this.$set(this.AD, 'checkSubscribeConfig', r)
+      }
+    },
     jumpBidPage() {
       this.$router.push('/course/index')
     },
@@ -383,11 +415,9 @@ export default {
       }
     },
     checkCacheToSearch() {
-      if (!this.isLogin)
-        return false
+      if (!this.isLogin) return false
       const { toSearch } = this.cacheState
-      if (!toSearch)
-        return false
+      if (!toSearch) return false
       this.cacheState.toSearch = false
       this.toSearchFocus()
     },
@@ -449,8 +479,7 @@ export default {
           storage.data.newUserPopConfig.showBottomPop = false
           storage.data.AD.newUserPop = {}
           storage.data.AD.newUserPopOfBottom = {}
-        }
-        catch (e) {}
+        } catch (e) {}
         Object.assign(this._data, storage.data)
         this.$storage.rm(this._CACHE_KEY, {
           login: true
@@ -459,8 +488,7 @@ export default {
           this.$forceUpdate()
           this.$refs['home-page'].scrollTop = storage.top
         })
-      }
-      else {
+      } else {
         // 限制刷新频率
         const nowTime = new Date().getTime()
         const maxUpdateTime = 5 * 1000
@@ -530,8 +558,7 @@ export default {
      * @param codes
      */
     getAD() {
-      if (!this.isLogin)
-        return
+      if (!this.isLogin) return
       // 获取消息悬浮信息
       this.toggleMessagePopShow(true)
       // 获取新用户弹窗广告信息
@@ -542,7 +569,7 @@ export default {
         // this.getPlatformAD.header,
         this.getPlatformAD.swipe,
         this.getPlatformAD.floor
-      ].filter(v => v)
+      ].filter((v) => v)
       ajaxGetAD({
         codes
       })
@@ -561,21 +588,18 @@ export default {
 
             if (header.length) {
               this.AD.header = header.map(adConfigFormatter)[0]
-            }
-            else {
+            } else {
               this.AD.header = {}
             }
             if (full?.length) {
               this.AD.full = full.map(adConfigFormatter)[0]
-            }
-            else {
+            } else {
               this.onInitNextDialog()
               this.AD.full = {}
             }
             if (side.length) {
               this.AD.side = side.map(adConfigFormatter)[0]
-            }
-            else {
+            } else {
               this.AD.side = {}
             }
           }
@@ -597,8 +621,7 @@ export default {
             this.toggleMessagePopShow(false)
             this.AD.newUserPop = res.data.map(adConfigFormatter)[0]
             this.AD.newUserPopOfBottom = res.data.map(adConfigFormatter)[1]
-          }
-          else {
+          } else {
             this.clearNewUserPopCache()
           }
         })
@@ -625,6 +648,22 @@ export default {
       const result = await this.clearNewUserADInfo()
       return result
     },
+    beforeOpenMiniBanner() {
+      if (this.$envs.inWxMini) {
+        try {
+          wx.miniProgram.navigateTo({
+            url: '/pages/guide/index' // 指定要跳转到的页面路径及参数
+          })
+        } catch (error) {
+          console.log(error)
+        }
+      } else {
+        this.$router.push({
+          path: '/static/follow_guide'
+        })
+      }
+      return false
+    },
     /**
      * 关闭新用户活动弹窗时事务
      * 0. 关闭弹窗&打开广告时 上报接口
@@ -635,8 +674,7 @@ export default {
       if (isClose) {
         this.newUserPopConfig.showNextFullPop = true
         this.newUserPopConfig.showBottomPop = true
-      }
-      else {
+      } else {
         this.clearNewUserPopCache()
       }
     },
@@ -664,8 +702,8 @@ export default {
       if (type) {
         // 判断是否展示有其他广告位
         if (
-          this.newUserPopConfig.showNextFullPop
-          || this.newUserPopConfig.showBottomPop
+          this.newUserPopConfig.showNextFullPop ||
+          this.newUserPopConfig.showBottomPop
         ) {
           return
         }
@@ -688,8 +726,7 @@ export default {
     getNowMessagePopInfo() {
       try {
         window.getMsgBuoyActive.getBuoyMsgAjax()
-      }
-      catch (e) {
+      } catch (e) {
         console.warn(e)
       }
     },
@@ -801,6 +838,8 @@ export default {
   button {
     height: 66.99px;
   }
+
+  .miniprogram--pop-bottom,
   .new-user--pop-bottom {
     z-index: 3;
     position: fixed;
@@ -813,7 +852,9 @@ export default {
     bottom: 16px;
     width: 100%;
     &.has-wx {
-      bottom: calc(13.333vw + 16px);
+      bottom: calc(13.333vw + 8px);
+      bottom: calc(13.333vw + 8px + constant(safe-area-inset-bottom));
+      bottom: calc(13.333vw + 8px + env(safe-area-inset-bottom));
     }
     ::v-deep .close {
       top: -6px;
@@ -821,5 +862,14 @@ export default {
       background: rgba(23, 24, 38, 0.8);
     }
   }
+
+  .miniprogram--pop-bottom {
+    .has-wx {
+      bottom: calc(20px + 16px);
+    }
+  }
+}
+.miniprogram-follow-guide {
+  margin: 0 16px;
 }
 </style>