فهرست منبع

feat: 完善分享功能

zhangyuhan 1 سال پیش
والد
کامیت
daa32df521

+ 42 - 6
project-config/index.js

@@ -41,14 +41,50 @@ const projectBuyInfo = {
 }
 
 // 分享文案相关
-const shareInfo = {
-  home: {
-    title: '',
-    desc: '',
+const shareInfoMaps = {
+  '标讯首页': {
+    title: '全国物业项目库,实时获取物业采购商机!',
     img: ''
-  }
+  },
+  '标讯搜索': {
+    title: '快来轻松筛查最新招标采购商机!',
+  },
+  '标讯详情': {
+    title: '【采购商机】#采购单位#物业服务项目采购'
+  },
+
+  //
+  '临期首页': {
+    title: '全国物业临期项目库,找临期商机、找人脉!',
+    img: ''
+  },
+  '临期搜索': {
+    title: '查看临期项目商机!',
+  },
+  '临期详情': {
+    title: '【临期项目商机】#采购单位#物业服务即将到期'
+  },
+
+  //
+  '画像首页': {
+    title: '全国最全物业业主库,市场拓客神器!',
+    img: ''
+  },
+  '画像搜索': {
+    title: '最全物业业主信息查询!',
+  },
+  '画像详情': {
+    title: '【业主分析】#采购单位#采购分析'
+  },
+}
+
+const shareInfo = {
+  home: shareInfoMaps['标讯首页'],
+  search: shareInfoMaps['标讯搜索'],
+  detail: shareInfoMaps['标讯详情']
 }
 
+
 const boxInfo = [
   {
     title: '物业商机',
@@ -182,8 +218,8 @@ const tabbars = modulePower.canMonitor ? unitTabbars : searchTabbars
 
 const appConfig = {
   projectInfo,
-  shareInfo,
   boxInfo,
+  shareInfo,
   tabbars,
   modulePower,
   projectBuyInfo

+ 3 - 3
src/pages/search/content/bidding/index.vue

@@ -82,6 +82,7 @@ export default {
   },
   computed: {
     ...mapGetters('user', ['isLogin']),
+    ...mapGetters('config', ['appConfig']),
     ...mapState({
       content: (state) => state[ARTICLE_BIDDING_MODULE].mainModel.content,
       summary: (state) => state[ARTICLE_BIDDING_MODULE].mainModel.summary,
@@ -114,10 +115,9 @@ export default {
       console.log(res.target, res, this.$instance.router)
     }
     console.log(`${this.$instance.router.path}?id=${this.$instance.router.params.id}&form=share`)
-    return {
-      title: '我想让你看一下这几个项目',
+    return Object.assign({
       path: `${this.$instance.router.path}?id=${this.$instance.router.params.id}&form=share`
-    }
+    }, this.appConfig.shareInfo.detail)
   },
   created() {
     this.$instance = Taro.getCurrentInstance()

+ 3 - 3
src/pages/search/content/report/index.vue

@@ -246,6 +246,7 @@ export default {
   },
   computed: {
     ...mapGetters('user', ['isLogin']),
+    ...mapGetters('config', ['appConfig']),
     getKeys() {
       return [this.contentInfo.publishEntName]
     },
@@ -281,10 +282,9 @@ export default {
       console.log(res.target, res, this.$instance.router)
     }
     console.log(`${this.$instance.router.path}?id=${this.$instance.router.params.id}&form=share`)
-    return {
-      title: '我想让你看一下这几个项目',
+    return Object.assign({
       path: `${this.$instance.router.path}?id=${this.$instance.router.params.id}&form=share`
-    }
+    }, this.appConfig.shareInfo.detail)
   },
   mounted() {
     this.stickyTop = 0

+ 0 - 10
src/pages/select-area/index.vue

@@ -27,16 +27,6 @@ export default {
     this.$instance = Taro.getCurrentInstance()
     this.doReset()
   },
-  onShareAppMessage (res) {
-    if (res.from === 'button') {
-      // 来自页面内转发按钮
-      console.log(res.target, res, this.$instance.router)
-    }
-    return {
-      title: '我推荐你使用这个小程序',
-      path: `${this.$instance.router.path}?form=share`
-    }
-  },
   data () {
     return {
       area: {

+ 0 - 10
src/pages/tabbar/box/index.vue

@@ -27,16 +27,6 @@ export default {
   created () {
     this.$instance = Taro.getCurrentInstance()
   },
-  onShareAppMessage (res) {
-    if (res.from === 'button') {
-      // 来自页面内转发按钮
-      console.log(res.target, res, this.$instance.router)
-    }
-    return {
-      title: '我推荐你使用这些功能',
-      path: `${this.$instance.router.path}?form=share`
-    }
-  },
   data () {
     return {}
   },

+ 2 - 3
src/pages/tabbar/home/index.vue

@@ -82,10 +82,9 @@ export default {
       // 来自页面内转发按钮
       console.log(res.target, res, this.$instance.router)
     }
-    return {
-      title: '我推荐你使用这个小程序',
+    return Object.assign({
       path: `${this.$instance.router.path}?form=share`
-    }
+    }, this.appConfig.shareInfo.home)
   },
   data () {
     return {

+ 0 - 10
src/pages/tabbar/monitor/index.vue

@@ -21,16 +21,6 @@ export default {
   created () {
     this.$instance = Taro.getCurrentInstance()
   },
-  onShareAppMessage (res) {
-    if (res.from === 'button') {
-      // 来自页面内转发按钮
-      console.log(res.target, res, this.$instance.router)
-    }
-    return {
-      title: '我推荐你使用这些功能',
-      path: `${this.$instance.router.path}?form=share`
-    }
-  },
   data () {
     return {}
   },

+ 3 - 4
src/pages/tabbar/search/index.vue

@@ -21,13 +21,12 @@ export default {
       // 来自页面内转发按钮
       console.log(res.target, res, this.$instance.router)
     }
-    return {
-      title: '我推荐使用这个小程序搜索',
+    return Object.assign({
       path: `${this.$instance.router.path}?form=share`
-    }
+    }, this.appConfig.shareInfo.search)
   },
   computed: {
-    ...mapGetters('config', ['searchTypeConf']),
+    ...mapGetters('config', ['searchTypeConf', 'appConfig']),
     searchType() {
       return this.searchTypeConf.type || 'bidding'
     }