فهرست منبع

注销+苹果无邀请无创建跳转中间页

guojy 1 سال پیش
والد
کامیت
9dca1bb132
5فایلهای تغییر یافته به همراه708 افزوده شده و 590 حذف شده
  1. 1 1
      src/permission.js
  2. 2 0
      src/view/user/account.vue
  3. 9 3
      src/view/user/accountVf.vue
  4. 1 1
      src/view/user/iosIntercept.vue
  5. 695 585
      src/view/user/login.vue

+ 1 - 1
src/permission.js

@@ -59,7 +59,7 @@ router.beforeEach((to, from, next) => {
         })
       }
     }
-  }else if((to.path == '/verify' || to.path == '/accountVf' || path == '/iosIntercept') && localStorage.getItem('a-token-temp')){
+  }else if(((to.path == '/verify') || (to.path == '/accountVf') || (to.path == '/iosIntercept')) && localStorage.getItem('a-token-temp')){
     next()
   } else {
     if (!window.$routes_map[to.name].need_login) { // 在免登录白名单,直接进入

+ 2 - 0
src/view/user/account.vue

@@ -237,8 +237,10 @@ export default {
           if (window.plus) {
             plus.storage.removeItem('Admin-Token');
             plus.storage.removeItem('a-token-temp');
+            plus.storage.removeItem('a-token-tel');
           } else {
             localStorage.removeItem('a-token-temp');
+            localStorage.removeItem('a-token-tel');
             localStorage.removeItem('Admin-Token');
           }
           this.$store.dispatch('clear_cache');

+ 9 - 3
src/view/user/accountVf.vue

@@ -6,7 +6,7 @@
         <div class="login-form-box" style="background-color: #fff;">
           <div class="setp1">
             <van-cell-group>
-              <van-cell title="手机号" v-show="account_info.tel != ''">{{ account_info.tel | mobile }}</van-cell>
+              <van-cell title="手机号" v-show="account_tel != ''">{{ account_tel | mobile }}</van-cell>
               <van-field v-model="formData.origin_verify" center clearable label="验证码" placeholder="请输入短信验证码">
                 <van-button style="border:none;font-size:0.28rem;" :loading="sendMsgLoading" slot="button" size="small" plain type="info" @click="sendMsg" :disabled="sended">
                   {{ sendMsgText }}
@@ -48,6 +48,7 @@ export default {
       next_btn_enable: false,
       userinfo: this.$userInfo(),
       account_info: this.$store.getters.account_info,
+      account_tel:localStorage.getItem('a-token-tel'),
       setp: 1,
       countdown: 90,
       sended: false,
@@ -86,10 +87,13 @@ export default {
       deep: true
     }
   },
+  activated(){
+    // console.log(account_tel)
+  },
   methods: {
     nextReg() {
       this.next_loading = true;
-      let data = { tel: this.account_info.tel, verify: this.formData.origin_verify };
+      let data = { tel: this.account_tel, verify: this.formData.origin_verify };
       this.$axios('post', '/api/pro/destruction', { data: returnJSEncrypt(data) }, 'v2').then(res => {
           if (res.data.code == 1) {
             this.$toast('注销成功');
@@ -107,8 +111,10 @@ export default {
       if (window.plus) {
         plus.storage.removeItem('Admin-Token');
         plus.storage.removeItem('a-token-temp');
+        plus.storage.removeItem('a-token-tel');
       } else {
         localStorage.removeItem('a-token-temp');
+        localStorage.removeItem('a-token-tel');
         localStorage.removeItem('Admin-Token');
       }
       this.$store.dispatch('clear_cache');
@@ -138,7 +144,7 @@ export default {
 
     sendMsg() {
       this.sendMsgLoading = true;
-      let data = { mobile: this.account_info.tel, type: 7 };
+      let data = { mobile: this.account_tel, type: 7 };
       if (!this.verifyPhoneNo(data.mobile)) {
         this.$notify({
           message: '请输入正确手机号码',

+ 1 - 1
src/view/user/iosIntercept.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="page">
-    <van-nav-bar class="left-text-bold" left-text="欢迎使用公道云">
+    <van-nav-bar class="left-text-bold" left-text="返回" title="欢迎使用功道云" @click-left="$route_back" left-arrow>
       <template slot="right" class="department_right_nav">
         <van-dropdown-menu
           duration="0.3"

+ 695 - 585
src/view/user/login.vue

@@ -13,26 +13,53 @@
           </div>
           <div class="setp1">
             <van-cell-group style="margin-top:0.3rem;">
-              <van-field class="tel" left-icon="logo" label-class="hidden" label="" type="Number"
-                v-model="formData.username" placeholder="手机号" clearable style="color:#515151;caret-color:#26A2FF;"
-                name="手机号码" v-validate="'required|phone'">
+              <van-field
+                class="tel"
+                left-icon="logo"
+                label-class="hidden"
+                label=""
+                type="Number"
+                v-model="formData.username"
+                placeholder="手机号"
+                clearable
+                style="color:#515151;caret-color:#26A2FF;"
+                name="手机号码"
+                v-validate="'required|phone'"
+              >
                 <template slot="left-icon">
                   <icon name="tel" class="login_tel"></icon>
                 </template>
               </van-field>
 
-              <van-field class="psw" label-class="hidden" left-icon="logo" clearable type="password" v-model="formData.password" placeholder="密码" name="密码" v-validate="'required|alpha_dash|min:6'"  style="color:#515151;caret-color:#26A2FF;">
+              <van-field
+                class="psw"
+                label-class="hidden"
+                left-icon="logo"
+                clearable
+                type="password"
+                v-model="formData.password"
+                placeholder="密码"
+                name="密码"
+                v-validate="'required|alpha_dash|min:6'"
+                style="color:#515151;caret-color:#26A2FF;"
+              >
                 <template slot="left-icon">
                   <icon name="pwd" class="login_pwd"></icon>
                 </template>
               </van-field>
-
             </van-cell-group>
           </div>
 
           <div style="padding:0 0.32rem">
-            <van-button class="login_button" color="#228bf8" size="large" :disabled="!next_btn_enable"
-              @click="sendLogin" type="info">登录</van-button>
+            <van-button
+              class="login_button"
+              color="#228bf8"
+              size="large"
+              :disabled="!next_btn_enable"
+              @click="sendLogin"
+              type="info"
+              >登录</van-button
+            >
           </div>
           <div style="padding:0.2rem 0.32rem 0.2rem;" class="reg_link_box">
             <van-row>
@@ -44,8 +71,10 @@
               </van-col>
             </van-row>
           </div>
-          <div style="text-align: center; padding:0 0.32rem;letter-spacing: 0.01rem"
-            v-if="(auths.length > 0&&isAndroid)||$isWx">
+          <div
+            style="text-align: center; padding:0 0.32rem;letter-spacing: 0.01rem"
+            v-if="(auths.length > 0 && isAndroid) || $isWx"
+          >
             <van-divider>快捷登录</van-divider>
             <div style="display: inline-block;" @click="doWeixinLogin">
               <icon name="weixindenglu" style="width:1.2rem;"></icon>
@@ -53,25 +82,45 @@
           </div>
         </div>
         <div class="footer flex-box-ce flex-center-center" v-if="!$isWx">
-          <van-checkbox icon-size="14px" v-model="isYsShow">登录即同意功道云</van-checkbox>
-          <span style="color:#28a2f1" @click="$router.push({ name: 'user_agreement' })">《服务协议》</span>
+          <van-checkbox icon-size="14px" v-model="isYsShow"
+            >登录即同意功道云</van-checkbox
+          >
+          <span
+            style="color:#28a2f1"
+            @click="$router.push({ name: 'user_agreement' })"
+            >《服务协议》</span
+          >
           <span>&</span>
-          <span style="color:#28a2f1" @click="$router.push({ name: 'privacy_agreement' })">《隐私政策》</span>
+          <span
+            style="color:#28a2f1"
+            @click="$router.push({ name: 'privacy_agreement' })"
+            >《隐私政策》</span
+          >
         </div>
       </div>
     </div>
 
-
-
     <!-- 隐私条例 -->
-    <van-popup v-model="showYs" :close-on-click-overlay="false" class="popup-all">
+    <van-popup
+      v-model="showYs"
+      :close-on-click-overlay="false"
+      class="popup-all"
+    >
       <div style="position: relative;">
         <div class="title">提示</div>
         <div class="content">
           使用本软件前请认真阅读我们的
-          <span style="color:#28a2f1" @click="$router.push({ name: 'user_agreement' })">《用户服务协议》</span>
+          <span
+            style="color:#28a2f1"
+            @click="$router.push({ name: 'user_agreement' })"
+            >《用户服务协议》</span
+          >
-          <span style="color:#28a2f1" @click="$router.push({ name: 'privacy_agreement' })">《隐私协议》</span>
+          <span
+            style="color:#28a2f1"
+            @click="$router.push({ name: 'privacy_agreement' })"
+            >《隐私协议》</span
+          >
           相关条款,您也可以稍后在应用设置里浏览查看。点击“同意使用”即表示您接受我们的服务协议和隐私政策,继续使用我们的软件。
         </div>
         <div class="footer2 flex-box-ce">
@@ -84,29 +133,63 @@
     <!-- 微信登录 -->
     <van-popup v-model="isShowSelect" class="popup-all">
       <div style="position: relative;">
-        <div style="position: absolute;top:16px;right:16px" @click="isShowSelect=false"><van-icon name="cross" /></div>
+        <div
+          style="position: absolute;top:16px;right:16px"
+          @click="isShowSelect = false"
+        >
+          <van-icon name="cross" />
+        </div>
         <div class="contentBox">
           <div class="">欢迎使用功道云!</div>
           <p>请选择以下进入方式,如已有登录账号<br />请先绑定账号再进入</p>
         </div>
         <div class="btns" style="padding-bottom: 16px;">
-          <div class="bdBtn" @click="$router.push({ name: 'bindingPhone', query: { secret: wo_token } })">绑定已有账号</div>
-          <div style="font-size: 0.28rem;color: #666" @click="wxLogin">创建新账号</div>
+          <div
+            class="bdBtn"
+            @click="
+              $router.push({
+                name: 'bindingPhone',
+                query: { secret: wo_token }
+              })
+            "
+          >
+            绑定已有账号
+          </div>
+          <div style="font-size: 0.28rem;color: #666" @click="wxLogin">
+            创建新账号
+          </div>
         </div>
       </div>
     </van-popup>
 
-    <van-dialog v-model="isShowDialog" confirmButtonText="同意并继续" confirmButtonColor="#238cf9" @confirm="confirmDialog">
+    <van-dialog
+      v-model="isShowDialog"
+      confirmButtonText="同意并继续"
+      confirmButtonColor="#238cf9"
+      @confirm="confirmDialog"
+    >
       <div style="padding: 0.3rem;">
         <div class="flex-box-ce" style="margin-bottom: 0.24rem;">
-          <div style="font-size: 0.4rem;font-weight: 700;" class="flex-1 black">服务协议和隐私政策</div>
-          <van-icon name="cross" @click="isShowDialog=false" class="fontColorC"
-            style="font-size: 0.3rem;position: relative;top: -0.1rem;right: -0.1rem;" />
+          <div style="font-size: 0.4rem;font-weight: 700;" class="flex-1 black">
+            服务协议和隐私政策
+          </div>
+          <van-icon
+            name="cross"
+            @click="isShowDialog = false"
+            class="fontColorC"
+            style="font-size: 0.3rem;position: relative;top: -0.1rem;right: -0.1rem;"
+          />
         </div>
         <div class="fontColorC">
-          为了更好地保障你的合法权益,使用前请阅读并同意功道云<span style="color:#28a2f1"
-            @click="$router.push({ name: 'user_agreement' })">《服务协议》</span>&<span style="color:#28a2f1"
-            @click="$router.push({ name: 'privacy_agreement' })">《隐私政策》</span>
+          为了更好地保障你的合法权益,使用前请阅读并同意功道云<span
+            style="color:#28a2f1"
+            @click="$router.push({ name: 'user_agreement' })"
+            >《服务协议》</span
+          >&<span
+            style="color:#28a2f1"
+            @click="$router.push({ name: 'privacy_agreement' })"
+            >《隐私政策》</span
+          >
         </div>
       </div>
     </van-dialog>
@@ -114,612 +197,639 @@
 </template>
 
 <script>
-  import {
-    setToken,
-    returnJSEncrypt
-  } from '@/utils/auth';
-  import axios from 'axios';
-  import qs from 'qs';
-  import Vue from 'vue';
-  import {
-    Divider
-  } from 'vant';
-  Vue.use(Divider);
-  export default {
-    name: 'login',
-    data() {
-      return {
-        input_focus: false,
-        next_btn_enable: false,
-        isAndroid: this.$getCache('isAndroid'),
-        formData: {
-          username: '',
-          password: ''
-        },
-        aweixin: null,
-        auths: [],
-
-        index: 0,
-        // 微信登录
-        isShowSelect: false,
-        // 隐私相关
-        isYsShow: false,
-        showYs: false,
-        wo_token: '',
-        isShowDialog: false,
-        // wo_token:'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOm51bGwsImlhdCI6MTY0MjI0MDQ3NywiZXhwIjoxNjQ0ODMyNDc3LCJuYmYiOjE2NDIyNDA0NzcsImp0aSI6ImtlZmVxZ09yMVZYWEVNZmwiLCJzdWIiOjgsInBydiI6IjAzMDBhNTQ5YWI4ZjcwMmNkYTgzMjMxYTQxMzMyZWNjYmRlOWRmOGYiLCJyb2xlIjoid2VjaGF0X29wZW5fdXNlciJ9.SRt2d8-J3FXQ0UFU27csIiGOJvOSxzQSoDMV-LpE3ZM' //微信登录token
-      };
-    },
-    created() {
-      let that = this;
-      document.body.addEventListener('blur', function(e) {
+import { setToken, returnJSEncrypt } from "@/utils/auth";
+import axios from "axios";
+import qs from "qs";
+import Vue from "vue";
+import { Divider } from "vant";
+Vue.use(Divider);
+export default {
+  name: "login",
+  data() {
+    return {
+      input_focus: false,
+      next_btn_enable: false,
+      isAndroid: this.$getCache("isAndroid"),
+      formData: {
+        username: "",
+        password: ""
+      },
+      aweixin: null,
+      auths: [],
+
+      index: 0,
+      // 微信登录
+      isShowSelect: false,
+      // 隐私相关
+      isYsShow: false,
+      showYs: false,
+      wo_token: "",
+      isShowDialog: false
+      // wo_token:'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOm51bGwsImlhdCI6MTY0MjI0MDQ3NywiZXhwIjoxNjQ0ODMyNDc3LCJuYmYiOjE2NDIyNDA0NzcsImp0aSI6ImtlZmVxZ09yMVZYWEVNZmwiLCJzdWIiOjgsInBydiI6IjAzMDBhNTQ5YWI4ZjcwMmNkYTgzMjMxYTQxMzMyZWNjYmRlOWRmOGYiLCJyb2xlIjoid2VjaGF0X29wZW5fdXNlciJ9.SRt2d8-J3FXQ0UFU27csIiGOJvOSxzQSoDMV-LpE3ZM' //微信登录token
+    };
+  },
+  created() {
+    let that = this;
+    document.body.addEventListener(
+      "blur",
+      function(e) {
         setTimeout(() => {
-          e.target.parentNode.parentNode.parentNode.classList.remove('field-focus');
+          e.target.parentNode.parentNode.parentNode.classList.remove(
+            "field-focus"
+          );
           that.input_focus = false;
         }, 100);
-      }, true);
-      document.body.addEventListener('focus', function(e) {
-        e.target.parentNode.parentNode.parentNode.classList.add('field-focus');
+      },
+      true
+    );
+    document.body.addEventListener(
+      "focus",
+      function(e) {
+        e.target.parentNode.parentNode.parentNode.classList.add("field-focus");
         setTimeout(() => {
           that.input_focus = true;
         }, 100);
-      }, true);
-      this.$store.commit('SET_USERINFO', {}); // 清空人员信息
-      this.$store.commit('SET_USERID', 0);
-      // alert(`$isWx${this.$isWx}`)
-      if (this.$isWx) {
-        this.doWeixinLogin();
-        return false
-      }
+      },
+      true
+    );
+    this.$store.commit("SET_USERINFO", {}); // 清空人员信息
+    this.$store.commit("SET_USERID", 0);
+    // alert(`$isWx${this.$isWx}`)
+    if (this.$isWx) {
+      this.doWeixinLogin();
+      return false;
+    }
+    if (window.plus) {
+      this.hei = plus.navigator.getStatusbarHeight();
+      this.getServiceOauth();
+    }
+  },
+  mounted() {
+    this.$removeCache("account");
+  },
+  watch: {
+    formData: {
+      handler(val, oldVal) {
+        if (val.username != "" && val.password != "") {
+          this.next_btn_enable = true;
+        } else {
+          this.next_btn_enable = false;
+        }
+      },
+      deep: true
+    }
+  },
+  methods: {
+    confirmDialog() {
+      this.isShowDialog = true;
+      this.isYsShow = true;
+    },
+    wxLogin() {
+      let pl = "a";
       if (window.plus) {
-        this.hei = plus.navigator.getStatusbarHeight();
-        this.getServiceOauth();
+        if (navigator.userAgent.indexOf("Android") > 0) {
+          pl = "a";
+        } else {
+          pl = "i";
+        }
       }
+      axios({
+        method: "post",
+        url: process.env.BASE_API + "/api/pro/wo/create",
+        headers: {
+          "Content-Type": "application/x-www-form-urlencoded",
+          pl: pl,
+          "A-TOKEN": this.wo_token
+        }
+      }).then(res => {
+        if (res.data.code == 1) {
+          this.$setCache("account", res.data.data.account);
+          localStorage.setItem("a-token-temp", res.data.data.token); // 保存平台账号登录的token
+          this.registrationExperience(); //进入体验账号
+        } else {
+          this.$toast(res.data.msg);
+        }
+      });
     },
-    mounted() {
-      this.$removeCache('account')
-    },
-    watch: {
-      formData: {
-        handler(val, oldVal) {
-          if (val.username != '' && val.password != '') {
-            this.next_btn_enable = true;
-          } else {
-            this.next_btn_enable = false;
-          }
-        },
-        deep: true
+    openUrl(index) {
+      if (!this.isLogin()) {
+        return false;
+      }
+      if (index == 1) {
+        this.$router.push({
+          name: "forget_pwd"
+        });
+      } else {
+        this.$router.push({
+          name: "reg"
+        });
       }
     },
-    methods: {
-      confirmDialog() {
+    openHome() {
+      setTimeout(() => {
+        window.location.href = window.location.href.split("#")[0];
+      }, 100);
+    },
+    isLogin() {
+      if (!this.isYsShow && process.env.NODE_ENV == "production") {
         this.isShowDialog = true;
-        this.isYsShow = true
-      },
-      wxLogin() {
-        let pl = 'a';
-        if (window.plus) {
-          if (navigator.userAgent.indexOf('Android') > 0) {
-            pl = 'a';
-          } else {
-            pl = 'i';
-          }
-        }
-        axios({
-          method: 'post',
-          url: process.env.BASE_API + '/api/pro/wo/create',
-          headers: {
-            'Content-Type': 'application/x-www-form-urlencoded',
-            pl: pl,
-            'A-TOKEN': this.wo_token
-          }
-        }).then(res => {
-          if (res.data.code == 1) {
-            this.$setCache('account', res.data.data.account);
-            localStorage.setItem('a-token-temp', res.data.data.token); // 保存平台账号登录的token
-            this.registrationExperience(); //进入体验账号
-          } else {
-            this.$toast(res.data.msg);
+        return false;
+      } else {
+        return true;
+      }
+    },
+    // 判断是否获取微信登录认证
+    getServiceOauth() {
+      var that = this;
+      if (window.plus) {
+        plus.oauth.getServices(function(services) {
+          that.auths = services;
+          for (let i in services) {
+            if (services[i].id == "weixin") {
+              that.aweixin = services[i];
+            }
           }
         });
-      },
-      openUrl(index) {
-        if (!this.isLogin()) {
-          return false
-        }
-        if (index == 1) {
-          this.$router.push({
-            name: 'forget_pwd'
-          });
+      }
+    },
+    doWeixinLogin() {
+      if (this.$isWx) {
+        if (this.isAndroid) {
+          window.open(process.env.VUE_APP_WXURL, "_blank");
         } else {
-          this.$router.push({
-            name: 'reg'
-          });
+          window.location.href = process.env.VUE_APP_WXURL;
         }
-      },
-      openHome() {
-        setTimeout(() => {
-          window.location.href = window.location.href.split('#')[0];
-        }, 100);
-      },
-      isLogin() {
-        if (!this.isYsShow && process.env.NODE_ENV == 'production') {
-          this.isShowDialog = true;
-          return false;
-        } else {
-          return true;
+        return false;
+      }
+      let that = this;
+      if (window.plus && this.isLogin()) {
+        if (this.aweixin == null) {
+          plus.nativeUI.alert("当前环境不支持微信登录");
+          return;
         }
-      },
-      // 判断是否获取微信登录认证
-      getServiceOauth() {
-        var that = this;
-        if (window.plus) {
-          plus.oauth.getServices(function(services) {
-            that.auths = services;
-            for (let i in services) {
-              if (services[i].id == 'weixin') {
-                that.aweixin = services[i];
-              }
+        this.aweixin.authorize(
+          function(e) {
+            that.WeixinLogin(e.code);
+          },
+          function(e) {
+            if (e.code == "-1002") {
+              plus.nativeUI.alert("请先安装微信客户端");
             }
-          });
-        }
-      },
-      doWeixinLogin() {
-        if (this.$isWx) {
-          if (this.isAndroid) {
-            window.open(process.env.VUE_APP_WXURL, '_blank');
-          } else {
-            window.location.href = process.env.VUE_APP_WXURL
+          },
+          {
+            scope: "snsapi_userinfo",
+            state: "authorize test",
+            appid: "wx84f9a9b3ce29f450"
           }
-          return false
-        }
-        let that = this;
-        if (window.plus && this.isLogin()) {
-          if (this.aweixin == null) {
-            plus.nativeUI.alert('当前环境不支持微信登录');
-            return;
-          }
-          this.aweixin.authorize(
-            function(e) {
-              that.WeixinLogin(e.code);
-            },
-            function(e) {
-              if (e.code == '-1002') {
-                plus.nativeUI.alert('请先安装微信客户端');
+        );
+      }
+    },
+    sendLogin() {
+      if (!this.isLogin()) {
+        return false;
+      }
+      this.$validator.validate().then(result => {
+        if (!result) {
+          this.$notify({
+            type: "danger",
+            message: this.$validator.errors.items[0].msg
+          });
+        } else {
+          this.$toast.loading({
+            mask: true,
+            message: "正在登录..."
+          });
+          this.$store
+            .dispatch("login", {
+              tel: this.formData.username,
+              password: this.formData.password
+            })
+            .then(res => {
+              if (res.code == 1) {
+                localStorage.setItem('a-token-tel',this.formData.username)
+                localStorage.setItem("a-token-temp", res.data.token); // 保存平台账号登录的token
+                // if (window.plus) {
+                //   let deviceInfo = window.plus.os.name;
+                //   if (
+                //     deviceInfo === "IOS" &&
+                //     res.data.account_site.length > 0
+                //   ) {
+                //     console.log("苹果软件用户有创建公司");
+                //   }
+                //   if (
+                //     deviceInfo === "IOS" &&
+                //     res.data.account_site.length == 0
+                //   ) {
+                //     console.log("苹果软件用户没有创建公司");
+                //   }
+                // }
+                console.log(res.data.account_site);
+                this.openUrl2(
+                  res.data.account_site,
+                  res.data.invitation_wait_count
+                );
+              } else {
+                this.$toast.fail({
+                  message: res.msg,
+                  duration: 1000
+                });
               }
-            }, {
-              scope: 'snsapi_userinfo',
-              state: 'authorize test',
-              appid: 'wx84f9a9b3ce29f450'
-            }
-          );
-        }
-      },
-      sendLogin() {
-        if (!this.isLogin()) {
-          return false
-        }
-        this.$validator.validate().then(result => {
-          if (!result) {
-            this.$notify({
-              type: 'danger',
-              message: this.$validator.errors.items[0].msg
+            })
+            .finally(() => {
+              this.$toast.clear();
             });
-          } else {
-            this.$toast.loading({
-              mask: true,
-              message: '正在登录...'
-            });
-            this.$store.dispatch('login', {
-                tel: this.formData.username,
-                password: this.formData.password
-              }).then(res => {
-                if (res.code == 1) {
-                  localStorage.setItem('a-token-temp', res.data.token); // 保存平台账号登录的token
-                  if(window.plus){
-                    let deviceInfo = window.plus.os.name;
-                    if(deviceInfo === 'IOS'&&res.data.account_site.length > 0){
-                      console.log('苹果软件用户有创建公司')
-                    }
-                    if(deviceInfo === 'IOS'&&res.data.account_site.length == 0){
-                      console.log('苹果软件用户没有创建公司')
-                    }
-                  }
-                  console.log(res.data.account_site)
-                  this.openUrl2(res.data.account_site, res.data.invitation_wait_count);
-                } else {
-                  this.$toast.fail({
-                    message: res.msg,
-                    duration: 1000
-                  });
-                }
-              })
-              .finally(() => {
-                this.$toast.clear();
-              });
-          }
-        });
-      },
-      // 直接进入,跳过选择行业与公司,体验账户专用
-      registrationExperience() {
+        }
+      });
+    },
+    // 直接进入,跳过选择行业与公司,体验账户专用
+    registrationExperience() {
+      if (window.plus&&(navigator.userAgent.indexOf('iPhone') > 0)) {
+        this.$router.replace({
+          name: 'iosIntercept'
+        })
+      } else {
         this.$router.replace({
           name: 'create_company'
         })
-      },
-      WeixinLogin(code) {
-        this.$toast.loading({
-          mask: true,
-          message: '正在登录...'
-        });
-        let pl = 'a';
-        if (window.plus) {
-          if (navigator.userAgent.indexOf('Android') > 0) {
-            pl = 'a';
-          } else {
-            pl = 'i';
-          }
+      }
+    },
+    WeixinLogin(code) {
+      this.$toast.loading({
+        mask: true,
+        message: "正在登录..."
+      });
+      let pl = "a";
+      if (window.plus) {
+        if (navigator.userAgent.indexOf("Android") > 0) {
+          pl = "a";
+        } else {
+          pl = "i";
         }
-        let data = {
-          code: code,
-        };
-        axios({
-          method: 'post',
-          url: process.env.BASE_API + '/api/pro/wo/code',
-          data: qs.stringify({
-            data: returnJSEncrypt(data)
-          }),
-          headers: {
-            'Content-Type': 'application/x-www-form-urlencoded',
-            pl: pl
-          }
-        }).then(res => {
-          if (res.data.code == 1) {
-            this.wo_token = res.data.data.wo_token;
-            this.wxSelect();
-          } else {
-            this.$toast(res.data.msg);
-          }
-        });
-      },
-      wxSelect() {
-        let pl = 'a';
-        if (window.plus) {
-          if (navigator.userAgent.indexOf('Android') > 0) {
-            pl = 'a';
-          } else {
-            pl = 'i';
-          }
+      }
+      let data = {
+        code: code
+      };
+      axios({
+        method: "post",
+        url: process.env.BASE_API + "/api/pro/wo/code",
+        data: qs.stringify({
+          data: returnJSEncrypt(data)
+        }),
+        headers: {
+          "Content-Type": "application/x-www-form-urlencoded",
+          pl: pl
         }
-        axios({
-          method: 'get',
-          url: process.env.BASE_API + '/api/pro/wo/oui',
-          headers: {
-            'Content-Type': 'application/x-www-form-urlencoded',
-            pl: pl,
-            'A-TOKEN': this.wo_token
-          }
-        }).then(res => {
-          if (res.data.code == 1) {
-            this.$setCache('account', res.data.data.account);
-            if (res.data.data.account_id !== 0) {
-              localStorage.setItem('a-token-temp', res.data.data.token); // 保存平台账号登录的token
-              // 已绑定平台账号
-              this.openUrl2(res.data.data.account_site, res.data.data.invitation_wait_count);
-            } else {
-              this.$router.replace({
-                name: 'regWx',
-                query: {
-                  wo_token: this.wo_token
-                }
-              });
-              // this.isShowSelect = true;
-            }
+      }).then(res => {
+        if (res.data.code == 1) {
+          this.wo_token = res.data.data.wo_token;
+          this.wxSelect();
+        } else {
+          this.$toast(res.data.msg);
+        }
+      });
+    },
+    wxSelect() {
+      let pl = "a";
+      if (window.plus) {
+        if (navigator.userAgent.indexOf("Android") > 0) {
+          pl = "a";
+        } else {
+          pl = "i";
+        }
+      }
+      axios({
+        method: "get",
+        url: process.env.BASE_API + "/api/pro/wo/oui",
+        headers: {
+          "Content-Type": "application/x-www-form-urlencoded",
+          pl: pl,
+          "A-TOKEN": this.wo_token
+        }
+      }).then(res => {
+        if (res.data.code == 1) {
+          this.$setCache("account", res.data.data.account);
+          if (res.data.data.account_id !== 0) {
+            localStorage.setItem("a-token-temp", res.data.data.token); // 保存平台账号登录的token
+            // 已绑定平台账号
+            this.openUrl2(
+              res.data.data.account_site,
+              res.data.data.invitation_wait_count
+            );
           } else {
-            this.$toast(res.data.msg);
-          }
-        });
-      },
-      openUrl2(account_site, invitation_wait_count) {
-        if (account_site.length > 0) {
-          // 公司数量
-          if (invitation_wait_count > 0) {
-            this.$router.push({
-              name: 'registration_experience',
+            this.$router.replace({
+              name: "regWx",
               query: {
-                invite: 1,
-                iscompany: 1
+                wo_token: this.wo_token
               }
-            }); // 选择行业
-          } else {
-            this.$router.push({
-              name: 'login_company_list'
-            }); // 选择企业
+            });
+            // this.isShowSelect = true;
           }
         } else {
-          if (invitation_wait_count > 0) {
-            // 待邀请数量
-            this.$router.push({
-              name: 'registration_experience',
-              query: {
-                invite: 1
-              }
-            }); // 选择行业
-          } else {
-            this.registrationExperience(); //进入体验账号
-          }
+          this.$toast(res.data.msg);
         }
-      },
-      // 关闭APP
-      closeYs2() {
-        this.isYsShow = false;
-        this.showYs = false;
-        if (window.plus) {
-          plus.runtime.quit();
+      });
+    },
+    openUrl2(account_site, invitation_wait_count) {
+      if (account_site.length > 0) {
+        // 公司数量
+        if (invitation_wait_count > 0) {
+          this.$router.push({
+            name: "registration_experience",
+            query: {
+              invite: 1,
+              iscompany: 1
+            }
+          }); // 选择行业
+        } else {
+          this.$router.push({
+            name: "login_company_list"
+          }); // 选择企业
         }
-      },
-      // 关闭隐私
-      closeYs() {
-        localStorage.setItem('isYsShow', true);
-        this.isYsShow = true;
-        this.showYs = false;
-      },
+      } else {
+        if (invitation_wait_count > 0) {
+          // 待邀请数量
+          this.$router.push({
+            name: "registration_experience",
+            query: {
+              invite: 1
+            }
+          }); // 选择行业
+        } else {
+          this.registrationExperience(); //进入体验账号
+        }
+      }
+    },
+    // 关闭APP
+    closeYs2() {
+      this.isYsShow = false;
+      this.showYs = false;
+      if (window.plus) {
+        plus.runtime.quit();
+      }
+    },
+    // 关闭隐私
+    closeYs() {
+      localStorage.setItem("isYsShow", true);
+      this.isYsShow = true;
+      this.showYs = false;
     }
-  };
+  }
+};
 </script>
 
 <style rel="stylesheet/scss" lang="scss" scoped>
-  .contentBox {
-    text-align: center;
-    padding: 50px 0;
-
-    div {
-      font-size: 0.38rem;
-      color: #222;
-    }
-
-    p {
-      font-size: 0.28rem;
-      color: #666;
-    }
-  }
-
-  .bdBtn {
-    width: 80%;
-    padding: 10px;
-    border-radius: 25px;
-    background-image: linear-gradient(117deg, #04b3fb, #31d4ff);
-    color: #fff;
-    margin: 0 auto;
-    margin-bottom: 16px;
-  }
-
-  .popup-all {
-    border-radius: 0.15rem;
-    background: #fff;
-    width: 80%;
-    text-align: center;
-    font-size: 0.32rem;
-
-    .title {
-      padding: 0.2rem 0;
-    }
-
-    .content {
-      font-size: 0.28rem;
-      padding: 0 0.2rem;
-      padding-bottom: 0.2rem;
-      height: 3rem;
-      // overflow-y: scroll;
-    }
-
-    .footer2 div:nth-child(1) {
-      background-color: #ccc;
-      color: #333333;
-      padding: 0.24rem 0;
-      font-size: 0.28rem;
-    }
-
-    .footer2 div:nth-child(2) {
-      background-color: #1989fa;
-      color: #fff;
-      padding: 0.24rem 0;
-      font-size: 0.28rem;
-    }
-  }
-
-  .body_com {
-    background-color: #fff;
-    position: fixed;
-    top: 1rem;
-    left: 0;
-    right: 0;
-    bottom: 0;
-    overflow: auto;
-    z-index: 2;
-  }
-
-  .login_button {
-    height: 1rem;
-    line-height: 0.8rem;
-    border-radius: 0.15rem;
-  }
-
-  .imgLsit img {
-    height: 100%;
-    width: 100%;
-    vertical-align: bottom;
-  }
-
-  .input_focus.login-box {
-    height: calc(100% - 0rem);
-  }
-
-  .login-box {
-    height: calc(100%);
-    position: relative;
-  }
-
-  .login-box-parent .van-field__icon .van-icon {
-    color: #4b0;
-  }
-
-  .login-form-box-bg {
-    position: absolute;
-    top: -0.4rem;
-    left: 0;
-    width: 100%;
-    height: 3.4rem;
-    color: #26a2ff;
-  }
-
-  .login_logo {
-    position: relative;
-    display: block;
-    margin: -1.45rem auto;
-    width: 3.6rem;
-    color: #fff;
-    margin-bottom: 0rem;
-    z-index: 1;
-  }
-
-  .setp1,
-  .setp2 {
-    padding-bottom: 0.5rem;
-  }
-
-  .login-box-parent .mint-cell.cell-last:before {
-    bottom: 0;
-  }
+.contentBox {
+  text-align: center;
+  padding: 50px 0;
 
-  .login-box .van-cell[data-v-1a0d0fb5]:not(:last-child)::after {
-    border: none;
-    border-bottom: 0.02rem #efefef solid;
-    transform: scaleY(0.5);
-    left: 0.32rem;
-    right: 0.32rem;
+  div {
+    font-size: 0.38rem;
+    color: #222;
   }
 
-  .login-box .login-form-box .tel {
-    font-size: 0.32rem;
-    margin-bottom: 0.16rem;
-    padding: 0.2rem 0.32rem;
-    line-height: 0.5rem;
-  }
-
-  .login-box .login-form-box .tel .login_tel {
-    width: 0.37rem;
-    height: 0.37rem;
-    color: #b8b8b8;
-    margin-top: -0.06rem;
-    margin-left: -0.06rem;
-    padding-right: 0rem;
-    border-right: none;
-  }
-
-  .login-box .login-form-box .psw {
-    font-size: 0.32rem;
-    margin-bottom: 0.16rem;
-    padding: 0.2rem 0.32rem;
-    line-height: 0.5rem;
-  }
-
-  .login-box .login-form-box .psw .login_pwd {
-    width: 0.37rem;
-    height: 0.37rem;
-    color: #b8b8b8;
-    margin-top: -0.05rem;
-    margin-left: -0.06rem;
-    padding-right: 0rem;
-    border-right: none;
-  }
-
-  /deep/ .login-box input {
-    font-size: 0.4rem !important;
-    color: #1c1c1c;
-    letter-spacing: 0.005rem;
-  }
-
-  .login-box ::-webkit-input-placeholder {
-    font-size: 0.32rem;
-    color: #b8b8b8 !important;
-    letter-spacing: 0.005rem;
-  }
-
-  .login-box input:-ms-input-placeholder {
-    font-size: 0.32rem;
-    color: #b8b8b8 !important;
-    letter-spacing: 0.005rem;
-  }
-
-  .login-box ::-moz-input-placeholder {
-    font-size: 0.32rem;
-    color: #b8b8b8 !important;
-    letter-spacing: 0.005rem;
-  }
-
-  // .login-box .field-focus ::-webkit-input-placeholder{
-  //   color:#238cf9 !important;
-  // }
-  // .login-box input:-ms-input-placeholder {
-  //    color:#238cf9 !important;
-  //  }
-  // .login-box .field-focus ::-moz-input-placeholder {
-  //   color:#238cf9 !important;
-  // }
-  // .login-box .field-focus .login_tel{
-  //   color:#238cf9 !important;
-  // }
-  // .login-box .field-focus .login_pwd {
-  //   color:#238cf9 !important;
-  // }
-  .login-box .van-hairline--top-bottom:after {
-    border: none;
-    border-bottom: 0.02rem #efefef solid;
-    transform: scaleY(0.5);
-    left: 0.32rem;
-    right: 0.32rem;
-  }
-
-  .login-box .van-hairline-unset--top-bottom:after {
-    border: none;
-    border-bottom: 0.02rem #efefef solid;
-    transform: scaleY(0.5);
-    left: 0.32rem;
-    right: 0.32rem;
-  }
-
-  // /deep/ .login-box .field-focus:after {
-  //   border-bottom: 0.02rem #238cf9 solid !important;
-  // }
-  .login-box .van-row {
-    margin-top: 0.08rem;
+  p {
     font-size: 0.28rem;
+    color: #666;
   }
-
-  .login-box .van-row .van-col:not(:last-child) {
-    color: #9e9da3;
-  }
-
-  .login-box .van-row .van-col {
-    color: #28a2f1;
-    letter-spacing: 0.005rem;
+}
+
+.bdBtn {
+  width: 80%;
+  padding: 10px;
+  border-radius: 25px;
+  background-image: linear-gradient(117deg, #04b3fb, #31d4ff);
+  color: #fff;
+  margin: 0 auto;
+  margin-bottom: 16px;
+}
+
+.popup-all {
+  border-radius: 0.15rem;
+  background: #fff;
+  width: 80%;
+  text-align: center;
+  font-size: 0.32rem;
+
+  .title {
+    padding: 0.2rem 0;
   }
 
-  .login-box .login_button {
-    height: 1rem;
-    line-height: 0.8rem;
-    border-radius: 0.04rem;
+  .content {
+    font-size: 0.28rem;
+    padding: 0 0.2rem;
+    padding-bottom: 0.2rem;
+    height: 3rem;
+    // overflow-y: scroll;
   }
 
-  .footer {
+  .footer2 div:nth-child(1) {
+    background-color: #ccc;
+    color: #333333;
+    padding: 0.24rem 0;
     font-size: 0.28rem;
-    line-height: 1rem;
-    text-align: center;
-    letter-spacing: 0.005rem;
-    margin-bottom: 0.5rem;
   }
 
-  .footer a {
-    color: #1989fa;
+  .footer2 div:nth-child(2) {
+    background-color: #1989fa;
+    color: #fff;
+    padding: 0.24rem 0;
+    font-size: 0.28rem;
   }
+}
+
+.body_com {
+  background-color: #fff;
+  position: fixed;
+  top: 1rem;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  overflow: auto;
+  z-index: 2;
+}
+
+.login_button {
+  height: 1rem;
+  line-height: 0.8rem;
+  border-radius: 0.15rem;
+}
+
+.imgLsit img {
+  height: 100%;
+  width: 100%;
+  vertical-align: bottom;
+}
+
+.input_focus.login-box {
+  height: calc(100% - 0rem);
+}
+
+.login-box {
+  height: calc(100%);
+  position: relative;
+}
+
+.login-box-parent .van-field__icon .van-icon {
+  color: #4b0;
+}
+
+.login-form-box-bg {
+  position: absolute;
+  top: -0.4rem;
+  left: 0;
+  width: 100%;
+  height: 3.4rem;
+  color: #26a2ff;
+}
+
+.login_logo {
+  position: relative;
+  display: block;
+  margin: -1.45rem auto;
+  width: 3.6rem;
+  color: #fff;
+  margin-bottom: 0rem;
+  z-index: 1;
+}
+
+.setp1,
+.setp2 {
+  padding-bottom: 0.5rem;
+}
+
+.login-box-parent .mint-cell.cell-last:before {
+  bottom: 0;
+}
+
+.login-box .van-cell[data-v-1a0d0fb5]:not(:last-child)::after {
+  border: none;
+  border-bottom: 0.02rem #efefef solid;
+  transform: scaleY(0.5);
+  left: 0.32rem;
+  right: 0.32rem;
+}
+
+.login-box .login-form-box .tel {
+  font-size: 0.32rem;
+  margin-bottom: 0.16rem;
+  padding: 0.2rem 0.32rem;
+  line-height: 0.5rem;
+}
+
+.login-box .login-form-box .tel .login_tel {
+  width: 0.37rem;
+  height: 0.37rem;
+  color: #b8b8b8;
+  margin-top: -0.06rem;
+  margin-left: -0.06rem;
+  padding-right: 0rem;
+  border-right: none;
+}
+
+.login-box .login-form-box .psw {
+  font-size: 0.32rem;
+  margin-bottom: 0.16rem;
+  padding: 0.2rem 0.32rem;
+  line-height: 0.5rem;
+}
+
+.login-box .login-form-box .psw .login_pwd {
+  width: 0.37rem;
+  height: 0.37rem;
+  color: #b8b8b8;
+  margin-top: -0.05rem;
+  margin-left: -0.06rem;
+  padding-right: 0rem;
+  border-right: none;
+}
+
+/deep/ .login-box input {
+  font-size: 0.4rem !important;
+  color: #1c1c1c;
+  letter-spacing: 0.005rem;
+}
+
+.login-box ::-webkit-input-placeholder {
+  font-size: 0.32rem;
+  color: #b8b8b8 !important;
+  letter-spacing: 0.005rem;
+}
+
+.login-box input:-ms-input-placeholder {
+  font-size: 0.32rem;
+  color: #b8b8b8 !important;
+  letter-spacing: 0.005rem;
+}
+
+.login-box ::-moz-input-placeholder {
+  font-size: 0.32rem;
+  color: #b8b8b8 !important;
+  letter-spacing: 0.005rem;
+}
+
+// .login-box .field-focus ::-webkit-input-placeholder{
+//   color:#238cf9 !important;
+// }
+// .login-box input:-ms-input-placeholder {
+//    color:#238cf9 !important;
+//  }
+// .login-box .field-focus ::-moz-input-placeholder {
+//   color:#238cf9 !important;
+// }
+// .login-box .field-focus .login_tel{
+//   color:#238cf9 !important;
+// }
+// .login-box .field-focus .login_pwd {
+//   color:#238cf9 !important;
+// }
+.login-box .van-hairline--top-bottom:after {
+  border: none;
+  border-bottom: 0.02rem #efefef solid;
+  transform: scaleY(0.5);
+  left: 0.32rem;
+  right: 0.32rem;
+}
+
+.login-box .van-hairline-unset--top-bottom:after {
+  border: none;
+  border-bottom: 0.02rem #efefef solid;
+  transform: scaleY(0.5);
+  left: 0.32rem;
+  right: 0.32rem;
+}
+
+// /deep/ .login-box .field-focus:after {
+//   border-bottom: 0.02rem #238cf9 solid !important;
+// }
+.login-box .van-row {
+  margin-top: 0.08rem;
+  font-size: 0.28rem;
+}
+
+.login-box .van-row .van-col:not(:last-child) {
+  color: #9e9da3;
+}
+
+.login-box .van-row .van-col {
+  color: #28a2f1;
+  letter-spacing: 0.005rem;
+}
+
+.login-box .login_button {
+  height: 1rem;
+  line-height: 0.8rem;
+  border-radius: 0.04rem;
+}
+
+.footer {
+  font-size: 0.28rem;
+  line-height: 1rem;
+  text-align: center;
+  letter-spacing: 0.005rem;
+  margin-bottom: 0.5rem;
+}
+
+.footer a {
+  color: #1989fa;
+}
 </style>