闫增涛
2024-09-19 a22c86c0a14de6fe7e7110f158beefa86ebc58ad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!-- <view style="width: 100%; height: {{barHeight}}px; "></view>
<view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;">
  <view>
    <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" />
  </view>
  <view class="navbar-title">资源详情</view>
</view>
 
-->
 
<view class="titleNameBox" wx:if="{{selectType != 'webpage'}}">
  {{titleName}}
</view>
<!-- bind:tap="onClick" -->
<view class="pictureBox" wx:if="{{selectType == 'picture'}}">
  <!-- style="width: {{(newScale <= 5 ? newScale: 5) * 100}}%;" -->
  <image
    src="{{showData}}"
    mode="widthFix"
    data-src="{{showData}}"
    bindtap="preview"
  />
</view>
 
<view wx:if="{{selectType == 'zip'}}">
  <view class="zipImageBox">
    <image src="/static/images/document/zip200px.png" mode="aspectFill" />
  </view>
 
  <view class="button-example">
    <t-button size="large" bind:tap="onDownloadButton" class="download-btn">
      <view class="text"> 下载 </view>
    </t-button>
  </view>
</view>
 
<view wx:if="{{selectType == 'pdf' ||  selectType == 'document'}}">
  <view
    wx:for="{{naturalResources}}"
    wx:key="index"
    wx:for-item="item"
    wx:for-index="index"
    class="img-box"
  >
    <image
      src="{{item}}"
      alt=""
      style="min-height: 550px"
      mode="aspectFit"
    ></image>
    <view class="divider">第 {{index + 1}} 页</view>
  </view>
</view>
 
<web-view wx:if="{{selectType == 'webpage'}}" src="{{webpageSrc}}"></web-view>
<!-- <button bind:tap="handleTap">点位</button> -->
 
<!-- <t-button theme="primary" size="large" variant="outline" block>基础图片预览</t-button> -->
<t-toast id="t-toast" />
<t-image-viewer
  usingCustomNavbar
  deleteBtn="{{deleteBtn}}"
  closeBtn="{{closeBtn}}"
  showIndex="{{showIndex}}"
  visible="{{visible}}"
  images="{{images}}"
  bind:change="onChange"
  bind:delete="onDelete"
  bind:close="onClose"
></t-image-viewer>