1
zzzz
2024-04-25 275dc81283d0f80327f42e3adb2db5938d8b6ee5
src/page/service/service.vue
@@ -16,38 +16,38 @@
</template>
<script>
import * as api from "@/axios/api";
import * as api from '@/axios/api'
export default {
    data() {
        return {
            onlineShow:false,
            onlineService: "",
        }
    },
    //生命周期 - 创建完成(访问当前this实例)
    created() {
        this.getInfoSite();
    },
    //生命周期 - 挂载完成(访问DOM元素)
    mounted() {
    },
    methods: {
        handleBack() {
            // 点击返回/
            this.$router.go(-1);
        },
        async getInfoSite() {
            let data = await api.getInfoSite()
            if (data.status === 0) {
                this.onlineService = data.data.onlineService
                this.onlineShow = true;
            } else {
                this.$store.commit('elAlertShow', { 'elAlertShow': true, 'elAlertText': data.msg });
            }
        },
  data () {
    return {
      onlineShow: false,
      onlineService: ''
    }
  },
  // 生命周期 - 创建完成(访问当前this实例)
  created () {
    this.getInfoSite()
  },
  // 生命周期 - 挂载完成(访问DOM元素)
  mounted () {
  },
  methods: {
    handleBack () {
      // 点击返回/
     // 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
      } else {
        this.$store.commit('elAlertShow', { 'elAlertShow': true, 'elAlertText': data.msg })
      }
    }
  }
}
</script>
<style scoped lang='less'>
@@ -107,4 +107,4 @@
    //取消滚动条
    overflow: hidden;
}
</style>
</style>