fix:安全溯源bug

parent d1cd518f
......@@ -51,7 +51,7 @@
</view>
<view class="mt-2 box" v-if="order_detail.order.shipping_type === '1'">
<view class="item font-32">配送信息</view>
<view class="item font-32 mb-3">配送信息</view>
<view class="mt-3">配送方式:商家配送<text class="primary ml-1" @click="makePhoneCall()">联系商家</text></view>
<view class="item mt-3 w-100 flex j-start a-start">
<view class="hd">配送地址:</view>
......@@ -69,9 +69,9 @@
</view>
<view class="mt-2 box" v-else>
<view class="item font-32">配送信息</view>
<view class="item font-32 mb-3">自提信息</view>
<view>配送方式: 买家自提<text class="primary ml-1" @click="makePhoneCall()">联系商家</text></view>
<view class="item mt-e3 w-100 flex j-start a-start">
<view class="item mt-3 w-100 flex j-start a-start">
<view class="hd">自提地址:</view>
<view class="flex-1">
<text class="flex-1">{{order_detail.order.pickup_address}}</text>
......@@ -96,8 +96,18 @@
<view class="box mt-2">
<view class="font-32 mb-3">发票信息</view>
<view>
发票:发票信息参数(文字/图片等)
<view class="item mt-3 w-100 flex j-start a-start">
<view class="hd">发票:</view>
<view class="flex-1 flex flex-column">
<view class="w-100 mb-2">{{order_detail.order.invoice_link || '发票信息参数(文字/图片等)'}}</view>
<image
class="w-100"
v-if="order_detail.order.invoice_img"
mode="widthFix"
@click="perviewInvoice(order_detail.order.invoice_img)"
:src="order_detail.order.invoice_img"
/>
</view>
</view>
</view>
......@@ -281,6 +291,15 @@ export default {
uni.navigateTo({
url: `/subPages/address/changeAddress?params=${encodeURIComponent(JSON.stringify(params))}`
})
},
// 预览发票
perviewInvoice(link) {
if(!link) return
uni.previewImage({
current: link, // 当前显示图片的http链接
urls: [link] // 需要预览的图片http链接列表
})
}
}
}
......
<template>
<view class="box mb-2">
<view class="h_title text-center">
供货商资质证书
{{name}}资质证书
</view>
<view class="swiper-wrap">
<view class="swiper-wrap" v-if="list.length > 0">
<swiper
class="swiper-inner"
:current="img_current"
......@@ -37,11 +37,11 @@
</template>
</view>
<view class="w-100 flex j-between a-center mb-2" v-if="originName">
<view class="descColor">供货商单位</view>
<view class="descColor">{{name}}单位</view>
<view>{{originName}}</view>
</view>
<view class="w-100 flex j-between a-center" v-if="originCode">
<view class="descColor">供货商统一社会信用代码</view>
<view class="descColor">{{name}}统一社会信用代码</view>
<view>{{originCode}}</view>
</view>
</view>
......@@ -50,7 +50,6 @@
<script module="preUtil" lang="wxs">
// 改变这个num的时候要注意下面pre方法的 2
function dealArr(arr, num) {
console.log(arr, num)
if(!arr || arr.length === 0) {
return []
} else {
......@@ -94,7 +93,7 @@
data() {
return {
img_current: 0,
list_len: Math.floor(this.list.length / 2)
list_len: Math.ceil(this.list.length / 2) - 1
}
},
......
......@@ -32,15 +32,15 @@
name="供货商"
:originName="detail.dynamic_data.sup_name"
:originCode="detail.dynamic_data.sup_unit_credit_code"
:list="detail.dynamic_data.sup_zhizhao"
:list="detail.sup_imgs"
/>
<preview-zz
v-if="detail.dynamic_data.jxs_zhizhao && detail.dynamic_data.jxs_zhizhao.length > 0"
name="经销商"
:originName="detail.dynamic_data.jxs_name"
:originCode="detail.dynamic_data.sup_unit_credit_code"
:list="detail.dynamic_data.jxs_unit_credit_code"
:originCode="detail.dynamic_data.jxs_unit_credit_code"
:list="detail.jxs_imgs"
/>
</view>
</template>
......@@ -48,13 +48,14 @@
<script>
import previewZz from './components/preview_zz.vue'
import { safeOrigin } from '@/apis/order.js'
import dayjs from 'dayjs'
export default {
data() {
return {
detail: {}
}
},
components: {
previewZz
},
......@@ -70,6 +71,10 @@
safeOrigin(this.og_id)
.then(({status, data}) => {
if(status) {
data.base_data.production_data = data.base_data.production_data ? dayjs(data.base_data.production_data * 1000).format('YYYY-MM-DD') : '--'
// 【营业执照,许可证,其他资质]
data.sup_imgs = [...data.dynamic_data.sup_zhizhao, ...data.dynamic_data.sup_food_production_license, ...data.dynamic_data.sup_other_qualifications]
data.jxs_imgs = [...data.dynamic_data.jxs_zhizhao, ...data.dynamic_data.jxs_food_production_license, ...data.dynamic_data.jxs_other_qualifications]
this.detail = data
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment