import Vue from "vue"
let prototype = Vue.prototype;

export default {
    workerTypeText(type) {
        switch (type) {
            case 0: return ['待审核', '#ff0000'];
            case 1: return ['普通师傅', '#bfbfbf'];
            case 2: return ['入驻师傅', '#d9a019'];
            default: return ['未知'];
        }
    },
    workerDetail(uid) {
        return new Promise((resolve, reject) => {
            prototype.$request({
                api: "worker.detail",
                data: {
                    uid: uid,
                }
            }).then(response => {
                console.log(response);
            }).catch(e => { });
        });
    }
}
