Bladeren bron

提交客户管家相关内容

Lijy 1 week geleden
bovenliggende
commit
2ac63ff6c0

+ 23 - 1
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/tabbar/home/index.vue

@@ -3,6 +3,7 @@
     <template v-slot:headerLeft>
       <div class="homeheaderleft">
         <img src="/src/assets/image/home_logo.png">
+        <!-- <div class="text-white">客户管家<ww-open-data :openid="useInfo.userInfo.name" type="userName"></ww-open-data></div> -->
         <div class="text-white">客户管家</div>
       </div>
     </template>
@@ -10,6 +11,7 @@
     <template v-slot:body>
       <div class="home-theBack"></div>
       <div class="home-theContent">
+        <div class="hoPlaceholderSymbol"><ww-open-data :openid="useInfo.userInfo.name" type="userName"></ww-open-data></div>
         <!-- 固定头部 -->
         <div class="home-theContent-title">
           <div class="item" v-for="(item, index) in addQuickList" :key="index">
@@ -218,7 +220,21 @@ function obtainEnterpriseWeChatParameters(data = {}) {
           jsApiList: ['selectExternalContact', 'openThirdAppServiceChat', 'openAppManage'], //必填,传入需要使用的接口名称
           success: function (result) {
             //  wx.agentConfig成功回调后,WWOpenData 才会注入到 window 对象上面
-            window.WWOpenData.bind(document.querySelector('ww-open-data'))
+            // window.WWOpenData.bind(document.querySelector('ww-open-data'))
+            setTimeout(() => {
+              const el = document.querySelector('ww-open-data');
+              console.log(el, '<======= el')
+              if (el) {
+                try {
+                  window.WWOpenData.bind(el);
+                  console.log('WWOpenData.bind 成功执行');
+                } catch (e) {
+                  console.error('WWOpenData.bind 执行出错:', e);
+                }
+              } else {
+                console.warn('ww-open-data 元素不存在');
+              }
+            }, 1000)
           },
           fail: function (res) {
             if (res.errMsg.indexOf('function not exist') > -1) {
@@ -388,4 +404,10 @@ useLifecycle({
 .block-div {
   padding: 14px 0;
 }
+
+.hoPlaceholderSymbol {
+  position: absolute;
+  left: -500vw;
+  top: -200vh;
+}
 </style>

+ 230 - 0
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/tabbar/my/index copy 2.vue

@@ -0,0 +1,230 @@
+<template>
+  <div class="personalCenter">
+    <div class="personalCenter-top flex flex-col">
+      <div class="px-4 flex justify-between items-center avatarSection">
+        <div class="flex items-center">
+          <div
+            class="bg-[#fff] text-[#333] flex items-center justify-center profilePicture"
+          >
+            <TranslationComponent :openId="userInfo.userInfo.name" />
+          </div>
+          <div class="ml-8 profilePicture-text">
+            <TranslationComponent :openId="userInfo.userInfo.name" /> <br />
+            <div class="jobIdEtc">工号:{{ userInfo.userInfo.jobNumber ? userInfo.userInfo.jobNumber : '待配置' }}</div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="flex-1 overflow-y-auto personalCenter-content">
+      <div class="flex flex-row items-center justify-between">
+        <div class="list-tile flex">
+          <img src="../../../assets/image/dqbb.png" alt="" />
+          <div class="list-tile-text">当前版本</div>
+        </div>
+        <div class="list-text">{{ ['', '专业版本', '旗舰版本'][userInfo.userInfo?.company?.versionControl] }}</div>
+      </div>
+      <div class="flex flex-row items-center justify-between" v-if="userInfo.userInfo.userNameNeedTranslate != '1' && (isCorpWX || isWX)" @click="bindWeiXin">
+        <div class="list-tile flex">
+          <img src="../../../assets/image/dqbb.png" alt="" />
+          <div class="list-tile-text">{{ `绑定${isCorpWX ? '企业' : ''}微信` }}</div>
+        </div>
+        <div class="list-text">
+          (
+            <span v-if="(isCorpWX && userInfo.userInfo.corpwxUserid == null) || (isWX && userInfo.userInfo.wxOpenid == null)">未绑定</span>
+            <span v-if="(isCorpWX && userInfo.userInfo.corpwxUserid != null) || (isWX && userInfo.userInfo.wxOpenid != null)">已绑定</span>
+          )
+        </div>
+      </div>
+      <div class="flex flex-row items-center justify-between mt-3">
+        <div class="list-tile flex">
+          <img src="../../../assets/image/gsmc.png" alt="" />
+          <div class="list-tile-text">公司名称</div>
+        </div>
+        <div class="list-text">{{ userInfo.userInfo?.company?.companyName }}</div>
+      </div>
+      <div class="flex flex-row items-center justify-between mt-3">
+        <div class="list-tile flex">
+          <img src="../../../assets/image/dqzh.png" alt="" />
+          <div class="list-tile-text">账号角色</div>
+        </div>
+        <div class="list-text">{{ userInfo.userInfo?.roleName }}</div>
+      </div>
+      <div class="flex flex-row items-center justify-between mt-3">
+        <div class="list-tile flex">
+          <img src="../../../assets/image/yxrq.png" alt="" />
+          <div class="list-tile-text">有效日期</div>
+        </div>
+        <div class="list-text">{{ userInfo.userInfo?.company?.expirationDate }}</div>
+      </div>
+      <div class="flex flex-row items-center justify-between mt-3" @click="instructions()">
+        <div class="list-tile flex">
+          <img src="../../../assets/image/sysm.png" alt="" />
+          <div class="list-tile-text">使用说明</div>
+        </div>
+        <img src="../../../assets/image/rightArrow.png" class="list-text-img"></img>
+      </div>
+      <div class="flex flex-row items-center justify-between mt-3" @click="applicationMarket()">
+        <div class="list-tile flex">
+          <img src="../../../assets/image/yysc.png" alt="" />
+          <div class="list-tile-text">应用市场</div>
+        </div>
+        <img src="../../../assets/image/rightArrow.png" class="list-text-img"></img>
+      </div>
+    </div>
+    <div><Footer /></div>
+  </div>
+</template>
+
+<script setup>
+import { ref } from "vue";
+import { useLifecycle } from "@hooks/useCommon.js";
+import useRouterStore from "@store/useRouterStore.js";
+import useInfoStore from "@store/useInfoStore.js";
+import Footer from "@components/page/footer.vue";
+
+const router = useRouterStore();
+const userInfo = useInfoStore();
+const isCorpWX = ref(false);
+const isWX = ref(false);
+
+function instructions() {
+  // router.navigateTo({
+  //   pathName: "pdfPreview",
+  // });
+  // 新窗口打开链接
+  window.open("https://crm.ttkuaiban.com/upload/mobileUserManual.pdf");
+}
+
+function bindWeiXin() {
+  //企业微信
+  if (isCorpWX.value && userInfo.userInfo.corpwxUserid != null) {
+    return;
+  }
+  //微信
+  else if (isWX.value && userInfo.userInfo.wxOpenid != null) {
+    return;
+  }
+
+  var appId = "wx1c1d8fc81bc073a8"; //智能客户管家公众号
+  var url =
+    "https://mobcrm.ttkuaiban.com/api/wechat/bindWeiXin2?userId=" +
+    userInfo.userInfo.id; //工时管家公众号授权回调页面
+  if (isCorpWX.value) {
+    appId = "ww4e237fd6abb635af"; //企业微信第三方的SUIT ID
+    url =
+      "https://crm.ttkuaiban.com/api/wxcorp/bindCorpWeiXin?userId=" +
+      userInfo.userInfo.id; //授权回调页面
+  }
+
+  var weixinUrl =
+    "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" +
+    appId +
+    "&redirect_uri=" +
+    encodeURI(url) +
+    "&response_type=code&scope=snsapi_base&state=0#wechat_redirect";
+  window.location.href = weixinUrl;
+}
+
+function signOut() {
+  router.redirectTo({
+    pathName: "login",
+    success: () => {
+      localStorage.clear();
+      sessionStorage.clear();
+      window.location.reload();
+    },
+  });
+}
+
+function judgingTheEnvironment() {
+  const currentEnvironment = navigator.userAgent.toLowerCase();
+  isCorpWX.value = currentEnvironment.indexOf("wxwork") > 0 ? true : false;
+  isWX.value = currentEnvironment.indexOf("micromessenger") > 0 ? true : false;
+}
+
+const applicationMarket = () => {
+  window.location.href = "https://www.ttkuaiban.com/appMarket.html";
+  // window.open('https://www.ttkuaiban.com/appMarket.html', '_blank');
+};
+
+useLifecycle({
+  load: () => {
+    judgingTheEnvironment();
+  },
+});
+</script>
+
+<style lang="scss" scoped>
+.profilePicture {
+  width: 70px;
+  height: 70px;
+  border-radius: 50%;
+  font-size: 16px;
+  font-weight: bold;
+}
+.profilePicture-text {
+  font-size: 18px;
+  color: #fff;
+}
+.profilePicture-img {
+  width: 24px;
+}
+.list-imgs {
+  width: 14px;
+}
+.personalCenter {
+  width: 100%;
+  height: 100vh;
+  display: flex;
+  flex-direction: column;
+  background-color: #fff;
+}
+.personalCenter-top {
+  width: 100%;
+  height: 180px;
+  background-image: url("../../../assets/image/grzxbjs.png");
+  background-size: cover;
+}
+.avatarSection {
+  padding: 52px 30px 0 30px;
+}
+.jobIdEtc {
+  font-size: 13px;
+  color: #92bdee;
+  margin-top: 4px;
+}
+.personalCenter-content {
+  width: 100%;
+  border-top-left-radius: 15px;
+  border-top-right-radius: 15px;
+  background-color: #fff;
+  position: relative;
+  padding: 20px 26px 0 26px;
+  top: -18px;
+}
+.list-text {
+  color: #A6A6A6;
+  font-weight: medium;
+  font-size: 12px;
+  position: relative;
+  top: -3px;
+}
+.list-tile {
+  color: #000000;
+  font-weight: medium;
+  font-size: 12px;
+}
+.list-tile img {
+  width: 28px;
+}
+.list-tile-text{
+  position: relative;
+  top: 2px;
+  margin-left: 10px;
+}
+.list-text-img {
+  width: 16px;
+  position: relative;
+  top: -3px;
+}
+</style>

+ 14 - 10
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/tabbar/my/index.vue

@@ -161,6 +161,7 @@ useLifecycle({
   border-radius: 50%;
   font-size: 16px;
   font-weight: bold;
+  overflow: hidden; // iOS 裁剪问题
 }
 .profilePicture-text {
   font-size: 18px;
@@ -174,7 +175,7 @@ useLifecycle({
 }
 .personalCenter {
   width: 100%;
-  height: 100vh;
+  min-height: 100dvh; // 修复 iOS vh 问题
   display: flex;
   flex-direction: column;
   background-color: #fff;
@@ -198,35 +199,38 @@ useLifecycle({
   border-top-left-radius: 15px;
   border-top-right-radius: 15px;
   background-color: #fff;
-  position: relative;
   padding: 20px 26px 0 26px;
-  top: -18px;
+  margin-top: -18px; // 替代 top: -18px
+  flex: 1;
+  overflow-y: auto;
+  -webkit-overflow-scrolling: touch; // iOS 滚动优化
 }
 .list-text {
   color: #A6A6A6;
-  font-weight: medium;
-  font-size: 12px;
-  line-height: normal;
+  font-weight: 500; // 修复非法值
+  font-size: 14px;
   position: relative;
   top: -3px;
 }
 .list-tile {
   color: #000000;
-  font-weight: medium;
-  font-size: 12px;
-  line-height: normal;
+  font-weight: 500;
+  font-size: 14px;
 }
 .list-tile img {
   width: 28px;
+  display: block; // 修复 iOS 点击问题
 }
-.list-tile-text{
+.list-tile-text {
   position: relative;
   top: 2px;
   margin-left: 10px;
 }
 .list-text-img {
   width: 16px;
+  display: block;
   position: relative;
   top: -3px;
 }
+
 </style>