调整工具函数

This commit is contained in:
Jason 2022-09-20 11:06:54 +08:00
parent 654c7b3c11
commit b512eac708
3 changed files with 6 additions and 10 deletions

View File

@ -2,10 +2,10 @@
<view class="suggest bg-white"> <view class="suggest bg-white">
<!-- 热门搜索 --> <!-- 热门搜索 -->
<view class="hot" v-if="hot_search.length"> <view class="hot" v-if="hot_search.length">
<view class="text-base font-medium pl-[24rpx] pt-[26rpx] pb-[6rpx]">热门搜索</view> <view class="font-medium pl-[24rpx] pt-[26rpx] pb-[6rpx] text-lg">热门搜索</view>
<view class="w-full pl-[24rpx] pr-[8rpx]"> <view class="w-full pl-[24rpx] pr-[8rpx]">
<block v-for="hotItem in hot_search"> <block v-for="(hotItem, index) in hot_search" :key="index">
<view class="keyword" @click="handleHistoreSearch(hotItem)">{{ hotItem }}</view> <view class="keyword" @click="handleHistoreSearch(hotItem)">{{ hotItem }}</view>
</block> </block>
</view> </view>
@ -19,12 +19,12 @@
<!-- 历史搜索 --> <!-- 历史搜索 -->
<view class="history" v-if="his_search.length"> <view class="history" v-if="his_search.length">
<view class="flex justify-between px-[24rpx] pb-[6rpx]"> <view class="flex justify-between px-[24rpx] pb-[6rpx]">
<view class="text-base font-medium">历史搜索</view> <view class="text-lg font-medium">历史搜索</view>
<view class="text-xs text-muted" @click="() => emit('clear')">清空</view> <view class="text-xs text-muted" @click="() => emit('clear')">清空</view>
</view> </view>
<view class="w-full pl-[24rpx] pr-[8rpx]"> <view class="w-full pl-[24rpx] pr-[8rpx]">
<block v-for="hisItem in his_search"> <block v-for="(hisItem, index) in his_search" :key="index">
<view class="keyword" @click="handleHistoreSearch(hisItem)">{{ hisItem }}</view> <view class="keyword" @click="handleHistoreSearch(hisItem)">{{ hisItem }}</view>
</block> </block>
</view> </view>

View File

@ -1,5 +1,5 @@
export async function saveImageToPhotosAlbum(url: string) { export async function saveImageToPhotosAlbum(url: string) {
if (!url) return uni.$u.$toast('图片不存在') if (!url) return uni.$u.toast('图片不存在')
//#ifdef H5 //#ifdef H5
uni.$u.$toast('长按图片保存') uni.$u.$toast('长按图片保存')
//#endif //#endif
@ -13,9 +13,6 @@ export async function saveImageToPhotosAlbum(url: string) {
icon: 'success' icon: 'success'
}) })
} catch (error: any) { } catch (error: any) {
uni.showToast({ uni.$u.toast(error.errMsg || '保存失败')
title: error.errMsg || '保存失败',
icon: 'none'
})
} }
} }

View File

@ -88,7 +88,6 @@ export function objectToQuery(params: Record<string, any>): string {
} }
} }
} else { } else {
console.log(part + encodeURIComponent(value), '####')
query += part + encodeURIComponent(value) + '&' query += part + encodeURIComponent(value) + '&'
} }
} }