guojy пре 1 година
родитељ
комит
e7ac51ecaf

+ 11 - 1
src/view/course/utils/index.js

@@ -123,7 +123,7 @@ export function setWxConfig(shareInfo) {
             timestamp: config.timestamp,
             nonceStr: config.nonceStr,
             signature: config.signature,
-            jsApiList: ['updateAppMessageShareData']
+            jsApiList: ['updateAppMessageShareData','updateTimelineShareData']
         })
         wx.ready(() => {
             wx.updateAppMessageShareData({
@@ -136,6 +136,16 @@ export function setWxConfig(shareInfo) {
                 console.log("分享成功");
                 },
             });
+            wx.updateTimelineShareData({
+                title: info.title, // 分享标题
+                desc: info.desc, // 分享描述
+                link: info.link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
+                imgUrl: info.imgUrl, // 分享图标
+                success: function () {
+                // 设置成功
+                console.log("分享成功");
+                },
+            });
         });
     }).catch(err=>{
         console.log(err)

+ 3 - 0
src/view/user/create_company.vue

@@ -283,4 +283,7 @@ export default {
 /deep/ .van-dropdown-menu__title::after{
   display: none;
 }
+/deep/ .van-nav-bar__right{
+  overflow: hidden;
+}
 </style>

+ 8 - 7
src/view/user/login_company_list.vue

@@ -45,18 +45,16 @@ export default {
       return moment(time * 1000).format('YYYY-MM-DD HH:mm:ss');
     }
   },
-  created() {
+  // created() {
+  //   this.get_site_list();
+  // },
+  activated(){
     this.get_site_list();
   },
   methods: {
     plus_menu (val) {
       if (val) {
-        this.$router.push({
-          path:'/verify',
-          query:{
-            type:2
-          }
-        })
+        this.$router.push('/verify')
       }
     },
     get_site_list() {
@@ -122,4 +120,7 @@ export default {
 /deep/ .van-dropdown-menu__title::after{
   display: none;
 }
+/deep/ .van-nav-bar__right{
+  overflow: hidden;
+}
 </style>

+ 26 - 3
src/view/user/verify.vue

@@ -13,7 +13,7 @@
           所有数据将被抹除且不可恢复,请谨慎操作!
         </div>
       </div>
-      <van-button v-if="$route.query.type == 2" @click="$router.go(-1)" style="background-color: #26A2FF;border:1px solid #26A2FF;border-radius: 3px;color: #FFF;" block >我知道了</van-button>
+      <van-button v-if="canNext" @click="$route_back" style="background-color: #26A2FF;border:1px solid #26A2FF;border-radius: 3px;color: #FFF;" block >我知道了</van-button>
       <van-button v-else @click="verify" style="background-color: #26A2FF;border:1px solid #26A2FF;border-radius: 3px;color: #FFF;" block >注销</van-button>
     </div>
   </div>
@@ -23,7 +23,12 @@
 export default {
   name: 'verify',
   data () {
-    return {}
+    return {
+      canNext:false
+    }
+  },
+  activated(){
+    this.get_site_list()
   },
   methods: {
     verify () {
@@ -34,7 +39,25 @@ export default {
       }).catch(() => {
         // on cancel
       })
-    }
+    },
+    get_site_list() {
+      this.$toast.loading({
+        mask: false,
+        message: '获取企业信息'
+      });
+      this.$axios('get', '/api/pro/account/site', '', 'token').then(res => {
+        this.$toast.clear();
+        if (res.data.code === 1) {
+          if (res.data.data.length > 0) {
+            this.canNext = true;
+          }else{
+            this.canNext = false;
+          }
+        } else {
+          console.log("获取企业失败")
+        }
+      });
+    },
   }
 }
 </script>