Skip to content

Commit c6c933c

Browse files
committed
replace local image url with network image url
1 parent a310780 commit c6c933c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
const config = require('../../../../config')
2+
13
Page({
24
onShareAppMessage() {
35
return {
46
title: 'image',
57
path: 'page/component/pages/image/image'
68
}
79
},
8-
10+
data: {
11+
imageUrl: config.downloadExampleUrl
12+
}
913
})

miniprogram/page/component/pages/image/image.wxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<view class="page-section page-section-gap">
1515
<view class="page-section-title">Internet Image</view>
1616
<view class="page-section-ctn">
17-
<image class="image" src="../../resources/pic/2.jpg"/>
17+
<image class="image" src="{{imageUrl}}"/>
1818
</view>
1919
</view>
2020
</view>

0 commit comments

Comments
 (0)