help.js 701 B

123456789101112131415161718192021222324
  1. import { getChromeStorage } from '@/uilts/chromeExtension.js'
  2. import { srcPublishSuccess } from '@/http/publishApi'
  3. // 重新绑定推文id
  4. export const reSetBindTwtterId = ({
  5. postId = '',
  6. tweetId = ''
  7. }, callback) => {
  8. getChromeStorage('userInfo', (_userInfo = {}) => {
  9. // if (_userInfo && _userInfo.uid == _params.uid) {
  10. if (_userInfo.uid) {
  11. srcPublishSuccess({
  12. params: {
  13. postId,
  14. srcContentId: tweetId
  15. }
  16. }).then((res) => {
  17. if (res.code == 0 || res.code == 3003) {
  18. callback && callback()
  19. }
  20. })
  21. }
  22. })
  23. }