Commit e5affb3c by wufan

feat:企微员工修改个人信息去掉手机号

parent ab7a4ed5
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: zhangleyuan * @Author: zhangleyuan
* @Date: 2020-11-27 15:06:31 * @Date: 2020-11-27 15:06:31
* @LastEditors: wufan * @LastEditors: wufan
* @LastEditTime: 2021-01-09 15:47:58 * @LastEditTime: 2021-01-11 19:19:03
* @Description: 描述一下 * @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -39,6 +39,7 @@ function PersonalInfoPage() { ...@@ -39,6 +39,7 @@ function PersonalInfoPage() {
const storeUserId = User.getStoreUserId(); const storeUserId = User.getStoreUserId();
const ctx: any = useContext(XMContext); const ctx: any = useContext(XMContext);
const userId = User.getUserId(); const userId = User.getUserId();
const isWorkWechat = !!(User.getStoreType() === "WE_CHAT_STORE");
window.ctx = ctx; window.ctx = ctx;
useEffect(() => { useEffect(() => {
...@@ -89,13 +90,19 @@ function PersonalInfoPage() { ...@@ -89,13 +90,19 @@ function PersonalInfoPage() {
} }
function saveUserInfo() { function saveUserInfo() {
const params = { const params = isWorkWechat ? {
nickName, nickName,
phone: String(phone), phone: String(phone),
roleCodes: roleCodes, roleCodes: roleCodes,
avatar, avatar,
storeUserId: User.getStoreUserId(), storeUserId: User.getStoreUserId()
} : {
nickName,
roleCodes: roleCodes,
avatar,
storeUserId: User.getStoreUserId()
}; };
StoreService.editEmployee(params).then((res) => { StoreService.editEmployee(params).then((res) => {
getStoreGroupAndStoreList(); getStoreGroupAndStoreList();
message.success("保存成功"); message.success("保存成功");
...@@ -154,7 +161,7 @@ console.log('User.getStoreType()',User.getStoreType()); ...@@ -154,7 +161,7 @@ console.log('User.getStoreType()',User.getStoreType());
}} }}
/> />
</div> </div>
{User.getStoreType() === "WE_CHAT_STORE" ? ( {isWorkWechat ? (
<div className="phone-item"> <div className="phone-item">
<span className="label">企业微信号:</span> <span className="label">企业微信号:</span>
<span>{weChatAccount}</span> <span>{weChatAccount}</span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment