13 changed files with 190 additions and 143 deletions
@ -0,0 +1,5 @@ |
|||
<template> |
|||
<div class="404">404</div> |
|||
</template> |
|||
|
|||
<script setup></script> |
|||
@ -1,8 +1,18 @@ |
|||
<template> |
|||
<div class="flex justify-around"> |
|||
<button class="text-xs bg-blue-500 text-white leading-6" style="width: 250rpx">财务审批</button> |
|||
<button class="text-xs bg-blue-500 text-white leading-6" style="width: 250rpx">财务统计</button> |
|||
<button class="text-xs bg-blue-500 text-white leading-6" style="width: 250rpx" @click="openAudit">财务审批</button> |
|||
<button class="text-xs bg-blue-500 text-white leading-6" style="width: 250rpx" @click="openStatistical">财务统计</button> |
|||
</div> |
|||
</template> |
|||
|
|||
<script setup></script> |
|||
<script setup> |
|||
// DEBUG:打开财务审批详情页 |
|||
function openAudit() { |
|||
uni.$ui.openDetail({ url: 'https://www.taobao.com', name: '财务审批' }); |
|||
} |
|||
|
|||
// DEBUG:打开财务统计详情页 |
|||
function openStatistical() { |
|||
uni.$ui.openDetail({ url: 'https://www.taobao.com', name: '财务统计' }); |
|||
} |
|||
</script> |
|||
|
|||
@ -1,6 +1,11 @@ |
|||
<!-- 资源管理 --> |
|||
<template> |
|||
<button class="text-xs bg-blue-500 text-white leading-6" style="width: 500rpx">资源管理</button> |
|||
<button class="text-xs bg-blue-500 text-white leading-6" style="width: 500rpx" @click="openSourceManage">资源管理</button> |
|||
</template> |
|||
|
|||
<script setup></script> |
|||
<script setup> |
|||
function openSourceManage() { |
|||
// DEBUG: 假数据 换成财务条 资源管理的地址 |
|||
uni.$ui.openDetail({ url: 'http://m.jd.com', name: '资源管理' }); |
|||
} |
|||
</script> |
|||
|
|||
@ -1,56 +1,74 @@ |
|||
import { stringify } from 'qs'; |
|||
export default { |
|||
/** |
|||
* 显示toast |
|||
* @param {string} title 提示内容 |
|||
* @param {number} duration 显示时间 默认2000 |
|||
*/ |
|||
showToast(title, duration = 2000) { |
|||
return uni.showToast({ |
|||
title, |
|||
icon: 'none', |
|||
duration, |
|||
mask: true, |
|||
}); |
|||
}, |
|||
/** |
|||
* 显示toast |
|||
* @param {string} title 提示内容 |
|||
* @param {number} duration 显示时间 默认2000 |
|||
*/ |
|||
showToast(title, duration = 2000) { |
|||
return uni.showToast({ |
|||
title, |
|||
icon: 'none', |
|||
duration, |
|||
mask: true, |
|||
}); |
|||
}, |
|||
|
|||
// 隐藏toast
|
|||
hideToast() { |
|||
return uni.hideToast(); |
|||
}, |
|||
// 隐藏toast
|
|||
hideToast() { |
|||
return uni.hideToast(); |
|||
}, |
|||
|
|||
/** |
|||
* 显示加载雪花 |
|||
* @param {string} title |
|||
*/ |
|||
showLoading(title = '玩命加载中...') { |
|||
return uni.showLoading({ |
|||
title, |
|||
mask: true, |
|||
}); |
|||
}, |
|||
/** |
|||
* 显示加载雪花 |
|||
* @param {string} title |
|||
*/ |
|||
showLoading(title = '玩命加载中...') { |
|||
return uni.showLoading({ |
|||
title, |
|||
mask: true, |
|||
}); |
|||
}, |
|||
|
|||
// 隐藏loading
|
|||
hideLoading() { |
|||
return uni.hideLoading(); |
|||
}, |
|||
// 隐藏loading
|
|||
hideLoading() { |
|||
return uni.hideLoading(); |
|||
}, |
|||
|
|||
/** |
|||
* 显示modal弹出框 |
|||
* @param {string} title 标题 |
|||
* @param {string} content 内容 |
|||
* @param {boolean} showCancel 是否显示取消按钮 默认true |
|||
*/ |
|||
showModal(title, content, showCancel = true) { |
|||
return new Promise(function(resolve, reject) { |
|||
uni.showModal({ |
|||
title, |
|||
content, |
|||
showCancel, |
|||
success: ({ confirm, cancel }) => { |
|||
confirm && resolve(); |
|||
cancel && reject(); |
|||
}, |
|||
}); |
|||
}); |
|||
}, |
|||
/** |
|||
* 显示modal弹出框 |
|||
* @param {string} title 标题 |
|||
* @param {string} content 内容 |
|||
* @param {boolean} showCancel 是否显示取消按钮 默认true |
|||
*/ |
|||
showModal(title, content, showCancel = true) { |
|||
return new Promise(function (resolve, reject) { |
|||
uni.showModal({ |
|||
title, |
|||
content, |
|||
showCancel, |
|||
success: ({ confirm, cancel }) => { |
|||
confirm && resolve(); |
|||
cancel && reject(); |
|||
}, |
|||
}); |
|||
}); |
|||
}, |
|||
|
|||
/** |
|||
* 打开详情页 |
|||
* @param {object} options |
|||
*/ |
|||
openDetail(options) { |
|||
if (!options) { |
|||
throw new Error('缺少参数'); |
|||
} |
|||
if (!options.url) { |
|||
throw new Error('缺少url参数'); |
|||
} |
|||
const query = stringify(options); |
|||
console.log('query: ', query); |
|||
const path = `/pages/detailWebview/detailWebview?${query}`; |
|||
uni.navigateTo({ url: path }); |
|||
}, |
|||
}; |
|||
|
|||
Loading…
Reference in new issue