jhzh
2024-03-23 0d29d9a2bf0d893a67f1263bb9525131a50a2128
src/page/service/service.vue
@@ -16,17 +16,17 @@
</template>
<script>
import * as api from "@/axios/api";
import * as api from '@/axios/api'
export default {
    data() {
        return {
            onlineShow:false,
            onlineService: "",
      onlineService: ''
        }
    },
    //生命周期 - 创建完成(访问当前this实例)
    created() {
        this.getInfoSite();
    this.getInfoSite()
    },
    //生命周期 - 挂载完成(访问DOM元素)
    mounted() {
@@ -35,18 +35,18 @@
    methods: {
        handleBack() {
            // 点击返回/
            this.$router.go(-1);
     // this.$router.go(-1)
     this.$router.push('/user')
        },
        async getInfoSite() {
            let data = await api.getInfoSite()
            if (data.status === 0) {
                this.onlineService = data.data.onlineService
                this.onlineShow = true;
        this.onlineShow = true
            } else {
                this.$store.commit('elAlertShow', { 'elAlertShow': true, 'elAlertText': data.msg });
        this.$store.commit('elAlertShow', { 'elAlertShow': true, 'elAlertText': data.msg })
            }
        },
    }
    }
}
</script>