关联合同合同
This commit is contained in:
commit
c1cb08d660
4
app.json
4
app.json
@ -9,9 +9,13 @@
|
||||
"pages/index/edit",
|
||||
"pages/about/index",
|
||||
"pages/today/index",
|
||||
<<<<<<< HEAD
|
||||
"pages/garden/index",
|
||||
"pages/community/index",
|
||||
"pages/log/index"
|
||||
=======
|
||||
"pages/preview/index"
|
||||
>>>>>>> 79b1af6bb6953ca3f3001c51e08e8b42220a57bb
|
||||
],
|
||||
"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);
|
||||
@ -77,9 +83,15 @@ Page({
|
||||
}
|
||||
api('/plant/plantByLibrary', 'GET', data).then(res => {
|
||||
if (res.code === 200) {
|
||||
wx.navigateTo({
|
||||
url: '../about/index?type=1',
|
||||
})
|
||||
if (user.mpOpenId.length > 0){
|
||||
wx.switchTab({
|
||||
url: '../index/index',
|
||||
})
|
||||
} else {
|
||||
wx.navigateTo({
|
||||
url: '../about/index?type=1',
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@ -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>
|
||||
|
||||
|
||||
|
||||
@ -39,6 +39,13 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
goPreview(e){
|
||||
const url = e.currentTarget.dataset.url
|
||||
wx.navigateTo({
|
||||
url: '../preview/index?url=' + url,
|
||||
})
|
||||
},
|
||||
|
||||
addFarmLog(e){
|
||||
const item = e.currentTarget.dataset.item
|
||||
const data = {id:item.id,plantId:item.plantId, name:item.name,remark:'测试',status:2}
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"t-swiper": "tdesign-miniprogram/swiper/swiper",
|
||||
"t-swiper-nav": "tdesign-miniprogram/swiper-nav/swiper-nav"
|
||||
"t-swiper-nav": "tdesign-miniprogram/swiper-nav/swiper-nav"
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,7 @@
|
||||
/* pages/login/index.wxss */
|
||||
page {
|
||||
background-color: white;
|
||||
}
|
||||
.bg {
|
||||
height: 60vh;
|
||||
width: 90vw;
|
||||
|
||||
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;
|
||||
}
|
||||
@ -27,8 +27,8 @@
|
||||
"name": "pages/about/index",
|
||||
"pathName": "pages/about/index",
|
||||
"query": "",
|
||||
"scene": null,
|
||||
"launchMode": "default"
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "pages/index/info",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user