init version kelfy-mini for new gitea
This commit is contained in:
96
pages/localNavigation/localNavigation.js
Normal file
96
pages/localNavigation/localNavigation.js
Normal file
@@ -0,0 +1,96 @@
|
||||
// pages/localNavigation/localNavigation.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
list:[],
|
||||
imgalist:[
|
||||
{id:0,src:'https://fy.btlsoln.com:8443/showFile/ueditor/lcsy.jpg'}
|
||||
],
|
||||
src:['https://fy.btlsoln.com:8443/showFile/ueditor/lcsy.jpg']
|
||||
},
|
||||
previewImg(e){
|
||||
console.log(e);
|
||||
var current=e.target.dataset.src;
|
||||
wx.previewImage({
|
||||
current: '', // 当前显示图片的http链接
|
||||
urls: this.data.src // 需要预览的图片http链接列表
|
||||
})
|
||||
},
|
||||
getMsg(){
|
||||
wx.request({
|
||||
url:'https://fy.btlsoln.com:8443/findHospital',
|
||||
method:"GET",
|
||||
data:{},
|
||||
header: {
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
success: (res)=> {
|
||||
this.setData({
|
||||
list:res.data.floorList
|
||||
})
|
||||
console.log(res,"医院导航")
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.getMsg()
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
wx.setNavigationBarTitle({
|
||||
title: '楼层索引'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
3
pages/localNavigation/localNavigation.json
Normal file
3
pages/localNavigation/localNavigation.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
14
pages/localNavigation/localNavigation.wxml
Normal file
14
pages/localNavigation/localNavigation.wxml
Normal file
@@ -0,0 +1,14 @@
|
||||
<!--pages/localNavigation/localNavigation.wxml-->
|
||||
<view class="main">
|
||||
<view class="content">
|
||||
<view wx:for="{{imgalist}}" wx:key="item">
|
||||
<image src="{{item.src}}" class="img" data-src="{{item.src}}" bindtap="previewImg">
|
||||
</image>
|
||||
</view>
|
||||
<!-- <image bindtap="previewImg" class="img" src="../../utils/11.jpg" alt=""/> -->
|
||||
<view class="item" wx:for="{{list}}" wx:key="item">
|
||||
<view class="num">{{item.FLOOR_NAME}}</view>
|
||||
<view class="msg">{{item.FLOOR_ABOUT}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
35
pages/localNavigation/localNavigation.wxss
Normal file
35
pages/localNavigation/localNavigation.wxss
Normal file
@@ -0,0 +1,35 @@
|
||||
/* pages/localNavigation/localNavigation.wxss */
|
||||
.main{
|
||||
margin: 30rpx 0;
|
||||
width: 750rpx;
|
||||
}
|
||||
.img{
|
||||
height: 400rpx;
|
||||
width: 100%;
|
||||
}
|
||||
.content{
|
||||
width: 90%;
|
||||
padding-left: 30rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.item{
|
||||
/* height: 140rpx; */
|
||||
width: 100%;
|
||||
padding: 0 25rpx;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 2rpx solid #e2dcdc;
|
||||
}
|
||||
.num{
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
width: 100%;
|
||||
font-size: 35rpx;
|
||||
color: rgba(75,135,248);
|
||||
}
|
||||
.msg{
|
||||
/* height: 70rpx; */
|
||||
line-height: 60rpx;
|
||||
width: 100%;
|
||||
font-size: 35rpx;
|
||||
color: #666;
|
||||
}
|
||||
Reference in New Issue
Block a user