|
@@ -39,16 +39,25 @@ function mount() {
|
|
|
})
|
|
|
}
|
|
|
Vue.prototype.cutoff = (msg, title = "", mask = false, exitTime = 0, icon = 'none', duration = 2000, ) => {
|
|
|
- if (msg != '成功' || title) wx.showToast({
|
|
|
+ if (msg != '成功' || title) uni.showToast({
|
|
|
title: msg == '成功' ? title : msg,
|
|
|
duration,
|
|
|
icon,
|
|
|
- mask: mask || exitTime,
|
|
|
+ mask: mask || exitTime != 0
|
|
|
})
|
|
|
if (exitTime && msg == '成功') setTimeout(uni.navigateBack, exitTime)
|
|
|
return msg != '成功';
|
|
|
};
|
|
|
Vue.prototype.tovw = (num) => (num * 100 / 375).toFixed(3) + "vw";
|
|
|
+ Vue.prototype.getHeight = (even, that) => {
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ uni.getSystemInfo({
|
|
|
+ success(s) {
|
|
|
+ uni.createSelectorQuery().in(that).select(even).boundingClientRect().exec(res => (!res[0]) ? reject('没有查询到元素') : resolve(s.windowHeight - res[0].bottom))
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function getCity() {
|