ll
liukangdong
2024-12-09 9ce28811e94fa042adb7cabe6581b0393c6d576d
ll
已修改10个文件
188 ■■■■ 文件已修改
admin/src/views/workorder/components/OperaYwWorkorderWindow.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/api/staff.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/index.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/login.vue 134 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/operation/device.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/operation/record.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/workOrder/edit.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/workOrder/list.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/utils/config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/workorder/components/OperaYwWorkorderWindow.vue
@@ -142,8 +142,7 @@
      this.getCate()
      // 新建
      if (target == null) {
        this.$nextTick(() => {
          this.$refs.form = {
        this.form = {
            id: null,
            editDate: '',
            floor: '',
@@ -171,6 +170,7 @@
            dealInfo: '',
            dealType: ''
          }
        this.$nextTick(() => {
          this.buildList = []
          this.roomList = []
          this.levelList = []
h5/api/staff.js
@@ -15,6 +15,14 @@
    data
  })
}
// 授权
export const ywWxAuthorize = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/web/visitor/ywWxAuthorize',
    method: 'get',
    data
  })
}
export const findInternalList = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/system/user/findInternalList',
@@ -31,7 +39,7 @@
// loginout
export const logoutPost = (data) => {
  return http({
    url: '/logout',
    url: 'logout',
    method: 'post',
    data
  })
h5/pages.json
@@ -87,7 +87,7 @@
    ],
    "globalStyle": {
        "navigationBarTextStyle": "black",
        "navigationBarTitleText": "",
        "navigationStyle": "custom",
        "navigationBarBackgroundColor": "#ffffff",
        "backgroundColor": "#ffffff"
    },
h5/pages/index.vue
@@ -75,11 +75,12 @@
                })
            },
            loginOut() {
                this.$store.commit('empty')
                logoutPost()
                this.$store.commit('empty')
                uni.redirectTo({
                    url: '/pages/login'
                })
                // window.location.href= 'https://zhcg.fnwtzx.com/fn_h5'
            },
        }
h5/pages/login.vue
@@ -25,51 +25,85 @@
</template>
<script>
import { loginPost, getUserInfo, sendSMsPost } from '@/api'
import { mapState, mapMutations } from 'vuex'
    import {
        loginPost,
        getUserInfo,
        sendSMsPost,
        ywWxAuthorize
    } from '@/api'
    import {
        mapState,
        mapMutations
    } from 'vuex'
export default {
  name: 'login',
  data() {
    return {
      form: {
                phone: '18888888888',
                code: '1'
                    phone: '',
                    code: ''
      },
            downTime: 0
                downTime: 0,
                // code: '011dfEkl2PzcFe4ZxSnl22NKXz4dfEkQ'
                code: ''
    }
  },
  onLoad() {
  },
  onBackPress(options) {
    uni.redirectTo({
      url: '/pages/login/login'
        onShow() {
            // return
            var that = this
            let url = window.location.href
            if (url.indexOf('code=') !== -1 || this.code) {
                let code = ''
                const query = url.split('?')
                for (const q of query) {
                    if (q.indexOf('code=') !== -1) {
                        let statusIndex = q.indexOf('&state')
                        code = q.substring(q.indexOf('code=') + 5, statusIndex)
                    }
                }
                ywWxAuthorize({
                    code: code || this.code
                }).then(res => {
                    if (res.code === 200) {
                        that.$store.commit('setOpenId', res.data.openid)
                        if (res.data.token && res.data.token != '') {
                            that.$store.commit('setToken', res.data.token)
                            getUserInfo().then(ress => {
                                that.$store.commit('setUserInfo', ress.data)
    })
    return true
                            setTimeout(() => {
                                uni.redirectTo({
                                    url: "/pages/index"
                                })
                            }, 300)
                        }
                    }
                })
            } else {
                let url = 'https://zhcg.fnwtzx.com/yunwei_h5'
                const appID = 'wx95ac1efb67f0330d'
                let uri = encodeURIComponent(url)
                let authURL =
                    `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appID}&redirect_uri=${uri}&response_type=code&scope=snsapi_base#wechat_redirect`
                window.location.href = authURL
            }
  },
        // onBackPress(options) {
        //     uni.redirectTo({
        //         url: '/pages/login/login'
        //     })
        //     return true
        // },
  methods: {
    ...mapMutations(["setToken", "setUserInfo"]),
        sendSms() {
            this.downTime = 60
            let timer = setInterval(() => {
                if(this.downTime == 0) return clearInterval(timer)
                this.downTime = this.downTime - 1
            }, 1000)
            const { form } = this
            sendSMsPost({
                phone: form.phone,
                type: 0
            }).then(res => {
                this.showToast('短信发送成功')
            })
        },
    onLogin() {
      const { form, ProtocolFlag } = this
      // if (!ProtocolFlag) return uni.showToast({
      //   title: '请先阅读并同意用户协议',
      //   icon: 'none'
      // })
                const {
                    form,
                    ProtocolFlag
                } = this
      if (!form.phone) return uni.showToast({
        title: '手机号不能为空',
        icon: 'none'
@@ -78,9 +112,10 @@
        title: '验证码不能为空',
        icon: 'none'
      })
      loginPost({
        ...form,
        openId: this.$store.state.openId
                    openid: this.$store.state.openId
      }).then(res => {
        if (res.code === 200) {
          this.setToken(res.data)
@@ -93,7 +128,26 @@
          })
        }
      })
    }
            },
            sendSms() {
                this.downTime = 60
                let timer = setInterval(() => {
                    if (this.downTime == 0) return clearInterval(timer)
                    this.downTime = this.downTime - 1
                }, 1000)
                const {
                    form
                } = this
                sendSMsPost({
                    phone: form.phone,
                    type: 0
                }).then(res => {
                    this.showToast('短信发送成功')
                })
            },
  }
}
</script>
@@ -108,6 +162,7 @@
  align-items: center;
  flex-direction: column;
  background: linear-gradient( 180deg, #C5DDFF 0%, #FFFFFF 100%);
  .login_title {
    font-weight: 500;
    font-size: 52rpx;
@@ -116,14 +171,17 @@
        width: 100%;
        padding-left: 60rpx;
  }
    .login_title2{
        margin-top: 10rpx;
        margin-bottom: 80rpx;
    }
  .login_list {
    width: 100%;
    padding: 0 60rpx;
    box-sizing: border-box;
    .login_list_item {
      width: 100%;
      border-radius: 50rpx;
@@ -135,22 +193,27 @@
      display: flex;
      align-items: center;
      justify-content: space-between;
      &:last-child {
        margin-bottom: 0 !important;
      }
      image {
        flex-shrink: 0;
        width: 40rpx;
        height: 40rpx;
      }
      .btn{
          width: 145rpx;
          color:  $primaryColor;
                text-align: center;
      }
            .gray{
                color: #999999;
            }
      input {
        flex: 1;
        height: 100%;
@@ -160,17 +223,20 @@
      }
    }
  }
  .login_btn {
    width: 100%;
    padding: 0 60rpx;
    box-sizing: border-box;
    margin-top: 60rpx;
    .for_psd {
      color: $uni-color-primary;
      width: 140rpx;
      text-align: center;
      margin: 40rpx auto;
    }
    .login_btn_n {
      width: 100%;
      height: 98rpx;
@@ -185,6 +251,7 @@
            font-size: 32rpx;
    }
  }
  .deal_wrap {
    position: absolute;
    width: 100%;
@@ -194,15 +261,18 @@
    display: flex;
    justify-content: center;
    align-items: center;
    .deal {
      color: $uni-color-primary;
    }
    .checked {
      width: 48rpx;
      margin-right: 12rpx;
    }
  }
}
.modal {
  width: 690rpx;
  min-height: 920rpx;
h5/pages/operation/device.vue
@@ -5,8 +5,8 @@
                <view class="la"><text class="red">*</text>选择设备</view>
                <view class="line">
                    <view class="sel_wrap" @click="showModal = true">
                        <view class="left" :class="param.deviceName ? '' : 'placeholder9'">
                            {{ param.deviceName ? param.deviceName : '请选择设备' }}
                        <view class="left" :class="(param.deviceName || param.deviceCode) ? '' : 'placeholder9'">
                            {{ (param.deviceName || param.deviceCode) ? `[${param.deviceCode}] ` + param.deviceName : '请选择设备' }}
                        </view>
                        <u-icon name="arrow-right" color="#999999" size="17"></u-icon>
                    </view>
@@ -145,6 +145,7 @@
                } = this
                if (!activeDevice.id) return this.showToast('请先选择设备')
                this.$set(this.param, 'deviceId', activeDevice.id)
                this.$set(this.param, 'deviceCode', activeDevice.code)
                this.$set(this.param, 'deviceName', activeDevice.name)
                this.showModal = false
            },
@@ -261,7 +262,7 @@
                            },
                            (decodeText, decodeResult) => {
                                if (decodeText) { //这里decodeText就是通过扫描二维码得到的内容
                                    this.action(decodeText) //对二维码逻辑处理
                                    this.$set(this.param, 'deviceCode', decodeText)
                                    this.stopScan(); //关闭扫码功能
                                }
                            },
@@ -408,11 +409,12 @@
    }
    .sub_btn {
        position: fixed;
        bottom: 68rpx;
        left: 40rpx;
        // position: fixed;
        // bottom: 68rpx;
        // left: 40rpx;
        width: 670rpx;
        height: 88rpx;
        margin-top: 80rpx;
        background: $primaryColor;
        box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0, 104, 255, 0.3);
        border-radius: 44rpx;
@@ -457,7 +459,7 @@
        .modal_list {
            height: calc(100% - 360rpx);
            margin-bottom: -20rpx;
            .item {
                display: flex;
                align-items: center;
h5/pages/operation/record.vue
@@ -118,7 +118,7 @@
<style lang="scss" scoped>
    .main_app {
        padding: 0 30rpx;
        padding: 30rpx;
    }
    .head_wrap {
h5/pages/workOrder/edit.vue
@@ -143,6 +143,10 @@
                    param,
                    fileList
                } = this
                if (!param.projectId) return this.showToast('请选择完整的区域')
                if (!param.buildingId) return this.showToast('请选择完整的区域')
                if (!param.floorName && !param.roomNum) return this.showToast('请选择完整的区域')
                if (!param.cateName) return this.showToast('请选择工单分类')
                ywWorkorderCreate({
                    ...param,
                    // roomId: '',
@@ -445,11 +449,12 @@
    }
    .sub_btn {
        position: fixed;
        bottom: 68rpx;
        left: 40rpx;
        // position: fixed;
        // bottom: 68rpx;
        // left: 40rpx;
        width: 670rpx;
        height: 88rpx;
        margin-top: 80rpx;
        background: $primaryColor;
        box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0, 104, 255, 0.3);
        border-radius: 44rpx;
h5/pages/workOrder/list.vue
@@ -139,7 +139,7 @@
<style lang="scss" scoped>
    .main_app {
        padding: 0 30rpx;
        padding: 30rpx;
    }
    .tabs {
h5/utils/config.js
@@ -1,7 +1,7 @@
export const baseUrl = 'gateway_interface/'
// export const baseUrl = 'gateway_interface/'
// export const baseUrl = 'http://192.168.0.173/gateway_interface/'
// export const baseUrl = 'http://10.50.250.253:8088/gateway_interface/'
export const baseUrl = 'https://zhcg.fnwtzx.com/gateway_interface/'
export const uploadAvatar = `${baseUrl}visitsAdmin/cloudService/web/public/uploadFtp.do`
export const uploadUrl = `${baseUrl}visitsAdmin/cloudService/public/uploadBatch`