#
whycq
2022-12-05 e94ac3c8f45346809a72488bafe51bc5b2cd19e3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<template>
    <view style="width: 100%;height: 100vh;">
        <view style="width: 100%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;">
            <button size="default" class="cu-btn bg-blue lg " @click="callEmpty">呼叫空板</button>
        </view>
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                commonUrl: '',
                baseIP: '',
                basePORT: '',
            }
        },
        mounted(){
            const UIP = uni.getStorageSync('UIP');
            this.baseIP = UIP;
            const UPORT = uni.getStorageSync('UPORT');
            this.basePORT = UPORT
            const PROJ = uni.getStorageSync('UPROJ');
            this.baseUrl = PROJ
            this.getUrl()
        },
        methods: {
            getUrl() {
                this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" + 'stwcs'
            },
            callEmpty() {
                let that = this
                uni.request({
                    url: that.commonUrl + '/site/motherPallet',
                    method:'POST',
                    success(result) {
                        var res = result.data
                        uni.showToast({title: res.msg, icon: "none", position: 'top'})
                    }
                })
            }
        }
    }
</script>
 
<style>
</style>