浏览代码

feat: 详情页留资调整&详情页遮罩添加立即开通按钮

cuiyalong 3 周之前
父节点
当前提交
fda624774f

+ 7 - 7
apps/bigmember_pc/src/views/search/purchase/model/modules/data-tags-actions.js

@@ -208,13 +208,13 @@ export function dataCollectActionModel (gParams) {
       2:lids不为空;laction=”S”;binfo数组不为空->收藏信息绑定标签
       3:lids不为空;laction=”D”;->删除标签 并解绑收藏的信息
     */
-    function saveChooseTags(params, callback) {
-      renLingCustomerAddTags(params).then((r) => {
-        if (r.data) {
-          callback && callback()
-        }
-      })
-    }
+  function saveChooseTags(params, callback) {
+    renLingCustomerAddTags(params).then((r) => {
+      if (r && r.data) {
+        callback && callback()
+      }
+    })
+  }
 
   //计算收藏标签框的位置数据
   function calcCardTopLeft (e, batch) {

+ 30 - 24
apps/mobile/src/components/customer/index.vue

@@ -1,36 +1,42 @@
 <template>
-  <div class="customer-corner" :class="{ fadeOutRight: !scrollStatus }" :style="{bottom: bottomPosition || ''}">
+  <div class="customer-corner" :class="{ fadeOutRight: !scrollStatus }" :style="{ bottom: bottomPosition || '' }">
     <div class="content" @click="jumpCustomerPage">
       <img src="@/assets/image/icon/kf-blue.png" alt="">
       <p>客服</p>
     </div>
+    <MobileLeavePopup ref="leavePopup" static-info :platform="$env.platform" get-container="body" />
   </div>
 </template>
 
 <script>
- export default {
-   props: {
-     scrollStatus: {
-       type: Boolean,
-       default: false
-     },
-     bottomPosition: {
-       type: String,
-       default: ''
-     }
-   },
-   data () {
-     return {
-       show: false
-     }
-   },
-   created () {},
-   methods: {
-     jumpCustomerPage () {
-       location.href = `/jyapp/free/customer`
-     }
-   }
- }
+import leaveSourceVue from '@jy/plugin-leave-source'
+
+export default {
+  components: {
+    MobileLeavePopup: leaveSourceVue.MobileLeavePopup
+  },
+  props: {
+    scrollStatus: {
+      type: Boolean,
+      default: false
+    },
+    bottomPosition: {
+      type: String,
+      default: ''
+    }
+  },
+  data() {
+    return {
+      show: false,
+      mVisible: false,
+    }
+  },
+  methods: {
+    jumpCustomerPage() {
+      this.$refs.leavePopup.updateVisible(true)
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped>

+ 15 - 1
apps/mobile/src/views/article/components/ContentCustomerRecommend.vue

@@ -4,9 +4,11 @@
       v-if="showMask"
       :title="maskConf.title"
       :example-image="maskConf.exampleImage"
+      :show-footer-button2="showFooterButton2"
       :desc="maskConf.desc"
       @headerActionClick="headerActionClick"
       @footerBtnClick="footerBtnClick"
+      @footerBtn2Click="footerBtn2Click"
     />
     <template v-else>
       <div class="customer-list">
@@ -100,7 +102,10 @@ export default {
       recommendCustomers: state =>
         state.article.expandModel?.recommendCustomers || {}
     }),
-    ...mapGetters('user', ['bigMemberPower', 'isBusiness']),
+    ...mapGetters('user', ['bigMemberPower', 'isMember', 'isBusiness']),
+    showFooterButton2() {
+      return !this.isMember
+    },
     entList() {
       const list = this.recommendCustomers?.list || []
       return list.map((item) => {
@@ -191,6 +196,15 @@ export default {
         console.log(error)
       }
     },
+    footerBtn2Click() {
+      // 跳转购买大会员-专家版
+      this.$router.push({
+        path: '/order/create/bigmember',
+        query: {
+          meal: 'zj'
+        }
+      })
+    },
     async headerActionClick() {
       if (this.beforeLeavePage) {
         await this.beforeLeavePage()

+ 17 - 0
apps/mobile/src/views/article/components/FreeUserAdvancedMask.vue

@@ -4,7 +4,9 @@
       :desc="maskConf.desc"
       :example-image="maskConf.exampleImage"
       :footer-button-text="maskConf.buttonText"
+      :show-footer-button2="showFooterButton2"
       @footerBtnClick="onFooterBtnClick"
+      @footerBtn2Click="footerBtn2Click"
     >
       <template #header>
         <div class="header flex flex-justify-center flex-align-center">
@@ -19,6 +21,7 @@
 
 <script>
 import { Icon } from 'vant'
+import { mapGetters } from 'vuex'
 import leaveSourceMixins from '@/utils/mixins/modules/leave-source-vue.js'
 import { LINKS } from '@/data'
 import { openAppOrWxPage } from '@/utils/'
@@ -64,6 +67,11 @@ export default {
     }
   },
   computed: {
+    ...mapGetters('user', ['isMember']),
+    showFooterButton2() {
+      // 非大会员展示
+      return !this.isMember
+    },
     maskConf() {
       return this.map[this.type] || this.map.nijian
     }
@@ -72,6 +80,15 @@ export default {
     onFooterBtnClick() {
       this.leaveInfo()
     },
+    footerBtn2Click() {
+      // 跳转购买大会员-专家版
+      this.$router.push({
+        path: '/order/create/bigmember',
+        query: {
+          meal: 'zj'
+        }
+      })
+    },
     async leaveInfo() {
       this.__doLeaveSourceVue({
         platform: this.$env.platform,

+ 58 - 18
apps/mobile/src/views/article/ui/MaskCard.vue

@@ -9,7 +9,9 @@
           class="mask-content-header flex flex-(items-center justify-between)"
         >
           <slot name="header">
-            <h5 class="mask-content-title">{{ title }}</h5>
+            <h5 class="mask-content-title">
+              {{ title }}
+            </h5>
             <span class="mask-content-actions">
               <span class="mask-content-action" @click="onHeaderActionClick">
                 <span>查看服务介绍</span>
@@ -21,30 +23,52 @@
         <div class="mask-content-main">
           <slot name="main">
             <div class="mask-content-example-image">
-              <img :src="exampleImageUrl" />
+              <img :src="exampleImageUrl">
             </div>
           </slot>
         </div>
         <div class="mask-content-footer">
-          <p class="mask-content-desc-text" v-html="desc"></p>
-          <div class="mask-content-footer-btn">
-            <van-button
-              type="primary"
-              class="mask-footer-btn"
-              size="small"
-              @click="onFooterBtnClick"
-              v-bound-phone="bindPhoneFooterBtnClick()"
-            >
-              {{ footerButtonText }}
-            </van-button>
+          <p class="mask-content-desc-text" v-html="desc" />
+          <div class="mask-content-footer-btn" :class="{ 'btn-middle': showFooterButton2 }">
+            <template v-if="showFooterButton2">
+              <van-button
+                v-bound-phone="bindPhoneFooterBtnClick()"
+                class="mask-footer-btn"
+                size="small"
+                @click="onFooterBtnClick"
+              >
+                {{ footerButtonText }}
+              </van-button>
+              <van-button
+                v-if="showFooterButton2"
+                class="mask-footer-btn"
+                size="small"
+                type="primary"
+                @click="onFooterBtn2Click"
+              >
+                {{ footerButton2Text }}
+              </van-button>
+            </template>
+            <template v-else>
+              <van-button
+                v-bound-phone="bindPhoneFooterBtnClick()"
+                type="primary"
+                class="mask-footer-btn"
+                size="small"
+                @click="onFooterBtnClick"
+              >
+                {{ footerButtonText }}
+              </van-button>
+            </template>
           </div>
         </div>
       </div>
     </div>
   </section>
 </template>
+
 <script>
-import { Icon, Button } from 'vant'
+import { Button, Icon } from 'vant'
 import { getAssetsFile } from '@/utils'
 
 export default {
@@ -70,6 +94,14 @@ export default {
       type: String,
       default: ''
     },
+    showFooterButton2: {
+      type: Boolean,
+      default: false
+    },
+    footerButton2Text: {
+      type: String,
+      default: '立即开通'
+    },
     footerButtonText: {
       type: String,
       default: '免费体验'
@@ -85,10 +117,6 @@ export default {
       return `${getAssetsFile(this.exampleImage)}`
     }
   },
-  data() {
-    return {}
-  },
-  created() {},
   methods: {
     onHeaderActionClick() {
       this.$emit('headerActionClick')
@@ -96,6 +124,9 @@ export default {
     onFooterBtnClick() {
       this.$emit('footerBtnClick')
     },
+    onFooterBtn2Click() {
+      this.$emit('footerBtn2Click')
+    },
     bindPhoneFooterBtnClick() {
       return {
         props: {
@@ -163,10 +194,19 @@ export default {
 }
 .mask-content-footer-btn {
   margin-top: 12px;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  &.btn-middle {
+    .mask-footer-btn:not(:last-of-type) {
+      margin-right: 12px;
+    }
+  }
 }
 .mask-footer-btn {
   width: 100%;
   height: 36px;
+  flex: 1;
   border-radius: 6px;
 }
 </style>

+ 171 - 100
apps/mobile/src/views/uersales/newuser/index.vue

@@ -1,26 +1,30 @@
 <template>
-  <!-- 新用户注册 留资页-->
-  <div class="page-sales-box" :class="{ 'in-wx': this.$envs.inWX }">
+  <!-- 新用户注册 留资页 -->
+  <div class="page-sales-box" :class="{ 'in-wx': $envs.inWX }">
     <div class="sales-main j-main">
       <div class="title-box">
         <div class="title_top">
-          <h5 class="page-title">选择您的业务标签</h5>
-          <div v-if="!urlSource" class="jumpto_btn" @click.stop="postNewUerData(false)">
+          <h5 class="page-title">
+            选择您的业务标签
+          </h5>
+          <div v-if="!urlSource" class="jumpto_btn" @click.stop="skipButtonClick">
             跳过
           </div>
         </div>
-        <h6 class="sub-text">{{ subtitle }}</h6>
+        <h6 class="sub-text">
+          {{ subtitle }}
+        </h6>
       </div>
       <!-- 主业务区 -->
-      <div class="jy-content-box" v-if="newUserSaleData">
+      <div v-if="newUserSaleData" class="jy-content-box">
         <div
-          class="jy-content-list"
-          :class="{ 'set-msg-type': item.key === 'message' }"
           v-for="(item, index) in newUserSaleData"
           :key="index"
+          class="jy-content-list"
+          :class="{ 'set-msg-type': item.key === 'message' }"
         >
           <!-- 角标 -->
-          <div class="key_title_ct" v-if="item.title">
+          <div v-if="item.title" class="key_title_ct">
             <span class="key_tipnums">{{ index + 1 }}</span>
             <!-- title标题 + 是否多选 -->
             <span class="key_title">
@@ -29,93 +33,95 @@
               <!-- {{item.choose ? (item.choose === 2 ? '[多选]' : '[单选]') : ''}} -->
             </span>
             <van-button
+              v-show="item.showNext"
               type="primary"
               round
               plain
               class="more"
-              v-show="item.showNext"
               @click="nextPage(item)"
-              >{{ calcIsLastPage(item) ? '上一页' : '下一页' }}</van-button
             >
+              {{ calcIsLastPage(item) ? '上一页' : '下一页' }}
+            </van-button>
           </div>
           <!-- 单选、多选选项 -->
           <div
-            class="key_condition"
             v-if="item.type === 1 || item.type === 2"
+            class="key_condition"
             :data-key="item.key"
             :class="{ 'has-more-color': item.type === 2 }"
           >
             <div
+              v-for="(iitem, iindex) in item.data"
+              v-show="checkShowLine(iitem)"
+              :key="iindex"
               class="key_condition_item"
               :class="{
                 'input-item': iitem.type === 5,
-                column: useColumn(iitem)
+                'column': useColumn(iitem),
               }"
-              v-for="(iitem, iindex) in item.data"
-              v-show="checkShowLine(iitem)"
-              :key="iindex"
             >
-              <div class="key_condition_item_label" v-if="showLabel(iitem)">
+              <div v-if="showLabel(iitem)" class="key_condition_item_label">
                 {{ iitem.title }}
               </div>
-              <div class="key_condition_item_content" v-if="iitem.choose">
+              <div v-if="iitem.choose" class="key_condition_item_content">
                 <span
                   v-for="(itemspan, selectIndex) in iitem.condition.slice(
                     (pagination.pageNum[iitem.key] - 1) * pagination.pageSize,
-                    pagination.pageNum[iitem.key] * pagination.pageSize
+                    pagination.pageNum[iitem.key] * pagination.pageSize,
                   )"
                   :key="selectIndex"
                   class="tags"
                   :class="{
                     active:
-                      selectInfo[iitem.key] &&
-                      selectInfo[iitem.key].includes(itemspan)
+                      selectInfo[iitem.key]
+                      && selectInfo[iitem.key].includes(itemspan),
                   }"
                   @click="chooseclickBtn(itemspan, iitem, iindex, item)"
-                  >{{ itemspan }}</span
-                >
+                >{{ itemspan }}</span>
               </div>
               <div
-                class="key_condition_item_content"
                 v-else-if="iitem.type === 5"
+                class="key_condition_item_content"
               >
                 <van-field
-                  class="other-input"
                   v-model="codesArr[iitem.key]"
+                  class="other-input"
                   :maxlength="iitem.maximum"
-                  @focus="otherInputFocus(item, iitem)"
                   :placeholder="iitem.describe"
-                >
-                </van-field>
+                  @focus="otherInputFocus(item, iitem)"
+                />
               </div>
             </div>
           </div>
-          <div class="key_condition" v-if="item.type === 5">
+          <div v-if="item.type === 5" class="key_condition">
             <SearchAssociate
               :value="company"
               :placeholder="item.describe"
+              :associate-list="associateList"
               @clear="companyChange('clear')"
               @input="companyChange('input', $event)"
               @focus="getCompany($event)"
               @blur="companyChange('blur', $event)"
-              :associate-list="associateList"
               @selected="companyChange('selected', $event)"
-            >
-            </SearchAssociate>
+            />
           </div>
         </div>
       </div>
     </div>
     <div class="j-button-group j-footer">
-      <button v-if="!urlSource" tag="button" class="j-button-confirm" @click.stop="postNewUerData(true)">开启剑鱼之旅</button>
-      <button v-else tag="button" class="j-button-confirm" @click.stop="submitNewUerData">提交</button>
+      <button v-if="!urlSource" tag="button" class="j-button-confirm" @click.stop="startApp">
+        开启剑鱼之旅
+      </button>
+      <button v-else tag="button" class="j-button-confirm" @click.stop="submitNewUerData">
+        提交
+      </button>
     </div>
     <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">
         您尚未关注微信公众号,无法开启微信提醒,建议您前往关注后再开启。
@@ -127,13 +133,18 @@
         开通超级订阅可选择“实时推送”及时接收公告信息,或根据您的工作需要灵活设置推送时间。
       </p>
       <p v-if="dparam.showTextP === 4" slot="content">
-        系统检测到您同时拥有2个剑鱼标讯账号,<span class="high_info"
-          >手机号:{{ accountInfo.phone }},微信号:{{
-            accountInfo.name
-          }},</span
-        >请进行账号合并后,再开启微信提醒吧~
+        系统检测到您同时拥有2个剑鱼标讯账号,<span class="high_info">手机号:{{ accountInfo.phone }},微信号:{{
+          accountInfo.name
+        }},</span>请进行账号合并后,再开启微信提醒吧~
       </p>
     </Dialog>
+    <MobileLeavePopup
+      ref="leavePopup"
+      static-info
+      :platform="$env.platform"
+      get-container="body"
+      :on-popup-visible-change="onPopupVisibleChange"
+    />
   </div>
 </template>
 
@@ -141,26 +152,27 @@
 import {
   Button,
   Cell,
-  Popup,
-  Overlay,
-  Image,
-  Sticky,
-  Field,
-  Toast,
   CellGroup,
   Checkbox,
   CheckboxGroup,
-  Switch
+  Field,
+  Image,
+  Overlay,
+  Popup,
+  Sticky,
+  Switch,
+  Toast
 } from 'vant'
+import leaveSourceVue from '@jy/plugin-leave-source'
 import PopupLayout from '@/components/common/PopupLayout'
 import { AppIcon } from '@/ui'
 import Dialog from '@/components/common/Dialog.vue'
 import {
   ajaxGetIsNewUerSales,
-  getCompanyAssociation,
   ajaxGetappNewUerSales,
-  setPushSet,
-  getUser
+  getCompanyAssociation,
+  getUser,
+  setPushSet
 } from '@/api/modules'
 import { callHideTab, setTrack } from '@/utils'
 import {
@@ -186,6 +198,7 @@ const postUserSaleData = {
 export default {
   name: 'AppHome',
   components: {
+    MobileLeavePopup: leaveSourceVue.MobileLeavePopup,
     [Button.name]: Button,
     [Cell.name]: Cell,
     [CellGroup.name]: CellGroup,
@@ -278,17 +291,19 @@ export default {
     checkShowPosition() {
       if (this.selectInfo.position) {
         const position = this.selectInfo.position.join('')
-        const show =
-          position.indexOf('总裁') === -1 && position.indexOf('总经理') === -1
+        const show
+          = !position.includes('总裁') && !position.includes('总经理')
         return show
-      } else {
+      }
+      else {
         return false
       }
     },
     checkShowLine(iitem) {
       if (iitem.key === 'department') {
         return this.checkShowPosition()
-      } else {
+      }
+      else {
         return true
       }
     },
@@ -312,21 +327,23 @@ export default {
       // 过滤输入的空格和奇怪符号
       return value.replace(/\s+/g, '')
     },
-    otherInputFocus: function (parent, child) {
+    otherInputFocus(parent, child) {
       // 判断是单选还是多选
       // var isMultiple = choose === 2
       if (parent.data[0] && parent.data[0].choose === 2) {
         // 多选
-      } else {
+      }
+      else {
         // 单选
         // 设置其他按钮不选中
-        for (var i = 0; i < parent.data.length; i++) {
-          var item = parent.data[i]
-          var itemKey = item.key
+        for (let i = 0; i < parent.data.length; i++) {
+          const item = parent.data[i]
+          const itemKey = item.key
           if (item.type === 1 || item.type === 2) {
             // 取消选中
             this.$set(this.selectInfo, itemKey, [])
-          } else {
+          }
+          else {
             // do something
           }
         }
@@ -350,23 +367,25 @@ export default {
       if (isMultiple) {
         if (this.selectInfo[key].includes(selectItem)) {
           const filterList = this.selectInfo[key].filter(
-            (v) => v !== selectItem
+            v => v !== selectItem
           )
           this.$set(this.selectInfo, key, filterList)
-        } else {
+        }
+        else {
           this.selectInfo[key].push(selectItem)
         }
-      } else {
+      }
+      else {
         // 单选逻辑处理
         this.$set(this.selectInfo, key, [selectItem])
 
         // 单选点击按钮时候,要清除其他内容
         // 最后一个必须不是按钮组,其他必须都是按钮组
-        var lastChild = parent.data[parent.data.length - 1]
+        const lastChild = parent.data[parent.data.length - 1]
         var key = lastChild.key
         if (lastChild.type !== 1 && lastChild.type !== 2) {
-          for (var i = 0; i < parent.data.length; i++) {
-            var pi = parent.data[i]
+          for (let i = 0; i < parent.data.length; i++) {
+            const pi = parent.data[i]
             if (pi.type === 1 || pi.type === 2) {
               this.$set(this.codesArr, key, '')
             }
@@ -385,14 +404,18 @@ export default {
       this.dparam.setDialog = false
       if (this.dparam.showTextP === 1) {
         this.setWxEvent()
-      } else if (this.dparam.showTextP === 2) {
+      }
+      else if (this.dparam.showTextP === 2) {
         this.setAppEvent()
-      } else if (this.dparam.showTextP === 3) {
+      }
+      else if (this.dparam.showTextP === 3) {
         this.$router.push('/order/create/svip')
-      } else if (this.dparam.showTextP === 4) {
+      }
+      else if (this.dparam.showTextP === 4) {
         if (this.$env.platform === 'wx') {
           location.href = '/weixin/frontPage/userMerge/free/index'
-        } else {
+        }
+        else {
           location.href = '/jyapp/frontPage/userMerge/free/index'
         }
       }
@@ -402,7 +425,8 @@ export default {
       if (this.$env.platform !== 'wx' && !this.wxWay.isFollow) {
         if (this.getUserData.state === 2) {
           location.href = '/jyapp/frontPage/userMerge/free/index'
-        } else {
+        }
+        else {
           this.$router.push('/push/setActive')
         }
       }
@@ -415,10 +439,12 @@ export default {
           setTimeout(this.gethiddenStatus(), 0)
         }, 2000)
         openSystemNotification()
-      } else if (this.$env.platform === 'wx') {
-        location.href =
-          '/front/downloadapppage/normal?source=weixin-pushsettings'
-      } else {
+      }
+      else if (this.$env.platform === 'wx') {
+        location.href
+          = '/front/downloadapppage/normal?source=weixin-pushsettings'
+      }
+      else {
         location.href = '/jyapp/downloadapppage/normal?source=h5-pushsettings'
       }
     },
@@ -426,7 +452,8 @@ export default {
       if (JyObj.checkNoticePermission() === 1) {
         this.appWay.isFollow = true
         this.appWay.value = '已开启'
-      } else {
+      }
+      else {
         this.appWay.isFollow = false
         this.appWay.value = '去开启'
       }
@@ -449,7 +476,8 @@ export default {
           if (closeSwitch) {
             closeSwitch.i_wxpush = false
           }
-        } else if (this.getUserData.state === 2) {
+        }
+        else if (this.getUserData.state === 2) {
           this.dparam.setDialog = true
           this.dparam.setTitle = '合并账号'
           this.dparam.confirmButtonText = '合并账号'
@@ -458,10 +486,12 @@ export default {
           if (closeSwitch) {
             closeSwitch.i_wxpush = false
           }
-        } else {
+        }
+        else {
           // this.setPushSetApi(params)
         }
-      } else if (type === 'app') {
+      }
+      else if (type === 'app') {
         if (!this.appWay.isFollow) {
           this.dparam.setDialog = true
           this.dparam.setTitle = 'APP提醒开启失败'
@@ -471,7 +501,8 @@ export default {
           if (closeSwitch) {
             closeSwitch.i_apppush = false
           }
-        } else {
+        }
+        else {
           // this.setPushSetApi(params)
         }
       }
@@ -502,13 +533,15 @@ export default {
         const pageNum = this.pagination.pageNum[maxKey]
         const hasNextPage = pageNum * pageSize <= total
         return !hasNextPage
-      } else {
+      }
+      else {
         return false
       }
     },
     nextPage(item) {
       const list = item.data
-      if (!Array.isArray(list)) return
+      if (!Array.isArray(list))
+        return
       const pageSize = this.pagination.pageSize
       list.forEach((u) => {
         const key = u.key
@@ -517,7 +550,8 @@ export default {
         const hasNextPage = pageNum * pageSize <= total
         if (hasNextPage) {
           this.pagination.pageNum[key] = pageNum + 1
-        } else {
+        }
+        else {
           this.pagination.pageNum[key] = 1
         }
       })
@@ -529,22 +563,26 @@ export default {
           this.showPopup = false
           if (params.ratemode === 2) {
             this.setPushText(params.ratemode, params.times.join('、'))
-          } else {
+          }
+          else {
             this.setPushText(params.ratemode)
           }
           this.$toast('设置成功')
-        } else {
+        }
+        else {
           this.$toast(
             params.pushValue === 1 || params.interested === 1
               ? '已开启'
               : '已关闭'
           )
         }
-      } else {
+      }
+      else {
         this.$toast(msg)
         try {
           callback()
-        } catch (e) {}
+        }
+        catch (e) {}
       }
     },
     // 用户信息获取
@@ -553,17 +591,19 @@ export default {
         const { data, error_code: code, error_msg: msg } = await getUser()
         if (code === 0) {
           this.getUserData = data
-        } else {
+        }
+        else {
           this.$toast(msg)
         }
         this.getNewUerSales()
-      } catch (error) {}
+      }
+      catch (error) {}
     },
     /**
      * 获取新用户数据
      * @param datas
      */
-    getNewUerSales () {
+    getNewUerSales() {
       const data = {
         source: this.urlSource || ''
       }
@@ -620,14 +660,40 @@ export default {
         }
       })
     },
+    onPopupVisibleChange(v) {
+      if (!v) {
+        this.onLeavePopupClose()
+      }
+    },
+    onLeavePopupClose() {
+      if (this.clickType === 'start') {
+        this.postNewUerData(true)
+      }
+      else if (this.clickType === 'skip') {
+        this.postNewUerData(false)
+      }
+    },
+    showCustomerDialog(f = false) {
+      this.$refs.leavePopup.updateVisible(f)
+    },
+    skipButtonClick() {
+      this.clickType = 'skip'
+      this.showCustomerDialog(true)
+      // this.postNewUerData(false)
+    },
+    startApp() {
+      this.clickType = 'start'
+      this.showCustomerDialog(true)
+      // this.postNewUerData(true)
+    },
     // 提交(带有source,需要callback)
-    submitNewUerData () {
+    submitNewUerData() {
       this.postNewUerData(true, () => {
         history.back()
       })
     },
     // 提交跳过
-    postNewUerData (type, callback) {
+    postNewUerData(type, callback) {
       this.setPageTrack(`点击-${type ? '开启剑鱼之旅' : '跳过'}`)
       const msgSet = {}
       this.msgTypeContent.forEach((v) => {
@@ -657,22 +723,24 @@ export default {
       //   codesArr[v] = this.selectPopInfo[v].select
       // })
       // 添加source
-      if(this.urlSource) {
+      if (this.urlSource) {
         this.$set(codesArr, 'source', this.urlSource)
       }
       ajaxGetappNewUerSales(codesArr)
         .then((res) => {
           if (res?.error_code === 0) {
-            if(typeof callback === 'function') {
+            if (typeof callback === 'function') {
               callback()
-            } else {
+            }
+            else {
               this.goHomePage()
             }
           }
         }).catch((e) => {
-          if(typeof callback === 'function') {
+          if (typeof callback === 'function') {
             callback()
-          } else {
+          }
+          else {
             this.goHomePage()
           }
           console.warn('请求跳过信息异常:', e)
@@ -693,7 +761,8 @@ export default {
           appCallReloadTab('search', 1)
           appCallChangeTab('search')
         }, 0)
-      } else {
+      }
+      else {
         this.$router.replace('/')
       }
     },
@@ -714,8 +783,8 @@ export default {
     getCompany: debounce(function (val) {
       if (val) {
         getCompanyAssociation({ name: val }).then((res) => {
-          this.associateList =
-            res.data?.map((item) => {
+          this.associateList
+            = res.data?.map((item) => {
               return { label: item, value: item }
             }) || []
         })
@@ -724,6 +793,7 @@ export default {
   }
 }
 </script>
+
 <style lang="scss">
 body .new-user-popup {
   .select-checkbox {
@@ -741,6 +811,7 @@ body .new-user-popup {
   }
 }
 </style>
+
 <style lang="scss" scoped>
 .app-header-top {
   padding-top: $app-header-padding-top;