拼团项目线上工具类
2021-01-22 本文已影响0人
追逐繁星的阿忠
1.ajax
async getInfo(){
this.$http.post('getAgentInfo', {}, {token: 'token'}).then(([error, res]) => {
if(res.data.code == 1) {
let obj = res.data.data;
}else {
this.isShow = true
}
})
},
2.界面提示框:
uni.showToast({
title: '糖果不足100',
icon: 'none',
duration: 2000
});
uni.showModal({
title: '提示',
showCancel: false,
content: res.data.msg,
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
}
}
});