Auto merge base into tabbar
This commit is contained in:
commit
de32f4515f
@ -37,19 +37,21 @@ export default function useUpload<T extends TfileType>(options: TOptions<T> = {}
|
|||||||
count: 1,
|
count: 1,
|
||||||
success: (res: any) => {
|
success: (res: any) => {
|
||||||
console.log('File selected successfully:', res)
|
console.log('File selected successfully:', res)
|
||||||
// h5中res:{errMsg: "chooseImage:ok", tempFilePaths: "blob:http://localhost:9000/f74ab6b8-a14d-4cb6-a10d-fcf4511a0de5", tempFiles: [File]}
|
|
||||||
// h5的File有一下字段:{name: "girl.jpeg", size: 48976, type: "image/jpeg"}
|
|
||||||
// 小程序中res:{errMsg: "chooseImage:ok", tempFiles: [{fileType: "image", size: 48976, tempFilePath: "http://tmp/5iG1WpIxTaJf3ece38692a337dc06df7eb69ecb49c6b.jpeg"}]}
|
// 小程序中res:{errMsg: "chooseImage:ok", tempFiles: [{fileType: "image", size: 48976, tempFilePath: "http://tmp/5iG1WpIxTaJf3ece38692a337dc06df7eb69ecb49c6b.jpeg"}]}
|
||||||
|
// h5中res:{errMsg: "chooseImage:ok", tempFilePaths: "blob:http://localhost:9000/f74ab6b8-a14d-4cb6-a10d-fcf4511a0de5", tempFiles: [File]}
|
||||||
|
// h5的File有以下字段:{name: "girl.jpeg", size: 48976, type: "image/jpeg"}
|
||||||
|
// App中res:{errMsg: "chooseImage:ok", tempFilePaths: "file:///Users/feige/xxx/gallery/1522437259-compressed-IMG_0006.jpg", tempFiles: [File]}
|
||||||
|
// App的File有以下字段:{path: "file:///Users/feige/xxx/gallery/1522437259-compressed-IMG_0006.jpg", size: 48976}
|
||||||
let tempFilePath = ''
|
let tempFilePath = ''
|
||||||
let size = 0
|
let size = 0
|
||||||
// #ifdef H5
|
|
||||||
tempFilePath = res.tempFilePaths[0]
|
|
||||||
size = res.tempFiles[0].size
|
|
||||||
// #endif
|
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
tempFilePath = res.tempFiles[0].tempFilePath
|
tempFilePath = res.tempFiles[0].tempFilePath
|
||||||
size = res.tempFiles[0].size
|
size = res.tempFiles[0].size
|
||||||
// #endif
|
// #endif
|
||||||
|
// #ifndef MP-WEIXIN
|
||||||
|
tempFilePath = res.tempFilePaths[0]
|
||||||
|
size = res.tempFiles[0].size
|
||||||
|
// #endif
|
||||||
handleFileChoose({ tempFilePath, size })
|
handleFileChoose({ tempFilePath, size })
|
||||||
},
|
},
|
||||||
fail: (err: any) => {
|
fail: (err: any) => {
|
||||||
|
@ -57,8 +57,7 @@
|
|||||||
"type": "page",
|
"type": "page",
|
||||||
"layout": "tabbar",
|
"layout": "tabbar",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "关于",
|
"navigationBarTitleText": "关于"
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -3,14 +3,12 @@
|
|||||||
layout: 'tabbar',
|
layout: 'tabbar',
|
||||||
style: {
|
style: {
|
||||||
navigationBarTitleText: '关于',
|
navigationBarTitleText: '关于',
|
||||||
navigationStyle: 'custom', // 开启自定义导航栏
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<fg-navbar>关于</fg-navbar>
|
|
||||||
<view
|
<view
|
||||||
class="bg-white overflow-hidden pt-2 px-4"
|
class="bg-white overflow-hidden pt-2 px-4"
|
||||||
:style="{ marginTop: safeAreaInsets?.top + 'px' }"
|
:style="{ marginTop: safeAreaInsets?.top + 'px' }"
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
<template v-else>
|
<template v-else>
|
||||||
<view class="m-2">上传后返回的接口数据:</view>
|
<view class="m-2">上传后返回的接口数据:</view>
|
||||||
<view class="m-2">{{ data }}</view>
|
<view class="m-2">{{ data }}</view>
|
||||||
<view class="h-80 w-full">
|
<view v-if="data" class="h-80 w-full">
|
||||||
<image v-if="data" :src="data.url" mode="scaleToFill" />
|
<image :src="data.url" mode="scaleToFill" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
|
@ -3,16 +3,14 @@
|
|||||||
{
|
{
|
||||||
layout: 'tabbar',
|
layout: 'tabbar',
|
||||||
style: {
|
style: {
|
||||||
|
// 'custom' 表示开启自定义导航栏,默认 'default'
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
navigationBarTitleText: '首页',
|
navigationBarTitleText: '首页',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
<template>
|
<template>
|
||||||
<view
|
<view class="bg-white pt-2 px-4" :style="{ marginTop: safeAreaInsets?.top + 'px' }">
|
||||||
class="bg-white overflow-hidden pt-2 px-4"
|
|
||||||
:style="{ marginTop: safeAreaInsets?.top + 'px' }"
|
|
||||||
>
|
|
||||||
<view class="mt-12">
|
<view class="mt-12">
|
||||||
<image src="/static/logo.svg" alt="" class="w-28 h-28 block mx-auto" />
|
<image src="/static/logo.svg" alt="" class="w-28 h-28 block mx-auto" />
|
||||||
</view>
|
</view>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user