/*
 * @Author: zhuangzhou zhuangzhou@btioe.com
 * @Date: 2022-05-04 18:53:52
 * @LastEditors: zhuangzhou zhuangzhou@btioe.com
 * @LastEditTime: 2022-05-04 18:53:58
 * @FilePath: /mlmt-mini/src/mixin/base.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
export default {
    onShow() {
        this.$refs.pageRef && this.$refs.pageRef.refreshNotify()
    },
    methods: {
        showView(option) {
            let url = option.url
            if (option.login) {
                if (!this.$common.checkLogin()) return
            }
            if (option.param) {
                for (let x in option.param) {
                    url += url.indexOf('?') < 0 ? '?' : '&'
                    url += `&${x}=${option.param[x]}`
                }
            }
            if (option.prefun) {
                option.prefun()
            }
            uni.navigateTo({
                url: url,
                success: () => {
                    if (option.callback) {
                        option.callback()
                    }
                }
            })
        },
        unDone() {
            this.$message.toast('敬请期待')
        },
        moveHandle() {}
    }
}
