Browse Source

移除信息页面

xiaohaizhao 2 năm trước cách đây
mục cha
commit
2a4f2aae5f

+ 0 - 87
pages/tabbar/message/details.js

@@ -1,87 +0,0 @@
-const _Http = getApp().globalData.http;
-Page({
-    data: {
-        detailsData: []
-    },
-    onLoad(options) {
-        _Http.basic({
-            "classname": "system.message.Message",
-            "method": "readMessage",
-            "content": {
-                "messageid": options.id
-            }
-        }).then(res => {
-            if (res.msg != '成功') return wx.showToast({
-                title: res.msg,
-                icon: "none"
-            })
-            this.setData({
-                detailsData: res.data
-            })
-        })
-    },
-    async toDetails() {
-        const {
-            objectname,
-            objectid
-        } = this.data.detailsData;
-
-        /* const res = await _Http.basic({
-            "classname": "saletool.common.auth",
-            "method": "isAuth",
-            "content": {
-                objectid,
-                objectname
-            }
-        });
-        if (res.msg != '成功' || res.data[0].isAuth != 1) return wx.showToast({
-            title: '暂无权限进入应用',
-            icon: "none"
-        }); */
-
-        switch (objectname) {
-            case 'sat_courseware':
-                wx.navigateTo({
-                    url: `/pages/college/index`,
-                })
-                break;
-            case 'sat_sharematerial':
-                wx.navigateTo({
-                    url: `/pages/promotional/index`,
-                })
-                break;
-            case 'sat_notice':
-                wx.navigateTo({
-                    url: `/pages/annunciate/index`,
-                })
-                break;
-            case 'sat_submitedit':
-                wx.navigateTo({
-                    url: `/pages/submission/index`,
-                })
-                break;
-            case 'sat_orderclue':
-                wx.navigateTo({
-                    url: `/packageA/saleClue/index`,
-                })
-                break;
-            case 'sys_attachment':
-                let item = {
-                    attachmentid: objectid,
-                    document: '营销物料'
-                }
-                wx.navigateTo({
-                    url: '/pages/tabbar/smartStore/folder?item=' + JSON.stringify(item),
-                })
-                break;
-            default:
-                console.log(objectname)
-                wx.showToast({
-                    title: '当前应用暂不支持跳转',
-                    icon: "none"
-                })
-                break;
-        }
-    },
-    onShareAppMessage(res) { }
-})

+ 0 - 4
pages/tabbar/message/details.json

@@ -1,4 +0,0 @@
-{
-    "navigationBarTitleText": "消息详情",
-    "usingComponents": {}
-}

+ 0 - 38
pages/tabbar/message/details.scss

@@ -1,38 +0,0 @@
-.msg-mian {
-    width: 750rpx;
-    padding: 30rpx;
-    box-sizing: border-box;
-    background-color: #ffffff;
-
-    .title {
-        font-size: 30rpx;
-        font-family: PingFang SC-Bold, PingFang SC;
-        font-weight: bold;
-        color: #333333;
-    }
-
-    .time {
-        width: 100%;
-        margin-top: 20rpx;
-        font-size: 20rpx;
-        font-family: PingFang SC-Regular, PingFang SC;
-        color: #999999;
-        padding-bottom: 30rpx;
-        border-bottom: 1rpx dashed #CCCCCC;
-    }
-
-    .content {
-        margin-top: 30rpx;
-        font-size: 28rpx;
-        font-family: PingFang SC-Regular, PingFang SC;
-        color: #666666;
-
-        >text {
-            display: inline-block;
-            width: 200rpx;
-            font-size: 28rpx;
-            font-family: PingFang SC-Regular, PingFang SC;
-            color: #3874F6;
-        }
-    }
-}

+ 0 - 8
pages/tabbar/message/details.wxml

@@ -1,8 +0,0 @@
-<view class="msg-mian">
-    <view class="title multi-line">{{detailsData.title}}</view>
-    <view class="time">{{detailsData.readdate}}</view>
-    <view class="content multi-line">{{detailsData.message}}</view>
-  <!--   <view class="content" wx:if="{{detailsData.type=='应用'}}" bindtap="toDetails">请前往 <text>{{type.query(detailsData.objectname)}} >
-        </text></view> -->
-</view>
-<wxs module="type" src='./modules/determineType.wxs' />

+ 0 - 89
pages/tabbar/message/index.js

@@ -1,89 +0,0 @@
-const getHeight = require("../../../utils/GetRheRemainingHeight"),
-    _Http = getApp().globalData.http;
-
-Page({
-    /**
-     * 页面的初始数据
-     */
-    data: {
-        height: 0,
-        list: [],
-        content: {
-            nocache: true,
-            pageNumber: 1,
-            pageSize: 20,
-            pageTotal: 1,
-            type: "应用",
-            where:{}
-        },
-        total: 0,
-    },
-
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad(options) {},
-    //切换tab选项
-    tabChange({
-        detail
-    }) {
-        this.setData({
-            "content.type": detail.name
-        })
-        this.getlist(true);
-    },
-    
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady() {
-        getHeight.getHeight("#tabs", this).then(res => {
-            this.setData({
-                height: res
-            })
-        })
-    },
-
-    toDetails(e) {
-        const {
-            item
-        } = e.currentTarget.dataset;
-        wx.navigateTo({
-            url: './details?id=' + item.messageid,
-				})
-    },
-
-    getlist(init = false) {
-        if (init.detail != undefined) init = init.detail;
-        if (init) this.setData({
-            ['content.pageNumber']: 1
-        })
-        if (this.data.content.pageNumber > this.data.content.pageTotal) return;
-        _Http.basic({
-            "classname": "system.message.Message",
-            "method": "queryMessage",
-            content: this.data.content
-        }).then(res => {
-            this.selectComponent('#ListBox').RefreshToComplete();
-            if (res.msg != '成功') return wx.showToast({
-                title: res.msg,
-                icon: "none"
-            })
-            this.setData({
-                total: res.total,
-                list: (res.pageNumber == 1) ? res.data : this.data.list.concat(res.data),
-                ['content.pageNumber']: res.pageNumber + 1,
-                ['content.pageTotal']: res.pageTotal
-            })
-        })
-    },
-
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow() {
-        this.getlist(true);
-        this.getTabBar().init();
-    },
-    onShareAppMessage() {}
-})

+ 0 - 6
pages/tabbar/message/index.json

@@ -1,6 +0,0 @@
-{
-    "usingComponents": {
-        "My_tabs": "./modules/tabs"
-    },
-    "navigationBarTitleText": "信息"
-}

+ 0 - 76
pages/tabbar/message/index.scss

@@ -1,76 +0,0 @@
-// @import '/static/unread.wxss';
-
-/* 未读 */
-.unread {
-    width: 750rpx;
-    height: 34rpx;
-    text-align: center;
-    font-size: 24rpx;
-    font-family: PingFang SC-Regular, PingFang SC;
-    color: #999999;
-    margin: 12rpx 0 -5rpx 0;
-}
-
-page {
-    padding: 0 !important;
-    overflow: hidden !important;
-}
-
-.tab-active-class {
-    color: var(--assist) !important;
-    font-size: 28rpx !important;
-    font-family: PingFang SC-Bold, PingFang SC !important;
-    font-weight: bold !important;
-}
-
-/* 消息列表 */
-.list {
-    position: relative;
-    height: 194rpx;
-    width: 690rpx;
-    box-sizing: border-box;
-    border-radius: 16rpx;
-    overflow: hidden;
-    background: #ffffff;
-    margin: 20rpx auto 0;
-    padding: 30rpx;
-
-    .title {
-        height: 40rpx;
-        font-size: 28rpx;
-        font-family: PingFang SC-Medium, PingFang SC;
-        font-weight: 500;
-        color: #333333;
-    }
-
-    .content {
-        width: 620rpx;
-        height: 34rpx;
-        font-size: 24rpx;
-        font-family: PingFang SC-Regular, PingFang SC;
-        color: #666666;
-        margin-top: 16rpx;
-    }
-
-    .time {
-        height: 28rpx;
-        font-size: 20rpx;
-        font-family: PingFang SC-Regular, PingFang SC;
-        color: #999999;
-        margin-top: 16rpx;
-
-        .tag {
-            margin-right: 10rpx;
-        }
-    }
-
-    .unread-item {
-        position: absolute;
-        width: 16rpx;
-        height: 16rpx;
-        background: var(--error);
-        border-radius: 50%;
-        top: 6rpx;
-        right: 6rpx;
-    }
-}

+ 0 - 21
pages/tabbar/message/index.wxml

@@ -1,21 +0,0 @@
-<!-- <My_tabs id='tabs' bind:onChange='tabChange' /> -->
-<van-tabs id='tabs' active="{{ content.type }}" color='var(--assist)' tab-active-class='tab-active-class' bind:change="tabChange">
-    <van-tab title="应用消息" name='应用' />
-    <van-tab title="系统消息" name='系统' />
-</van-tabs>
-
-<Yl_ListBox id="ListBox" height="{{height}}" bind:getlist='getlist'>
-    <view class="unread">总共{{total}}条</view>
-    <navigator url="#" class='list' wx:for="{{list}}" data-item="{{item}}" bindtap="toDetails">
-        <view class="title line-1">{{item.title}}</view>
-        <view class="content line-1">{{item.message}}</view>
-        <view class="time">
-            <van-tag class="tag" wx:if="{{item.objectname}}" plain type="primary">{{type.query(item.objectname)}}</van-tag>{{item.createdate}}
-        </view>
-        <view wx:if="{{item.isread=='0'}}" class="unread-item" />
-    </navigator>
-    <Yl_Empty wx:if="{{!list.length}}" />
-    <view style="height: 180rpx;" />
-</Yl_ListBox>
-
-<wxs module="type" src='./modules/determineType.wxs' />

+ 0 - 27
pages/tabbar/message/modules/determineType.wxs

@@ -1,27 +0,0 @@
-module.exports.query = function (name) {
-    var showName = '';
-    switch (name) {
-        case 'sat_courseware':
-            showName = '商学院';
-            break;
-        case 'sat_sharematerial':
-            showName = '推广素材';
-            break;
-        case 'sat_notice':
-            showName = '通告';
-            break;
-        case 'sat_submitedit':
-            showName = '提报';
-            break;
-        case 'sat_orderclue':
-            showName = '销售线索';
-            break;
-        case 'sys_attachment':
-            showName = '营销物料';
-            break;
-        default:
-            showName = '其他应用';
-            break;
-    }
-    return showName;
-}

+ 0 - 68
pages/tabbar/message/modules/tabs.js

@@ -1,68 +0,0 @@
-// pages/tabbar/message/modules/tabs.js
-Component({
-    /**
-     * 组件的属性列表
-     */
-    properties: {
-        list: {
-            type: Array,
-            value: [{
-                label: '系统消息',
-                nubmer: "9"
-            }, {
-                label: '应用消息',
-                nubmer: "15"
-            }]
-        },
-        onChange: {
-            type: Function
-        }
-    },
-
-    lifetimes: {
-        ready() {
-            this.setBorBotLeft()
-        }
-    },
-
-    /**
-     * 组件的初始数据
-     */
-    data: {
-        animationData: {}, //横线平移动画
-        acIndex: 0,
-    },
-
-    /**
-     * 组件的方法列表
-     */
-    methods: {
-        /* 改变选中 */
-        changeTab(e) {
-            if (this.data.acIndex == e.currentTarget.dataset.index) return;
-            this.setData({
-                acIndex: e.currentTarget.dataset.index
-            })
-            this.triggerEvent("onChange", e.currentTarget.dataset.item)
-            this.setBorBotLeft()
-        },
-        //更改横线位置
-        setBorBotLeft() {
-            let animation = wx.createAnimation({
-                duration: 1000,
-                timingFunction: 'ease',
-            })
-            let that = this;
-            let query = wx.createSelectorQuery().in(this)
-            query.select('.acTitle').boundingClientRect();
-            query.exec(function (res) {
-                animation.translate(res[0].left).step({
-                    duration: 300
-                })
-                that.setData({
-                    animationData: animation.export()
-                })
-            })
-        },
-    }
-})

+ 0 - 4
pages/tabbar/message/modules/tabs.json

@@ -1,4 +0,0 @@
-{
-    "component": true,
-    "usingComponents": {}
-}

+ 0 - 44
pages/tabbar/message/modules/tabs.scss

@@ -1,44 +0,0 @@
-.tabs {
-    position: relative;
-    display: flex;
-    width: 750rpx;
-    height: 90rpx;
-    background: #fff;
-
-    .item {
-        flex: 1;
-        display: flex;
-        align-items: center;
-        justify-content: center;
-
-        .title {
-            position: relative;
-            font-size: 28rpx;
-            font-family: PingFang SC-Bold, PingFang SC;
-            font-weight: bold;
-            color: #999999;
-            letter-spacing: 2rpx;
-
-            .badge {
-                position: absolute;
-                top: 50%;
-                right: -30rpx;
-            }
-        }
-
-        .acTitle {
-            color: var(--assist);
-        }
-
-
-    }
-
-    .my-bor-bot {
-        position: absolute;
-        width: 128rpx;
-        height: 4rpx;
-        background: #0486FE;
-        left: 0;
-        bottom: 0;
-    }
-}

+ 0 - 9
pages/tabbar/message/modules/tabs.wxml

@@ -1,9 +0,0 @@
-<view class="tabs">
-    <view class="item" wx:for="{{list}}" wx:key="{{item.label}}" data-index="{{index}}" data-item="{{item}}" bindtap="changeTab">
-        <view class="title {{index==acIndex?'acTitle':''}}">
-            {{item.label}}
-            <!-- <van-icon wx:if="{{item.nubmer}}" class="badge" info="{{item.nubmer}}" /> -->
-        </view>
-    </view>
-    <view animation="{{animationData}}" class="my-bor-bot" />
-</view>