Skip to content

Commit

Permalink
更改 mock 图片加载方式
Browse files Browse the repository at this point in the history
将 mock 数据中的图片由 base64 更改为 /images/mock 中的本地图片
  • Loading branch information
WBBB0730 committed Aug 11, 2023
1 parent 427660b commit 0eb172c
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 30 deletions.
Binary file added images/head-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mock/activity/activity-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mock/activity/activity-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mock/activity/activity-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mock/activity/activity-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mock/activity/hot-activity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 1 addition & 7 deletions pages/home/components/card/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,5 @@ Component({
data: {},

/** 组件的方法列表 */
methods: {
/** 点击活动卡片 */
handleTapCard() {
const activityId = this.properties.activity.activityId
wx.navigateTo({ url: '/pages/activity/index?activityId=' + activityId })
}
}
methods: {}
})
4 changes: 2 additions & 2 deletions pages/home/components/card/index.wxml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--pages/home/components/card/index.wxml-->
<view class="card" bind:tap="handleTapCard">
<navigator class="card" hover-class="none" url="{{ '/pages/activity/index?activityId=' + activityId }}">
<image class="image" src="{{ activity.image }}" mode="aspectFill" />
<view class="content">
<view class="name">{{ activity.name }}</view>
Expand All @@ -9,7 +9,7 @@
</view>
<view class="price">{{ utils.formatPrice(activity.bottomPrice, activity.topPrice) }}</view>
</view>
</view>
</navigator>

<wxs module="utils">
/** 格式化价格 */
Expand Down
2 changes: 1 addition & 1 deletion pages/home/components/navigation-bar/index.less

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pages/home/components/navigation-bar/index.wxml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--pages/home/components/navigation-bar/index.wxml-->
<view class="navigation-bar">
<view class="navigation-bar" style="background-image: url('/images/head-bg.png');">
<view class="status-bar" style="height: {{statusBarHeight}}px;" />
<view class="nav-bar" style="height: {{(capsule.top - statusBarHeight) * 2 + capsule.height}}px;" bind:tap="selectCity">
<t-icon name="location" size="40rpx" />
Expand Down
32 changes: 13 additions & 19 deletions services/activity.js

Large diffs are not rendered by default.

0 comments on commit 0eb172c

Please sign in to comment.