cuiqian2004
2025-09-25 9efd4a80aae58cf36266e774d3c820cc8e115028
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<template>
    <view class="pages-my">
        <view class="group">
            <view class="item line">
                <view>远程协助:</view>
                <view class="right"></view>
                <a @click="clickRemoteAssistance">
                    <uni-icons class="icon" type="right" size="24" color="#888"></uni-icons>
                </a>
            </view>
            <view class="item line">
                <view>日志上传:</view>
                <view class="right"></view>
                <a @click="clickUploadLog">
                    <uni-icons class="icon" type="right" size="24" color="#888"></uni-icons>
                </a>
            </view>
            <view class="item line">
                <view>查看说明书:</view>
                <view class="right"></view>
                <a @click="clickViewInstruction">
                    <uni-icons class="icon" type="right" size="24" color="#888"></uni-icons>
                </a>
            </view>
            <view class="item line">
                <view>接口日志:</view>
 
                <switch :checked="withLog" style="transform:scale(0.7)" @change="switchChangeLog"/>{{withLog?"记录接口日志":"不记录接口日志"}}
                <view class="right"></view>
                <a @click="clickApiLog">
                    <uni-icons class="icon" type="right" size="24" color="#888"></uni-icons>
                </a>
            </view>
        </view>
    </view>
</template>
<script>
    import {
        session,
        showToast,
        showModal
    } from "@/comm/utils.js"
    import {
        Button
    } from 'antd-mobile-vue-next'
    export default {
        name: "PagesMy",
        components: {
            'a-button': Button
        },
        data() {
            return {
                withLog: getApp().globalData.withLog || false
            }
        },
        onLoad() {
 
        },
        computed: {
 
        },
        methods: {
            switchChangeLog(e) {
                this.withLog = e.detail.value
                getApp().globalData.withLog =this.withLog
                session.setValue("write_log",this.withLog ? 1:0) 
            },
 
            clickRemoteAssistance() {
                showToast("暂未实现")
            },
            clickUploadLog() {
                showToast("暂未实现")
            },
            clickViewInstruction() {
                uni.navigateTo({
                    url: "/pages/my/instruction"
                })
            },
            clickApiLog() {
                uni.navigateTo({
                    url: "/pages/my/log"
                })
            },
 
 
 
 
        }
    }
</script>
 
<style lang="scss">
    .pages-my {
        display: flex;
        width: 750rpx;
        height: 100vh;
        flex-direction: column;
 
        .group {
            width: calc(100% - 40rpx);
            border: 2rpx solid #ccc;
            border-radius: 20rpx;
            margin: 20rpx;
            padding: 0 10rpx;
            display: flex;
            flex-direction: column;
            background-color: #fff;
 
            .item {
                width: 100%;
                padding: 20rpx 10rpx;
                display: flex;
                flex-direction: row;
                align-items: center;
 
                .right {
                    flex: 1;
                    text-align: right;
                    color: #888;
                }
            }
 
            .line {
                border-bottom: 2rpx solid #ccc;
            }
        }
 
 
 
 
    }
</style>