wjt
2024-06-27 69a74309ed12cc13f0fa9fb90c5bffad17ade360
问题修改
3个文件已添加
11个文件已修改
675 ■■■■ 已修改文件
api/auth.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/qiye.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
common/http.interceptor.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/select.vue 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/companyLogin/companyLogin.vue 72 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
policy/changePhone/changePhone.vue 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
policy/policyApply/perPage.vue 88 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
policy/policyApply/perPicker.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
policy/policyApply/policyApply.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
qiye/my/my.vue 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
qiye/qiyeIndex/qiyeIndex.vue 257 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
qiye/switchPhone/switchPhone.vue 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/qiye/qiehuan.png 补丁 | 查看 | 原始文档 | blame | 历史
api/auth.js
@@ -35,5 +35,9 @@
}
// 更换手机号码 updatePhone
export function updatePhone(data) {
    return http.post(`/system/user/profile/updatePhone/${data.phone}`, data);
    return http.post(`/system/user/profile/updatePhone/${data.phone}/${data.companyId}`, data);
}
// /system/company/list
export function getCompanyList(data){
    return http.get('/system/company/list',{params: data}, { custom: { loading: true }});
}
api/qiye.js
@@ -45,4 +45,9 @@
// 无orderid
export function orderNodeList(data){
    return http.get('/enforce/complaint/log/orderNodeList',{params: data}, { custom: { loading: true }});
}
}
// /system/company/list
// export function getCompanyList(data){
//     return http.get('/system/company/list',{params: data}, { custom: { loading: true }});
// }
common/http.interceptor.js
@@ -67,7 +67,7 @@
                    mask: true
                })
                setTimeout(() => {
                    uni.navigateTo({
                    uni.reLaunch({
                        url: '/pages/index/index'
                    })
                }, 900)
components/select.vue
New file
@@ -0,0 +1,68 @@
<template>
    <u-popup mode="center" :show="show" @close="close" bgColor="white" round="10">
        <view style=" width: 80vw;padding:  32rpx;">
            <view class="title">选择登录企业</view>
            <u-radio-group  iconPlacement="right" v-model="value" placement="column">
                <u-radio v-for="(item,index) in list" :key="index" :label="item.companyName" :name="item.companyId"></u-radio>
            </u-radio-group>
            <view class="down-button">
                <view>
                    <u-button shape="circle" @click="close">取消</u-button>
                </view>
                <view>
                    <u-button shape="circle" color="#1171E0" @click="entery">确定</u-button>
                </view>
            </view>
        </view>
    </u-popup>
</template>
<script>
    export default {
        data() {
            return {
                value: "",
                show: false,
                list: [{},{}]
            }
        },
        methods: {
            open(list) {
                this.list = list
                this.show = true
            },
            close() {
                uni.removeStorageSync('sessionToken')
                this.show = false
            },
            entery() {
                if(!this.value) {
                    uni.showToast({
                        title: '请选择企业',
                        icon: 'none'
                    })
                    return
                }
                this.$emit('select', this.value)
            }
        }
    }
</script>
<style lang="scss" scoped>
    .title{
        font-size: 36rpx;
        font-weight: 700;
        text-align: center;
        margin-bottom: 20rpx;
    }
    .down-button{
        margin-top: 30rpx;
        display: flex;
        justify-content: space-between;
        align-items: center;
        &>view{
            width: 45%;
        }
    }
</style>
pages.json
@@ -228,6 +228,13 @@
                    "navigationBarTitleText" : "",
                    "navigationStyle": "custom"
                }
            },
            {
                "path" : "switchPhone/switchPhone",
                "style" :
                {
                    "navigationBarTitleText" : "切换企业"
                }
            }
                
            ]
pages/companyLogin/companyLogin.vue
@@ -1,7 +1,7 @@
<!-- 企业登录 -->
<template>
    <view class="companylogin">
        <u-navbar title="" :autoBack="true" bgColor="transparent">
        <u-navbar :autoBack="true" bgColor="transparent">
            <template slot="center">
                
            </template>
@@ -53,13 +53,18 @@
             </view>
            <!-- <u--text text="企业注册" type="primary" @click="goRegister"></u--text> -->
        </view>
        <selectVue ref="selectVue" @select="select"></selectVue>
    </view>
</template>
<script>
    // 00营商办,01执法,02企业 区分不同的登陆页面
    import { getCode, codeLogin, getInfo } from '@/api/auth.js'
    import { getCode, codeLogin, getInfo, getCompanyList } from '@/api/auth.js'
    import selectVue from '@/components/select.vue'
    export default {
        components: {
            selectVue
        },
        data() {
            return {
                tips: '获取验证码',
@@ -71,7 +76,9 @@
                loginToken: '',
                isSendCode: false,
                countdownTime: 20,
                timer: ''
                timer: '',
                sessionToken: "",
                userInfo: {}
            }
        },
        onLoad(options) {
@@ -162,25 +169,59 @@
            },
            getInfo() {
                getInfo().then(val => {
                    uni.setStorageSync('userInfo',  val.data.data)
                    if(this.form.userType == '02') {
                        uni.reLaunch({
                            url:`/qiye/qiyeIndex/qiyeIndex?id=${val.data.data.deptId}`
                        })
                    } else if(this.form.userType == '01'){
                        uni.reLaunch({
                            url:`/policy/policyIndex/policyIndex`
                        })
                    // uni.setStorageSync('userInfo',  val.data.data)
                    if(val.data.code === 200) {
                        this.userInfo = val.data.data
                        if(this.form.userType == '02') {
                            // 获取企业
                            this.getCompanyList(val.data.data.phonenumber)
                        } else if(this.form.userType == '01'){
                            uni.setStorageSync('userInfo',  val.data.data)
                            // uni.setStorageSync('sessionToken', this.loginToken)
                            uni.reLaunch({
                                url:`/policy/policyIndex/policyIndex`
                            })
                        } else {
                            uni.setStorageSync('userInfo',  val.data.data)
                            // uni.setStorageSync('sessionToken', this.loginToken)
                            uni.reLaunch({
                                url:`/policy/policyIndex/policyIndex`
                            })
                        }
                    } else {
                        uni.reLaunch({
                            url:`/policy/policyIndex/policyIndex`
                        uni.removeStorageSync('sessionToken')
                        uni.showToast({
                            title: val.data.msg,
                            icon: 'none'
                        })
                    }
                }).catch(err => {
                    uni.removeStorageSync('sessionToken')
                })
            },
            goRegister() {
                uni.navigateTo({
                    url: `/pages/registerCompany/registerCompany`
                })
            },
            getCompanyList(companyPhone) {
                getCompanyList({companyPhone, companyStatus: 0, checkStatus: 2}).then(val => {
                    if(val.data.rows.length > 1){
                        this.$refs.selectVue.open(val.data.rows)
                    } else {
                        uni.setStorageSync('userInfo',  this.userInfo)
                        uni.reLaunch({
                            url:`/qiye/qiyeIndex/qiyeIndex?id=${this.userInfo.deptId}`
                        })
                    }
                })
            },
            select(event){
                uni.setStorageSync('userInfo',  this.userInfo)
                uni.reLaunch({
                    url:`/qiye/qiyeIndex/qiyeIndex?id=${event}`
                })
            }
        }
@@ -249,4 +290,7 @@
            background: #F0F8FF;
        }
    }
    /deep/ .u-radio {
        margin-bottom: 20rpx;
    }
</style>
policy/changePhone/changePhone.vue
@@ -49,9 +49,11 @@
            }
        },
        onLoad(options) {
            console.log(options)
            if(options.code) {
                this.form.userType = options.code
            }
            if(options.companyId) {
                this.form.companyId = options.companyId
            }
        },
        onUnload() {
@@ -149,13 +151,27 @@
                }
                updatePhone(this.form).then(val => {
                    if(val.data.code == 200) {
                        uni.showToast({
                            title: '修改成功',
                            icon: 'none'
                        })
                        setTimeout(() => {
                            uni.navigateBack()
                        }, 500)
                        if(val.data.data == 1) {
                            uni.showToast({
                                title: '修改成功,请重新登录',
                                icon: 'none'
                            })
                            uni.clearStorage()
                            setTimeout(() => {
                                uni.reLaunch({
                                    url: '/pages/companyLogin/companyLogin?code=02'
                                })
                            }, 500)
                        } else {
                            uni.showToast({
                                title: '修改成功',
                                icon: 'none'
                            })
                            setTimeout(() => {
                                uni.navigateBack()
                            }, 500)
                        }
                    }
                    
                })
policy/policyApply/perPage.vue
@@ -2,12 +2,21 @@
    <u-popup mode="button" :safeAreaInsetBottom="false" :show="show" @close="close" @open="open" z-index="8000" bgColor="#fff">
        <view class="bg-box">
            <view class="title">选择随行人员</view>
            <scroll-view scroll-y="true" style="height: 600rpx;">
                <u-checkbox-group     iconPlacement="right"  v-model="checkboxValue1" placement="column" @change="checkboxChange">
                    <u-checkbox :customStyle="{marginBottom: '40rpx', }" v-for="(item, index) in checkboxList1" :key="index"
                         :name="item.userId" :label="`${item.dept.deptName}--${item.nickName}`">
                    </u-checkbox>
                </u-checkbox-group>
            <u-search v-model="nickName" @search="enforceList" @clear="clearContent" @confirm="enforceList" @custom="enforceList()"></u-search>
            <scroll-view scroll-y="true" style="height: 600rpx;margin-top: 20rpx;">
                <view v-if="checkboxList1.length">
                    <u-checkbox-group     iconPlacement="right"  v-model="checkboxValue1" placement="column" @change="checkboxChange">
                        <u-checkbox :customStyle="{marginBottom: '40rpx', }" v-for="(item, index) in checkboxList1" :key="index"
                             :name="item.userId" :label="`${item.dept.deptName}--${item.nickName}`">
                        </u-checkbox>
                    </u-checkbox-group>
                </view>
                <view class="set-color" v-else>
                    <view class="set-center">
                        <u-icon name="file-text" size="30" color="gray"></u-icon>
                        <view style="width: 100%;margin-top: 20rpx;">暂无数据</view>
                    </view>
                </view>
            </scroll-view>
            <view class="set-flex set-flex-content-between down-options">
                <view class="button-per">
@@ -22,13 +31,14 @@
</template>
<script>
    import { enforceList } from '@/api/policy.js'
    export default {
        props: {
            list: {
                type: Array,
                default: () => []
            }
        },
        // props: {
        //     list: {
        //         type: Array,
        //         default: () => []
        //     }
        // },
        data() {
            return {
                show: false,
@@ -36,18 +46,23 @@
                // 基本案列数据
                checkboxList1: [
                ],
                nickName: ""
            }
        },
        watch: {
            list: {
                handler(n) {
                this.checkboxList1 = n
                },
                immediate: true
            }
            // list: {
            //     handler(n) {
            //         this.checkboxList1 = n
            //     },
            //     immediate: true
            // }
        },
        methods: {
            clearContent() {
                this.companyName = ""
                this.enforceList()
            },
            checkboxChange(n) {
                // console.log('change', n);
            },
@@ -55,13 +70,30 @@
                this.show = false
            },
            open(list) {
                this.show = true
                this.enforceList()
            },
            enteryResult() {
                this.$emit('selectValue', this.checkboxValue1)
                let list = []
                this.checkboxList1.forEach(item => {
                    if(this.checkboxValue1.includes(item.userId)) {
                        list.push({
                            peerDeptId: item.dept.deptId,
                            peerDeptName: item.dept.deptName,
                            peerId: item.userId,
                            peerPhone: item.phonenumber,
                            peerType: 2,
                            peerUser: item.nickName
                        })
                    }
                })
                this.$emit('selectValue', list)
                this.close()
                console.log(44)
            },
            enforceList() {
                enforceList({nickName: this.nickName}).then(val => {
                    this.checkboxList1 = val.data.data
                })
            }
        }
    }
@@ -96,4 +128,18 @@
        padding: 0 32rpx;
        left: 0;
    }
    .set-color{
        color: gray;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 300rpx;
    }
    .set-center{
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
    }
</style>
policy/policyApply/perPicker.vue
@@ -53,7 +53,7 @@
                this.index = e.detail.value[0]
            },
            companyList() {
                companyList({companyName: this.companyName}).then(val => {
                companyList({companyName: this.companyName, companyStatus: 0, checkStatus: 2}).then(val => {
                    if(val.data.code == 200){
                        if(!val.data.rows.length || !val.data.rows){
                            uni.showToast({
policy/policyApply/policyApply.vue
@@ -339,19 +339,8 @@
                this.$refs.perpage.open(this.list)
            },
            selectValue(value) {
                this.form.peers = []
                this.list.forEach(item => {
                    if(value.includes(item.userId)) {
                        this.form.peers.push({
                            peerDeptId: item.dept.deptId,
                            peerDeptName: item.dept.deptName,
                            peerId: item.userId,
                            peerPhone: item.phonenumber,
                            peerType: 2,
                            peerUser: item.nickName
                        })
                    }
                })
                this.form.peers = value
            }
        }
    }
qiye/my/my.vue
@@ -26,6 +26,13 @@
                        <text class="change">投诉记录</text>
                    </view>
                    <u-icon name="arrow-right"></u-icon>
                </view>
                <view class="item" @click="switchPhone()" v-if="isShowChange">
                    <view class="set-flex">
                        <image src="/static/qiye/qiehuan.png" mode="widthFix"></image>
                        <text class="change">切换账号</text>
                    </view>
                    <u-icon name="arrow-right"></u-icon>
                </view>
                <view class="item" @click="goChangePhone()">
                    <view class="set-flex">
@@ -60,7 +67,7 @@
<script>
    import tabsCom from '@/qiye/components/bottom.vue'
    import { getInfo } from '@/api/auth.js'
    import { getInfo, getCompanyList } from '@/api/auth.js'
    import {  company } from '@/api/qiye.js'
    export default {
        components: {
@@ -71,7 +78,9 @@
                activeNumber: 2,
                msg: {},
                src: '/static/policy/header.png',
                userPhone: ""
                userPhone: "",
                companyId: "",
                isShowChange: false
            }
        },
        onShow() {
@@ -81,20 +90,31 @@
            httoInfo() {
                getInfo().then(val => {
                    this.userPhone = val.data.data.phonenumber
                    company(val.data.data.deptId).then(val => {
                    this.companyId = uni.getStorageSync('companyId')
                    getCompanyList({companyPhone:val.data.data.phonenumber, companyStatus: 0, checkStatus: 2}).then(val => {
                        if(val.data.rows.length > 1) {
                            this.isShowChange = true
                        }
                    })
                    company(this.companyId).then(val => {
                        this.msg = val.data.data
                    })
                })
            },
            goChangePhone() {
                uni.navigateTo({
                    url: '/policy/changePhone/changePhone?code=02'
                    url: `/policy/changePhone/changePhone?code=02&companyId=${this.companyId}`
                })
            },
            tousu(){
                uni.navigateTo({
                    url: '/qiye/complaint/complaint'
                })
            },
            switchPhone(){
                uni.navigateTo({
                    url: "/qiye/switchPhone/switchPhone"
                })
            },
            logout(){
                uni.showModal({
qiye/qiyeIndex/qiyeIndex.vue
@@ -7,36 +7,48 @@
            <view class="font">
                <p v-for="(item,index) in list1" class="u-line-1" :key="index">{{item.docTitle}}</p>
            </view>
            <img src="/static/i06.png" class="more"  alt="" style="width: 46rpx;height: 46rpx;"/>
            <img src="/static/i06.png" class="more" alt="" style="width: 46rpx;height: 46rpx;" />
        </view>
        <view class="wbox">
            <view class="name">
                {{msg.companyName}}
            </view>
            <view class="imgbox">
                <image :src="uqrcodeImage" mode="widthFix" class="qrcode-1"></image>
                <image :src="uqrcodeImage" @longpress="saveImage" mode="widthFix" class="qrcode-1"></image>
                <view style="color: gray;font-size: 24rpx;text-align: center;">长按保存二维码</view>
            </view>
            <img src="/static/qiye/q05.png" style="width: 100%;height: 201rpx;" alt="" />
        </view>
        <view style="height: 50rpx;"></view>
        <uqrcode  :errorCorrectLevel="1" class="hide-canvas" :size="470" sizeUnit="rpx" v-if="companyCode" ref="uqrcode" canvas-id="qrcode" :value="companyCode" :options="{ backgroundColor: '#000000',useDynamicSize: true,  areaColor: '#ffffff', foregroundColor: '#ffffff' }"></uqrcode>
        <uqrcode :errorCorrectLevel="1" class="hide-canvas" :size="470" sizeUnit="rpx" v-if="companyCode" ref="uqrcode"
            canvas-id="qrcode" :value="companyCode"
            :options="{ backgroundColor: '#000000',useDynamicSize: true,  areaColor: '#ffffff', foregroundColor: '#ffffff' }">
        </uqrcode>
        <tabsCom :activeNumber.sync="activeNumber"></tabsCom>
        <!-- 绘制图片canvas -->
        <canvas class="hide-canvas1" canvas-id="canvas" ref="canvas-image"></canvas>
    </view>
</template>
<script>
    import tabsCom from '@/qiye/components/bottom.vue'
    import {  docList } from '@/api/index.js'
    import {  company } from '@/api/qiye.js'
    import { getInfo as httoInfo} from '@/api/auth.js'
    import {
        docList
    } from '@/api/index.js'
    import {
        company
    } from '@/api/qiye.js'
    import {
        getInfo as httoInfo
    } from '@/api/auth.js'
    export default {
        components: {
            tabsCom
        },
        onShow() {
            this.companyId = uni.getStorageSync('companyId')
            this.httoInfo()
        },
        data() {
@@ -44,41 +56,175 @@
                activeNumber: 0,
                companyCode: 'code===',
                uqrcodeImage: '',
                list1:[],
                companyId:'',
                msg:{}
                list1: [],
                companyId: '',
                msg: {}
            }
        },
        onReady() {
        },
        onLoad(options) {
            // if(options.id) {
            //     this.companyId = options.id||33
            // }
            //  else {
            //     this.companyId = uni.getStorageSync('qiyedata').companyId
            //  }
            if (options.id && options.id != 'undefined') {
                uni.setStorageSync('companyId', options.id)
                this.companyId = options.id
            }
        },
        methods: {
            httoInfo() {
                httoInfo().then(val => {
                    console.log(val.data.data.deptId)
                    this.companyId = val.data.data.deptId
                    this.getInfo()
            // 将base64 转换为本地图片
            base64ToImage() {
                return new Promise((resolve, reject) => {
                    try {
                        var save = wx.getFileSystemManager();
                        var number = Math.random();
                        //保存本地图片文件路径,也是绘图路径
                        let filePath = wx.env.USER_DATA_PATH + '/pic' + number + '.png'
                        save.writeFile({ // 写文件
                            filePath,
                            data: this.uqrcodeImage.slice(22),
                            encoding: 'base64',
                            success: (res) => {
                                wx.getImageInfo({ // 读取图片
                                    src: filePath,
                                    success: (res) => {
                                        // console.log(res)
                                        if (res?.path) {
                                            resolve(res.path)
                                        } else {
                                            reject(res)
                                        }
                                    },
                                    error: (res) => {
                                        reject(res)
                                    }
                                })
                            }
                        })
                    } catch (err) {
                        uni.showToast({
                            title: '获取失败,请稍后重试',
                            icon: 'none'
                        })
                        reject(err)
                    }
                })
            },
            more1(){
            // 文字换行
            wrapText(context, text, x, y, maxWidth, lineHeight) {
                try{
                    var words = text.split('');
                    var line = '';
                    for (var n = 0; n < words.length; n++) {
                        var testLine = line + words[n] + ' ';
                        var metrics = context.measureText(testLine);
                        var testWidth = metrics.width;
                        if (testWidth > maxWidth && n > 0) {
                            console.log(x,y)
                            context.fillText(line, x, y);
                            line = words[n] + ' ';
                            y += lineHeight;
                        } else {
                            line = testLine;
                        }
                        if (n === words.length - 1) {
                            const textWidth = context.measureText(line).width;
                            // 设置文本的x坐标位置,使其居中
                            const xPosition = (300 - textWidth) / 2
                          context.fillText(line, xPosition, y);
                        }
                    }
                }catch(err) {
                    uni.showToast({
                        title: '转换失败,请稍后重试',
                        icon: 'none'
                    })
                }
            },
            async saveImage() {
                try {
                    const context = uni.createCanvasContext('canvas', this)
                    const value = await this.base64ToImage()
                    context.setFillStyle('white');
                     context.fillRect(0, 0, 300, 400);
                    context.drawImage(value, 0, 0, 300, 300)
                    // 计算文本的宽度
                    context.setFontSize(20);
                    const textWidth = context.measureText(this.msg.companyName).width;
                    // 设置文本的x坐标位置,使其居中
                    const xPosition = (300 - textWidth) / 2
                    let position = 0
                    if(xPosition > 0) {
                        position = xPosition
                    }
                    context.setFillStyle('#111111'); // 设置文字颜色为红色
                    this.wrapText(context, this.msg.companyName, position, 330, 300, 30)
                    context.draw(true, () => {
                        setTimeout(() => {
                            uni.canvasToTempFilePath({
                                canvasId: "canvas",
                                success: val => {
                                    console.log(val)
                                    const tempFilePath = val.tempFilePath;
                                    uni.saveImageToPhotosAlbum({
                                        filePath: tempFilePath,
                                        success: () => {
                                            uni.showToast({
                                                title: '图片保存成功',
                                                icon: 'success',
                                                duration: 2000
                                            });
                                        },
                                        fail: () => {
                                            uni.showToast({
                                                title: '图片保存失败',
                                                icon: 'none'
                                            });
                                        }
                                    });
                                },
                                fail: err => {
                                    uni.showToast({
                                        title: '转换图片路径失败',
                                        icon: 'none'
                                    });
                                }
                            }, this)
                        }, 1500)
                    })
                } catch (err) {
                    uni.showToast({
                        title: '保存失败,请稍后重试',
                        icon: 'none'
                    });
                }
            },
            httoInfo() {
                // httoInfo().then(val => {
                //     // console.log(val.data.data.deptId)
                //     this.getInfo()
                // })
                this.getInfo()
            },
            more1() {
                uni.navigateTo({
                    url: `/pages/hqzc/list`
                })
            },
            getInfo() {
                docList({pageNum:1,pageSize:2}).then(val =>{
                docList({
                    pageNum: 1,
                    pageSize: 2
                }).then(val => {
                    let data = val.data.rows
                    for(let i = 0;i<data.length;i++){
                        if(data[i].docTitle.length>17){
                    for (let i = 0; i < data.length; i++) {
                        if (data[i].docTitle.length > 17) {
                            data[i].docTitle = data[i].docTitle.slice(0, 17) + '...'
                        }
                    }
@@ -86,15 +232,14 @@
                })
                company(this.companyId).then(val => {
                    this.msg = val.data.data
                    this.companyCode = this.msg.companyCode
                    uni.setStorageSync('qiyedata', this.msg)
                    setTimeout(() => {
                        this.$nextTick(() => {
                            this.$refs.uqrcode.toTempFilePath({
                              success: res => {
                                this.uqrcodeImage = res.tempFilePath
                              }
                                success: res => {
                                    this.uqrcodeImage = res.tempFilePath
                                }
                            });
                        })
                    }, 500)
@@ -103,7 +248,7 @@
                    // console.log(this.msg.docContent)
                    // getDicts('doc_type').then(val => {
                    //     console.log(this.msg.docType)
                    //     const value = val.data.data.find(item => item.dictValue == this.msg.docType)
                    //     this.type = value.dictLabel
                    // })
@@ -114,16 +259,17 @@
</script>
<style>
    page{
    page {
        background: #F7F7F7;
    }
</style>
<style lang="scss" scoped>
    .head{
    .head {
        width: 100%;
        height: 518rpx;
    }
    .hqzc{
    .hqzc {
        position: absolute;
        border-radius: 5px;
        background: #fff;
@@ -134,22 +280,26 @@
        top: 500rpx;
        padding: 24rpx;
        box-sizing: border-box;
        .line{
        .line {
            width: 2rpx;
            height: 50rpx;
            background: #f1f1f1;
            margin-right: 18rpx;
        }
        .img{
        .img {
            width: 76rpx;
            height: 76rpx;
            margin-right: 18rpx;
        }
        .more{
        .more {
            width: 28rpx;
            height: 28rpx;
        }
        .font{
        .font {
            font-size: 26rpx;
            color: #4A4E60;
            margin-right: 50rpx;
@@ -157,16 +307,27 @@
            // text-align: center;
        }
    }
    .hide-canvas{
    .hide-canvas {
        display: none;
    }
    .wbox{
    .hide-canvas1 {
        position: fixed;
        bottom: 12000rpx;
        width: 600rpx;
        height: 800rpx;
        // border: 2rpx solid;
    }
    .wbox {
        background: #fff;
        border-radius: 5px;
        padding: 24rpx;
        box-sizing: border-box;
        margin: 120rpx 32rpx;
        .name{
        .name {
            text-align: center;
            color: #202d44;
            font-size: 36rpx;
@@ -176,16 +337,18 @@
            padding-bottom: 20rpx;
            margin-bottom: 20rpx;
        }
        .imgbox{
        .imgbox {
            text-align: center;
            border-radius: 5rpx;
            border: 4rpx solid #CCDEFE;
            padding: 20rpx;
            width: 420rpx;
            margin: 0 auto;
        }
        .qrcode-1{
        .qrcode-1 {
            width: 400rpx;
            height: 400rpx;
        }
qiye/switchPhone/switchPhone.vue
New file
@@ -0,0 +1,91 @@
<template>
    <view>
        <view style="padding:  32rpx;">
            <u-radio-group  iconPlacement="right" v-model="value" placement="column">
                <u-radio v-for="(item,index) in list" :key="index" :label="item.companyName" :name="item.companyId"></u-radio>
            </u-radio-group>
            <view class="down-button">
                <u-button shape="circle" color="#1171E0" @click="entery">确定</u-button>
            </view>
        </view>
    </view>
</template>
<script>
    import {  getInfo,getCompanyList } from '@/api/auth.js'
    import {  company } from '@/api/qiye.js'
    export default {
        data() {
            return {
                list: [],
                value: ""
            }
        },
        onLoad() {
            this.getInfo()
        },
        methods: {
            getInfo(){
                getInfo().then(val => {
                    if(val.data.code === 200) {
                        this.value = Number(uni.getStorageSync("companyId"))
                        this.getCompanyList(val.data.data.phonenumber)
                    }
                })
            },
            getCompanyList(companyPhone) {
                getCompanyList({companyPhone, companyStatus: 0, checkStatus: 2}).then(val => {
                    this.list = val.data.rows
                })
            },
            entery() {
                uni.setStorageSync("companyId", this.value)
                company(this.value).then(val => {
                    if(val.data.code == 200) {
                        uni.setStorageSync('qiyedata', val.data.data)
                        uni.showToast({
                            title: "切换成功",
                            icon: 'none'
                        })
                        setTimeout(() => {
                            uni.navigateBack()
                        }, 500)
                    } else {
                        uni.showToast({
                            title: val.data.msg,
                            icon: 'none'
                        })
                    }
                })
            }
        }
    }
</script>
<style lang="scss" scoped>
    .title{
        font-size: 36rpx;
        font-weight: 700;
        text-align: center;
        margin-bottom: 20rpx;
    }
    .down-button{
        margin-top: 30rpx;
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        bottom: 0;
        width: 100%;
        padding: 32rpx;
        box-sizing: border-box;
        left: 0;
    }
    /deep/ .u-radio{
        margin-bottom: 40rpx;
    }
</style>
static/qiye/qiehuan.png