doum
2025-09-11 7298d5354963a88643a543b51b90192dc9fc934c
h5/pages/appointmentDetails/appointmentDetails.vue
@@ -85,24 +85,37 @@
        <view class="box_list_item_val">{{ info.carNos }}</view>
      </view>
    </view>
   <view class="padding_wrap">
      <view class="btn" v-if="[0,1,2,5].includes(info.status)" @click="cancelShow = true">取消预约</view>
   </view>
    <u-popup :show="show" mode="center" @close="close">
      <view class="qrocde">
        <canvas class="qrcode_img" canvas-id="img1"></canvas>
      </view>
    </u-popup>
   <!-- 取消预约弹窗 -->
   <u-modal
      :show="cancelShow"
      :showCancelButton="true"
      title="系统提示"
      content='确定取消当前预约吗?'
      @cancel="cancelShow = false"
      @confirm="cancel" />
  </view>
</template>
<script>
import wxcode from 'uniapp-qrcode'
import { getVisitedDetail } from '@/api'
import { getVisitedDetail, visitsSelfCancel } from '@/api'
export default {
  data() {
    return {
      id: null,
      info: {},
      show: false,
      detail: ''
      detail: '',
     cancelShow: false
    }
  },
  onBackPress(options) {
@@ -121,6 +134,7 @@
  onLoad(option) {
      uni.setStorageSync('ywinfo',{})
    this.detail = option.detail || ''
   this.id = option.id
    this.getDetail(option.id)
    // visitorSubDetail({ id: option.id })
    //    .then(res => {
@@ -136,6 +150,14 @@
  },
  methods: {
   // 取消预约
   cancel() {
      const member = uni.getStorageSync('member');
      visitsSelfCancel(this.id, this.$store.state.openId).then(res => {
         this.cancelShow = false
         this.getDetail(this.id)
      })
   },
    close() {
      this.show = false
    },
@@ -170,6 +192,28 @@
<style lang="scss" scoped>
.box {
  width: 100%;
  .padding_wrap {
     position: fixed;
     z-index: 999;
     padding: 0 30rpx 64rpx;
     bottom: 0;
     left: 0;
     width: 100%;
     display: flex;
     justify-content: space-between;
     .btn {
        height: 96rpx;
        line-height: 96rpx;
        text-align: center;
        width: 100%;
        font-size: 36rpx;
        color: #333333;
        background: #ffffff;
        border-radius: 48rpx;
        border: 1rpx solid #999999;
     }
  }
  .qrocde {
    width: 300rpx;
    height: 300rpx;