yvette 5 years ago
parent
commit
43ac7364f1
  1. 34
      pages/pbService/appreciate/index.js
  2. 4
      pages/pbService/appreciate/index.wxml

34
pages/pbService/appreciate/index.js

@ -6,6 +6,7 @@ Page({
* 页面的初始数据
*/
data: {
imgInfo:null,
videoTags:[],
type:2,
picTags:[],
@ -14,13 +15,20 @@ Page({
page_no:1,
total:1,
list:[],
isTest:true
isTest:true,
isIos:false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log()
if(wx.getSystemInfoSync().system.indexOf('iOS')!=-1){
this.setData({
isIos:true
})
}
commonApi._post("pbservice/Other/getClientConfig",{
unique_key:"wechatxcx"
}).then(res=>{
@ -103,15 +111,17 @@ Page({
gotoDetail:function(e){
let info = e.currentTarget.dataset.info;
if(this.data.type==2) {
commonApi.user_post("pbservice/Other/autoupload",{
url:info.Pic
}).then(res=>{
console.log(res)
if(this.data.isIos==false){
this.setData({
imgInfo:info
})
}
else {
wx.previewImage({
urls: [res.data.url],
current:res.data.url
urls: [info.Pic],
current:info.pic
})
})
}
return;
}
info = JSON.stringify(info);
@ -120,6 +130,14 @@ Page({
url: 'info/index?info='+info,
})
},
closeImg:function(){
this.setData({
imgInfo:null
})
},
preventTouchMove:function(){
},
/**
* 生命周期函数--监听页面初次渲染完成

4
pages/pbService/appreciate/index.wxml

@ -18,4 +18,8 @@
<view class="title textOver">{{item.Name}}</view>
<view class="subtitle textOver">{{item.CatalogName || item.Tag}}</view>
</view>
</view>
<view class="mask" wx:if="{{imgInfo}}" catchtouchmove="preventTouchMove">
<view class="mask-bg" bindtap="closeImg"></view>
<image bindtap="closeImg" style="width:100%;height:100%;display:block" src="{{imgInfo.Pic}}" mode="aspectFit"></image>
</view>
Loading…
Cancel
Save