新增页面
This commit is contained in:
@@ -1 +1 @@
|
||||
export const assetsUrl ='/static/images/'
|
||||
export const assetsUrl = (name) => `/static/images/${name}`;
|
||||
|
@@ -10,11 +10,11 @@ export function mpUpdate() {
|
||||
title: '更新提示',
|
||||
content: '检测到新版本,是否下载新版本并重启小程序?',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
if(res.confirm) {
|
||||
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||
updateManager.applyUpdate();
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
});
|
||||
updateManager.onUpdateFailed(() => {
|
||||
@@ -22,7 +22,22 @@ export function mpUpdate() {
|
||||
uni.showModal({
|
||||
title: '已经有新版本了哟~',
|
||||
content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~',
|
||||
showCancel: false,
|
||||
showCancel: false
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export function showToast(title: string, icon: string = 'none', duration: number = 2000) {
|
||||
uni.showToast({
|
||||
title,
|
||||
icon,
|
||||
duration
|
||||
});
|
||||
}
|
||||
|
||||
export function goPath(path: string) {
|
||||
uni.navigateTo({
|
||||
url: path
|
||||
}).then(r => {
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user