wjt
2024-06-25 244d89b41c0e0e995d38f635a126a0959b9ba25b
policy/scodePage/scodePage.vue
@@ -11,18 +11,24 @@
      <image src="/static/policy/back.png" mode="widthFix" class="back-image"></image>
      <view class="page-box">
         <view class="code-hint">
            <view>
               <image src="/static/policy/success.png" mode="widthFix"></image>
               <!-- <image src="/static/policy/error.png" mode="widthFix"></image> -->
               <text>成功-绿码</text>
               <!-- <text>失败-红码</text> -->
            </view>
            <view class="hint">
               可对此企业进行核查
            </view>
            <view class="hint">
               请核查企业信息
            </view>
            <template v-if="color == 'green'">
               <view>
                  <image src="/static/policy/success.png" mode="widthFix"></image>
                  <text>成功-绿码</text>
               </view>
               <view class="hint">
                  可对此企业进行核查
               </view>
            </template>
            <template  v-if="color == 'red'">
               <view >
                  <image src="/static/policy/error.png" mode="widthFix"></image>
                  <text>失败-红码</text>
               </view>
               <view class="hint">
                  请核查企业信息
               </view>
            </template>
         </view>
         <!-- 二维码 -->
         <view class="qrcode">
@@ -70,7 +76,7 @@
                        <text>申请时间:</text>{{item.applyTime}}
                     </view>
                     <view class="button-entery">
                        <view class="button" @click="doScanOrder(item.orderId)">确认执法</view>
                        <view class="button" v-if="item.isSelect" @click="doScanOrder(item.orderId, index)">确认执法</view>
                     </view>
                  </view>
               </swiper-item>
@@ -92,7 +98,8 @@
            uqrcodeImage: '',
            list: [],
            userInfo: {},
            color: ''
            color: '',
         }
      },
      onReady() {
@@ -106,7 +113,10 @@
      methods: {
         getScanList(companyCode){
            getScanList({companyCode}).then(val => {
               this.list = val.data.data
               this.list = val.data.data.map(item => {
                  item['isSelect'] = true
                  return item
               })
               if(this.list.length) {
                  this.color = 'green'
               } else {
@@ -128,13 +138,14 @@
               this.userInfo = val.data.data
            })
         },
         doScanOrder(item) {
         doScanOrder(item, index) {
            doScanOrder(item).then(val => {
               if(val.data.code == 200) {
                  uni.showToast({
                     title: '确认执法成功',
                     icon: 'none'
                  })
                  this.list[index].isSelect = false
               }
            })
         }