How to use the vant.Dialog.alert function in vant

To help you get started, we’ve selected a few vant 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 YunaiV / onemall / mobile-web / src / page / pay / index.vue View on Github external
pingpp.createPayment(data.invokeResponse, function(result, err) {
            if (result === 'success') {
              Dialog.alert({
                title: '系统提示',
                message: '支付成功',
                beforeClose: function (action, done) {
                  // 关闭弹窗
                  done();
                  // 跳转到我的优惠劵
                  that.$router.push(decodeURI(that.returnUrl));
                }
              });
            } else {
              // console.log(err.msg);
              // console.log(err.extra);
              Dialog.alert({
                title: '系统提示',
                message: '支付失败:' + err.msg,
              });
github KangU4 / BigDataPlatform / mall-shopping-mobile / src / utils / request.js View on Github external
}, error => {
    console.log('err' + error)// for debug
    Dialog.alert({
        title: '警告',
        message: '登录连接超时'
      });
    return Promise.reject(error)
  })
github linlinjava / litemall / litemall-vue / src / utils / request.js View on Github external
}, error => {
    console.log('err' + error)// for debug
    Dialog.alert({
        title: '警告',
        message: '登录连接超时'
      });
    return Promise.reject(error)
  })
github Geek-James / ddBuy / src / views / mine / Mine.vue View on Github external
onFeedBack () {
      Dialog.alert({
        confirmButtonText: '记得点个小星❤️哦~',
        title: '💘感谢您的关注💘',
        message: 'GitHub上搜索 \nGeek-James/ddBuy \n🦉欢迎提出优化建议🙉'
      }).then(() => {
        // on close
      });
    }
  }
github Geek-James / ddBuy / src / views / login / Login.vue View on Github external
async sendVerifyCode () {
      this.countDown = 60;
      this.timeIntervalID = setInterval(() => {
        this.countDown--;
        // 4.1 如果减到0 则清除定时器
        if (this.countDown == 0) {
          clearInterval(this.timeIntervalID);
        }
      }, 1000)

      // 4.2 获取短信验证码
      let result = await getPhoneCaptcha(this.login_phone);
      if (result.success_code == 200) {
        this.smsCaptchaResult = result.data.code;
        // 4.3  获取验证码成功
        Dialog.alert({
          title: this.$t('login.tipTile'),
          message: this.$t('login.message') + result.data.code
        }).then(() => {
        });
      }
    },
    // 5.登录
github YunaiV / onemall / mobile-web / src / config / request.js View on Github external
confirmButtonText: '重新登陆',
          beforeClose: function (action, done) {
            done();
            if (action === 'confirm') {
              // debugger;
              // this.$router.push({ path: '/login' })
              // TODO 跳转到登陆页.不是很优雅
              location.replace('/#login');
              location.reload();
            }
          }
        });
      } else if (code === 1002001012) { // 访问令牌已过期
        return refreshToken(response);
      } else {
        Dialog.alert({
          title: '系统提示',
          message: res.message,
        });
      }
      return Promise.reject('error')
    } else {
      // if (typeof response.data.Tag == 'string') {
      //   return JSON.parse(response.data.Tag);
      // } else {
      //   return response.data.Tag;
      // }
      // debugger;
      return res.data;
    }
  },
  error => {
github YunaiV / onemall / mobile-web / src / page / coupon / fetch.vue View on Github external
response.then(data => {
          Dialog.alert({
            title: '系统提示',
            message: '领取成功',
            beforeClose: function (action, done) {
              // 关闭弹窗
              done();
              // 跳转到我的优惠劵
              that.$router.push('/user/coupon');
            }
          });
        });
      }
github linlinjava / litemall / litemall-vue / src / plugins / axios.js View on Github external
error => {
    Dialog.alert({
      title: '警告',
      message: error.message
    });
    return Promise.reject(error);
  }
);
github mcuking / mobile-web-best-practice / src / views / note / create / index.vue View on Github external
private confirmDeleteNote() {
    Dialog.alert({
      title: '删除确认',
      message: '是否删除该任务?'
    }).then(() => {
      this.handleDeleteNote(this.notebookId, this.id!);
    });
  }
github wmz1930 / Jeebase / jeebase-wechat / jeebase-wechat-vant / src / views / register / index.vue View on Github external
registerNormal(this.registerForm).then(() => {
            Dialog.alert({
              title: '恭喜',
              message: '您已注册成功!'
            }).then(() => {
              that.$router.push({ path: '/member' })
            })
          })
        } else {