#
whycq
2024-07-02 e7508ca6436d1707d115e931fd96cab20fdf5d7b
#
2个文件已修改
31 ■■■■ 已修改文件
pages/home/home.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/menuHome.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.vue
@@ -2,7 +2,7 @@
    <view>
        <scroll-view scroll-y class="page">
            <view class="nav-list">
                <navigator hover-class='none' :url="'/pages' + item.url" class="nav-li" navigateTo
                <navigator hover-class='none' :url="'/pages' + item.url + '?id=' + item.id" class="nav-li" navigateTo
                    :class="'bg-'+item.color" :style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]"
                    v-for="(item,index) in elements" :key="index">
                    <view class="nav-title">{{item.title}}</view>
@@ -244,7 +244,7 @@
        onShow() {
            this.baseUrl = uni.getStorageSync('baseUrl');
            this.token = uni.getStorageSync('token');
            this.project = uni.getStorageSync('project')
            // this.project = uni.getStorageSync('project')
            this.getAuth()
            this.backGroundRepeat()
        },
@@ -264,7 +264,7 @@
                let that = this
                uni.request({
                    url: that.baseUrl + '/menu/pda/auth',
                    data: {},
                    data: {level:1,id: '0'},
                    header: { 'token': uni.getStorageSync('token') },
                    method: 'POST',
                    success(res) {
@@ -276,23 +276,15 @@
                        res = res.data
                        that.elements = []
                        if (res.code === 200) {
                            if (res.data == undefined || res.data == null || res.data == "") {
                                that.elements = that.elements2
                                return
                            }
                            for (var i = 0; i < res.data.length; i++) {
                                if (res.data.length < 0) {
                                    break;
                                }
                                that.getIcon(res.data[i].title)
                                that.elements.unshift({
                                    title: res.data[i].name,
                                    name: res.data[i].title,
                                    color: that.colorList[i],
                                    cuIcon: that.icon,
                                    url: `/${that.project}${res.data[i].action}`
                                id: res.data[i].id,
                                url: `${res.data[i].code}`
                                })
                            }
                            that.elements.push({
                                title: '退出登录',
                                name: 'logOut',
@@ -342,6 +334,15 @@
</script>
<style>
    .nav-list {
        padding: 0px 40upx 0px;
    }
    .nav-li {
        padding: 30upx;
        border-radius: 12upx;
        width: 90%;
        margin: 0 2.5% 40upx;
    }
    .page {
        height: 100vh;
    }
pages/home/menuHome.vue
@@ -122,10 +122,6 @@
                        res = res.data
                        that.elements = []
                        if (res.code === 200) {
                            // if (res.data == undefined || res.data == null || res.data == "") {
                            //     that.elements = that.elements2
                            //     return
                            // }
                            for (var i = 0; i < res.data.length; i++) {
                                if (res.data.length < 0) {
                                    break;