#
whycq
2023-10-13 acaca3cb0171f2320c95d270bcdd68fd6d5b954c
#
1个文件已修改
110 ■■■■■ 已修改文件
pages/LoginDemo/LoginDemo.vue 110 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/LoginDemo/LoginDemo.vue
@@ -26,38 +26,26 @@
            <view class="popup">
                <!-- 标题 -->
                <view class="title">网 络 配 置</view>
                    <scroll-view scroll-y="true" style="height: 20vh;">
                        <view style="margin: 4px;color: #a8abb2; font-size: 12px; " v-for="it in 10">
                            <text style="font-size: 14px;">WCS 配置</text>
                    <scroll-view scroll-y="true" style="height: 23vh;touch-action: none;">
                        <view style="margin: 4px; color: #606266;font-size: 12px; " v-for="net in network">
                            <text style="font-size: 14px;">{{net.name}}</text>
                            <view style="display: flex;align-items: center;">
                                <input class="settings-input1" type="text">
                                <input class="settings-input1" type="text" v-model="net.ip">
                                <text style="font-weight: 900;">:</text>
                                <input class="settings-input2" type="text">
                                <input class="settings-input2" type="text" v-model="net.port">
                                <text style="font-weight: 900;">/</text>
                                <input class="settings-input3" type="text">
                                <input class="settings-input3" type="text" v-model="net.address">
                            </view>
                        </view>
                    </scroll-view>
                <view class="">
                    <view class="">
                <view class="operate">
                    <view class="operate-cancel" @click="cancel">
                        取消
                    </view>
                    <view class="">
                    <view class="operate-confirm" @click="confirm">
                        确认
                    </view>
                </view>
                <!-- <view class="popup-item">
                    <view class="popup-item-left">IP:</view>
                    <view class="popup-item-right"><input type="text" v-model="url.ip"></view>
                </view>
                <view class="popup-item">
                    <view class="popup-item-left">端口:</view>
                    <view class="popup-item-right"><input type="text" v-model="url.port"></view>
                </view>
                <view class="popup-item">
                    <view class="popup-item-left">项目:</view>
                    <view class="popup-item-right"><input type="text" v-model="url.project"></view>
                </view> -->
            </view>
        </uni-popup>
        
@@ -78,6 +66,10 @@
            return {
                version: '',
                remberPassword: true,
                network: [
                    {name: 'wms',ip:'192.168.1.1',port: '8080',address: 'pswms'},
                    {name: 'wcs',ip:'192.168.1.1',port: '9090',address: 'pswcs'}
                ],
                url: {
                    ip: '',
                    port: '',
@@ -106,6 +98,14 @@
            settings() {
                this.$refs.settings.open()
            },
            cancel() {
                console.log(uni.getStorageSync('Network'));
                this.$refs.settings.close()
            },
            confirm() {
                uni.setStorageSync('Network', this.network);
                this.$refs.settings.close()
            },
            login() {
                let path = 'demo'
                uni.navigateTo({
@@ -130,28 +130,7 @@
                    inset -2px -2px 2px rgba(255,255,255,.7),
                    -2px -2px 2px rgba(0,0,0,.4);
    }
    .settings-input1 {
        border: 1px solid #dcdfe6;
        flex: 2;
        margin: 2px;
        padding: 4px;
        border-radius: 4px;
    }
    .settings-input2 {
        border: 1px solid #dcdfe6;
        flex: 1;
        margin: 2px;
        padding: 4px;
        border-radius: 4px;
    }
    .settings-input3 {
        border: 1px solid #dcdfe6;
        flex: 2;
        margin: 2px;
        padding: 4px;
        border-radius: 4px;
    }
    .main {
        height: 100%;
        width: 100%;
@@ -269,5 +248,50 @@
        align-items: center;
        justify-content: center;
        font-size: 24px;
        color: #a8abb2;
    }
    .settings-input1 {
        border: 1px solid #dcdfe6;
        flex: 2;
        margin: 2px;
        padding: 4px;
        border-radius: 4px;
    }
    .settings-input2 {
        border: 1px solid #dcdfe6;
        flex: 1;
        margin: 2px;
        padding: 4px;
        border-radius: 4px;
    }
    .settings-input3 {
        border: 1px solid #dcdfe6;
        flex: 2;
        margin: 2px;
        padding: 4px;
        border-radius: 4px;
    }
    .operate {
        height: 7vh;
        display: flex;
        text-align: center;
        border-top: 1px solid #dcdfe6;
        font-size: 16px;
    }
    .operate-cancel {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #606266;
    }
    .operate-confirm {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        border-left: 1px solid #dcdfe6;
        color: #00aeec;
    }
</style>