9 changed files with 144 additions and 35 deletions
@ -0,0 +1,54 @@ |
|||
<template> |
|||
<view class="business-box"> |
|||
<view class="business-wrap" v-for="(item, index) in 15" :key="index" @click="toUpload"> |
|||
<view class="name">业务{{item}}</view> |
|||
<view class="desc">业务{{item}}</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script setup> |
|||
async function toUpload() { |
|||
try { |
|||
const res = await uni.$u.api.import(); |
|||
// 导入WBS成功后 |
|||
// 直接打开导入的项目 |
|||
// emit('success'); |
|||
uni.$ui.showToast('导入成功,即将打开新项目', 3000); |
|||
const { apiUrl } = Config; |
|||
const defaultwbs = `${apiUrl}/defaultwbs`; |
|||
res.url && (defaultwbs = res.url); |
|||
setTimeout(() => { |
|||
uni.navigateTo({ |
|||
url: `/pages/project/project?u=${userId.value}&p=${res.id}&pname=${res.pname}&url=${res.url}` |
|||
}); |
|||
}, 2000); |
|||
} catch (error) { |
|||
console.error('error: ', error); |
|||
// emit('error', error); |
|||
uni.$ui.showToast('导入失败', 6000); |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.business-box { |
|||
padding: 0 16px; |
|||
} |
|||
|
|||
.business-wrap { |
|||
padding: 10px 20px; |
|||
border-bottom: 1px solid #eeeeee; |
|||
width: 100%; |
|||
box-sizing: border-box; |
|||
|
|||
.name { |
|||
line-height: 36px; |
|||
} |
|||
|
|||
.desc { |
|||
font-size: 12px; |
|||
color: #999; |
|||
} |
|||
} |
|||
</style> |
|||
@ -1,5 +1,5 @@ |
|||
<template> |
|||
启动页 |
|||
广告页 |
|||
</template> |
|||
|
|||
<script setup> |
|||
Loading…
Reference in new issue