How to use the antd-mobile.Toast.success function in antd-mobile

To help you get started, we’ve selected a few antd-mobile examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TronLink / tronlink-extension / packages / popup / src / controllers / TransferController.js View on Github external
func.then((res) => {
                this.setState({loading: false});
                Toast.success(formatMessage({ id: 'SEND.SUCCESS' }), 3, () => onCancel(), true);
                // PopupAPI.setPushMessage({
                //     title:`-${amount}${selectedToken.abbr} ${formatMessage({id:'NOTIFICATIONS.TITLE'})}`,
                //     message:formatMessage({id:'NOTIFICATIONS.MESSAGE'}),
                //     hash:res
                // });
            }).catch(error => {
                Toast.fail(JSON.stringify(error), 3, () => {
github zxj963577494 / OverWatchTeams / src / sagas / warOrderSaga.js View on Github external
yield put(action.fetchSuccess())
      yield put(action.postWarOrderSuccess(response))
      Toast.success('提交成功', 1)
      yield delay(1000)
      yield put(goBack())
    } else {
      yield put(action.postWarOrderFailed())
      yield put(action.fetchFailed())
      Toast.success(`1天最多发布${warOrderLimit}条比赛约战帖`, 2)
      yield delay(2000)
      yield put(goBack())
    }
  } catch (error) {
    yield put(action.postWarOrderFailed(error))
    yield put(action.fetchFailed())
    Toast.success('提交失败', 1)
  }
}
github zxj963577494 / OverWatchTeams / src / sagas / groupOrderSaga.js View on Github external
function* putGroupOrderWorker(payload) {
  try {
    yield put(action.fetchRequest({ text: '提交中' }))
    const count = yield call(groupOrderService.getGroupOrderCountOfToday)
    const userinfo = yield call(userService.getUserInfoToJson)
    const groupOrderLimit = userinfo.groupOrderLimit
    if (count <= groupOrderLimit) {
      const response = yield call(groupOrderService.updateGroupOrder, payload)
      yield put(action.fetchSuccess())
      yield put(action.putGroupOrderSuccess(response))
      Toast.success('提交成功', 1)
      yield delay(1000)
      yield put(replace('/account/grouporders'))
    } else {
      yield put(action.putGroupOrderFailed())
      yield put(action.fetchFailed())
      Toast.success(`1天最多发布${groupOrderLimit}条组队上分帖`, 1)
    }
  } catch (error) {
    yield put(action.putGroupOrderFailed(error))
    yield put(action.fetchFailed())
    Toast.success('提交失败', 1)
  }
}
github JinJieTan / react-webpack / src / pages / shop / index.jsx View on Github external
function successToast() {
    Toast.success('商品已加入购物车', 1);
}
github zxj963577494 / OverWatchTeams-React-Native-Expo / src / sagas / userSaga.js View on Github external
function* putUserInfoWorker(payload) {
  try {
    Toast.loading('提交中')
    const response = yield call(userService.putUserInfo, payload)
    yield put(action.putUserInfoSuccess(response))
    Toast.success('提交成功', 1.5)
    yield delay(1500)
    yield put(NavigationActions.back())
  } catch (error) {
    yield put(action.putUserInfoFailed(error))
    Toast.fail('提交失败', 1.5)
  }
}
github zxj963577494 / OverWatchTeams / src / sagas / recruitOrderSaga.js View on Github external
function* deleteRecruitOrderWorker(payload) {
  try {
    yield put(action.fetchRequest({ text: '提交中' }))
    const response = yield call(recruitOrderService.removeRecruitOrder, payload)
    yield put(action.deleteRecruitOrderSuccess(response))
    yield put(action.fetchSuccess())
    Toast.success('删除成功', 1)
  } catch (error) {
    yield put(action.deleteRecruitOrderFailed(error))
    yield put(action.fetchFailed())
    Toast.success('删除失败', 1)
  }
}
github react-cross-platform / react-shop / src / modules / cart / CheckoutTrigger / CheckoutTrigger.tsx View on Github external
          onClick={() => Toast.success("To be continued...")}
          className={styles.checkout}
github zhouatie / wechat / wechat / src / views / uploadLogo / UploadLogo.js View on Github external
successToast(value) {
        Toast.success(value, 2);
    }
    failToast(value) {
github Juliiii / React-Cnode / src / store / collections.js View on Github external
async decollect () {
    if (!session.accesstoken || status.submitting) return;
    try {
      status.setSubmitting(true);
      await axios.post('/topic_collect/de_collect', { accesstoken: session.accesstoken, topic_id: detail.detail.id });
      detail.updateDetail('is_collect', false);
      Toast.success('取消成功', 1);
    } catch(err) {
      Toast.success('取消失败', 1);
    } finally {
      status.setSubmitting(false);
    }
  }
github zxj963577494 / OverWatchTeams / src / sagas / teamsSaga.js View on Github external
function* putTeamsWorker(payload) {
  try {
    yield put(action.fetchRequest({ text: '提交中' }))
    const response = yield call(teamsService.updateTeam, payload)
    yield put(action.fetchSuccess())
    yield put(action.putTeamsSuccess(response))
    Toast.success('提交成功', 1)
    yield delay(1000)
    yield put(goBack())
  } catch (error) {
    yield put(action.fetchFailed())
    yield put(action.putTeamsFailed())
    Toast.fail('提交失败', 1)
  }
}