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> |
<template> |
||||
<div class="flex justify-around"> |
<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" @click="openAudit">财务审批</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="openStatistical">财务统计</button> |
||||
</div> |
</div> |
||||
</template> |
</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> |
<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> |
</template> |
||||
|
|
||||
<script setup></script> |
<script setup> |
||||
|
function openSourceManage() { |
||||
|
// DEBUG: 假数据 换成财务条 资源管理的地址 |
||||
|
uni.$ui.openDetail({ url: 'http://m.jd.com', name: '资源管理' }); |
||||
|
} |
||||
|
</script> |
||||
|
|||||
@ -1,56 +1,74 @@ |
|||||
export default { |
import { stringify } from 'qs'; |
||||
/** |
export default { |
||||
* 显示toast |
/** |
||||
* @param {string} title 提示内容 |
* 显示toast |
||||
* @param {number} duration 显示时间 默认2000 |
* @param {string} title 提示内容 |
||||
*/ |
* @param {number} duration 显示时间 默认2000 |
||||
showToast(title, duration = 2000) { |
*/ |
||||
return uni.showToast({ |
showToast(title, duration = 2000) { |
||||
title, |
return uni.showToast({ |
||||
icon: 'none', |
title, |
||||
duration, |
icon: 'none', |
||||
mask: true, |
duration, |
||||
}); |
mask: true, |
||||
}, |
}); |
||||
|
}, |
||||
// 隐藏toast
|
|
||||
hideToast() { |
// 隐藏toast
|
||||
return uni.hideToast(); |
hideToast() { |
||||
}, |
return uni.hideToast(); |
||||
|
}, |
||||
/** |
|
||||
* 显示加载雪花 |
/** |
||||
* @param {string} title |
* 显示加载雪花 |
||||
*/ |
* @param {string} title |
||||
showLoading(title = '玩命加载中...') { |
*/ |
||||
return uni.showLoading({ |
showLoading(title = '玩命加载中...') { |
||||
title, |
return uni.showLoading({ |
||||
mask: true, |
title, |
||||
}); |
mask: true, |
||||
}, |
}); |
||||
|
}, |
||||
// 隐藏loading
|
|
||||
hideLoading() { |
// 隐藏loading
|
||||
return uni.hideLoading(); |
hideLoading() { |
||||
}, |
return uni.hideLoading(); |
||||
|
}, |
||||
/** |
|
||||
* 显示modal弹出框 |
/** |
||||
* @param {string} title 标题 |
* 显示modal弹出框 |
||||
* @param {string} content 内容 |
* @param {string} title 标题 |
||||
* @param {boolean} showCancel 是否显示取消按钮 默认true |
* @param {string} content 内容 |
||||
*/ |
* @param {boolean} showCancel 是否显示取消按钮 默认true |
||||
showModal(title, content, showCancel = true) { |
*/ |
||||
return new Promise(function(resolve, reject) { |
showModal(title, content, showCancel = true) { |
||||
uni.showModal({ |
return new Promise(function (resolve, reject) { |
||||
title, |
uni.showModal({ |
||||
content, |
title, |
||||
showCancel, |
content, |
||||
success: ({ confirm, cancel }) => { |
showCancel, |
||||
confirm && resolve(); |
success: ({ confirm, cancel }) => { |
||||
cancel && reject(); |
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