const _Http = getApp().globalData.http;
Component({
    properties: {
        add: Boolean, //是否允许新增
        ownertable: String,
        ownerid: String
    },
    data: {
        datatag: [],
        systemtag: [],
    },
    methods: {
        /* 获取标签 */
        getTags() {
            _Http.basic({
                "id": 20220929085401,
                "content": {
                    nocache: true,
                    ownertable: this.data.ownertable,
                    ownerid: this.data.ownerid
                }
            }).then(res => {
                console.log("标签列表", res)
                if (res.msg != '成功') return wx.showToast({
                    title: res.data,
                    icon: "none"
                });
                this.setData({
                    ...res.data
                })
            })
        },
        addTags() {
            wx.navigateTo({
                url: `/pages/tags/index?ownertable=${this.data.ownertable}&ownerid=${this.data.ownerid}`
            })
        }
    }
})