Skip to content

Commit 0eb172c

Browse files
committed
更改 mock 图片加载方式
将 mock 数据中的图片由 base64 更改为 /images/mock 中的本地图片
1 parent 427660b commit 0eb172c

File tree

11 files changed

+18
-30
lines changed

11 files changed

+18
-30
lines changed

images/head-bg.png

177 KB
Loading
114 KB
Loading
109 KB
Loading
27.7 KB
Loading
41.6 KB
Loading
89.4 KB
Loading

pages/home/components/card/index.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,5 @@ Component({
1919
data: {},
2020

2121
/** 组件的方法列表 */
22-
methods: {
23-
/** 点击活动卡片 */
24-
handleTapCard() {
25-
const activityId = this.properties.activity.activityId
26-
wx.navigateTo({ url: '/pages/activity/index?activityId=' + activityId })
27-
}
28-
}
22+
methods: {}
2923
})

pages/home/components/card/index.wxml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--pages/home/components/card/index.wxml-->
2-
<view class="card" bind:tap="handleTapCard">
2+
<navigator class="card" hover-class="none" url="{{ '/pages/activity/index?activityId=' + activityId }}">
33
<image class="image" src="{{ activity.image }}" mode="aspectFill" />
44
<view class="content">
55
<view class="name">{{ activity.name }}</view>
@@ -9,7 +9,7 @@
99
</view>
1010
<view class="price">{{ utils.formatPrice(activity.bottomPrice, activity.topPrice) }}</view>
1111
</view>
12-
</view>
12+
</navigator>
1313

1414
<wxs module="utils">
1515
/** 格式化价格 */

pages/home/components/navigation-bar/index.less

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

pages/home/components/navigation-bar/index.wxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--pages/home/components/navigation-bar/index.wxml-->
2-
<view class="navigation-bar">
2+
<view class="navigation-bar" style="background-image: url('/images/head-bg.png');">
33
<view class="status-bar" style="height: {{statusBarHeight}}px;" />
44
<view class="nav-bar" style="height: {{(capsule.top - statusBarHeight) * 2 + capsule.height}}px;" bind:tap="selectCity">
55
<t-icon name="location" size="40rpx" />

0 commit comments

Comments
 (0)