Browse Source

文案修改

yuwenjun1997 2 years ago
parent
commit
c0883466c2

BIN
assets/theme-images/ross/10155411.xlsx


+ 3 - 2
configs/jssdk.js

@@ -1,5 +1,6 @@
-export const appId = 'wx6512b1dfb84c28e1'
+export const appId = 'wx6512b1dfb84c28e1' // 测试
+// export const appId = 'wx91c4152b60ca91a3' // 采美
 
-export const appSecret = '10f94918f59f630351319382bb29cab1'
+// export const appSecret = '10f94918f59f630351319382bb29cab1'
 
 export const jsApiList = ['updateAppMessageShareData']

+ 21 - 21
layouts/app-ross.vue

@@ -87,7 +87,7 @@
 
 <script>
 import { mapGetters } from 'vuex'
-import { isWeChat } from '~/utils/validator'
+import { EventBus } from '@/plugins/router'
 export default {
   computed: {
     ...mapGetters([
@@ -124,13 +124,13 @@ export default {
       drawer: false,
       isMounted: false,
       list: [
-        {
-          id: 4,
-          name: '挑战赛',
-          path: '/activity/challenge',
-          icon: 'icon-challenge',
-          auth: false,
-        },
+        // {
+        //   id: 4,
+        //   name: '挑战赛',
+        //   path: '/activity/challenge',
+        //   icon: 'icon-challenge',
+        //   auth: false,
+        // },
         {
           id: 1,
           name: '授权申请',
@@ -140,7 +140,7 @@ export default {
         },
         {
           id: 2,
-          name: '产品资料',
+          name: '云资料库',
           path: '/docs/0',
           icon: 'icon-doc',
           auth: false,
@@ -159,26 +159,24 @@ export default {
     this.responseWidth()
     this.initPageData()
     this.initAppMessageShareData()
-  },
-  watch: {
-    $route: {
-      handler: function () {
-        setTimeout(() => {
-          this.$nextTick(this.initAppMessageShareData)
-        }, 1000)
-      },
-      deep: true,
-    },
+    EventBus.$on('afterEach', () => {
+      this.initAppMessageShareData()
+    })
   },
   beforeDestroy() {
     window.removeEventListener('resize', () => {})
     this.refreshCacheData()
+    EventBus.$off('afterEach')
   },
   methods: {
     // 全局分享事件
     initAppMessageShareData() {
+      let retryCount = 1
       // 判断是否为微信浏览器环境
       // if (!isWeChat()) return
+      const whiteList = ['template-ross-activity-challenge']
+      if (whiteList.indexOf(this.$route.name) > -1) return
+
       // 网站主机地址
       const HOST = process.env.LOCALHOSE
       this.$wxReady((wx) => {
@@ -188,8 +186,10 @@ export default {
           desc: '一款专业的正品认证软件系统', // 分享描述
           link: HOST + this.routePrefix, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
           imgUrl: HOST + '/share-icon.png', // 分享图标
-          success: function () {
-            // 设置成功
+          fail: () => {
+            if (retryCount === 0) return
+            this.initAppMessageShareData()
+            retryCount--
           },
         })
       })

+ 1 - 0
nuxt.config.js

@@ -60,6 +60,7 @@ export default {
     '~/plugins/vue-filters',
     '~/plugins/storage',
     '~/plugins/jssdk',
+    '~/plugins/router',
   ],
 
   // Auto import components: https://go.nuxtjs.dev/config-components

+ 2 - 2
pages/_template/app/approve/device/index.vue

@@ -27,7 +27,7 @@
           </el-select>
           <el-input
             :placeholder="
-              searchQuery.type === 1 ? '请输入SN码' : '请输入机构名'
+              searchQuery.type === 1 ? '请输入SN码' : '请输入完整的机构名'
             "
             v-model="searchQuery.keyword"
             class="input-with-select"
@@ -89,7 +89,7 @@
           <SimpleEmpty
             v-if="!total && !isRequest"
             name="icon-empty-device.png"
-            description="敬请期待~"
+            description="未找到相关设备~"
           ></SimpleEmpty>
         </template>
       </div>

+ 2 - 2
pages/_template/ldm/index.vue

@@ -25,7 +25,7 @@
       <div class="name mb-1">需要帮助吗?</div>
       <div class="contact">联系我们官方客服</div>
     </div>
-  </div> 
+  </div>
 </template>
 
 <script>
@@ -53,7 +53,7 @@ export default {
         },
         {
           id: 1,
-          name: '官方产品资料',
+          name: '云资料库',
           image: 'ldm-icon-database.png',
           path: '/docs/0',
         },

+ 2 - 2
pages/_template/ph/approve/device/index.vue

@@ -32,7 +32,7 @@
           </el-select>
           <el-input
             :placeholder="
-              searchQuery.type === 1 ? '请输入SN码' : '请输入机构名'
+              searchQuery.type === 1 ? '请输入SN码' : '请输入完整的机构名'
             "
             v-model="searchQuery.keyword"
             class="input-with-select"
@@ -94,7 +94,7 @@
           <SimpleEmpty
             v-if="!total && !isRequest"
             name="icon-empty-device.png"
-            description="敬请期待~"
+            description="未找到相关设备~"
           ></SimpleEmpty>
         </template>
       </div>

+ 1 - 1
pages/_template/ph/docs/_fileId.vue

@@ -3,7 +3,7 @@
     <div class="page-top flex flex-col justify-center items-center">
       <span
         class="name mt-2"
-        v-text="supplierInfo.shopName + '产品资料'"
+        v-text="supplierInfo.shopName + '云资料库'"
       ></span>
     </div>
     <div class="page-content">

+ 20 - 12
pages/_template/ross/activity/challenge/index.vue

@@ -68,20 +68,28 @@ export default {
     this.fetchActivityStatus()
   },
   mounted() {
-    this.$wxReady((wx) => {
-      //需在用户可能点击分享按钮前就先调用
-      wx.updateAppMessageShareData({
-        title: '认证通', // 分享标题
-        desc: '您的好友邀请您一起来参与认证通挑战赛,赢大奖,快来参与吧!', // 分享描述
-        link: window.location.href, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
-        imgUrl: window.location.origin + '/activity.png', // 分享图标
-        success: function () {
-          // 设置成功
-        },
-      })
-    })
+    this.initAppMessageShareData()
   },
   methods: {
+    initAppMessageShareData() {
+      //  重试次数
+      let retryCount = 1
+      this.$wxReady((wx) => {
+        //需在用户可能点击分享按钮前就先调用
+        wx.updateAppMessageShareData({
+          title: '认证通', // 分享标题
+          desc: '您的好友邀请您一起来参与认证通挑战赛,赢大奖,快来参与吧!', // 分享描述
+          link: window.location.href, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
+          imgUrl: window.location.origin + '/activity.png', // 分享图标
+          fail: () => {
+            if (retryCount === 0) return
+            this.initAppMessageShareData()
+            retryCount--
+          },
+        })
+      })
+    },
+
     // 活动详情
     toDetail() {
       const url = `${this.routePrefix}/activity/challenge/list`

+ 2 - 2
pages/_template/ross/approve/device/index.vue

@@ -33,7 +33,7 @@
           </el-select>
           <el-input
             :placeholder="
-              searchQuery.type === 1 ? '请输入SN码' : '请输入机构名'
+              searchQuery.type === 1 ? '请输入SN码' : '请输入完整的机构名'
             "
             v-model="searchQuery.keyword"
             class="input-with-select"
@@ -95,7 +95,7 @@
           <SimpleEmpty
             v-if="!total && !isRequest"
             name="icon-empty-device.png"
-            description="敬请期待~"
+            description="未找到相关设备~"
           ></SimpleEmpty>
         </template>
       </div>

+ 2 - 2
pages/_template/ross/docs/_fileId.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="page">
     <div class="page-top flex flex-col justify-center items-center">
-      <!-- <span class="name mt-2" v-text="supplierInfo.shopName + '产品资料'"></span> -->
-      <span class="name mt-2">产品资料</span>
+      <!-- <span class="name mt-2" v-text="supplierInfo.shopName + '云资料库'"></span> -->
+      <span class="name mt-2">云资料库</span>
     </div>
     <div class="page-content">
       <!-- 面包屑 -->

+ 17 - 0
plugins/router.js

@@ -0,0 +1,17 @@
+import Vue from 'vue'
+
+export const EventBus = new Vue()
+
+export default ({ app }) => {
+  // 前置路由守卫
+  app.router.beforeEach((to, from, next) => {
+    EventBus.$emit('beforeEach')
+    next()
+  })
+  // 后置路由守卫
+  app.router.afterEach((to, from) => {
+    const whiteList = ['template-ross-activity-challenge']
+    if (whiteList.indexOf(to.name) > -1) return
+    EventBus.$emit('afterEach')
+  })
+}

+ 1 - 0
static/MP_verify_77ef8FTVty438PCG.txt

@@ -0,0 +1 @@
+77ef8FTVty438PCG