Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
jgdl
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-07-04 18:02:38 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2327c131c7b9ba63cd4199762e9a0606581f6c28
2327c131
1 parent
848533ed
fix: 修复收藏按钮布局并统一微信API调用方式
- 使用flex布局替代硬编码padding来居中收藏图标 - 将Taro API调用统一改为wx原生API调用
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
src/pages/index/index.vue
src/pages/post/index.vue
src/pages/index/index.vue
View file @
2327c13
<!--
* @Date: 2025-06-28 10:33:00
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-07-04 1
6:51:27
* @LastEditTime: 2025-07-04 1
7:47:22
* @FilePath: /jgdl/src/pages/index/index.vue
* @Description: 捡个电驴首页
-->
...
...
@@ -75,7 +75,7 @@
<view class="relative p-2">
<image :src="scooter.imageUrl" :alt="scooter.name" mode="aspectFill"
class="w-full h-36 object-cover rounded-lg" />
<view class="absolute top-4 right-3 w-7 h-7 rounded-full bg-white bg-opacity-80
" @tap.stop="() => toggleFavorite(scooter.id)" style="padding-top: 12rpx; padding-left: 10rpx;
">
<view class="absolute top-4 right-3 w-7 h-7 rounded-full bg-white bg-opacity-80
flex items-center justify-center" @tap.stop="() => toggleFavorite(scooter.id)
">
<Heart1 v-if="!favoriteIds.includes(scooter.id)" size="22" :color="'#9ca3af'" />
<HeartFill v-else size="22" :color="'#ef4444'" />
</view>
...
...
@@ -342,8 +342,8 @@ useDidShow(() => {
useReady(async () => {
console.warn('index onReady')
// 版本更新检查
if (!
Taro
.canIUse("getUpdateManager")) {
Taro
.showModal({
if (!
wx
.canIUse("getUpdateManager")) {
wx
.showModal({
title: "提示",
content: "当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试",
showCancel: false,
...
...
@@ -352,7 +352,7 @@ useReady(async () => {
}
// https://developers.weixin.qq.com/miniprogram/dev/api/base/update/UpdateManager.html
const updateManager =
Taro
.getUpdateManager();
const updateManager =
wx
.getUpdateManager();
updateManager.onCheckForUpdate((res) => {
// 请求完新版本信息的回调
...
...
src/pages/post/index.vue
View file @
2327c13
...
...
@@ -97,7 +97,7 @@
<view class="relative p-2">
<image :src="scooter.imageUrl" :alt="scooter.name" mode="aspectFill"
class="w-full h-36 object-cover rounded-lg" />
<view class="absolute top-4 right-3 w-7 h-7 rounded-full bg-white bg-opacity-80
" @tap.stop="() => toggleFavorite(scooter.id)" style="padding-top: 12rpx; padding-left: 10rpx;
">
<view class="absolute top-4 right-3 w-7 h-7 rounded-full bg-white bg-opacity-80
flex items-center justify-center" @tap.stop="() => toggleFavorite(scooter.id)
">
<Heart1 v-if="!favoriteIds.includes(scooter.id)" size="20" color="#9ca3af" />
<HeartFill v-else size="20" color="#ef4444" />
</view>
...
...
Please
register
or
login
to post a comment