0.0.1
This commit is contained in:
parent
d4aa739966
commit
ea5a23259a
3
app.json
3
app.json
@ -8,7 +8,8 @@
|
||||
"pages/index/info",
|
||||
"pages/index/edit",
|
||||
"pages/about/index",
|
||||
"pages/today/index"
|
||||
"pages/today/index",
|
||||
"pages/preview/index"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarTextStyle": "black",
|
||||
|
||||
@ -58,6 +58,12 @@ Page({
|
||||
}
|
||||
})
|
||||
},
|
||||
goPreview(e){
|
||||
const url = e.currentTarget.dataset.url
|
||||
wx.navigateTo({
|
||||
url: '../preview/index?url=' + url,
|
||||
})
|
||||
},
|
||||
add() {
|
||||
const user = wx.getStorageSync('user')
|
||||
console.log(user);
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<view wx:if="{{info}}">
|
||||
<!-- top -->
|
||||
<view class="top" style="position: relative; z-index: 2;">
|
||||
<image src="{{info.oss.url}}" style="width: 100vw; height: 680rpx;" mode="aspectFill"></image>
|
||||
<image src="{{info.oss.url}}" style="width: 100vw; height: 680rpx;" mode="aspectFill" data-url="{{info.oss.url}}" bind:tap="goPreview"></image>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
66
pages/preview/index.js
Normal file
66
pages/preview/index.js
Normal file
@ -0,0 +1,66 @@
|
||||
// pages/preview/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
url:''
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
this.setData({url:options.url})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
5
pages/preview/index.json
Normal file
5
pages/preview/index.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"navigationBarBackgroundColor": "#000",
|
||||
"navigationBarTextStyle":"white",
|
||||
"usingComponents": {}
|
||||
}
|
||||
6
pages/preview/index.wxml
Normal file
6
pages/preview/index.wxml
Normal file
@ -0,0 +1,6 @@
|
||||
<!--pages/preview/index.wxml-->
|
||||
<view class="flex flex-center">
|
||||
<view style="height: 80vh;" class="flex flex-center">
|
||||
<image src=" {{url}}" style="width: 100vw;height: 50vh;" mode="aspectFill" show-menu-by-longpress></image>
|
||||
</view>
|
||||
</view>
|
||||
4
pages/preview/index.wxss
Normal file
4
pages/preview/index.wxss
Normal file
@ -0,0 +1,4 @@
|
||||
/* pages/preview/index.wxss */
|
||||
page {
|
||||
background-color: black;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user