|
@@ -144,47 +144,47 @@ export default function useWxGroupList() {
|
|
|
console.log('请求版本号对比!');
|
|
|
}, 1000 * 60 * 5); //5分钟请求一次
|
|
|
///
|
|
|
- getDataList.run().then((res: any) => {
|
|
|
- if (res && res?.length > 0) {
|
|
|
- let allWx: any[] = [];
|
|
|
- res?.forEach((item: any, index: number) => {
|
|
|
- if (ok && item?.mpAccounts?.length > 0) {
|
|
|
- ok = false;
|
|
|
- actionWx(item?.mpAccounts[0]);
|
|
|
- }
|
|
|
- item?.mpAccounts?.forEach((list: any) => {
|
|
|
- if (allWx.every((wx: { id: number }) => wx.id !== list.id)) {
|
|
|
- allWx.push(list);
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- dispatch({
|
|
|
- type: 'myallOfUser',
|
|
|
- params: { myallOfUser: [{ key: res[0]?.operUserInfo, value: res[0]?.mpAccounts }] },
|
|
|
- });
|
|
|
- dispatch({ type: 'allWx', params: { allWx } });
|
|
|
- }
|
|
|
- });
|
|
|
- getAllZhMemBer.run()
|
|
|
- getAllOfMember.run().then((res) => {
|
|
|
- let groupAllWx: any[] = [];
|
|
|
- res?.forEach((item: any) => {
|
|
|
- if (ok && item?.value?.length > 0) {
|
|
|
- //假如自己没有绑定公众号,那就从组员中寻找
|
|
|
- ok = false;
|
|
|
- actionWx(item?.value[0]);
|
|
|
- dispatch({ type: 'setTabsKey', params: { tabsKey: '组员' } });
|
|
|
- }
|
|
|
- item?.value?.filter((v: any) => !!v)?.forEach((list: any) => {
|
|
|
- if (groupAllWx?.every((wx: { id: number }) => wx.id !== list.id)) {
|
|
|
- groupAllWx.push(list);
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- // console.log('getAllOfMember',groupAllWx)
|
|
|
- dispatch({ type: 'allOfMember', params: { allOfMember: res } });
|
|
|
- dispatch({ type: 'groupAllWx', params: { groupAllWx } });
|
|
|
- });
|
|
|
+ // getDataList.run().then((res: any) => {
|
|
|
+ // if (res && res?.length > 0) {
|
|
|
+ // let allWx: any[] = [];
|
|
|
+ // res?.forEach((item: any, index: number) => {
|
|
|
+ // if (ok && item?.mpAccounts?.length > 0) {
|
|
|
+ // ok = false;
|
|
|
+ // actionWx(item?.mpAccounts[0]);
|
|
|
+ // }
|
|
|
+ // item?.mpAccounts?.forEach((list: any) => {
|
|
|
+ // if (allWx.every((wx: { id: number }) => wx.id !== list.id)) {
|
|
|
+ // allWx.push(list);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+ // dispatch({
|
|
|
+ // type: 'myallOfUser',
|
|
|
+ // params: { myallOfUser: [{ key: res[0]?.operUserInfo, value: res[0]?.mpAccounts }] },
|
|
|
+ // });
|
|
|
+ // dispatch({ type: 'allWx', params: { allWx } });
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // getAllZhMemBer.run()
|
|
|
+ // getAllOfMember.run().then((res) => {
|
|
|
+ // let groupAllWx: any[] = [];
|
|
|
+ // res?.forEach((item: any) => {
|
|
|
+ // if (ok && item?.value?.length > 0) {
|
|
|
+ // //假如自己没有绑定公众号,那就从组员中寻找
|
|
|
+ // ok = false;
|
|
|
+ // actionWx(item?.value[0]);
|
|
|
+ // dispatch({ type: 'setTabsKey', params: { tabsKey: '组员' } });
|
|
|
+ // }
|
|
|
+ // item?.value?.filter((v: any) => !!v)?.forEach((list: any) => {
|
|
|
+ // if (groupAllWx?.every((wx: { id: number }) => wx.id !== list.id)) {
|
|
|
+ // groupAllWx.push(list);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+ // // console.log('getAllOfMember',groupAllWx)
|
|
|
+ // dispatch({ type: 'allOfMember', params: { allOfMember: res } });
|
|
|
+ // dispatch({ type: 'groupAllWx', params: { groupAllWx } });
|
|
|
+ // });
|
|
|
function canvas(dom: any, txt: any) {
|
|
|
if (!dom) return false;
|
|
|
let length = txt.length * 50 > 247 ? txt.length * 50 : 247; // 根据内容生成画布大小,20代表比例
|