''
liukangdong
2024-05-28 cef577c6928c961b4c3e2d97748a232aac64b903
''
已修改7个文件
已重命名1个文件
168 ■■■■■ 文件已修改
h5/api/visitor.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/applicationRecord/applicationRecord.vue 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/appointmentDetails/appointmentDetails.vue 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/login/login.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/notice/notice.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/visitorApplication/visitorApplication.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/static/redirect.html 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/store/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/api/visitor.js
@@ -40,3 +40,11 @@
    data
  })
}
// è®¿å®¢è®°å½•详情
export const getVisitedDetail = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/web/visitor/detail',
    method: 'get',
    data
  })
}
h5/pages/applicationRecord/applicationRecord.vue
@@ -9,34 +9,30 @@
      </view>
    </scroll-view>
    <view class="box_list">
      <view class="box_list_item" v-for="(item, index) in 3" :key="index">
      <view @click="handleDetail(item.id)" class="box_list_item" v-for="(item, index) in list" :key="index">
        <view class="box_list_item_head">
          <text>丁恩凯的劳务入厂申请</text>
          <text class="loading">待审核</text>
          <text>{{ item.name }}的劳务入厂申请</text>
          <text class="loading">{{ statusMap[item.status] }}</text>
        </view>
        <view class="box_list_item_nr">
          <view class="box_list_item_nr_item">
            <text>被访问人:</text>
            <text>人事部-王亚蓝</text>
            <text>{{ item.receptMemberDepartment }}-{{ item.receptMemberName }}</text>
          </view>
          <view class="box_list_item_nr_item">
            <text>进厂时间:</text>
            <text>12-12 09:00</text>
            <text>{{ item.starttime }}</text>
          </view>
          <view class="box_list_item_nr_item">
            <text>离厂时间:</text>
            <text>12-12 12:00</text>
          </view>
          <view class="box_list_item_nr_item">
            <text>入厂人数:</text>
            <text>10</text>
            <text>{{ item.endtime }}</text>
          </view>
          <view class="box_list_item_nr_item">
            <text>来访事由:</text>
            <text>业务来往</text>
            <text>{{ item.reason }}</text>
          </view>
          <view class="box_list_item_nr_x"></view>
          <view class="box_list_item_nr_text"> 2023-12-12 09:00提交 </view>
          <view class="box_list_item_nr_text">{{ item.createDate }} æäº¤</view>
        </view>
      </view>
    </view>
@@ -49,22 +45,41 @@
  data() {
    return {
      pagination: {
        page: 1,
        page: 0,
        capacity: 10
      },
      list: []
      list: [],
      statusMap: {
        0: '待审核',
        1: '已提交',
        2: '审核通过',
        3: '审核不通过',
        4: '取消',
        5: '下发成功',
        6: '下发失败',
      }
    }
  },
  onLoad() {
    this.getList()
  },
  methods: {
    handleDetail(id) {
      uni.navigateTo({
          url: "/pages/appointmentDetails/appointmentDetails?id="+ id
      })
    },
    getList() {
      const { pagination } = this
      getVisitedRecord({
        pageWrap: { ...pagination }
         ...pagination,
         model: {
          openid: this.$store.state.openId
         } ,
      }).then(res => {
        this.list = res.data
        this.list = res.data.records || []
      })
    }
h5/pages/appointmentDetails/appointmentDetails.vue
@@ -1,14 +1,16 @@
<template>
    <view class="box">
        <view class="head_wrap head_success" v-if="info.status == 1">
    <view class="head_wrap head_success" v-if="info.status == 2">
            <view class="h1">访客预约审核通过</view>
            <view class="h2">您的来访申请已审核通过,请在访客机签到入厂。如遇特殊情况,可联系被访人或安保人员</view>
      <view class="h2"
        >您的来访申请已审核通过,请在访客机签到入厂。如遇特殊情况,可联系被访人或安保人员</view
      >
        </view>
        <view class="qr_wrap" v-if="info.status == 1">
    <view class="qr_wrap" v-if="info.status == 2">
            <canvas class="box_head_qrcode" canvas-id="img"></canvas>
            <view class="text">使用访客机扫码签到</view>
        </view>
        <view class="head_wrap head_padding" v-if="info.status == 2">
    <view class="head_wrap head_padding" v-if="info.status == 0">
            <view class="h1">访客预约待审核</view>
            <view class="h2">您的预约单已提交审核,请等待被访人审核</view>
        </view>
@@ -18,10 +20,15 @@
        </view>
        <view class="box_list">
            <view class="box_list_label">拜访信息</view>
            <view class="box_list_tips" v-if="info.status === 2">请注意查看出入门禁下发情况,如若下发失败需重新申请</view>
      <view class="box_list_tips" v-if="info.status == 6 || info.status == 3"
        >请注意查看出入门禁下发情况,如若下发失败需重新申请</view
      >
            <view class="box_list_item">
                <view class="box_list_item_label">被访人员:</view>
                <view class="box_list_item_val">{{info.visitUserName}}</view>
        <view class="box_list_item_val"
          >{{ info.visitUserCompany
          }}{{ info.visitUserName ? "-" + info.visitUserName : "" }}</view
        >
            </view>
            <!-- <view class="box_list_item">
                <view class="box_list_item_label">车牌号:</view>
@@ -36,23 +43,20 @@
                <view class="box_list_item_val">{{info.visitTime}}</view>
            </view>
            <view class="box_list_item">
                <view class="box_list_item_label">访问门禁:</view>
                <view class="box_list_item_val" v-if="info.doorGroupName && info.doorGroupName.length > 0">{{info.doorGroupName.join('、')}}</view>
        <view class="box_list_item_label">访客信息:</view>
        <view class="box_list_item_val">{{ info.name }} {{ info.phone }}</view>
            </view>
            <view class="box_list_item">
                <view class="box_list_item_label">主访客:</view>
                <view class="box_list_item_val">
                    {{info.name}} {{info.phone}}
        <view class="box_list_item_label">施工人员:</view>
        <view class="box_list_item_val">{{ info.type == 0 ? '否' : '是'}}</view>
                </view>
            <view class="box_list_item" v-if="info.type == '1'">
        <view class="box_list_item_label">施工内容:</view>
        <view class="box_list_item_val">{{ info.constructionReason}}</view>
            </view>
            <view class="box_list_item" v-for="(item, index) in info.withVisitsList" :key="index">
                <view class="box_list_item_label">随访人员{{index + 1}}:</view>
                <view class="box_list_item_val">
                    {{item.name}} {{item.phone}}
                    <view class="box_list_item_val_btn" v-if="[2,5,7,8,9].includes(item.status)">
                        <u-button text="查看二维码" size="mini" @click="seeQrCode(item)" type="primary"></u-button>
                    </view>
                </view>
      <view class="box_list_item">
        <view class="box_list_item_label">随行车辆:</view>
        <view class="box_list_item_val">{{ info.carNos }}</view>
            </view>
        </view>
        <u-popup :show="show" mode="center" @close="close">
@@ -65,19 +69,17 @@
<script>
    import wxcode from 'uniapp-qrcode'
    import { visitorSubDetail } from '@/api'
import { getVisitedDetail } from '@/api'
    export default {
        data() {
            return {
                info: {
                    status: 1
                },
      info: {},
                show: false
            };
    }
        },
        onLoad(option) {
            // this.$u.api.detail({ id: option.id })
    this.getDetail(option.id)
            // visitorSubDetail({ id: option.id })
            //     .then(res => {
            //         if (res.code === 200) {
@@ -89,10 +91,21 @@
            //             }
            //         }
            //     })
        },
        methods: {
            close() {
                this.show = false
    },
    getDetail(id) {
      getVisitedDetail({ id }).then(res => {
        this.info = res.data
        if (res.data.qrcode) {
          this.$nextTick(() => {
            wxcode.qrcode('img', res.data.qrcode, 320, 320)
          })
        }
      })
            },
            seeQrCode(code) {
                if (code.qrcode) {
@@ -132,10 +145,11 @@
            .box_head_qrcode {
                width: 320rpx;
                height: 320rpx;
            margin: 20rpx auto;
            }
            .text{
                font-size: 30rpx;
                color: #279BAA;
      color: #279baa;
                padding: 20rpx 0 30rpx;
            }
        }
@@ -153,27 +167,27 @@
            }
        }    
        .head_padding{
            background: #279BAA;
    background: #279baa;
            .h1{
                color: #FFFFFF;
      color: #ffffff;
            }
            .h2{
                color: #FFFFFF;
      color: #ffffff;
            }
        }
        .head_error{
            background: #FDEDED;
    background: #fdeded;
            .h1{
                color: #ED4545;
      color: #ed4545;
            }
            .h2{
                color: #333333;
            }
        }
        .head_success{
            background: #E8F4F6;
    background: #e8f4f6;
            .h1{
                color: #279BAA;
      color: #279baa;
            }
            .h2{
                color: #333333;
@@ -194,7 +208,7 @@
                background-color: rgba(224, 49, 42, 0.06);
                font-weight: 400;
                font-size: 24rpx;
                color: #E0312A;
      color: #e0312a;
                border-radius: 4rpx;
                margin: 30rpx 0;
            }
h5/pages/login/login.vue
@@ -62,14 +62,10 @@
        title: '密码不能为空',
        icon: 'none'
      })
      const appID = 'wx4d7c10bdec51942b'
      const AppSecret = '922c93596d134fedf5bd22a9354b3bfe'
      // const scope = 'snsapi_userinfo'
      let uri = encodeURIComponent('https://xiaopiqiu2.natapp1.cc')
      let authURL =
        `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appID}&redirect_uri=${uri}&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect`
      window.location.href = authURL
      loginPost(form).then(res => {
      loginPost({
        ...form,
        openId: this.$store.state.openId
      }).then(res => {
        console.log('res', res);
      })
    }
h5/pages/notice/notice.vue
@@ -25,8 +25,20 @@
  },
  onLoad() {
    this.getInfo()
    if(!this.$store.state.openId){
      this.initToken()
    }
  },
  methods: {
    initToken() {
      const appID = 'wxac2a80c2144c4ee0'
      // const AppSecret = '922c93596d134fedf5bd22a9354b3bfe'
      let uri = encodeURIComponent('http://xiaopiqiu2.natapp1.cc/static/redirect.html')
      let authURL =
        `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appID}&redirect_uri=${uri}&response_type=code&scope=snsapi_base&state=123#wechat_redirect`
      window.location.href = authURL
    },
    getInfo() {
      // å…¥åœºé¡»çŸ¥è¯¦æƒ…
      getSystemDictData({
h5/pages/visitorApplication/visitorApplication.vue
@@ -83,7 +83,7 @@
            <view v-if="form1.type == '1'" class="list_item">
                <view class="list_item_label">
                    <text>施工内容</text>
                    <text>*</text>
                    <!-- <text>*</text> -->
                </view>
                <view class="list_item_content">
                    <input type="text" v-model="form1.constructionReason" placeholder="请输入施工内容" placeholder-style="color: #999999;" />
h5/static/redirect.html
ÎļþÃû´Ó h5/redirect.html ÐÞ¸Ä
@@ -6,7 +6,8 @@
  <script>
    var p = location.href.split("?")
    // window.location.href = 'https://dmtest.ahapp.net/hsvisit_h5/#/pages/notice/notice?' + p[1]
    window.location.href = 'http://facepay.huasunsolar.com/h5/#/pages/notice/notice?' + p[1]
    alert(p[1])
    // window.location.href = 'http://xiaopiqiu2.natapp1.cc/#/pages/staff/index?' + p[1]
  </script>
</head>
<body>
h5/store/index.js
@@ -18,7 +18,7 @@
const store = new Vuex.Store({
    state: {
        openId: openId || '',
        openId: openId || '061kuG0006hxcS13TT200w9VIp4kuG09',
        member: member || null,
        statusbarHeight: statusbarHeight || '0',
        navHeight: navHeight || '0',