Browse Source

图片展示

master
xuxubarca 4 years ago
parent
commit
5bb1707dc2
  1. 4
      config.js
  2. 2
      pages/billboards/park/index.wxml
  3. 14
      pages/service/detail/detail.js
  4. 9
      pages/service/detail/detail.wxml
  5. 65
      pages/service/detail/detail.wxss

4
config.js

@ -1,6 +1,6 @@
const config = {
api_url: 'http://192.168.52.42:8080/fqsb', // 服务器地址
// api_url: 'https://shibeirencai.elinkit.com.cn:7101/fqsb' // 正式环境
// api_url: 'http://10.10.11.199:7101/fqsb', // 服务器地址
api_url: 'https://shibeirencai.elinkit.com.cn:7101/fqsb' // 正式环境
// api_url: 'https://dingoa.elinkit.com.cn/fqsb', // 测试环境
}
export { config }

2
pages/billboards/park/index.wxml

@ -1,5 +1,5 @@
<!--pages/billboards/park/index.wxml-->
<view class="container">
<image bindtap="onClickItem" data-code="park-lgqm" data-title="六个千亩产业聚集区" class="billboard_item" src="{{img1}}"></image>
<image bindtap="detail" data-code="abbc5afa5e21f4452d38c3d5192e3399" data-title="RCEP验基地" class="billboard_item" src="{{img2}}"></image>
<image bindtap="detail" data-code="abbc5afa5e21f4452d38c3d5192e3399" data-title="RCEP验基地" class="billboard_item" src="{{img2}}"></image>
</view>

14
pages/service/detail/detail.js

@ -16,7 +16,8 @@ Page({
code:'',
departList:[],
app_id:'',
pic:''
pic:'',
imgList:[]
},
/**
@ -37,7 +38,8 @@ Page({
this.setData({
classify:detail.smallServer,
departList:detail.departList
departList:detail.departList,
imgList:detail.imgList
})
})
@ -143,5 +145,13 @@ Page({
},
onClose:function(){
this.setData({ show: false });
},
previewImage:function(e){
var current = e.target.dataset.src;
var th = this;
wx.previewImage({
current: current, // 当前显示图片的http链接
urls: e.target.dataset.arr // 需要预览的图片http链接列表
})
}
})

9
pages/service/detail/detail.wxml

@ -37,6 +37,15 @@
</view>
</view>
<view class="card" wx:if="{{imgList.length > 0}}">
<view class="imgBox">
<block wx:for="{{imgList}}">
<image src="{{item}}" data-src="{{item}}" data-arr="{{imgList}}" bindtap="previewImage"></image>
</block>
</view>
</view>
<block wx:if="{{code != 'poaz' && code != 'mrt' && code != 'jgtc'}}">
<view class="publish" bindtap="onTap">
<!-- <image src="/images/topic/publish.png"></image> -->

65
pages/service/detail/detail.wxss

@ -60,17 +60,17 @@ page{
justify-content: center;
font-size: 15px;
line-height:18px;
}
}
.van-bottom-enter-to{
border-radius: 0 !important;
}
.van-bottom-enter-to{
border-radius: 0 !important;
}
.van-bottom-leave-active{
.van-bottom-leave-active{
border-radius: 0 !important;
}
}
.popup-title{
.popup-title{
width: 100%;
height:40px;
font-weight: bold;
@ -78,27 +78,34 @@ page{
justify-content: center;
align-items: center;
border-bottom: 1px solid rgb(248,248,248);
}
}
.popup-con{
width: 100%;
height:100px;
display: flex;
align-items: center;
justify-content: center;
}
.popup-btn-box{
width: 80%;
display: flex;
justify-content: space-between;
}
.popup-button{
background-color: rgb(241,241,241);
width: 280rpx;
height:80rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
}
.popup-con{
width: 100%;
height:100px;
display: flex;
align-items: center;
justify-content: center;
}
.imgBox{
width:100%;
display: flex;
}
.popup-btn-box{
width: 80%;
display: flex;
justify-content: space-between;
}
.popup-button{
background-color: rgb(241,241,241);
width: 280rpx;
height:80rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
}
Loading…
Cancel
Save