收藏,图片地址

master
许宏杰 3 years ago
parent ea34afc967
commit dbe0ffeb9a

@ -1,7 +1,7 @@
<!--components/list/index.wxml-->
<view class="list-container">
<view class="list-item" wx:for="{{list}}" wx:key="index" bindtap="gotoInfo" data-index="{{index}}" data-item="{{item}}">
<image src="{{filterImages.getUrl(item.images.url)}}" mode="aspectFill"></image>
<image src="{{item.images.url}}" mode="aspectFill"></image>
<view class="swiper-meu">
<view class="swiper-title">
<view>

@ -67,7 +67,7 @@
<view class="swiper-item">
<view class="swiper-img">
<image src="{{filterImages.getUrl(item.images.url)}}" mode="aspectFill"></image>
<image src="{{item.images.url}}" mode="aspectFill"></image>
</view>
<view class="swiper-meu">
<view class="men-bxo">

@ -35,6 +35,7 @@ Page({
{ name: '复制链接', icon: 'http://www.jichuanglanhai.com/demo/js-yingdi/images/lianjie.png' },
{ name: '生成分享图', icon: 'http://www.jichuanglanhai.com/demo/js-yingdi/images/tu.png' },
],
storeImg:'http://www.jichuanglanhai.com/demo/js-yingdi/images/store.png'
},
/**
@ -109,9 +110,28 @@ Page({
address:location_addr,
})
},
bindStore(){
let img =''
if(this.data.storeImg=='http://www.jichuanglanhai.com/demo/js-yingdi/images/store.png'){
img = 'http://www.jichuanglanhai.com/demo/js-yingdi/images/active_store.png'
wx.showToast({
title: '已收藏',
icon:'none'
})
}else{
img = 'http://www.jichuanglanhai.com/demo/js-yingdi/images/store.png'
wx.showToast({
title: '已取消',
icon:'none'
})
}
this.setData({
storeImg:img
})
},
//预览图片
viewImages(e){
console.log(e)
let indexIamge = e.currentTarget.dataset.item.image.url
wx.previewImage({
urls:this.data.jieshaoList,
@ -132,14 +152,12 @@ Page({
if(list[i].data.camp.name == name){
let imgList= []
list[i].data.camp.images.forEach(item=>{//轮播
let url=item.url.substring(23,item.url.length);
imgList.push('http://www.jichuanglanhai.com/demo/js-yingdi/tupian1/'+url)
imgList.push(item.url)
})
//底部照片
list[i].data.camp.content.forEach(img=>{
if(img.image.url !=''){
let url='http://www.jichuanglanhai.com/demo/js-yingdi/tupian1/'+img.image.url.substring(23,img.image.url.length);
jieshaoList.push(url)
jieshaoList.push(img.image.url)
}
})
//icon列表

@ -26,8 +26,8 @@
</view>
</view>
<view class="user-btn">
<view class="store">
<image src="http://www.jichuanglanhai.com/demo/js-yingdi/images/store.png" mode="aspectFill"></image>
<view class="store" bindtap="bindStore">
<image src="{{storeImg}}" mode="aspectFill"></image>
</view>
<view class="share" bindtap="shareBtn">
<image src="http://www.jichuanglanhai.com/demo/js-yingdi/images/share.png" mode="aspectFill"></image>
@ -252,7 +252,7 @@
<view class="jieshao-list-item" wx:for="{{info.camp.content}}" wx:key="index">
<view class="list-item-text">{{item.content}}</view>
<view class="images-list-item" bindtap="viewImages" data-item="{{item}}" data-index="{{index}}">
<image wx:if="{{item.image.url}}" src="{{ m1.getUrl(item.image.url) }}" mode="widthFix" style="height: {{item.image.height}}rpx;"></image>
<image wx:if="{{item.image.url}}" src="{{item.image.url}}" mode="widthFix" style="height: {{item.image.height}}rpx;"></image>
</view>
</view>
</view>
@ -268,38 +268,6 @@
bind:select="onSelect"
bind:close="onClose"
/>
<!-- <van-popup show="{{ popupShow }}" position="bottom" bind:close="onClose" custom-class="popup-custom">
<view class="popup-title">分享至</view>
<view class="popup-btn-box">
<view class="popup-item">
<view class="popup-icon">
<image src="http://www.jichuanglanhai.com/demo/js-yingdi/images/wx.png" mode="aspectFill"></image>
</view>
<view class="popup-icon-title">微信好友</view>
</view>
<view class="popup-item">
<view class="popup-icon">
<image src="http://www.jichuanglanhai.com/demo/js-yingdi/images/pengyou.png" mode="aspectFill"></image>
</view>
<view class="popup-icon-title">朋友圈</view>
</view>
<view class="popup-item">
<view class="popup-icon">
<image src="http://www.jichuanglanhai.com/demo/js-yingdi/images/lianjie.png" mode="aspectFill"></image>
</view>
<view class="popup-icon-title">复制链接</view>
</view>
<view class="popup-item">
<view class="popup-icon">
<image src="http://www.jichuanglanhai.com/demo/js-yingdi/images/tu.png" mode="aspectFill"></image>
</view>
<view class="popup-icon-title">生成分享图</view>
</view>
</view>
<view class="popup-close-btn">
<button class="close-buttom" bindtap="onClose">取消</button>
</view>
</van-popup> -->
<!-- 天气弹出层 -->
<van-popup show="{{ weatherShow }}" position="bottom" custom-class="weather-popup-custom" bind:close="weatherClose">
<view class="weather-popup">

Loading…
Cancel
Save