Browse Source

优化图片显示

master
邓平艺 5 years ago
parent
commit
3aefba7a92
  1. 13
      canteen/components/lf-previewImage/lf-previewImage.vue
  2. 6
      canteen/pages/purchase/detail.vue
  3. 2
      canteen/pages/purchase/receipt.vue
  4. 10
      supplier/pages/gonghuo/detail.vue

13
canteen/components/lf-previewImage/lf-previewImage.vue

@ -14,6 +14,8 @@
<movable-area class="movable-area" :scale-area="true">
<movable-view class="movable-view" direction="all" :scale="true" :inertia="true" @scale="scale" :scale-value="scale_values[swiper_current]">
<image :src="item" class="swiper-image" mode="aspectFit" @mousewheel.stop="mousewheel" @longpress="longpress"></image>
<!-- 判断 -->
<!-- <view class="loading-failed">图片加载失败</view> -->
</movable-view>
</movable-area>
<!-- 控制器 -->
@ -308,6 +310,17 @@
}
}
}
.loading-failed{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
color: red;
}
//
/deep/.uni-sample-toast{
z-index: 1002;

6
canteen/pages/purchase/detail.vue

@ -3,7 +3,7 @@
<block v-if="$isRight(order)">
<view class="head">
<view class="lf-row-between list">
<lf-image :src="order.supplier.logo" errSrc="../../static/images/supplier_avatar.png" class="image"></lf-image>
<lf-image :src="order.supplier.logo_url" errSrc="../../static/images/supplier_avatar.png" class="image"></lf-image>
<view class="info">
<view class="lf-font-32 lf-color-black lf-font-bold">{{ order.supplier.supplier_name }}</view>
<view class="lf-font-24 lf-color-555">{{ order.supplier.address }}</view>
@ -218,9 +218,9 @@
let canteen_voucher = [];
order.voucher.map(item => {
if(item.client_type == '供应商'){
supplier_voucher.push(item.voucher_pic);
supplier_voucher.push(item.voucher_pic_url);
}else if(item.client_type == '食堂'){
canteen_voucher.push(item.voucher_pic);
canteen_voucher.push(item.voucher_pic_url);
}
})
this.supplier_voucher = supplier_voucher;

2
canteen/pages/purchase/receipt.vue

@ -298,7 +298,7 @@
let voucher = res.data?.order?.voucher || [];
voucher = voucher.filter(item => item.client_type == '食堂');
this.is_upload = voucher.length > 0;
this.upload_list = voucher.map(item => item.voucher_pic);
this.upload_list = voucher.map(item => item.voucher_pic_url);
})
},
inputBlur(current, key, event){

10
supplier/pages/gonghuo/detail.vue

@ -2,7 +2,7 @@
<view>
<view class="head">
<view class="lf-row-between list" v-if="order.canteen">
<lf-image class="image" :src="order.canteen.logo" errSrc="../../static/images/canteen_avatar.png"></lf-image>
<lf-image class="image" :src="order.canteen.logo_url" errSrc="../../static/images/canteen_avatar.png"></lf-image>
<view class="info">
<view class="lf-font-32 lf-color-black lf-font-bold">{{ order.canteen.canteen_name }}</view>
<view class="lf-font-24 lf-color-555">{{ order.canteen.address }}</view>
@ -244,9 +244,9 @@
let canteen_voucher = [];
order.voucher.map(item => {
if(item.client_type == '供应商'){
supplier_voucher.push(item.voucher_pic);
supplier_voucher.push(item.voucher_pic_url);
}else if(item.client_type == '食堂'){
canteen_voucher.push(item.voucher_pic);
canteen_voucher.push(item.voucher_pic_url);
}
})
this.supplier_voucher = supplier_voucher;
@ -601,4 +601,8 @@
/deep/.u-drawer{
z-index: 999 !important;
}
//
/deep/.popup-box .content .popup-desc{
text-align: left;
}
</style>
Loading…
Cancel
Save